filter and email working with tests