added write step