quit conditions for algorithm described