added functionality to activate/deactivate.