non-working code, but close to calculate new moved x and y s (from left and from right)