refactor driver