Added command-line parameters to control the algorithm