bigger refactoring for next start date calculus