replace array_key_exists with isset