function Inv: names of return values were in the wrong order