overall fix of handling interactive mode and inputting