Change var x and var y to var xpixel and var ypixel