added write.ml