send query to server