finish the write.c…..