Worked on flow control for the FOR loops