added support for exporting of class statistics
put statistics data into API format