initial add of write.go to the api