refactored mapping