Added code to add stats.