Adding support to change the legend