a better array key filter