a bit messy, but spits out some stats