Added 'cost' statistic to output of algorithms