an example of nesting several resolve functions together