refactored dragAndDrop in ch10