Add statistics api  functions