adjust search function