controller flow and structure