lesson item stats code

Copying lessonitemstats code from timing code