implemented dragging controls