Added date checking