improved fastFilter method