txt input handling