added implmentation of map