MAJOR bug fix xvsy was flipped