new organisation for stack and flow