updated calc2.cpp