Algorithm attempt.