solved loops