convert complex types