write flow