added back valid date functionality