cleanup argument handling