Made filter2 effective. Tested, but need to change main function