finished refactoring runExp.pl