extract the intention filtering into a method