implement support for complex types