recursive parsing of complex types