added stats tracking