changed active state functionality