first stab at implementation of identity map

Ugly, but works.