adding legend & legend triggers