Nit: I'd probably add a blank line before this one to break up this function a bit.