added onChange
added Generate
Run is expanded a lot
fixed switch bug.  these are tricky.