added comments to calc.c