add loop and class