refactored code. added parameters in parameteFile