collapse raw and cooked check loops