multi-threaded and cleaned up filter-pt