added some stats tracking