swapped around some variable types

this is to make the functions work better in their new home.