merged group stats scripts into one