[new] implementation of map