Modularized state funcs
Modoularized state