add function to add many classes in one time