cleanup
read & write time