working on hash function