search functionality for state implemeneted