switch global variables to underscores for readability