adding calculations for date manipulation