move code for hashes into a new file
a rudimentary test for hashes