Adding locations as parameter to filter

I added locations as a parameter in the Filter function.