added an updating legend