Working. Now make the algorithm better.