simplified code, added date time format
merged with origin master