hard coded parameters replaced by jcommander parameters
code cleaned up