updated flow snippet