write.methods function

write.methods