more refactoring for drag drop stuff