starting to refactor to enable the refreshing of tokens