Maybe this should be changed to ret by val?