updated qwarp_invert