minor refactoring of methods and variable names