invert working