added tooltips and a legend