add write.c
first time compiled successfully