(Final) stats output rough coded, debugging needed