output values are correct now