Changed comparison.php to calculate total difference