inner tool for stats