Added function to print statistics to screen