better logging and filtering of results