change cmode entity to class.