add legend and key