updates rems using function, and updates the class names for labels variations