implemented ball dragging