progress on a6.cpp and a7.cpp