implement token struct