fixes processComplexType function, adds partialObject to output