This should probably be in a function in workunit.cpp (near the states[] aray) - otherwise it is likely to get out of sync if a new state is added.