finished statistics and formatting