Modified server code to handle recommendation request.