added basic flow functionality