use isset() instead of array_key_exists() because it's faster