started renaming function and variables to match the Google JavaScript Style Guide