refactor db mapper