added main with argument parsing