refactored model mapping