change valid_token from class method to instance method