moved more common code to filter base module