fixed ambiguous var names

This function previously took no arguments.  Argumnents were
added with the intent to make the function easier to test, but
were rather carelessly chosen.