updating legends