refactor split statistics logic