start factoring out hash table to something reusable.