implement loop in input() to prevent fallthrough