main drag-drop logic complete