added back part of the dates handling