use variables, style refactoring