update to has_key