reduce the number of the states