Maybe this should be ret by val?