renamed restRequest param to request in newRequest