adding a legend