improvements to filter input data before processing