Break this out into a separate method so we don't duplciate all this code