added support for complex tokens