Updated and corrected

Uses dict instead for add_stats