move hash functions to more appropriate headers