Using better & simple algorithm
Improved the algorithm even more