remove deprecated call to has_key