add Complex type (with some tests)