fixed off by one date error