Refined until loop even further