added until loop
Refined until statement