add some statistics function