Adding Loop support for CODE GENERATION