a few primitive to manipulate map, with test