refactor data driver