removing redundant hash find_key function