changing variable names to make the methods match
extracting the variable name
eliminating the duplicated method