switch direction
About to write data