corrected some errors due to Date format change and a typo