Added functional hash function