feat: minor refactor in tokens API method