move driverFactory() into separate file