added convenience method calc_stats