added toggle to legend