add search function to server.php