Modified to use DateTime