Compressing classes to 4 classes