fixed a number of small bugs, seems to run ok now
reports how it interprets the input