Updated for drag and drop