changing control blocks to "with" and "loop" for SS3.1