optimized the classification