Added code to leave team