Changed array_keys to array_filter