magnesium reacts with hydrochloric acid.