Determining the energy order of the states