restructure, add stages