first iteration of calculations.