added argument parsing