initialising dx,dy