add first part of write process.