Started implementation of Write()