Added the ability to define modes per state