First round of actual calculations