Added the 'legend' functionality and an example