Made search filter functional