line moves in x and y directions