added a new output function to ComplexFunc.java