added deactivate functionality