in begin loop: implemented the structure of the loop instruction using loop/recur and loop counter