replaced has_key syntax