create basic state flow