update of state build function for semi-markov