Third function is done which is interesting statistics functions. But need more statistics for it