M: refactoring