modified 191A.cpp, 191B.cpp