The algorithm is making more sense