switch response code to use a builder-style to provide better control over the response