updates after getting m's input