stop when input is not positive