convert classes to ids