refactored variables and methods