renamed global variables to follow conventions