Changed how the outputs are being assigned. I think this makes more sense.