added smooth dragging