Code shorter and optimized