Basic implementation of calc.cc