functioning multiloop w/ 1 bug