add legend and color variables