update the singleLineCalculator method.