moved the config parser into the run.go

refactoring the code for reuse. added a comment to the test  file