finished caliers algorithm