moew refactoring