made the interactive mode a bit less stupid
code to minimalize a formula