made some changes to the calculations main does