moved everything to assign6.cpp