moved HashDict methods out to separate module for further reuse