filters output from input