changed y conversion to flip over x axis