Optimized

Code optimized