doing actual calculations, pretty printing the output