State selection in main.cpp works