looping through all instances