Modify cross_state_value

REALLY not efficient, have to change the algorithm