added non inverting buffer for level switching