Added looping through classes (not working)