examples/driver.rb file refactored