variable inconsistencies deleted

some variables were not named correctly throughout the function