this is a nit, but I'd move this to a "onSucceeded" function, just to be a little cleaner.