added search functionality when giving search argument to server