change array_key_exists to isset to keep code consistant