finishing up calculation section