add calculation and output messages