refactor driver creation