cleaning up some of the hashing logic