gets dates but has exception