minor refactor, print stats