adding before and after filtering