debugged and tested get_stats error