corrected a typo and changed how M is introduced