change to getinv()