Added conditional statements to enable drag & drop functionality and logic for assignment.