Added Loop interation code