remove static modifier from Phases/ States variable so that methods using next won't affect each other.