added some stats code