Added filter functionality.