in middle to stats api