Is this duped code? Can you break it out into a diff method?