added write.chrono function