run a command until a condition is met, then run another one!