Adding functionality for statistics.