minor refactoring of variables