Prob should be ret by val, rather than ref out param.