token class and factory added