add input simulator and moved some things around
fix huge bug in parser (oups!)