reconstruct classes