starting calculations