added differenceCalculation on server