added write.table