change array_key_exists() to isset()