mapper refactor