Adding initial stat collection code