Optimized the code
Optimized the code