cleaned up driver code