map implementation