update_hash method