changed date calculation