attempt to separate all the logic from the main doc and put it in an include file called compute.php