made some changes to date parsing trying to fix bugs