Added outputing statistics