adds toggle directive