finishing up filter functionality