implemented statistics. proper calculation maybe not yet ok