refactoring - extracted method getTokens
test setup in package.json