Added setting to invert output