defining scriptable flows