fix date format + add sort algorithm (todo)