fixed spelling error in variable name and renamed variables to use the same naming convention