renamed a couple functions and vars