auto drag refactoring