updated flow and controllers