adjusted the computation of stateLbl