switched to hashtables, no more std::map. needs more documentation and few tests