hamt: wrote some tests. fixed some bugs
hamt: more testing and bugfixing