refactoring of mapping