tokens and refactoring