finished writing driver.cpp, compiled, but it segfaults instantly. need to figure that out. also need to write some test cases after that.