Revert "Revert "added first complete complex function, fixed issues in setResultsName""

This reverts commit 8a8002cd905c3295f9d23a4dd9dd122876f57724.