updated loops example