added a function to determine if we should pull a new token