refactoring mapper