add stats outputing