adds search funtionality