code review: refactor bstat_t