legend working