optimization of reformatting routeresponse