renamed global variables to lowercase to avoid confusion with uppercase constants.