swap meaning of x,y and dx,dy to be more intuitive