map implementation/some tests