Mas refactoring2