updated argument parsing