write timestamp
sort by timestamp