renamed the new parameter to class_wieght