master: adding total and average to stdout printout