Added invert mode