adding B2.cpp and A.cpp