Added drag and drop functionality with basic logic