update calculations