refactoring in the Driver class