refactor mapper