Changes in the looping constructs

Changes in the looping constructs for wrapping the board