extracted filter method for build