first draft for hash functions