added back in write mode