start of statistics, convert level key into class