use helper method to build filter