checking for token in different method