renamed global javascript variable to appropriate name