introduce auto legend mode