adding accessor method to token class