Changed coordinates from (y,x) to (x,y)