adding statistics method