optimized generated classes