refactoring
added dialog-box to setup parameters before run