init statistics
fix refactor errors