cleaning before writing instruction