added support to change the active state