Optimization of the 1st solution