Made stats generation ajax