M is not defined in the code