changes classes to types