Algorithm completed