changed array_key_exists to isset