refactored the driver action using an enum