complex functions now return the result in a pointer parameter