refactored IMap class