fixed hash function and find function