test the hash function