changed hash function