Improve the calculation