revised calculator.php to init $total