function pointer with retval and references