refactor drag-and-drop example