Added the filtering button functionality