added more drag-n'-drop logic