pre-processing of stats data