Added get_hash function