Almost done with basic example of writing data