Creating hierarchy with different types of states.