use Ruby readline
straighten out bad input and input loop