How to identify the class of a weight