updated loops