refactoring main.ml
add command-line options