legend and other changes