Adding invert functionality