res to ret