begin rewrite of infix.rb to work fully