added invert option to config and inverted y1 & y2