Added while and for loops to the example task