made argument parsing clearer