adding basic support for writing