use for stmt instead of while in dshell