made munge_arguments a little more readable