extract filter for similar operations