remove unnecessary input argument M