updated stage4567 to run max 3 loops, would run indefinately before