[med-svn] [garli] 08/10: New upstream version 2.1

Andreas Tille tille at debian.org
Tue Nov 14 09:53:48 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository garli.

commit 6dce4f77cb2735775447a9b6efe8a643bd975a7f
Author: Andreas Tille <tille at debian.org>
Date:   Tue Nov 14 10:52:18 2017 +0100

    New upstream version 2.1
---
 COPYING                                            |  622 ++
 INSTALL                                            |  156 +
 Makefile.am                                        |   19 +
 QuickStart.txt                                     |   55 +
 README.txt                                         |  156 +
 bootstrap.sh                                       |   13 +
 build_garli.sh                                     |   96 +
 config.h.in                                        |  125 +
 config/acx_mpi.m4                                  |  181 +
 config/compile                                     |  347 +
 config/config.guess                                | 1501 +++
 config/config.sub                                  | 1566 ++++
 config/depcomp                                     |  423 +
 config/install-sh                                  |  251 +
 config/libtool.m4                                  | 7831 ++++++++++++++++
 config/ltmain.sh                                   | 9636 ++++++++++++++++++++
 config/missing                                     |  336 +
 configure.ac                                       |  389 +
 debian/README.test                                 |   10 -
 debian/changelog                                   |   11 -
 debian/clean                                       |    5 -
 debian/compat                                      |    1 -
 debian/control                                     |   41 -
 debian/copyright                                   |   34 -
 debian/docs                                        |    2 -
 debian/garli-examples.examples                     |    1 -
 debian/garli.1                                     |   42 -
 debian/garli.docs                                  |    1 -
 debian/garli.examples                              |    1 -
 debian/garli.install                               |    2 -
 debian/garli.links                                 |    1 -
 debian/manpages                                    |    1 -
 debian/rules                                       |    9 -
 debian/source/format                               |    1 -
 debian/tests/control                               |    3 -
 debian/tests/run-unit-test                         |   12 -
 debian/watch                                       |    3 -
 doc/Garli0.96Manual.pdf                            |  Bin 0 -> 228229 bytes
 doc/NOTE.txt                                       |    4 +
 example/basic/EXAMPLES.txt                         |   46 +
 example/basic/LGmodel.mod                          |   92 +
 example/basic/garli.conf                           |   65 +
 example/basic/garli.conf.AA.LGmodel                |   66 +
 example/basic/garli.conf.AA.defaultSettings        |   65 +
 example/basic/garli.conf.AA.test                   |   66 +
 example/basic/garli.conf.codon.defaultSettings     |   66 +
 example/basic/garli.conf.codon.test                |   66 +
 example/basic/garli.conf.nuc.defaultSettings       |   65 +
 example/basic/garli.conf.nuc.test                  |   65 +
 example/basic/rana.nex                             |   76 +
 example/basic/rana.phy                             |   65 +
 example/basic/ranaconstraint.format1               |    2 +
 example/basic/ranaconstraint.format2               |    2 +
 example/basic/ranastart.nexus.tre                  |   75 +
 example/basic/ranastart.oldformat.tre              |    1 +
 example/basic/zakonEtAl2006.11tax.nex              |   25 +
 example/partition/EXAMPLES.txt                     |   18 +
 .../3diffModels.byCodonPos.best.all.tre            |   45 +
 .../3diffModels.byCodonPos.best.tre                |   20 +
 .../3diffModels.byCodonPos.log00.log               | 3980 ++++++++
 .../3diffModels.byCodonPos.screen.log              | 1450 +++
 .../exampleRuns/3parts.diffModelTypes/garli.conf   |   83 +
 .../3parts.diffModelTypes/zakonEtAl2006.11tax.nex  |   32 +
 .../GTRG.byCodonPos.best.all.tre                   |   45 +
 .../3parts.sameModelType/GTRG.byCodonPos.best.tre  |   20 +
 .../3parts.sameModelType/GTRG.byCodonPos.log00.log | 3980 ++++++++
 .../GTRG.byCodonPos.screen.log                     | 1376 +++
 .../exampleRuns/3parts.sameModelType/garli.conf    |   67 +
 .../3parts.sameModelType/zakonEtAl2006.11tax.nex   |   32 +
 .../exampleRuns/dna+Mkv/dnaPlusGapCoding.nex       | 2873 ++++++
 example/partition/exampleRuns/dna+Mkv/garli.conf   |   75 +
 .../exampleRuns/dna+Mkv/mixedDnaMkv.best.all.tre   |   79 +
 .../exampleRuns/dna+Mkv/mixedDnaMkv.best.tre       |   73 +
 .../exampleRuns/dna+Mkv/mixedDnaMkv.log00.log      | 3292 +++++++
 .../exampleRuns/dna+Mkv/mixedDnaMkv.screen.log     |  780 ++
 example/partition/exampleRuns/mkv/Lewis2001.nex    |  239 +
 example/partition/exampleRuns/mkv/garli.conf       |   67 +
 example/partition/exampleRuns/mkv/mkv.best.all.tre |   40 +
 example/partition/exampleRuns/mkv/mkv.best.tre     |   36 +
 example/partition/exampleRuns/mkv/mkv.log00.log    | 8940 ++++++++++++++++++
 example/partition/exampleRuns/mkv/mkv.screen.log   | 1651 ++++
 .../partitionedDna+Mkv/dnaPlusGapCoding.nex        | 2882 ++++++
 .../exampleRuns/partitionedDna+Mkv/garli.conf      |   91 +
 .../partitionedDna+Mkv/mixedDnaMkv.best.all.tre    |   79 +
 .../partitionedDna+Mkv/mixedDnaMkv.best.tre        |   73 +
 .../partitionedDna+Mkv/mixedDnaMkv.log00.log       | 3292 +++++++
 .../partitionedDna+Mkv/mixedDnaMkv.screen.log      |  205 +
 .../templateConfigs/garli.3diffModels.bigData.conf |   83 +
 .../garli.3diffModels.smallData.conf               |   83 +
 .../templateConfigs/garli.mixedDnaMkv.conf         |   75 +
 example/partition/templateConfigs/garli.mkv.conf   |   67 +
 .../garli.oneModelType.bigData.conf                |   67 +
 .../garli.oneModelType.smallData.conf              |   67 +
 project/standardGarliVC/BOINCGarli.sln             |   91 +
 project/standardGarliVC/BOINCGarli.vcproj          | 1027 +++
 project/standardGarliVC/standardGarli.sln          |   39 +
 project/standardGarliVC/standardGarli.vcproj       |  651 ++
 src/Makefile.am                                    |   70 +
 src/Makefile.ser                                   |  118 +
 src/adaptation.cpp                                 |  520 ++
 src/adaptation.h                                   |  133 +
 src/bipartition.cpp                                |  377 +
 src/bipartition.h                                  |  680 ++
 src/clamanager.h                                   |  381 +
 src/condlike.cpp                                   |  154 +
 src/condlike.h                                     |  122 +
 src/configoptions.cpp                              |  789 ++
 src/configoptions.h                                |  241 +
 src/configreader.cpp                               |  640 ++
 src/configreader.h                                 |   87 +
 src/datamatr.cpp                                   | 1946 ++++
 src/datamatr.h                                     |  517 ++
 src/defs.h                                         |  161 +
 src/errorexception.h                               |  125 +
 src/funcs.cpp                                      | 1038 +++
 src/funcs.h                                        |  224 +
 src/garli.br                                       |   87 +
 src/garlimain.cpp                                  |  904 ++
 src/garlireader.cpp                                | 1435 +++
 src/garlireader.h                                  |  236 +
 src/individual.cpp                                 | 1054 +++
 src/individual.h                                   |  173 +
 src/linalg.cpp                                     | 1363 +++
 src/linalg.h                                       |   22 +
 src/memchk.h                                       |  325 +
 src/model.cpp                                      | 4966 ++++++++++
 src/model.h                                        | 2199 +++++
 src/mpifuncs.cpp                                   | 1290 +++
 src/mpifuncs.h                                     |   82 +
 src/mpitrick.cpp                                   |  287 +
 src/optimization.cpp                               | 3718 ++++++++
 src/optimizationinfo.h                             |   88 +
 src/outputman.h                                    |  343 +
 src/population.cpp                                 | 7970 ++++++++++++++++
 src/population.h                                   |  590 ++
 src/reconnode.h                                    |  544 ++
 src/rng.cpp                                        |  659 ++
 src/rng.h                                          |  127 +
 src/sequencedata.cpp                               | 1579 ++++
 src/sequencedata.h                                 |  959 ++
 src/set.cpp                                        |   90 +
 src/set.h                                          |  145 +
 src/stopwatch.h                                    |   93 +
 src/threaddcls.h                                   |   43 +
 src/threadfunc.cpp                                 |  499 +
 src/translatetable.cpp                             |   89 +
 src/translatetable.h                               |   58 +
 src/tree.cpp                                       | 8597 +++++++++++++++++
 src/tree.h                                         |  843 ++
 src/treenode.cpp                                   |  890 ++
 src/treenode.h                                     |  153 +
 src/utility.h                                      |  323 +
 tests/Makefile.am                                  |    3 +
 tests/check/a.G3.conf                              |   68 +
 tests/check/a.G4.conf                              |   67 +
 tests/check/a.conf                                 |   66 +
 tests/check/c.M3x2.conf                            |   67 +
 tests/check/c.conf                                 |   68 +
 tests/check/g.dnaBnoZ.conf                         |   76 +
 tests/check/g.dnaMix.conf                          |   76 +
 tests/check/n.G3.conf                              |   66 +
 tests/check/n.G4.conf                              |   66 +
 tests/check/n.conf                                 |   66 +
 tests/check/n.const.conf                           |   66 +
 tests/check/p.3diff.conf                           |   83 +
 tests/check/p.mk.ssr.conf                          |   68 +
 tests/check/p.mkO.ssr.conf                         |   68 +
 tests/check/p.mkv.ssr.conf                         |   68 +
 tests/check/p.mkvO.ssr.conf                        |   68 +
 tests/const/n.neg.const.conf                       |   64 +
 tests/const/n.negBack.const.conf                   |   64 +
 tests/const/n.pos.const.conf                       |   65 +
 tests/const/n.posBack.const.conf                   |   65 +
 tests/data/L.start                                 |   44 +
 tests/data/L2001.30x52.nex                         |  240 +
 tests/data/a.G3.start                              |   22 +
 tests/data/a.G4.start                              |   22 +
 tests/data/a.start                                 |   17 +
 tests/data/c.M3x2.start                            |   21 +
 tests/data/c.start                                 |   21 +
 tests/data/dnaGap.8x1K.nex                         | 1055 +++
 tests/data/expected.scr                            |   19 +
 tests/data/moore.matK90-120.nex                    |   94 +
 tests/data/moore.start                             |  122 +
 tests/data/n.G4.start                              |   25 +
 tests/data/n.G5.start                              |   25 +
 tests/data/n.start                                 |    6 +
 tests/data/p.3diff.start                           |   33 +
 tests/data/z.11x2178.AA.nex                        |   59 +
 tests/data/z.11x2178.nex                           |   25 +
 tests/data/z.11x2178.wtset.nex                     |   41 +
 tests/data/z.11x30.AA.fas                          |   22 +
 tests/data/z.11x30.phy                             |   12 +
 tests/data/z.11x30.stop.nex                        |   19 +
 tests/data/z.11x30.wackyNames.nex                  |   19 +
 tests/data/z.byPos.11x2178.nex                     |   36 +
 tests/data/z.neg.const.tre                         |    1 +
 tests/data/z.negBack.const.tre                     |    1 +
 tests/data/z.pos.const.tre                         |    1 +
 tests/data/z.posBack.const.tre                     |    1 +
 tests/internal/a.G3.conf                           |   65 +
 tests/internal/a.G4.conf                           |   65 +
 tests/internal/a.conf                              |   65 +
 tests/internal/c.M3x2.conf                         |   67 +
 tests/internal/c.conf                              |   65 +
 tests/internal/n.G3.conf                           |   65 +
 tests/internal/n.G4.conf                           |   64 +
 tests/internal/n.conf                              |   65 +
 tests/internal/p.3diff.conf                        |   82 +
 tests/internal/p.mk.conf                           |   68 +
 tests/internal/p.mk.ssr.conf                       |   68 +
 tests/internal/p.mkO.conf                          |   68 +
 tests/internal/p.mkO.ssr.conf                      |   68 +
 tests/internal/p.mkv.conf                          |   68 +
 tests/internal/p.mkv.ssr.conf                      |   68 +
 tests/internal/p.mkvO.conf                         |   67 +
 tests/internal/p.mkvO.ssr.conf                     |   68 +
 tests/output/a.G3.conf                             |   67 +
 tests/output/a.G4.conf                             |   67 +
 tests/output/a.conf                                |   67 +
 tests/output/c.M3x2.conf                           |   67 +
 tests/output/c.conf                                |   67 +
 tests/output/n.G3.conf                             |   66 +
 tests/output/n.G4.conf                             |   66 +
 tests/output/n.conf                                |   66 +
 tests/output/n.wackyNames.conf                     |   66 +
 tests/output/p.3diff.conf                          |   86 +
 tests/output/p.mkvO.ssr.conf                       |   69 +
 tests/restart/a.G3.conf                            |   68 +
 tests/restart/a.G4.conf                            |   67 +
 tests/restart/a.conf                               |   67 +
 tests/restart/c.M3x2.conf                          |   68 +
 tests/restart/c.conf                               |   68 +
 tests/restart/g.dnaBnoZ.conf                       |   76 +
 tests/restart/g.dnaMix.conf                        |   76 +
 tests/restart/n.G3.conf                            |   66 +
 tests/restart/n.G4.conf                            |   66 +
 tests/restart/n.conf                               |   66 +
 tests/restart/n.const.conf                         |   66 +
 tests/restart/p.3diff.conf                         |   84 +
 tests/restart/p.mk.ssr.conf                        |   68 +
 tests/restart/p.mkO.ssr.conf                       |   68 +
 tests/restart/p.mkv.ssr.conf                       |   68 +
 tests/restart/p.mkvO.ssr.conf                      |   68 +
 tests/runtests.sh                                  |  237 +
 tests/scoring/a.G3.conf                            |   69 +
 tests/scoring/a.G4.conf                            |   67 +
 tests/scoring/a.conf                               |   67 +
 tests/scoring/c.M3x2.conf                          |   68 +
 tests/scoring/c.conf                               |   68 +
 tests/scoring/g.dnaBnoZ.conf                       |   76 +
 tests/scoring/g.dnaMix.conf                        |   76 +
 tests/scoring/n.G4.conf                            |   66 +
 tests/scoring/n.G5.conf                            |   66 +
 tests/scoring/n.conf                               |   66 +
 tests/scoring/p.3diff.conf                         |   83 +
 tests/scoring/p.mk.conf                            |   68 +
 tests/scoring/p.mk.ssr.conf                        |   68 +
 tests/scoring/p.mkO.conf                           |   68 +
 tests/scoring/p.mkO.ssr.conf                       |   68 +
 tests/scoring/p.mkv.conf                           |   68 +
 tests/scoring/p.mkv.ssr.conf                       |   68 +
 tests/scoring/p.mkvO.conf                          |   68 +
 tests/scoring/p.mkvO.ssr.conf                      |   68 +
 tests/scoring/runScoring.sh                        |   32 +
 265 files changed, 121892 insertions(+), 181 deletions(-)

diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..e963df8
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,622 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..6d93320
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,156 @@
+GARLI COMPILATION/INSTALLATION INSTRUCTIONS:
+
+NOTE: For Windows and Mac OS X machines you should not need to 
+compile the program manually, and it is recommended that you 
+download one of the pre-compiled binaries.
+
+(If after reviewing this document you still have unsolved compilation
+problems, please email garli.support at gmail.com)
+------
+
+EXTRA EASY COMPILATION INSTRUCTIONS (USE OF THIS IS RECOMMENDED!):
+If this is a version with the NCL source code bundled (there
+will be an ncl-2.1.xx.tar.gz file in the same directory as this
+file), then you should be able to very easily do a default
+compilation and static linking to NCL by typing this in the
+same directory as this file:
+
+./build_garli.sh
+
+This will do all of the necessary building of the NCL library, 
+and you should eventually end up with a working Garli-#.#
+executable in the bin directory within the current directory.
+You are done.  See the QuickStart.txt file, manual or support
+website for details on running the program.
+
+->If you are doing an MPI build, use the Advanced instructions
+below.
+
+->If you have a newer version of NCL that you want to use, just
+put the ncl-xxxx.tar.gz archive within this directory and the
+build_garli script will find and use it.
+
+->If you want to check out the newest version of NCL (which could
+have bug fixes) from Sourceforge and build GARLI with it, do this:
+
+./build_garli.sh --ncl-svn
+
+->If you know what you are doing and want to use a different compiler
+(such as the intel icc compiler) instead of gcc you can invoke the 
+build_garli.sh script like this:
+
+env CC=icc CXX=icpc ./build_garli.sh
+
+->If you want to pass other arguments to GARLI's configure script, 
+(you have no particular reason to do so) list them at the end, e.g.
+
+./build_garli.sh [--ncl-svn] --enable-asserts
+
+------
+MANUAL/ADVANCED COMPILATION INSTRUCTIONS:
+(use this if the above simplified build script does work for you
+or doesn't meet your needs)
+
+####BUILDING NCL####
+To make and install GARLI, you first need to have a compiled
+copy of the Nexus Class Library version 2.1 by Paul Lewis and Mark Holder.
+
+The newest version of NCL 2.1 is available here:
+http://github.com/mtholder/ncl
+and can be checked out via anonymous svn or git:
+svn co https://github.com/mtholder/ncl
+or
+git clone https://github.com/mtholder/ncl
+
+Use of the trunk github version of NCL is recommended, but a slightly older
+version is also available here:
+http://sourceforge.net/projects/ncl/files/NCL/
+
+VERY IMPORTANT:
+-NCL version 2.1 or better is required to compile GARLI.
+-You MUST run NCL's configure script with NCL_CONST_FUNCS defined.  
+See below for how to do this
+------
+
+You can choose to compile GARLI with the NCL library either statically
+or dynamically linked in.  Note that whether GARLI will link 
+it statically or dynamically depends on how NCL itself is 
+configured when it is built.
+
+TWO OPTIONS:
+-To STATICALLY link:
+Do this if you are compiling GARLI for your own use but are not a system
+administrator, or if want the GARLI executable to run on another machine 
+of the same type.  It will not require the NCL library to remain on the 
+system after compilation of GARLI.  
+Configure and build NCL like this (the shared NCL library will not
+be made):
+(from the NCL source root directory)
+env CPPFLAGS=-DNCL_CONST_FUNCS ./configure --prefix=<install directory> --disable-shared
+make
+make install
+
+-To DYNAMICALLY link:
+You only really want to do this if you are an admin on the machine
+and are going to install NCL globally (e.g. in /usr/local/),
+or if you want to install it elsewhere and are the only one that will 
+be using it on that machine.  In those cases, configure and build as 
+shown below (you can omit the prefix if you want to
+just install globally into the normal location at /usr/local/):
+(from the NCL source root directory)
+env CPPFLAGS=-DNCL_CONST_FUNCS ./configure --prefix=<install directory>
+make
+make install
+
+####BUILDING GARLI####
+Now that NCL is built, it is time to configure and build GARLI . 
+You will call GARLI's configure script as follows: 
+(if you installed NCL globally at /usr/local, you can leave off the --with-ncl= argument):
+(from GARLI's source root directory)
+./configure --prefix=<install directory> --with-ncl=<ncl install directory>
+make
+make install
+
+To run the program once you've compiled the executable, you'll need to use
+a configuration file.  Sample files and test datasets are provided in the 
+example directory.
+------
+
+Other configuration notes:
+To use a compiler different from the default (for example the Intel icc
+compiler), call configure like this:
+
+env CC=icc CXX=icpc ./configure ... etc
+
+You can similarly pass extra CXXFLAGS or LDFLAGS:
+
+env CXXFLAGS=<your flags> LDFLAGS=<your flags> ./configure ... etc
+------
+
+Making an OS X Universal binary (this may not work with newer versions of OS X):
+To do this you first need to build the NCL static library with multiple architectures.
+Configure NCL like this (all on one line):
+
+env CXXFLAGS="-arch ppc -arch i386 -DNCL_CONST_FUNCS" LDFLAGS="-arch ppc -arch i386" \
+	./configure --prefix=<install directory> --disable-dependency-tracking --disable-shared
+
+Then configure GARLI like this (all on one line):
+
+env CXXFLAGS="-arch ppc -arch i386" LDFLAGS="-arch ppc -arch i386" \
+	./configure --prefix=<install directory> --disable-dependency-tracking \
+	--with-ncl=<ncl install directory>
+---
+
+Other options that can be passed to configure:
+--enable-openmp
+(build the multithreaded openMP version - available with the proprietary Intel compiler,
+(CC=icc and CXX=icpc), or newer versions of gcc
+
+--enable-mpi
+(build the MPI run distributing version.  It should automatically determine
+the correct MPI compiler script name (e.g. mpiCC) but if the underlying compiler
+is not gcc (try "mpiCC --version" to check) you should also set CC and CXX to the
+corresponding compiler type (e.g., CC=icc and CXX=icpc) to get the right compilation flags) 
+
+--help
+(list other options of the configure script)
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..03b2542
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,19 @@
+ACLOCAL_AMFLAGS = -I config/m4
+
+EXTRA_DIST = \
+	build_garli.sh \
+	README.txt \
+	QuickStart.txt \
+	example \
+	project/standardGarliVC \
+	doc \
+	tests\
+	ncl-2.1.19.tar.gz
+
+SUBDIRS = src tests
+
+dist-hook:
+	find "$(distdir)/doc" -depth -name .svn -and -type d -and -exec rm -rf {} \; 
+	find "$(distdir)/project" -depth -name .svn -and -type d -and -exec rm -rf {} \; 
+	find "$(distdir)/example" -depth -name .svn -and -type d -and -exec rm -rf {} \; 
+	find "$(distdir)/tests" -depth -name .svn -and -type d -and -exec rm -rf {} \; 
diff --git a/QuickStart.txt b/QuickStart.txt
new file mode 100644
index 0000000..1c9bbfd
--- /dev/null
+++ b/QuickStart.txt
@@ -0,0 +1,55 @@
+
+A very short guide to using non-graphical versions of GARLI:
+
+1. Move or copy the GARLI executable (in the bin directory
+ for precompiled versions) into the same directory as a
+ GARLI configuration file named garli.conf and a dataset to 
+ be analyzed (in Nexus, Pylip or Fasta format).
+
+2. Edit the garli.conf file in a text editor and enter the
+ name of the dataset to be analyzed on the datafname line.
+ The other lines in the configuration file can be ignored 
+ for now.
+
+3. On Windows you can then double-click the executable.  On
+ other OS's you will need to start the program from the command
+ line.  In a terminal window, get to the directory with the
+ files in it.  Start the program with 
+ ./GarliXXX
+ where the XXX will depend on the exact version of the program.
+
+4. Look through the output files that have been created.  They
+ contain a variety of information about the search itself as well
+ as the details of the inferred tree and model of substition.
+
+To try it out on the included sample dataset, just copy the 
+program and execute it from the example/basic/ directory,
+without needing any other setup. This reads the garli.conf 
+file in that directory, which is set up to analyze the 
+included 64 taxon rana.nex dataset (this should take between
+10 and 30 minutes, depending on the speed of your computer).
+
+You can also find sample configuration files that you can alter
+for your data in the example/basic directory.
+
+Configuration of partitioned models is necessarily more complex,
+but examples and template configuration files appear in the
+example/partition directory.  See the support wiki listed below
+for lots more information.
+
+You can specify configuration files to use that are not named
+garli.conf by passing them on the command line:
+./GarliXXX myconfigurationfilename
+
+To avoid having to copy the executable into each run directory
+you can either put it somewhere in your path (OS X or linux),
+make a shortcut in the directory (Windows) or make a symbolic
+to the executable in the directory (OS X or linux)
+
+For further details, see the GARLI Manual or visit the Garli
+Wiki support webpage: http://www.nescent.org/wg/garli
+
+Have fun, and let me know of any questions, problems or feedback:
+Derrick Zwickl
+garli.support at gmail.com
+
diff --git a/README.txt b/README.txt
new file mode 100644
index 0000000..ec7379b
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,156 @@
+// GARLI Version 2.1 (September 2014)
+// Copyright 2005-2014 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Please let me know of any problems, concerns or feedback (garli.support at gmail.com)
+
+GARLI version 2.1 is a minor update to version 2.0.
+Versions >= 2.0 include models for nucleotides, amino acids,
+odons, and morphology-like characters, any of which can be 
+mixed together and applied to different subsets of data.
+
+Version 2.X should replace earlier versions, and should be backwards compatible with all 
+configuration files and datasets that were used with the previous versions.
+
+->See the support website (http://www.nescent.org/wg/garli) for detailed information on
+using the program.  For very basic usage see QuickStart.txt.
+
+->Example datasets and template configuration files files can be found in the example folder
+
+->For compilation help see the INSTALL file.  Versions >= 2.0 comes with an extremely easy build
+script, build_garli.sh, which should make compalation trivial on linux or OS X machines.
+
+***New in version 2.1***
+1. MUCH faster parsing of very long alignments.  e.g., alignments millions of nucleotides in 
+   length should be read thousands of times faster.
+2. Lower memory usage with very large alignments.
+3. Added ignorestopcodons entry to ignore stops rather than error out.
+4. Better translation to amino acid characters in codon-aminoacid models. Codons containing ambiguity 
+   are no longer discarded if all resolutions of the ambiguity translate to the same amino acid.
+5. Ability to read and use NEXUS wtsets to specify character counts.
+6. Many changes in BOINC mode.
+7. Fixes to minor/rare bugs.
+
+***New in version 2.0***
+
+1. Ability to use partitioned models, giving the ability to divide up data and apply independent
+   models to each.   See this page for details on partitioned usage 
+   http://www.nescent.org/wg/garli/Using_partitioned_models
+2. Ability to use the Mk/Mkv "morphology" models of Lewis, 2001.  This can be applied to discrete
+   data of any type with any number of states. http://www.nescent.org/wg/garli/Mkv_morphology_model
+3. Significant improvement in parameter optimization
+4. MANY minor improvements and new features.  See the website.
+
+***New in version 1.0***
+
+1. Ability to write sitewise log-likelihood values for all model types, in a format identical to 
+   PAUP*.  This can be read directly into a program like CONSEL to perform statistical comparisons 
+   of topologies such as the SH or AU tests. (outputsitelikelihoods = 1)
+2. Ability to collapse zero length branches at the end of any search, creating polytomies. This is
+   now turned on by default. This setting can affect bootstrap values, since zero-length branches in
+   a sense don't exist and probably shouldn't contribute to branch support values. It also tends to
+   make trees inferred from multiple searches more similar, since trees that only differ in arbitrary
+   resolutions of zero length branches are not truly different.  (collapsebranches = 1)
+3. Ability to infer full reversible amino acid rate matrices while doing a normal searching,
+   adding 189 free parameters.  This is probably not something of general utility unless you have
+   a very large dataset. (datatype = aminoacid or codon-aminoacid, ratematrix = estimate) 
+4. Ability to use user-specified amino acid rate matrices. This allows the use of any existing
+   amino acid matrix, regardless of whether GARLI implements them internally.  Amino acid matrices 
+   estimated by GARLI can also have their parameter values fixed for use in other analyses. Note 
+   however that GARLI's matrix input format differs from other programs. (ratematrix = fixed, 
+   provide matrix in a Nexus GARLI block in the datafile or in a starting conditions file.  See the
+   file "examples/LGmodel.mod" for an example.)
+5. Ability to infer internal state probabilities (ancestral states) for amino acid and codon models,
+   in addition to the previously implemented nucleotide models. (inferinternalstateprobs = 1)
+6. Substantial speed improvements for large constrained searches, especially backbone constraints
+7. MPI parallel runs can now be checkpointed, allowing entire sets of runs to be restarted.  Be sure
+   to read the wiki page detailing the MPI version (http://www.nescent.org/wg/garli/MPI_version)
+   to understand in what cases you might want to use this version.
+8. More rigorous error checking of input trees, constraints and parameter values. 
+9. Significant improvements to the precision of parameter optimization.  GARLI now puts 
+   significant effort into returning the very most optimal parameter values at the end of a search.
+   These should be as accurate as values returned by other programs such as PAUP* or PAML.  
+   Previously the estimated parameter values were nearly optimal, but sometimes not quite there.
+10. A "verification mode", which checks that a given configuration file and datafile are valid
+    for use with GARLI, without starting an actual analysis.  This can be useful, for example, in
+    verifying that all configuration and input is proper while on your local machine before sending
+    the input files to a computer cluster.  The output will also tell you how much memory GARLI
+    will be need to be allocated for the run, which might require adjustment of the 
+    "availablememory" setting in the configuration file (start GARLI with "-V").
+11. Much easier procedure for compiling of GARLI source code.
+12. Fixes to numerous rare bugs in version 0.96
+
+***New in version 0.96***
+
+1.Rigorous reading of Nexus datasets using Paul Lewis and Mark Holder's Nexus
+ Class Library (NCL).
+2.Ability to read Nexus starting trees using NCL.
+3.Ability to perform inference under amino acid and codon-based models
+ of sequence evolution (datatype = aminoacid, datatype = codon).
+4.Ability to specify multiple search replicates in a single config file (searchreps = #).
+5.Ability to specify outgroups for orientation of inferred trees (outgroup = # # #).
+6.Ability to use backbone as well as normal topological constraints.
+7.Ability to create fast likelihood stepwise addition starting trees
+ (streefname = stepwise).
+8.MPI version that spreads a specified number of serial runs across processors using
+ a single config file, writing output to different output files (for example, to do
+ 25 bootstrap replicates simultaneously on each of 8 processors).
+9.Ability to perform nucleotide inference using any sub-model of the General
+ Time-Reversible model (GTR), in addition to all of the common "named" models (K2P, HKY, etc).
+10.Speed increases for non-parametric bootstrapping
+
+Condensed summary of new model settings (for more detailed descriptions and 
+for unchanged settings see the manual or support webpage):
+datatype = {nucleotide, aminoacid, codon, codon-aminoacid} - These set the type of model
+ to be used.  Note that aminoacid and codon models are MUCH slower than nucleotide models.
+-"aminoacid" is for datasets consisting of the 20 aminoacid single letter codes. 
+-"codon" is for dna data (aligned in frame!) to be analyzed using a 60-62 state model
+ that incorporates both the nucleotide substitution process and information on the
+ genetic code.  This involves the estimation of at least one dN/dS ratio
+ (aka nonsynonymous/synonymous rate ratio, or omega or w).  This is essentially
+ the Goldman-Yang 1994 model and other related models.
+-"codon-aminoacid" is for aligned dna sequences that are translated to aminoacids
+ and analyzed under an aminoacid model
+
+The different datatypes have different allowable model settings, listed here.
+For nucleotide data:
+ratematrix = {6rate, 2rate, 1rate, fixed, (a b c d e f) }
+statefrequencies = {estimate, empirical, equal, fixed}
+ratehetmodel = {none, gamma, gammafixed}
+numratecategories = {#} (not including invariant site class, must be 1 for ratehetmodel = none)
+invariantsites = {estimate, none}
+
+For aminoacid or codon-aminoacid data:
+ratematrix = {poisson, dayhoff, jones, wag, mtmam, mtrev}
+statefequencies = {equal, dayhoff, jones, wag, mtmam, mtrev, empirical, estimate}
+ratehetmodel = {none, gamma, gammafixed}
+numratecategories = {#} (not including invariant site class, must be 1 for ratehetmodel = none)
+invariantsites = {estimate, none, fixed}
+
+For codon data:
+ratematrix = {6rate, 2rate, 1rate, fixed, (a b c d e f) }
+ (this is the nucleotide substitution process assumed by the codon model)
+statefrequencies = {empirical, equal, F1x4, F3x4} (F1x4 and F3x4 are PAML's
+ terminology, and calculate the codon frequencies as the product of the total
+ nucleotide frequencies or the nucleotide frequencies at each codon position, respectively)
+ratehetmodel = {none, nonsynonymous} {nonsynonymous estimates multiple dN/dS categories
+ at the proportion of sites belonging to each.  This is the M3 model of PAML)
+numratecategories = {#} (the number of dN/dS categories)
+invariantsites = {none} (not allowed in codon model)
+
+For codon or codon-aminoacid:
+Geneticcode = {standard, vertmito, invertmito}
+
diff --git a/bootstrap.sh b/bootstrap.sh
new file mode 100755
index 0000000..4c08203
--- /dev/null
+++ b/bootstrap.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+# This script should be run  whenever the inputs to autoconf/automake change 
+#	(namely the configure.ac file or the m4 macros in config/m4)
+# It appears that the autogenerated Makefiles enough contain dependency 
+#		information to know that it needs to run automake and config.status
+#		whenever an Makefile.am changes.
+
+set -x
+aclocal -I config || exit
+autoheader || exit
+automake --add-missing || exit
+autoconf
+
diff --git a/build_garli.sh b/build_garli.sh
new file mode 100755
index 0000000..77fe508
--- /dev/null
+++ b/build_garli.sh
@@ -0,0 +1,96 @@
+#!/bin/sh
+
+
+if [ $# -gt 0 ]
+then
+        if [ "$1" = "--ncl-svn" -o "$1" = "--ncl-sourceforge" ]
+        #if [ "$1" = "--ncl-svn" ]
+        then
+            if [ -d ncl-svn ]
+            then
+                echo "***NCL LIBRARY SOURCE FROM SUBVERSION ALREADY EXISTS***"
+                echo "***CURRENT COPY WILL BE USED AS-IS.  UPDATE IT MANUALLY OR***"
+                echo "***DELETE THE ncl-svn DIRECTORY TO GET THE LATEST NCL SOURCE***"
+            else
+                echo "***CHECKING OUT NCL LIBRARY SOURCE VIA SUBVERSION***"
+                if [ "$1" = "--ncl-svn" ];then
+                    svn co https://github.com/mtholder/ncl/trunk ncl-svn || exit
+                else
+                    svn co http://svn.code.sf.net/p/ncl/code/branches/v2.1 ncl-svn || exit
+                fi
+            fi
+            shift # this shifts the first cmd line argument out so that the rest can be passed to GARLI configure
+            nclv="ncl-svn"
+            cd ${nclv} || exit
+            sh bootstrap.sh || exit
+            cd ..
+        elif [ "$1" = "-h" ] || [ "$1" = "--help" ]
+        then
+                echo "Usage ./$0 [--svn-ncl] [-h] [arguments to GALRI configure script]"
+                echo "     --ncl-svn            Check out current NCL v2.1 source from github repo via anonymous svn, build NCL, then GARLI"
+                echo "                              (prefer over ncl-sourceforge)"
+                echo "     --ncl-sourceforge    Check out current NCL v2.1 source from sourceforge repo via anonymous svn,"
+                echo "                              build NCL, then GARLI"
+                echo "     --ncl-dist           Automatically build NCL from a ncl-2.1.xx.tar.gz distribution"
+                echo "                              in this directory, then build GARLI (default)"
+                echo "  -h --help               Output this help and exit"
+                echo "  [other args]            Other arguments are passed to GARLI's configure invocation"
+                echo
+                exit
+        fi
+fi
+
+#if NCL wasn't checked out above
+if [ -z "${nclv}" ]
+then
+	if [ "$1" = "--ncl-dist" ]
+	then
+		shift # this shifts the first cmd line argument out so that the rest can be passed to GARLI configure
+	fi
+	echo "***BUILDING NCL LIBRARY FROM SOURCE DISTRIBUTION***"
+	nl=`ls -l ncl*.gz | wc -l`
+	if [ $nl -eq 0 ]
+	then
+		echo "ERROR: No ncl-2.1.xx.tar.gz distributions found."
+		echo "  Provide one or try \"$0 --ncl-svn\" to checkout NCL via subversion and automatically build NCL and GARLI."
+		exit
+	elif [ ! $nl -eq 1 ]
+	then
+		echo "You have more than one NCL version..."
+        	nclv=`ls ncl*.gz | tail -n1 | sed 's/.tar.gz//'`
+        	echo "Using most recent:  $nclv"
+	else
+        	nclv=`ls ncl*.gz | sed 's/.tar.gz//'`
+	fi
+	if [ ! -d ${nclv} ]
+	then
+       		tar xfvz ${nclv}.tar.gz || exit
+	fi
+fi
+
+cd ${nclv} || exit
+
+echo "CONFIGURING NCL ..."
+env CXXFLAGS=-DNCL_CONST_FUNCS ./configure --prefix=`pwd`/installed --disable-shared --enable-static || exit
+make || exit
+echo "BUILDING NCL ..."
+make install || exit
+#make installcheck || exit
+cd ..
+
+echo "CONFIGURING GARLI ..."
+if [ ! -f configure ]
+then
+	if [ -f bootstrap.sh ]
+	then
+		sh bootstrap.sh || exit
+	else
+		echo "Neither configure nor bootstrap.sh found.  This is not a complete distribution."
+	fi
+fi
+./configure $@ --prefix=`pwd` --with-ncl=`pwd`/${nclv}/installed || exit
+echo "BUILDING GARLI ..."
+make || exit
+make install || exit
+cp ${nclv}/example/gapcode/NEXUSgapcode bin/
+
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..e94d0d5
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,125 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* profiler for assessing execution times */
+#undef ENABLE_CUSTOM_PROFILER
+
+/* Define to 1 if you have the <float.h> header file. */
+#undef HAVE_FLOAT_H
+
+/* Define to 1 if you have the `floor' function. */
+#undef HAVE_FLOOR
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+   to 0 otherwise. */
+#undef HAVE_MALLOC
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define to 1 if you have the `memmove' function. */
+#undef HAVE_MEMMOVE
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `memset' function. */
+#undef HAVE_MEMSET
+
+/* Define if you have the MPI library. */
+#undef HAVE_MPI
+
+/* Define to 1 if you have the `pow' function. */
+#undef HAVE_POW
+
+/* Define to 1 if you have the `sqrt' function. */
+#undef HAVE_SQRT
+
+/* Define to 1 if stdbool.h conforms to C99. */
+#undef HAVE_STDBOOL_H
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strchr' function. */
+#undef HAVE_STRCHR
+
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strtol' function. */
+#undef HAVE_STRTOL
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if the system has the type `_Bool'. */
+#undef HAVE__BOOL
+
+/* monitors all allocation/deallocation, writes report */
+#undef MONITORING_ALLOCATION
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+#undef TM_IN_SYS_TIME
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+   calls it, or to nothing if 'inline' is not supported under any name.  */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to rpl_malloc if the replacement function should be used. */
+#undef malloc
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+#undef size_t
diff --git a/config/acx_mpi.m4 b/config/acx_mpi.m4
new file mode 100644
index 0000000..bb2cb31
--- /dev/null
+++ b/config/acx_mpi.m4
@@ -0,0 +1,181 @@
+# ===========================================================================
+#                http://autoconf-archive.cryp.to/acx_mpi.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   ACX_MPI([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
+#
+# DESCRIPTION
+#
+#   This macro tries to find out how to compile programs that use MPI
+#   (Message Passing Interface), a standard API for parallel process
+#   communication (see http://www-unix.mcs.anl.gov/mpi/)
+#
+#   On success, it sets the MPICC, MPICXX, MPIF77, or MPIFC output variable
+#   to the name of the MPI compiler, depending upon the current language.
+#   (This may just be $CC/$CXX/$F77/$FC, but is more often something like
+#   mpicc/mpiCC/mpif77/mpif90.) It also sets MPILIBS to any libraries that
+#   are needed for linking MPI (e.g. -lmpi or -lfmpi, if a special
+#   MPICC/MPICXX/MPIF77/MPIFC was not found).
+#
+#   If you want to compile everything with MPI, you should set:
+#
+#       CC="MPICC" #OR# CXX="MPICXX" #OR# F77="MPIF77" #OR# FC="MPIFC"
+#       LIBS="$MPILIBS $LIBS"
+#
+#   NOTE: The above assumes that you will use $CC (or whatever) for linking
+#   as well as for compiling. (This is the default for automake and most
+#   Makefiles.)
+#
+#   The user can force a particular library/compiler by setting the
+#   MPICC/MPICXX/MPIF77/MPIFC and/or MPILIBS environment variables.
+#
+#   ACTION-IF-FOUND is a list of shell commands to run if an MPI library is
+#   found, and ACTION-IF-NOT-FOUND is a list of commands to run if it is not
+#   found. If ACTION-IF-FOUND is not specified, the default action will
+#   define HAVE_MPI.
+#
+# LAST MODIFICATION
+#
+#   2008-04-12
+#
+# COPYLEFT
+#
+#   Copyright (c) 2008 Steven G. Johnson <stevenj at alum.mit.edu>
+#   Copyright (c) 2008 Julian C. Cummings <cummings at cacr.caltech.edu>
+#
+#   This program is free software: you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation, either version 3 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Macro Archive. When you make and
+#   distribute a modified version of the Autoconf Macro, you may extend this
+#   special exception to the GPL to apply to your modified version as well.
+
+AC_DEFUN([ACX_MPI], [
+AC_PREREQ(2.50) dnl for AC_LANG_CASE
+
+AC_LANG_CASE([C], [
+	AC_REQUIRE([AC_PROG_CC])
+	AC_ARG_VAR(MPICC,[MPI C compiler command])
+	AC_CHECK_PROGS(MPICC, mpicc hcc mpxlc_r mpxlc mpcc cmpicc, $CC)
+	acx_mpi_save_CC="$CC"
+	CC="$MPICC"
+	AC_SUBST(MPICC)
+],
+[C++], [
+	AC_REQUIRE([AC_PROG_CXX])
+	AC_ARG_VAR(MPICXX,[MPI C++ compiler command])
+	AC_CHECK_PROGS(MPICXX, mpic++ mpicxx mpiCC hcp mpxlC_r mpxlC mpCC cmpic++, $CXX)
+	acx_mpi_save_CXX="$CXX"
+	CXX="$MPICXX"
+	AC_SUBST(MPICXX)
+],
+[Fortran 77], [
+	AC_REQUIRE([AC_PROG_F77])
+	AC_ARG_VAR(MPIF77,[MPI Fortran 77 compiler command])
+	AC_CHECK_PROGS(MPIF77, mpif77 hf77 mpxlf_r mpxlf mpf77 cmpifc, $F77)
+	acx_mpi_save_F77="$F77"
+	F77="$MPIF77"
+	AC_SUBST(MPIF77)
+],
+[Fortran], [
+	AC_REQUIRE([AC_PROG_FC])
+	AC_ARG_VAR(MPIFC,[MPI Fortran compiler command])
+	AC_CHECK_PROGS(MPIFC, mpif90 mpxlf95_r mpxlf90_r mpxlf95 mpxlf90 mpf90 cmpif90c, $FC)
+	acx_mpi_save_FC="$FC"
+	FC="$MPIFC"
+	AC_SUBST(MPIFC)
+])
+
+if test x = x"$MPILIBS"; then
+	AC_LANG_CASE([C], [AC_CHECK_FUNC(MPI_Init, [MPILIBS=" "])],
+		[C++], [AC_CHECK_FUNC(MPI_Init, [MPILIBS=" "])],
+		[Fortran 77], [AC_MSG_CHECKING([for MPI_Init])
+			AC_LINK_IFELSE([AC_LANG_PROGRAM([],[      call MPI_Init])],[MPILIBS=" "
+				AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])],
+		[Fortran], [AC_MSG_CHECKING([for MPI_Init])
+			AC_LINK_IFELSE([AC_LANG_PROGRAM([],[      call MPI_Init])],[MPILIBS=" "
+				AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)])])
+fi
+AC_LANG_CASE([Fortran 77], [
+	if test x = x"$MPILIBS"; then
+		AC_CHECK_LIB(fmpi, MPI_Init, [MPILIBS="-lfmpi"])
+	fi
+	if test x = x"$MPILIBS"; then
+		AC_CHECK_LIB(fmpich, MPI_Init, [MPILIBS="-lfmpich"])
+	fi
+],
+[Fortran], [
+	if test x = x"$MPILIBS"; then
+		AC_CHECK_LIB(fmpi, MPI_Init, [MPILIBS="-lfmpi"])
+	fi
+	if test x = x"$MPILIBS"; then
+		AC_CHECK_LIB(mpichf90, MPI_Init, [MPILIBS="-lmpichf90"])
+	fi
+])
+if test x = x"$MPILIBS"; then
+	AC_CHECK_LIB(mpi, MPI_Init, [MPILIBS="-lmpi"])
+fi
+if test x = x"$MPILIBS"; then
+	AC_CHECK_LIB(mpich, MPI_Init, [MPILIBS="-lmpich"])
+fi
+
+dnl We have to use AC_TRY_COMPILE and not AC_CHECK_HEADER because the
+dnl latter uses $CPP, not $CC (which may be mpicc).
+AC_LANG_CASE([C], [if test x != x"$MPILIBS"; then
+	AC_MSG_CHECKING([for mpi.h])
+	AC_TRY_COMPILE([#include <mpi.h>],[],[AC_MSG_RESULT(yes)], [MPILIBS=""
+		AC_MSG_RESULT(no)])
+fi],
+[C++], [if test x != x"$MPILIBS"; then
+	AC_MSG_CHECKING([for mpi.h])
+	AC_TRY_COMPILE([#include <mpi.h>],[],[AC_MSG_RESULT(yes)], [MPILIBS=""
+		AC_MSG_RESULT(no)])
+fi],
+[Fortran 77], [if test x != x"$MPILIBS"; then
+	AC_MSG_CHECKING([for mpif.h])
+	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[      include 'mpif.h'])],[AC_MSG_RESULT(yes)], [MPILIBS=""
+		AC_MSG_RESULT(no)])
+fi],
+[Fortran], [if test x != x"$MPILIBS"; then
+	AC_MSG_CHECKING([for mpif.h])
+	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[      include 'mpif.h'])],[AC_MSG_RESULT(yes)], [MPILIBS=""
+		AC_MSG_RESULT(no)])
+fi])
+
+AC_LANG_CASE([C], [CC="$acx_mpi_save_CC"],
+	[C++], [CXX="$acx_mpi_save_CXX"],
+	[Fortran 77], [F77="$acx_mpi_save_F77"],
+	[Fortran], [FC="$acx_mpi_save_FC"])
+
+AC_SUBST(MPILIBS)
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x = x"$MPILIBS"; then
+        $2
+        :
+else
+        ifelse([$1],,[AC_DEFINE(HAVE_MPI,1,[Define if you have the MPI library.])],[$1])
+        :
+fi
+])dnl ACX_MPI
diff --git a/config/compile b/config/compile
new file mode 100755
index 0000000..531136b
--- /dev/null
+++ b/config/compile
@@ -0,0 +1,347 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand '-c -o'.
+
+scriptversion=2012-10-14.11; # UTC
+
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey at cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake at gnu.org> or send patches to
+# <automake-patches at gnu.org>.
+
+nl='
+'
+
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" ""	$nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+  file=$1
+  case $file in
+    / | /[!/]*) # absolute file, and not a UNC file
+      if test -z "$file_conv"; then
+	# lazily determine how to convert abs files
+	case `uname -s` in
+	  MINGW*)
+	    file_conv=mingw
+	    ;;
+	  CYGWIN*)
+	    file_conv=cygwin
+	    ;;
+	  *)
+	    file_conv=wine
+	    ;;
+	esac
+      fi
+      case $file_conv/,$2, in
+	*,$file_conv,*)
+	  ;;
+	mingw/*)
+	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+	  ;;
+	cygwin/*)
+	  file=`cygpath -m "$file" || echo "$file"`
+	  ;;
+	wine/*)
+	  file=`winepath -w "$file" || echo "$file"`
+	  ;;
+      esac
+      ;;
+  esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+  func_file_conv "$1"
+  if test -z "$lib_path"; then
+    lib_path=$file
+  else
+    lib_path="$lib_path;$file"
+  fi
+  linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+  lib=$1
+  found=no
+  save_IFS=$IFS
+  IFS=';'
+  for dir in $lib_path $LIB
+  do
+    IFS=$save_IFS
+    if $shared && test -f "$dir/$lib.dll.lib"; then
+      found=yes
+      lib=$dir/$lib.dll.lib
+      break
+    fi
+    if test -f "$dir/$lib.lib"; then
+      found=yes
+      lib=$dir/$lib.lib
+      break
+    fi
+    if test -f "$dir/lib$lib.a"; then
+      found=yes
+      lib=$dir/lib$lib.a
+      break
+    fi
+  done
+  IFS=$save_IFS
+
+  if test "$found" != yes; then
+    lib=$lib.lib
+  fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+  # Assume a capable shell
+  lib_path=
+  shared=:
+  linker_opts=
+  for arg
+  do
+    if test -n "$eat"; then
+      eat=
+    else
+      case $1 in
+	-o)
+	  # configure might choose to run compile as 'compile cc -o foo foo.c'.
+	  eat=1
+	  case $2 in
+	    *.o | *.[oO][bB][jJ])
+	      func_file_conv "$2"
+	      set x "$@" -Fo"$file"
+	      shift
+	      ;;
+	    *)
+	      func_file_conv "$2"
+	      set x "$@" -Fe"$file"
+	      shift
+	      ;;
+	  esac
+	  ;;
+	-I)
+	  eat=1
+	  func_file_conv "$2" mingw
+	  set x "$@" -I"$file"
+	  shift
+	  ;;
+	-I*)
+	  func_file_conv "${1#-I}" mingw
+	  set x "$@" -I"$file"
+	  shift
+	  ;;
+	-l)
+	  eat=1
+	  func_cl_dashl "$2"
+	  set x "$@" "$lib"
+	  shift
+	  ;;
+	-l*)
+	  func_cl_dashl "${1#-l}"
+	  set x "$@" "$lib"
+	  shift
+	  ;;
+	-L)
+	  eat=1
+	  func_cl_dashL "$2"
+	  ;;
+	-L*)
+	  func_cl_dashL "${1#-L}"
+	  ;;
+	-static)
+	  shared=false
+	  ;;
+	-Wl,*)
+	  arg=${1#-Wl,}
+	  save_ifs="$IFS"; IFS=','
+	  for flag in $arg; do
+	    IFS="$save_ifs"
+	    linker_opts="$linker_opts $flag"
+	  done
+	  IFS="$save_ifs"
+	  ;;
+	-Xlinker)
+	  eat=1
+	  linker_opts="$linker_opts $2"
+	  ;;
+	-*)
+	  set x "$@" "$1"
+	  shift
+	  ;;
+	*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+	  func_file_conv "$1"
+	  set x "$@" -Tp"$file"
+	  shift
+	  ;;
+	*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+	  func_file_conv "$1" mingw
+	  set x "$@" "$file"
+	  shift
+	  ;;
+	*)
+	  set x "$@" "$1"
+	  shift
+	  ;;
+      esac
+    fi
+    shift
+  done
+  if test -n "$linker_opts"; then
+    linker_opts="-link$linker_opts"
+  fi
+  exec "$@" $linker_opts
+  exit 1
+}
+
+eat=
+
+case $1 in
+  '')
+     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand '-c -o'.
+Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file 'INSTALL'.
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "compile $scriptversion"
+    exit $?
+    ;;
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+    func_cl_wrapper "$@"      # Doesn't return...
+    ;;
+esac
+
+ofile=
+cfile=
+
+for arg
+do
+  if test -n "$eat"; then
+    eat=
+  else
+    case $1 in
+      -o)
+	# configure might choose to run compile as 'compile cc -o foo foo.c'.
+	# So we strip '-o arg' only if arg is an object.
+	eat=1
+	case $2 in
+	  *.o | *.obj)
+	    ofile=$2
+	    ;;
+	  *)
+	    set x "$@" -o "$2"
+	    shift
+	    ;;
+	esac
+	;;
+      *.c)
+	cfile=$1
+	set x "$@" "$1"
+	shift
+	;;
+      *)
+	set x "$@" "$1"
+	shift
+	;;
+    esac
+  fi
+  shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+  # If no '-o' option was seen then we might have been invoked from a
+  # pattern rule where we don't need one.  That is ok -- this is a
+  # normal compilation that the losing compiler can handle.  If no
+  # '.c' file was seen then we are probably linking.  That is also
+  # ok.
+  exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
+# that we are using for the .o file.  Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
+while true; do
+  if mkdir "$lockdir" >/dev/null 2>&1; then
+    break
+  fi
+  sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+  test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+  test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/config/config.guess b/config/config.guess
new file mode 100644
index 0000000..dc84c68
--- /dev/null
+++ b/config/config.guess
@@ -0,0 +1,1501 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+#   Free Software Foundation, Inc.
+
+timestamp='2009-11-20'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner.  Please send patches (context
+# diff format) to <config-patches at gnu.org> and include a ChangeLog
+# entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi at noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep -q __ELF__
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+	        os=netbsd
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit ;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	exit ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit ;;
+    *:SolidBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	exit ;;
+    macppc:MirBSD:*:*)
+	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    alpha:OSF1:*:*)
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*5.*)
+	        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case "$ALPHA_CPU_TYPE" in
+	    "EV4 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE="alphaev5" ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE="alphaev56" ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE="alphapca56" ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE="alphapca57" ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE="alphaev6" ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE="alphaev67" ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE="alphaev69" ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE="alphaev7" ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE="alphaev79" ;;
+	esac
+	# A Pn.n version is a patched version.
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+	exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7; exit ;;
+	esac ;;
+    s390x:SunOS:*:*)
+	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+	echo i386-pc-auroraux${UNAME_RELEASE}
+	exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	eval $set_cc_for_build
+	SUN_ARCH="i386"
+	# If there is a compiler, see if it is configured for 64-bit objects.
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+	# This test works for both compilers.
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH="x86_64"
+	    fi
+	fi
+	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+        exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	    { echo "$SYSTEM_NAME"; exit; }
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+ 	exit ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit ;;
+    *:AIX:*:[456])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+              	{
+              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+              	case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+              	    switch (bits)
+              		{
+              		case 64: puts ("hppa2.0w"); break;
+              		case 32: puts ("hppa2.0n"); break;
+              		default: puts ("hppa2.0"); break;
+              		} break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+              	    puts ("hppa2.0"); break;
+              #endif
+              	default: puts ("hppa1.0"); break;
+              	}
+                  exit (0);
+              }
+EOF
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    eval $set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep -q __LP64__
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+		{ echo "$SYSTEM_NAME"; exit; }
+	echo unknown-hitachi-hiuxwe2
+	exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+        exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+        exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+        exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+        exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+        exit ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    *:UNICOS/mp:*:*)
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:FreeBSD:*:*)
+	case ${UNAME_MACHINE} in
+	    pc98)
+		echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    amd64)
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	esac
+	exit ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit ;;
+    *:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit ;;
+    i*:windows32*:*)
+    	# uname -m includes "-pc" on this system.
+    	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit ;;
+    *:Interix*:*)
+    	case ${UNAME_MACHINE} in
+	    x86)
+		echo i586-pc-interix${UNAME_RELEASE}
+		exit ;;
+	    authenticamd | genuineintel | EM64T)
+		echo x86_64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	    IA64)
+		echo ia64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	esac ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit ;;
+    8664:Windows_NT:*)
+	echo x86_64-pc-mks
+	exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i586-pc-interix
+	exit ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    *:GNU:*:*)
+	# the GNU system
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit ;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+	exit ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+	objdump --private-headers /bin/sh | grep -q ld.so.1
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit ;;
+    arm*:Linux:*:*)
+	eval $set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    echo ${UNAME_MACHINE}-unknown-linux-gnu
+	else
+	    echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+	fi
+	exit ;;
+    avr32*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    cris:Linux:*:*)
+	echo cris-axis-linux-gnu
+	exit ;;
+    crisv32:Linux:*:*)
+	echo crisv32-axis-linux-gnu
+	exit ;;
+    frv:Linux:*:*)
+    	echo frv-unknown-linux-gnu
+	exit ;;
+    i*86:Linux:*:*)
+	LIBC=gnu
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#ifdef __dietlibc__
+	LIBC=dietlibc
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+	echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+	exit ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    mips:Linux:*:* | mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef ${UNAME_MACHINE}
+	#undef ${UNAME_MACHINE}el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=${UNAME_MACHINE}el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=${UNAME_MACHINE}
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+	;;
+    or32:Linux:*:*)
+	echo or32-unknown-linux-gnu
+	exit ;;
+    padre:Linux:*:*)
+	echo sparc-unknown-linux-gnu
+	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
+	esac
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-gnu
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-gnu
+	exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux
+	exit ;;
+    sh64*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-gnu
+	exit ;;
+    x86_64:Linux:*:*)
+	echo x86_64-unknown-linux-gnu
+	exit ;;
+    xtensa*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit ;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit ;;
+    i*86:*:5:[678]*)
+    	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configury will decide that
+	# this is a cross-build.
+	echo i586-pc-msdosdjgpp
+        exit ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+	OS_REL='.3'
+	test -r /etc/.relid \
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel at ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes at openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit ;;
+    *:*:*:FTX*)
+	# From seanf at swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit ;;
+    i*86:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
+    *:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo hppa1.1-stratus-vos
+	exit ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+	        echo mips-nec-sysv${UNAME_RELEASE}
+	else
+	        echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+        exit ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit ;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	echo i586-pc-haiku
+	exit ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-7:SUPER-UX:*:*)
+	echo sx7-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8:SUPER-UX:*:*)
+	echo sx8-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8R:SUPER-UX:*:*)
+	echo sx8r-nec-superux${UNAME_RELEASE}
+	exit ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	case $UNAME_PROCESSOR in
+	    i386)
+		eval $set_cc_for_build
+		if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+		  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		      grep IS_64BIT_ARCH >/dev/null
+		  then
+		      UNAME_PROCESSOR="x86_64"
+		  fi
+		fi ;;
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+	exit ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    *:*VMS:*:*)
+    	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
+    i*86:rdos:*:*)
+	echo ${UNAME_MACHINE}-pc-rdos
+	exit ;;
+    i*86:AROS:*:*)
+	echo ${UNAME_MACHINE}-pc-aros
+	exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+	  ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+	{ echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    c34*)
+	echo c34-convex-bsd
+	exit ;;
+    c38*)
+	echo c38-convex-bsd
+	exit ;;
+    c4*)
+	echo c4-convex-bsd
+	exit ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches at gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config/config.sub b/config/config.sub
new file mode 100644
index 0000000..d8fd2f8
--- /dev/null
+++ b/config/config.sub
@@ -0,0 +1,1566 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+timestamp='2005-02-10'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit 0;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
+  kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis | -knuth | -cray)
+		os=
+		basic_machine=$1
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+ 	-chorusrdb)
+ 		os=-chorusrdb
+		basic_machine=$1
+ 		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| a29k \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| am33_2.0 \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+	| c4x | clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k | iq2000 \
+	| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64vr | mips64vrel \
+	| mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| msp430 \
+	| ns16k | ns32k \
+	| openrisc | or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| pyramid \
+	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
+	| strongarm \
+	| tahoe | thumb | tic4x | tic80 | tron \
+	| v850 | v850e \
+	| we32k \
+	| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+	| z8k)
+		basic_machine=$basic_machine-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12)
+		# Motorola 68HC11/12.
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* \
+	| bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| clipper-* | craynv-* | cydra-* \
+	| d10v-* | d30v-* | dlx-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* | iq2000-* \
+	| m32r-* | m32rle-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| msp430-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| pyramid-* \
+	| romp-* | rs6000-* \
+	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+	| tahoe-* | thumb-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tron-* \
+	| v850-* | v850e-* | vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+	| xstormy16-* | xtensa-* \
+	| ymp-* \
+	| z8k-*)
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+    	abacus)
+		basic_machine=abacus-unknown
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amd64-*)
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | j90)
+		basic_machine=j90-cray
+		os=-unicos
+		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
+	cr16c)
+		basic_machine=cr16c-unknown
+		os=-elf
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	or32 | or32-*)
+		basic_machine=or32-unknown
+		os=-coff
+		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+	pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2 | pentiumiii | pentium3)
+		basic_machine=i686-pc
+		;;
+	pentium4)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc)	basic_machine=powerpc-unknown
+		;;
+	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	s390 | s390-*)
+		basic_machine=s390-ibm
+		;;
+	s390x | s390x-*)
+		basic_machine=s390x-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
+		os=-unicos
+		;;
+	tic54x | c54x*)
+		basic_machine=tic54x-unknown
+		os=-coff
+		;;
+	tic55x | c55x*)
+		basic_machine=tic55x-unknown
+		os=-coff
+		;;
+	tic6x | c6x*)
+		basic_machine=tic6x-unknown
+		os=-coff
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+		basic_machine=f301-fujitsu
+		;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
+	xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+		basic_machine=sh-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparc | sparcv8 | sparcv9 | sparcv9b)
+		basic_machine=sparc-sun
+		;;
+	cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* \
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto-qnx*)
+		;;
+	-nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux-dietlibc)
+		os=-linux-dietlibc
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+        -os400*)
+		os=-os400
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-syllable*)
+		os=-syllable
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
+	-ns2 )
+		os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+        -tpf*)
+		os=-tpf
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-kaos*)
+		os=-kaos
+		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+    c4x-* | tic4x-*)
+        os=-coff
+        ;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=-tops20
+		;;
+	pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		# This also exists in the configure program, but was not the
+		# default.
+		# os=-sunos4
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	or32-*)
+		os=-coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-ibm)
+		os=-aix
+		;;
+    	*-knuth)
+		os=-mmixware
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+	*-gould)
+		os=-sysv
+		;;
+	*-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+	*-sgi)
+		os=-irix
+		;;
+	*-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-os400*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-tpf*)
+				vendor=ibm
+				;;
+			-vxsim* | -vxworks* | -windiss*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config/depcomp b/config/depcomp
new file mode 100644
index 0000000..807b991
--- /dev/null
+++ b/config/depcomp
@@ -0,0 +1,423 @@
+#! /bin/sh
+
+# depcomp - compile a program generating dependencies as side-effects
+# Copyright 1999, 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva at dcc.unicamp.br>.
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+# `libtool' can also be set to `yes' or `no'.
+
+if test -z "$depfile"; then
+   base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
+   dir=`echo "$object" | sed 's,/.*$,/,'`
+   if test "$dir" = "$object"; then
+      dir=
+   fi
+   # FIXME: should be _deps on DOS.
+   depfile="$dir.deps/$base"
+fi
+
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  This file always lives in the current directory.
+  # Also, the AIX compiler puts `$object:' at the start of each line;
+  # $object doesn't have directory information.
+  stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
+  tmpdepfile="$stripped.u"
+  outname="$stripped.o"
+  if test "$libtool" = yes; then
+    "$@" -Wc,-M
+  else
+    "$@" -M
+  fi
+
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      tmpdepfile1="$dir.libs/$base.lo.d"
+      tmpdepfile2="$dir.libs/$base.d"
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1="$dir$base.o.d"
+      tmpdepfile2="$dir$base.d"
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2"
+      exit $stat
+   fi
+
+   if test -f "$tmpdepfile1"; then
+      tmpdepfile="$tmpdepfile1"
+   else
+      tmpdepfile="$tmpdepfile2"
+   fi
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a space and a tab in the [].
+      sed -e 's,^.*\.[a-z]*:[ 	]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.  We will use -o /dev/null later,
+  # however we can't do the remplacement now because
+  # `-o $object' might simply not be used
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ 	]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    -*)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+	set fnord "$@"
+	shift
+	shift
+	;;
+    *)
+	set fnord "$@" "$arg"
+	shift
+	shift
+	;;
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
+  echo "	" >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
diff --git a/config/install-sh b/config/install-sh
new file mode 100755
index 0000000..11870f1
--- /dev/null
+++ b/config/install-sh
@@ -0,0 +1,251 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5 (mit/util/scripts/install.sh).
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission.  M.I.T. makes no representations about the
+# suitability of this software for any purpose.  It is provided "as is"
+# without express or implied warranty.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+    case $1 in
+	-c) instcmd="$cpprog"
+	    shift
+	    continue;;
+
+	-d) dir_arg=true
+	    shift
+	    continue;;
+
+	-m) chmodcmd="$chmodprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-o) chowncmd="$chownprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-g) chgrpcmd="$chgrpprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-s) stripcmd="$stripprog"
+	    shift
+	    continue;;
+
+	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
+	    shift
+	    continue;;
+
+	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+	    shift
+	    continue;;
+
+	*)  if [ x"$src" = x ]
+	    then
+		src=$1
+	    else
+		# this colon is to work around a 386BSD /bin/sh bug
+		:
+		dst=$1
+	    fi
+	    shift
+	    continue;;
+    esac
+done
+
+if [ x"$src" = x ]
+then
+	echo "install:	no input file specified"
+	exit 1
+else
+	:
+fi
+
+if [ x"$dir_arg" != x ]; then
+	dst=$src
+	src=""
+	
+	if [ -d $dst ]; then
+		instcmd=:
+		chmodcmd=""
+	else
+		instcmd=$mkdirprog
+	fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad 
+# if $src (and thus $dsttmp) contains '*'.
+
+	if [ -f "$src" ] || [ -d "$src" ]
+	then
+		:
+	else
+		echo "install:  $src does not exist"
+		exit 1
+	fi
+	
+	if [ x"$dst" = x ]
+	then
+		echo "install:	no destination specified"
+		exit 1
+	else
+		:
+	fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+	if [ -d $dst ]
+	then
+		dst="$dst"/`basename $src`
+	else
+		:
+	fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+#  this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+	'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+	pathcomp="${pathcomp}${1}"
+	shift
+
+	if [ ! -d "${pathcomp}" ] ;
+        then
+		$mkdirprog "${pathcomp}"
+	else
+		:
+	fi
+
+	pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+	$doit $instcmd $dst &&
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+	if [ x"$transformarg" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		dstfile=`basename $dst $transformbasename | 
+			sed $transformarg`$transformbasename
+	fi
+
+# don't allow the sed command to completely eliminate the filename
+
+	if [ x"$dstfile" = x ] 
+	then
+		dstfile=`basename $dst`
+	else
+		:
+	fi
+
+# Make a temp file name in the proper directory.
+
+	dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+	$doit $instcmd $src $dsttmp &&
+
+	trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing.  If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi &&
+
+# Now rename the file to the real destination.
+
+	$doit $rmcmd -f $dstdir/$dstfile &&
+	$doit $mvcmd $dsttmp $dstdir/$dstfile 
+
+fi &&
+
+
+exit 0
diff --git a/config/libtool.m4 b/config/libtool.m4
new file mode 100644
index 0000000..d812584
--- /dev/null
+++ b/config/libtool.m4
@@ -0,0 +1,7831 @@
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
+#                 Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+m4_define([_LT_COPYING], [dnl
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
+#                 Inc.
+#   Written by Gordon Matzigkeit, 1996
+#
+#   This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+])
+
+# serial 57 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+       [m4_default([$3],
+		   [m4_fatal([Libtool version $1 or higher is required],
+		             63)])],
+       [$2])])
+
+
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+  *\ * | *\	*)
+    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
+
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+m4_defun([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+  case $cc_temp in
+    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+])
+
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
+
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_WITH_SYSROOT])dnl
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
+fi
+
+_LT_CHECK_OBJDIR
+
+m4_require([_LT_TAG_COMPILER])dnl
+
+case $host_os in
+aix3*)
+  # AIX sometimes has problems with the GCC collect2 program.  For some
+  # reason, if we set the COLLECT_NAMES environment variable, the problems
+  # vanish in a puff of smoke.
+  if test "X${COLLECT_NAMES+set}" != Xset; then
+    COLLECT_NAMES=
+    export COLLECT_NAMES
+  fi
+  ;;
+esac
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    _LT_PATH_MAGIC
+  fi
+  ;;
+esac
+
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
+
+
+# _LT_PREPARE_SED_QUOTE_VARS
+# --------------------------
+# Define a few sed substitution that help us do robust quoting.
+m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
+[# Backslashify metacharacters that are still active within
+# double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+])
+
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
+
+
+## ------------------------------------- ##
+## Accumulate code for creating libtool. ##
+## ------------------------------------- ##
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the `libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+                     [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+                     [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+## ------------------------ ##
+## FIXME: Eliminate VARNAME ##
+## ------------------------ ##
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME.  Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+	[m4_ifval([$1], [$1], [$2])])
+    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+    m4_ifval([$4],
+	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+    lt_dict_add_subkey([lt_decl_dict], [$2],
+	[tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+  [0], [m4_fatal([$0: too few arguments: $#])],
+  [1], [m4_fatal([$0: too few arguments: $#: $1])],
+  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+     m4_if([$2], [],
+	   m4_quote(lt_decl_varnames),
+	m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'.  VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly.  In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags="_LT_TAGS"dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+#    # Some comment about what VAR is for.
+#    visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+					   [description])))[]dnl
+m4_pushdef([_libtool_name],
+    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+    [0], [_libtool_name=[$]$1],
+    [1], [_libtool_name=$lt_[]$1],
+    [2], [_libtool_name=$lt_[]$1],
+    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'.  Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+	dnl If the libtool generation code has been placed in $CONFIG_LT,
+	dnl instead of duplicating it all over again into config.status,
+	dnl then we will have config.status run $CONFIG_LT later, so it
+	dnl needs to know what name is stored there:
+        [AC_CONFIG_COMMANDS([libtool],
+            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+    dnl If the libtool generation code is destined for config.status,
+    dnl expand the accumulated commands and init code now:
+    [AC_CONFIG_COMMANDS([libtool],
+        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$[]1
+_LTECHO_EOF'
+}
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+    *[[\\\\\\\`\\"\\\$]]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
+    *[[\\\\\\\`\\"\\\$]]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
+# ------------------------------------
+# Generate a child script FILE with all initialization necessary to
+# reuse the environment learned by the parent script, and make the
+# file executable.  If COMMENT is supplied, it is inserted after the
+# `#!' sequence but before initialization text begins.  After this
+# macro, additional text can be appended to FILE to form the body of
+# the child script.  The macro ends with non-zero status if the
+# file could not be fully written (such as if the disk is full).
+m4_ifdef([AS_INIT_GENERATED],
+[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
+[m4_defun([_LT_GENERATED_FILE_INIT],
+[m4_require([AS_PREPARE])]dnl
+[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
+[lt_write_fail=0
+cat >$1 <<_ASEOF || lt_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+$2
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$1 <<\_ASEOF || lt_write_fail=1
+AS_SHELL_SANITIZE
+_AS_PREPARE
+exec AS_MESSAGE_FD>&1
+_ASEOF
+test $lt_write_fail = 0 && chmod +x $1[]dnl
+m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
+[# Run this file to recreate a libtool stub with the current configuration.])
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+lt_cl_silent=false
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+  echo
+  AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+  -h, --help      print this help, then exit
+  -V, --version   print version number, then exit
+  -q, --quiet     do not print progress messages
+  -d, --debug     don't remove temporary files
+
+Report bugs to <bug-libtool at gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test $[#] != 0
+do
+  case $[1] in
+    --version | --v* | -V )
+      echo "$lt_cl_version"; exit 0 ;;
+    --help | --h* | -h )
+      echo "$lt_cl_help"; exit 0 ;;
+    --debug | --d* | -d )
+      debug=: ;;
+    --quiet | --q* | --silent | --s* | -q )
+      lt_cl_silent=: ;;
+
+    -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+
+    *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try \`$[0] --help' for more information.]) ;;
+  esac
+  shift
+done
+
+if $lt_cl_silent; then
+  exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure.  Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+lt_cl_success=:
+test "$silent" = yes &&
+  lt_config_lt_args="$lt_config_lt_args --quiet"
+exec AS_MESSAGE_LOG_FD>/dev/null
+$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+exec AS_MESSAGE_LOG_FD>>config.log
+$lt_cl_success || AS_EXIT(1)
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars.  Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+  m4_if(_LT_TAG, [C], [
+    # See if we are running on zsh, and set the options which allow our
+    # commands through without removal of \ escapes.
+    if test -n "${ZSH_VERSION+set}" ; then
+      setopt NO_GLOB_SUBST
+    fi
+
+    cfgfile="${ofile}T"
+    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+    $RM "$cfgfile"
+
+    cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+  case $host_os in
+  aix3*)
+    cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program.  For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+  COLLECT_NAMES=
+  export COLLECT_NAMES
+fi
+_LT_EOF
+    ;;
+  esac
+
+  _LT_PROG_LTMAIN
+
+  # We use sed instead of cat because bash on DJGPP gets confused if
+  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
+  # text mode, it properly converts lines to CR/LF.  This bash problem
+  # is reportedly fixed, but why not run on old versions too?
+  sed '$q' "$ltmain" >> "$cfgfile" \
+     || (rm -f "$cfgfile"; exit 1)
+
+  _LT_PROG_REPLACE_SHELLFNS
+
+   mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+    PACKAGE='$PACKAGE'
+    VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
+    RM='$RM'
+    ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+  [C],			[_LT_LANG(C)],
+  [C++],		[_LT_LANG(CXX)],
+  [Java],		[_LT_LANG(GCJ)],
+  [Fortran 77],		[_LT_LANG(F77)],
+  [Fortran],		[_LT_LANG(FC)],
+  [Windows Resource],	[_LT_LANG(RC)],
+  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+    [_LT_LANG($1)],
+    [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+  [LT_SUPPORTED_TAG([$1])dnl
+  m4_append([_LT_TAGS], [$1 ])dnl
+  m4_define([_LT_LANG_]$1[_enabled], [])dnl
+  _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+  [LT_LANG(CXX)],
+  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+  [LT_LANG(F77)],
+  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+  [LT_LANG(FC)],
+  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+  [LT_LANG(GCJ)],
+  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+    [LT_LANG(GCJ)],
+    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+      [LT_LANG(GCJ)],
+      [m4_ifdef([AC_PROG_GCJ],
+	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+       m4_ifdef([A][M_PROG_GCJ],
+	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+       m4_ifdef([LT_PROG_GCJ],
+	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+  [LT_LANG(RC)],
+  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+dnl AC_DEFUN([AC_LIBTOOL_RC], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_TAG_COMPILER
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+  case $host_os in
+    rhapsody* | darwin*)
+    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+    AC_CHECK_TOOL([LIPO], [lipo], [:])
+    AC_CHECK_TOOL([OTOOL], [otool], [:])
+    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+    _LT_DECL([], [DSYMUTIL], [1],
+      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+    _LT_DECL([], [NMEDIT], [1],
+      [Tool to change global to local symbols on Mac OS X])
+    _LT_DECL([], [LIPO], [1],
+      [Tool to manipulate fat objects and archives on Mac OS X])
+    _LT_DECL([], [OTOOL], [1],
+      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+    _LT_DECL([], [OTOOL64], [1],
+      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+      [lt_cv_apple_cc_single_mod=no
+      if test -z "${LT_MULTI_MODULE}"; then
+	# By default we will add the -single_module flag. You can override
+	# by either setting the environment variable LT_MULTI_MODULE
+	# non-empty at configure time, or by adding -multi_module to the
+	# link flags.
+	rm -rf libconftest.dylib*
+	echo "int foo(void){return 1;}" > conftest.c
+	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+        _lt_result=$?
+	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+	  lt_cv_apple_cc_single_mod=yes
+	else
+	  cat conftest.err >&AS_MESSAGE_LOG_FD
+	fi
+	rm -rf libconftest.dylib*
+	rm -f conftest.*
+      fi])
+    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+      [lt_cv_ld_exported_symbols_list],
+      [lt_cv_ld_exported_symbols_list=no
+      save_LDFLAGS=$LDFLAGS
+      echo "_main" > conftest.sym
+      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+	[lt_cv_ld_exported_symbols_list=yes],
+	[lt_cv_ld_exported_symbols_list=no])
+	LDFLAGS="$save_LDFLAGS"
+    ])
+    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
+      [lt_cv_ld_force_load=no
+      cat > conftest.c << _LT_EOF
+int forced_loaded() { return 2;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
+      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
+      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
+      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
+      cat > conftest.c << _LT_EOF
+int main() { return 0;}
+_LT_EOF
+      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
+      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
+      _lt_result=$?
+      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
+	lt_cv_ld_force_load=yes
+      else
+	cat conftest.err >&AS_MESSAGE_LOG_FD
+      fi
+        rm -f conftest.err libconftest.a conftest conftest.c
+        rm -rf conftest.dSYM
+    ])
+    case $host_os in
+    rhapsody* | darwin1.[[012]])
+      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+    darwin1.*)
+      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+    darwin*) # darwin 5.x on
+      # if running on 10.5 or later, the deployment target defaults
+      # to the OS version, if on x86, and 10.4, the deployment
+      # target defaults to 10.4. Don't you love it?
+      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+	10.[[012]]*)
+	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+	10.*)
+	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+      esac
+    ;;
+  esac
+    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+      _lt_dar_single_mod='$single_module'
+    fi
+    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+    else
+      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+    fi
+    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+      _lt_dsymutil='~$DSYMUTIL $lib || :'
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
+])
+
+
+# _LT_DARWIN_LINKER_FEATURES
+# --------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+  _LT_TAGVAR(hardcode_direct, $1)=no
+  _LT_TAGVAR(hardcode_automatic, $1)=yes
+  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  if test "$lt_cv_ld_force_load" = "yes"; then
+    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+  else
+    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  fi
+  _LT_TAGVAR(link_all_deplibs, $1)=yes
+  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
+  esac
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=func_echo_all
+    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+    m4_if([$1], [CXX],
+[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+    fi
+],[])
+  else
+  _LT_TAGVAR(ld_shlibs, $1)=no
+  fi
+])
+
+# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
+# ----------------------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+# Store the results from the different compilers for each TAGNAME.
+# Allow to override them for all tags through lt_cv_aix_libpath.
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+if test "${lt_cv_aix_libpath+set}" = set; then
+  aix_libpath=$lt_cv_aix_libpath
+else
+  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
+  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
+  lt_aix_libpath_sed='[
+      /Import File Strings/,/^$/ {
+	  /^0/ {
+	      s/^0  *\([^ ]*\) *$/\1/
+	      p
+	  }
+      }]'
+  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  # Check for a 64-bit object if we didn't find anything.
+  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+  fi],[])
+  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
+    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
+  fi
+  ])
+  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
+fi
+])# _LT_SYS_MODULE_PATH_AIX
+
+
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[m4_divert_text([M4SH-INIT], [$1
+])])# _LT_SHELL_INIT
+
+
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# Find how we can fake an echo command that does not interpret backslash.
+# In particular, with Autoconf 2.60 or later we add some code to the start
+# of the generated configure script which will find a shell with a builtin
+# printf (which we can use as an echo command).
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+
+AC_MSG_CHECKING([how to print strings])
+# Test print first, because it will be a builtin if present.
+if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
+   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='print -r --'
+elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
+  ECHO='printf %s\n'
+else
+  # Use this function as a fallback that always works.
+  func_fallback_echo ()
+  {
+    eval 'cat <<_LTECHO_EOF
+$[]1
+_LTECHO_EOF'
+  }
+  ECHO='func_fallback_echo'
+fi
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO "$*" 
+}
+
+case "$ECHO" in
+  printf*) AC_MSG_RESULT([printf]) ;;
+  print*) AC_MSG_RESULT([print -r]) ;;
+  *) AC_MSG_RESULT([cat]) ;;
+esac
+
+m4_ifdef([_AS_DETECT_SUGGESTED],
+[_AS_DETECT_SUGGESTED([
+  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
+    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
+    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
+    PATH=/empty FPATH=/empty; export PATH FPATH
+    test "X`printf %s $ECHO`" = "X$ECHO" \
+      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
+
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
+
+
+# _LT_WITH_SYSROOT
+# ----------------
+AC_DEFUN([_LT_WITH_SYSROOT],
+[AC_MSG_CHECKING([for sysroot])
+AC_ARG_WITH([sysroot],
+[  --with-sysroot[=DIR] Search for dependent libraries within DIR
+                        (or the compiler's sysroot if not specified).],
+[], [with_sysroot=no])
+
+dnl lt_sysroot will always be passed unquoted.  We quote it here
+dnl in case the user passed a directory name.
+lt_sysroot=
+case ${with_sysroot} in #(
+ yes)
+   if test "$GCC" = yes; then
+     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+   fi
+   ;; #(
+ /*)
+   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+   ;; #(
+ no|'')
+   ;; #(
+ *)
+   AC_MSG_RESULT([${with_sysroot}])
+   AC_MSG_ERROR([The sysroot must be an absolute path.])
+   ;;
+esac
+
+ AC_MSG_RESULT([${lt_sysroot:-no}])
+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
+[dependent libraries, and in which our libraries should be installed.])])
+
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+  [AS_HELP_STRING([--disable-libtool-lock],
+    [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.$ac_objext` in
+      *ELF-32*)
+	HPUX_IA64_MODE="32"
+	;;
+      *ELF-64*)
+	HPUX_IA64_MODE="64"
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    if test "$lt_cv_prog_gnu_ld" = yes; then
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -melf32bsmip"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -melf32bmipn32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -melf64bmip"
+	;;
+      esac
+    else
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -32"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -n32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -64"
+	  ;;
+      esac
+    fi
+  fi
+  rm -rf conftest*
+  ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+      *32-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_i386_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_i386"
+	    ;;
+	  ppc64-*linux*|powerpc64-*linux*)
+	    LD="${LD-ld} -m elf32ppclinux"
+	    ;;
+	  s390x-*linux*)
+	    LD="${LD-ld} -m elf_s390"
+	    ;;
+	  sparc64-*linux*)
+	    LD="${LD-ld} -m elf32_sparc"
+	    ;;
+	esac
+	;;
+      *64-bit*)
+	case $host in
+	  x86_64-*kfreebsd*-gnu)
+	    LD="${LD-ld} -m elf_x86_64_fbsd"
+	    ;;
+	  x86_64-*linux*)
+	    LD="${LD-ld} -m elf_x86_64"
+	    ;;
+	  ppc*-*linux*|powerpc*-*linux*)
+	    LD="${LD-ld} -m elf64ppc"
+	    ;;
+	  s390*-*linux*|s390*-*tpf*)
+	    LD="${LD-ld} -m elf64_s390"
+	    ;;
+	  sparc*-*linux*)
+	    LD="${LD-ld} -m elf64_sparc"
+	    ;;
+	esac
+	;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+    [AC_LANG_PUSH(C)
+     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+     AC_LANG_POP])
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)
+	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+	  LD="${LD-ld} -64"
+	fi
+	;;
+      esac
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+esac
+
+need_locks="$enable_libtool_lock"
+])# _LT_ENABLE_LOCK
+
+
+# _LT_PROG_AR
+# -----------
+m4_defun([_LT_PROG_AR],
+[AC_CHECK_TOOLS(AR, [ar], false)
+: ${AR=ar}
+: ${AR_FLAGS=cru}
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
+
+AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
+  [lt_cv_ar_at_file=no
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
+     [echo conftest.$ac_objext > conftest.lst
+      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
+      AC_TRY_EVAL([lt_ar_try])
+      if test "$ac_status" -eq 0; then
+	# Ensure the archiver fails upon bogus file names.
+	rm -f conftest.$ac_objext libconftest.a
+	AC_TRY_EVAL([lt_ar_try])
+	if test "$ac_status" -ne 0; then
+          lt_cv_ar_at_file=@
+        fi
+      fi
+      rm -f conftest.* libconftest.a
+     ])
+  ])
+
+if test "x$lt_cv_ar_at_file" = xno; then
+  archiver_list_spec=
+else
+  archiver_list_spec=$lt_cv_ar_at_file
+fi
+_LT_DECL([], [archiver_list_spec], [1],
+  [How to feed a file listing to the archiver])
+])# _LT_PROG_AR
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[_LT_PROG_AR
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+    [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+  case $host_os in
+  openbsd*)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+    ;;
+  *)
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+    ;;
+  esac
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+case $host_os in
+  darwin*)
+    lock_old_archive_extraction=yes ;;
+  *)
+    lock_old_archive_extraction=no ;;
+esac
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+    [Commands used to build an old-style archive])
+_LT_DECL([], [lock_old_archive_extraction], [0],
+    [Whether to use a lock for old archive extraction])
+])# _LT_CMD_OLD_ARCHIVE
+
+
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$3"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       $2=yes
+     fi
+   fi
+   $RM conftest*
+])
+
+if test x"[$]$2" = xyes; then
+    m4_if([$5], , :, [$5])
+else
+    m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+#                  [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+  [$2=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $3"
+   echo "$lt_simple_link_test_code" > conftest.$ac_ext
+   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+     # The linker can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     if test -s conftest.err; then
+       # Append any errors to the config.log.
+       cat conftest.err 1>&AS_MESSAGE_LOG_FD
+       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         $2=yes
+       fi
+     else
+       $2=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+    m4_if([$4], , :, [$4])
+else
+    m4_if([$5], , :, [$5])
+fi
+])# _LT_LINKER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+  i=0
+  teststring="ABCD"
+
+  case $build_os in
+  msdosdjgpp*)
+    # On DJGPP, this test can blow up pretty badly due to problems in libc
+    # (any single argument exceeding 2000 bytes causes a buffer overrun
+    # during glob expansion).  Even if it were fixed, the result of this
+    # check would be larger than it should be.
+    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
+    ;;
+
+  gnu*)
+    # Under GNU Hurd, this test is not required because there is
+    # no limit to the length of command line arguments.
+    # Libtool will interpret -1 as no limit whatsoever
+    lt_cv_sys_max_cmd_len=-1;
+    ;;
+
+  cygwin* | mingw* | cegcc*)
+    # On Win9x/ME, this test blows up -- it succeeds, but takes
+    # about 5 minutes as the teststring grows exponentially.
+    # Worse, since 9x/ME are not pre-emptively multitasking,
+    # you end up with a "frozen" computer, even though with patience
+    # the test eventually succeeds (with a max line length of 256k).
+    # Instead, let's just punt: use the minimum linelength reported by
+    # all of the supported platforms: 8192 (on NT/2K/XP).
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  mint*)
+    # On MiNT this can take a long time and run out of memory.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  amigaos*)
+    # On AmigaOS with pdksh, this test takes hours, literally.
+    # So we just punt and use a minimum line length of 8192.
+    lt_cv_sys_max_cmd_len=8192;
+    ;;
+
+  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+    # This has been around since 386BSD, at least.  Likely further.
+    if test -x /sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+    elif test -x /usr/sbin/sysctl; then
+      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+    else
+      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
+    fi
+    # And add a safety zone
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    ;;
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
+    fi
+    ;;
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
+    ;;
+  sysv5* | sco5v6* | sysv4.2uw2*)
+    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+    if test -n "$kargmax"; then
+      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
+    else
+      lt_cv_sys_max_cmd_len=32768
+    fi
+    ;;
+  *)
+    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+    if test -n "$lt_cv_sys_max_cmd_len"; then
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+    else
+      # Make teststring a little bigger before we do anything with it.
+      # a 1K string should be a reasonable start.
+      for i in 1 2 3 4 5 6 7 8 ; do
+        teststring=$teststring$teststring
+      done
+      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+      # If test is not a shell built-in, we'll probably end up computing a
+      # maximum length that is only half of the actual maximum length, but
+      # we can't tell.
+      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
+	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+	      test $i != 17 # 1/2 MB should be enough
+      do
+        i=`expr $i + 1`
+        teststring=$teststring$teststring
+      done
+      # Only check the string length outside the loop.
+      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+      teststring=
+      # Add a significant safety factor because C++ compilers can tack on
+      # massive amounts of additional arguments before passing them to the
+      # linker.  It appears as though 1/2 is a usable value.
+      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    fi
+    ;;
+  esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+  AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+    [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
+
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+  [$4]
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+[#line $LINENO "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+   find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+#  ifdef RTLD_LAZY
+#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
+#  else
+#    ifdef DL_LAZY
+#      define LT_DLLAZY_OR_NOW		DL_LAZY
+#    else
+#      ifdef RTLD_NOW
+#        define LT_DLLAZY_OR_NOW	RTLD_NOW
+#      else
+#        ifdef DL_NOW
+#          define LT_DLLAZY_OR_NOW	DL_NOW
+#        else
+#          define LT_DLLAZY_OR_NOW	0
+#        endif
+#      endif
+#    endif
+#  endif
+#endif
+
+/* When -fvisbility=hidden is used, assume the code has been annotated
+   correspondingly for the symbols needed.  */
+#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+int fnord () __attribute__((visibility("default")));
+#endif
+
+int fnord () { return 42; }
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else
+        {
+	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
+          else puts (dlerror ());
+	}
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
+
+  return status;
+}]
+_LT_EOF
+  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) $1 ;;
+      x$lt_dlneed_uscore) $2 ;;
+      x$lt_dlunknown|x*) $3 ;;
+    esac
+  else :
+    # compilation failed
+    $3
+  fi
+fi
+rm -fr conftest*
+])# _LT_TRY_DLOPEN_SELF
+
+
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
+else
+  lt_cv_dlopen=no
+  lt_cv_dlopen_libs=
+
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
+
+  mingw* | pw32* | cegcc*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+    ;;
+
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+    ;;
+
+  darwin*)
+  # if libdl is installed we need to link against it
+    AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ])
+    ;;
+
+  *)
+    AC_CHECK_FUNC([shl_load],
+	  [lt_cv_dlopen="shl_load"],
+      [AC_CHECK_LIB([dld], [shl_load],
+	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+	[AC_CHECK_FUNC([dlopen],
+	      [lt_cv_dlopen="dlopen"],
+	  [AC_CHECK_LIB([dl], [dlopen],
+		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+	    [AC_CHECK_LIB([svld], [dlopen],
+		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+	      [AC_CHECK_LIB([dld], [dld_link],
+		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+	      ])
+	    ])
+	  ])
+	])
+      ])
+    ;;
+  esac
+
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
+
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
+
+    AC_CACHE_CHECK([whether a program can dlopen itself],
+	  lt_cv_dlopen_self, [dnl
+	  _LT_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+    ])
+
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+	  lt_cv_dlopen_self_static, [dnl
+	  _LT_TRY_DLOPEN_SELF(
+	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
+      ])
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
+
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
+
+  case $lt_cv_dlopen_self_static in
+  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+  *) enable_dlopen_self_static=unknown ;;
+  esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+	 [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+	 [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+	 [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+   lt_compiler_flag="-o out/conftest2.$ac_objext"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+     fi
+   fi
+   chmod u+w . 2>&AS_MESSAGE_LOG_FD
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+])
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+	[Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
+
+
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
+# Check to see if we can do hard links to lock some files if needed
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
+
+hard_links="nottested"
+if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  AC_MSG_CHECKING([if we can lock with hard links])
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  AC_MSG_RESULT([$hard_links])
+  if test "$hard_links" = no; then
+    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
+
+
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
+else
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+_LT_DECL([], [objdir], [0],
+         [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+  [Define to the sub-directory in which libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
+
+
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
+# Check hardcoding attributes.
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+    # Linking always hardcodes the temporary library directory.
+    _LT_TAGVAR(hardcode_action, $1)=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    _LT_TAGVAR(hardcode_action, $1)=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  _LT_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+  # Fast installation is not supported
+  enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+     test "$enable_shared" = no; then
+  # Fast installation is not necessary
+  enable_fast_install=needless
+fi
+_LT_TAGDECL([], [hardcode_action], [0],
+    [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
+
+
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+  darwin*)
+    if test -n "$STRIP" ; then
+      striplib="$STRIP -x"
+      old_striplib="$STRIP -S"
+      AC_MSG_RESULT([yes])
+    else
+      AC_MSG_RESULT([no])
+    fi
+    ;;
+  *)
+    AC_MSG_RESULT([no])
+    ;;
+  esac
+fi
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
+
+
+# _LT_SYS_DYNAMIC_LINKER([TAG])
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_OBJDUMP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_if([$1],
+	[], [
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  case $host_os in
+    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
+    *) lt_sed_strip_eq="s,=/,/,g" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
+  case $lt_search_path_spec in
+  *\;*)
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
+    ;;
+  *)
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
+    ;;
+  esac
+  # Ok, now we have the path, separated by spaces, we can step through it
+  # and add multilib dir if necessary.
+  lt_tmp_lt_search_path_spec=
+  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+  for lt_sys_path in $lt_search_path_spec; do
+    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+    else
+      test -d "$lt_sys_path" && \
+	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+    fi
+  done
+  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+  lt_foo="";
+  lt_count=0;
+  for (lt_i = NF; lt_i > 0; lt_i--) {
+    if ($lt_i != "" && $lt_i != ".") {
+      if ($lt_i == "..") {
+        lt_count++;
+      } else {
+        if (lt_count == 0) {
+          lt_foo="/" $lt_i lt_foo;
+        } else {
+          lt_count--;
+        }
+      }
+    }
+  }
+  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+  # AWK program above erroneously prepends '/' to C:/dos/paths
+  # for these hosts.
+  case $host_os in
+    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
+      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
+  esac
+  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
+
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
+
+aix[[4-9]]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[[01]] | aix4.[[01]].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
+      ;;
+    esac
+    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+    # soname into executable. Probably we can add versioning support to
+    # collect2, so additional links can be useful in future.
+    if test "$aix_use_runtimelinking" = yes; then
+      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+      # instead of lib<name>.a to let people know that these are not
+      # typical AIX shared libraries.
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    else
+      # We preserve .a as extension for shared libraries through AIX4.2
+      # and later when we are not doing run time linking.
+      library_names_spec='${libname}${release}.a $libname.a'
+      soname_spec='${libname}${release}${shared_ext}$major'
+    fi
+    shlibpath_var=LIBPATH
+  fi
+  ;;
+
+amigaos*)
+  case $host_cpu in
+  powerpc)
+    # Since July 2007 AmigaOS4 officially supports .so libraries.
+    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    ;;
+  m68k)
+    library_names_spec='$libname.ixlibrary $libname.a'
+    # Create ${libname}_ixlibrary.a entries in /sys/libs.
+    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    ;;
+  esac
+  ;;
+
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
+
+bsdi[[45]]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
+
+  case $GCC,$cc_basename in
+  yes,*)
+    # gcc
+    library_names_spec='$libname.dll.a'
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname~
+      chmod a+x \$dldir/$dlname~
+      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+      fi'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+m4_if([$1], [],[
+      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
+      ;;
+    mingw* | cegcc*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    dynamic_linker='Win32 ld.exe'
+    ;;
+
+  *,cl*)
+    # Native MSVC
+    libname_spec='$name'
+    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+    library_names_spec='${libname}.dll.lib'
+
+    case $build_os in
+    mingw*)
+      sys_lib_search_path_spec=
+      lt_save_ifs=$IFS
+      IFS=';'
+      for lt_path in $LIB
+      do
+        IFS=$lt_save_ifs
+        # Let DOS variable expansion print the short 8.3 style file name.
+        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
+        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
+      done
+      IFS=$lt_save_ifs
+      # Convert to MSYS style.
+      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
+      ;;
+    cygwin*)
+      # Convert to unix form, then to dos form, then back to unix form
+      # but this time dos style (no spaces!) so that the unix form looks
+      # like /cygdrive/c/PROGRA~1:/cygdr...
+      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
+      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
+      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      ;;
+    *)
+      sys_lib_search_path_spec="$LIB"
+      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+        # It is most probably a Windows format PATH.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      # FIXME: find the short name or the path components, as spaces are
+      # common. (e.g. "Program Files" -> "PROGRA~1")
+      ;;
+    esac
+
+    # DLL is installed to $(libdir)/../bin by postinstall_cmds
+    postinstall_cmds='base_file=`basename \${file}`~
+      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+      dldir=$destdir/`dirname \$dlpath`~
+      test -d \$dldir || mkdir -p \$dldir~
+      $install_prog $dir/$dlname \$dldir/$dlname'
+    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+      dlpath=$dir/\$dldll~
+       $RM \$dlpath'
+    shlibpath_overrides_runpath=yes
+    dynamic_linker='Win32 link.exe'
+    ;;
+
+  *)
+    # Assume MSVC wrapper
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    dynamic_linker='Win32 ld.exe'
+    ;;
+  esac
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  soname_spec='${libname}${release}${major}$shared_ext'
+  shlibpath_overrides_runpath=yes
+  shlibpath_var=DYLD_LIBRARY_PATH
+  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+m4_if([$1], [],[
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[[123]]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+haiku*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  dynamic_linker="$host_os runtime_loader"
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
+  postinstall_cmds='chmod 555 $lib'
+  # or fails outright, so override atomically:
+  install_override_mode=555
+  ;;
+
+interix[[3-9]]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+
+  # Some binutils ld are patched to set DT_RUNPATH
+  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
+    [lt_cv_shlibpath_overrides_runpath=no
+    save_LDFLAGS=$LDFLAGS
+    save_libdir=$libdir
+    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+	 [lt_cv_shlibpath_overrides_runpath=yes])])
+    LDFLAGS=$save_LDFLAGS
+    libdir=$save_libdir
+    ])
+  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
+
+  # This implies no fast_install, which is unacceptable.
+  # Some rework will be needed to allow for fast_install
+  # before this can be enabled.
+  hardcode_into_libs=yes
+
+  # Append ld.so.conf contents to the search path
+  if test -f /etc/ld.so.conf; then
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+  fi
+
+  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  # powerpc, because MkLinux only supported shared libraries with the
+  # GNU dynamic linker.  Since this was broken with cross compilers,
+  # most powerpc-linux boxes support dynamic linking these days and
+  # people can always --disable-shared, the test was removed, and we
+  # assume the GNU/Linux dynamic linker is in use.
+  dynamic_linker='GNU/Linux ld.so'
+  ;;
+
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
+
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
+
+*nto* | *qnx*)
+  version_type=qnx
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
+  ;;
+
+openbsd*)
+  version_type=sunos
+  sys_lib_dlsearch_path_spec="/usr/lib"
+  need_lib_prefix=no
+  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+  case $host_os in
+    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
+    *)				need_version=no  ;;
+  esac
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    case $host_os in
+      openbsd2.[[89]] | openbsd2.[[89]].*)
+	shlibpath_overrides_runpath=no
+	;;
+      *)
+	shlibpath_overrides_runpath=yes
+	;;
+      esac
+  else
+    shlibpath_overrides_runpath=yes
+  fi
+  ;;
+
+os2*)
+  libname_spec='$name'
+  shrext_cmds=".dll"
+  need_lib_prefix=no
+  library_names_spec='$libname${shared_ext} $libname.a'
+  dynamic_linker='OS/2 ld.exe'
+  shlibpath_var=LIBPATH
+  ;;
+
+osf3* | osf4* | osf5*)
+  version_type=osf
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+  ;;
+
+rdos*)
+  dynamic_linker=no
+  ;;
+
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  if test "$with_gnu_ld" = yes; then
+    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+  else
+    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+    case $host_os in
+      sco3.2v5*)
+        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+	;;
+    esac
+  fi
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
+
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+*)
+  dynamic_linker=no
+  ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+_LT_DECL([], [variables_saved_for_relink], [1],
+    [Variables whose values should be saved in libtool wrapper scripts and
+    restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+    [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+    [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+    [[List of archive names.  First name is the real one, the rest are links.
+    The last name is the one that the linker finds with -lNAME]])
+_LT_DECL([], [soname_spec], [1],
+    [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [install_override_mode], [1],
+    [Permission mode override for installation of shared libraries])
+_LT_DECL([], [postinstall_cmds], [2],
+    [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+    [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+    [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+    [[As "finish_cmds", except a single script fragment to be evaled but
+    not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+    [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+    [Compile-time system search path for libraries])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+    [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program which can recognize shared library
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] |  ?:[\\/]*])
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word.  This closes a longstanding sh security hole.
+  ac_dummy="m4_if([$2], , $PATH, [$2])"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$1; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool at gnu.org
+
+_LT_EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  AC_MSG_RESULT($MAGIC_CMD)
+else
+  AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program which can recognize a shared library
+m4_defun([_LT_PATH_MAGIC],
+[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+  else
+    MAGIC_CMD=:
+  fi
+fi
+])# _LT_PATH_MAGIC
+
+
+# LT_PATH_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
+
+AC_ARG_WITH([gnu-ld],
+    [AS_HELP_STRING([--with-gnu-ld],
+	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
+    [test "$withval" = no || with_gnu_ld=yes],
+    [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  AC_MSG_CHECKING([for ld used by $CC])
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [[\\/]]* | ?:[[\\/]]*)
+      re_direlt='/[[^/]][[^/]]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  AC_MSG_CHECKING([for GNU ld])
+else
+  AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
+	;;
+      *)
+	test "$with_gnu_ld" != yes && break
+	;;
+      esac
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  AC_MSG_RESULT($LD)
+else
+  AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+#   -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+  lt_cv_ld_reload_flag,
+  [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    if test "$GCC" != yes; then
+      reload_cmds=false
+    fi
+    ;;
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
+_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_TAGDECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+#  -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi[[45]]*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin*)
+  # func_win32_libid is a shell function defined in ltmain.sh
+  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+  lt_cv_file_magic_cmd='func_win32_libid'
+  ;;
+
+mingw* | pw32*)
+  # Base MSYS/MinGW do not provide the 'file' command needed by
+  # func_win32_libid shell function, so use a weaker test based on 'objdump',
+  # unless we find 'file', for example because we are cross-compiling.
+  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
+  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+    lt_cv_file_magic_cmd='func_win32_libid'
+  else
+    # Keep this pattern in sync with the one in func_win32_libid.
+    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
+
+cegcc*)
+  # use the weaker test based on 'objdump'. See mingw*.
+  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+freebsd* | dragonfly*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+haiku*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20* | hpux11*)
+  lt_cv_file_magic_cmd=/usr/bin/file
+  case $host_cpu in
+  ia64*)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+    ;;
+  hppa*64*)
+    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    ;;
+  *)
+    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
+    lt_cv_file_magic_test_file=/usr/lib/libc.sl
+    ;;
+  esac
+  ;;
+
+interix[[3-9]]*)
+  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $LD in
+  *-32|*"-32 ") libmagic=32-bit;;
+  *-n32|*"-n32 ") libmagic=N32;;
+  *-64|*"-64 ") libmagic=64-bit;;
+  *) libmagic=never-match;;
+  esac
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+  fi
+  ;;
+
+newos6*)
+  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+*nto* | *qnx*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+openbsd*)
+  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  fi
+  ;;
+
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.3*)
+  case $host_vendor in
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  sequent)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+    ;;
+  sni)
+    lt_cv_file_magic_cmd='/bin/file'
+    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+    lt_cv_file_magic_test_file=/lib/libc.so
+    ;;
+  siemens)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  pc)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  esac
+  ;;
+
+tpf*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
+])
+
+file_magic_glob=
+want_nocaseglob=no
+if test "$build" = "$host"; then
+  case $host_os in
+  mingw* | pw32*)
+    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
+      want_nocaseglob=yes
+    else
+      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
+    fi
+    ;;
+  esac
+fi
+
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+_LT_DECL([], [deplibs_check_method], [1],
+    [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+    [Command to use when deplibs_check_method = "file_magic"])
+_LT_DECL([], [file_magic_glob], [1],
+    [How to find potential files when deplibs_check_method = "file_magic"])
+_LT_DECL([], [want_nocaseglob], [1],
+    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
+
+
+# LT_PATH_NM
+# ----------
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+[if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  lt_nm_to_check="${ac_tool_prefix}nm"
+  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+    lt_nm_to_check="$lt_nm_to_check nm"
+  fi
+  for lt_tmp_nm in $lt_nm_to_check; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+      IFS="$lt_save_ifs"
+      test -z "$ac_dir" && ac_dir=.
+      tmp_nm="$ac_dir/$lt_tmp_nm"
+      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+	# Check to see if the nm accepts a BSD-compat flag.
+	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
+	#   nm: unknown option "B" ignored
+	# Tru64's nm complains that /dev/null is an invalid object file
+	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+	*/dev/null* | *'Invalid file or object type'*)
+	  lt_cv_path_NM="$tmp_nm -B"
+	  break
+	  ;;
+	*)
+	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+	  */dev/null*)
+	    lt_cv_path_NM="$tmp_nm -p"
+	    break
+	    ;;
+	  *)
+	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	    continue # so that we can try to find one that supports BSD flags
+	    ;;
+	  esac
+	  ;;
+	esac
+      fi
+    done
+    IFS="$lt_save_ifs"
+  done
+  : ${lt_cv_path_NM=no}
+fi])
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
+else
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  if test -n "$DUMPBIN"; then :
+    # Let the user override the test.
+  else
+    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
+    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+    *COFF*)
+      DUMPBIN="$DUMPBIN -symbols"
+      ;;
+    *)
+      DUMPBIN=:
+      ;;
+    esac
+  fi
+  AC_SUBST([DUMPBIN])
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
+  fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+  [lt_cv_nm_interface="BSD nm"
+  echo "int some_variable = 0;" > conftest.$ac_ext
+  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
+  cat conftest.out >&AS_MESSAGE_LOG_FD
+  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+    lt_cv_nm_interface="MS dumpbin"
+  fi
+  rm -f conftest*])
+])# LT_PATH_NM
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
+
+# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+# --------------------------------
+# how to determine the name of the shared library
+# associated with a specific link library.
+#  -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+m4_require([_LT_DECL_DLLTOOL])
+AC_CACHE_CHECK([how to associate runtime and link libraries],
+lt_cv_sharedlib_from_linklib_cmd,
+[lt_cv_sharedlib_from_linklib_cmd='unknown'
+
+case $host_os in
+cygwin* | mingw* | pw32* | cegcc*)
+  # two different shell functions defined in ltmain.sh
+  # decide which to use based on capabilities of $DLLTOOL
+  case `$DLLTOOL --help 2>&1` in
+  *--identify-strict*)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
+    ;;
+  *)
+    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
+    ;;
+  esac
+  ;;
+*)
+  # fallback: assume linklib IS sharedlib
+  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+  ;;
+esac
+])
+sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
+test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
+
+_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
+    [Command to associate shared and link libraries])
+])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
+
+
+# _LT_PATH_MANIFEST_TOOL
+# ----------------------
+# locate the manifest tool
+m4_defun([_LT_PATH_MANIFEST_TOOL],
+[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
+test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
+AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
+  [lt_cv_path_mainfest_tool=no
+  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
+  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
+    lt_cv_path_mainfest_tool=yes
+  fi
+  rm -f conftest*])
+if test "x$lt_cv_path_mainfest_tool" != xyes; then
+  MANIFEST_TOOL=:
+fi
+_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
+])# _LT_PATH_MANIFEST_TOOL
+
+
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
+  # These system don't have libm, or don't need it
+  ;;
+*-ncr-sysv4.3*)
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+  ;;
+*)
+  AC_CHECK_LIB(m, cos, LIBM="-lm")
+  ;;
+esac
+AC_SUBST([LIBM])
+])# LT_LIB_M
+
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
+
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+  case $cc_basename in
+  nvcc*)
+    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
+  *)
+    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
+  esac
+
+  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+    lt_cv_prog_compiler_rtti_exceptions,
+    [-fno-rtti -fno-exceptions], [],
+    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+	[Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
+
+
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+  symcode='[[BCDT]]'
+  ;;
+cygwin* | mingw* | pw32* | cegcc*)
+  symcode='[[ABCDGISTW]]'
+  ;;
+hpux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDEGRST]]'
+  fi
+  ;;
+irix* | nonstopux*)
+  symcode='[[BCDEGRST]]'
+  ;;
+osf*)
+  symcode='[[BCDEGQRST]]'
+  ;;
+solaris*)
+  symcode='[[BDRT]]'
+  ;;
+sco3.2v5*)
+  symcode='[[DT]]'
+  ;;
+sysv4.2uw2*)
+  symcode='[[DT]]'
+  ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+  symcode='[[ABDT]]'
+  ;;
+sysv4)
+  symcode='[[DFNSTU]]'
+  ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+  ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+  # Write the raw and C identifiers.
+  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+    # Fake it for dumpbin and say T for any non-static function
+    # and D for any global variable.
+    # Also find C++ and __fastcall symbols from MSVC++,
+    # which start with @ or ?.
+    lt_cv_sys_global_symbol_pipe="$AWK ['"\
+"     {last_section=section; section=\$ 3};"\
+"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+"     \$ 0!~/External *\|/{next};"\
+"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+"     {if(hide[section]) next};"\
+"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
+"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+"     ' prfx=^$ac_symprfx]"
+  else
+    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+  fi
+  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
+
+  # Check to see that the pipe works correctly.
+  pipe_works=no
+
+  rm -f conftest*
+  cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+  if AC_TRY_EVAL(ac_compile); then
+    # Now try to grab the symbols.
+    nlist=conftest.nm
+    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
+      # Try sorting and uniquifying the output.
+      if sort "$nlist" | uniq > "$nlist"T; then
+	mv -f "$nlist"T "$nlist"
+      else
+	rm -f "$nlist"T
+      fi
+
+      # Make sure that we snagged all the symbols we need.
+      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<_LT_EOF > conftest.$ac_ext
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT@&t at _DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT@&t at _DLSYM_CONST
+#else
+# define LT@&t at _DLSYM_CONST const
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+	  # Now generate the symbol file.
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+	  cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols.  */
+LT@&t at _DLSYM_CONST struct {
+  const char *name;
+  void       *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+  { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+	  cat <<\_LT_EOF >> conftest.$ac_ext
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_globsym_save_LIBS=$LIBS
+	  lt_globsym_save_CFLAGS=$CFLAGS
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS=$lt_globsym_save_LIBS
+	  CFLAGS=$lt_globsym_save_CFLAGS
+	else
+	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+    fi
+  else
+    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+    cat conftest.$ac_ext >&5
+  fi
+  rm -rf conftest* conftst*
+
+  # Do not use the global_symbol_pipe unless it works.
+  if test "$pipe_works" = yes; then
+    break
+  else
+    lt_cv_sys_global_symbol_pipe=
+  fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+  lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+  AC_MSG_RESULT(failed)
+else
+  AC_MSG_RESULT(ok)
+fi
+
+# Response file support.
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+  nm_file_list_spec='@'
+elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
+  nm_file_list_spec='@'
+fi
+
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+    [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+    [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_c_name_address],
+    [lt_cv_sys_global_symbol_to_c_name_address], [1],
+    [Transform the output of nm in a C name address pair])
+_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+    [Transform the output of nm in a C name address pair when lib prefix is needed])
+_LT_DECL([], [nm_file_list_spec], [1],
+    [Specify filename containing input files for $NM])
+]) # _LT_CMD_GLOBAL_SYMBOLS
+
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+m4_if([$1], [CXX], [
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+    mingw* | cygwin* | os2* | pw32* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      m4_if([$1], [GCJ], [],
+	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+      ;;
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)=
+      ;;
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+    *qnx* | *nto*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+    *)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    case $host_os in
+      aix[[4-9]]*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	else
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+	fi
+	;;
+      chorus*)
+	case $cc_basename in
+	cxch68*)
+	  # Green Hills C++ Compiler
+	  # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+      mingw* | cygwin* | os2* | pw32* | cegcc*)
+	# This hack is so that the source file can tell whether it is being
+	# built for inclusion in a dll (and should export symbols for example).
+	m4_if([$1], [GCJ], [],
+	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+	;;
+      dgux*)
+	case $cc_basename in
+	  ec++*)
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+	    if test "$host_cpu" != ia64; then
+	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	    fi
+	    ;;
+	  aCC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+	    case $host_cpu in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      interix*)
+	# This is c89, which is MS Visual C++ (no shared libs)
+	# Anyone wants to do a port?
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    ;;
+	  ecpc* )
+	    # old Intel C++ for x86_64 which still supported -KPIC.
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	    ;;
+	  icpc* )
+	    # Intel C++, used to be incompatible with GCC.
+	    # ICC 10 doesn't accept -KPIC any more.
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+	    ;;
+	  pgCC* | pgcpp*)
+	    # Portland Group C++ compiler
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  cxx*)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
+	    # IBM XL 8.0, 9.0 on PPC and BlueGene
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd*)
+	;;
+      *qnx* | *nto*)
+        # QNX uses GNU C++, but need to define -shared option too, otherwise
+        # it will coredump.
+        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+        ;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC* | sunCC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+	    ;;
+	  gcx*)
+	    # Green Hills C++ Compiler
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      vxworks*)
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+	;;
+    esac
+  fi
+],
+[
+  if test "$GCC" = yes; then
+    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+        ;;
+      m68k)
+            # FIXME: we need at least 68020 code to build shared libraries, but
+            # adding the `-m68020' flag to GCC prevents building anything better,
+            # like `-m68040'.
+            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
+
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      m4_if([$1], [GCJ], [],
+	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+      ;;
+
+    haiku*)
+      # PIC is the default for Haiku.
+      # The "-static" flag exists, but is broken.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)=
+      ;;
+
+    hpux*)
+      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
+      # sets the default TLS model and affects inlining.
+      case $host_cpu in
+      hppa*64*)
+	# +Z the default
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	;;
+      esac
+      ;;
+
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
+
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      enable_shared=no
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
+
+    *)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+
+    case $cc_basename in
+    nvcc*) # Cuda Compiler Driver 2.2
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      else
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
+
+    mingw* | cygwin* | pw32* | os2* | cegcc*)
+      # This hack is so that the source file can tell whether it is being
+      # built for inclusion in a dll (and should export symbols for example).
+      m4_if([$1], [GCJ], [],
+	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+      ;;
+
+    hpux9* | hpux10* | hpux11*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # PIC (with -KPIC) is the default.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    linux* | k*bsd*-gnu | kopensolaris*-gnu)
+      case $cc_basename in
+      # old Intel for x86_64 which still supported -KPIC.
+      ecc*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+	;;
+      nagfor*)
+	# NAG Fortran compiler
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+        ;;
+      ccc*)
+        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+        # All Alpha code is PIC.
+        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+        ;;
+      xl* | bgxl* | bgf* | mpixl*)
+	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+	;;
+      *)
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ F* | *Sun*Fortran*)
+	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+	  ;;
+	*Sun\ C*)
+	  # Sun C 5.9
+	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+	  ;;
+	esac
+	;;
+      esac
+      ;;
+
+    newsos6)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+      ;;
+
+    osf3* | osf4* | osf5*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      # All OSF/1 code is PIC.
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    rdos*)
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
+
+    solaris*)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      fi
+      ;;
+
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    unicos*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+
+    uts4*)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
+
+    *)
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
+    esac
+  fi
+])
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+    ;;
+  *)
+    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t at m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+    ;;
+esac
+
+AC_CACHE_CHECK([for $compiler option to produce PIC],
+  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
+  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t at m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+     "" | " "*) ;;
+     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+     esac],
+    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+	[Additional compiler flags for building library objects])
+
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+	[How to pass a linker flag through the compiler])
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+  $lt_tmp_static_flag,
+  [],
+  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+	[Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
+
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+  case $host_os in
+  aix[[4-9]]*)
+    # If we're using GNU nm, then we don't want the "-C" option.
+    # -C means demangle to AIX nm, but means don't demangle with GNU nm
+    # Also, AIX nm treats weak defined symbols like other global defined
+    # symbols, whereas GNU nm marks them as "W".
+    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    else
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    fi
+    ;;
+  pw32*)
+    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+    ;;
+  cygwin* | mingw* | cegcc*)
+    case $cc_basename in
+    cl*) ;;
+    *)
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+      ;;
+    esac
+    ;;
+  *)
+    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+    ;;
+  esac
+], [
+  runpath_var=
+  _LT_TAGVAR(allow_undefined_flag, $1)=
+  _LT_TAGVAR(always_export_symbols, $1)=no
+  _LT_TAGVAR(archive_cmds, $1)=
+  _LT_TAGVAR(archive_expsym_cmds, $1)=
+  _LT_TAGVAR(compiler_needs_object, $1)=no
+  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  _LT_TAGVAR(hardcode_automatic, $1)=no
+  _LT_TAGVAR(hardcode_direct, $1)=no
+  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+  _LT_TAGVAR(hardcode_libdir_separator, $1)=
+  _LT_TAGVAR(hardcode_minus_L, $1)=no
+  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+  _LT_TAGVAR(inherit_rpath, $1)=no
+  _LT_TAGVAR(link_all_deplibs, $1)=unknown
+  _LT_TAGVAR(module_cmds, $1)=
+  _LT_TAGVAR(module_expsym_cmds, $1)=
+  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+  _LT_TAGVAR(thread_safe_flag_spec, $1)=
+  _LT_TAGVAR(whole_archive_flag_spec, $1)=
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  _LT_TAGVAR(include_expsyms, $1)=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+  # platforms (ab)use it in PIC code, but their linkers get confused if
+  # the symbol is explicitly referenced.  Since portable code cannot
+  # rely on this symbol name, it's probably fine to never include it in
+  # preloaded symbol tables.
+  # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
+  extract_expsyms_cmds=
+
+  case $host_os in
+  cygwin* | mingw* | pw32* | cegcc*)
+    # FIXME: the MSVC++ port hasn't been tested in a loooong time
+    # When not using gcc, we currently assume that we are using
+    # Microsoft Visual C++.
+    if test "$GCC" != yes; then
+      with_gnu_ld=no
+    fi
+    ;;
+  interix*)
+    # we just hope/assume this is gcc and not c89 (= MSVC++)
+    with_gnu_ld=yes
+    ;;
+  openbsd*)
+    with_gnu_ld=no
+    ;;
+  esac
+
+  _LT_TAGVAR(ld_shlibs, $1)=yes
+
+  # On some targets, GNU ld is compatible enough with the native linker
+  # that we're better off using the native interface for both.
+  lt_use_gnu_ld_interface=no
+  if test "$with_gnu_ld" = yes; then
+    case $host_os in
+      aix*)
+	# The AIX port of GNU ld has always aspired to compatibility
+	# with the native linker.  However, as the warning in the GNU ld
+	# block says, versions before 2.19.5* couldn't really create working
+	# shared libraries, regardless of the interface used.
+	case `$LD -v 2>&1` in
+	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
+	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
+	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
+	  *)
+	    lt_use_gnu_ld_interface=yes
+	    ;;
+	esac
+	;;
+      *)
+	lt_use_gnu_ld_interface=yes
+	;;
+    esac
+  fi
+
+  if test "$lt_use_gnu_ld_interface" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
+
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      _LT_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&1` in
+      *GNU\ gold*) supports_anon_versioning=yes ;;
+      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
+
+    # See if GNU ld supports shared libraries.
+    case $host_os in
+    aix[[3-9]]*)
+      # On AIX/PPC, the GNU linker is very broken
+      if test "$host_cpu" != ia64; then
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.19, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to install binutils
+*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
+*** You will then need to restart the configuration process.
+
+_LT_EOF
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_expsym_cmds, $1)=''
+        ;;
+      m68k)
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes
+        ;;
+      esac
+      ;;
+
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+      # as there is no search path for DLLs.
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(always_export_symbols, $1)=no
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
+
+      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    haiku*)
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    interix[[3-9]]*)
+      _LT_TAGVAR(hardcode_direct, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
+
+    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+      tmp_diet=no
+      if test "$host_os" = linux-dietlibc; then
+	case $cc_basename in
+	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
+	esac
+      fi
+      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+	 && test "$tmp_diet" = no
+      then
+	tmp_addflag=' $pic_flag'
+	tmp_sharedflag='-shared'
+	case $cc_basename,$host_cpu in
+        pgcc*)				# Portland Group C compiler
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95* | pgfortran*)
+					# Portland Group f77 and f90 compilers
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	lf95*)				# Lahey Fortran 8.1
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
+	  tmp_sharedflag='--shared' ;;
+	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+	  tmp_sharedflag='-qmkshrobj'
+	  tmp_addflag= ;;
+	nvcc*)	# Cuda Compiler Driver 2.2
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  _LT_TAGVAR(compiler_needs_object, $1)=yes
+	  ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	  _LT_TAGVAR(compiler_needs_object, $1)=yes
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	esac
+	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+        if test "x$supports_anon_versioning" = xyes; then
+          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	    echo "local: *; };" >> $output_objdir/$libname.ver~
+	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+        fi
+
+	case $cc_basename in
+	xlf* | bgf* | bgxlf* | mpixlf*)
+	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
+	  if test "x$supports_anon_versioning" = xyes; then
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	      echo "local: *; };" >> $output_objdir/$libname.ver~
+	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	  fi
+	  ;;
+	esac
+      else
+        _LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
+
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems.  Therefore, libtool
+*** is disabling shared libraries support.  We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+	;;
+	*)
+	  # For security reasons, it is highly recommended that you always
+	  # use absolute paths for naming shared libraries, and exclude the
+	  # DT_RUNPATH tag from executables and libraries.  But doing so
+	  # requires that you compile everything twice, which is a pain.
+	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  else
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	  fi
+	;;
+      esac
+      ;;
+
+    sunos4*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+    esac
+
+    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+      runpath_var=
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+      _LT_TAGVAR(whole_archive_flag_spec, $1)=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(always_export_symbols, $1)=yes
+      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	_LT_TAGVAR(hardcode_direct, $1)=unsupported
+      fi
+      ;;
+
+    aix[[4-9]]*)
+      if test "$host_cpu" = ia64; then
+	# On IA64, the linker does run time linking by default, so we don't
+	# have to do anything special.
+	aix_use_runtimelinking=no
+	exp_sym_flag='-Bexport'
+	no_entry_flag=""
+      else
+	# If we're using GNU nm, then we don't want the "-C" option.
+	# -C means demangle to AIX nm, but means don't demangle with GNU nm
+	# Also, AIX nm treats weak defined symbols like other global
+	# defined symbols, whereas GNU nm marks them as "W".
+	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	else
+	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
+
+	# Test if we are trying to use run time linking or normal
+	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
+	# need to do runtime linking.
+	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+	  for ld_flag in $LDFLAGS; do
+	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+	    aix_use_runtimelinking=yes
+	    break
+	  fi
+	  done
+	  ;;
+	esac
+
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
+
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+      _LT_TAGVAR(archive_cmds, $1)=''
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[[012]]|aix4.[[012]].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	  # We have reworked collect2
+	  :
+	  else
+	  # We have old collect2
+	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
+	fi
+      else
+	# not using gcc
+	if test "$host_cpu" = ia64; then
+	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	# chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+	else
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
+	fi
+      fi
+
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+      # It seems that -bexpall does not export symbols beginning with
+      # underscore (_), so it is better to generate a list of symbols to export.
+      _LT_TAGVAR(always_export_symbols, $1)=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        _LT_SYS_MODULE_PATH_AIX([$1])
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
+	if test "$host_cpu" = ia64; then
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an
+	 # empty executable.
+	 _LT_SYS_MODULE_PATH_AIX([$1])
+	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	  if test "$with_gnu_ld" = yes; then
+	    # We only use this code for GNU lds that support --whole-archive.
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	  else
+	    # Exported symbols can be pulled into shared objects from archives
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	  fi
+	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
+      fi
+      ;;
+
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            _LT_TAGVAR(archive_expsym_cmds, $1)=''
+        ;;
+      m68k)
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes
+        ;;
+      esac
+      ;;
+
+    bsdi[[45]]*)
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+      ;;
+
+    cygwin* | mingw* | pw32* | cegcc*)
+      # When not using gcc, we currently assume that we are using
+      # Microsoft Visual C++.
+      # hardcode_libdir_flag_spec is actually meaningless, as there is
+      # no search path for DLLs.
+      case $cc_basename in
+      cl*)
+	# Native MSVC
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	_LT_TAGVAR(always_export_symbols, $1)=yes
+	_LT_TAGVAR(file_list_spec, $1)='@'
+	# Tell ltmain to make .lib files, not .a files.
+	libext=lib
+	# Tell ltmain to make .dll files, not .so files.
+	shrext_cmds=".dll"
+	# FIXME: Setting linknames here is a bad hack.
+	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	  else
+	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	  fi~
+	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	  linknames='
+	# The linker will not automatically build a static lib if we build a DLL.
+	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+	# Don't use ranlib
+	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+	  lt_tool_outputfile="@TOOL_OUTPUT@"~
+	  case $lt_outputfile in
+	    *.exe|*.EXE) ;;
+	    *)
+	      lt_outputfile="$lt_outputfile.exe"
+	      lt_tool_outputfile="$lt_tool_outputfile.exe"
+	      ;;
+	  esac~
+	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+	    $RM "$lt_outputfile.manifest";
+	  fi'
+	;;
+      *)
+	# Assume MSVC wrapper
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	# Tell ltmain to make .lib files, not .a files.
+	libext=lib
+	# Tell ltmain to make .dll files, not .so files.
+	shrext_cmds=".dll"
+	# FIXME: Setting linknames here is a bad hack.
+	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
+	# The linker will automatically build a .lib file if we build a DLL.
+	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+	# FIXME: Should let the user specify the lib program.
+	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	;;
+      esac
+      ;;
+
+    darwin* | rhapsody*)
+      _LT_DARWIN_LINKER_FEATURES($1)
+      ;;
+
+    dgux*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    freebsd1*)
+      _LT_TAGVAR(ld_shlibs, $1)=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+      ;;
+
+    hpux10*)
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
+	_LT_TAGVAR(hardcode_direct, $1)=yes
+	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	_LT_TAGVAR(hardcode_minus_L, $1)=yes
+      fi
+      ;;
+
+    hpux11*)
+      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	m4_if($1, [], [
+	  # Older versions of the 11.00 compiler do not understand -b yet
+	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
+	  _LT_LINKER_OPTION([if $CC understands -b],
+	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
+	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
+	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
+	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  _LT_TAGVAR(hardcode_direct, $1)=no
+	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	  ;;
+	*)
+	  _LT_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
+	  ;;
+	esac
+      fi
+      ;;
+
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	# Try to use the -exported_symbol ld option, if it does not
+	# work, assume that -exports_file does not work either and
+	# implicitly export all symbols.
+	# This should be the same for all languages, so no per-tag cache variable.
+	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
+	  [lt_cv_irix_exported_symbol],
+	  [save_LDFLAGS="$LDFLAGS"
+	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+	   AC_LINK_IFELSE(
+	     [AC_LANG_SOURCE(
+	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
+			      [C++], [[int foo (void) { return 0; }]],
+			      [Fortran 77], [[
+      subroutine foo
+      end]],
+			      [Fortran], [[
+      subroutine foo
+      end]])])],
+	      [lt_cv_irix_exported_symbol=yes],
+	      [lt_cv_irix_exported_symbol=no])
+           LDFLAGS="$save_LDFLAGS"])
+	if test "$lt_cv_irix_exported_symbol" = yes; then
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+	fi
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(inherit_rpath, $1)=yes
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    newsos6)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *nto* | *qnx*)
+      ;;
+
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	_LT_TAGVAR(hardcode_direct, $1)=yes
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	     ;;
+	   *)
+	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+	fi
+      else
+	_LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
+
+    os2*)
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
+
+    osf3*)
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+      else
+	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+	# Both c and cxx compiler support -rpath directly
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+      fi
+      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+      ;;
+
+    solaris*)
+      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+      else
+	case `$CC -V 2>&1` in
+	*"Compilers 5.0"*)
+	  wlarc=''
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+	  ;;
+	*)
+	  wlarc='${wl}'
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+	  ;;
+	esac
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      case $host_os in
+      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+      *)
+	# The compiler driver will combine and reorder linker options,
+	# but understands `-z linker_flag'.  GCC discards it without `$wl',
+	# but is careful enough not to reorder.
+	# Supported since Solaris 2.6 (maybe 2.5.1?)
+	if test "$GCC" = yes; then
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_direct, $1)=yes
+      _LT_TAGVAR(hardcode_minus_L, $1)=yes
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+	  _LT_TAGVAR(hardcode_direct, $1)=no
+        ;;
+	motorola)
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    sysv4.3*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+      ;;
+
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	_LT_TAGVAR(ld_shlibs, $1)=yes
+      fi
+      ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+      _LT_TAGVAR(link_all_deplibs, $1)=yes
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
+
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
+
+    uts4*)
+      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      ;;
+
+    *)
+      _LT_TAGVAR(ld_shlibs, $1)=no
+      ;;
+    esac
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+	;;
+      esac
+    fi
+  fi
+])
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+    [The commands to extract the exported symbol list from a shared archive])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+  # Assume -lc should be added
+  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $_LT_TAGVAR(archive_cmds, $1) in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
+	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
+	[$RM conftest*
+	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+	  soname=conftest
+	  lib=conftest
+	  libobjs=conftest.$ac_objext
+	  deplibs=
+	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+	  compiler_flags=-v
+	  linker_flags=-v
+	  verstring=
+	  output_objdir=.
+	  libname=conftest
+	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+	  _LT_TAGVAR(allow_undefined_flag, $1)=
+	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+	  then
+	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+	  else
+	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+	  fi
+	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+	else
+	  cat conftest.err 1>&5
+	fi
+	$RM conftest*
+	])
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
+      ;;
+    esac
+  fi
+  ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+    [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+    [enable_shared_with_static_runtimes], [0],
+    [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+    [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+    [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+    [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+    [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+    [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+    [Commands used to build a loadable module if different from building
+    a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+    [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+    [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+    [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+    [Flag to hardcode $libdir into a binary during linking.
+    This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
+    [[If ld is used when linking, flag to hardcode $libdir into a binary
+    during linking.  This must work even if $libdir does not exist]])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+    [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+    DIR into the resulting binary and the resulting library dependency is
+    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+    library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+    into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+    into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+    [Set to "yes" if building a shared library automatically hardcodes DIR
+    into the library and all subsequent libraries and executables linked
+    against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+    [Set to yes if linker adds runtime paths of dependent libraries
+    to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+    [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [always_export_symbols], [0],
+    [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+    [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+    [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+    [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+    [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [postlink_cmds], [2],
+    [Commands necessary for finishing linking programs])
+_LT_TAGDECL([], [file_list_spec], [1],
+    [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl    [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined.  These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_SYS_DYNAMIC_LINKER($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+  LT_SYS_DLOPEN_SELF
+  _LT_CMD_STRIPLIB
+
+  # Report which library types will actually be built
+  AC_MSG_CHECKING([if libtool supports shared libraries])
+  AC_MSG_RESULT([$can_build_shared])
+
+  AC_MSG_CHECKING([whether to build shared libraries])
+  test "$can_build_shared" = "no" && enable_shared=no
+
+  # On AIX, shared libraries and static libraries use the same namespace, and
+  # are all built from PIC.
+  case $host_os in
+  aix3*)
+    test "$enable_shared" = yes && enable_static=no
+    if test -n "$RANLIB"; then
+      archive_cmds="$archive_cmds~\$RANLIB \$lib"
+      postinstall_cmds='$RANLIB $lib'
+    fi
+    ;;
+
+  aix[[4-9]]*)
+    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+      test "$enable_shared" = yes && enable_static=no
+    fi
+    ;;
+  esac
+  AC_MSG_RESULT([$enable_shared])
+
+  AC_MSG_CHECKING([whether to build static libraries])
+  # Make sure either enable_shared or enable_static is yes.
+  test "$enable_shared" = yes || enable_static=yes
+  AC_MSG_RESULT([$enable_static])
+
+  _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined.  These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PATH_MANIFEST_TOOL])dnl
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  AC_PROG_CXXCPP
+else
+  _lt_caught_CXX_error=yes
+fi
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="int some_variable = 0;"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  _LT_TAG_COMPILER
+
+  # save warnings/boilerplate of simple test code
+  _LT_COMPILER_BOILERPLATE
+  _LT_LINKER_BOILERPLATE
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC=$CC
+  lt_save_CFLAGS=$CFLAGS
+  lt_save_LD=$LD
+  lt_save_GCC=$GCC
+  GCC=$GXX
+  lt_save_with_gnu_ld=$with_gnu_ld
+  lt_save_path_LD=$lt_cv_path_LD
+  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+  else
+    $as_unset lt_cv_prog_gnu_ld
+  fi
+  if test -n "${lt_cv_path_LDCXX+set}"; then
+    lt_cv_path_LD=$lt_cv_path_LDCXX
+  else
+    $as_unset lt_cv_path_LD
+  fi
+  test -z "${LDCXX+set}" || LD=$LDCXX
+  CC=${CXX-"c++"}
+  CFLAGS=$CXXFLAGS
+  compiler=$CC
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+
+  if test -n "$compiler"; then
+    # We don't want -fno-exception when compiling C++ code, so set the
+    # no_builtin_flag separately
+    if test "$GXX" = yes; then
+      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+    else
+      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+    fi
+
+    if test "$GXX" = yes; then
+      # Set up default GNU C++ configuration
+
+      LT_PATH_LD
+
+      # Check if GNU C++ uses GNU ld as the underlying linker, since the
+      # archiving commands below assume that GNU ld is being used.
+      if test "$with_gnu_ld" = yes; then
+        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+        # If archive_cmds runs LD, not CC, wlarc should be empty
+        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+        #     investigate it a little bit more. (MM)
+        wlarc='${wl}'
+
+        # ancient GNU ld didn't support --whole-archive et. al.
+        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+	  $GREP 'no-whole-archive' > /dev/null; then
+          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+        else
+          _LT_TAGVAR(whole_archive_flag_spec, $1)=
+        fi
+      else
+        with_gnu_ld=no
+        wlarc=
+
+        # A generic and very simple default shared library creation
+        # command for GNU C++ for the case where it uses the native
+        # linker, instead of GNU ld.  If possible, this setting should
+        # overridden to take advantage of the native linker features on
+        # the platform it is being used on.
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+      fi
+
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+    else
+      GXX=no
+      with_gnu_ld=no
+      wlarc=
+    fi
+
+    # PORTME: fill in a description of your system's C++ link characteristics
+    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+    _LT_TAGVAR(ld_shlibs, $1)=yes
+    case $host_os in
+      aix3*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+      aix[[4-9]]*)
+        if test "$host_cpu" = ia64; then
+          # On IA64, the linker does run time linking by default, so we don't
+          # have to do anything special.
+          aix_use_runtimelinking=no
+          exp_sym_flag='-Bexport'
+          no_entry_flag=""
+        else
+          aix_use_runtimelinking=no
+
+          # Test if we are trying to use run time linking or normal
+          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+          # need to do runtime linking.
+          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+	    for ld_flag in $LDFLAGS; do
+	      case $ld_flag in
+	      *-brtl*)
+	        aix_use_runtimelinking=yes
+	        break
+	        ;;
+	      esac
+	    done
+	    ;;
+          esac
+
+          exp_sym_flag='-bexport'
+          no_entry_flag='-bnoentry'
+        fi
+
+        # When large executables or shared objects are built, AIX ld can
+        # have problems creating the table of contents.  If linking a library
+        # or program results in "error TOC overflow" add -mminimal-toc to
+        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+        _LT_TAGVAR(archive_cmds, $1)=''
+        _LT_TAGVAR(hardcode_direct, $1)=yes
+        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+        _LT_TAGVAR(link_all_deplibs, $1)=yes
+        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+        if test "$GXX" = yes; then
+          case $host_os in aix4.[[012]]|aix4.[[012]].*)
+          # We only want to do this on AIX 4.2 and lower, the check
+          # below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
+	    # We have reworked collect2
+	    :
+	  else
+	    # We have old collect2
+	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
+	    # It fails to find uninstalled libraries when the uninstalled
+	    # path is not listed in the libpath.  Setting hardcode_minus_L
+	    # to unsupported forces relinking
+	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
+	  fi
+          esac
+          shared_flag='-shared'
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag="$shared_flag "'${wl}-G'
+	  fi
+        else
+          # not using gcc
+          if test "$host_cpu" = ia64; then
+	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	  # chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+          else
+	    if test "$aix_use_runtimelinking" = yes; then
+	      shared_flag='${wl}-G'
+	    else
+	      shared_flag='${wl}-bM:SRE'
+	    fi
+          fi
+        fi
+
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+        # It seems that -bexpall does not export symbols beginning with
+        # underscore (_), so it is better to generate a list of symbols to
+	# export.
+        _LT_TAGVAR(always_export_symbols, $1)=yes
+        if test "$aix_use_runtimelinking" = yes; then
+          # Warning - without using the other runtime loading flags (-brtl),
+          # -berok will link without error, but may produce a broken library.
+          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+          # Determine the default libpath from the value encoded in an empty
+          # executable.
+          _LT_SYS_MODULE_PATH_AIX([$1])
+          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        else
+          if test "$host_cpu" = ia64; then
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+          else
+	    # Determine the default libpath from the value encoded in an
+	    # empty executable.
+	    _LT_SYS_MODULE_PATH_AIX([$1])
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+	    # Warning - without using the other run time loading flags,
+	    # -berok will link without error, but may produce a broken library.
+	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+	    if test "$with_gnu_ld" = yes; then
+	      # We only use this code for GNU lds that support --whole-archive.
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    else
+	      # Exported symbols can be pulled into shared objects from archives
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	    fi
+	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+	    # This is similar to how AIX traditionally builds its shared
+	    # libraries.
+	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+          fi
+        fi
+        ;;
+
+      beos*)
+	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	  # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	  # support --undefined.  This deserves some investigation.  FIXME
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	else
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+
+      chorus*)
+        case $cc_basename in
+          *)
+	  # FIXME: insert proper C++ library support
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	  ;;
+        esac
+        ;;
+
+      cygwin* | mingw* | pw32* | cegcc*)
+	case $GXX,$cc_basename in
+	,cl* | no,cl*)
+	  # Native MSVC
+	  # hardcode_libdir_flag_spec is actually meaningless, as there is
+	  # no search path for DLLs.
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	  _LT_TAGVAR(always_export_symbols, $1)=yes
+	  _LT_TAGVAR(file_list_spec, $1)='@'
+	  # Tell ltmain to make .lib files, not .a files.
+	  libext=lib
+	  # Tell ltmain to make .dll files, not .so files.
+	  shrext_cmds=".dll"
+	  # FIXME: Setting linknames here is a bad hack.
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
+	    else
+	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
+	    fi~
+	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+	    linknames='
+	  # The linker will not automatically build a static lib if we build a DLL.
+	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+	  # Don't use ranlib
+	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
+	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
+	    lt_tool_outputfile="@TOOL_OUTPUT@"~
+	    case $lt_outputfile in
+	      *.exe|*.EXE) ;;
+	      *)
+		lt_outputfile="$lt_outputfile.exe"
+		lt_tool_outputfile="$lt_tool_outputfile.exe"
+		;;
+	    esac~
+	    func_to_tool_file "$lt_outputfile"~
+	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
+	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+	      $RM "$lt_outputfile.manifest";
+	    fi'
+	  ;;
+	*)
+	  # g++
+	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+	  # as there is no search path for DLLs.
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
+	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+	  _LT_TAGVAR(always_export_symbols, $1)=no
+	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	    # If the export-symbols file already is a .def file (1st line
+	    # is EXPORTS), use it as is; otherwise, prepend...
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	      cp $export_symbols $output_objdir/$soname.def;
+	    else
+	      echo EXPORTS > $output_objdir/$soname.def;
+	      cat $export_symbols >> $output_objdir/$soname.def;
+	    fi~
+	    $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	  else
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	  fi
+	  ;;
+	esac
+	;;
+      darwin* | rhapsody*)
+        _LT_DARWIN_LINKER_FEATURES($1)
+	;;
+
+      dgux*)
+        case $cc_basename in
+          ec++*)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          ghcx*)
+	    # Green Hills C++ Compiler
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
+
+      freebsd[[12]]*)
+        # C++ shared libraries reported to be fairly broken before
+	# switch to ELF
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      freebsd-elf*)
+        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+        ;;
+
+      freebsd* | dragonfly*)
+        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+        # conventions
+        _LT_TAGVAR(ld_shlibs, $1)=yes
+        ;;
+
+      gnu*)
+        ;;
+
+      haiku*)
+        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_TAGVAR(link_all_deplibs, $1)=yes
+        ;;
+
+      hpux9*)
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+        _LT_TAGVAR(hardcode_direct, $1)=yes
+        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+				             # but as the default
+				             # location of the library.
+
+        case $cc_basename in
+          CC*)
+            # FIXME: insert proper C++ library support
+            _LT_TAGVAR(ld_shlibs, $1)=no
+            ;;
+          aCC*)
+            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            # Commands to make compiler produce verbose output that lists
+            # what "hidden" libraries, object files and flags are used when
+            # linking a shared library.
+            #
+            # There doesn't appear to be a way to prevent this compiler from
+            # explicitly linking system object files so we need to strip them
+            # from the output so that they don't get included in the library
+            # dependencies.
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+            ;;
+          *)
+            if test "$GXX" = yes; then
+              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            else
+              # FIXME: insert proper C++ library support
+              _LT_TAGVAR(ld_shlibs, $1)=no
+            fi
+            ;;
+        esac
+        ;;
+
+      hpux10*|hpux11*)
+        if test $with_gnu_ld = no; then
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+          case $host_cpu in
+            hppa*64*|ia64*)
+              ;;
+            *)
+	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+              ;;
+          esac
+        fi
+        case $host_cpu in
+          hppa*64*|ia64*)
+            _LT_TAGVAR(hardcode_direct, $1)=no
+            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+            ;;
+          *)
+            _LT_TAGVAR(hardcode_direct, $1)=yes
+            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+					         # but as the default
+					         # location of the library.
+            ;;
+        esac
+
+        case $cc_basename in
+          CC*)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          aCC*)
+	    case $host_cpu in
+	      hppa*64*)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      ia64*)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      *)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	    esac
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test $with_gnu_ld = no; then
+	        case $host_cpu in
+	          hppa*64*)
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          ia64*)
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          *)
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	        esac
+	      fi
+	    else
+	      # FIXME: insert proper C++ library support
+	      _LT_TAGVAR(ld_shlibs, $1)=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      interix[[3-9]]*)
+	_LT_TAGVAR(hardcode_direct, $1)=no
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+	# Instead, shared libraries are loaded at an image base (0x10000000 by
+	# default) and relocated if they conflict, which is a slow very memory
+	# consuming and fragmenting process.  To avoid this, we pick a random,
+	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	;;
+      irix5* | irix6*)
+        case $cc_basename in
+          CC*)
+	    # SGI C++
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test "$with_gnu_ld" = no; then
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	      else
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
+	      fi
+	    fi
+	    _LT_TAGVAR(link_all_deplibs, $1)=yes
+	    ;;
+        esac
+        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+        _LT_TAGVAR(inherit_rpath, $1)=yes
+        ;;
+
+      linux* | k*bsd*-gnu | kopensolaris*-gnu)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+	    ;;
+	  icpc* | ecpc* )
+	    # Intel C++
+	    with_gnu_ld=yes
+	    # version 8.0 and above of icpc choke on multiply defined symbols
+	    # if we add $predep_objects and $postdep_objects, however 7.1 and
+	    # earlier do not add the objects themselves.
+	    case `$CC -V 2>&1` in
+	      *"Version 7."*)
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	      *)  # Version 8.0 or newer
+	        tmp_idyn=
+	        case $host_cpu in
+		  ia64*) tmp_idyn=' -i_dynamic';;
+		esac
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	    esac
+	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    ;;
+          pgCC* | pgcpp*)
+            # Portland Group C++ compiler
+	    case `$CC -V` in
+	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
+	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+		$RANLIB $oldlib'
+	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    *) # Version 6 and above use weak symbols
+	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    esac
+
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+            ;;
+	  cxx*)
+	    # Compaq C++
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+	    runpath_var=LD_RUN_PATH
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
+	    ;;
+	  xl* | mpixl* | bgxl*)
+	    # IBM XL 8.0 on PPC, with GNU ld
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    if test "x$supports_anon_versioning" = xyes; then
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+		echo "local: *; };" >> $output_objdir/$libname.ver~
+		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+	    fi
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+	      _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+	      # Not sure whether something based on
+	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+	      # would be better.
+	      output_verbose_link_cmd='func_echo_all'
+
+	      # Archives containing C++ object files must be created using
+	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	      # necessary to make sure instantiated templates are included
+	      # in the archive.
+	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+
+      lynxos*)
+        # FIXME: insert proper C++ library support
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	;;
+
+      m88k*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+	;;
+
+      mvs*)
+        case $cc_basename in
+          cxx*)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+	  *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+	esac
+	;;
+
+      netbsd*)
+        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+	  wlarc=
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	  _LT_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	fi
+	# Workaround some broken pre-1.5 toolchains
+	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+	;;
+
+      *nto* | *qnx*)
+        _LT_TAGVAR(ld_shlibs, $1)=yes
+	;;
+
+      openbsd2*)
+        # C++ shared libraries are fairly broken
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	;;
+
+      openbsd*)
+	if test -f /usr/libexec/ld.so; then
+	  _LT_TAGVAR(hardcode_direct, $1)=yes
+	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+	  fi
+	  output_verbose_link_cmd=func_echo_all
+	else
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+
+      osf3* | osf4* | osf5*)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	    # Archives containing C++ object files must be created using
+	    # the KAI C++ compiler.
+	    case $host in
+	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+	    esac
+	    ;;
+          RCC*)
+	    # Rational C++ 2.4.1
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          cxx*)
+	    case $host in
+	      osf3*)
+	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+		;;
+	      *)
+	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	          echo "-hidden">> $lib.exp~
+	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
+	          $RM $lib.exp'
+	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+		;;
+	    esac
+
+	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+	    ;;
+	  *)
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+	      case $host in
+	        osf3*)
+	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	        *)
+	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	      esac
+
+	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+	      # Commands to make compiler produce verbose output that lists
+	      # what "hidden" libraries, object files and flags are used when
+	      # linking a shared library.
+	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+
+	    else
+	      # FIXME: insert proper C++ library support
+	      _LT_TAGVAR(ld_shlibs, $1)=no
+	    fi
+	    ;;
+        esac
+        ;;
+
+      psos*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      sunos4*)
+        case $cc_basename in
+          CC*)
+	    # Sun C++ 4.x
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          lcc*)
+	    # Lucid
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
+
+      solaris*)
+        case $cc_basename in
+          CC* | sunCC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	    case $host_os in
+	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+	      *)
+		# The compiler driver will combine and reorder linker options,
+		# but understands `-z linker_flag'.
+	        # Supported since Solaris 2.6 (maybe 2.5.1?)
+		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+	        ;;
+	    esac
+	    _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+	    output_verbose_link_cmd='func_echo_all'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+	    ;;
+          gcx*)
+	    # Green Hills C++ Compiler
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+	    # The C++ compiler must be used to create the archive.
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    # GNU C++ compiler with Solaris linker
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+	      else
+	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	        # platform.
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+	      fi
+
+	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+	      case $host_os in
+		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+		*)
+		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+		  ;;
+	      esac
+	    fi
+	    ;;
+        esac
+        ;;
+
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+      runpath_var='LD_RUN_PATH'
+
+      case $cc_basename in
+        CC*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+      esac
+      ;;
+
+      sysv5* | sco3.2v5* | sco5v6*)
+	# Note: We can NOT use -z defs as we might desire, because we do not
+	# link with -lc, and that would cause any symbols used from libc to
+	# always be unresolved, which means just about no library would
+	# ever link correctly.  If we're not using GNU ld we use -z text
+	# though, which does catch some bad symbols but isn't as heavy-handed
+	# as -z defs.
+	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+	_LT_TAGVAR(link_all_deplibs, $1)=yes
+	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+	runpath_var='LD_RUN_PATH'
+
+	case $cc_basename in
+          CC*)
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
+	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
+	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
+	      '"$_LT_TAGVAR(reload_cmds, $1)"
+	    ;;
+	  *)
+	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    ;;
+	esac
+      ;;
+
+      tandem*)
+        case $cc_basename in
+          NCC*)
+	    # NonStop-UX NCC 3.20
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
+	    ;;
+        esac
+        ;;
+
+      vxworks*)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
+      *)
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+    esac
+
+    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+    _LT_TAGVAR(GCC, $1)="$GXX"
+    _LT_TAGVAR(LD, $1)="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    _LT_SYS_HIDDEN_LIBDEPS($1)
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
+  LDCXX=$LD
+  LD=$lt_save_LD
+  GCC=$lt_save_GCC
+  with_gnu_ld=$lt_save_with_gnu_ld
+  lt_cv_path_LDCXX=$lt_cv_path_LD
+  lt_cv_path_LD=$lt_save_path_LD
+  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
+
+# _LT_FUNC_STRIPNAME_CNF
+# ----------------------
+# func_stripname_cnf prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+#
+# This function is identical to the (non-XSI) version of func_stripname,
+# except this one can be used by m4 code that may be executed by configure,
+# rather than the libtool script.
+m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
+AC_REQUIRE([_LT_DECL_SED])
+AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
+func_stripname_cnf ()
+{
+  case ${2} in
+  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+  esac
+} # func_stripname_cnf
+])# _LT_FUNC_STRIPNAME_CNF
+
+# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
+# ---------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library.  It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+      subroutine foo
+      implicit none
+      integer*4 a
+      a=0
+      return
+      end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+      subroutine foo
+      implicit none
+      integer a
+      a=0
+      return
+      end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+  private int a;
+  public void bar (void) {
+    a = 0;
+  }
+};
+_LT_EOF
+])
+
+_lt_libdeps_save_CFLAGS=$CFLAGS
+case "$CC $CFLAGS " in #(
+*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
+*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
+esac
+
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
+
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
+
+  for p in `eval "$output_verbose_link_cmd"`; do
+    case ${prev}${p} in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" ||
+          test $p = "-R"; then
+	 prev=$p
+	 continue
+       fi
+
+       # Expand the sysroot to ease extracting the directories later.
+       if test -z "$prev"; then
+         case $p in
+         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
+         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
+         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
+         esac
+       fi
+       case $p in
+       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
+       esac
+       if test "$pre_test_object_deps_done" = no; then
+	 case ${prev} in
+	 -L | -R)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
+	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+	   else
+	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+	 else
+	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+	 fi
+       fi
+       prev=
+       ;;
+
+    *.lto.$objext) ;; # Ignore GCC LTO objects
+    *.$objext)
+       # This assumes that the test object file only shows up
+       # once in the compiler output.
+       if test "$p" = "conftest.$objext"; then
+	 pre_test_object_deps_done=yes
+	 continue
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+	   _LT_TAGVAR(predep_objects, $1)="$p"
+	 else
+	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+	 fi
+       else
+	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+	   _LT_TAGVAR(postdep_objects, $1)="$p"
+	 else
+	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+	 fi
+       fi
+       ;;
+
+    *) ;; # Ignore the rest.
+
+    esac
+  done
+
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$RM -f confest.$objext
+CFLAGS=$_lt_libdeps_save_CFLAGS
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+interix[[3-9]]*)
+  # Interix 3.5 installs completely hosed .la files for C++, so rather than
+  # hack all around it, let's just trust "g++" to DTRT.
+  _LT_TAGVAR(predep_objects,$1)=
+  _LT_TAGVAR(postdep_objects,$1)=
+  _LT_TAGVAR(postdeps,$1)=
+  ;;
+
+linux*)
+  case `$CC -V 2>&1 | sed 5q` in
+  *Sun\ C*)
+    # Sun C++ 5.9
+
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+
+solaris*)
+  case $cc_basename in
+  CC* | sunCC*)
+    # The more standards-conforming stlport4 library is
+    # incompatible with the Cstd library. Avoid specifying
+    # it if it's in CXXFLAGS. Ignore libCrun as
+    # -library=stlport4 depends on it.
+    case " $CXX $CXXFLAGS " in
+    *" -library=stlport4 "*)
+      solaris_use_stlport4=yes
+      ;;
+    esac
+
+    # Adding this requires a known-good setup of shared libraries for
+    # Sun compiler versions before 5.6, else PIC objects from an old
+    # archive will be linked into the output, leading to subtle bugs.
+    if test "$solaris_use_stlport4" != yes; then
+      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
+])
+
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+    [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+    [Dependencies to place before and after the objects being linked to
+    create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+    [The library search path used internally by the compiler when linking
+    a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_LANG_PUSH(Fortran 77)
+if test -z "$F77" || test "X$F77" = "Xno"; then
+  _lt_disable_F77=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_F77" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code="\
+      program t
+      end
+"
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  _LT_TAG_COMPILER
+
+  # save warnings/boilerplate of simple test code
+  _LT_COMPILER_BOILERPLATE
+  _LT_LINKER_BOILERPLATE
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC="$CC"
+  lt_save_GCC=$GCC
+  lt_save_CFLAGS=$CFLAGS
+  CC=${F77-"f77"}
+  CFLAGS=$FFLAGS
+  compiler=$CC
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+  GCC=$G77
+  if test -n "$compiler"; then
+    AC_MSG_CHECKING([if libtool supports shared libraries])
+    AC_MSG_RESULT([$can_build_shared])
+
+    AC_MSG_CHECKING([whether to build shared libraries])
+    test "$can_build_shared" = "no" && enable_shared=no
+
+    # On AIX, shared libraries and static libraries use the same namespace, and
+    # are all built from PIC.
+    case $host_os in
+      aix3*)
+        test "$enable_shared" = yes && enable_static=no
+        if test -n "$RANLIB"; then
+          archive_cmds="$archive_cmds~\$RANLIB \$lib"
+          postinstall_cmds='$RANLIB $lib'
+        fi
+        ;;
+      aix[[4-9]]*)
+	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+	  test "$enable_shared" = yes && enable_static=no
+	fi
+        ;;
+    esac
+    AC_MSG_RESULT([$enable_shared])
+
+    AC_MSG_CHECKING([whether to build static libraries])
+    # Make sure either enable_shared or enable_static is yes.
+    test "$enable_shared" = yes || enable_static=yes
+    AC_MSG_RESULT([$enable_static])
+
+    _LT_TAGVAR(GCC, $1)="$G77"
+    _LT_TAGVAR(LD, $1)="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  GCC=$lt_save_GCC
+  CC="$lt_save_CC"
+  CFLAGS="$lt_save_CFLAGS"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_LANG_PUSH(Fortran)
+
+if test -z "$FC" || test "X$FC" = "Xno"; then
+  _lt_disable_FC=yes
+fi
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working.  Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_FC" != yes; then
+  # Code to be used in simple compile tests
+  lt_simple_compile_test_code="\
+      subroutine t
+      return
+      end
+"
+
+  # Code to be used in simple link tests
+  lt_simple_link_test_code="\
+      program t
+      end
+"
+
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+  _LT_TAG_COMPILER
+
+  # save warnings/boilerplate of simple test code
+  _LT_COMPILER_BOILERPLATE
+  _LT_LINKER_BOILERPLATE
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC="$CC"
+  lt_save_GCC=$GCC
+  lt_save_CFLAGS=$CFLAGS
+  CC=${FC-"f95"}
+  CFLAGS=$FCFLAGS
+  compiler=$CC
+  GCC=$ac_cv_fc_compiler_gnu
+
+  _LT_TAGVAR(compiler, $1)=$CC
+  _LT_CC_BASENAME([$compiler])
+
+  if test -n "$compiler"; then
+    AC_MSG_CHECKING([if libtool supports shared libraries])
+    AC_MSG_RESULT([$can_build_shared])
+
+    AC_MSG_CHECKING([whether to build shared libraries])
+    test "$can_build_shared" = "no" && enable_shared=no
+
+    # On AIX, shared libraries and static libraries use the same namespace, and
+    # are all built from PIC.
+    case $host_os in
+      aix3*)
+        test "$enable_shared" = yes && enable_static=no
+        if test -n "$RANLIB"; then
+          archive_cmds="$archive_cmds~\$RANLIB \$lib"
+          postinstall_cmds='$RANLIB $lib'
+        fi
+        ;;
+      aix[[4-9]]*)
+	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+	  test "$enable_shared" = yes && enable_static=no
+	fi
+        ;;
+    esac
+    AC_MSG_RESULT([$enable_shared])
+
+    AC_MSG_CHECKING([whether to build static libraries])
+    # Make sure either enable_shared or enable_static is yes.
+    test "$enable_shared" = yes || enable_static=yes
+    AC_MSG_RESULT([$enable_static])
+
+    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+    _LT_TAGVAR(LD, $1)="$LD"
+
+    ## CAVEAT EMPTOR:
+    ## There is no encapsulation within the following macros, do not change
+    ## the running order or otherwise move them around unless you know exactly
+    ## what you are doing...
+    _LT_SYS_HIDDEN_LIBDEPS($1)
+    _LT_COMPILER_PIC($1)
+    _LT_COMPILER_C_O($1)
+    _LT_COMPILER_FILE_LOCKS($1)
+    _LT_LINKER_SHLIBS($1)
+    _LT_SYS_DYNAMIC_LINKER($1)
+    _LT_LINKER_HARDCODE_LIBPATH($1)
+
+    _LT_CONFIG($1)
+  fi # test -n "$compiler"
+
+  GCC=$lt_save_GCC
+  CC=$lt_save_CC
+  CFLAGS=$lt_save_CFLAGS
+fi # test "$_lt_disable_FC" != yes
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+CFLAGS=$GCJFLAGS
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(reload_flag, $1)=$reload_flag
+_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+  _LT_COMPILER_NO_RTTI($1)
+  _LT_COMPILER_PIC($1)
+  _LT_COMPILER_C_O($1)
+  _LT_COMPILER_FILE_LOCKS($1)
+  _LT_LINKER_SHLIBS($1)
+  _LT_LINKER_HARDCODE_LIBPATH($1)
+
+  _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined.  These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_CFLAGS=$CFLAGS
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+CFLAGS=
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+  :
+  _LT_CONFIG($1)
+fi
+
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC=$lt_save_CC
+CFLAGS=$lt_save_CFLAGS
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+    [AC_CHECK_TOOL(GCJ, gcj,)
+      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+      AC_SUBST(GCJFLAGS)])])[]dnl
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
+
+
+# _LT_DECL_OBJDUMP
+# --------------
+# If we don't have a new enough Autoconf to choose the best objdump
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_OBJDUMP],
+[AC_CHECK_TOOL(OBJDUMP, objdump, false)
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+AC_SUBST([OBJDUMP])
+])
+
+# _LT_DECL_DLLTOOL
+# ----------------
+# Ensure DLLTOOL variable is set.
+m4_defun([_LT_DECL_DLLTOOL],
+[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
+AC_SUBST([DLLTOOL])
+])
+
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible.  Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into   #
+#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
+#  a released version of Autoconf we should remove this    #
+#  macro and use it instead.                               #
+############################################################
+
+m4_defun([AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for lt_ac_prog in sed gsed; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+      fi
+    done
+  done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+  test ! -f $lt_ac_sed && continue
+  cat /dev/null > conftest.in
+  lt_ac_count=0
+  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+  # Check for GNU sed and select it if it is found.
+  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+    lt_cv_path_SED=$lt_ac_sed
+    break
+  fi
+  while true; do
+    cat conftest.in conftest.in >conftest.tmp
+    mv conftest.tmp conftest.in
+    cp conftest.in conftest.nl
+    echo >>conftest.nl
+    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+    cmp -s conftest.out conftest.nl || break
+    # 10000 chars as input seems more than enough
+    test $lt_ac_count -gt 10 && break
+    lt_ac_count=`expr $lt_ac_count + 1`
+    if test $lt_ac_count -gt $lt_ac_max; then
+      lt_ac_max=$lt_ac_count
+      lt_cv_path_SED=$lt_ac_sed
+    fi
+  done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,b/c, \
+    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+AC_MSG_RESULT([$xsi_shell])
+_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+
+AC_MSG_CHECKING([whether the shell understands "+="])
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+    >/dev/null 2>&1 \
+  && lt_shell_append=yes
+AC_MSG_RESULT([$lt_shell_append])
+_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  lt_unset=unset
+else
+  lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+  lt_SP2NL='tr \040 \012'
+  lt_NL2SP='tr \015\012 \040\040'
+  ;;
+ *) # EBCDIC based system
+  lt_SP2NL='tr \100 \n'
+  lt_NL2SP='tr \r\n \100\100'
+  ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
+# ------------------------------------------------------
+# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
+# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
+m4_defun([_LT_PROG_FUNCTION_REPLACE],
+[dnl {
+sed -e '/^$1 ()$/,/^} # $1 /c\
+$1 ()\
+{\
+m4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
+} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
+  && mv -f "$cfgfile.tmp" "$cfgfile" \
+    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+test 0 -eq $? || _lt_function_replace_fail=:
+])
+
+
+# _LT_PROG_REPLACE_SHELLFNS
+# -------------------------
+# Replace existing portable implementations of several shell functions with
+# equivalent extended shell implementations where those features are available..
+m4_defun([_LT_PROG_REPLACE_SHELLFNS],
+[if test x"$xsi_shell" = xyes; then
+  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
+    case ${1} in
+      */*) func_dirname_result="${1%/*}${2}" ;;
+      *  ) func_dirname_result="${3}" ;;
+    esac])
+
+  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
+    func_basename_result="${1##*/}"])
+
+  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
+    case ${1} in
+      */*) func_dirname_result="${1%/*}${2}" ;;
+      *  ) func_dirname_result="${3}" ;;
+    esac
+    func_basename_result="${1##*/}"])
+
+  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
+    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+    # positional parameters, so assign one to ordinary parameter first.
+    func_stripname_result=${3}
+    func_stripname_result=${func_stripname_result#"${1}"}
+    func_stripname_result=${func_stripname_result%"${2}"}])
+
+  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
+    func_split_long_opt_name=${1%%=*}
+    func_split_long_opt_arg=${1#*=}])
+
+  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
+    func_split_short_opt_arg=${1#??}
+    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
+
+  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
+    case ${1} in
+      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+      *)    func_lo2o_result=${1} ;;
+    esac])
+
+  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
+
+  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
+
+  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
+fi
+
+if test x"$lt_shell_append" = xyes; then
+  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
+
+  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
+    func_quote_for_eval "${2}"
+dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
+    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
+
+  # Save a `func_append' function call where possible by direct use of '+='
+  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+else
+  # Save a `func_append' function call even when '+=' is not available
+  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
+    && mv -f "$cfgfile.tmp" "$cfgfile" \
+      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
+  test 0 -eq $? || _lt_function_replace_fail=:
+fi
+
+if test x"$_lt_function_replace_fail" = x":"; then
+  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
+fi
+])
+
+# _LT_PATH_CONVERSION_FUNCTIONS
+# -----------------------------
+# Determine which file name conversion functions should be used by
+# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
+# for certain cross-compile configurations and native mingw.
+m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_MSG_CHECKING([how to convert $build file names to $host format])
+AC_CACHE_VAL(lt_cv_to_host_file_cmd,
+[case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
+        ;;
+    esac
+    ;;
+  *-*-cygwin* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
+        ;;
+      *-*-cygwin* )
+        lt_cv_to_host_file_cmd=func_convert_file_noop
+        ;;
+      * ) # otherwise, assume *nix
+        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
+        ;;
+    esac
+    ;;
+  * ) # unhandled hosts (and "normal" native builds)
+    lt_cv_to_host_file_cmd=func_convert_file_noop
+    ;;
+esac
+])
+to_host_file_cmd=$lt_cv_to_host_file_cmd
+AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
+_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
+         [0], [convert $build file names to $host format])dnl
+
+AC_MSG_CHECKING([how to convert $build file names to toolchain format])
+AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
+[#assume ordinary cross tools, or native build.
+lt_cv_to_tool_file_cmd=func_convert_file_noop
+case $host in
+  *-*-mingw* )
+    case $build in
+      *-*-mingw* ) # actually msys
+        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
+        ;;
+    esac
+    ;;
+esac
+])
+to_tool_file_cmd=$lt_cv_to_tool_file_cmd
+AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
+_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
+         [0], [convert $build files to toolchain format])dnl
+])# _LT_PATH_CONVERSION_FUNCTIONS
diff --git a/config/ltmain.sh b/config/ltmain.sh
new file mode 100644
index 0000000..3061e3c
--- /dev/null
+++ b/config/ltmain.sh
@@ -0,0 +1,9636 @@
+
+# libtool (GNU libtool) 2.4
+# Written by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING.  If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
+#
+#       --config             show all configuration variables
+#       --debug              enable verbose shell tracing
+#   -n, --dry-run            display commands without modifying any files
+#       --features           display basic configuration information and exit
+#       --mode=MODE          use operation mode MODE
+#       --preserve-dup-deps  don't remove duplicate dependency libraries
+#       --quiet, --silent    don't print informational messages
+#       --no-quiet, --no-silent
+#                            print informational messages (default)
+#       --tag=TAG            use configuration variables from tag TAG
+#   -v, --verbose            print more informational messages than default
+#       --no-verbose         don't print the extra informational messages
+#       --version            print version information
+#   -h, --help, --help-all   print short, long, or detailed help message
+#
+# MODE must be one of the following:
+#
+#         clean              remove files from the build directory
+#         compile            compile a source file into a libtool object
+#         execute            automatically set library path, then run a program
+#         finish             complete the installation of libtool libraries
+#         install            install libraries or executables
+#         link               create a library or an executable
+#         uninstall          remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE.  When passed as first option,
+# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+#         host-triplet:	$host
+#         shell:		$SHELL
+#         compiler:		$LTCC
+#         compiler flags:		$LTCFLAGS
+#         linker:		$LD (gnu? $with_gnu_ld)
+#         $progname:	(GNU libtool) 2.4
+#         automake:	$automake_version
+#         autoconf:	$autoconf_version
+#
+# Report bugs to <bug-libtool at gnu.org>.
+# GNU libtool home page: <http://www.gnu.org/software/libtool/>.
+# General help using GNU software: <http://www.gnu.org/gethelp/>.
+
+PROGRAM=libtool
+PACKAGE=libtool
+VERSION=2.4
+TIMESTAMP=""
+package_revision=1.3293
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+$1
+_LTECHO_EOF'
+}
+
+# NLS nuisances: We save the old values to restore during execute mode.
+lt_user_locale=
+lt_safe_locale=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+  eval "if test \"\${$lt_var+set}\" = set; then
+          save_$lt_var=\$$lt_var
+          $lt_var=C
+	  export $lt_var
+	  lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+	  lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+	fi"
+done
+LC_ALL=C
+LANGUAGE=C
+export LANGUAGE LC_ALL
+
+$lt_unset CDPATH
+
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+
+
+: ${CP="cp -f"}
+test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'}
+: ${EGREP="grep -E"}
+: ${FGREP="grep -F"}
+: ${GREP="grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="sed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77	  # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" 	$lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+    func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
+    if test "X$func_dirname_result" = "X${1}"; then
+      func_dirname_result="${3}"
+    else
+      func_dirname_result="$func_dirname_result${2}"
+    fi
+} # func_dirname may be replaced by extended shell implementation
+
+
+# func_basename file
+func_basename ()
+{
+    func_basename_result=`$ECHO "${1}" | $SED "$basename"`
+} # func_basename may be replaced by extended shell implementation
+
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+    # Extract subdirectory from the argument.
+    func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"`
+    if test "X$func_dirname_result" = "X${1}"; then
+      func_dirname_result="${3}"
+    else
+      func_dirname_result="$func_dirname_result${2}"
+    fi
+    func_basename_result=`$ECHO "${1}" | $SED -e "$basename"`
+} # func_dirname_and_basename may be replaced by extended shell implementation
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+    case ${2} in
+      .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
+      *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+    esac
+} # func_stripname may be replaced by extended shell implementation
+
+
+# These SED scripts presuppose an absolute path with a trailing slash.
+pathcar='s,^/\([^/]*\).*$,\1,'
+pathcdr='s,^/[^/]*,,'
+removedotparts=':dotsl
+		s@/\./@/@g
+		t dotsl
+		s,/\.$,/,'
+collapseslashes='s@/\{1,\}@/@g'
+finalslash='s,/*$,/,'
+
+# func_normal_abspath PATH
+# Remove doubled-up and trailing slashes, "." path components,
+# and cancel out any ".." path components in PATH after making
+# it an absolute path.
+#             value returned in "$func_normal_abspath_result"
+func_normal_abspath ()
+{
+  # Start from root dir and reassemble the path.
+  func_normal_abspath_result=
+  func_normal_abspath_tpath=$1
+  func_normal_abspath_altnamespace=
+  case $func_normal_abspath_tpath in
+    "")
+      # Empty path, that just means $cwd.
+      func_stripname '' '/' "`pwd`"
+      func_normal_abspath_result=$func_stripname_result
+      return
+    ;;
+    # The next three entries are used to spot a run of precisely
+    # two leading slashes without using negated character classes;
+    # we take advantage of case's first-match behaviour.
+    ///*)
+      # Unusual form of absolute path, do nothing.
+    ;;
+    //*)
+      # Not necessarily an ordinary path; POSIX reserves leading '//'
+      # and for example Cygwin uses it to access remote file shares
+      # over CIFS/SMB, so we conserve a leading double slash if found.
+      func_normal_abspath_altnamespace=/
+    ;;
+    /*)
+      # Absolute path, do nothing.
+    ;;
+    *)
+      # Relative path, prepend $cwd.
+      func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath
+    ;;
+  esac
+  # Cancel out all the simple stuff to save iterations.  We also want
+  # the path to end with a slash for ease of parsing, so make sure
+  # there is one (and only one) here.
+  func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"`
+  while :; do
+    # Processed it all yet?
+    if test "$func_normal_abspath_tpath" = / ; then
+      # If we ascended to the root using ".." the result may be empty now.
+      if test -z "$func_normal_abspath_result" ; then
+        func_normal_abspath_result=/
+      fi
+      break
+    fi
+    func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$pathcar"`
+    func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \
+        -e "$pathcdr"`
+    # Figure out what to do with it
+    case $func_normal_abspath_tcomponent in
+      "")
+        # Trailing empty path component, ignore it.
+      ;;
+      ..)
+        # Parent dir; strip last assembled component from result.
+        func_dirname "$func_normal_abspath_result"
+        func_normal_abspath_result=$func_dirname_result
+      ;;
+      *)
+        # Actual path component, append it.
+        func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent
+      ;;
+    esac
+  done
+  # Restore leading double-slash if one was found on entry.
+  func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result
+}
+
+# func_relative_path SRCDIR DSTDIR
+# generates a relative path from SRCDIR to DSTDIR, with a trailing
+# slash if non-empty, suitable for immediately appending a filename
+# without needing to append a separator.
+#             value returned in "$func_relative_path_result"
+func_relative_path ()
+{
+  func_relative_path_result=
+  func_normal_abspath "$1"
+  func_relative_path_tlibdir=$func_normal_abspath_result
+  func_normal_abspath "$2"
+  func_relative_path_tbindir=$func_normal_abspath_result
+
+  # Ascend the tree starting from libdir
+  while :; do
+    # check if we have found a prefix of bindir
+    case $func_relative_path_tbindir in
+      $func_relative_path_tlibdir)
+        # found an exact match
+        func_relative_path_tcancelled=
+        break
+        ;;
+      $func_relative_path_tlibdir*)
+        # found a matching prefix
+        func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir"
+        func_relative_path_tcancelled=$func_stripname_result
+        if test -z "$func_relative_path_result"; then
+          func_relative_path_result=.
+        fi
+        break
+        ;;
+      *)
+        func_dirname $func_relative_path_tlibdir
+        func_relative_path_tlibdir=${func_dirname_result}
+        if test "x$func_relative_path_tlibdir" = x ; then
+          # Have to descend all the way to the root!
+          func_relative_path_result=../$func_relative_path_result
+          func_relative_path_tcancelled=$func_relative_path_tbindir
+          break
+        fi
+        func_relative_path_result=../$func_relative_path_result
+        ;;
+    esac
+  done
+
+  # Now calculate path; take care to avoid doubling-up slashes.
+  func_stripname '' '/' "$func_relative_path_result"
+  func_relative_path_result=$func_stripname_result
+  func_stripname '/' '/' "$func_relative_path_tcancelled"
+  if test "x$func_stripname_result" != x ; then
+    func_relative_path_result=${func_relative_path_result}/${func_stripname_result}
+  fi
+
+  # Normalisation. If bindir is libdir, return empty string,
+  # else relative path ending with a slash; either way, target
+  # file name can be directly appended.
+  if test ! -z "$func_relative_path_result"; then
+    func_stripname './' '' "$func_relative_path_result/"
+    func_relative_path_result=$func_stripname_result
+  fi
+}
+
+# The name of this program:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+  [\\/]*|[A-Za-z]:\\*) ;;
+  *[\\/]*)
+     progdir=$func_dirname_result
+     progdir=`cd "$progdir" && pwd`
+     progpath="$progdir/$progname"
+     ;;
+  *)
+     save_IFS="$IFS"
+     IFS=:
+     for progdir in $PATH; do
+       IFS="$save_IFS"
+       test -x "$progdir/$progname" && break
+     done
+     IFS="$save_IFS"
+     test -n "$progdir" || progdir=`pwd`
+     progpath="$progdir/$progname"
+     ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution that turns a string into a regex matching for the
+# string literally.
+sed_make_literal_regex='s,[].[^$\\*\/],\\&,g'
+
+# Sed substitution that converts a w32 file name or path
+# which contains forward slashes, into one that contains
+# (escaped) backslashes.  A very naive implementation.
+lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'.  `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+  s/$bs4/&\\
+/g
+  s/^$bs2$dollar/$bs&/
+  s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+  s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+opt_warning=:
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+    $ECHO "$progname: ${opt_mode+$opt_mode: }$*"
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+    $opt_verbose && func_echo ${1+"$@"}
+
+    # A bug in bash halts the script if the last line of a function
+    # fails when set -e is in force, so we need another command to
+    # work around that:
+    :
+}
+
+# func_echo_all arg...
+# Invoke $ECHO with all args, space-separated.
+func_echo_all ()
+{
+    $ECHO "$*"
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+    $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+    $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2
+
+    # bash bug again:
+    :
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+    func_error ${1+"$@"}
+    exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+    func_error ${1+"$@"}
+    func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information."  ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+    $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+    my_directory_path="$1"
+    my_dir_list=
+
+    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+      # Protect directory names starting with `-'
+      case $my_directory_path in
+        -*) my_directory_path="./$my_directory_path" ;;
+      esac
+
+      # While some portion of DIR does not yet exist...
+      while test ! -d "$my_directory_path"; do
+        # ...make a list in topmost first order.  Use a colon delimited
+	# list incase some portion of path contains whitespace.
+        my_dir_list="$my_directory_path:$my_dir_list"
+
+        # If the last portion added has no slash in it, the list is done
+        case $my_directory_path in */*) ;; *) break ;; esac
+
+        # ...otherwise throw away the child directory and loop
+        my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"`
+      done
+      my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'`
+
+      save_mkdir_p_IFS="$IFS"; IFS=':'
+      for my_dir in $my_dir_list; do
+	IFS="$save_mkdir_p_IFS"
+        # mkdir can fail with a `File exist' error if two processes
+        # try to create one of the directories concurrently.  Don't
+        # stop in that case!
+        $MKDIR "$my_dir" 2>/dev/null || :
+      done
+      IFS="$save_mkdir_p_IFS"
+
+      # Bail out if we (or some other process) failed to create a directory.
+      test -d "$my_directory_path" || \
+        func_fatal_error "Failed to create \`$1'"
+    fi
+}
+
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible.  If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+    my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+    if test "$opt_dry_run" = ":"; then
+      # Return a directory name, but don't create it in dry-run mode
+      my_tmpdir="${my_template}-$$"
+    else
+
+      # If mktemp works, use that first and foremost
+      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+      if test ! -d "$my_tmpdir"; then
+        # Failing that, at least try and use $RANDOM to avoid a race
+        my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+        save_mktempdir_umask=`umask`
+        umask 0077
+        $MKDIR "$my_tmpdir"
+        umask $save_mktempdir_umask
+      fi
+
+      # If we're not in dry-run mode, bomb out on failure
+      test -d "$my_tmpdir" || \
+        func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+    fi
+
+    $ECHO "$my_tmpdir"
+}
+
+
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
+{
+    case $1 in
+      *[\\\`\"\$]*)
+	func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;;
+      *)
+        func_quote_for_eval_unquoted_result="$1" ;;
+    esac
+
+    case $func_quote_for_eval_unquoted_result in
+      # Double-quote args containing shell metacharacters to delay
+      # word splitting, command substitution and and variable
+      # expansion for a subsequent eval.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+        func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+        ;;
+      *)
+        func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+    esac
+}
+
+
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+    case $1 in
+      *[\\\`\"]*)
+	my_arg=`$ECHO "$1" | $SED \
+	    -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+      *)
+        my_arg="$1" ;;
+    esac
+
+    case $my_arg in
+      # Double-quote args containing shell metacharacters to delay
+      # word splitting and command substitution for a subsequent eval.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+        my_arg="\"$my_arg\""
+        ;;
+    esac
+
+    func_quote_for_expand_result="$my_arg"
+}
+
+
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+    my_cmd="$1"
+    my_fail_exp="${2-:}"
+
+    ${opt_silent-false} || {
+      func_quote_for_expand "$my_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
+
+    if ${opt_dry_run-false}; then :; else
+      eval "$my_cmd"
+      my_status=$?
+      if test "$my_status" -eq 0; then :; else
+	eval "(exit $my_status); $my_fail_exp"
+      fi
+    fi
+}
+
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.  Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+    my_cmd="$1"
+    my_fail_exp="${2-:}"
+
+    ${opt_silent-false} || {
+      func_quote_for_expand "$my_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
+
+    if ${opt_dry_run-false}; then :; else
+      eval "$lt_user_locale
+	    $my_cmd"
+      my_status=$?
+      eval "$lt_safe_locale"
+      if test "$my_status" -eq 0; then :; else
+	eval "(exit $my_status); $my_fail_exp"
+      fi
+    fi
+}
+
+# func_tr_sh
+# Turn $1 into a string suitable for a shell variable name.
+# Result is stored in $func_tr_sh_result.  All characters
+# not in the set a-zA-Z0-9_ are replaced with '_'. Further,
+# if $1 begins with a digit, a '_' is prepended as well.
+func_tr_sh ()
+{
+  case $1 in
+  [0-9]* | *[!a-zA-Z0-9_]*)
+    func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'`
+    ;;
+  * )
+    func_tr_sh_result=$1
+    ;;
+  esac
+}
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+    $opt_debug
+
+    $SED -n '/(C)/!b go
+	:more
+	/\./!{
+	  N
+	  s/\n# / /
+	  b more
+	}
+	:go
+	/^# '$PROGRAM' (GNU /,/# warranty; / {
+        s/^# //
+	s/^# *$//
+        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+        p
+     }' < "$progpath"
+     exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+    $opt_debug
+
+    $SED -n '/^# Usage:/,/^#  *.*--help/ {
+        s/^# //
+	s/^# *$//
+	s/\$progname/'$progname'/
+	p
+    }' < "$progpath"
+    echo
+    $ECHO "run \`$progname --help | more' for full usage"
+    exit $?
+}
+
+# func_help [NOEXIT]
+# Echo long help message to standard output and exit,
+# unless 'noexit' is passed as argument.
+func_help ()
+{
+    $opt_debug
+
+    $SED -n '/^# Usage:/,/# Report bugs to/ {
+	:print
+        s/^# //
+	s/^# *$//
+	s*\$progname*'$progname'*
+	s*\$host*'"$host"'*
+	s*\$SHELL*'"$SHELL"'*
+	s*\$LTCC*'"$LTCC"'*
+	s*\$LTCFLAGS*'"$LTCFLAGS"'*
+	s*\$LD*'"$LD"'*
+	s/\$with_gnu_ld/'"$with_gnu_ld"'/
+	s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
+	s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+	p
+	d
+     }
+     /^# .* home page:/b print
+     /^# General help using/b print
+     ' < "$progpath"
+    ret=$?
+    if test -z "$1"; then
+      exit $ret
+    fi
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+    $opt_debug
+
+    func_error "missing argument for $1."
+    exit_cmd=exit
+}
+
+
+# func_split_short_opt shortopt
+# Set func_split_short_opt_name and func_split_short_opt_arg shell
+# variables after splitting SHORTOPT after the 2nd character.
+func_split_short_opt ()
+{
+    my_sed_short_opt='1s/^\(..\).*$/\1/;q'
+    my_sed_short_rest='1s/^..\(.*\)$/\1/;q'
+
+    func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"`
+    func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"`
+} # func_split_short_opt may be replaced by extended shell implementation
+
+
+# func_split_long_opt longopt
+# Set func_split_long_opt_name and func_split_long_opt_arg shell
+# variables after splitting LONGOPT at the `=' sign.
+func_split_long_opt ()
+{
+    my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q'
+    my_sed_long_arg='1s/^--[^=]*=//'
+
+    func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"`
+    func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"`
+} # func_split_long_opt may be replaced by extended shell implementation
+
+exit_cmd=:
+
+
+
+
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+nonopt=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+    eval "${1}=\$${1}\${2}"
+} # func_append may be replaced by extended shell implementation
+
+# func_append_quoted var value
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
+func_append_quoted ()
+{
+    func_quote_for_eval "${2}"
+    eval "${1}=\$${1}\\ \$func_quote_for_eval_result"
+} # func_append_quoted may be replaced by extended shell implementation
+
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+    func_arith_result=`expr "${@}"`
+} # func_arith may be replaced by extended shell implementation
+
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+    func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len`
+} # func_len may be replaced by extended shell implementation
+
+
+# func_lo2o object
+func_lo2o ()
+{
+    func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
+} # func_lo2o may be replaced by extended shell implementation
+
+
+# func_xform libobj-or-source
+func_xform ()
+{
+    func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'`
+} # func_xform may be replaced by extended shell implementation
+
+
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+    func_error ${1+"$@"}
+    func_error "See the $PACKAGE documentation for more information."
+    func_fatal_error "Fatal configuration error."
+}
+
+
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+    re_begincf='^# ### BEGIN LIBTOOL'
+    re_endcf='^# ### END LIBTOOL'
+
+    # Default configuration.
+    $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+    # Now print the configurations for the tags.
+    for tagname in $taglist; do
+      $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+    done
+
+    exit $?
+}
+
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+    echo "host: $host"
+    if test "$build_libtool_libs" = yes; then
+      echo "enable shared libraries"
+    else
+      echo "disable shared libraries"
+    fi
+    if test "$build_old_libs" = yes; then
+      echo "enable static libraries"
+    else
+      echo "disable static libraries"
+    fi
+
+    exit $?
+}
+
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag.  We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+  # Global variable:
+  tagname="$1"
+
+  re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+  re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+  sed_extractcf="/$re_begincf/,/$re_endcf/p"
+
+  # Validate tagname.
+  case $tagname in
+    *[!-_A-Za-z0-9,/]*)
+      func_fatal_error "invalid tag name: $tagname"
+      ;;
+  esac
+
+  # Don't test for the "default" C tag, as we know it's
+  # there but not specially marked.
+  case $tagname in
+    CC) ;;
+    *)
+      if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+	taglist="$taglist $tagname"
+
+	# Evaluate the configuration.  Be careful to quote the path
+	# and the sed script, to avoid splitting on whitespace, but
+	# also don't use non-portable quotes within backquotes within
+	# quotes we have to do it in 2 steps:
+	extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+	eval "$extractedcf"
+      else
+	func_error "ignoring unknown tag $tagname"
+      fi
+      ;;
+  esac
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+  if test "$package_revision" != "$macro_revision"; then
+    if test "$VERSION" != "$macro_version"; then
+      if test -z "$macro_version"; then
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+      else
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+      fi
+    else
+      cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+    fi
+
+    exit $EXIT_MISMATCH
+  fi
+}
+
+
+# Shorthand for --mode=foo, only valid as the first argument
+case $1 in
+clean|clea|cle|cl)
+  shift; set dummy --mode clean ${1+"$@"}; shift
+  ;;
+compile|compil|compi|comp|com|co|c)
+  shift; set dummy --mode compile ${1+"$@"}; shift
+  ;;
+execute|execut|execu|exec|exe|ex|e)
+  shift; set dummy --mode execute ${1+"$@"}; shift
+  ;;
+finish|finis|fini|fin|fi|f)
+  shift; set dummy --mode finish ${1+"$@"}; shift
+  ;;
+install|instal|insta|inst|ins|in|i)
+  shift; set dummy --mode install ${1+"$@"}; shift
+  ;;
+link|lin|li|l)
+  shift; set dummy --mode link ${1+"$@"}; shift
+  ;;
+uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+  shift; set dummy --mode uninstall ${1+"$@"}; shift
+  ;;
+esac
+
+
+
+# Option defaults:
+opt_debug=:
+opt_dry_run=false
+opt_config=false
+opt_preserve_dup_deps=false
+opt_features=false
+opt_finish=false
+opt_help=false
+opt_help_all=false
+opt_silent=:
+opt_verbose=:
+opt_silent=false
+opt_verbose=false
+
+
+# Parse options once, thoroughly.  This comes as soon as possible in the
+# script to make things like `--version' happen as quickly as we can.
+{
+  # this just eases exit handling
+  while test $# -gt 0; do
+    opt="$1"
+    shift
+    case $opt in
+      --debug|-x)	opt_debug='set -x'
+			func_echo "enabling shell trace mode"
+			$opt_debug
+			;;
+      --dry-run|--dryrun|-n)
+			opt_dry_run=:
+			;;
+      --config)
+			opt_config=:
+func_config
+			;;
+      --dlopen|-dlopen)
+			optarg="$1"
+			opt_dlopen="${opt_dlopen+$opt_dlopen
+}$optarg"
+			shift
+			;;
+      --preserve-dup-deps)
+			opt_preserve_dup_deps=:
+			;;
+      --features)
+			opt_features=:
+func_features
+			;;
+      --finish)
+			opt_finish=:
+set dummy --mode finish ${1+"$@"}; shift
+			;;
+      --help)
+			opt_help=:
+			;;
+      --help-all)
+			opt_help_all=:
+opt_help=': help-all'
+			;;
+      --mode)
+			test $# = 0 && func_missing_arg $opt && break
+			optarg="$1"
+			opt_mode="$optarg"
+case $optarg in
+  # Valid mode arguments:
+  clean|compile|execute|finish|install|link|relink|uninstall) ;;
+
+  # Catch anything else as an error
+  *) func_error "invalid argument for $opt"
+     exit_cmd=exit
+     break
+     ;;
+esac
+			shift
+			;;
+      --no-silent|--no-quiet)
+			opt_silent=false
+func_append preserve_args " $opt"
+			;;
+      --no-verbose)
+			opt_verbose=false
+func_append preserve_args " $opt"
+			;;
+      --silent|--quiet)
+			opt_silent=:
+func_append preserve_args " $opt"
+        opt_verbose=false
+			;;
+      --verbose|-v)
+			opt_verbose=:
+func_append preserve_args " $opt"
+opt_silent=false
+			;;
+      --tag)
+			test $# = 0 && func_missing_arg $opt && break
+			optarg="$1"
+			opt_tag="$optarg"
+func_append preserve_args " $opt $optarg"
+func_enable_tag "$optarg"
+			shift
+			;;
+
+      -\?|-h)		func_usage				;;
+      --help)		func_help				;;
+      --version)	func_version				;;
+
+      # Separate optargs to long options:
+      --*=*)
+			func_split_long_opt "$opt"
+			set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"}
+			shift
+			;;
+
+      # Separate non-argument short options:
+      -\?*|-h*|-n*|-v*)
+			func_split_short_opt "$opt"
+			set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"}
+			shift
+			;;
+
+      --)		break					;;
+      -*)		func_fatal_help "unrecognized option \`$opt'" ;;
+      *)		set dummy "$opt" ${1+"$@"};	shift; break  ;;
+    esac
+  done
+
+  # Validate options:
+
+  # save first non-option argument
+  if test "$#" -gt 0; then
+    nonopt="$opt"
+    shift
+  fi
+
+  # preserve --debug
+  test "$opt_debug" = : || func_append preserve_args " --debug"
+
+  case $host in
+    *cygwin* | *mingw* | *pw32* | *cegcc*)
+      # don't eliminate duplications in $postdeps and $predeps
+      opt_duplicate_compiler_generated_deps=:
+      ;;
+    *)
+      opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps
+      ;;
+  esac
+
+  $opt_help || {
+    # Sanity checks first:
+    func_check_version_match
+
+    if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+      func_fatal_configuration "not configured to build any kind of library"
+    fi
+
+    # Darwin sucks
+    eval std_shrext=\"$shrext_cmds\"
+
+    # Only execute mode is allowed to have -dlopen flags.
+    if test -n "$opt_dlopen" && test "$opt_mode" != execute; then
+      func_error "unrecognized option \`-dlopen'"
+      $ECHO "$help" 1>&2
+      exit $EXIT_FAILURE
+    fi
+
+    # Change the help message to a mode-specific one.
+    generic_help="$help"
+    help="Try \`$progname --help --mode=$opt_mode' for more information."
+  }
+
+
+  # Bail if the options were screwed
+  $exit_cmd $EXIT_FAILURE
+}
+
+
+
+
+## ----------- ##
+##    Main.    ##
+## ----------- ##
+
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+    test -f "$1" &&
+      $SED -e 4q "$1" 2>/dev/null \
+        | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs.  To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway.  Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+    lalib_p=no
+    if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+	for lalib_p_l in 1 2 3 4
+	do
+	    read lalib_p_line
+	    case "$lalib_p_line" in
+		\#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+	    esac
+	done
+	exec 0<&5 5<&-
+    fi
+    test "$lalib_p" = yes
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+    func_lalib_p "$1"
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+    func_ltwrapper_exec_suffix=
+    case $1 in
+    *.exe) ;;
+    *) func_ltwrapper_exec_suffix=.exe ;;
+    esac
+    $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+    func_dirname_and_basename "$1" "" "."
+    func_stripname '' '.exe' "$func_basename_result"
+    func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+    func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+    $opt_debug
+    save_ifs=$IFS; IFS='~'
+    for cmd in $1; do
+      IFS=$save_ifs
+      eval cmd=\"$cmd\"
+      func_show_eval "$cmd" "${2-:}"
+    done
+    IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)!  Also, sourcing
+# `FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+    $opt_debug
+    case $1 in
+    */* | *\\*)	. "$1" ;;
+    *)		. "./$1" ;;
+    esac
+}
+
+
+# func_resolve_sysroot PATH
+# Replace a leading = in PATH with a sysroot.  Store the result into
+# func_resolve_sysroot_result
+func_resolve_sysroot ()
+{
+  func_resolve_sysroot_result=$1
+  case $func_resolve_sysroot_result in
+  =*)
+    func_stripname '=' '' "$func_resolve_sysroot_result"
+    func_resolve_sysroot_result=$lt_sysroot$func_stripname_result
+    ;;
+  esac
+}
+
+# func_replace_sysroot PATH
+# If PATH begins with the sysroot, replace it with = and
+# store the result into func_replace_sysroot_result.
+func_replace_sysroot ()
+{
+  case "$lt_sysroot:$1" in
+  ?*:"$lt_sysroot"*)
+    func_stripname "$lt_sysroot" '' "$1"
+    func_replace_sysroot_result="=$func_stripname_result"
+    ;;
+  *)
+    # Including no sysroot.
+    func_replace_sysroot_result=$1
+    ;;
+  esac
+}
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+    $opt_debug
+    if test -n "$available_tags" && test -z "$tagname"; then
+      CC_quoted=
+      for arg in $CC; do
+	func_append_quoted CC_quoted "$arg"
+      done
+      CC_expanded=`func_echo_all $CC`
+      CC_quoted_expanded=`func_echo_all $CC_quoted`
+      case $@ in
+      # Blanks in the command may have been stripped by the calling shell,
+      # but not from the CC environment variable when configure was run.
+      " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+      " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      *)
+	for z in $available_tags; do
+	  if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+	    # Evaluate the configuration.
+	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+	    CC_quoted=
+	    for arg in $CC; do
+	      # Double-quote args containing other shell metacharacters.
+	      func_append_quoted CC_quoted "$arg"
+	    done
+	    CC_expanded=`func_echo_all $CC`
+	    CC_quoted_expanded=`func_echo_all $CC_quoted`
+	    case "$@ " in
+	    " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \
+	    " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*)
+	      # The compiler in the base compile command matches
+	      # the one in the tagged configuration.
+	      # Assume this is the tagged configuration we want.
+	      tagname=$z
+	      break
+	      ;;
+	    esac
+	  fi
+	done
+	# If $tagname still isn't set, then no tagged configuration
+	# was found and let the user know that the "--tag" command
+	# line option must be used.
+	if test -z "$tagname"; then
+	  func_echo "unable to infer tagged configuration"
+	  func_fatal_error "specify a tag with \`--tag'"
+#	else
+#	  func_verbose "using $tagname tagged configuration"
+	fi
+	;;
+      esac
+    fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+    write_libobj=${1}
+    if test "$build_libtool_libs" = yes; then
+      write_lobj=\'${2}\'
+    else
+      write_lobj=none
+    fi
+
+    if test "$build_old_libs" = yes; then
+      write_oldobj=\'${3}\'
+    else
+      write_oldobj=none
+    fi
+
+    $opt_dry_run || {
+      cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+      $MV "${write_libobj}T" "${write_libobj}"
+    }
+}
+
+
+##################################################
+# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS #
+##################################################
+
+# func_convert_core_file_wine_to_w32 ARG
+# Helper function used by file name conversion functions when $build is *nix,
+# and $host is mingw, cygwin, or some other w32 environment. Relies on a
+# correctly configured wine environment available, with the winepath program
+# in $build's $PATH.
+#
+# ARG is the $build file name to be converted to w32 format.
+# Result is available in $func_convert_core_file_wine_to_w32_result, and will
+# be empty on error (or when ARG is empty)
+func_convert_core_file_wine_to_w32 ()
+{
+  $opt_debug
+  func_convert_core_file_wine_to_w32_result="$1"
+  if test -n "$1"; then
+    # Unfortunately, winepath does not exit with a non-zero error code, so we
+    # are forced to check the contents of stdout. On the other hand, if the
+    # command is not found, the shell will set an exit code of 127 and print
+    # *an error message* to stdout. So we must check for both error code of
+    # zero AND non-empty stdout, which explains the odd construction:
+    func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null`
+    if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then
+      func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" |
+        $SED -e "$lt_sed_naive_backslashify"`
+    else
+      func_convert_core_file_wine_to_w32_result=
+    fi
+  fi
+}
+# end: func_convert_core_file_wine_to_w32
+
+
+# func_convert_core_path_wine_to_w32 ARG
+# Helper function used by path conversion functions when $build is *nix, and
+# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly
+# configured wine environment available, with the winepath program in $build's
+# $PATH. Assumes ARG has no leading or trailing path separator characters.
+#
+# ARG is path to be converted from $build format to win32.
+# Result is available in $func_convert_core_path_wine_to_w32_result.
+# Unconvertible file (directory) names in ARG are skipped; if no directory names
+# are convertible, then the result may be empty.
+func_convert_core_path_wine_to_w32 ()
+{
+  $opt_debug
+  # unfortunately, winepath doesn't convert paths, only file names
+  func_convert_core_path_wine_to_w32_result=""
+  if test -n "$1"; then
+    oldIFS=$IFS
+    IFS=:
+    for func_convert_core_path_wine_to_w32_f in $1; do
+      IFS=$oldIFS
+      func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f"
+      if test -n "$func_convert_core_file_wine_to_w32_result" ; then
+        if test -z "$func_convert_core_path_wine_to_w32_result"; then
+          func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result"
+        else
+          func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result"
+        fi
+      fi
+    done
+    IFS=$oldIFS
+  fi
+}
+# end: func_convert_core_path_wine_to_w32
+
+
+# func_cygpath ARGS...
+# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when
+# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2)
+# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or
+# (2), returns the Cygwin file name or path in func_cygpath_result (input
+# file name or path is assumed to be in w32 format, as previously converted
+# from $build's *nix or MSYS format). In case (3), returns the w32 file name
+# or path in func_cygpath_result (input file name or path is assumed to be in
+# Cygwin format). Returns an empty string on error.
+#
+# ARGS are passed to cygpath, with the last one being the file name or path to
+# be converted.
+#
+# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH
+# environment variable; do not put it in $PATH.
+func_cygpath ()
+{
+  $opt_debug
+  if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
+    func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
+    if test "$?" -ne 0; then
+      # on failure, ensure result is empty
+      func_cygpath_result=
+    fi
+  else
+    func_cygpath_result=
+    func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'"
+  fi
+}
+#end: func_cygpath
+
+
+# func_convert_core_msys_to_w32 ARG
+# Convert file name or path ARG from MSYS format to w32 format.  Return
+# result in func_convert_core_msys_to_w32_result.
+func_convert_core_msys_to_w32 ()
+{
+  $opt_debug
+  # awkward: cmd appends spaces to result
+  func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+    $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
+}
+#end: func_convert_core_msys_to_w32
+
+
+# func_convert_file_check ARG1 ARG2
+# Verify that ARG1 (a file name in $build format) was converted to $host
+# format in ARG2. Otherwise, emit an error message, but continue (resetting
+# func_to_host_file_result to ARG1).
+func_convert_file_check ()
+{
+  $opt_debug
+  if test -z "$2" && test -n "$1" ; then
+    func_error "Could not determine host file name corresponding to"
+    func_error "  \`$1'"
+    func_error "Continuing, but uninstalled executables may not work."
+    # Fallback:
+    func_to_host_file_result="$1"
+  fi
+}
+# end func_convert_file_check
+
+
+# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH
+# Verify that FROM_PATH (a path in $build format) was converted to $host
+# format in TO_PATH. Otherwise, emit an error message, but continue, resetting
+# func_to_host_file_result to a simplistic fallback value (see below).
+func_convert_path_check ()
+{
+  $opt_debug
+  if test -z "$4" && test -n "$3"; then
+    func_error "Could not determine the host path corresponding to"
+    func_error "  \`$3'"
+    func_error "Continuing, but uninstalled executables may not work."
+    # Fallback.  This is a deliberately simplistic "conversion" and
+    # should not be "improved".  See libtool.info.
+    if test "x$1" != "x$2"; then
+      lt_replace_pathsep_chars="s|$1|$2|g"
+      func_to_host_path_result=`echo "$3" |
+        $SED -e "$lt_replace_pathsep_chars"`
+    else
+      func_to_host_path_result="$3"
+    fi
+  fi
+}
+# end func_convert_path_check
+
+
+# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG
+# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT
+# and appending REPL if ORIG matches BACKPAT.
+func_convert_path_front_back_pathsep ()
+{
+  $opt_debug
+  case $4 in
+  $1 ) func_to_host_path_result="$3$func_to_host_path_result"
+    ;;
+  esac
+  case $4 in
+  $2 ) func_append func_to_host_path_result "$3"
+    ;;
+  esac
+}
+# end func_convert_path_front_back_pathsep
+
+
+##################################################
+# $build to $host FILE NAME CONVERSION FUNCTIONS #
+##################################################
+# invoked via `$to_host_file_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# Result will be available in $func_to_host_file_result.
+
+
+# func_to_host_file ARG
+# Converts the file name ARG from $build format to $host format. Return result
+# in func_to_host_file_result.
+func_to_host_file ()
+{
+  $opt_debug
+  $to_host_file_cmd "$1"
+}
+# end func_to_host_file
+
+
+# func_to_tool_file ARG LAZY
+# converts the file name ARG from $build format to toolchain format. Return
+# result in func_to_tool_file_result.  If the conversion in use is listed
+# in (the comma separated) LAZY, no conversion takes place.
+func_to_tool_file ()
+{
+  $opt_debug
+  case ,$2, in
+    *,"$to_tool_file_cmd",*)
+      func_to_tool_file_result=$1
+      ;;
+    *)
+      $to_tool_file_cmd "$1"
+      func_to_tool_file_result=$func_to_host_file_result
+      ;;
+  esac
+}
+# end func_to_tool_file
+
+
+# func_convert_file_noop ARG
+# Copy ARG to func_to_host_file_result.
+func_convert_file_noop ()
+{
+  func_to_host_file_result="$1"
+}
+# end func_convert_file_noop
+
+
+# func_convert_file_msys_to_w32 ARG
+# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper.  Returns result in
+# func_to_host_file_result.
+func_convert_file_msys_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_msys_to_w32 "$1"
+    func_to_host_file_result="$func_convert_core_msys_to_w32_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_w32
+
+
+# func_convert_file_cygwin_to_w32 ARG
+# Convert file name ARG from Cygwin to w32 format.  Returns result in
+# func_to_host_file_result.
+func_convert_file_cygwin_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
+    # LT_CYGPATH in this case.
+    func_to_host_file_result=`cygpath -m "$1"`
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_cygwin_to_w32
+
+
+# func_convert_file_nix_to_w32 ARG
+# Convert file name ARG from *nix to w32 format.  Requires a wine environment
+# and a working winepath. Returns result in func_to_host_file_result.
+func_convert_file_nix_to_w32 ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_file_wine_to_w32 "$1"
+    func_to_host_file_result="$func_convert_core_file_wine_to_w32_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_w32
+
+
+# func_convert_file_msys_to_cygwin ARG
+# Convert file name ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_file_msys_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    func_convert_core_msys_to_w32 "$1"
+    func_cygpath -u "$func_convert_core_msys_to_w32_result"
+    func_to_host_file_result="$func_cygpath_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_msys_to_cygwin
+
+
+# func_convert_file_nix_to_cygwin ARG
+# Convert file name ARG from *nix to Cygwin format.  Requires Cygwin installed
+# in a wine environment, working winepath, and LT_CYGPATH set.  Returns result
+# in func_to_host_file_result.
+func_convert_file_nix_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_file_result="$1"
+  if test -n "$1"; then
+    # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
+    func_convert_core_file_wine_to_w32 "$1"
+    func_cygpath -u "$func_convert_core_file_wine_to_w32_result"
+    func_to_host_file_result="$func_cygpath_result"
+  fi
+  func_convert_file_check "$1" "$func_to_host_file_result"
+}
+# end func_convert_file_nix_to_cygwin
+
+
+#############################################
+# $build to $host PATH CONVERSION FUNCTIONS #
+#############################################
+# invoked via `$to_host_path_cmd ARG'
+#
+# In each case, ARG is the path to be converted from $build to $host format.
+# The result will be available in $func_to_host_path_result.
+#
+# Path separators are also converted from $build format to $host format.  If
+# ARG begins or ends with a path separator character, it is preserved (but
+# converted to $host format) on output.
+#
+# All path conversion functions are named using the following convention:
+#   file name conversion function    : func_convert_file_X_to_Y ()
+#   path conversion function         : func_convert_path_X_to_Y ()
+# where, for any given $build/$host combination the 'X_to_Y' value is the
+# same.  If conversion functions are added for new $build/$host combinations,
+# the two new functions must follow this pattern, or func_init_to_host_path_cmd
+# will break.
+
+
+# func_init_to_host_path_cmd
+# Ensures that function "pointer" variable $to_host_path_cmd is set to the
+# appropriate value, based on the value of $to_host_file_cmd.
+to_host_path_cmd=
+func_init_to_host_path_cmd ()
+{
+  $opt_debug
+  if test -z "$to_host_path_cmd"; then
+    func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
+    to_host_path_cmd="func_convert_path_${func_stripname_result}"
+  fi
+}
+
+
+# func_to_host_path ARG
+# Converts the path ARG from $build format to $host format. Return result
+# in func_to_host_path_result.
+func_to_host_path ()
+{
+  $opt_debug
+  func_init_to_host_path_cmd
+  $to_host_path_cmd "$1"
+}
+# end func_to_host_path
+
+
+# func_convert_path_noop ARG
+# Copy ARG to func_to_host_path_result.
+func_convert_path_noop ()
+{
+  func_to_host_path_result="$1"
+}
+# end func_convert_path_noop
+
+
+# func_convert_path_msys_to_w32 ARG
+# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic
+# conversion to w32 is not available inside the cwrapper.  Returns result in
+# func_to_host_path_result.
+func_convert_path_msys_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # Remove leading and trailing path separator characters from ARG.  MSYS
+    # behavior is inconsistent here; cygpath turns them into '.;' and ';.';
+    # and winepath ignores them completely.
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+    func_to_host_path_result="$func_convert_core_msys_to_w32_result"
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_msys_to_w32
+
+
+# func_convert_path_cygwin_to_w32 ARG
+# Convert path ARG from Cygwin to w32 format.  Returns result in
+# func_to_host_file_result.
+func_convert_path_cygwin_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"`
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_cygwin_to_w32
+
+
+# func_convert_path_nix_to_w32 ARG
+# Convert path ARG from *nix to w32 format.  Requires a wine environment and
+# a working winepath.  Returns result in func_to_host_file_result.
+func_convert_path_nix_to_w32 ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+    func_to_host_path_result="$func_convert_core_path_wine_to_w32_result"
+    func_convert_path_check : ";" \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
+  fi
+}
+# end func_convert_path_nix_to_w32
+
+
+# func_convert_path_msys_to_cygwin ARG
+# Convert path ARG from MSYS to Cygwin format.  Requires LT_CYGPATH set.
+# Returns result in func_to_host_file_result.
+func_convert_path_msys_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # See func_convert_path_msys_to_w32:
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
+    func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
+    func_to_host_path_result="$func_cygpath_result"
+    func_convert_path_check : : \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+  fi
+}
+# end func_convert_path_msys_to_cygwin
+
+
+# func_convert_path_nix_to_cygwin ARG
+# Convert path ARG from *nix to Cygwin format.  Requires Cygwin installed in a
+# a wine environment, working winepath, and LT_CYGPATH set.  Returns result in
+# func_to_host_file_result.
+func_convert_path_nix_to_cygwin ()
+{
+  $opt_debug
+  func_to_host_path_result="$1"
+  if test -n "$1"; then
+    # Remove leading and trailing path separator characters from
+    # ARG. msys behavior is inconsistent here, cygpath turns them
+    # into '.;' and ';.', and winepath ignores them completely.
+    func_stripname : : "$1"
+    func_to_host_path_tmp1=$func_stripname_result
+    func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1"
+    func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result"
+    func_to_host_path_result="$func_cygpath_result"
+    func_convert_path_check : : \
+      "$func_to_host_path_tmp1" "$func_to_host_path_result"
+    func_convert_path_front_back_pathsep ":*" "*:" : "$1"
+  fi
+}
+# end func_convert_path_nix_to_cygwin
+
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+    $opt_debug
+    # Get the compilation command and the source file.
+    base_compile=
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    suppress_opt=yes
+    suppress_output=
+    arg_mode=normal
+    libobj=
+    later=
+    pie_flag=
+
+    for arg
+    do
+      case $arg_mode in
+      arg  )
+	# do not "continue".  Instead, add this to base_compile
+	lastarg="$arg"
+	arg_mode=normal
+	;;
+
+      target )
+	libobj="$arg"
+	arg_mode=normal
+	continue
+	;;
+
+      normal )
+	# Accept any command-line options.
+	case $arg in
+	-o)
+	  test -n "$libobj" && \
+	    func_fatal_error "you cannot specify \`-o' more than once"
+	  arg_mode=target
+	  continue
+	  ;;
+
+	-pie | -fpie | -fPIE)
+          func_append pie_flag " $arg"
+	  continue
+	  ;;
+
+	-shared | -static | -prefer-pic | -prefer-non-pic)
+	  func_append later " $arg"
+	  continue
+	  ;;
+
+	-no-suppress)
+	  suppress_opt=no
+	  continue
+	  ;;
+
+	-Xcompiler)
+	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
+	  continue      #  The current "srcfile" will either be retained or
+	  ;;            #  replaced later.  I would guess that would be a bug.
+
+	-Wc,*)
+	  func_stripname '-Wc,' '' "$arg"
+	  args=$func_stripname_result
+	  lastarg=
+	  save_ifs="$IFS"; IFS=','
+	  for arg in $args; do
+	    IFS="$save_ifs"
+	    func_append_quoted lastarg "$arg"
+	  done
+	  IFS="$save_ifs"
+	  func_stripname ' ' '' "$lastarg"
+	  lastarg=$func_stripname_result
+
+	  # Add the arguments to base_compile.
+	  func_append base_compile " $lastarg"
+	  continue
+	  ;;
+
+	*)
+	  # Accept the current argument as the source file.
+	  # The previous "srcfile" becomes the current argument.
+	  #
+	  lastarg="$srcfile"
+	  srcfile="$arg"
+	  ;;
+	esac  #  case $arg
+	;;
+      esac    #  case $arg_mode
+
+      # Aesthetically quote the previous argument.
+      func_append_quoted base_compile "$lastarg"
+    done # for arg
+
+    case $arg_mode in
+    arg)
+      func_fatal_error "you must specify an argument for -Xcompile"
+      ;;
+    target)
+      func_fatal_error "you must specify a target with \`-o'"
+      ;;
+    *)
+      # Get the name of the library object.
+      test -z "$libobj" && {
+	func_basename "$srcfile"
+	libobj="$func_basename_result"
+      }
+      ;;
+    esac
+
+    # Recognize several different file suffixes.
+    # If the user specifies -o file.o, it is replaced with file.lo
+    case $libobj in
+    *.[cCFSifmso] | \
+    *.ada | *.adb | *.ads | *.asm | \
+    *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+    *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup)
+      func_xform "$libobj"
+      libobj=$func_xform_result
+      ;;
+    esac
+
+    case $libobj in
+    *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+    *)
+      func_fatal_error "cannot determine name of library object from \`$libobj'"
+      ;;
+    esac
+
+    func_infer_tag $base_compile
+
+    for arg in $later; do
+      case $arg in
+      -shared)
+	test "$build_libtool_libs" != yes && \
+	  func_fatal_configuration "can not build a shared library"
+	build_old_libs=no
+	continue
+	;;
+
+      -static)
+	build_libtool_libs=no
+	build_old_libs=yes
+	continue
+	;;
+
+      -prefer-pic)
+	pic_mode=yes
+	continue
+	;;
+
+      -prefer-non-pic)
+	pic_mode=no
+	continue
+	;;
+      esac
+    done
+
+    func_quote_for_eval "$libobj"
+    test "X$libobj" != "X$func_quote_for_eval_result" \
+      && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'	 &()|`$[]' \
+      && func_warning "libobj name \`$libobj' may not contain shell special characters."
+    func_dirname_and_basename "$obj" "/" ""
+    objname="$func_basename_result"
+    xdir="$func_dirname_result"
+    lobj=${xdir}$objdir/$objname
+
+    test -z "$base_compile" && \
+      func_fatal_help "you must specify a compilation command"
+
+    # Delete any leftover library objects.
+    if test "$build_old_libs" = yes; then
+      removelist="$obj $lobj $libobj ${libobj}T"
+    else
+      removelist="$lobj $libobj ${libobj}T"
+    fi
+
+    # On Cygwin there's no "real" PIC flag so we must build both object types
+    case $host_os in
+    cygwin* | mingw* | pw32* | os2* | cegcc*)
+      pic_mode=default
+      ;;
+    esac
+    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+      # non-PIC code in shared libraries is not supported
+      pic_mode=default
+    fi
+
+    # Calculate the filename of the output object if compiler does
+    # not support -o with -c
+    if test "$compiler_c_o" = no; then
+      output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext}
+      lockfile="$output_obj.lock"
+    else
+      output_obj=
+      need_locks=no
+      lockfile=
+    fi
+
+    # Lock this critical section if it is needed
+    # We use this script file to make the link, it avoids creating a new file
+    if test "$need_locks" = yes; then
+      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+	func_echo "Waiting for $lockfile to be removed"
+	sleep 2
+      done
+    elif test "$need_locks" = warn; then
+      if test -f "$lockfile"; then
+	$ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$opt_dry_run || $RM $removelist
+	exit $EXIT_FAILURE
+      fi
+      func_append removelist " $output_obj"
+      $ECHO "$srcfile" > "$lockfile"
+    fi
+
+    $opt_dry_run || $RM $removelist
+    func_append removelist " $lockfile"
+    trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+    func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
+    srcfile=$func_to_tool_file_result
+    func_quote_for_eval "$srcfile"
+    qsrcfile=$func_quote_for_eval_result
+
+    # Only build a PIC object if we are building libtool libraries.
+    if test "$build_libtool_libs" = yes; then
+      # Without this assignment, base_compile gets emptied.
+      fbsd_hideous_sh_bug=$base_compile
+
+      if test "$pic_mode" != no; then
+	command="$base_compile $qsrcfile $pic_flag"
+      else
+	# Don't build PIC code
+	command="$base_compile $qsrcfile"
+      fi
+
+      func_mkdir_p "$xdir$objdir"
+
+      if test -z "$output_obj"; then
+	# Place PIC objects in $objdir
+	func_append command " -o $lobj"
+      fi
+
+      func_show_eval_locale "$command"	\
+          'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+      if test "$need_locks" = warn &&
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+	$ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$opt_dry_run || $RM $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed, then go on to compile the next one
+      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+	func_show_eval '$MV "$output_obj" "$lobj"' \
+	  'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+      fi
+
+      # Allow error messages only from the first compilation.
+      if test "$suppress_opt" = yes; then
+	suppress_output=' >/dev/null 2>&1'
+      fi
+    fi
+
+    # Only build a position-dependent object if we build old libraries.
+    if test "$build_old_libs" = yes; then
+      if test "$pic_mode" != yes; then
+	# Don't build PIC code
+	command="$base_compile $qsrcfile$pie_flag"
+      else
+	command="$base_compile $qsrcfile $pic_flag"
+      fi
+      if test "$compiler_c_o" = yes; then
+	func_append command " -o $obj"
+      fi
+
+      # Suppress compiler output if we already did a PIC compilation.
+      func_append command "$suppress_output"
+      func_show_eval_locale "$command" \
+        '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+      if test "$need_locks" = warn &&
+	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+	$ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together.  If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+	$opt_dry_run || $RM $removelist
+	exit $EXIT_FAILURE
+      fi
+
+      # Just move the object if needed
+      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+	func_show_eval '$MV "$output_obj" "$obj"' \
+	  'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+      fi
+    fi
+
+    $opt_dry_run || {
+      func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+      # Unlock the critical section if it was locked
+      if test "$need_locks" != no; then
+	removelist=$lockfile
+        $RM "$lockfile"
+      fi
+    }
+
+    exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+  test "$opt_mode" = compile && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+    # We need to display help for each of the modes.
+    case $opt_mode in
+      "")
+        # Generic help is extracted from the usage comments
+        # at the start of this file.
+        func_help
+        ;;
+
+      clean)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+        ;;
+
+      compile)
+      $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
+  -no-suppress      do not suppress compiler output for multiple passes
+  -prefer-pic       try to build PIC objects only
+  -prefer-non-pic   try to build non-PIC objects only
+  -shared           do not build a \`.o' file suitable for static linking
+  -static           only build a \`.o' file suitable for static linking
+  -Wc,FLAG          pass FLAG directly to the compiler
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+        ;;
+
+      execute)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+  -dlopen FILE      add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+        ;;
+
+      finish)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges.  Use
+the \`--dry-run' option if you just want to see what would be executed."
+        ;;
+
+      install)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command.  The first component should be
+either the \`install' or \`cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+  -inst-prefix-dir PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+        ;;
+
+      link)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+  -all-static       do not do any dynamic linking at all
+  -avoid-version    do not add a version suffix if possible
+  -bindir BINDIR    specify path to binaries directory (for systems where
+                    libraries must be found in the PATH setting at runtime)
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+  -export-symbols SYMFILE
+                    try to export only the symbols listed in SYMFILE
+  -export-symbols-regex REGEX
+                    try to export only the symbols matching REGEX
+  -LLIBDIR          search LIBDIR for required installed libraries
+  -lNAME            OUTPUT-FILE requires the installed library libNAME
+  -module           build a library that can dlopened
+  -no-fast-install  disable the fast-install mode
+  -no-install       link a not-installable executable
+  -no-undefined     declare that a library does not refer to external symbols
+  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
+  -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -precious-files-regex REGEX
+                    don't remove output files matching REGEX
+  -release RELEASE  specify package release information
+  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+  -shared           only do dynamic linking of libtool libraries
+  -shrext SUFFIX    override the standard shared library file extension
+  -static           do not do any dynamic linking of uninstalled libtool libraries
+  -static-libtool-libs
+                    do not do any dynamic linking of libtool libraries
+  -version-info CURRENT[:REVISION[:AGE]]
+                    specify library version info [each variable defaults to 0]
+  -weak LIBNAME     declare that the target provides the LIBNAME interface
+  -Wc,FLAG
+  -Xcompiler FLAG   pass linker-specific FLAG directly to the compiler
+  -Wl,FLAG
+  -Xlinker FLAG     pass linker-specific FLAG directly to the linker
+  -XCClinker FLAG   pass link-specific FLAG to the compiler driver (CC)
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename.  Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+        ;;
+
+      uninstall)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+        ;;
+
+      *)
+        func_fatal_help "invalid operation mode \`$opt_mode'"
+        ;;
+    esac
+
+    echo
+    $ECHO "Try \`$progname --help' for more information about other modes."
+}
+
+# Now that we've collected a possible --mode arg, show help if necessary
+if $opt_help; then
+  if test "$opt_help" = :; then
+    func_mode_help
+  else
+    {
+      func_help noexit
+      for opt_mode in compile link execute install finish uninstall clean; do
+	func_mode_help
+      done
+    } | sed -n '1p; 2,$s/^Usage:/  or: /p'
+    {
+      func_help noexit
+      for opt_mode in compile link execute install finish uninstall clean; do
+	echo
+	func_mode_help
+      done
+    } |
+    sed '1d
+      /^When reporting/,/^Report/{
+	H
+	d
+      }
+      $x
+      /information about other modes/d
+      /more detailed .*MODE/d
+      s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/'
+  fi
+  exit $?
+fi
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+    $opt_debug
+    # The first argument is the command name.
+    cmd="$nonopt"
+    test -z "$cmd" && \
+      func_fatal_help "you must specify a COMMAND"
+
+    # Handle -dlopen flags immediately.
+    for file in $opt_dlopen; do
+      test -f "$file" \
+	|| func_fatal_help "\`$file' is not a file"
+
+      dir=
+      case $file in
+      *.la)
+	func_resolve_sysroot "$file"
+	file=$func_resolve_sysroot_result
+
+	# Check to see that this really is a libtool archive.
+	func_lalib_unsafe_p "$file" \
+	  || func_fatal_help "\`$lib' is not a valid libtool archive"
+
+	# Read the libtool library.
+	dlname=
+	library_names=
+	func_source "$file"
+
+	# Skip this library if it cannot be dlopened.
+	if test -z "$dlname"; then
+	  # Warn if it was a shared library.
+	  test -n "$library_names" && \
+	    func_warning "\`$file' was not linked with \`-export-dynamic'"
+	  continue
+	fi
+
+	func_dirname "$file" "" "."
+	dir="$func_dirname_result"
+
+	if test -f "$dir/$objdir/$dlname"; then
+	  func_append dir "/$objdir"
+	else
+	  if test ! -f "$dir/$dlname"; then
+	    func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+	  fi
+	fi
+	;;
+
+      *.lo)
+	# Just add the directory containing the .lo file.
+	func_dirname "$file" "" "."
+	dir="$func_dirname_result"
+	;;
+
+      *)
+	func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+	continue
+	;;
+      esac
+
+      # Get the absolute pathname.
+      absdir=`cd "$dir" && pwd`
+      test -n "$absdir" && dir="$absdir"
+
+      # Now add the directory to shlibpath_var.
+      if eval "test -z \"\$$shlibpath_var\""; then
+	eval "$shlibpath_var=\"\$dir\""
+      else
+	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+      fi
+    done
+
+    # This variable tells wrapper scripts just to set shlibpath_var
+    # rather than running their programs.
+    libtool_execute_magic="$magic"
+
+    # Check if any of the arguments is a wrapper script.
+    args=
+    for file
+    do
+      case $file in
+      -* | *.la | *.lo ) ;;
+      *)
+	# Do a test to see if this is really a libtool program.
+	if func_ltwrapper_script_p "$file"; then
+	  func_source "$file"
+	  # Transform arg to wrapped name.
+	  file="$progdir/$program"
+	elif func_ltwrapper_executable_p "$file"; then
+	  func_ltwrapper_scriptname "$file"
+	  func_source "$func_ltwrapper_scriptname_result"
+	  # Transform arg to wrapped name.
+	  file="$progdir/$program"
+	fi
+	;;
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      func_append_quoted args "$file"
+    done
+
+    if test "X$opt_dry_run" = Xfalse; then
+      if test -n "$shlibpath_var"; then
+	# Export the shlibpath_var.
+	eval "export $shlibpath_var"
+      fi
+
+      # Restore saved environment variables
+      for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+      do
+	eval "if test \"\${save_$lt_var+set}\" = set; then
+                $lt_var=\$save_$lt_var; export $lt_var
+	      else
+		$lt_unset $lt_var
+	      fi"
+      done
+
+      # Now prepare to actually exec the command.
+      exec_cmd="\$cmd$args"
+    else
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+	eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+	echo "export $shlibpath_var"
+      fi
+      $ECHO "$cmd$args"
+      exit $EXIT_SUCCESS
+    fi
+}
+
+test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+    $opt_debug
+    libs=
+    libdirs=
+    admincmds=
+
+    for opt in "$nonopt" ${1+"$@"}
+    do
+      if test -d "$opt"; then
+	func_append libdirs " $opt"
+
+      elif test -f "$opt"; then
+	if func_lalib_unsafe_p "$opt"; then
+	  func_append libs " $opt"
+	else
+	  func_warning "\`$opt' is not a valid libtool archive"
+	fi
+
+      else
+	func_fatal_error "invalid argument \`$opt'"
+      fi
+    done
+
+    if test -n "$libs"; then
+      if test -n "$lt_sysroot"; then
+        sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"`
+        sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;"
+      else
+        sysroot_cmd=
+      fi
+
+      # Remove sysroot references
+      if $opt_dry_run; then
+        for lib in $libs; do
+          echo "removing references to $lt_sysroot and \`=' prefixes from $lib"
+        done
+      else
+        tmpdir=`func_mktempdir`
+        for lib in $libs; do
+	  sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \
+	    > $tmpdir/tmp-la
+	  mv -f $tmpdir/tmp-la $lib
+	done
+        ${RM}r "$tmpdir"
+      fi
+    fi
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for libdir in $libdirs; do
+	if test -n "$finish_cmds"; then
+	  # Do each command in the finish commands.
+	  func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+	fi
+	if test -n "$finish_eval"; then
+	  # Do the single finish_eval.
+	  eval cmds=\"$finish_eval\"
+	  $opt_dry_run || eval "$cmds" || func_append admincmds "
+       $cmds"
+	fi
+      done
+    fi
+
+    # Exit here if they wanted silent mode.
+    $opt_silent && exit $EXIT_SUCCESS
+
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      echo "----------------------------------------------------------------------"
+      echo "Libraries have been installed in:"
+      for libdir in $libdirs; do
+	$ECHO "   $libdir"
+      done
+      echo
+      echo "If you ever happen to want to link against installed libraries"
+      echo "in a given directory, LIBDIR, you must either use libtool, and"
+      echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+      echo "flag during linking and do at least one of the following:"
+      if test -n "$shlibpath_var"; then
+	echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+	echo "     during execution"
+      fi
+      if test -n "$runpath_var"; then
+	echo "   - add LIBDIR to the \`$runpath_var' environment variable"
+	echo "     during linking"
+      fi
+      if test -n "$hardcode_libdir_flag_spec"; then
+	libdir=LIBDIR
+	eval flag=\"$hardcode_libdir_flag_spec\"
+
+	$ECHO "   - use the \`$flag' linker flag"
+      fi
+      if test -n "$admincmds"; then
+	$ECHO "   - have your system administrator run these commands:$admincmds"
+      fi
+      if test -f /etc/ld.so.conf; then
+	echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+      fi
+      echo
+
+      echo "See any operating system documentation about shared libraries for"
+      case $host in
+	solaris2.[6789]|solaris2.1[0-9])
+	  echo "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+	  echo "pages."
+	  ;;
+	*)
+	  echo "more information, such as the ld(1) and ld.so(8) manual pages."
+	  ;;
+      esac
+      echo "----------------------------------------------------------------------"
+    fi
+    exit $EXIT_SUCCESS
+}
+
+test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+    $opt_debug
+    # There may be an optional sh(1) argument at the beginning of
+    # install_prog (especially on Windows NT).
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+       # Allow the use of GNU shtool's install command.
+       case $nonopt in *shtool*) :;; *) false;; esac; then
+      # Aesthetically quote it.
+      func_quote_for_eval "$nonopt"
+      install_prog="$func_quote_for_eval_result "
+      arg=$1
+      shift
+    else
+      install_prog=
+      arg=$nonopt
+    fi
+
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    func_quote_for_eval "$arg"
+    func_append install_prog "$func_quote_for_eval_result"
+    install_shared_prog=$install_prog
+    case " $install_prog " in
+      *[\\\ /]cp\ *) install_cp=: ;;
+      *) install_cp=false ;;
+    esac
+
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=no
+    stripme=
+    no_mode=:
+    for arg
+    do
+      arg2=
+      if test -n "$dest"; then
+	func_append files " $dest"
+	dest=$arg
+	continue
+      fi
+
+      case $arg in
+      -d) isdir=yes ;;
+      -f)
+	if $install_cp; then :; else
+	  prev=$arg
+	fi
+	;;
+      -g | -m | -o)
+	prev=$arg
+	;;
+      -s)
+	stripme=" -s"
+	continue
+	;;
+      -*)
+	;;
+      *)
+	# If the previous option needed an argument, then skip it.
+	if test -n "$prev"; then
+	  if test "x$prev" = x-m && test -n "$install_override_mode"; then
+	    arg2=$install_override_mode
+	    no_mode=false
+	  fi
+	  prev=
+	else
+	  dest=$arg
+	  continue
+	fi
+	;;
+      esac
+
+      # Aesthetically quote the argument.
+      func_quote_for_eval "$arg"
+      func_append install_prog " $func_quote_for_eval_result"
+      if test -n "$arg2"; then
+	func_quote_for_eval "$arg2"
+      fi
+      func_append install_shared_prog " $func_quote_for_eval_result"
+    done
+
+    test -z "$install_prog" && \
+      func_fatal_help "you must specify an install program"
+
+    test -n "$prev" && \
+      func_fatal_help "the \`$prev' option requires an argument"
+
+    if test -n "$install_override_mode" && $no_mode; then
+      if $install_cp; then :; else
+	func_quote_for_eval "$install_override_mode"
+	func_append install_shared_prog " -m $func_quote_for_eval_result"
+      fi
+    fi
+
+    if test -z "$files"; then
+      if test -z "$dest"; then
+	func_fatal_help "no file or destination specified"
+      else
+	func_fatal_help "you must specify a destination"
+      fi
+    fi
+
+    # Strip any trailing slash from the destination.
+    func_stripname '' '/' "$dest"
+    dest=$func_stripname_result
+
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
+    else
+      func_dirname_and_basename "$dest" "" "."
+      destdir="$func_dirname_result"
+      destname="$func_basename_result"
+
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files; shift
+      test "$#" -gt 1 && \
+	func_fatal_help "\`$dest' is not a directory"
+    fi
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
+    *)
+      for file in $files; do
+	case $file in
+	*.lo) ;;
+	*)
+	  func_fatal_help "\`$destdir' must be an absolute directory name"
+	  ;;
+	esac
+      done
+      ;;
+    esac
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    staticlibs=
+    future_libdirs=
+    current_libdirs=
+    for file in $files; do
+
+      # Do each installation.
+      case $file in
+      *.$libext)
+	# Do the static libraries later.
+	func_append staticlibs " $file"
+	;;
+
+      *.la)
+	func_resolve_sysroot "$file"
+	file=$func_resolve_sysroot_result
+
+	# Check to see that this really is a libtool archive.
+	func_lalib_unsafe_p "$file" \
+	  || func_fatal_help "\`$file' is not a valid libtool archive"
+
+	library_names=
+	old_library=
+	relink_command=
+	func_source "$file"
+
+	# Add the libdir to current_libdirs if it is the destination.
+	if test "X$destdir" = "X$libdir"; then
+	  case "$current_libdirs " in
+	  *" $libdir "*) ;;
+	  *) func_append current_libdirs " $libdir" ;;
+	  esac
+	else
+	  # Note the libdir as a future libdir.
+	  case "$future_libdirs " in
+	  *" $libdir "*) ;;
+	  *) func_append future_libdirs " $libdir" ;;
+	  esac
+	fi
+
+	func_dirname "$file" "/" ""
+	dir="$func_dirname_result"
+	func_append dir "$objdir"
+
+	if test -n "$relink_command"; then
+	  # Determine the prefix the user has applied to our future dir.
+	  inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"`
+
+	  # Don't allow the user to place us outside of our expected
+	  # location b/c this prevents finding dependent libraries that
+	  # are installed to the same prefix.
+	  # At present, this check doesn't affect windows .dll's that
+	  # are installed into $libdir/../bin (currently, that works fine)
+	  # but it's something to keep an eye on.
+	  test "$inst_prefix_dir" = "$destdir" && \
+	    func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+	  if test -n "$inst_prefix_dir"; then
+	    # Stick the inst_prefix_dir data into the link command.
+	    relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+	  else
+	    relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+	  fi
+
+	  func_warning "relinking \`$file'"
+	  func_show_eval "$relink_command" \
+	    'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+	fi
+
+	# See the names of the shared library.
+	set dummy $library_names; shift
+	if test -n "$1"; then
+	  realname="$1"
+	  shift
+
+	  srcname="$realname"
+	  test -n "$relink_command" && srcname="$realname"T
+
+	  # Install the shared library and build the symlinks.
+	  func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
+	      'exit $?'
+	  tstripme="$stripme"
+	  case $host_os in
+	  cygwin* | mingw* | pw32* | cegcc*)
+	    case $realname in
+	    *.dll.a)
+	      tstripme=""
+	      ;;
+	    esac
+	    ;;
+	  esac
+	  if test -n "$tstripme" && test -n "$striplib"; then
+	    func_show_eval "$striplib $destdir/$realname" 'exit $?'
+	  fi
+
+	  if test "$#" -gt 0; then
+	    # Delete the old symlinks, and create new ones.
+	    # Try `ln -sf' first, because the `ln' binary might depend on
+	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
+	    # so we also need to try rm && ln -s.
+	    for linkname
+	    do
+	      test "$linkname" != "$realname" \
+		&& func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+	    done
+	  fi
+
+	  # Do each command in the postinstall commands.
+	  lib="$destdir/$realname"
+	  func_execute_cmds "$postinstall_cmds" 'exit $?'
+	fi
+
+	# Install the pseudo-library for information purposes.
+	func_basename "$file"
+	name="$func_basename_result"
+	instname="$dir/$name"i
+	func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+	# Maybe install the static library, too.
+	test -n "$old_library" && func_append staticlibs " $dir/$old_library"
+	;;
+
+      *.lo)
+	# Install (i.e. copy) a libtool object.
+
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  func_basename "$file"
+	  destfile="$func_basename_result"
+	  destfile="$destdir/$destfile"
+	fi
+
+	# Deduce the name of the destination old-style object file.
+	case $destfile in
+	*.lo)
+	  func_lo2o "$destfile"
+	  staticdest=$func_lo2o_result
+	  ;;
+	*.$objext)
+	  staticdest="$destfile"
+	  destfile=
+	  ;;
+	*)
+	  func_fatal_help "cannot copy a libtool object to \`$destfile'"
+	  ;;
+	esac
+
+	# Install the libtool object if requested.
+	test -n "$destfile" && \
+	  func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+	# Install the old object if enabled.
+	if test "$build_old_libs" = yes; then
+	  # Deduce the name of the old-style object file.
+	  func_lo2o "$file"
+	  staticobj=$func_lo2o_result
+	  func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+	fi
+	exit $EXIT_SUCCESS
+	;;
+
+      *)
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  func_basename "$file"
+	  destfile="$func_basename_result"
+	  destfile="$destdir/$destfile"
+	fi
+
+	# If the file is missing, and there is a .exe on the end, strip it
+	# because it is most likely a libtool script we actually want to
+	# install
+	stripped_ext=""
+	case $file in
+	  *.exe)
+	    if test ! -f "$file"; then
+	      func_stripname '' '.exe' "$file"
+	      file=$func_stripname_result
+	      stripped_ext=".exe"
+	    fi
+	    ;;
+	esac
+
+	# Do a test to see if this is really a libtool program.
+	case $host in
+	*cygwin* | *mingw*)
+	    if func_ltwrapper_executable_p "$file"; then
+	      func_ltwrapper_scriptname "$file"
+	      wrapper=$func_ltwrapper_scriptname_result
+	    else
+	      func_stripname '' '.exe' "$file"
+	      wrapper=$func_stripname_result
+	    fi
+	    ;;
+	*)
+	    wrapper=$file
+	    ;;
+	esac
+	if func_ltwrapper_script_p "$wrapper"; then
+	  notinst_deplibs=
+	  relink_command=
+
+	  func_source "$wrapper"
+
+	  # Check the variables that should have been set.
+	  test -z "$generated_by_libtool_version" && \
+	    func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+	  finalize=yes
+	  for lib in $notinst_deplibs; do
+	    # Check to see that each library is installed.
+	    libdir=
+	    if test -f "$lib"; then
+	      func_source "$lib"
+	    fi
+	    libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test
+	    if test -n "$libdir" && test ! -f "$libfile"; then
+	      func_warning "\`$lib' has not been installed in \`$libdir'"
+	      finalize=no
+	    fi
+	  done
+
+	  relink_command=
+	  func_source "$wrapper"
+
+	  outputname=
+	  if test "$fast_install" = no && test -n "$relink_command"; then
+	    $opt_dry_run || {
+	      if test "$finalize" = yes; then
+	        tmpdir=`func_mktempdir`
+		func_basename "$file$stripped_ext"
+		file="$func_basename_result"
+	        outputname="$tmpdir/$file"
+	        # Replace the output file specification.
+	        relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
+
+	        $opt_silent || {
+	          func_quote_for_expand "$relink_command"
+		  eval "func_echo $func_quote_for_expand_result"
+	        }
+	        if eval "$relink_command"; then :
+	          else
+		  func_error "error: relink \`$file' with the above command before installing it"
+		  $opt_dry_run || ${RM}r "$tmpdir"
+		  continue
+	        fi
+	        file="$outputname"
+	      else
+	        func_warning "cannot relink \`$file'"
+	      fi
+	    }
+	  else
+	    # Install the binary that we compiled earlier.
+	    file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"`
+	  fi
+	fi
+
+	# remove .exe since cygwin /usr/bin/install will append another
+	# one anyway
+	case $install_prog,$host in
+	*/usr/bin/install*,*cygwin*)
+	  case $file:$destfile in
+	  *.exe:*.exe)
+	    # this is ok
+	    ;;
+	  *.exe:*)
+	    destfile=$destfile.exe
+	    ;;
+	  *:*.exe)
+	    func_stripname '' '.exe' "$destfile"
+	    destfile=$func_stripname_result
+	    ;;
+	  esac
+	  ;;
+	esac
+	func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+	$opt_dry_run || if test -n "$outputname"; then
+	  ${RM}r "$tmpdir"
+	fi
+	;;
+      esac
+    done
+
+    for file in $staticlibs; do
+      func_basename "$file"
+      name="$func_basename_result"
+
+      # Set up the ranlib parameters.
+      oldlib="$destdir/$name"
+
+      func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+      if test -n "$stripme" && test -n "$old_striplib"; then
+	func_show_eval "$old_striplib $oldlib" 'exit $?'
+      fi
+
+      # Do each command in the postinstall commands.
+      func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+    done
+
+    test -n "$future_libdirs" && \
+      func_warning "remember to run \`$progname --finish$future_libdirs'"
+
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      $opt_dry_run && current_libdirs=" -n$current_libdirs"
+      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+    else
+      exit $EXIT_SUCCESS
+    fi
+}
+
+test "$opt_mode" = install && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+    $opt_debug
+    my_outputname="$1"
+    my_originator="$2"
+    my_pic_p="${3-no}"
+    my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+    my_dlsyms=
+
+    if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+      if test -n "$NM" && test -n "$global_symbol_pipe"; then
+	my_dlsyms="${my_outputname}S.c"
+      else
+	func_error "not configured to extract global symbols from dlpreopened files"
+      fi
+    fi
+
+    if test -n "$my_dlsyms"; then
+      case $my_dlsyms in
+      "") ;;
+      *.c)
+	# Discover the nlist of each of the dlfiles.
+	nlist="$output_objdir/${my_outputname}.nm"
+
+	func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+	# Parse the name list into a source file.
+	func_verbose "creating $output_objdir/$my_dlsyms"
+
+	$opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4))
+#pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
+#endif
+
+/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
+/* DATA imports from DLLs on WIN32 con't be const, because runtime
+   relocations are performed -- see ld's documentation on pseudo-relocs.  */
+# define LT_DLSYM_CONST
+#elif defined(__osf__)
+/* This system does not cope well with relocations in const data.  */
+# define LT_DLSYM_CONST
+#else
+# define LT_DLSYM_CONST const
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+	if test "$dlself" = yes; then
+	  func_verbose "generating symbol list for \`$output'"
+
+	  $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+	  # Add our own program objects to the symbol list.
+	  progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+	  for progfile in $progfiles; do
+	    func_to_tool_file "$progfile" func_convert_file_msys_to_w32
+	    func_verbose "extracting global C symbols from \`$func_to_tool_file_result'"
+	    $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'"
+	  done
+
+	  if test -n "$exclude_expsyms"; then
+	    $opt_dry_run || {
+	      eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+	      eval '$MV "$nlist"T "$nlist"'
+	    }
+	  fi
+
+	  if test -n "$export_symbols_regex"; then
+	    $opt_dry_run || {
+	      eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+	      eval '$MV "$nlist"T "$nlist"'
+	    }
+	  fi
+
+	  # Prepare the list of exported symbols
+	  if test -z "$export_symbols"; then
+	    export_symbols="$output_objdir/$outputname.exp"
+	    $opt_dry_run || {
+	      $RM $export_symbols
+	      eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+	      case $host in
+	      *cygwin* | *mingw* | *cegcc* )
+                eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+                eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+	        ;;
+	      esac
+	    }
+	  else
+	    $opt_dry_run || {
+	      eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+	      eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+	      eval '$MV "$nlist"T "$nlist"'
+	      case $host in
+	        *cygwin* | *mingw* | *cegcc* )
+	          eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+	          eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+	          ;;
+	      esac
+	    }
+	  fi
+	fi
+
+	for dlprefile in $dlprefiles; do
+	  func_verbose "extracting global C symbols from \`$dlprefile'"
+	  func_basename "$dlprefile"
+	  name="$func_basename_result"
+          case $host in
+	    *cygwin* | *mingw* | *cegcc* )
+	      # if an import library, we need to obtain dlname
+	      if func_win32_import_lib_p "$dlprefile"; then
+	        func_tr_sh "$dlprefile"
+	        eval "curr_lafile=\$libfile_$func_tr_sh_result"
+	        dlprefile_dlbasename=""
+	        if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then
+	          # Use subshell, to avoid clobbering current variable values
+	          dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"`
+	          if test -n "$dlprefile_dlname" ; then
+	            func_basename "$dlprefile_dlname"
+	            dlprefile_dlbasename="$func_basename_result"
+	          else
+	            # no lafile. user explicitly requested -dlpreopen <import library>.
+	            $sharedlib_from_linklib_cmd "$dlprefile"
+	            dlprefile_dlbasename=$sharedlib_from_linklib_result
+	          fi
+	        fi
+	        $opt_dry_run || {
+	          if test -n "$dlprefile_dlbasename" ; then
+	            eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"'
+	          else
+	            func_warning "Could not compute DLL name from $name"
+	            eval '$ECHO ": $name " >> "$nlist"'
+	          fi
+	          func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+	          eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe |
+	            $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'"
+	        }
+	      else # not an import lib
+	        $opt_dry_run || {
+	          eval '$ECHO ": $name " >> "$nlist"'
+	          func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+	          eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+	        }
+	      fi
+	    ;;
+	    *)
+	      $opt_dry_run || {
+	        eval '$ECHO ": $name " >> "$nlist"'
+	        func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32
+	        eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+	      }
+	    ;;
+          esac
+	done
+
+	$opt_dry_run || {
+	  # Make sure we have at least an empty file.
+	  test -f "$nlist" || : > "$nlist"
+
+	  if test -n "$exclude_expsyms"; then
+	    $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+	    $MV "$nlist"T "$nlist"
+	  fi
+
+	  # Try sorting and uniquifying the output.
+	  if $GREP -v "^: " < "$nlist" |
+	      if sort -k 3 </dev/null >/dev/null 2>&1; then
+		sort -k 3
+	      else
+		sort +2
+	      fi |
+	      uniq > "$nlist"S; then
+	    :
+	  else
+	    $GREP -v "^: " < "$nlist" > "$nlist"S
+	  fi
+
+	  if test -f "$nlist"S; then
+	    eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+	  else
+	    echo '/* NONE */' >> "$output_objdir/$my_dlsyms"
+	  fi
+
+	  echo >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols.  */
+typedef struct {
+  const char *name;
+  void *address;
+} lt_dlsymlist;
+extern LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+LT_DLSYM_CONST lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+  { \"$my_originator\", (void *) 0 },"
+
+	  case $need_lib_prefix in
+	  no)
+	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+	    ;;
+	  *)
+	    eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+	    ;;
+	  esac
+	  echo >> "$output_objdir/$my_dlsyms" "\
+  {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+	} # !$opt_dry_run
+
+	pic_flag_for_symtable=
+	case "$compile_command " in
+	*" -static "*) ;;
+	*)
+	  case $host in
+	  # compiling the symbol table file with pic_flag works around
+	  # a FreeBSD bug that causes programs to crash when -lm is
+	  # linked before any other PIC object.  But we must not use
+	  # pic_flag when linking with -static.  The problem exists in
+	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+	    pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+	  *-*-hpux*)
+	    pic_flag_for_symtable=" $pic_flag"  ;;
+	  *)
+	    if test "X$my_pic_p" != Xno; then
+	      pic_flag_for_symtable=" $pic_flag"
+	    fi
+	    ;;
+	  esac
+	  ;;
+	esac
+	symtab_cflags=
+	for arg in $LTCFLAGS; do
+	  case $arg in
+	  -pie | -fpie | -fPIE) ;;
+	  *) func_append symtab_cflags " $arg" ;;
+	  esac
+	done
+
+	# Now compile the dynamic symbol file.
+	func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+	# Clean up the generated files.
+	func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
+	# Transform the symbol file into the correct name.
+	symfileobj="$output_objdir/${my_outputname}S.$objext"
+	case $host in
+	*cygwin* | *mingw* | *cegcc* )
+	  if test -f "$output_objdir/$my_outputname.def"; then
+	    compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+	    finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+	  else
+	    compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+	    finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+	  fi
+	  ;;
+	*)
+	  compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+	  finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"`
+	  ;;
+	esac
+	;;
+      *)
+	func_fatal_error "unknown suffix for \`$my_dlsyms'"
+	;;
+      esac
+    else
+      # We keep going just in case the user didn't refer to
+      # lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
+      # really was required.
+
+      # Nullify the symbol file.
+      compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"`
+      finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"`
+    fi
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+# Despite the name, also deal with 64 bit binaries.
+func_win32_libid ()
+{
+  $opt_debug
+  win32_libid_type="unknown"
+  win32_fileres=`file -L $1 2>/dev/null`
+  case $win32_fileres in
+  *ar\ archive\ import\ library*) # definitely import
+    win32_libid_type="x86 archive import"
+    ;;
+  *ar\ archive*) # could be an import, or static
+    # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD.
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+       $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then
+      func_to_tool_file "$1" func_convert_file_msys_to_w32
+      win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" |
+	$SED -n -e '
+	    1,100{
+		/ I /{
+		    s,.*,import,
+		    p
+		    q
+		}
+	    }'`
+      case $win32_nmres in
+      import*)  win32_libid_type="x86 archive import";;
+      *)        win32_libid_type="x86 archive static";;
+      esac
+    fi
+    ;;
+  *DLL*)
+    win32_libid_type="x86 DLL"
+    ;;
+  *executable*) # but shell scripts are "executable" too...
+    case $win32_fileres in
+    *MS\ Windows\ PE\ Intel*)
+      win32_libid_type="x86 DLL"
+      ;;
+    esac
+    ;;
+  esac
+  $ECHO "$win32_libid_type"
+}
+
+# func_cygming_dll_for_implib ARG
+#
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+# Invoked by eval'ing the libtool variable
+#    $sharedlib_from_linklib_cmd
+# Result is available in the variable
+#    $sharedlib_from_linklib_result
+func_cygming_dll_for_implib ()
+{
+  $opt_debug
+  sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
+}
+
+# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs
+#
+# The is the core of a fallback implementation of a
+# platform-specific function to extract the name of the
+# DLL associated with the specified import library LIBNAME.
+#
+# SECTION_NAME is either .idata$6 or .idata$7, depending
+# on the platform and compiler that created the implib.
+#
+# Echos the name of the DLL associated with the
+# specified import library.
+func_cygming_dll_for_implib_fallback_core ()
+{
+  $opt_debug
+  match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
+  $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
+    $SED '/^Contents of section '"$match_literal"':/{
+      # Place marker at beginning of archive member dllname section
+      s/.*/====MARK====/
+      p
+      d
+    }
+    # These lines can sometimes be longer than 43 characters, but
+    # are always uninteresting
+    /:[	 ]*file format pe[i]\{,1\}-/d
+    /^In archive [^:]*:/d
+    # Ensure marker is printed
+    /^====MARK====/p
+    # Remove all lines with less than 43 characters
+    /^.\{43\}/!d
+    # From remaining lines, remove first 43 characters
+    s/^.\{43\}//' |
+    $SED -n '
+      # Join marker and all lines until next marker into a single line
+      /^====MARK====/ b para
+      H
+      $ b para
+      b
+      :para
+      x
+      s/\n//g
+      # Remove the marker
+      s/^====MARK====//
+      # Remove trailing dots and whitespace
+      s/[\. \t]*$//
+      # Print
+      /./p' |
+    # we now have a list, one entry per line, of the stringified
+    # contents of the appropriate section of all members of the
+    # archive which possess that section. Heuristic: eliminate
+    # all those which have a first or second character that is
+    # a '.' (that is, objdump's representation of an unprintable
+    # character.) This should work for all archives with less than
+    # 0x302f exports -- but will fail for DLLs whose name actually
+    # begins with a literal '.' or a single character followed by
+    # a '.'.
+    #
+    # Of those that remain, print the first one.
+    $SED -e '/^\./d;/^.\./d;q'
+}
+
+# func_cygming_gnu_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is a GNU/binutils-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_gnu_implib_p ()
+{
+  $opt_debug
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
+  test -n "$func_cygming_gnu_implib_tmp"
+}
+
+# func_cygming_ms_implib_p ARG
+# This predicate returns with zero status (TRUE) if
+# ARG is an MS-style import library. Returns
+# with nonzero status (FALSE) otherwise.
+func_cygming_ms_implib_p ()
+{
+  $opt_debug
+  func_to_tool_file "$1" func_convert_file_msys_to_w32
+  func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
+  test -n "$func_cygming_ms_implib_tmp"
+}
+
+# func_cygming_dll_for_implib_fallback ARG
+# Platform-specific function to extract the
+# name of the DLL associated with the specified
+# import library ARG.
+#
+# This fallback implementation is for use when $DLLTOOL
+# does not support the --identify-strict option.
+# Invoked by eval'ing the libtool variable
+#    $sharedlib_from_linklib_cmd
+# Result is available in the variable
+#    $sharedlib_from_linklib_result
+func_cygming_dll_for_implib_fallback ()
+{
+  $opt_debug
+  if func_cygming_gnu_implib_p "$1" ; then
+    # binutils import library
+    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"`
+  elif func_cygming_ms_implib_p "$1" ; then
+    # ms-generated import library
+    sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"`
+  else
+    # unknown
+    sharedlib_from_linklib_result=""
+  fi
+}
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    $opt_debug
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+    if test "$lock_old_archive_extraction" = yes; then
+      lockfile=$f_ex_an_ar_oldlib.lock
+      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+	func_echo "Waiting for $lockfile to be removed"
+	sleep 2
+      done
+    fi
+    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \
+		   'stat=$?; rm -f "$lockfile"; exit $stat'
+    if test "$lock_old_archive_extraction" = yes; then
+      $opt_dry_run || rm -f "$lockfile"
+    fi
+    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+     :
+    else
+      func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+    fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+    $opt_debug
+    my_gentop="$1"; shift
+    my_oldlibs=${1+"$@"}
+    my_oldobjs=""
+    my_xlib=""
+    my_xabs=""
+    my_xdir=""
+
+    for my_xlib in $my_oldlibs; do
+      # Extract the objects.
+      case $my_xlib in
+	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+	*) my_xabs=`pwd`"/$my_xlib" ;;
+      esac
+      func_basename "$my_xlib"
+      my_xlib="$func_basename_result"
+      my_xlib_u=$my_xlib
+      while :; do
+        case " $extracted_archives " in
+	*" $my_xlib_u "*)
+	  func_arith $extracted_serial + 1
+	  extracted_serial=$func_arith_result
+	  my_xlib_u=lt$extracted_serial-$my_xlib ;;
+	*) break ;;
+	esac
+      done
+      extracted_archives="$extracted_archives $my_xlib_u"
+      my_xdir="$my_gentop/$my_xlib_u"
+
+      func_mkdir_p "$my_xdir"
+
+      case $host in
+      *-darwin*)
+	func_verbose "Extracting $my_xabs"
+	# Do not bother doing anything if just a dry run
+	$opt_dry_run || {
+	  darwin_orig_dir=`pwd`
+	  cd $my_xdir || exit $?
+	  darwin_archive=$my_xabs
+	  darwin_curdir=`pwd`
+	  darwin_base_archive=`basename "$darwin_archive"`
+	  darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+	  if test -n "$darwin_arches"; then
+	    darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+	    darwin_arch=
+	    func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+	    for darwin_arch in  $darwin_arches ; do
+	      func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+	      cd "$darwin_curdir"
+	      $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+	    done # $darwin_arches
+            ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+	    darwin_file=
+	    darwin_files=
+	    for darwin_file in $darwin_filelist; do
+	      darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP`
+	      $LIPO -create -output "$darwin_file" $darwin_files
+	    done # $darwin_filelist
+	    $RM -rf unfat-$$
+	    cd "$darwin_orig_dir"
+	  else
+	    cd $darwin_orig_dir
+	    func_extract_an_archive "$my_xdir" "$my_xabs"
+	  fi # $darwin_arches
+	} # !$opt_dry_run
+	;;
+      *)
+        func_extract_an_archive "$my_xdir" "$my_xabs"
+	;;
+      esac
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP`
+    done
+
+    func_extract_archives_result="$my_oldobjs"
+}
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable.  Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take.  If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the $objdir directory.  This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+	func_emit_wrapper_arg1=${1-no}
+
+	$ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variables:
+  generated_by_libtool_version='$macro_version'
+  notinst_deplibs='$notinst_deplibs'
+else
+  # When we are sourced in execute mode, \$file and \$ECHO are already set.
+  if test \"\$libtool_execute_magic\" != \"$magic\"; then
+    file=\"\$0\""
+
+    qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
+    $ECHO "\
+
+# A function that is used when there is no print builtin or printf.
+func_fallback_echo ()
+{
+  eval 'cat <<_LTECHO_EOF
+\$1
+_LTECHO_EOF'
+}
+    ECHO=\"$qECHO\"
+  fi
+
+# Very basic option parsing. These options are (a) specific to
+# the libtool wrapper, (b) are identical between the wrapper
+# /script/ and the wrapper /executable/ which is used only on
+# windows platforms, and (c) all begin with the string "--lt-"
+# (application programs are unlikely to have options which match
+# this pattern).
+#
+# There are only two supported options: --lt-debug and
+# --lt-dump-script. There is, deliberately, no --lt-help.
+#
+# The first argument to this parsing function should be the
+# script's $0 value, followed by "$@".
+lt_option_debug=
+func_parse_lt_options ()
+{
+  lt_script_arg0=\$0
+  shift
+  for lt_opt
+  do
+    case \"\$lt_opt\" in
+    --lt-debug) lt_option_debug=1 ;;
+    --lt-dump-script)
+        lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\`
+        test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=.
+        lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\`
+        cat \"\$lt_dump_D/\$lt_dump_F\"
+        exit 0
+      ;;
+    --lt-*)
+        \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2
+        exit 1
+      ;;
+    esac
+  done
+
+  # Print the debug banner immediately:
+  if test -n \"\$lt_option_debug\"; then
+    echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2
+  fi
+}
+
+# Used when --lt-debug. Prints its arguments to stdout
+# (redirection is the responsibility of the caller)
+func_lt_dump_args ()
+{
+  lt_dump_args_N=1;
+  for lt_arg
+  do
+    \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\"
+    lt_dump_args_N=\`expr \$lt_dump_args_N + 1\`
+  done
+}
+
+# Core function for launching the target application
+func_exec_program_core ()
+{
+"
+  case $host in
+  # Backslashes separate directories on plain windows
+  *-*-mingw | *-*-os2* | *-cegcc*)
+    $ECHO "\
+      if test -n \"\$lt_option_debug\"; then
+        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2
+        func_lt_dump_args \${1+\"\$@\"} 1>&2
+      fi
+      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+    ;;
+
+  *)
+    $ECHO "\
+      if test -n \"\$lt_option_debug\"; then
+        \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2
+        func_lt_dump_args \${1+\"\$@\"} 1>&2
+      fi
+      exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+    ;;
+  esac
+  $ECHO "\
+      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+      exit 1
+}
+
+# A function to encapsulate launching the target application
+# Strips options in the --lt-* namespace from \$@ and
+# launches target application with the remaining arguments.
+func_exec_program ()
+{
+  for lt_wr_arg
+  do
+    case \$lt_wr_arg in
+    --lt-*) ;;
+    *) set x \"\$@\" \"\$lt_wr_arg\"; shift;;
+    esac
+    shift
+  done
+  func_exec_program_core \${1+\"\$@\"}
+}
+
+  # Parse options
+  func_parse_lt_options \"\$0\" \${1+\"\$@\"}
+
+  # Find the directory that this script lives in.
+  thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\`
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+  # Follow symbolic links until we get to the real thisdir.
+  file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\`
+  while test -n \"\$file\"; do
+    destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\`
+
+    # If there was a directory component, then change thisdir.
+    if test \"x\$destdir\" != \"x\$file\"; then
+      case \"\$destdir\" in
+      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+      *) thisdir=\"\$thisdir/\$destdir\" ;;
+      esac
+    fi
+
+    file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\`
+  done
+
+  # Usually 'no', except on cygwin/mingw when embedded into
+  # the cwrapper.
+  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
+  if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+    # special case for '.'
+    if test \"\$thisdir\" = \".\"; then
+      thisdir=\`pwd\`
+    fi
+    # remove .libs from thisdir
+    case \"\$thisdir\" in
+    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;;
+    $objdir )   thisdir=. ;;
+    esac
+  fi
+
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+	if test "$fast_install" = yes; then
+	  $ECHO "\
+  program=lt-'$outputname'$exeext
+  progdir=\"\$thisdir/$objdir\"
+
+  if test ! -f \"\$progdir/\$program\" ||
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+    file=\"\$\$-\$program\"
+
+    if test ! -d \"\$progdir\"; then
+      $MKDIR \"\$progdir\"
+    else
+      $RM \"\$progdir/\$file\"
+    fi"
+
+	  $ECHO "\
+
+    # relink executable if necessary
+    if test -n \"\$relink_command\"; then
+      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+      else
+	$ECHO \"\$relink_command_output\" >&2
+	$RM \"\$progdir/\$file\"
+	exit 1
+      fi
+    fi
+
+    $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $RM \"\$progdir/\$program\";
+      $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $RM \"\$progdir/\$file\"
+  fi"
+	else
+	  $ECHO "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+	fi
+
+	$ECHO "\
+
+  if test -f \"\$progdir/\$program\"; then"
+
+	# fixup the dll searchpath if we need to.
+	#
+	# Fix the DLL searchpath if we need to.  Do this before prepending
+	# to shlibpath, because on Windows, both are PATH and uninstalled
+	# libraries must come first.
+	if test -n "$dllsearchpath"; then
+	  $ECHO "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+	fi
+
+	# Export our shlibpath_var if we have one.
+	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	  $ECHO "\
+    # Add our own library path to $shlibpath_var
+    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+    # Some systems cannot cope with colon-terminated $shlibpath_var
+    # The second colon is a workaround for a bug in BeOS R4 sed
+    $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\`
+
+    export $shlibpath_var
+"
+	fi
+
+	$ECHO "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+      func_exec_program \${1+\"\$@\"}
+    fi
+  else
+    # The program doesn't exist.
+    \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+    \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+    \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+    exit 1
+  fi
+fi\
+"
+}
+
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+	cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+   Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+
+   The $output program cannot be directly executed until all the libtool
+   libraries that it depends on are installed.
+
+   This wrapper executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
+*/
+EOF
+	    cat <<"EOF"
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+#  include <io.h>
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+/* declarations of non-ANSI functions */
+#if defined(__MINGW32__)
+# ifdef __STRICT_ANSI__
+int _putenv (const char *);
+# endif
+#elif defined(__CYGWIN__)
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+/* #elif defined (other platforms) ... */
+#endif
+
+/* portability defines, excluding path handling macros */
+#if defined(_MSC_VER)
+# define setmode _setmode
+# define stat    _stat
+# define chmod   _chmod
+# define getcwd  _getcwd
+# define putenv  _putenv
+# define S_IXUSR _S_IEXEC
+# ifndef _INTPTR_T_DEFINED
+#  define _INTPTR_T_DEFINED
+#  define intptr_t int
+# endif
+#elif defined(__MINGW32__)
+# define setmode _setmode
+# define stat    _stat
+# define chmod   _chmod
+# define getcwd  _getcwd
+# define putenv  _putenv
+#elif defined(__CYGWIN__)
+# define HAVE_SETENV
+# define FOPEN_WB "wb"
+/* #elif defined (other platforms) ... */
+#endif
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+/* path handling portability macros */
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+  defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+#  define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+#  define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+	(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+#if defined(LT_DEBUGWRAPPER)
+static int lt_debug = 1;
+#else
+static int lt_debug = 0;
+#endif
+
+const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_debugprintf (const char *file, int line, const char *fmt, ...);
+void lt_fatal (const char *file, int line, const char *message, ...);
+static const char *nonnull (const char *s);
+static const char *nonempty (const char *s);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+char **prepare_spawn (char **argv);
+void lt_dump_script (FILE *f);
+EOF
+
+	    cat <<EOF
+volatile const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+	    if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+              func_to_host_path "$temp_rpath"
+	      cat <<EOF
+const char * LIB_PATH_VALUE   = "$func_to_host_path_result";
+EOF
+	    else
+	      cat <<"EOF"
+const char * LIB_PATH_VALUE   = "";
+EOF
+	    fi
+
+	    if test -n "$dllsearchpath"; then
+              func_to_host_path "$dllsearchpath:"
+	      cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE   = "$func_to_host_path_result";
+EOF
+	    else
+	      cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE   = "";
+EOF
+	    fi
+
+	    if test "$fast_install" = yes; then
+	      cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+	    else
+	      cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+	    fi
+
+
+	    cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX         "--lt-"
+
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+static const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX "dump-script";
+static const char *debug_opt            = LTWRAPPER_OPTION_PREFIX "debug";
+
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int  newargc;
+  char *tmp_pathspec;
+  char *actual_cwrapper_path;
+  char *actual_cwrapper_name;
+  char *target_name;
+  char *lt_argv_zero;
+  intptr_t rval = 127;
+
+  int i;
+
+  program_name = (char *) xstrdup (base_name (argv[0]));
+  newargz = XMALLOC (char *, argc + 1);
+
+  /* very simple arg parsing; don't want to rely on getopt
+   * also, copy all non cwrapper options to newargz, except
+   * argz[0], which is handled differently
+   */
+  newargc=0;
+  for (i = 1; i < argc; i++)
+    {
+      if (strcmp (argv[i], dumpscript_opt) == 0)
+	{
+EOF
+	    case "$host" in
+	      *mingw* | *cygwin* )
+		# make stdout use "unix" line endings
+		echo "          setmode(1,_O_BINARY);"
+		;;
+	      esac
+
+	    cat <<"EOF"
+	  lt_dump_script (stdout);
+	  return 0;
+	}
+      if (strcmp (argv[i], debug_opt) == 0)
+	{
+          lt_debug = 1;
+          continue;
+	}
+      if (strcmp (argv[i], ltwrapper_option_prefix) == 0)
+        {
+          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+             namespace, but it is not one of the ones we know about and
+             have already dealt with, above (inluding dump-script), then
+             report an error. Otherwise, targets might begin to believe
+             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+             namespace. The first time any user complains about this, we'll
+             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+             or a configure.ac-settable value.
+           */
+          lt_fatal (__FILE__, __LINE__,
+		    "unrecognized %s option: '%s'",
+                    ltwrapper_option_prefix, argv[i]);
+        }
+      /* otherwise ... */
+      newargz[++newargc] = xstrdup (argv[i]);
+    }
+  newargz[++newargc] = NULL;
+
+EOF
+	    cat <<EOF
+  /* The GNU banner must be the first non-error debug message */
+  lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\n");
+EOF
+	    cat <<"EOF"
+  lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]);
+  lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name);
+
+  tmp_pathspec = find_executable (argv[0]);
+  if (tmp_pathspec == NULL)
+    lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]);
+  lt_debugprintf (__FILE__, __LINE__,
+                  "(main) found exe (before symlink chase) at: %s\n",
+		  tmp_pathspec);
+
+  actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+  lt_debugprintf (__FILE__, __LINE__,
+                  "(main) found exe (after symlink chase) at: %s\n",
+		  actual_cwrapper_path);
+  XFREE (tmp_pathspec);
+
+  actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path));
+  strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+  /* wrapper name transforms */
+  strendzap (actual_cwrapper_name, ".exe");
+  tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+  XFREE (actual_cwrapper_name);
+  actual_cwrapper_name = tmp_pathspec;
+  tmp_pathspec = 0;
+
+  /* target_name transforms -- use actual target program name; might have lt- prefix */
+  target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+  strendzap (target_name, ".exe");
+  tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+  XFREE (target_name);
+  target_name = tmp_pathspec;
+  tmp_pathspec = 0;
+
+  lt_debugprintf (__FILE__, __LINE__,
+		  "(main) libtool target name: %s\n",
+		  target_name);
+EOF
+
+	    cat <<EOF
+  newargz[0] =
+    XMALLOC (char, (strlen (actual_cwrapper_path) +
+		    strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+  strcpy (newargz[0], actual_cwrapper_path);
+  strcat (newargz[0], "$objdir");
+  strcat (newargz[0], "/");
+EOF
+
+	    cat <<"EOF"
+  /* stop here, and copy so we don't have to do this twice */
+  tmp_pathspec = xstrdup (newargz[0]);
+
+  /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+  strcat (newargz[0], actual_cwrapper_name);
+
+  /* DO want the lt- prefix here if it exists, so use target_name */
+  lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+  XFREE (tmp_pathspec);
+  tmp_pathspec = NULL;
+EOF
+
+	    case $host_os in
+	      mingw*)
+	    cat <<"EOF"
+  {
+    char* p;
+    while ((p = strchr (newargz[0], '\\')) != NULL)
+      {
+	*p = '/';
+      }
+    while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+      {
+	*p = '/';
+      }
+  }
+EOF
+	    ;;
+	    esac
+
+	    cat <<"EOF"
+  XFREE (target_name);
+  XFREE (actual_cwrapper_path);
+  XFREE (actual_cwrapper_name);
+
+  lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+  lt_setenv ("DUALCASE", "1");  /* for MSK sh */
+  /* Update the DLL searchpath.  EXE_PATH_VALUE ($dllsearchpath) must
+     be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath)
+     because on Windows, both *_VARNAMEs are PATH but uninstalled
+     libraries must come first. */
+  lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+
+  lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n",
+		  nonnull (lt_argv_zero));
+  for (i = 0; i < newargc; i++)
+    {
+      lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n",
+		      i, nonnull (newargz[i]));
+    }
+
+EOF
+
+	    case $host_os in
+	      mingw*)
+		cat <<"EOF"
+  /* execv doesn't actually work on mingw as expected on unix */
+  newargz = prepare_spawn (newargz);
+  rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+  if (rval == -1)
+    {
+      /* failed to start process */
+      lt_debugprintf (__FILE__, __LINE__,
+		      "(main) failed to launch target \"%s\": %s\n",
+		      lt_argv_zero, nonnull (strerror (errno)));
+      return 127;
+    }
+  return rval;
+EOF
+		;;
+	      *)
+		cat <<"EOF"
+  execv (lt_argv_zero, newargz);
+  return rval; /* =127, but avoids unused variable warning */
+EOF
+		;;
+	    esac
+
+	    cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+  void *p = (void *) malloc (num);
+  if (!p)
+    lt_fatal (__FILE__, __LINE__, "memory exhausted");
+
+  return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+			  string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+  const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+    name += 2;
+#endif
+
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return base;
+}
+
+int
+check_executable (const char *path)
+{
+  struct stat st;
+
+  lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n",
+                  nonempty (path));
+  if ((!path) || (!*path))
+    return 0;
+
+  if ((stat (path, &st) >= 0)
+      && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+    return 1;
+  else
+    return 0;
+}
+
+int
+make_executable (const char *path)
+{
+  int rval = 0;
+  struct stat st;
+
+  lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n",
+                  nonempty (path));
+  if ((!path) || (!*path))
+    return 0;
+
+  if (stat (path, &st) >= 0)
+    {
+      rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+    }
+  return rval;
+}
+
+/* Searches for the full path of the wrapper.  Returns
+   newly allocated full path name if found, NULL otherwise
+   Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+  int has_slash = 0;
+  const char *p;
+  const char *p_next;
+  /* static buffer for getcwd */
+  char tmp[LT_PATHMAX + 1];
+  int tmp_len;
+  char *concat_name;
+
+  lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n",
+                  nonempty (wrapper));
+
+  if ((wrapper == NULL) || (*wrapper == '\0'))
+    return NULL;
+
+  /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+    {
+      concat_name = xstrdup (wrapper);
+      if (check_executable (concat_name))
+	return concat_name;
+      XFREE (concat_name);
+    }
+  else
+    {
+#endif
+      if (IS_DIR_SEPARATOR (wrapper[0]))
+	{
+	  concat_name = xstrdup (wrapper);
+	  if (check_executable (concat_name))
+	    return concat_name;
+	  XFREE (concat_name);
+	}
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+    }
+#endif
+
+  for (p = wrapper; *p; p++)
+    if (*p == '/')
+      {
+	has_slash = 1;
+	break;
+      }
+  if (!has_slash)
+    {
+      /* no slashes; search PATH */
+      const char *path = getenv ("PATH");
+      if (path != NULL)
+	{
+	  for (p = path; *p; p = p_next)
+	    {
+	      const char *q;
+	      size_t p_len;
+	      for (q = p; *q; q++)
+		if (IS_PATH_SEPARATOR (*q))
+		  break;
+	      p_len = q - p;
+	      p_next = (*q == '\0' ? q : q + 1);
+	      if (p_len == 0)
+		{
+		  /* empty path: current directory */
+		  if (getcwd (tmp, LT_PATHMAX) == NULL)
+		    lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+                              nonnull (strerror (errno)));
+		  tmp_len = strlen (tmp);
+		  concat_name =
+		    XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+		  memcpy (concat_name, tmp, tmp_len);
+		  concat_name[tmp_len] = '/';
+		  strcpy (concat_name + tmp_len + 1, wrapper);
+		}
+	      else
+		{
+		  concat_name =
+		    XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+		  memcpy (concat_name, p, p_len);
+		  concat_name[p_len] = '/';
+		  strcpy (concat_name + p_len + 1, wrapper);
+		}
+	      if (check_executable (concat_name))
+		return concat_name;
+	      XFREE (concat_name);
+	    }
+	}
+      /* not found in PATH; assume curdir */
+    }
+  /* Relative path | not found in path: prepend cwd */
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
+    lt_fatal (__FILE__, __LINE__, "getcwd failed: %s",
+              nonnull (strerror (errno)));
+  tmp_len = strlen (tmp);
+  concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+  memcpy (concat_name, tmp, tmp_len);
+  concat_name[tmp_len] = '/';
+  strcpy (concat_name + tmp_len + 1, wrapper);
+
+  if (check_executable (concat_name))
+    return concat_name;
+  XFREE (concat_name);
+  return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+  return xstrdup (pathspec);
+#else
+  char buf[LT_PATHMAX];
+  struct stat s;
+  char *tmp_pathspec = xstrdup (pathspec);
+  char *p;
+  int has_symlinks = 0;
+  while (strlen (tmp_pathspec) && !has_symlinks)
+    {
+      lt_debugprintf (__FILE__, __LINE__,
+		      "checking path component for symlinks: %s\n",
+		      tmp_pathspec);
+      if (lstat (tmp_pathspec, &s) == 0)
+	{
+	  if (S_ISLNK (s.st_mode) != 0)
+	    {
+	      has_symlinks = 1;
+	      break;
+	    }
+
+	  /* search backwards for last DIR_SEPARATOR */
+	  p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+	  while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+	    p--;
+	  if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+	    {
+	      /* no more DIR_SEPARATORS left */
+	      break;
+	    }
+	  *p = '\0';
+	}
+      else
+	{
+	  lt_fatal (__FILE__, __LINE__,
+		    "error accessing file \"%s\": %s",
+		    tmp_pathspec, nonnull (strerror (errno)));
+	}
+    }
+  XFREE (tmp_pathspec);
+
+  if (!has_symlinks)
+    {
+      return xstrdup (pathspec);
+    }
+
+  tmp_pathspec = realpath (pathspec, buf);
+  if (tmp_pathspec == 0)
+    {
+      lt_fatal (__FILE__, __LINE__,
+		"could not follow symlinks for %s", pathspec);
+    }
+  return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+  size_t len, patlen;
+
+  assert (str != NULL);
+  assert (pat != NULL);
+
+  len = strlen (str);
+  patlen = strlen (pat);
+
+  if (patlen <= len)
+    {
+      str += len - patlen;
+      if (strcmp (str, pat) == 0)
+	*str = '\0';
+    }
+  return str;
+}
+
+void
+lt_debugprintf (const char *file, int line, const char *fmt, ...)
+{
+  va_list args;
+  if (lt_debug)
+    {
+      (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line);
+      va_start (args, fmt);
+      (void) vfprintf (stderr, fmt, args);
+      va_end (args);
+    }
+}
+
+static void
+lt_error_core (int exit_status, const char *file,
+	       int line, const char *mode,
+	       const char *message, va_list ap)
+{
+  fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
+
+  if (exit_status >= 0)
+    exit (exit_status);
+}
+
+void
+lt_fatal (const char *file, int line, const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap);
+  va_end (ap);
+}
+
+static const char *
+nonnull (const char *s)
+{
+  return s ? s : "(null)";
+}
+
+static const char *
+nonempty (const char *s)
+{
+  return (s && !*s) ? "(empty)" : nonnull (s);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+  lt_debugprintf (__FILE__, __LINE__,
+		  "(lt_setenv) setting '%s' to '%s'\n",
+                  nonnull (name), nonnull (value));
+  {
+#ifdef HAVE_SETENV
+    /* always make a copy, for consistency with !HAVE_SETENV */
+    char *str = xstrdup (value);
+    setenv (name, str, 1);
+#else
+    int len = strlen (name) + 1 + strlen (value) + 1;
+    char *str = XMALLOC (char, len);
+    sprintf (str, "%s=%s", name, value);
+    if (putenv (str) != EXIT_SUCCESS)
+      {
+        XFREE (str);
+      }
+#endif
+  }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+  char *new_value;
+  if (orig_value && *orig_value)
+    {
+      int orig_value_len = strlen (orig_value);
+      int add_len = strlen (add);
+      new_value = XMALLOC (char, add_len + orig_value_len + 1);
+      if (to_end)
+        {
+          strcpy (new_value, orig_value);
+          strcpy (new_value + orig_value_len, add);
+        }
+      else
+        {
+          strcpy (new_value, add);
+          strcpy (new_value + add_len, orig_value);
+        }
+    }
+  else
+    {
+      new_value = xstrdup (add);
+    }
+  return new_value;
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+  lt_debugprintf (__FILE__, __LINE__,
+		  "(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+                  nonnull (name), nonnull (value));
+
+  if (name && *name && value && *value)
+    {
+      char *new_value = lt_extend_str (getenv (name), value, 0);
+      /* some systems can't cope with a ':'-terminated path #' */
+      int len = strlen (new_value);
+      while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+        {
+          new_value[len-1] = '\0';
+        }
+      lt_setenv (name, new_value);
+      XFREE (new_value);
+    }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+  lt_debugprintf (__FILE__, __LINE__,
+		  "(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+                  nonnull (name), nonnull (value));
+
+  if (name && *name && value && *value)
+    {
+      char *new_value = lt_extend_str (getenv (name), value, 0);
+      lt_setenv (name, new_value);
+      XFREE (new_value);
+    }
+}
+
+EOF
+	    case $host_os in
+	      mingw*)
+		cat <<"EOF"
+
+/* Prepares an argument vector before calling spawn().
+   Note that spawn() does not by itself call the command interpreter
+     (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
+      ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+         GetVersionEx(&v);
+         v.dwPlatformId == VER_PLATFORM_WIN32_NT;
+      }) ? "cmd.exe" : "command.com").
+   Instead it simply concatenates the arguments, separated by ' ', and calls
+   CreateProcess().  We must quote the arguments since Win32 CreateProcess()
+   interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
+   special way:
+   - Space and tab are interpreted as delimiters. They are not treated as
+     delimiters if they are surrounded by double quotes: "...".
+   - Unescaped double quotes are removed from the input. Their only effect is
+     that within double quotes, space and tab are treated like normal
+     characters.
+   - Backslashes not followed by double quotes are not special.
+   - But 2*n+1 backslashes followed by a double quote become
+     n backslashes followed by a double quote (n >= 0):
+       \" -> "
+       \\\" -> \"
+       \\\\\" -> \\"
+ */
+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+char **
+prepare_spawn (char **argv)
+{
+  size_t argc;
+  char **new_argv;
+  size_t i;
+
+  /* Count number of arguments.  */
+  for (argc = 0; argv[argc] != NULL; argc++)
+    ;
+
+  /* Allocate new argument vector.  */
+  new_argv = XMALLOC (char *, argc + 1);
+
+  /* Put quoted arguments into the new argument vector.  */
+  for (i = 0; i < argc; i++)
+    {
+      const char *string = argv[i];
+
+      if (string[0] == '\0')
+	new_argv[i] = xstrdup ("\"\"");
+      else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
+	{
+	  int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
+	  size_t length;
+	  unsigned int backslashes;
+	  const char *s;
+	  char *quoted_string;
+	  char *p;
+
+	  length = 0;
+	  backslashes = 0;
+	  if (quote_around)
+	    length++;
+	  for (s = string; *s != '\0'; s++)
+	    {
+	      char c = *s;
+	      if (c == '"')
+		length += backslashes + 1;
+	      length++;
+	      if (c == '\\')
+		backslashes++;
+	      else
+		backslashes = 0;
+	    }
+	  if (quote_around)
+	    length += backslashes + 1;
+
+	  quoted_string = XMALLOC (char, length + 1);
+
+	  p = quoted_string;
+	  backslashes = 0;
+	  if (quote_around)
+	    *p++ = '"';
+	  for (s = string; *s != '\0'; s++)
+	    {
+	      char c = *s;
+	      if (c == '"')
+		{
+		  unsigned int j;
+		  for (j = backslashes + 1; j > 0; j--)
+		    *p++ = '\\';
+		}
+	      *p++ = c;
+	      if (c == '\\')
+		backslashes++;
+	      else
+		backslashes = 0;
+	    }
+	  if (quote_around)
+	    {
+	      unsigned int j;
+	      for (j = backslashes; j > 0; j--)
+		*p++ = '\\';
+	      *p++ = '"';
+	    }
+	  *p = '\0';
+
+	  new_argv[i] = quoted_string;
+	}
+      else
+	new_argv[i] = (char *) string;
+    }
+  new_argv[argc] = NULL;
+
+  return new_argv;
+}
+EOF
+		;;
+	    esac
+
+            cat <<"EOF"
+void lt_dump_script (FILE* f)
+{
+EOF
+	    func_emit_wrapper yes |
+              $SED -e 's/\([\\"]\)/\\\1/g' \
+	           -e 's/^/  fputs ("/' -e 's/$/\\n", f);/'
+
+            cat <<"EOF"
+}
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_win32_import_lib_p ARG
+# True if ARG is an import lib, as indicated by $file_magic_cmd
+func_win32_import_lib_p ()
+{
+    $opt_debug
+    case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
+    *import*) : ;;
+    *) false ;;
+    esac
+}
+
+# func_mode_link arg...
+func_mode_link ()
+{
+    $opt_debug
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+      # It is impossible to link a dll without this setting, and
+      # we shouldn't force the makefile maintainer to figure out
+      # which system we are compiling for in order to pass an extra
+      # flag for every libtool invocation.
+      # allow_undefined=no
+
+      # FIXME: Unfortunately, there are problems with the above when trying
+      # to make a dll which has undefined symbols, in which case not
+      # even a static library is built.  For now, we need to specify
+      # -no-undefined on the libtool link line when we can be certain
+      # that all symbols are satisfied, otherwise we get a static library.
+      allow_undefined=yes
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    libtool_args=$nonopt
+    base_compile="$nonopt $@"
+    compile_command=$nonopt
+    finalize_command=$nonopt
+
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    old_deplibs=
+    compiler_flags=
+    linker_flags=
+    dllsearchpath=
+    lib_search_path=`pwd`
+    inst_prefix_dir=
+    new_inherited_linker_flags=
+
+    avoid_version=no
+    bindir=
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    ltlibs=
+    module=no
+    no_install=no
+    objs=
+    non_pic_objects=
+    precious_files_regex=
+    prefer_static_libs=no
+    preload=no
+    prev=
+    prevarg=
+    release=
+    rpath=
+    xrpath=
+    perm_rpath=
+    temp_rpath=
+    thread_safe=no
+    vinfo=
+    vinfo_number=no
+    weak_libs=
+    single_module="${wl}-single_module"
+    func_infer_tag $base_compile
+
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case $arg in
+      -shared)
+	test "$build_libtool_libs" != yes && \
+	  func_fatal_configuration "can not build a shared library"
+	build_old_libs=no
+	break
+	;;
+      -all-static | -static | -static-libtool-libs)
+	case $arg in
+	-all-static)
+	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+	    func_warning "complete static linking is impossible in this configuration"
+	  fi
+	  if test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=yes
+	  ;;
+	-static)
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=built
+	  ;;
+	-static-libtool-libs)
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=yes
+	  ;;
+	esac
+	build_libtool_libs=no
+	build_old_libs=yes
+	break
+	;;
+      esac
+    done
+
+    # See if our shared archives depend on static archives.
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+    # Go through the arguments, transforming them on the way.
+    while test "$#" -gt 0; do
+      arg="$1"
+      shift
+      func_quote_for_eval "$arg"
+      qarg=$func_quote_for_eval_unquoted_result
+      func_append libtool_args " $func_quote_for_eval_result"
+
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+	case $prev in
+	output)
+	  func_append compile_command " @OUTPUT@"
+	  func_append finalize_command " @OUTPUT@"
+	  ;;
+	esac
+
+	case $prev in
+	bindir)
+	  bindir="$arg"
+	  prev=
+	  continue
+	  ;;
+	dlfiles|dlprefiles)
+	  if test "$preload" = no; then
+	    # Add the symbol object into the linking commands.
+	    func_append compile_command " @SYMFILE@"
+	    func_append finalize_command " @SYMFILE@"
+	    preload=yes
+	  fi
+	  case $arg in
+	  *.la | *.lo) ;;  # We handle these cases below.
+	  force)
+	    if test "$dlself" = no; then
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  self)
+	    if test "$prev" = dlprefiles; then
+	      dlself=yes
+	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+	      dlself=yes
+	    else
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  *)
+	    if test "$prev" = dlfiles; then
+	      func_append dlfiles " $arg"
+	    else
+	      func_append dlprefiles " $arg"
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  esac
+	  ;;
+	expsyms)
+	  export_symbols="$arg"
+	  test -f "$arg" \
+	    || func_fatal_error "symbol file \`$arg' does not exist"
+	  prev=
+	  continue
+	  ;;
+	expsyms_regex)
+	  export_symbols_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	framework)
+	  case $host in
+	    *-*-darwin*)
+	      case "$deplibs " in
+		*" $qarg.ltframework "*) ;;
+		*) func_append deplibs " $qarg.ltframework" # this is fixed later
+		   ;;
+	      esac
+	      ;;
+	  esac
+	  prev=
+	  continue
+	  ;;
+	inst_prefix)
+	  inst_prefix_dir="$arg"
+	  prev=
+	  continue
+	  ;;
+	objectlist)
+	  if test -f "$arg"; then
+	    save_arg=$arg
+	    moreargs=
+	    for fil in `cat "$save_arg"`
+	    do
+#	      func_append moreargs " $fil"
+	      arg=$fil
+	      # A libtool-controlled object.
+
+	      # Check to see that this really is a libtool object.
+	      if func_lalib_unsafe_p "$arg"; then
+		pic_object=
+		non_pic_object=
+
+		# Read the .lo file
+		func_source "$arg"
+
+		if test -z "$pic_object" ||
+		   test -z "$non_pic_object" ||
+		   test "$pic_object" = none &&
+		   test "$non_pic_object" = none; then
+		  func_fatal_error "cannot find name of object for \`$arg'"
+		fi
+
+		# Extract subdirectory from the argument.
+		func_dirname "$arg" "/" ""
+		xdir="$func_dirname_result"
+
+		if test "$pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  pic_object="$xdir$pic_object"
+
+		  if test "$prev" = dlfiles; then
+		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		      func_append dlfiles " $pic_object"
+		      prev=
+		      continue
+		    else
+		      # If libtool objects are unsupported, then we need to preload.
+		      prev=dlprefiles
+		    fi
+		  fi
+
+		  # CHECK ME:  I think I busted this.  -Ossama
+		  if test "$prev" = dlprefiles; then
+		    # Preload the old-style object.
+		    func_append dlprefiles " $pic_object"
+		    prev=
+		  fi
+
+		  # A PIC object.
+		  func_append libobjs " $pic_object"
+		  arg="$pic_object"
+		fi
+
+		# Non-PIC object.
+		if test "$non_pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  non_pic_object="$xdir$non_pic_object"
+
+		  # A standard non-PIC object
+		  func_append non_pic_objects " $non_pic_object"
+		  if test -z "$pic_object" || test "$pic_object" = none ; then
+		    arg="$non_pic_object"
+		  fi
+		else
+		  # If the PIC object exists, use it instead.
+		  # $xdir was prepended to $pic_object above.
+		  non_pic_object="$pic_object"
+		  func_append non_pic_objects " $non_pic_object"
+		fi
+	      else
+		# Only an error if not doing a dry-run.
+		if $opt_dry_run; then
+		  # Extract subdirectory from the argument.
+		  func_dirname "$arg" "/" ""
+		  xdir="$func_dirname_result"
+
+		  func_lo2o "$arg"
+		  pic_object=$xdir$objdir/$func_lo2o_result
+		  non_pic_object=$xdir$func_lo2o_result
+		  func_append libobjs " $pic_object"
+		  func_append non_pic_objects " $non_pic_object"
+	        else
+		  func_fatal_error "\`$arg' is not a valid libtool object"
+		fi
+	      fi
+	    done
+	  else
+	    func_fatal_error "link input file \`$arg' does not exist"
+	  fi
+	  arg=$save_arg
+	  prev=
+	  continue
+	  ;;
+	precious_regex)
+	  precious_files_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	release)
+	  release="-$arg"
+	  prev=
+	  continue
+	  ;;
+	rpath | xrpath)
+	  # We need an absolute path.
+	  case $arg in
+	  [\\/]* | [A-Za-z]:[\\/]*) ;;
+	  *)
+	    func_fatal_error "only absolute run-paths are allowed"
+	    ;;
+	  esac
+	  if test "$prev" = rpath; then
+	    case "$rpath " in
+	    *" $arg "*) ;;
+	    *) func_append rpath " $arg" ;;
+	    esac
+	  else
+	    case "$xrpath " in
+	    *" $arg "*) ;;
+	    *) func_append xrpath " $arg" ;;
+	    esac
+	  fi
+	  prev=
+	  continue
+	  ;;
+	shrext)
+	  shrext_cmds="$arg"
+	  prev=
+	  continue
+	  ;;
+	weak)
+	  func_append weak_libs " $arg"
+	  prev=
+	  continue
+	  ;;
+	xcclinker)
+	  func_append linker_flags " $qarg"
+	  func_append compiler_flags " $qarg"
+	  prev=
+	  func_append compile_command " $qarg"
+	  func_append finalize_command " $qarg"
+	  continue
+	  ;;
+	xcompiler)
+	  func_append compiler_flags " $qarg"
+	  prev=
+	  func_append compile_command " $qarg"
+	  func_append finalize_command " $qarg"
+	  continue
+	  ;;
+	xlinker)
+	  func_append linker_flags " $qarg"
+	  func_append compiler_flags " $wl$qarg"
+	  prev=
+	  func_append compile_command " $wl$qarg"
+	  func_append finalize_command " $wl$qarg"
+	  continue
+	  ;;
+	*)
+	  eval "$prev=\"\$arg\""
+	  prev=
+	  continue
+	  ;;
+	esac
+      fi # test -n "$prev"
+
+      prevarg="$arg"
+
+      case $arg in
+      -all-static)
+	if test -n "$link_static_flag"; then
+	  # See comment for -static flag below, for more details.
+	  func_append compile_command " $link_static_flag"
+	  func_append finalize_command " $link_static_flag"
+	fi
+	continue
+	;;
+
+      -allow-undefined)
+	# FIXME: remove this flag sometime in the future.
+	func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+	;;
+
+      -avoid-version)
+	avoid_version=yes
+	continue
+	;;
+
+      -bindir)
+	prev=bindir
+	continue
+	;;
+
+      -dlopen)
+	prev=dlfiles
+	continue
+	;;
+
+      -dlpreopen)
+	prev=dlprefiles
+	continue
+	;;
+
+      -export-dynamic)
+	export_dynamic=yes
+	continue
+	;;
+
+      -export-symbols | -export-symbols-regex)
+	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	  func_fatal_error "more than one -exported-symbols argument is not allowed"
+	fi
+	if test "X$arg" = "X-export-symbols"; then
+	  prev=expsyms
+	else
+	  prev=expsyms_regex
+	fi
+	continue
+	;;
+
+      -framework)
+	prev=framework
+	continue
+	;;
+
+      -inst-prefix-dir)
+	prev=inst_prefix
+	continue
+	;;
+
+      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+      # so, if we see these flags be careful not to treat them like -L
+      -L[A-Z][A-Z]*:*)
+	case $with_gcc/$host in
+	no/*-*-irix* | /*-*-irix*)
+	  func_append compile_command " $arg"
+	  func_append finalize_command " $arg"
+	  ;;
+	esac
+	continue
+	;;
+
+      -L*)
+	func_stripname "-L" '' "$arg"
+	if test -z "$func_stripname_result"; then
+	  if test "$#" -gt 0; then
+	    func_fatal_error "require no space between \`-L' and \`$1'"
+	  else
+	    func_fatal_error "need path for \`-L' option"
+	  fi
+	fi
+	func_resolve_sysroot "$func_stripname_result"
+	dir=$func_resolve_sysroot_result
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  absdir=`cd "$dir" && pwd`
+	  test -z "$absdir" && \
+	    func_fatal_error "cannot determine absolute directory name of \`$dir'"
+	  dir="$absdir"
+	  ;;
+	esac
+	case "$deplibs " in
+	*" -L$dir "* | *" $arg "*)
+	  # Will only happen for absolute or sysroot arguments
+	  ;;
+	*)
+	  # Preserve sysroot, but never include relative directories
+	  case $dir in
+	    [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;;
+	    *) func_append deplibs " -L$dir" ;;
+	  esac
+	  func_append lib_search_path " $dir"
+	  ;;
+	esac
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+	  testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'`
+	  case :$dllsearchpath: in
+	  *":$dir:"*) ;;
+	  ::) dllsearchpath=$dir;;
+	  *) func_append dllsearchpath ":$dir";;
+	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  ::) dllsearchpath=$testbindir;;
+	  *) func_append dllsearchpath ":$testbindir";;
+	  esac
+	  ;;
+	esac
+	continue
+	;;
+
+      -l*)
+	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*)
+	    # These systems don't actually have a C or math library (as such)
+	    continue
+	    ;;
+	  *-*-os2*)
+	    # These systems don't actually have a C library (as such)
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	    # Do not include libc due to us having libc/libc_r.
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C and math libraries are in the System framework
+	    func_append deplibs " System.ltframework"
+	    continue
+	    ;;
+	  *-*-sco3.2v5* | *-*-sco5v6*)
+	    # Causes problems with __ctype
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+	    # Compiler inserts libc in the correct place for threads to work
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  esac
+	elif test "X$arg" = "X-lc_r"; then
+	 case $host in
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	   # Do not include libc_r directly, use -pthread flag.
+	   continue
+	   ;;
+	 esac
+	fi
+	func_append deplibs " $arg"
+	continue
+	;;
+
+      -module)
+	module=yes
+	continue
+	;;
+
+      # Tru64 UNIX uses -model [arg] to determine the layout of C++
+      # classes, name mangling, and exception handling.
+      # Darwin uses the -arch flag to determine output architecture.
+      -model|-arch|-isysroot|--sysroot)
+	func_append compiler_flags " $arg"
+	func_append compile_command " $arg"
+	func_append finalize_command " $arg"
+	prev=xcompiler
+	continue
+	;;
+
+      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+	func_append compiler_flags " $arg"
+	func_append compile_command " $arg"
+	func_append finalize_command " $arg"
+	case "$new_inherited_linker_flags " in
+	    *" $arg "*) ;;
+	    * ) func_append new_inherited_linker_flags " $arg" ;;
+	esac
+	continue
+	;;
+
+      -multi_module)
+	single_module="${wl}-multi_module"
+	continue
+	;;
+
+      -no-fast-install)
+	fast_install=no
+	continue
+	;;
+
+      -no-install)
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+	  # The PATH hackery in wrapper scripts is required on Windows
+	  # and Darwin in order for the loader to find any dlls it needs.
+	  func_warning "\`-no-install' is ignored for $host"
+	  func_warning "assuming \`-no-fast-install' instead"
+	  fast_install=no
+	  ;;
+	*) no_install=yes ;;
+	esac
+	continue
+	;;
+
+      -no-undefined)
+	allow_undefined=no
+	continue
+	;;
+
+      -objectlist)
+	prev=objectlist
+	continue
+	;;
+
+      -o) prev=output ;;
+
+      -precious-files-regex)
+	prev=precious_regex
+	continue
+	;;
+
+      -release)
+	prev=release
+	continue
+	;;
+
+      -rpath)
+	prev=rpath
+	continue
+	;;
+
+      -R)
+	prev=xrpath
+	continue
+	;;
+
+      -R*)
+	func_stripname '-R' '' "$arg"
+	dir=$func_stripname_result
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	=*)
+	  func_stripname '=' '' "$dir"
+	  dir=$lt_sysroot$func_stripname_result
+	  ;;
+	*)
+	  func_fatal_error "only absolute run-paths are allowed"
+	  ;;
+	esac
+	case "$xrpath " in
+	*" $dir "*) ;;
+	*) func_append xrpath " $dir" ;;
+	esac
+	continue
+	;;
+
+      -shared)
+	# The effects of -shared are defined in a previous loop.
+	continue
+	;;
+
+      -shrext)
+	prev=shrext
+	continue
+	;;
+
+      -static | -static-libtool-libs)
+	# The effects of -static are defined in a previous loop.
+	# We used to do the same as -all-static on platforms that
+	# didn't have a PIC flag, but the assumption that the effects
+	# would be equivalent was wrong.  It would break on at least
+	# Digital Unix and AIX.
+	continue
+	;;
+
+      -thread-safe)
+	thread_safe=yes
+	continue
+	;;
+
+      -version-info)
+	prev=vinfo
+	continue
+	;;
+
+      -version-number)
+	prev=vinfo
+	vinfo_number=yes
+	continue
+	;;
+
+      -weak)
+        prev=weak
+	continue
+	;;
+
+      -Wc,*)
+	func_stripname '-Wc,' '' "$arg"
+	args=$func_stripname_result
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+          func_quote_for_eval "$flag"
+	  func_append arg " $func_quote_for_eval_result"
+	  func_append compiler_flags " $func_quote_for_eval_result"
+	done
+	IFS="$save_ifs"
+	func_stripname ' ' '' "$arg"
+	arg=$func_stripname_result
+	;;
+
+      -Wl,*)
+	func_stripname '-Wl,' '' "$arg"
+	args=$func_stripname_result
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+          func_quote_for_eval "$flag"
+	  func_append arg " $wl$func_quote_for_eval_result"
+	  func_append compiler_flags " $wl$func_quote_for_eval_result"
+	  func_append linker_flags " $func_quote_for_eval_result"
+	done
+	IFS="$save_ifs"
+	func_stripname ' ' '' "$arg"
+	arg=$func_stripname_result
+	;;
+
+      -Xcompiler)
+	prev=xcompiler
+	continue
+	;;
+
+      -Xlinker)
+	prev=xlinker
+	continue
+	;;
+
+      -XCClinker)
+	prev=xcclinker
+	continue
+	;;
+
+      # -msg_* for osf cc
+      -msg_*)
+	func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
+
+      # Flags to be passed through unchanged, with rationale:
+      # -64, -mips[0-9]      enable 64-bit mode for the SGI compiler
+      # -r[0-9][0-9]*        specify processor for the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler
+      # +DA*, +DD*           enable 64-bit mode for the HP compiler
+      # -q*                  compiler args for the IBM compiler
+      # -m*, -t[45]*, -txscale* architecture-specific flags for GCC
+      # -F/path              path to uninstalled frameworks, gcc on darwin
+      # -p, -pg, --coverage, -fprofile-*  profiling flags for GCC
+      # @file                GCC response files
+      # -tp=*                Portland pgcc target processor selection
+      # --sysroot=*          for sysroot support
+      # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
+      -O*|-flto*|-fwhopr*|-fuse-linker-plugin)
+        func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+        func_append compile_command " $arg"
+        func_append finalize_command " $arg"
+        func_append compiler_flags " $arg"
+        continue
+        ;;
+
+      # Some other compiler flag.
+      -* | +*)
+        func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
+
+      *.$objext)
+	# A standard object.
+	func_append objs " $arg"
+	;;
+
+      *.lo)
+	# A libtool-controlled object.
+
+	# Check to see that this really is a libtool object.
+	if func_lalib_unsafe_p "$arg"; then
+	  pic_object=
+	  non_pic_object=
+
+	  # Read the .lo file
+	  func_source "$arg"
+
+	  if test -z "$pic_object" ||
+	     test -z "$non_pic_object" ||
+	     test "$pic_object" = none &&
+	     test "$non_pic_object" = none; then
+	    func_fatal_error "cannot find name of object for \`$arg'"
+	  fi
+
+	  # Extract subdirectory from the argument.
+	  func_dirname "$arg" "/" ""
+	  xdir="$func_dirname_result"
+
+	  if test "$pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    pic_object="$xdir$pic_object"
+
+	    if test "$prev" = dlfiles; then
+	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		func_append dlfiles " $pic_object"
+		prev=
+		continue
+	      else
+		# If libtool objects are unsupported, then we need to preload.
+		prev=dlprefiles
+	      fi
+	    fi
+
+	    # CHECK ME:  I think I busted this.  -Ossama
+	    if test "$prev" = dlprefiles; then
+	      # Preload the old-style object.
+	      func_append dlprefiles " $pic_object"
+	      prev=
+	    fi
+
+	    # A PIC object.
+	    func_append libobjs " $pic_object"
+	    arg="$pic_object"
+	  fi
+
+	  # Non-PIC object.
+	  if test "$non_pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    non_pic_object="$xdir$non_pic_object"
+
+	    # A standard non-PIC object
+	    func_append non_pic_objects " $non_pic_object"
+	    if test -z "$pic_object" || test "$pic_object" = none ; then
+	      arg="$non_pic_object"
+	    fi
+	  else
+	    # If the PIC object exists, use it instead.
+	    # $xdir was prepended to $pic_object above.
+	    non_pic_object="$pic_object"
+	    func_append non_pic_objects " $non_pic_object"
+	  fi
+	else
+	  # Only an error if not doing a dry-run.
+	  if $opt_dry_run; then
+	    # Extract subdirectory from the argument.
+	    func_dirname "$arg" "/" ""
+	    xdir="$func_dirname_result"
+
+	    func_lo2o "$arg"
+	    pic_object=$xdir$objdir/$func_lo2o_result
+	    non_pic_object=$xdir$func_lo2o_result
+	    func_append libobjs " $pic_object"
+	    func_append non_pic_objects " $non_pic_object"
+	  else
+	    func_fatal_error "\`$arg' is not a valid libtool object"
+	  fi
+	fi
+	;;
+
+      *.$libext)
+	# An archive.
+	func_append deplibs " $arg"
+	func_append old_deplibs " $arg"
+	continue
+	;;
+
+      *.la)
+	# A libtool-controlled library.
+
+	func_resolve_sysroot "$arg"
+	if test "$prev" = dlfiles; then
+	  # This library was specified with -dlopen.
+	  func_append dlfiles " $func_resolve_sysroot_result"
+	  prev=
+	elif test "$prev" = dlprefiles; then
+	  # The library was specified with -dlpreopen.
+	  func_append dlprefiles " $func_resolve_sysroot_result"
+	  prev=
+	else
+	  func_append deplibs " $func_resolve_sysroot_result"
+	fi
+	continue
+	;;
+
+      # Some other compiler argument.
+      *)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
+      esac # arg
+
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+	func_append compile_command " $arg"
+	func_append finalize_command " $arg"
+      fi
+    done # argument parsing loop
+
+    test -n "$prev" && \
+      func_fatal_help "the \`$prevarg' option requires an argument"
+
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      func_append compile_command " $arg"
+      func_append finalize_command " $arg"
+    fi
+
+    oldlibs=
+    # calculate the name of the file, without its directory
+    func_basename "$output"
+    outputname="$func_basename_result"
+    libobjs_save="$libobjs"
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\`
+    else
+      shlib_search_path=
+    fi
+    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+    func_dirname "$output" "/" ""
+    output_objdir="$func_dirname_result$objdir"
+    func_to_tool_file "$output_objdir/"
+    tool_output_objdir=$func_to_tool_file_result
+    # Create the object directory.
+    func_mkdir_p "$output_objdir"
+
+    # Determine the type of output
+    case $output in
+    "")
+      func_fatal_help "you must specify an output file"
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    esac
+
+    specialdeplibs=
+
+    libs=
+    # Find all interdependent deplibs by searching for libraries
+    # that are linked more than once (e.g. -la -lb -la)
+    for deplib in $deplibs; do
+      if $opt_preserve_dup_deps ; then
+	case "$libs " in
+	*" $deplib "*) func_append specialdeplibs " $deplib" ;;
+	esac
+      fi
+      func_append libs " $deplib"
+    done
+
+    if test "$linkmode" = lib; then
+      libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+      # Compute libraries that are listed more than once in $predeps
+      # $postdeps and mark them as special (i.e., whose duplicates are
+      # not to be eliminated).
+      pre_post_deps=
+      if $opt_duplicate_compiler_generated_deps; then
+	for pre_post_dep in $predeps $postdeps; do
+	  case "$pre_post_deps " in
+	  *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;;
+	  esac
+	  func_append pre_post_deps " $pre_post_dep"
+	done
+      fi
+      pre_post_deps=
+    fi
+
+    deplibs=
+    newdependency_libs=
+    newlib_search_path=
+    need_relink=no # whether we're linking any uninstalled libtool libraries
+    notinst_deplibs= # not-installed libtool libraries
+    notinst_path= # paths that contain not-installed libtool libraries
+
+    case $linkmode in
+    lib)
+	passes="conv dlpreopen link"
+	for file in $dlfiles $dlprefiles; do
+	  case $file in
+	  *.la) ;;
+	  *)
+	    func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+	    ;;
+	  esac
+	done
+	;;
+    prog)
+	compile_deplibs=
+	finalize_deplibs=
+	alldeplibs=no
+	newdlfiles=
+	newdlprefiles=
+	passes="conv scan dlopen dlpreopen link"
+	;;
+    *)  passes="conv"
+	;;
+    esac
+
+    for pass in $passes; do
+      # The preopen pass in lib mode reverses $deplibs; put it back here
+      # so that -L comes before libs that need it for instance...
+      if test "$linkmode,$pass" = "lib,link"; then
+	## FIXME: Find the place where the list is rebuilt in the wrong
+	##        order, and fix it there properly
+        tmp_deplibs=
+	for deplib in $deplibs; do
+	  tmp_deplibs="$deplib $tmp_deplibs"
+	done
+	deplibs="$tmp_deplibs"
+      fi
+
+      if test "$linkmode,$pass" = "lib,link" ||
+	 test "$linkmode,$pass" = "prog,scan"; then
+	libs="$deplibs"
+	deplibs=
+      fi
+      if test "$linkmode" = prog; then
+	case $pass in
+	dlopen) libs="$dlfiles" ;;
+	dlpreopen) libs="$dlprefiles" ;;
+	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+	esac
+      fi
+      if test "$linkmode,$pass" = "lib,dlpreopen"; then
+	# Collect and forward deplibs of preopened libtool libs
+	for lib in $dlprefiles; do
+	  # Ignore non-libtool-libs
+	  dependency_libs=
+	  func_resolve_sysroot "$lib"
+	  case $lib in
+	  *.la)	func_source "$func_resolve_sysroot_result" ;;
+	  esac
+
+	  # Collect preopened libtool deplibs, except any this library
+	  # has declared as weak libs
+	  for deplib in $dependency_libs; do
+	    func_basename "$deplib"
+            deplib_base=$func_basename_result
+	    case " $weak_libs " in
+	    *" $deplib_base "*) ;;
+	    *) func_append deplibs " $deplib" ;;
+	    esac
+	  done
+	done
+	libs="$dlprefiles"
+      fi
+      if test "$pass" = dlopen; then
+	# Collect dlpreopened libraries
+	save_deplibs="$deplibs"
+	deplibs=
+      fi
+
+      for deplib in $libs; do
+	lib=
+	found=no
+	case $deplib in
+	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    func_append compiler_flags " $deplib"
+	    if test "$linkmode" = lib ; then
+		case "$new_inherited_linker_flags " in
+		    *" $deplib "*) ;;
+		    * ) func_append new_inherited_linker_flags " $deplib" ;;
+		esac
+	    fi
+	  fi
+	  continue
+	  ;;
+	-l*)
+	  if test "$linkmode" != lib && test "$linkmode" != prog; then
+	    func_warning "\`-l' is ignored for archives/objects"
+	    continue
+	  fi
+	  func_stripname '-l' '' "$deplib"
+	  name=$func_stripname_result
+	  if test "$linkmode" = lib; then
+	    searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+	  else
+	    searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+	  fi
+	  for searchdir in $searchdirs; do
+	    for search_ext in .la $std_shrext .so .a; do
+	      # Search the libtool library
+	      lib="$searchdir/lib${name}${search_ext}"
+	      if test -f "$lib"; then
+		if test "$search_ext" = ".la"; then
+		  found=yes
+		else
+		  found=no
+		fi
+		break 2
+	      fi
+	    done
+	  done
+	  if test "$found" != yes; then
+	    # deplib doesn't seem to be a libtool library
+	    if test "$linkmode,$pass" = "prog,link"; then
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      deplibs="$deplib $deplibs"
+	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    continue
+	  else # deplib is a libtool library
+	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+	    # We need to do some special things here, and not later.
+	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	      case " $predeps $postdeps " in
+	      *" $deplib "*)
+		if func_lalib_p "$lib"; then
+		  library_names=
+		  old_library=
+		  func_source "$lib"
+		  for l in $old_library $library_names; do
+		    ll="$l"
+		  done
+		  if test "X$ll" = "X$old_library" ; then # only static version available
+		    found=no
+		    func_dirname "$lib" "" "."
+		    ladir="$func_dirname_result"
+		    lib=$ladir/$old_library
+		    if test "$linkmode,$pass" = "prog,link"; then
+		      compile_deplibs="$deplib $compile_deplibs"
+		      finalize_deplibs="$deplib $finalize_deplibs"
+		    else
+		      deplibs="$deplib $deplibs"
+		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+		    fi
+		    continue
+		  fi
+		fi
+		;;
+	      *) ;;
+	      esac
+	    fi
+	  fi
+	  ;; # -l
+	*.ltframework)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    deplibs="$deplib $deplibs"
+	    if test "$linkmode" = lib ; then
+		case "$new_inherited_linker_flags " in
+		    *" $deplib "*) ;;
+		    * ) func_append new_inherited_linker_flags " $deplib" ;;
+		esac
+	    fi
+	  fi
+	  continue
+	  ;;
+	-L*)
+	  case $linkmode in
+	  lib)
+	    deplibs="$deplib $deplibs"
+	    test "$pass" = conv && continue
+	    newdependency_libs="$deplib $newdependency_libs"
+	    func_stripname '-L' '' "$deplib"
+	    func_resolve_sysroot "$func_stripname_result"
+	    func_append newlib_search_path " $func_resolve_sysroot_result"
+	    ;;
+	  prog)
+	    if test "$pass" = conv; then
+	      deplibs="$deplib $deplibs"
+	      continue
+	    fi
+	    if test "$pass" = scan; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    func_stripname '-L' '' "$deplib"
+	    func_resolve_sysroot "$func_stripname_result"
+	    func_append newlib_search_path " $func_resolve_sysroot_result"
+	    ;;
+	  *)
+	    func_warning "\`-L' is ignored for archives/objects"
+	    ;;
+	  esac # linkmode
+	  continue
+	  ;; # -L
+	-R*)
+	  if test "$pass" = link; then
+	    func_stripname '-R' '' "$deplib"
+	    func_resolve_sysroot "$func_stripname_result"
+	    dir=$func_resolve_sysroot_result
+	    # Make sure the xrpath contains only unique directories.
+	    case "$xrpath " in
+	    *" $dir "*) ;;
+	    *) func_append xrpath " $dir" ;;
+	    esac
+	  fi
+	  deplibs="$deplib $deplibs"
+	  continue
+	  ;;
+	*.la)
+	  func_resolve_sysroot "$deplib"
+	  lib=$func_resolve_sysroot_result
+	  ;;
+	*.$libext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	    continue
+	  fi
+	  case $linkmode in
+	  lib)
+	    # Linking convenience modules into shared libraries is allowed,
+	    # but linking other static libraries is non-portable.
+	    case " $dlpreconveniencelibs " in
+	    *" $deplib "*) ;;
+	    *)
+	      valid_a_lib=no
+	      case $deplibs_check_method in
+		match_pattern*)
+		  set dummy $deplibs_check_method; shift
+		  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+		  if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \
+		    | $EGREP "$match_pattern_regex" > /dev/null; then
+		    valid_a_lib=yes
+		  fi
+		;;
+		pass_all)
+		  valid_a_lib=yes
+		;;
+	      esac
+	      if test "$valid_a_lib" != yes; then
+		echo
+		$ECHO "*** Warning: Trying to link with static lib archive $deplib."
+		echo "*** I have the capability to make that library automatically link in when"
+		echo "*** you link to this library.  But I can only do this if you have a"
+		echo "*** shared version of the library, which you do not appear to have"
+		echo "*** because the file extensions .$libext of this argument makes me believe"
+		echo "*** that it is just a static archive that I should not use here."
+	      else
+		echo
+		$ECHO "*** Warning: Linking the shared library $output against the"
+		$ECHO "*** static library $deplib is not portable!"
+		deplibs="$deplib $deplibs"
+	      fi
+	      ;;
+	    esac
+	    continue
+	    ;;
+	  prog)
+	    if test "$pass" != link; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    continue
+	    ;;
+	  esac # linkmode
+	  ;; # *.$libext
+	*.lo | *.$objext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	  elif test "$linkmode" = prog; then
+	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+	      # If there is no dlopen support or we're linking statically,
+	      # we need to preload.
+	      func_append newdlprefiles " $deplib"
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      func_append newdlfiles " $deplib"
+	    fi
+	  fi
+	  continue
+	  ;;
+	%DEPLIBS%)
+	  alldeplibs=yes
+	  continue
+	  ;;
+	esac # case $deplib
+
+	if test "$found" = yes || test -f "$lib"; then :
+	else
+	  func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+	fi
+
+	# Check to see that this really is a libtool archive.
+	func_lalib_unsafe_p "$lib" \
+	  || func_fatal_error "\`$lib' is not a valid libtool archive"
+
+	func_dirname "$lib" "" "."
+	ladir="$func_dirname_result"
+
+	dlname=
+	dlopen=
+	dlpreopen=
+	libdir=
+	library_names=
+	old_library=
+	inherited_linker_flags=
+	# If the library was installed with an old release of libtool,
+	# it will not redefine variables installed, or shouldnotlink
+	installed=yes
+	shouldnotlink=no
+	avoidtemprpath=
+
+
+	# Read the .la file
+	func_source "$lib"
+
+	# Convert "-framework foo" to "foo.ltframework"
+	if test -n "$inherited_linker_flags"; then
+	  tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+	  for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+	    case " $new_inherited_linker_flags " in
+	      *" $tmp_inherited_linker_flag "*) ;;
+	      *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";;
+	    esac
+	  done
+	fi
+	dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+	if test "$linkmode,$pass" = "lib,link" ||
+	   test "$linkmode,$pass" = "prog,scan" ||
+	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+	  test -n "$dlopen" && func_append dlfiles " $dlopen"
+	  test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen"
+	fi
+
+	if test "$pass" = conv; then
+	  # Only check for convenience libraries
+	  deplibs="$lib $deplibs"
+	  if test -z "$libdir"; then
+	    if test -z "$old_library"; then
+	      func_fatal_error "cannot find name of link library for \`$lib'"
+	    fi
+	    # It is a libtool convenience library, so add in its objects.
+	    func_append convenience " $ladir/$objdir/$old_library"
+	    func_append old_convenience " $ladir/$objdir/$old_library"
+	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
+	    func_fatal_error "\`$lib' is not a convenience library"
+	  fi
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    deplibs="$deplib $deplibs"
+	    if $opt_preserve_dup_deps ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+	      esac
+	    fi
+	    func_append tmp_libs " $deplib"
+	  done
+	  continue
+	fi # $pass = conv
+
+
+	# Get the name of the library we link against.
+	linklib=
+	if test -n "$old_library" &&
+	   { test "$prefer_static_libs" = yes ||
+	     test "$prefer_static_libs,$installed" = "built,no"; }; then
+	  linklib=$old_library
+	else
+	  for l in $old_library $library_names; do
+	    linklib="$l"
+	  done
+	fi
+	if test -z "$linklib"; then
+	  func_fatal_error "cannot find name of link library for \`$lib'"
+	fi
+
+	# This library was specified with -dlopen.
+	if test "$pass" = dlopen; then
+	  if test -z "$libdir"; then
+	    func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+	  fi
+	  if test -z "$dlname" ||
+	     test "$dlopen_support" != yes ||
+	     test "$build_libtool_libs" = no; then
+	    # If there is no dlname, no dlopen support or we're linking
+	    # statically, we need to preload.  We also need to preload any
+	    # dependent libraries so libltdl's deplib preloader doesn't
+	    # bomb out in the load deplibs phase.
+	    func_append dlprefiles " $lib $dependency_libs"
+	  else
+	    func_append newdlfiles " $lib"
+	  fi
+	  continue
+	fi # $pass = dlopen
+
+	# We need an absolute path.
+	case $ladir in
+	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+	*)
+	  abs_ladir=`cd "$ladir" && pwd`
+	  if test -z "$abs_ladir"; then
+	    func_warning "cannot determine absolute directory name of \`$ladir'"
+	    func_warning "passing it literally to the linker, although it might fail"
+	    abs_ladir="$ladir"
+	  fi
+	  ;;
+	esac
+	func_basename "$lib"
+	laname="$func_basename_result"
+
+	# Find the relevant object directory and library name.
+	if test "X$installed" = Xyes; then
+	  if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    func_warning "library \`$lib' was moved."
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    libdir="$abs_ladir"
+	  else
+	    dir="$lt_sysroot$libdir"
+	    absdir="$lt_sysroot$libdir"
+	  fi
+	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+	else
+	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    # Remove this search path later
+	    func_append notinst_path " $abs_ladir"
+	  else
+	    dir="$ladir/$objdir"
+	    absdir="$abs_ladir/$objdir"
+	    # Remove this search path later
+	    func_append notinst_path " $abs_ladir"
+	  fi
+	fi # $installed = yes
+	func_stripname 'lib' '.la' "$laname"
+	name=$func_stripname_result
+
+	# This library was specified with -dlpreopen.
+	if test "$pass" = dlpreopen; then
+	  if test -z "$libdir" && test "$linkmode" = prog; then
+	    func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+	  fi
+	  case "$host" in
+	    # special handling for platforms with PE-DLLs.
+	    *cygwin* | *mingw* | *cegcc* )
+	      # Linker will automatically link against shared library if both
+	      # static and shared are present.  Therefore, ensure we extract
+	      # symbols from the import library if a shared library is present
+	      # (otherwise, the dlopen module name will be incorrect).  We do
+	      # this by putting the import library name into $newdlprefiles.
+	      # We recover the dlopen module name by 'saving' the la file
+	      # name in a special purpose variable, and (later) extracting the
+	      # dlname from the la file.
+	      if test -n "$dlname"; then
+	        func_tr_sh "$dir/$linklib"
+	        eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname"
+	        func_append newdlprefiles " $dir/$linklib"
+	      else
+	        func_append newdlprefiles " $dir/$old_library"
+	        # Keep a list of preopened convenience libraries to check
+	        # that they are being used correctly in the link pass.
+	        test -z "$libdir" && \
+	          func_append dlpreconveniencelibs " $dir/$old_library"
+	      fi
+	    ;;
+	    * )
+	      # Prefer using a static library (so that no silly _DYNAMIC symbols
+	      # are required to link).
+	      if test -n "$old_library"; then
+	        func_append newdlprefiles " $dir/$old_library"
+	        # Keep a list of preopened convenience libraries to check
+	        # that they are being used correctly in the link pass.
+	        test -z "$libdir" && \
+	          func_append dlpreconveniencelibs " $dir/$old_library"
+	      # Otherwise, use the dlname, so that lt_dlopen finds it.
+	      elif test -n "$dlname"; then
+	        func_append newdlprefiles " $dir/$dlname"
+	      else
+	        func_append newdlprefiles " $dir/$linklib"
+	      fi
+	    ;;
+	  esac
+	fi # $pass = dlpreopen
+
+	if test -z "$libdir"; then
+	  # Link the convenience library
+	  if test "$linkmode" = lib; then
+	    deplibs="$dir/$old_library $deplibs"
+	  elif test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$dir/$old_library $compile_deplibs"
+	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
+	  else
+	    deplibs="$lib $deplibs" # used for prog,scan pass
+	  fi
+	  continue
+	fi
+
+
+	if test "$linkmode" = prog && test "$pass" != link; then
+	  func_append newlib_search_path " $ladir"
+	  deplibs="$lib $deplibs"
+
+	  linkalldeplibs=no
+	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
+	     test "$build_libtool_libs" = no; then
+	    linkalldeplibs=yes
+	  fi
+
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    case $deplib in
+	    -L*) func_stripname '-L' '' "$deplib"
+	         func_resolve_sysroot "$func_stripname_result"
+	         func_append newlib_search_path " $func_resolve_sysroot_result"
+		 ;;
+	    esac
+	    # Need to link against all dependency_libs?
+	    if test "$linkalldeplibs" = yes; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      # Need to hardcode shared library paths
+	      # or/and link against static libraries
+	      newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    if $opt_preserve_dup_deps ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) func_append specialdeplibs " $deplib" ;;
+	      esac
+	    fi
+	    func_append tmp_libs " $deplib"
+	  done # for deplib
+	  continue
+	fi # $linkmode = prog...
+
+	if test "$linkmode,$pass" = "prog,link"; then
+	  if test -n "$library_names" &&
+	     { { test "$prefer_static_libs" = no ||
+	         test "$prefer_static_libs,$installed" = "built,yes"; } ||
+	       test -z "$old_library"; }; then
+	    # We need to hardcode the library path
+	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+	      # Make sure the rpath contains only unique directories.
+	      case "$temp_rpath:" in
+	      *"$absdir:"*) ;;
+	      *) func_append temp_rpath "$absdir:" ;;
+	      esac
+	    fi
+
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) func_append compile_rpath " $absdir" ;;
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) func_append finalize_rpath " $libdir" ;;
+	      esac
+	      ;;
+	    esac
+	  fi # $linkmode,$pass = prog,link...
+
+	  if test "$alldeplibs" = yes &&
+	     { test "$deplibs_check_method" = pass_all ||
+	       { test "$build_libtool_libs" = yes &&
+		 test -n "$library_names"; }; }; then
+	    # We only need to search for static libraries
+	    continue
+	  fi
+	fi
+
+	link_static=no # Whether the deplib will be linked statically
+	use_static_libs=$prefer_static_libs
+	if test "$use_static_libs" = built && test "$installed" = yes; then
+	  use_static_libs=no
+	fi
+	if test -n "$library_names" &&
+	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
+	  case $host in
+	  *cygwin* | *mingw* | *cegcc*)
+	      # No point in relinking DLLs because paths are not encoded
+	      func_append notinst_deplibs " $lib"
+	      need_relink=no
+	    ;;
+	  *)
+	    if test "$installed" = no; then
+	      func_append notinst_deplibs " $lib"
+	      need_relink=yes
+	    fi
+	    ;;
+	  esac
+	  # This is a shared library
+
+	  # Warn about portability, can't link against -module's on some
+	  # systems (darwin).  Don't bleat about dlopened modules though!
+	  dlopenmodule=""
+	  for dlpremoduletest in $dlprefiles; do
+	    if test "X$dlpremoduletest" = "X$lib"; then
+	      dlopenmodule="$dlpremoduletest"
+	      break
+	    fi
+	  done
+	  if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+	    echo
+	    if test "$linkmode" = prog; then
+	      $ECHO "*** Warning: Linking the executable $output against the loadable module"
+	    else
+	      $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+	    fi
+	    $ECHO "*** $linklib is not portable!"
+	  fi
+	  if test "$linkmode" = lib &&
+	     test "$hardcode_into_libs" = yes; then
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) func_append compile_rpath " $absdir" ;;
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) func_append finalize_rpath " $libdir" ;;
+	      esac
+	      ;;
+	    esac
+	  fi
+
+	  if test -n "$old_archive_from_expsyms_cmds"; then
+	    # figure out the soname
+	    set dummy $library_names
+	    shift
+	    realname="$1"
+	    shift
+	    libname=`eval "\\$ECHO \"$libname_spec\""`
+	    # use dlname if we got it. it's perfectly good, no?
+	    if test -n "$dlname"; then
+	      soname="$dlname"
+	    elif test -n "$soname_spec"; then
+	      # bleh windows
+	      case $host in
+	      *cygwin* | mingw* | *cegcc*)
+	        func_arith $current - $age
+		major=$func_arith_result
+		versuffix="-$major"
+		;;
+	      esac
+	      eval soname=\"$soname_spec\"
+	    else
+	      soname="$realname"
+	    fi
+
+	    # Make a new name for the extract_expsyms_cmds to use
+	    soroot="$soname"
+	    func_basename "$soroot"
+	    soname="$func_basename_result"
+	    func_stripname 'lib' '.dll' "$soname"
+	    newlib=libimp-$func_stripname_result.a
+
+	    # If the library has no export list, then create one now
+	    if test -f "$output_objdir/$soname-def"; then :
+	    else
+	      func_verbose "extracting exported symbol list from \`$soname'"
+	      func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+	    fi
+
+	    # Create $newlib
+	    if test -f "$output_objdir/$newlib"; then :; else
+	      func_verbose "generating import library for \`$soname'"
+	      func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+	    fi
+	    # make sure the library variables are pointing to the new library
+	    dir=$output_objdir
+	    linklib=$newlib
+	  fi # test -n "$old_archive_from_expsyms_cmds"
+
+	  if test "$linkmode" = prog || test "$opt_mode" != relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    lib_linked=yes
+	    case $hardcode_action in
+	    immediate | unsupported)
+	      if test "$hardcode_direct" = no; then
+		add="$dir/$linklib"
+		case $host in
+		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+		    *-*-unixware7*) add_dir="-L$dir" ;;
+		  *-*-darwin* )
+		    # if the lib is a (non-dlopened) module then we can not
+		    # link against it, someone is ignoring the earlier warnings
+		    if /usr/bin/file -L $add 2> /dev/null |
+			 $GREP ": [^:]* bundle" >/dev/null ; then
+		      if test "X$dlopenmodule" != "X$lib"; then
+			$ECHO "*** Warning: lib $linklib is a module, not a shared library"
+			if test -z "$old_library" ; then
+			  echo
+			  echo "*** And there doesn't seem to be a static archive available"
+			  echo "*** The link will probably fail, sorry"
+			else
+			  add="$dir/$old_library"
+			fi
+		      elif test -n "$old_library"; then
+			add="$dir/$old_library"
+		      fi
+		    fi
+		esac
+	      elif test "$hardcode_minus_L" = no; then
+		case $host in
+		*-*-sunos*) add_shlibpath="$dir" ;;
+		esac
+		add_dir="-L$dir"
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = no; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    relink)
+	      if test "$hardcode_direct" = yes &&
+	         test "$hardcode_direct_absolute" = no; then
+		add="$dir/$linklib"
+	      elif test "$hardcode_minus_L" = yes; then
+		add_dir="-L$dir"
+		# Try looking first in the location we're being installed to.
+		if test -n "$inst_prefix_dir"; then
+		  case $libdir in
+		    [\\/]*)
+		      func_append add_dir " -L$inst_prefix_dir$libdir"
+		      ;;
+		  esac
+		fi
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = yes; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    *) lib_linked=no ;;
+	    esac
+
+	    if test "$lib_linked" != yes; then
+	      func_fatal_configuration "unsupported hardcode properties"
+	    fi
+
+	    if test -n "$add_shlibpath"; then
+	      case :$compile_shlibpath: in
+	      *":$add_shlibpath:"*) ;;
+	      *) func_append compile_shlibpath "$add_shlibpath:" ;;
+	      esac
+	    fi
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	      if test "$hardcode_direct" != yes &&
+		 test "$hardcode_minus_L" != yes &&
+		 test "$hardcode_shlibpath_var" = yes; then
+		case :$finalize_shlibpath: in
+		*":$libdir:"*) ;;
+		*) func_append finalize_shlibpath "$libdir:" ;;
+		esac
+	      fi
+	    fi
+	  fi
+
+	  if test "$linkmode" = prog || test "$opt_mode" = relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    # Finalize command for both is simple: just hardcode it.
+	    if test "$hardcode_direct" = yes &&
+	       test "$hardcode_direct_absolute" = no; then
+	      add="$libdir/$linklib"
+	    elif test "$hardcode_minus_L" = yes; then
+	      add_dir="-L$libdir"
+	      add="-l$name"
+	    elif test "$hardcode_shlibpath_var" = yes; then
+	      case :$finalize_shlibpath: in
+	      *":$libdir:"*) ;;
+	      *) func_append finalize_shlibpath "$libdir:" ;;
+	      esac
+	      add="-l$name"
+	    elif test "$hardcode_automatic" = yes; then
+	      if test -n "$inst_prefix_dir" &&
+		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
+		add="$inst_prefix_dir$libdir/$linklib"
+	      else
+		add="$libdir/$linklib"
+	      fi
+	    else
+	      # We cannot seem to hardcode it, guess we'll fake it.
+	      add_dir="-L$libdir"
+	      # Try looking first in the location we're being installed to.
+	      if test -n "$inst_prefix_dir"; then
+		case $libdir in
+		  [\\/]*)
+		    func_append add_dir " -L$inst_prefix_dir$libdir"
+		    ;;
+		esac
+	      fi
+	      add="-l$name"
+	    fi
+
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	    fi
+	  fi
+	elif test "$linkmode" = prog; then
+	  # Here we assume that one of hardcode_direct or hardcode_minus_L
+	  # is not unsupported.  This is valid on all known static and
+	  # shared platforms.
+	  if test "$hardcode_direct" != unsupported; then
+	    test -n "$old_library" && linklib="$old_library"
+	    compile_deplibs="$dir/$linklib $compile_deplibs"
+	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
+	  else
+	    compile_deplibs="-l$name -L$dir $compile_deplibs"
+	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+	  fi
+	elif test "$build_libtool_libs" = yes; then
+	  # Not a shared library
+	  if test "$deplibs_check_method" != pass_all; then
+	    # We're trying link a shared library against a static one
+	    # but the system doesn't support it.
+
+	    # Just print a warning and add the library to dependency_libs so
+	    # that the program can be linked against the static library.
+	    echo
+	    $ECHO "*** Warning: This system can not link to static lib archive $lib."
+	    echo "*** I have the capability to make that library automatically link in when"
+	    echo "*** you link to this library.  But I can only do this if you have a"
+	    echo "*** shared version of the library, which you do not appear to have."
+	    if test "$module" = yes; then
+	      echo "*** But as you try to build a module library, libtool will still create "
+	      echo "*** a static module, that should work as long as the dlopening application"
+	      echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+	      if test -z "$global_symbol_pipe"; then
+		echo
+		echo "*** However, this would only work if libtool was able to extract symbol"
+		echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+		echo "*** not find such a program.  So, this module is probably useless."
+		echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	      fi
+	      if test "$build_old_libs" = no; then
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  else
+	    deplibs="$dir/$old_library $deplibs"
+	    link_static=yes
+	  fi
+	fi # link shared/static library?
+
+	if test "$linkmode" = lib; then
+	  if test -n "$dependency_libs" &&
+	     { test "$hardcode_into_libs" != yes ||
+	       test "$build_old_libs" = yes ||
+	       test "$link_static" = yes; }; then
+	    # Extract -R from dependency_libs
+	    temp_deplibs=
+	    for libdir in $dependency_libs; do
+	      case $libdir in
+	      -R*) func_stripname '-R' '' "$libdir"
+	           temp_xrpath=$func_stripname_result
+		   case " $xrpath " in
+		   *" $temp_xrpath "*) ;;
+		   *) func_append xrpath " $temp_xrpath";;
+		   esac;;
+	      *) func_append temp_deplibs " $libdir";;
+	      esac
+	    done
+	    dependency_libs="$temp_deplibs"
+	  fi
+
+	  func_append newlib_search_path " $absdir"
+	  # Link against this library
+	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+	  # ... and its dependency_libs
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    newdependency_libs="$deplib $newdependency_libs"
+	    case $deplib in
+              -L*) func_stripname '-L' '' "$deplib"
+                   func_resolve_sysroot "$func_stripname_result";;
+              *) func_resolve_sysroot "$deplib" ;;
+            esac
+	    if $opt_preserve_dup_deps ; then
+	      case "$tmp_libs " in
+	      *" $func_resolve_sysroot_result "*)
+                func_append specialdeplibs " $func_resolve_sysroot_result" ;;
+	      esac
+	    fi
+	    func_append tmp_libs " $func_resolve_sysroot_result"
+	  done
+
+	  if test "$link_all_deplibs" != no; then
+	    # Add the search paths of all dependency libraries
+	    for deplib in $dependency_libs; do
+	      path=
+	      case $deplib in
+	      -L*) path="$deplib" ;;
+	      *.la)
+	        func_resolve_sysroot "$deplib"
+	        deplib=$func_resolve_sysroot_result
+	        func_dirname "$deplib" "" "."
+		dir=$func_dirname_result
+		# We need an absolute path.
+		case $dir in
+		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+		*)
+		  absdir=`cd "$dir" && pwd`
+		  if test -z "$absdir"; then
+		    func_warning "cannot determine absolute directory name of \`$dir'"
+		    absdir="$dir"
+		  fi
+		  ;;
+		esac
+		if $GREP "^installed=no" $deplib > /dev/null; then
+		case $host in
+		*-*-darwin*)
+		  depdepl=
+		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+		  if test -n "$deplibrary_names" ; then
+		    for tmp in $deplibrary_names ; do
+		      depdepl=$tmp
+		    done
+		    if test -f "$absdir/$objdir/$depdepl" ; then
+		      depdepl="$absdir/$objdir/$depdepl"
+		      darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+                      if test -z "$darwin_install_name"; then
+                          darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
+                      fi
+		      func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+		      func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}"
+		      path=
+		    fi
+		  fi
+		  ;;
+		*)
+		  path="-L$absdir/$objdir"
+		  ;;
+		esac
+		else
+		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		  test -z "$libdir" && \
+		    func_fatal_error "\`$deplib' is not a valid libtool archive"
+		  test "$absdir" != "$libdir" && \
+		    func_warning "\`$deplib' seems to be moved"
+
+		  path="-L$absdir"
+		fi
+		;;
+	      esac
+	      case " $deplibs " in
+	      *" $path "*) ;;
+	      *) deplibs="$path $deplibs" ;;
+	      esac
+	    done
+	  fi # link_all_deplibs != no
+	fi # linkmode = lib
+      done # for deplib in $libs
+      if test "$pass" = link; then
+	if test "$linkmode" = "prog"; then
+	  compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+	  finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+	else
+	  compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+	fi
+      fi
+      dependency_libs="$newdependency_libs"
+      if test "$pass" = dlpreopen; then
+	# Link the dlpreopened libraries before other libraries
+	for deplib in $save_deplibs; do
+	  deplibs="$deplib $deplibs"
+	done
+      fi
+      if test "$pass" != dlopen; then
+	if test "$pass" != conv; then
+	  # Make sure lib_search_path contains only unique directories.
+	  lib_search_path=
+	  for dir in $newlib_search_path; do
+	    case "$lib_search_path " in
+	    *" $dir "*) ;;
+	    *) func_append lib_search_path " $dir" ;;
+	    esac
+	  done
+	  newlib_search_path=
+	fi
+
+	if test "$linkmode,$pass" != "prog,link"; then
+	  vars="deplibs"
+	else
+	  vars="compile_deplibs finalize_deplibs"
+	fi
+	for var in $vars dependency_libs; do
+	  # Add libraries to $var in reverse order
+	  eval tmp_libs=\"\$$var\"
+	  new_libs=
+	  for deplib in $tmp_libs; do
+	    # FIXME: Pedantically, this is the right thing to do, so
+	    #        that some nasty dependency loop isn't accidentally
+	    #        broken:
+	    #new_libs="$deplib $new_libs"
+	    # Pragmatically, this seems to cause very few problems in
+	    # practice:
+	    case $deplib in
+	    -L*) new_libs="$deplib $new_libs" ;;
+	    -R*) ;;
+	    *)
+	      # And here is the reason: when a library appears more
+	      # than once as an explicit dependence of a library, or
+	      # is implicitly linked in more than once by the
+	      # compiler, it is considered special, and multiple
+	      # occurrences thereof are not removed.  Compare this
+	      # with having the same library being listed as a
+	      # dependency of multiple other libraries: in this case,
+	      # we know (pedantically, we assume) the library does not
+	      # need to be listed more than once, so we keep only the
+	      # last copy.  This is not always right, but it is rare
+	      # enough that we require users that really mean to play
+	      # such unportable linking tricks to link the library
+	      # using -Wl,-lname, so that libtool does not consider it
+	      # for duplicate removal.
+	      case " $specialdeplibs " in
+	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
+	      *)
+		case " $new_libs " in
+		*" $deplib "*) ;;
+		*) new_libs="$deplib $new_libs" ;;
+		esac
+		;;
+	      esac
+	      ;;
+	    esac
+	  done
+	  tmp_libs=
+	  for deplib in $new_libs; do
+	    case $deplib in
+	    -L*)
+	      case " $tmp_libs " in
+	      *" $deplib "*) ;;
+	      *) func_append tmp_libs " $deplib" ;;
+	      esac
+	      ;;
+	    *) func_append tmp_libs " $deplib" ;;
+	    esac
+	  done
+	  eval $var=\"$tmp_libs\"
+	done # for var
+      fi
+      # Last step: remove runtime libs from dependency_libs
+      # (they stay in deplibs)
+      tmp_libs=
+      for i in $dependency_libs ; do
+	case " $predeps $postdeps $compiler_lib_search_path " in
+	*" $i "*)
+	  i=""
+	  ;;
+	esac
+	if test -n "$i" ; then
+	  func_append tmp_libs " $i"
+	fi
+      done
+      dependency_libs=$tmp_libs
+    done # for pass
+    if test "$linkmode" = prog; then
+      dlfiles="$newdlfiles"
+    fi
+    if test "$linkmode" = prog || test "$linkmode" = lib; then
+      dlprefiles="$newdlprefiles"
+    fi
+
+    case $linkmode in
+    oldlib)
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	func_warning "\`-dlopen' is ignored for archives"
+      fi
+
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+	func_warning "\`-l' and \`-L' are ignored for archives" ;;
+      esac
+
+      test -n "$rpath" && \
+	func_warning "\`-rpath' is ignored for archives"
+
+      test -n "$xrpath" && \
+	func_warning "\`-R' is ignored for archives"
+
+      test -n "$vinfo" && \
+	func_warning "\`-version-info/-version-number' is ignored for archives"
+
+      test -n "$release" && \
+	func_warning "\`-release' is ignored for archives"
+
+      test -n "$export_symbols$export_symbols_regex" && \
+	func_warning "\`-export-symbols' is ignored for archives"
+
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs="$output"
+      func_append objs "$old_deplibs"
+      ;;
+
+    lib)
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      case $outputname in
+      lib*)
+	func_stripname 'lib' '.la' "$outputname"
+	name=$func_stripname_result
+	eval shared_ext=\"$shrext_cmds\"
+	eval libname=\"$libname_spec\"
+	;;
+      *)
+	test "$module" = no && \
+	  func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
+	if test "$need_lib_prefix" != no; then
+	  # Add the "lib" prefix for modules if required
+	  func_stripname '' '.la' "$outputname"
+	  name=$func_stripname_result
+	  eval shared_ext=\"$shrext_cmds\"
+	  eval libname=\"$libname_spec\"
+	else
+	  func_stripname '' '.la' "$outputname"
+	  libname=$func_stripname_result
+	fi
+	;;
+      esac
+
+      if test -n "$objs"; then
+	if test "$deplibs_check_method" != pass_all; then
+	  func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+	else
+	  echo
+	  $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+	  $ECHO "*** objects $objs is not portable!"
+	  func_append libobjs " $objs"
+	fi
+      fi
+
+      test "$dlself" != no && \
+	func_warning "\`-dlopen self' is ignored for libtool libraries"
+
+      set dummy $rpath
+      shift
+      test "$#" -gt 1 && \
+	func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+      install_libdir="$1"
+
+      oldlibs=
+      if test -z "$rpath"; then
+	if test "$build_libtool_libs" = yes; then
+	  # Building a libtool convenience library.
+	  # Some compilers have problems with a `.al' extension so
+	  # convenience libraries should have the same extension an
+	  # archive normally would.
+	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
+	  build_libtool_libs=convenience
+	  build_old_libs=yes
+	fi
+
+	test -n "$vinfo" && \
+	  func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+
+	test -n "$release" && \
+	  func_warning "\`-release' is ignored for convenience libraries"
+      else
+
+	# Parse the version information argument.
+	save_ifs="$IFS"; IFS=':'
+	set dummy $vinfo 0 0 0
+	shift
+	IFS="$save_ifs"
+
+	test -n "$7" && \
+	  func_fatal_help "too many parameters to \`-version-info'"
+
+	# convert absolute version numbers to libtool ages
+	# this retains compatibility with .la files and attempts
+	# to make the code below a bit more comprehensible
+
+	case $vinfo_number in
+	yes)
+	  number_major="$1"
+	  number_minor="$2"
+	  number_revision="$3"
+	  #
+	  # There are really only two kinds -- those that
+	  # use the current revision as the major version
+	  # and those that subtract age and use age as
+	  # a minor version.  But, then there is irix
+	  # which has an extra 1 added just for fun
+	  #
+	  case $version_type in
+	  darwin|linux|osf|windows|none)
+	    func_arith $number_major + $number_minor
+	    current=$func_arith_result
+	    age="$number_minor"
+	    revision="$number_revision"
+	    ;;
+	  freebsd-aout|freebsd-elf|qnx|sunos)
+	    current="$number_major"
+	    revision="$number_minor"
+	    age="0"
+	    ;;
+	  irix|nonstopux)
+	    func_arith $number_major + $number_minor
+	    current=$func_arith_result
+	    age="$number_minor"
+	    revision="$number_minor"
+	    lt_irix_increment=no
+	    ;;
+	  esac
+	  ;;
+	no)
+	  current="$1"
+	  revision="$2"
+	  age="$3"
+	  ;;
+	esac
+
+	# Check that each of the things are valid numbers.
+	case $current in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  func_error "CURRENT \`$current' must be a nonnegative integer"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	  ;;
+	esac
+
+	case $revision in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  func_error "REVISION \`$revision' must be a nonnegative integer"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	  ;;
+	esac
+
+	case $age in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  func_error "AGE \`$age' must be a nonnegative integer"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	  ;;
+	esac
+
+	if test "$age" -gt "$current"; then
+	  func_error "AGE \`$age' is greater than the current interface number \`$current'"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	fi
+
+	# Calculate the version variables.
+	major=
+	versuffix=
+	verstring=
+	case $version_type in
+	none) ;;
+
+	darwin)
+	  # Like Linux, but with the current version available in
+	  # verstring for coding it into the library header
+	  func_arith $current - $age
+	  major=.$func_arith_result
+	  versuffix="$major.$age.$revision"
+	  # Darwin ld doesn't like 0 for these options...
+	  func_arith $current + 1
+	  minor_current=$func_arith_result
+	  xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+	  ;;
+
+	freebsd-aout)
+	  major=".$current"
+	  versuffix=".$current.$revision";
+	  ;;
+
+	freebsd-elf)
+	  major=".$current"
+	  versuffix=".$current"
+	  ;;
+
+	irix | nonstopux)
+	  if test "X$lt_irix_increment" = "Xno"; then
+	    func_arith $current - $age
+	  else
+	    func_arith $current - $age + 1
+	  fi
+	  major=$func_arith_result
+
+	  case $version_type in
+	    nonstopux) verstring_prefix=nonstopux ;;
+	    *)         verstring_prefix=sgi ;;
+	  esac
+	  verstring="$verstring_prefix$major.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$revision
+	  while test "$loop" -ne 0; do
+	    func_arith $revision - $loop
+	    iface=$func_arith_result
+	    func_arith $loop - 1
+	    loop=$func_arith_result
+	    verstring="$verstring_prefix$major.$iface:$verstring"
+	  done
+
+	  # Before this point, $major must not contain `.'.
+	  major=.$major
+	  versuffix="$major.$revision"
+	  ;;
+
+	linux)
+	  func_arith $current - $age
+	  major=.$func_arith_result
+	  versuffix="$major.$age.$revision"
+	  ;;
+
+	osf)
+	  func_arith $current - $age
+	  major=.$func_arith_result
+	  versuffix=".$current.$age.$revision"
+	  verstring="$current.$age.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$age
+	  while test "$loop" -ne 0; do
+	    func_arith $current - $loop
+	    iface=$func_arith_result
+	    func_arith $loop - 1
+	    loop=$func_arith_result
+	    verstring="$verstring:${iface}.0"
+	  done
+
+	  # Make executables depend on our current version.
+	  func_append verstring ":${current}.0"
+	  ;;
+
+	qnx)
+	  major=".$current"
+	  versuffix=".$current"
+	  ;;
+
+	sunos)
+	  major=".$current"
+	  versuffix=".$current.$revision"
+	  ;;
+
+	windows)
+	  # Use '-' rather than '.', since we only want one
+	  # extension on DOS 8.3 filesystems.
+	  func_arith $current - $age
+	  major=$func_arith_result
+	  versuffix="-$major"
+	  ;;
+
+	*)
+	  func_fatal_configuration "unknown library version type \`$version_type'"
+	  ;;
+	esac
+
+	# Clear the version info if we defaulted, and they specified a release.
+	if test -z "$vinfo" && test -n "$release"; then
+	  major=
+	  case $version_type in
+	  darwin)
+	    # we can't check for "0.0" in archive_cmds due to quoting
+	    # problems, so we reset it completely
+	    verstring=
+	    ;;
+	  *)
+	    verstring="0.0"
+	    ;;
+	  esac
+	  if test "$need_version" = no; then
+	    versuffix=
+	  else
+	    versuffix=".0.0"
+	  fi
+	fi
+
+	# Remove version info from name if versioning should be avoided
+	if test "$avoid_version" = yes && test "$need_version" = no; then
+	  major=
+	  versuffix=
+	  verstring=""
+	fi
+
+	# Check to see if the archive will have undefined symbols.
+	if test "$allow_undefined" = yes; then
+	  if test "$allow_undefined_flag" = unsupported; then
+	    func_warning "undefined symbols not allowed in $host shared libraries"
+	    build_libtool_libs=no
+	    build_old_libs=yes
+	  fi
+	else
+	  # Don't allow undefined symbols.
+	  allow_undefined_flag="$no_undefined_flag"
+	fi
+
+      fi
+
+      func_generate_dlsyms "$libname" "$libname" "yes"
+      func_append libobjs " $symfileobj"
+      test "X$libobjs" = "X " && libobjs=
+
+      if test "$opt_mode" != relink; then
+	# Remove our outputs, but don't remove object files since they
+	# may have been created when compiling PIC objects.
+	removelist=
+	tempremovelist=`$ECHO "$output_objdir/*"`
+	for p in $tempremovelist; do
+	  case $p in
+	    *.$objext | *.gcno)
+	       ;;
+	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+	       if test "X$precious_files_regex" != "X"; then
+		 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+		 then
+		   continue
+		 fi
+	       fi
+	       func_append removelist " $p"
+	       ;;
+	    *) ;;
+	  esac
+	done
+	test -n "$removelist" && \
+	  func_show_eval "${RM}r \$removelist"
+      fi
+
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+	func_append oldlibs " $output_objdir/$libname.$libext"
+
+	# Transform .lo files to .o files.
+	oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP`
+      fi
+
+      # Eliminate all temporary directories.
+      #for path in $notinst_path; do
+      #	lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"`
+      #	deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"`
+      #	dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"`
+      #done
+
+      if test -n "$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	temp_xrpath=
+	for libdir in $xrpath; do
+	  func_replace_sysroot "$libdir"
+	  func_append temp_xrpath " -R$func_replace_sysroot_result"
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) func_append finalize_rpath " $libdir" ;;
+	  esac
+	done
+	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+	  dependency_libs="$temp_xrpath $dependency_libs"
+	fi
+      fi
+
+      # Make sure dlfiles contains only unique files that won't be dlpreopened
+      old_dlfiles="$dlfiles"
+      dlfiles=
+      for lib in $old_dlfiles; do
+	case " $dlprefiles $dlfiles " in
+	*" $lib "*) ;;
+	*) func_append dlfiles " $lib" ;;
+	esac
+      done
+
+      # Make sure dlprefiles contains only unique files
+      old_dlprefiles="$dlprefiles"
+      dlprefiles=
+      for lib in $old_dlprefiles; do
+	case "$dlprefiles " in
+	*" $lib "*) ;;
+	*) func_append dlprefiles " $lib" ;;
+	esac
+      done
+
+      if test "$build_libtool_libs" = yes; then
+	if test -n "$rpath"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*)
+	    # these systems don't actually have a c library (as such)!
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C library is in the System framework
+	    func_append deplibs " System.ltframework"
+	    ;;
+	  *-*-netbsd*)
+	    # Don't link with libc until the a.out ld.so is fixed.
+	    ;;
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	    # Do not include libc due to us having libc/libc_r.
+	    ;;
+	  *-*-sco3.2v5* | *-*-sco5v6*)
+	    # Causes problems with __ctype
+	    ;;
+	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+	    # Compiler inserts libc in the correct place for threads to work
+	    ;;
+	  *)
+	    # Add libc to deplibs on all other systems if necessary.
+	    if test "$build_libtool_need_lc" = "yes"; then
+	      func_append deplibs " -lc"
+	    fi
+	    ;;
+	  esac
+	fi
+
+	# Transform deplibs into only deplibs that can be linked in shared.
+	name_save=$name
+	libname_save=$libname
+	release_save=$release
+	versuffix_save=$versuffix
+	major_save=$major
+	# I'm not sure if I'm treating the release correctly.  I think
+	# release should show up in the -l (ie -lgmp5) so we don't want to
+	# add it in twice.  Is that correct?
+	release=""
+	versuffix=""
+	major=""
+	newdeplibs=
+	droppeddeps=no
+	case $deplibs_check_method in
+	pass_all)
+	  # Don't check for shared/static.  Everything works.
+	  # This might be a little naive.  We might want to check
+	  # whether the library exists or not.  But this is on
+	  # osf3 & osf4 and I'm not really sure... Just
+	  # implementing what was already the behavior.
+	  newdeplibs=$deplibs
+	  ;;
+	test_compile)
+	  # This code stresses the "libraries are programs" paradigm to its
+	  # limits. Maybe even breaks it.  We compile a program, linking it
+	  # against the deplibs as a proxy for the library.  Then we can check
+	  # whether they linked in statically or dynamically with ldd.
+	  $opt_dry_run || $RM conftest.c
+	  cat > conftest.c <<EOF
+	  int main() { return 0; }
+EOF
+	  $opt_dry_run || $RM conftest
+	  if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+	    ldd_output=`ldd conftest`
+	    for i in $deplibs; do
+	      case $i in
+	      -l*)
+		func_stripname -l '' "$i"
+		name=$func_stripname_result
+		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		  case " $predeps $postdeps " in
+		  *" $i "*)
+		    func_append newdeplibs " $i"
+		    i=""
+		    ;;
+		  esac
+		fi
+		if test -n "$i" ; then
+		  libname=`eval "\\$ECHO \"$libname_spec\""`
+		  deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+		  set dummy $deplib_matches; shift
+		  deplib_match=$1
+		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		    func_append newdeplibs " $i"
+		  else
+		    droppeddeps=yes
+		    echo
+		    $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+		    echo "*** I have the capability to make that library automatically link in when"
+		    echo "*** you link to this library.  But I can only do this if you have a"
+		    echo "*** shared version of the library, which I believe you do not have"
+		    echo "*** because a test_compile did reveal that the linker did not use it for"
+		    echo "*** its dynamic dependency list that programs get resolved with at runtime."
+		  fi
+		fi
+		;;
+	      *)
+		func_append newdeplibs " $i"
+		;;
+	      esac
+	    done
+	  else
+	    # Error occurred in the first compile.  Let's try to salvage
+	    # the situation: Compile a separate program for each library.
+	    for i in $deplibs; do
+	      case $i in
+	      -l*)
+		func_stripname -l '' "$i"
+		name=$func_stripname_result
+		$opt_dry_run || $RM conftest
+		if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+		  ldd_output=`ldd conftest`
+		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		    case " $predeps $postdeps " in
+		    *" $i "*)
+		      func_append newdeplibs " $i"
+		      i=""
+		      ;;
+		    esac
+		  fi
+		  if test -n "$i" ; then
+		    libname=`eval "\\$ECHO \"$libname_spec\""`
+		    deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+		    set dummy $deplib_matches; shift
+		    deplib_match=$1
+		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		      func_append newdeplibs " $i"
+		    else
+		      droppeddeps=yes
+		      echo
+		      $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+		      echo "*** I have the capability to make that library automatically link in when"
+		      echo "*** you link to this library.  But I can only do this if you have a"
+		      echo "*** shared version of the library, which you do not appear to have"
+		      echo "*** because a test_compile did reveal that the linker did not use this one"
+		      echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+		    fi
+		  fi
+		else
+		  droppeddeps=yes
+		  echo
+		  $ECHO "*** Warning!  Library $i is needed by this library but I was not able to"
+		  echo "*** make it link in!  You will probably need to install it or some"
+		  echo "*** library that it depends on before this library will be fully"
+		  echo "*** functional.  Installing it before continuing would be even better."
+		fi
+		;;
+	      *)
+		func_append newdeplibs " $i"
+		;;
+	      esac
+	    done
+	  fi
+	  ;;
+	file_magic*)
+	  set dummy $deplibs_check_method; shift
+	  file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    case $a_deplib in
+	    -l*)
+	      func_stripname -l '' "$a_deplib"
+	      name=$func_stripname_result
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  func_append newdeplibs " $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval "\\$ECHO \"$libname_spec\""`
+		if test -n "$file_magic_glob"; then
+		  libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob`
+		else
+		  libnameglob=$libname
+		fi
+		test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  if test "$want_nocaseglob" = yes; then
+		    shopt -s nocaseglob
+		    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+		    $nocaseglob
+		  else
+		    potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null`
+		  fi
+		  for potent_lib in $potential_libs; do
+		      # Follow soft links.
+		      if ls -lLd "$potent_lib" 2>/dev/null |
+			 $GREP " -> " >/dev/null; then
+			continue
+		      fi
+		      # The statement above tries to avoid entering an
+		      # endless loop below, in case of cyclic links.
+		      # We might still enter an endless loop, since a link
+		      # loop can be closed while we follow links,
+		      # but so what?
+		      potlib="$potent_lib"
+		      while test -h "$potlib" 2>/dev/null; do
+			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+			case $potliblink in
+			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+			*) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";;
+			esac
+		      done
+		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+			 $SED -e 10q |
+			 $EGREP "$file_magic_regex" > /dev/null; then
+			func_append newdeplibs " $a_deplib"
+			a_deplib=""
+			break 2
+		      fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		echo
+		$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+		echo "*** I have the capability to make that library automatically link in when"
+		echo "*** you link to this library.  But I can only do this if you have a"
+		echo "*** shared version of the library, which you do not appear to have"
+		echo "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+		else
+		  $ECHO "*** with $libname and none of the candidates passed a file format test"
+		  $ECHO "*** using a file magic. Last file checked: $potlib"
+		fi
+	      fi
+	      ;;
+	    *)
+	      # Add a -L argument.
+	      func_append newdeplibs " $a_deplib"
+	      ;;
+	    esac
+	  done # Gone through all deplibs.
+	  ;;
+	match_pattern*)
+	  set dummy $deplibs_check_method; shift
+	  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    case $a_deplib in
+	    -l*)
+	      func_stripname -l '' "$a_deplib"
+	      name=$func_stripname_result
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  func_append newdeplibs " $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval "\\$ECHO \"$libname_spec\""`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		    potlib="$potent_lib" # see symlink-check above in file_magic test
+		    if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \
+		       $EGREP "$match_pattern_regex" > /dev/null; then
+		      func_append newdeplibs " $a_deplib"
+		      a_deplib=""
+		      break 2
+		    fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		echo
+		$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+		echo "*** I have the capability to make that library automatically link in when"
+		echo "*** you link to this library.  But I can only do this if you have a"
+		echo "*** shared version of the library, which you do not appear to have"
+		echo "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+		else
+		  $ECHO "*** with $libname and none of the candidates passed a file format test"
+		  $ECHO "*** using a regex pattern. Last file checked: $potlib"
+		fi
+	      fi
+	      ;;
+	    *)
+	      # Add a -L argument.
+	      func_append newdeplibs " $a_deplib"
+	      ;;
+	    esac
+	  done # Gone through all deplibs.
+	  ;;
+	none | unknown | *)
+	  newdeplibs=""
+	  tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'`
+	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	    for i in $predeps $postdeps ; do
+	      # can't use Xsed below, because $i might contain '/'
+	      tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"`
+	    done
+	  fi
+	  case $tmp_deplibs in
+	  *[!\	\ ]*)
+	    echo
+	    if test "X$deplibs_check_method" = "Xnone"; then
+	      echo "*** Warning: inter-library dependencies are not supported in this platform."
+	    else
+	      echo "*** Warning: inter-library dependencies are not known to be supported."
+	    fi
+	    echo "*** All declared inter-library dependencies are being dropped."
+	    droppeddeps=yes
+	    ;;
+	  esac
+	  ;;
+	esac
+	versuffix=$versuffix_save
+	major=$major_save
+	release=$release_save
+	libname=$libname_save
+	name=$name_save
+
+	case $host in
+	*-*-rhapsody* | *-*-darwin1.[012])
+	  # On Rhapsody replace the C library with the System framework
+	  newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'`
+	  ;;
+	esac
+
+	if test "$droppeddeps" = yes; then
+	  if test "$module" = yes; then
+	    echo
+	    echo "*** Warning: libtool could not satisfy all declared inter-library"
+	    $ECHO "*** dependencies of module $libname.  Therefore, libtool will create"
+	    echo "*** a static module, that should work as long as the dlopening"
+	    echo "*** application is linked with the -dlopen flag."
+	    if test -z "$global_symbol_pipe"; then
+	      echo
+	      echo "*** However, this would only work if libtool was able to extract symbol"
+	      echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+	      echo "*** not find such a program.  So, this module is probably useless."
+	      echo "*** \`nm' from GNU binutils and a full rebuild may help."
+	    fi
+	    if test "$build_old_libs" = no; then
+	      oldlibs="$output_objdir/$libname.$libext"
+	      build_libtool_libs=module
+	      build_old_libs=yes
+	    else
+	      build_libtool_libs=no
+	    fi
+	  else
+	    echo "*** The inter-library dependencies that have been dropped here will be"
+	    echo "*** automatically added whenever a program is linked with this library"
+	    echo "*** or is declared to -dlopen it."
+
+	    if test "$allow_undefined" = no; then
+	      echo
+	      echo "*** Since this library must not contain undefined symbols,"
+	      echo "*** because either the platform does not support them or"
+	      echo "*** it was explicitly requested with -no-undefined,"
+	      echo "*** libtool will only create a static version of it."
+	      if test "$build_old_libs" = no; then
+		oldlibs="$output_objdir/$libname.$libext"
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  fi
+	fi
+	# Done checking deplibs!
+	deplibs=$newdeplibs
+      fi
+      # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+      case $host in
+	*-*-darwin*)
+	  newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  ;;
+      esac
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+	case " $new_libs " in
+	*" -L$path/$objdir "*) ;;
+	*)
+	  case " $deplibs " in
+	  *" -L$path/$objdir "*)
+	    func_append new_libs " -L$path/$objdir" ;;
+	  esac
+	  ;;
+	esac
+      done
+      for deplib in $deplibs; do
+	case $deplib in
+	-L*)
+	  case " $new_libs " in
+	  *" $deplib "*) ;;
+	  *) func_append new_libs " $deplib" ;;
+	  esac
+	  ;;
+	*) func_append new_libs " $deplib" ;;
+	esac
+      done
+      deplibs="$new_libs"
+
+      # All the library-specific variables (install_libdir is set above).
+      library_names=
+      old_library=
+      dlname=
+
+      # Test again, we may have decided not to build it any more
+      if test "$build_libtool_libs" = yes; then
+	if test "$hardcode_into_libs" = yes; then
+	  # Hardcode the library paths
+	  hardcode_libdirs=
+	  dep_rpath=
+	  rpath="$finalize_rpath"
+	  test "$opt_mode" != relink && rpath="$compile_rpath$rpath"
+	  for libdir in $rpath; do
+	    if test -n "$hardcode_libdir_flag_spec"; then
+	      if test -n "$hardcode_libdir_separator"; then
+		func_replace_sysroot "$libdir"
+		libdir=$func_replace_sysroot_result
+		if test -z "$hardcode_libdirs"; then
+		  hardcode_libdirs="$libdir"
+		else
+		  # Just accumulate the unique libdirs.
+		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		    ;;
+		  *)
+		    func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+		    ;;
+		  esac
+		fi
+	      else
+		eval flag=\"$hardcode_libdir_flag_spec\"
+		func_append dep_rpath " $flag"
+	      fi
+	    elif test -n "$runpath_var"; then
+	      case "$perm_rpath " in
+	      *" $libdir "*) ;;
+	      *) func_apped perm_rpath " $libdir" ;;
+	      esac
+	    fi
+	  done
+	  # Substitute the hardcoded libdirs into the rpath.
+	  if test -n "$hardcode_libdir_separator" &&
+	     test -n "$hardcode_libdirs"; then
+	    libdir="$hardcode_libdirs"
+	    if test -n "$hardcode_libdir_flag_spec_ld"; then
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+	    else
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+	    fi
+	  fi
+	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
+	    # We should set the runpath_var.
+	    rpath=
+	    for dir in $perm_rpath; do
+	      func_append rpath "$dir:"
+	    done
+	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+	  fi
+	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+	fi
+
+	shlibpath="$finalize_shlibpath"
+	test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+	if test -n "$shlibpath"; then
+	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+	fi
+
+	# Get the real and link names of the library.
+	eval shared_ext=\"$shrext_cmds\"
+	eval library_names=\"$library_names_spec\"
+	set dummy $library_names
+	shift
+	realname="$1"
+	shift
+
+	if test -n "$soname_spec"; then
+	  eval soname=\"$soname_spec\"
+	else
+	  soname="$realname"
+	fi
+	if test -z "$dlname"; then
+	  dlname=$soname
+	fi
+
+	lib="$output_objdir/$realname"
+	linknames=
+	for link
+	do
+	  func_append linknames " $link"
+	done
+
+	# Use standard objects if they are pic
+	test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP`
+	test "X$libobjs" = "X " && libobjs=
+
+	delfiles=
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+	  export_symbols="$output_objdir/$libname.uexp"
+	  func_append delfiles " $export_symbols"
+	fi
+
+	orig_export_symbols=
+	case $host_os in
+	cygwin* | mingw* | cegcc*)
+	  if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+	    # exporting using user supplied symfile
+	    if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+	      # and it's NOT already a .def file. Must figure out
+	      # which of the given symbols are data symbols and tag
+	      # them as such. So, trigger use of export_symbols_cmds.
+	      # export_symbols gets reassigned inside the "prepare
+	      # the list of exported symbols" if statement, so the
+	      # include_expsyms logic still works.
+	      orig_export_symbols="$export_symbols"
+	      export_symbols=
+	      always_export_symbols=yes
+	    fi
+	  fi
+	  ;;
+	esac
+
+	# Prepare the list of exported symbols
+	if test -z "$export_symbols"; then
+	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+	    func_verbose "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $opt_dry_run || $RM $export_symbols
+	    cmds=$export_symbols_cmds
+	    save_ifs="$IFS"; IFS='~'
+	    for cmd1 in $cmds; do
+	      IFS="$save_ifs"
+	      # Take the normal branch if the nm_file_list_spec branch
+	      # doesn't work or if tool conversion is not needed.
+	      case $nm_file_list_spec~$to_tool_file_cmd in
+		*~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*)
+		  try_normal_branch=yes
+		  eval cmd=\"$cmd1\"
+		  func_len " $cmd"
+		  len=$func_len_result
+		  ;;
+		*)
+		  try_normal_branch=no
+		  ;;
+	      esac
+	      if test "$try_normal_branch" = yes \
+		 && { test "$len" -lt "$max_cmd_len" \
+		      || test "$max_cmd_len" -le -1; }
+	      then
+		func_show_eval "$cmd" 'exit $?'
+		skipped_export=false
+	      elif test -n "$nm_file_list_spec"; then
+		func_basename "$output"
+		output_la=$func_basename_result
+		save_libobjs=$libobjs
+		save_output=$output
+		output=${output_objdir}/${output_la}.nm
+		func_to_tool_file "$output"
+		libobjs=$nm_file_list_spec$func_to_tool_file_result
+		func_append delfiles " $output"
+		func_verbose "creating $NM input file list: $output"
+		for obj in $save_libobjs; do
+		  func_to_tool_file "$obj"
+		  $ECHO "$func_to_tool_file_result"
+		done > "$output"
+		eval cmd=\"$cmd1\"
+		func_show_eval "$cmd" 'exit $?'
+		output=$save_output
+		libobjs=$save_libobjs
+		skipped_export=false
+	      else
+		# The command line is too long to execute in one step.
+		func_verbose "using reloadable object file for export list..."
+		skipped_export=:
+		# Break out early, otherwise skipped_export may be
+		# set to false by a later but shorter cmd.
+		break
+	      fi
+	    done
+	    IFS="$save_ifs"
+	    if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+	    fi
+	  fi
+	fi
+
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  tmp_export_symbols="$export_symbols"
+	  test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+	  $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+	fi
+
+	if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+	  # The given exports_symbols file has to be filtered, so filter it.
+	  func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+	  # FIXME: $output_objdir/$libname.filter potentially contains lots of
+	  # 's' commands which not all seds can handle. GNU sed should be fine
+	  # though. Also, the filter scales superlinearly with the number of
+	  # global variables. join(1) would be nice here, but unfortunately
+	  # isn't a blessed tool.
+	  $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+	  func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+	  export_symbols=$output_objdir/$libname.def
+	  $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+	fi
+
+	tmp_deplibs=
+	for test_deplib in $deplibs; do
+	  case " $convenience " in
+	  *" $test_deplib "*) ;;
+	  *)
+	    func_append tmp_deplibs " $test_deplib"
+	    ;;
+	  esac
+	done
+	deplibs="$tmp_deplibs"
+
+	if test -n "$convenience"; then
+	  if test -n "$whole_archive_flag_spec" &&
+	    test "$compiler_needs_object" = yes &&
+	    test -z "$libobjs"; then
+	    # extract the archives, so we have objects to list.
+	    # TODO: could optimize this to just extract one archive.
+	    whole_archive_flag_spec=
+	  fi
+	  if test -n "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	    test "X$libobjs" = "X " && libobjs=
+	  else
+	    gentop="$output_objdir/${outputname}x"
+	    func_append generated " $gentop"
+
+	    func_extract_archives $gentop $convenience
+	    func_append libobjs " $func_extract_archives_result"
+	    test "X$libobjs" = "X " && libobjs=
+	  fi
+	fi
+
+	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+	  eval flag=\"$thread_safe_flag_spec\"
+	  func_append linker_flags " $flag"
+	fi
+
+	# Make a backup of the uninstalled library when relinking
+	if test "$opt_mode" = relink; then
+	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+	fi
+
+	# Do each of the archive commands.
+	if test "$module" = yes && test -n "$module_cmds" ; then
+	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	    eval test_cmds=\"$module_expsym_cmds\"
+	    cmds=$module_expsym_cmds
+	  else
+	    eval test_cmds=\"$module_cmds\"
+	    cmds=$module_cmds
+	  fi
+	else
+	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	    eval test_cmds=\"$archive_expsym_cmds\"
+	    cmds=$archive_expsym_cmds
+	  else
+	    eval test_cmds=\"$archive_cmds\"
+	    cmds=$archive_cmds
+	  fi
+	fi
+
+	if test "X$skipped_export" != "X:" &&
+	   func_len " $test_cmds" &&
+	   len=$func_len_result &&
+	   test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  :
+	else
+	  # The command line is too long to link in one step, link piecewise
+	  # or, if using GNU ld and skipped_export is not :, use a linker
+	  # script.
+
+	  # Save the value of $output and $libobjs because we want to
+	  # use them later.  If we have whole_archive_flag_spec, we
+	  # want to use save_libobjs as it was before
+	  # whole_archive_flag_spec was expanded, because we can't
+	  # assume the linker understands whole_archive_flag_spec.
+	  # This may have to be revisited, in case too many
+	  # convenience libraries get linked in and end up exceeding
+	  # the spec.
+	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	  fi
+	  save_output=$output
+	  func_basename "$output"
+	  output_la=$func_basename_result
+
+	  # Clear the reloadable object creation command queue and
+	  # initialize k to one.
+	  test_cmds=
+	  concat_cmds=
+	  objlist=
+	  last_robj=
+	  k=1
+
+	  if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+	    output=${output_objdir}/${output_la}.lnkscript
+	    func_verbose "creating GNU ld script: $output"
+	    echo 'INPUT (' > $output
+	    for obj in $save_libobjs
+	    do
+	      func_to_tool_file "$obj"
+	      $ECHO "$func_to_tool_file_result" >> $output
+	    done
+	    echo ')' >> $output
+	    func_append delfiles " $output"
+	    func_to_tool_file "$output"
+	    output=$func_to_tool_file_result
+	  elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+	    output=${output_objdir}/${output_la}.lnk
+	    func_verbose "creating linker input file list: $output"
+	    : > $output
+	    set x $save_libobjs
+	    shift
+	    firstobj=
+	    if test "$compiler_needs_object" = yes; then
+	      firstobj="$1 "
+	      shift
+	    fi
+	    for obj
+	    do
+	      func_to_tool_file "$obj"
+	      $ECHO "$func_to_tool_file_result" >> $output
+	    done
+	    func_append delfiles " $output"
+	    func_to_tool_file "$output"
+	    output=$firstobj\"$file_list_spec$func_to_tool_file_result\"
+	  else
+	    if test -n "$save_libobjs"; then
+	      func_verbose "creating reloadable object files..."
+	      output=$output_objdir/$output_la-${k}.$objext
+	      eval test_cmds=\"$reload_cmds\"
+	      func_len " $test_cmds"
+	      len0=$func_len_result
+	      len=$len0
+
+	      # Loop over the list of objects to be linked.
+	      for obj in $save_libobjs
+	      do
+		func_len " $obj"
+		func_arith $len + $func_len_result
+		len=$func_arith_result
+		if test "X$objlist" = X ||
+		   test "$len" -lt "$max_cmd_len"; then
+		  func_append objlist " $obj"
+		else
+		  # The command $test_cmds is almost too long, add a
+		  # command to the queue.
+		  if test "$k" -eq 1 ; then
+		    # The first file doesn't have a previous command to add.
+		    reload_objs=$objlist
+		    eval concat_cmds=\"$reload_cmds\"
+		  else
+		    # All subsequent reloadable object files will link in
+		    # the last one created.
+		    reload_objs="$objlist $last_robj"
+		    eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\"
+		  fi
+		  last_robj=$output_objdir/$output_la-${k}.$objext
+		  func_arith $k + 1
+		  k=$func_arith_result
+		  output=$output_objdir/$output_la-${k}.$objext
+		  objlist=" $obj"
+		  func_len " $last_robj"
+		  func_arith $len0 + $func_len_result
+		  len=$func_arith_result
+		fi
+	      done
+	      # Handle the remaining objects by creating one last
+	      # reloadable object file.  All subsequent reloadable object
+	      # files will link in the last one created.
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	      reload_objs="$objlist $last_robj"
+	      eval concat_cmds=\"\${concat_cmds}$reload_cmds\"
+	      if test -n "$last_robj"; then
+	        eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+	      fi
+	      func_append delfiles " $output"
+
+	    else
+	      output=
+	    fi
+
+	    if ${skipped_export-false}; then
+	      func_verbose "generating symbol list for \`$libname.la'"
+	      export_symbols="$output_objdir/$libname.exp"
+	      $opt_dry_run || $RM $export_symbols
+	      libobjs=$output
+	      # Append the command to create the export file.
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	      eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+	      if test -n "$last_robj"; then
+		eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+	      fi
+	    fi
+
+	    test -n "$save_libobjs" &&
+	      func_verbose "creating a temporary reloadable object file: $output"
+
+	    # Loop through the commands generated above and execute them.
+	    save_ifs="$IFS"; IFS='~'
+	    for cmd in $concat_cmds; do
+	      IFS="$save_ifs"
+	      $opt_silent || {
+		  func_quote_for_expand "$cmd"
+		  eval "func_echo $func_quote_for_expand_result"
+	      }
+	      $opt_dry_run || eval "$cmd" || {
+		lt_exit=$?
+
+		# Restore the uninstalled library and exit
+		if test "$opt_mode" = relink; then
+		  ( cd "$output_objdir" && \
+		    $RM "${realname}T" && \
+		    $MV "${realname}U" "$realname" )
+		fi
+
+		exit $lt_exit
+	      }
+	    done
+	    IFS="$save_ifs"
+
+	    if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+	    fi
+	  fi
+
+          if ${skipped_export-false}; then
+	    if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	      tmp_export_symbols="$export_symbols"
+	      test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+	      $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"'
+	    fi
+
+	    if test -n "$orig_export_symbols"; then
+	      # The given exports_symbols file has to be filtered, so filter it.
+	      func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+	      # FIXME: $output_objdir/$libname.filter potentially contains lots of
+	      # 's' commands which not all seds can handle. GNU sed should be fine
+	      # though. Also, the filter scales superlinearly with the number of
+	      # global variables. join(1) would be nice here, but unfortunately
+	      # isn't a blessed tool.
+	      $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+	      func_append delfiles " $export_symbols $output_objdir/$libname.filter"
+	      export_symbols=$output_objdir/$libname.def
+	      $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+	    fi
+	  fi
+
+	  libobjs=$output
+	  # Restore the value of output.
+	  output=$save_output
+
+	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	    test "X$libobjs" = "X " && libobjs=
+	  fi
+	  # Expand the library linking commands again to reset the
+	  # value of $libobjs for piecewise linking.
+
+	  # Do each of the archive commands.
+	  if test "$module" = yes && test -n "$module_cmds" ; then
+	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	      cmds=$module_expsym_cmds
+	    else
+	      cmds=$module_cmds
+	    fi
+	  else
+	    if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	      cmds=$archive_expsym_cmds
+	    else
+	      cmds=$archive_cmds
+	    fi
+	  fi
+	fi
+
+	if test -n "$delfiles"; then
+	  # Append the command to remove temporary files to $cmds.
+	  eval cmds=\"\$cmds~\$RM $delfiles\"
+	fi
+
+	# Add any objects from preloaded convenience libraries
+	if test -n "$dlprefiles"; then
+	  gentop="$output_objdir/${outputname}x"
+	  func_append generated " $gentop"
+
+	  func_extract_archives $gentop $dlprefiles
+	  func_append libobjs " $func_extract_archives_result"
+	  test "X$libobjs" = "X " && libobjs=
+	fi
+
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
+	  $opt_silent || {
+	    func_quote_for_expand "$cmd"
+	    eval "func_echo $func_quote_for_expand_result"
+	  }
+	  $opt_dry_run || eval "$cmd" || {
+	    lt_exit=$?
+
+	    # Restore the uninstalled library and exit
+	    if test "$opt_mode" = relink; then
+	      ( cd "$output_objdir" && \
+	        $RM "${realname}T" && \
+		$MV "${realname}U" "$realname" )
+	    fi
+
+	    exit $lt_exit
+	  }
+	done
+	IFS="$save_ifs"
+
+	# Restore the uninstalled library and exit
+	if test "$opt_mode" = relink; then
+	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+	  if test -n "$convenience"; then
+	    if test -z "$whole_archive_flag_spec"; then
+	      func_show_eval '${RM}r "$gentop"'
+	    fi
+	  fi
+
+	  exit $EXIT_SUCCESS
+	fi
+
+	# Create links to the real library.
+	for linkname in $linknames; do
+	  if test "$realname" != "$linkname"; then
+	    func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+	  fi
+	done
+
+	# If -module or -export-dynamic was specified, set the dlname.
+	if test "$module" = yes || test "$export_dynamic" = yes; then
+	  # On all known operating systems, these are identical.
+	  dlname="$soname"
+	fi
+      fi
+      ;;
+
+    obj)
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	func_warning "\`-dlopen' is ignored for objects"
+      fi
+
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+	func_warning "\`-l' and \`-L' are ignored for objects" ;;
+      esac
+
+      test -n "$rpath" && \
+	func_warning "\`-rpath' is ignored for objects"
+
+      test -n "$xrpath" && \
+	func_warning "\`-R' is ignored for objects"
+
+      test -n "$vinfo" && \
+	func_warning "\`-version-info' is ignored for objects"
+
+      test -n "$release" && \
+	func_warning "\`-release' is ignored for objects"
+
+      case $output in
+      *.lo)
+	test -n "$objs$old_deplibs" && \
+	  func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+
+	libobj=$output
+	func_lo2o "$libobj"
+	obj=$func_lo2o_result
+	;;
+      *)
+	libobj=
+	obj="$output"
+	;;
+      esac
+
+      # Delete the old objects.
+      $opt_dry_run || $RM $obj $libobj
+
+      # Objects from convenience libraries.  This assumes
+      # single-version convenience libraries.  Whenever we create
+      # different ones for PIC/non-PIC, this we'll have to duplicate
+      # the extraction.
+      reload_conv_objs=
+      gentop=
+      # reload_cmds runs $LD directly, so let us get rid of
+      # -Wl from whole_archive_flag_spec and hope we can get by with
+      # turning comma into space..
+      wl=
+
+      if test -n "$convenience"; then
+	if test -n "$whole_archive_flag_spec"; then
+	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+	  reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'`
+	else
+	  gentop="$output_objdir/${obj}x"
+	  func_append generated " $gentop"
+
+	  func_extract_archives $gentop $convenience
+	  reload_conv_objs="$reload_objs $func_extract_archives_result"
+	fi
+      fi
+
+      # If we're not building shared, we need to use non_pic_objs
+      test "$build_libtool_libs" != yes && libobjs="$non_pic_objects"
+
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+      output="$obj"
+      func_execute_cmds "$reload_cmds" 'exit $?'
+
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+	if test -n "$gentop"; then
+	  func_show_eval '${RM}r "$gentop"'
+	fi
+
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$build_libtool_libs" != yes; then
+	if test -n "$gentop"; then
+	  func_show_eval '${RM}r "$gentop"'
+	fi
+
+	# Create an invalid libtool object if no PIC, so that we don't
+	# accidentally link it into a program.
+	# $show "echo timestamp > $libobj"
+	# $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+	exit $EXIT_SUCCESS
+      fi
+
+      if test -n "$pic_flag" || test "$pic_mode" != default; then
+	# Only do commands if we really have different PIC objects.
+	reload_objs="$libobjs $reload_conv_objs"
+	output="$libobj"
+	func_execute_cmds "$reload_cmds" 'exit $?'
+      fi
+
+      if test -n "$gentop"; then
+	func_show_eval '${RM}r "$gentop"'
+      fi
+
+      exit $EXIT_SUCCESS
+      ;;
+
+    prog)
+      case $host in
+	*cygwin*) func_stripname '' '.exe' "$output"
+	          output=$func_stripname_result.exe;;
+      esac
+      test -n "$vinfo" && \
+	func_warning "\`-version-info' is ignored for programs"
+
+      test -n "$release" && \
+	func_warning "\`-release' is ignored for programs"
+
+      test "$preload" = yes \
+        && test "$dlopen_support" = unknown \
+	&& test "$dlopen_self" = unknown \
+	&& test "$dlopen_self_static" = unknown && \
+	  func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+	# On Rhapsody replace the C library is the System framework
+	compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'`
+	finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'`
+	;;
+      esac
+
+      case $host in
+      *-*-darwin*)
+	# Don't allow lazy linking, it breaks C++ global constructors
+	# But is supposedly fixed on 10.4 or later (yay!).
+	if test "$tagname" = CXX ; then
+	  case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+	    10.[0123])
+	      func_append compile_command " ${wl}-bind_at_load"
+	      func_append finalize_command " ${wl}-bind_at_load"
+	    ;;
+	  esac
+	fi
+	# Time to change all our "foo.ltframework" stuff back to "-framework foo"
+	compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+	finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+	;;
+      esac
+
+
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+	case " $new_libs " in
+	*" -L$path/$objdir "*) ;;
+	*)
+	  case " $compile_deplibs " in
+	  *" -L$path/$objdir "*)
+	    func_append new_libs " -L$path/$objdir" ;;
+	  esac
+	  ;;
+	esac
+      done
+      for deplib in $compile_deplibs; do
+	case $deplib in
+	-L*)
+	  case " $new_libs " in
+	  *" $deplib "*) ;;
+	  *) func_append new_libs " $deplib" ;;
+	  esac
+	  ;;
+	*) func_append new_libs " $deplib" ;;
+	esac
+      done
+      compile_deplibs="$new_libs"
+
+
+      func_append compile_command " $compile_deplibs"
+      func_append finalize_command " $finalize_deplibs"
+
+      if test -n "$rpath$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	for libdir in $rpath $xrpath; do
+	  # This is the magic to use -rpath.
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) func_append finalize_rpath " $libdir" ;;
+	  esac
+	done
+      fi
+
+      # Now hardcode the library paths
+      rpath=
+      hardcode_libdirs=
+      for libdir in $compile_rpath $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    func_append rpath " $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) func_append perm_rpath " $libdir" ;;
+	  esac
+	fi
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+	  testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+	  case :$dllsearchpath: in
+	  *":$libdir:"*) ;;
+	  ::) dllsearchpath=$libdir;;
+	  *) func_append dllsearchpath ":$libdir";;
+	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  ::) dllsearchpath=$testbindir;;
+	  *) func_append dllsearchpath ":$testbindir";;
+	  esac
+	  ;;
+	esac
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      compile_rpath="$rpath"
+
+      rpath=
+      hardcode_libdirs=
+      for libdir in $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		func_append hardcode_libdirs "$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
+	  else
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    func_append rpath " $flag"
+	  fi
+	elif test -n "$runpath_var"; then
+	  case "$finalize_perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) func_append finalize_perm_rpath " $libdir" ;;
+	  esac
+	fi
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      finalize_rpath="$rpath"
+
+      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+	# Transform all the library objects into standard objects.
+	compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+	finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP`
+      fi
+
+      func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+
+      # template prelinking step
+      if test -n "$prelink_cmds"; then
+	func_execute_cmds "$prelink_cmds" 'exit $?'
+      fi
+
+      wrappers_required=yes
+      case $host in
+      *cegcc* | *mingw32ce*)
+        # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway.
+        wrappers_required=no
+        ;;
+      *cygwin* | *mingw* )
+        if test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
+        ;;
+      *)
+        if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
+        ;;
+      esac
+      if test "$wrappers_required" = no; then
+	# Replace the output file specification.
+	compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+	link_command="$compile_command$compile_rpath"
+
+	# We have no uninstalled library dependencies, so finalize right now.
+	exit_status=0
+	func_show_eval "$link_command" 'exit_status=$?'
+
+	if test -n "$postlink_cmds"; then
+	  func_to_tool_file "$output"
+	  postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+	  func_execute_cmds "$postlink_cmds" 'exit $?'
+	fi
+
+	# Delete the generated files.
+	if test -f "$output_objdir/${outputname}S.${objext}"; then
+	  func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+	fi
+
+	exit $exit_status
+      fi
+
+      if test -n "$compile_shlibpath$finalize_shlibpath"; then
+	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+      fi
+      if test -n "$finalize_shlibpath"; then
+	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+      fi
+
+      compile_var=
+      finalize_var=
+      if test -n "$runpath_var"; then
+	if test -n "$perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $perm_rpath; do
+	    func_append rpath "$dir:"
+	  done
+	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+	if test -n "$finalize_perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $finalize_perm_rpath; do
+	    func_append rpath "$dir:"
+	  done
+	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+	fi
+      fi
+
+      if test "$no_install" = yes; then
+	# We don't need to create a wrapper script.
+	link_command="$compile_var$compile_command$compile_rpath"
+	# Replace the output file specification.
+	link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'`
+	# Delete the old output file.
+	$opt_dry_run || $RM $output
+	# Link the executable and exit
+	func_show_eval "$link_command" 'exit $?'
+
+	if test -n "$postlink_cmds"; then
+	  func_to_tool_file "$output"
+	  postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+	  func_execute_cmds "$postlink_cmds" 'exit $?'
+	fi
+
+	exit $EXIT_SUCCESS
+      fi
+
+      if test "$hardcode_action" = relink; then
+	# Fast installation is not supported
+	link_command="$compile_var$compile_command$compile_rpath"
+	relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+	func_warning "this platform does not like uninstalled shared libraries"
+	func_warning "\`$output' will be relinked during installation"
+      else
+	if test "$fast_install" != no; then
+	  link_command="$finalize_var$compile_command$finalize_rpath"
+	  if test "$fast_install" = yes; then
+	    relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'`
+	  else
+	    # fast_install is set to needless
+	    relink_command=
+	  fi
+	else
+	  link_command="$compile_var$compile_command$compile_rpath"
+	  relink_command="$finalize_var$finalize_command$finalize_rpath"
+	fi
+      fi
+
+      # Replace the output file specification.
+      link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+      # Delete the old output files.
+      $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+      func_show_eval "$link_command" 'exit $?'
+
+      if test -n "$postlink_cmds"; then
+	func_to_tool_file "$output_objdir/$outputname"
+	postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'`
+	func_execute_cmds "$postlink_cmds" 'exit $?'
+      fi
+
+      # Now create the wrapper script.
+      func_verbose "creating $output"
+
+      # Quote the relink command for shipping.
+      if test -n "$relink_command"; then
+	# Preserve any variables that may affect compiler behavior
+	for var in $variables_saved_for_relink; do
+	  if eval test -z \"\${$var+set}\"; then
+	    relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+	  elif eval var_value=\$$var; test -z "$var_value"; then
+	    relink_command="$var=; export $var; $relink_command"
+	  else
+	    func_quote_for_eval "$var_value"
+	    relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+	  fi
+	done
+	relink_command="(cd `pwd`; $relink_command)"
+	relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if not in dry run mode.
+      $opt_dry_run || {
+	# win32 will think the script is a binary if it has
+	# a .exe suffix, so we strip it off here.
+	case $output in
+	  *.exe) func_stripname '' '.exe' "$output"
+	         output=$func_stripname_result ;;
+	esac
+	# test for cygwin because mv fails w/o .exe extensions
+	case $host in
+	  *cygwin*)
+	    exeext=.exe
+	    func_stripname '' '.exe' "$outputname"
+	    outputname=$func_stripname_result ;;
+	  *) exeext= ;;
+	esac
+	case $host in
+	  *cygwin* | *mingw* )
+	    func_dirname_and_basename "$output" "" "."
+	    output_name=$func_basename_result
+	    output_path=$func_dirname_result
+	    cwrappersource="$output_path/$objdir/lt-$output_name.c"
+	    cwrapper="$output_path/$output_name.exe"
+	    $RM $cwrappersource $cwrapper
+	    trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+	    func_emit_cwrapperexe_src > $cwrappersource
+
+	    # The wrapper executable is built using the $host compiler,
+	    # because it contains $host paths and files. If cross-
+	    # compiling, it, like the target executable, must be
+	    # executed on the $host or under an emulation environment.
+	    $opt_dry_run || {
+	      $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+	      $STRIP $cwrapper
+	    }
+
+	    # Now, create the wrapper script for func_source use:
+	    func_ltwrapper_scriptname $cwrapper
+	    $RM $func_ltwrapper_scriptname_result
+	    trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+	    $opt_dry_run || {
+	      # note: this script will not be executed, so do not chmod.
+	      if test "x$build" = "x$host" ; then
+		$cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+	      else
+		func_emit_wrapper no > $func_ltwrapper_scriptname_result
+	      fi
+	    }
+	  ;;
+	  * )
+	    $RM $output
+	    trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+	    func_emit_wrapper no > $output
+	    chmod +x $output
+	  ;;
+	esac
+      }
+      exit $EXIT_SUCCESS
+      ;;
+    esac
+
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
+
+      if test "$build_libtool_libs" = convenience; then
+	oldobjs="$libobjs_save $symfileobj"
+	addlibs="$convenience"
+	build_libtool_libs=no
+      else
+	if test "$build_libtool_libs" = module; then
+	  oldobjs="$libobjs_save"
+	  build_libtool_libs=no
+	else
+	  oldobjs="$old_deplibs $non_pic_objects"
+	  if test "$preload" = yes && test -f "$symfileobj"; then
+	    func_append oldobjs " $symfileobj"
+	  fi
+	fi
+	addlibs="$old_convenience"
+      fi
+
+      if test -n "$addlibs"; then
+	gentop="$output_objdir/${outputname}x"
+	func_append generated " $gentop"
+
+	func_extract_archives $gentop $addlibs
+	func_append oldobjs " $func_extract_archives_result"
+      fi
+
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+	cmds=$old_archive_from_new_cmds
+      else
+
+	# Add any objects from preloaded convenience libraries
+	if test -n "$dlprefiles"; then
+	  gentop="$output_objdir/${outputname}x"
+	  func_append generated " $gentop"
+
+	  func_extract_archives $gentop $dlprefiles
+	  func_append oldobjs " $func_extract_archives_result"
+	fi
+
+	# POSIX demands no paths to be encoded in archives.  We have
+	# to avoid creating archives with duplicate basenames if we
+	# might have to extract them afterwards, e.g., when creating a
+	# static archive out of a convenience library, or when linking
+	# the entirety of a libtool archive into another (currently
+	# not supported by libtool).
+	if (for obj in $oldobjs
+	    do
+	      func_basename "$obj"
+	      $ECHO "$func_basename_result"
+	    done | sort | sort -uc >/dev/null 2>&1); then
+	  :
+	else
+	  echo "copying selected object files to avoid basename conflicts..."
+	  gentop="$output_objdir/${outputname}x"
+	  func_append generated " $gentop"
+	  func_mkdir_p "$gentop"
+	  save_oldobjs=$oldobjs
+	  oldobjs=
+	  counter=1
+	  for obj in $save_oldobjs
+	  do
+	    func_basename "$obj"
+	    objbase="$func_basename_result"
+	    case " $oldobjs " in
+	    " ") oldobjs=$obj ;;
+	    *[\ /]"$objbase "*)
+	      while :; do
+		# Make sure we don't pick an alternate name that also
+		# overlaps.
+		newobj=lt$counter-$objbase
+		func_arith $counter + 1
+		counter=$func_arith_result
+		case " $oldobjs " in
+		*[\ /]"$newobj "*) ;;
+		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
+		esac
+	      done
+	      func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+	      func_append oldobjs " $gentop/$newobj"
+	      ;;
+	    *) func_append oldobjs " $obj" ;;
+	    esac
+	  done
+	fi
+	eval cmds=\"$old_archive_cmds\"
+
+	func_len " $cmds"
+	len=$func_len_result
+	if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  cmds=$old_archive_cmds
+	elif test -n "$archiver_list_spec"; then
+	  func_verbose "using command file archive linking..."
+	  for obj in $oldobjs
+	  do
+	    func_to_tool_file "$obj"
+	    $ECHO "$func_to_tool_file_result"
+	  done > $output_objdir/$libname.libcmd
+	  func_to_tool_file "$output_objdir/$libname.libcmd"
+	  oldobjs=" $archiver_list_spec$func_to_tool_file_result"
+	  cmds=$old_archive_cmds
+	else
+	  # the command line is too long to link in one step, link in parts
+	  func_verbose "using piecewise archive linking..."
+	  save_RANLIB=$RANLIB
+	  RANLIB=:
+	  objlist=
+	  concat_cmds=
+	  save_oldobjs=$oldobjs
+	  oldobjs=
+	  # Is there a better way of finding the last object in the list?
+	  for obj in $save_oldobjs
+	  do
+	    last_oldobj=$obj
+	  done
+	  eval test_cmds=\"$old_archive_cmds\"
+	  func_len " $test_cmds"
+	  len0=$func_len_result
+	  len=$len0
+	  for obj in $save_oldobjs
+	  do
+	    func_len " $obj"
+	    func_arith $len + $func_len_result
+	    len=$func_arith_result
+	    func_append objlist " $obj"
+	    if test "$len" -lt "$max_cmd_len"; then
+	      :
+	    else
+	      # the above command should be used before it gets too long
+	      oldobjs=$objlist
+	      if test "$obj" = "$last_oldobj" ; then
+		RANLIB=$save_RANLIB
+	      fi
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+	      objlist=
+	      len=$len0
+	    fi
+	  done
+	  RANLIB=$save_RANLIB
+	  oldobjs=$objlist
+	  if test "X$oldobjs" = "X" ; then
+	    eval cmds=\"\$concat_cmds\"
+	  else
+	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+	  fi
+	fi
+      fi
+      func_execute_cmds "$cmds" 'exit $?'
+    done
+
+    test -n "$generated" && \
+      func_show_eval "${RM}r$generated"
+
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      func_verbose "creating $output"
+
+      # Preserve any variables that may affect compiler behavior
+      for var in $variables_saved_for_relink; do
+	if eval test -z \"\${$var+set}\"; then
+	  relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+	elif eval var_value=\$$var; test -z "$var_value"; then
+	  relink_command="$var=; export $var; $relink_command"
+	else
+	  func_quote_for_eval "$var_value"
+	  relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+	fi
+      done
+      # Quote the link command for shipping.
+      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
+      if test "$hardcode_automatic" = yes ; then
+	relink_command=
+      fi
+
+      # Only create the output if not a dry run.
+      $opt_dry_run || {
+	for installed in no yes; do
+	  if test "$installed" = yes; then
+	    if test -z "$install_libdir"; then
+	      break
+	    fi
+	    output="$output_objdir/$outputname"i
+	    # Replace all uninstalled libtool libraries with the installed ones
+	    newdependency_libs=
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      *.la)
+		func_basename "$deplib"
+		name="$func_basename_result"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		test -z "$libdir" && \
+		  func_fatal_error "\`$deplib' is not a valid libtool archive"
+		func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name"
+		;;
+	      -L*)
+		func_stripname -L '' "$deplib"
+		func_replace_sysroot "$func_stripname_result"
+		func_append newdependency_libs " -L$func_replace_sysroot_result"
+		;;
+	      -R*)
+		func_stripname -R '' "$deplib"
+		func_replace_sysroot "$func_stripname_result"
+		func_append newdependency_libs " -R$func_replace_sysroot_result"
+		;;
+	      *) func_append newdependency_libs " $deplib" ;;
+	      esac
+	    done
+	    dependency_libs="$newdependency_libs"
+	    newdlfiles=
+
+	    for lib in $dlfiles; do
+	      case $lib in
+	      *.la)
+	        func_basename "$lib"
+		name="$func_basename_result"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+		test -z "$libdir" && \
+		  func_fatal_error "\`$lib' is not a valid libtool archive"
+		func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name"
+		;;
+	      *) func_append newdlfiles " $lib" ;;
+	      esac
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      case $lib in
+	      *.la)
+		# Only pass preopened files to the pseudo-archive (for
+		# eventual linking with the app. that links it) if we
+		# didn't already link the preopened objects directly into
+		# the library:
+		func_basename "$lib"
+		name="$func_basename_result"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+		test -z "$libdir" && \
+		  func_fatal_error "\`$lib' is not a valid libtool archive"
+		func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name"
+		;;
+	      esac
+	    done
+	    dlprefiles="$newdlprefiles"
+	  else
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      func_append newdlfiles " $abs"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      func_append newdlprefiles " $abs"
+	    done
+	    dlprefiles="$newdlprefiles"
+	  fi
+	  $RM $output
+	  # place dlname in correct position for cygwin
+	  # In fact, it would be nice if we could use this code for all target
+	  # systems that can't hard-code library paths into their executables
+	  # and that have no shared library path variable independent of PATH,
+	  # but it turns out we can't easily determine that from inspecting
+	  # libtool variables, so we have to hard-code the OSs to which it
+	  # applies here; at the moment, that means platforms that use the PE
+	  # object format with DLL files.  See the long comment at the top of
+	  # tests/bindir.at for full details.
+	  tdlname=$dlname
+	  case $host,$output,$installed,$module,$dlname in
+	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll)
+	      # If a -bindir argument was supplied, place the dll there.
+	      if test "x$bindir" != x ;
+	      then
+		func_relative_path "$install_libdir" "$bindir"
+		tdlname=$func_relative_path_result$dlname
+	      else
+		# Otherwise fall back on heuristic.
+		tdlname=../bin/$dlname
+	      fi
+	      ;;
+	  esac
+	  $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+	  if test "$installed" = no && test "$need_relink" = yes; then
+	    $ECHO >> $output "\
+relink_command=\"$relink_command\""
+	  fi
+	done
+      }
+
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+      ;;
+    esac
+    exit $EXIT_SUCCESS
+}
+
+{ test "$opt_mode" = link || test "$opt_mode" = relink; } &&
+    func_mode_link ${1+"$@"}
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+    $opt_debug
+    RM="$nonopt"
+    files=
+    rmforce=
+    exit_status=0
+
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
+
+    for arg
+    do
+      case $arg in
+      -f) func_append RM " $arg"; rmforce=yes ;;
+      -*) func_append RM " $arg" ;;
+      *) func_append files " $arg" ;;
+      esac
+    done
+
+    test -z "$RM" && \
+      func_fatal_help "you must specify an RM program"
+
+    rmdirs=
+
+    for file in $files; do
+      func_dirname "$file" "" "."
+      dir="$func_dirname_result"
+      if test "X$dir" = X.; then
+	odir="$objdir"
+      else
+	odir="$dir/$objdir"
+      fi
+      func_basename "$file"
+      name="$func_basename_result"
+      test "$opt_mode" = uninstall && odir="$dir"
+
+      # Remember odir for removal later, being careful to avoid duplicates
+      if test "$opt_mode" = clean; then
+	case " $rmdirs " in
+	  *" $odir "*) ;;
+	  *) func_append rmdirs " $odir" ;;
+	esac
+      fi
+
+      # Don't error if the file doesn't exist and rm -f was used.
+      if { test -L "$file"; } >/dev/null 2>&1 ||
+	 { test -h "$file"; } >/dev/null 2>&1 ||
+	 test -f "$file"; then
+	:
+      elif test -d "$file"; then
+	exit_status=1
+	continue
+      elif test "$rmforce" = yes; then
+	continue
+      fi
+
+      rmfiles="$file"
+
+      case $name in
+      *.la)
+	# Possibly a libtool archive, so verify it.
+	if func_lalib_p "$file"; then
+	  func_source $dir/$name
+
+	  # Delete the libtool libraries and symlinks.
+	  for n in $library_names; do
+	    func_append rmfiles " $odir/$n"
+	  done
+	  test -n "$old_library" && func_append rmfiles " $odir/$old_library"
+
+	  case "$opt_mode" in
+	  clean)
+	    case " $library_names " in
+	    *" $dlname "*) ;;
+	    *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;;
+	    esac
+	    test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i"
+	    ;;
+	  uninstall)
+	    if test -n "$library_names"; then
+	      # Do each command in the postuninstall commands.
+	      func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+	    fi
+
+	    if test -n "$old_library"; then
+	      # Do each command in the old_postuninstall commands.
+	      func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+	    fi
+	    # FIXME: should reinstall the best remaining shared library.
+	    ;;
+	  esac
+	fi
+	;;
+
+      *.lo)
+	# Possibly a libtool object, so verify it.
+	if func_lalib_p "$file"; then
+
+	  # Read the .lo file
+	  func_source $dir/$name
+
+	  # Add PIC object to the list of files to remove.
+	  if test -n "$pic_object" &&
+	     test "$pic_object" != none; then
+	    func_append rmfiles " $dir/$pic_object"
+	  fi
+
+	  # Add non-PIC object to the list of files to remove.
+	  if test -n "$non_pic_object" &&
+	     test "$non_pic_object" != none; then
+	    func_append rmfiles " $dir/$non_pic_object"
+	  fi
+	fi
+	;;
+
+      *)
+	if test "$opt_mode" = clean ; then
+	  noexename=$name
+	  case $file in
+	  *.exe)
+	    func_stripname '' '.exe' "$file"
+	    file=$func_stripname_result
+	    func_stripname '' '.exe' "$name"
+	    noexename=$func_stripname_result
+	    # $file with .exe has already been added to rmfiles,
+	    # add $file without .exe
+	    func_append rmfiles " $file"
+	    ;;
+	  esac
+	  # Do a test to see if this is a libtool program.
+	  if func_ltwrapper_p "$file"; then
+	    if func_ltwrapper_executable_p "$file"; then
+	      func_ltwrapper_scriptname "$file"
+	      relink_command=
+	      func_source $func_ltwrapper_scriptname_result
+	      func_append rmfiles " $func_ltwrapper_scriptname_result"
+	    else
+	      relink_command=
+	      func_source $dir/$noexename
+	    fi
+
+	    # note $name still contains .exe if it was in $file originally
+	    # as does the version of $file that was added into $rmfiles
+	    func_append rmfiles " $odir/$name $odir/${name}S.${objext}"
+	    if test "$fast_install" = yes && test -n "$relink_command"; then
+	      func_append rmfiles " $odir/lt-$name"
+	    fi
+	    if test "X$noexename" != "X$name" ; then
+	      func_append rmfiles " $odir/lt-${noexename}.c"
+	    fi
+	  fi
+	fi
+	;;
+      esac
+      func_show_eval "$RM $rmfiles" 'exit_status=1'
+    done
+
+    # Try to remove the ${objdir}s in the directories where we deleted files
+    for dir in $rmdirs; do
+      if test -d "$dir"; then
+	func_show_eval "rmdir $dir >/dev/null 2>&1"
+      fi
+    done
+
+    exit $exit_status
+}
+
+{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } &&
+    func_mode_uninstall ${1+"$@"}
+
+test -z "$opt_mode" && {
+  help="$generic_help"
+  func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+  func_fatal_help "invalid operation mode \`$opt_mode'"
+
+if test -n "$exec_cmd"; then
+  eval exec "$exec_cmd"
+  exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries.  Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them.  This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration.  But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
+# vi:sw=2
+
diff --git a/config/missing b/config/missing
new file mode 100644
index 0000000..6a37006
--- /dev/null
+++ b/config/missing
@@ -0,0 +1,336 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+case "$1" in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing 0.4 - GNU automake"
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+  aclocal*)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case "$f" in
+      *:*) touch_files="$touch_files "`echo "$f" |
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+	   sed 's/\.am$/.in/' |
+	   while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+         system.  You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1Help2man' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo "#! /bin/sh"
+	echo "# Created by GNU Automake missing as a replacement of"
+	echo "#  $ $@"
+	echo "exit 0"
+	chmod +x $file
+	exit 1
+    fi
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f y.tab.h ]; then
+	echo >y.tab.h
+    fi
+    if [ ! -f y.tab.c ]; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f lex.yy.c ]; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+	 you modified a dependency of a manual page.  You may need the
+	 \`Help2man' package in order for those modifications to take
+	 effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+    fi
+    if [ -f "$file" ]; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo ".ab help2man is required to generate this page"
+	exit 1
+    fi
+    ;;
+
+  makeinfo)
+    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
+       # We have makeinfo, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+    fi
+    touch $file
+    ;;
+
+  tar)
+    shift
+    if test -n "$run"; then
+      echo 1>&2 "ERROR: \`tar' requires --run"
+      exit 1
+    fi
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+	case "$firstarg" in
+	*o*)
+	    firstarg=`echo "$firstarg" | sed s/o//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+	case "$firstarg" in
+	*h*)
+	    firstarg=`echo "$firstarg" | sed s/h//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+         system.  You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequirements for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..603d1d5
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,389 @@
+# This file is processed by autoconf to create a Makefile for the GARLI
+# This file was written by hand (by mth using PAUP's configure.ac and http://autotoolset.sourceforge.net/tutorial.html as guides).
+
+AC_PREREQ(2.59)
+AC_INIT([Garli], [2.1], [garli.support at gmail.com])
+
+AC_CONFIG_SRCDIR([src/garlimain.cpp])
+AC_CONFIG_HEADER([config.h])
+
+#	Directory that contains install-sh and other auxiliary files
+AC_CONFIG_AUX_DIR([config])
+
+################################################################################
+# Checks for build-platform and target info
+#	this defines the "target" variable that is used later in this file
+################################################################################
+AC_CANONICAL_TARGET
+
+################################################################################
+#	According to (http://www.mail-archive.com/autoconf@gnu.org/msg14232.html)
+#		this macro should be after AC_INIT but before AM_INIT_AUTOMAKE
+################################################################################
+AC_CONFIG_MACRO_DIR(config)
+
+AM_INIT_AUTOMAKE([1.9 foreign dist-tarZ tar-ustar filename-length-max=299])
+
+# Checks for programs.
+AC_PROG_LN_S
+AC_PROG_CC
+AC_PROG_CPP
+INP_CXXFLAGS="$CXXFLAGS"
+AC_PROG_CXX
+
+# Initialize CXXFLAGS to prevent it from defaulting to "-g -O2"
+CXXFLAGS="$INP_CXXFLAGS -DUNIX -DNCL_CONST_FUNCS"
+
+# required because we are building a library 
+AC_PROG_RANLIB
+
+
+AC_PROG_INSTALL
+#AC_PROG_LIBTOOL
+
+# Checks for libraries.
+
+# Checks for header files.
+AC_HEADER_STDC
+AC_CHECK_HEADERS([float.h malloc.h stddef.h stdlib.h sys/time.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_C_CONST
+AC_C_INLINE
+AC_TYPE_SIZE_T
+AC_STRUCT_TM
+
+# Checks for library functions.
+AC_FUNC_ERROR_AT_LINE
+AC_FUNC_MALLOC
+AC_FUNC_STRTOD
+AC_CHECK_FUNCS([floor memmove memset pow sqrt strchr strdup strtol])
+
+# A few miscelaneous features, not of general interest
+AC_ARG_ENABLE(profiler, AC_HELP_STRING([--enable-profiler], [built in runtime profiler]),
+[AC_DEFINE([ENABLE_CUSTOM_PROFILER], [1], [profiler for assessing execution times])],
+[])
+
+AC_ARG_ENABLE(leak_detection, AC_HELP_STRING([--enable-leak-detection], [memory leak detection is turned on]),
+[AC_DEFINE([MONITORING_ALLOCATION], [1], [monitors all allocation/deallocation, writes report])],
+[])
+
+
+#--------------------------------------------------------------------------------------------------#
+#  Set CXXFLAGS                                                                                    #
+#--------------------------------------------------------------------------------------------------#
+
+
+# Check for debugging mode.
+AC_ARG_ENABLE(debugging,
+	AC_HELP_STRING([--enable-debugging],[build for debugging]), , [enable_debugging=no])
+if test "$enable_debugging" = yes; then
+	AC_MSG_NOTICE([
+	   *** NOTE: debugging is enabled; optimization is suppressed!
+	   ])
+fi
+
+
+# we tell NCL that we will ignore asserts
+NCL_ASSERT_FLAG="-DIGNORE_NXS_ASSERT"
+# Check whether asserts should be allowed.
+AC_ARG_ENABLE(asserts,
+	AC_HELP_STRING([--enable-asserts],[build with asserts on (NDEBUG not defined)]), , [enable_asserts=no])
+if test "$enable_asserts" = yes; then
+	AC_MSG_NOTICE([
+	   *** NOTE: compiling with assertions on (NDEBUG not defined)
+	   ])
+	if test "$enable_debugging" = yes; then
+		NCL_ASSERT_FLAG=""
+	fi
+fi
+
+# Compile openMP multithreaded version
+AC_ARG_ENABLE(openmp,
+	AC_HELP_STRING([--enable-openmp],[build OpenMP multithreaded version]), , [enable_openmp=no])
+if test "$enable_openmp" = yes; then
+	AC_MSG_NOTICE([
+	   *** NOTE: compiling OpenMP multithreaded version
+	   ])
+fi
+
+# Compile BOINC version
+AC_ARG_ENABLE(boinc,
+        AC_HELP_STRING([--enable-boinc],[build BOINC version (requires BOINC library and api installation.  Building may require much fiddling.)]), , [enable_boinc=no])
+if test "$enable_boinc" = yes; then
+        AC_MSG_NOTICE([
+           *** NOTE: compiling BOINC version
+           ])
+fi
+
+# Mpi run forking version
+AC_ARG_ENABLE(mpi,
+	AC_HELP_STRING([--enable-mpi],[build MPI run distributing version]), , [enable_mpi=no])
+if test "$enable_mpi" = yes; then
+	AC_MSG_NOTICE([
+	   *** NOTE: compiling MPI run distributing version
+	   ])
+fi
+
+# old Mpi wrapper version - run series of configs named run0.conf, run1.conf, etc
+AC_ARG_ENABLE(oldmpi,
+        AC_HELP_STRING([--enable-oldmpi],[build old MPI batch run version (YOU PROBABLY DON'T WANT THIS)]), , [enable_oldmpi=no])
+if test "$enable_oldmpi" = yes; then
+        AC_MSG_NOTICE([
+           *** NOTE: compiling old MPI batch run version
+           ])
+fi
+
+# single precision version (still being tested)
+AC_ARG_ENABLE(single-prec,
+        AC_HELP_STRING([--enable-single-prec],[use single precision floating point variables (EXPERIMENTAL)]), , [enable_single_prec=no])
+if test "$enable_single_prec" = yes; then
+        AC_MSG_NOTICE([
+           *** NOTE: compiling single precision floating point version
+           ])
+fi
+
+
+# Initialize optimization flag in case it doesn't get set below.
+CXXFLAGS_OPTIM_SPEED="-O"
+
+# "-g" may not work with some compilers, but end users shouldn't be
+if test "$enable_debugging" = yes; then
+	CXXFLAGS_OPTIM_SPEED="-O0"
+	CXXFLAGS="$CXXFLAGS -Wall -g -Wreturn-type -Wunused -Wredundant-decls -Wcast-align -Wcomment -Wextra"
+fi
+
+#DJZ allow turning off NDEBUG only
+if test  "$enable_asserts" = no; then
+	CXXFLAGS="$CXXFLAGS -DNDEBUG"
+fi
+
+#DJZ OpenMP compilation
+if test  "$enable_openmp" = yes; then
+	if test "$CC" = "icc"; then
+		CXXFLAGS="$CXXFLAGS -openmp"
+	elif test "$CC" = "gcc"; then
+		CXXFLAGS="$CXXFLAGS -fopenmp"
+	else
+		AC_MSG_ERROR([the --enable-openmp option can only be used with the intel compiler and newer versions of gcc (CC=icc or CC=gcc)])
+	fi
+fi
+
+#BOINC compilation
+if test  "$enable_boinc" = yes; then
+        CXXFLAGS="$CXXFLAGS -DBOINC"
+		LIBS="$LIBS -lpthread -lboinc_api -lboinc"
+fi
+
+#Compiler choice
+if test "$CC" = "icc" -o "$CC" = "icc" ; then
+#	Intel C compiler for Linux
+	if test "$enable_debugging" = no; then
+		CXXFLAGS_OPTIM_SPEED="-O2 -ip -funroll-loops -fno-alias"
+	fi
+elif test "$CC" = "ccc"; then
+#	Compaq C compiler for Linux
+	if test "x$arch" = "x"; then
+		arch="host"
+	fi
+	if test "$enable_debugging" = no; then
+		CXXFLAGS_OPTIM_SPEED="-fast -inline speed -arch $arch"
+	fi
+elif test "$CC" = "xlc"; then
+#	IBM XL C compiler
+	CCFLAGS="$CXXFLAGS -qsourcetype=c++ -qenablevmx -qchars=signed"
+	if test "x$arch" = "x"; then
+		arch="auto"
+	fi
+	if test "$enable_debugging" = no; then
+		CXXFLAGS_OPTIM_SPEED="-O3 -qarch=$arch -qtune=$arch -qalias=ansi -qunroll=yes"
+	fi
+elif test "x$GCC" = "xyes" ; then
+	CXXFLAGS="$CXXFLAGS -Wno-uninitialized"
+	if test "$enable_debugging" = yes; then
+		CXXFLAGS_OPTIM_SPEED="-O0 -Wimplicit"
+	else
+		CXXFLAGS_OPTIM_SPEED="-O3 -ffast-math -funroll-loops -fstrict-aliasing"
+	fi
+	case "$build_os" in
+	 	darwin*) CXXFLAGS="$CXXFLAGS" ;;
+	 	*) CXXFLAGS="$CXXFLAGS -fsigned-char";;
+	esac	
+fi
+
+#single precision
+if test  "$enable_single_prec" = yes; then
+	CXXFLAGS="$CXXFLAGS -DSINGLE_PRECISION_FLOATS"
+	if test "$CC" = "gcc" ; then
+		CXXFLAGS="$CXXFLAGS -fno-caller-saves"
+	fi
+fi
+
+AC_LANG(C++)
+ACX_MPI
+
+#MPI run forker
+if test  "$enable_mpi" = yes; then
+	CXXFLAGS="$CXXFLAGS -DSUBROUTINE_GARLI"
+	CC="$MPICC"
+	CXX="$MPICXX"
+	LIBS="$MPILIBS $LIBS"
+fi
+
+#old MPI versionr
+if test  "$enable_oldmpi" = yes; then
+	CXXFLAGS="$CXXFLAGS -DOLD_SUBROUTINE_GARLI"
+	CC="$MPICC"
+	CXX="$MPICXX"
+	LIBS="$MPILIBS $LIBS"
+fi
+
+
+CXXFLAGS="$CXXFLAGS $CXXFLAGS_OPTIM_SPEED"
+
+#Location of BOINC library and include files
+BOINC_INSTALL="/usr"
+AC_ARG_WITH(
+	[boinc],
+	AC_HELP_STRING(
+		[--with-boinc=DIR],
+		[Specify the root directory for the BOINC library (parent of the include/boinc and lib directories). Omit this flag to use a system level install of BOINC.]
+		),        
+	[
+	if ! test "$withval" = "yes" -o "$withval" = "no" ; then
+		BOINC_INSTALL="$withval"
+	fi
+	])
+
+if test  "$enable_boinc" = yes; then
+	BOINC_INCL="$BOINC_INSTALL/include/boinc"
+	BOINC_LIB_DIR="$BOINC_INSTALL/lib"
+	if ! test -d "$BOINC_INSTALL" ; then
+		AC_MSG_ERROR([A BOINC library and api installation is required for building the BOINC version of GARLI. Expecting a directory called $BOINC_INCL and libboinc library files in $BOINC_LIB_DIR. Use the --with-boinc flag with configure to specify a location other than /usr/local, or verify that the specified location is correct.])
+	fi
+	CXXFLAGS="$CXXFLAGS -I$BOINC_INCL"
+	LDFLAGS="$LDFLAGS -L$BOINC_LIB_DIR"
+fi
+
+################################################################################
+#	Require the builder to provide the --with-ncl argument,
+#	otherwise default to looking for a system level installation.
+#	ideally people should be using the build_garli.sh install script
+################################################################################
+NCL_INC_DIR="/usr/local/include"
+NCL_LIB_DIR="/usr/local/lib"
+NCL_BIN_DIR="/usr/local/bin"
+
+AC_ARG_WITH(
+	[ncl],
+	AC_HELP_STRING(
+		[--with-ncl=DIR],
+		[Specify the root directory for the ncl version 2.1 or greater library (parent of the include/ncl and lib directories).  Omit this flag and configure will look for a system level NCL installation.  You might use the build_garli.sh script to automate the build process.]
+		),
+	[
+	if ! test "$withval" = "yes" -o "$withval" = "no" ; then
+		NCL_INC_DIR="$withval/include"
+		NCL_LIB_DIR="$withval/lib"
+		NCL_BIN_DIR="$withval/bin"
+	fi
+	])
+
+####DJZ This was to look for an NCL install in other places, but 
+#I gave up on it because the user should either use the script
+#or know what they are doing.
+#if ! test -n "$WNCL" ; then
+#	echo WITH_NCL NOT SPECIFIED
+#	if test -d "$srcdir/ncl/" ; then
+#		echo FOUND NCL DIR
+#		nl=`ls -ld $srcdir/ncl*/ | wc -l`
+#		echo ###		
+#		echo $nl
+#		echo ###
+#		if ! test $nl = 1 ; then
+#			AC_MSG_ERROR([Multiple NCL directories found.])
+#		fi
+#		NCL_BASE=`ls -d $srcdir/ncl*/`
+#		NCL_INC_DIR="$NCL_BASE/include"
+#		NCL_LIB_DIR="$NCL_BASE/lib"
+#		echo NCL_INC_DIR $NCL_INC_DIR
+#	else
+#		echo NO NCL DIR FOUND	
+#	fi
+#else
+#	echo WITH_NCL SPECIFIED
+#fi
+###
+
+if ! test -d "$NCL_INC_DIR/ncl" ; then
+	AC_MSG_ERROR([NCL 2.1 or higher is a prerequisite for building Garli. Expecting a directory called $NCL_INC_DIR/ncl, verify that the argument to --with-ncl is correct.])
+else
+	if ! test -f "$NCL_INC_DIR/ncl/nxsdefs.h" ; then
+		AC_MSG_ERROR([NCL 2.1 or higher is a prerequisite for building Garli. Expecting a directory called $NCL_INC_DIR/ncl, verify that the argument to --with-ncl is correct.])
+	fi
+fi
+
+if ! test -d "$NCL_LIB_DIR" ; then
+	AC_MSG_ERROR([NCL 2.1 or higher is a prerequisite for building Garli. Expecting a directory called $NCL_LIB_DIR, verify that the argument to --with-ncl is correct.])
+fi
+
+CPPFLAGS="$CPPFLAGS -I$NCL_INC_DIR -I$NCL_INC_DIR/ncl $NCL_ASSERT_FLAG"
+if test -d "$NCL_LIB_DIR/ncl" ; then
+	LDFLAGS="$LDFLAGS -L$NCL_LIB_DIR/ncl"
+else
+	LDFLAGS="$LDFLAGS -L$NCL_LIB_DIR"
+fi
+
+LIBS="$LIBS -lncl"
+
+AC_TRY_LINK(
+[],
+[int foo=2;],
+[],
+[AC_MSG_ERROR([Problem with link flags.  Most likely a library cannot be found.  
+Check that any libraries listed below can be found in a system default location or a location specified in LDFLAGS with a -L. 
+LIBS=$LIBS
+LDFLAGS=$LDFLAGS
+])])
+
+AC_TRY_LINK( 
+[#include "ncl/nxsdefs.h" ], 
+[onlyDefinedInCouldBeConst ();], 
+[], 
+[AC_MSG_ERROR([NCL must be compiled with the NCL_CONST_FUNCS macro defined. Usually adding -DNCL_CONST_FUNCS to CPPFLAGS in your invocation of the NCL configure script is the solution.])]) 
+
+AC_COMPILE_IFELSE( 
+[#include "ncl/nxsdefs.h" 
+# if ! defined(NCL_MAJOR_VERSION) ||  NCL_MAJOR_VERSION < 2
+#	error "need at least v2"
+# else
+# 	 if ! defined(NCL_MINOR_VERSION) ||  NCL_MINOR_VERSION < 1
+#		error "need at least v2.1"
+#	 endif
+# endif
+], 
+[], 
+[AC_MSG_ERROR([Sorry. NCL 2.1 or greater is required.])]) 
+
+GARLI_LIBS="-lncl"
+
+AC_SUBST([NCL_BIN_DIR])
+
+AC_SUBST([GARLI_LIBS])
+
+AC_SUBST([CPPFLAGS])
+AC_SUBST([LDFLAGS])
+
+
+#currently we are bundling NCL in the svn, so we know the path
+
+# Variables to substitute in Makefile:
+AC_SUBST(CPPFLAGS)
+
+AC_CONFIG_FILES([
+	Makefile 			\
+	src/Makefile		\
+	tests/Makefile	\
+	])
+
+AC_OUTPUT
diff --git a/debian/README.test b/debian/README.test
deleted file mode 100644
index 97f2ad2..0000000
--- a/debian/README.test
+++ /dev/null
@@ -1,10 +0,0 @@
-Notes on how this package can be tested.
-────────────────────────────────────────
-
-To run the unit tests provided by the package you can do
-
-   sh run-unit-test
-
-in this directory.  More options for testing are in the garli-examples
-package.
-
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644
index cef7ad8..0000000
--- a/debian/changelog
+++ /dev/null
@@ -1,11 +0,0 @@
-garli (2.1-2) UNRELEASED; urgency=medium
-
-  * Add some copyright holders
-
- -- Andreas Tille <tille at debian.org>  Wed, 08 Jun 2016 08:06:57 +0200
-
-garli (2.1-1) unstable; urgency=low
-
-  * Initial release (Closes: #826236)
-
- -- Andreas Tille <tille at debian.org>  Fri, 03 Jun 2016 16:57:40 +0200
diff --git a/debian/clean b/debian/clean
deleted file mode 100644
index ec8481c..0000000
--- a/debian/clean
+++ /dev/null
@@ -1,5 +0,0 @@
-tests/*.log
-tests/*.tre
-tests/*.check
-tests/out*.phy
-tests/test.out.*.nex
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index ec63514..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-9
diff --git a/debian/control b/debian/control
deleted file mode 100644
index 90c0295..0000000
--- a/debian/control
+++ /dev/null
@@ -1,41 +0,0 @@
-Source: garli
-Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
-Uploaders: Andreas Tille <tille at debian.org>
-Section: science
-Priority: optional
-Build-Depends: debhelper (>= 9),
-               dh-autoreconf,
-               libncl-dev (>= 2.1.18+dfsg-2),
-               ncl-tools,
-               bc
-Standards-Version: 3.9.8
-Vcs-Browser: https://anonscm.debian.org/viewvc/debian-med/trunk/packages/garli/trunk/
-Vcs-Svn: svn://anonscm.debian.org/debian-med/trunk/packages/garle/trunk/
-Homepage: https://github.com/Ashod/garli
-
-Package: garli
-Architecture: any
-Depends: ${shlibs:Depends},
-         ${misc:Depends}
-Description: phylogenetic analysis of molecular sequence data using maximum-likelihood
- GARLI, Genetic Algorithm for Rapid Likelihood Inference is a program for
- inferring phylogenetic trees. Using an approach similar to a classical
- genetic algorithm, it rapidly searches the space of evolutionary trees
- and model parameters to find the solution maximizing the likelihood
- score. It implements nucleotide, amino acid and codon-based models of
- sequence evolution, and runs on all platforms. The latest version adds
- support for partitioned models and morphology-like datatypes.
-
-Package: garli-examples
-Architecture: all
-Depends: ${misc:Depends}
-Description: phylogenetic analysis of molecular sequence data using maximum-likelihood (examples)
- GARLI, Genetic Algorithm for Rapid Likelihood Inference is a program for
- inferring phylogenetic trees. Using an approach similar to a classical
- genetic algorithm, it rapidly searches the space of evolutionary trees
- and model parameters to find the solution maximizing the likelihood
- score. It implements nucleotide, amino acid and codon-based models of
- sequence evolution, and runs on all platforms. The latest version adds
- support for partitioned models and morphology-like datatypes.
- .
- This package contains example data for garli.
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100644
index 6adf8be..0000000
--- a/debian/copyright
+++ /dev/null
@@ -1,34 +0,0 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Name: garli
-Upstream-Contact: garli.support at gmail.com
-                  https://github.com/Ashod/garli/issues
-Source: https://github.com/Ashod/garli/releases
-
-Files: *
-Copyright: 2005-2014 Ashod Nakashian, Derrick J. Zwickl,
-           1999-2002 Paul O. Lewis
-License: GPL-3+
-
-Files: src/linalg.h
-Copyright: 1998 David L. Swofford, Smithsonian Institution.
-License: GPL-3+
-
-Files: debian/*
-Copyright: 2016 Andreas Tille <tille at debian.org>
-License: GPL-3+
-
-License: GPL-3+
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License.
- .
- This package is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
- .
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- .
- On Debian systems, the complete text of the GNU General Public
- License version 3 can be found in "/usr/share/common-licenses/GPL-3".
diff --git a/debian/docs b/debian/docs
deleted file mode 100644
index 9a4f4f8..0000000
--- a/debian/docs
+++ /dev/null
@@ -1,2 +0,0 @@
-debian/README.test
-debian/tests/run-unit-test
diff --git a/debian/garli-examples.examples b/debian/garli-examples.examples
deleted file mode 100644
index 0ae8e92..0000000
--- a/debian/garli-examples.examples
+++ /dev/null
@@ -1 +0,0 @@
-example/partition
diff --git a/debian/garli.1 b/debian/garli.1
deleted file mode 100644
index 93c9641..0000000
--- a/debian/garli.1
+++ /dev/null
@@ -1,42 +0,0 @@
-.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.47.4.
-.TH GARLI "1" "June 2016" "garli 2.1" "User Commands"
-.SH NAME
-garli \- phylogenetic analysis of molecular sequence data using maximum-likelihood
-.SH SYNOPSIS
-.B garli
-[\fI\,OPTION\/\fR] [\fI\,config filename\/\fR]
-.SH DESCRIPTION
-GARLI, Genetic Algorithm for Rapid Likelihood Inference is a program for
-inferring phylogenetic trees. Using an approach similar to a classical
-genetic algorithm, it rapidly searches the space of evolutionary trees
-and model parameters to find the solution maximizing the likelihood
-score. It implements nucleotide, amino acid and codon-based models of
-sequence evolution, and runs on all platforms. The latest version adds
-support for partitioned models and morphology-like datatypes.
-.SH OPTIONS
-.TP
-\fB\-i\fR, \fB\-\-interactive\fR
-interactive mode (allow and/or expect user feedback)
-.TP
-\fB\-b\fR, \fB\-\-batch\fR
-batch mode (do not expect user input)
-(batch is the default for the version you are running)
-.TP
-\fB\-v\fR, \fB\-\-version\fR
-print version information and exit
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-print this help and exit
-.TP
-\fB\-t\fR
-run internal tests (requires dataset and config file)
-.TP
-\fB\-V\fR
-validate: load config file and data, validate config file, data, starting trees
-and constraint files, print required memory and selected model, then exit
-.P
-NOTE: If no config filename is passed on the command line the program
-will look in the current directory for a file named "garli.conf"
-.PP
-.SH AUTHOR
-This manpage was written by Andreas Tille for the Debian distribution and can be used for any other usage of the program.
diff --git a/debian/garli.docs b/debian/garli.docs
deleted file mode 100644
index 2211df6..0000000
--- a/debian/garli.docs
+++ /dev/null
@@ -1 +0,0 @@
-*.txt
diff --git a/debian/garli.examples b/debian/garli.examples
deleted file mode 100644
index e38b078..0000000
--- a/debian/garli.examples
+++ /dev/null
@@ -1 +0,0 @@
-example/basic
diff --git a/debian/garli.install b/debian/garli.install
deleted file mode 100644
index 4d037b8..0000000
--- a/debian/garli.install
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/bin		usr/lib/garli
-# debian/bin	usr
diff --git a/debian/garli.links b/debian/garli.links
deleted file mode 100644
index 5dd8f73..0000000
--- a/debian/garli.links
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/garli/bin/Garli	usr/bin/garli
diff --git a/debian/manpages b/debian/manpages
deleted file mode 100644
index 0f65186..0000000
--- a/debian/manpages
+++ /dev/null
@@ -1 +0,0 @@
-debian/*.1
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index c0d6c8b..0000000
--- a/debian/rules
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/usr/bin/make -f
-
-export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-
-%:
-	dh $@ --with autoreconf
-
-override_dh_auto_configure:
-	dh_auto_configure -- --with-ncl=/usr
diff --git a/debian/source/format b/debian/source/format
deleted file mode 100644
index 163aaf8..0000000
--- a/debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (quilt)
diff --git a/debian/tests/control b/debian/tests/control
deleted file mode 100644
index d2aa55a..0000000
--- a/debian/tests/control
+++ /dev/null
@@ -1,3 +0,0 @@
-Tests: run-unit-test
-Depends: @
-Restrictions: allow-stderr
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
deleted file mode 100644
index de0b1c4..0000000
--- a/debian/tests/run-unit-test
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh -e
-
-pkg=garli
-
-if [ "$ADTTMP" = "" ] ; then
-  ADTTMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
-fi
-cd $ADTTMP
-cp /usr/share/doc/$pkg/examples/basic/* $ADTTMP
-find . -name "*.gz" -exec gunzip \{\} \;
-garli
-rm -rf *
diff --git a/debian/watch b/debian/watch
deleted file mode 100644
index ab72a3c..0000000
--- a/debian/watch
+++ /dev/null
@@ -1,3 +0,0 @@
-version=3
-
-https://github.com/Ashod/garli/releases .*/archive/(\d[\d.-]+)-release\.(?:tar(?:\.gz|\.bz2)?|tgz)
diff --git a/doc/Garli0.96Manual.pdf b/doc/Garli0.96Manual.pdf
new file mode 100644
index 0000000..c325708
Binary files /dev/null and b/doc/Garli0.96Manual.pdf differ
diff --git a/doc/NOTE.txt b/doc/NOTE.txt
new file mode 100644
index 0000000..a2058f7
--- /dev/null
+++ b/doc/NOTE.txt
@@ -0,0 +1,4 @@
+
+DOCUMENTATION FOR THE PARTITIONED VERSION IS AVAILABLE AT
+http://www.nescent.org/wg_garli/Partition_testing_version
+
diff --git a/example/basic/EXAMPLES.txt b/example/basic/EXAMPLES.txt
new file mode 100644
index 0000000..44db7c6
--- /dev/null
+++ b/example/basic/EXAMPLES.txt
@@ -0,0 +1,46 @@
+#################
+FOR PARTITIONED VERSION EXAMPLES SEE THE partition directory.
+For documentation of the partitioned version see:
+http://www.nescent.org/wg_garli/Using_partitioned_models
+
+The following may also be helpful if you aren't familar with general GARLI usage:
+https://www.nescent.org/wg_garli/Main_Page
+#################
+GARLI version 2.0 examples - March 2011
+
+SAMPLE DATASETS:
+Rana 64 taxon rRNA frog dataset:
+-This dataset is from Hillis and Wilcox. 2005. Phylogeny of the New World true frogs (Rana). Mol Phylogenet Evol. 34(2):299-314. 	
+-The 2 best trees for this dataset under the GTR+I+G model have log likelihood scores of -21812.66941 and -21812.64132.  Individual search replicates on this dataset should take < 20 min. 
+-A sample starting tree and model parameters in the legacy GARLI format is contained in ranastart.oldformat.tre
+-The same starting tree and model parameters in the new NEXUS format is contained in ranastart.nexus.tre
+-A sample constraint is contained in the files ranaconstraint.format1 and ranaconstraint.format2.  The best tree with this constraint has an optimized log likelihood score of -21821.57688
+
+Zakon 11 taxon Na+ channel gene fish dataset:
+-This dataset is from Zakon, Lu, Zwickl and Hillis. 2006. Sodium channel genes and the evolution of diversity in communication signals of electric fishes: Convergent molecular evolution. Proc. Natl. Acad. Sci. USA. 103(10):3675-80.
+-This is a protein coding gene, aligned in proper reading frame
+-This single dataset file can be analyzed using nucleotide, amino acid and codon models with the garli.conf.nuc.test, garli.conf.AA.test and garli.conf.codon.test configuration files, respectively.
+-There is an example of how to use a custom AA model (the "LG" model in this case) with this dataset in configuration file garli.conf.AA.LGmodel and model file LGmodel.mod.
+
+Configuration files:
+-The program will look for a configuration file named garli.conf in the current working directory, unless a different filename is passed to it from the command line
+-The included garli.conf.XXX.defaultSettings configuration files contain reasonable default search parameters.  
+-HOWEVER, the substitution models specified therein are ARBITRARY, and careful thought should be put into choosing the appropriate model for other datasets.  See the manual or support website for more information.
+-The garli.conf.XXX.test configuration files are meant for quick tests on the small 11 taxon dataset, and the settings contained are NOT good defaults for larger datasets.  See above.
+-See the manual or website for a general tutorial on using the program and the meaning of the configuration file entries
+
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: zwickl at nescent.org
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
diff --git a/example/basic/LGmodel.mod b/example/basic/LGmodel.mod
new file mode 100644
index 0000000..6fe1e71
--- /dev/null
+++ b/example/basic/LGmodel.mod
@@ -0,0 +1,92 @@
+#NEXUS
+
+[see the "garli.conf.AA.LGmodel" configuration file for an example of how to use this model]
+
+[ Le, S.Q., and Gascuel, O. 2008. An improved general amino acid replacement matrix.
+Mol Biol Evol 25: 1307-1320. ]
+
+
+[this entire GALRI block can be copied into your NEXUS datafile to use the LG model.  Also set ratematrix = fixed and statefrequencies = fixed in the configuration file.  If you want to use the observed AA frequencies, remove the frequecy part of the block and set statefrequencies = empirical]
+begin garli;
+
+[this is the LG model rate matrix, in GARLI format (upper triangle, alphabetical by single letter codes)]
+[it is scaled such that the mean rate is 100, but GARLI does not require any particular scaling]
+
+r 243.500 38.656 101.598 24.819 202.114 35.106 14.657 52.486 38.675 109.961 27.080 115.206 94.882 41.586 462.446 209.301 249.250 17.679 21.420 6.120 0.342 108.123 55.689 62.662 31.366 1.298 58.110 87.426 51.728 7.374 8.297 52.294 272.397 111.863 191.672 65.557 114.020 512.992 1.704 82.657 90.697 1.046 27.681 1.475 2.499 496.584 38.588 51.201 12.126 121.332 41.661 3.714 2.924 13.217 1.840 34.127 41.467 4.330 176.791 6.816 16.996 52.994 41.030 403.888 35.606 59.867 59.141 23.971 7.616 11.7 [...]
+
+[these are the LG model amino acid frequencies, in GARLI order]
+e  0.079066  0.012937  0.053052  0.071586  0.042302  0.057337  0.022355  0.062157  0.0646  0.099081  0.022951  0.041977  0.04404  0.040767  0.055941  0.061197  0.053287  0.069147  0.012066  0.034155
+;
+end;
+
+[
+MATRICES AND OTHER PROGRAMS
+Unfortunately, I beleive that GARLI, PAML, and MrBayes all have different orderings of the amino acids.  PAML
+is alphabetical by three-letter code, MrBayes is alphabetical by full name (same as PAML, but swap Gln and Glu), GARLI
+is alphabetical by single letter code.  Additionally, I believe that PAML takes the below diagonal matrix as input,
+while GARLI and MrBayes take the upper.
+Below is PAML's LG matrix, taken directly from PAML's distribution.
+Below that is my transformation of the matrix to what I think is correct for MrBayes.
+]
+
+[
+From PAML:
+(Equilibrium amino-acid frequencies and exchangeability matrix in PAML format).
+
+0.425093 
+0.276818 0.751878 
+0.395144 0.123954 5.076149 
+2.489084 0.534551 0.528768 0.062556 
+0.969894 2.807908 1.695752 0.523386 0.084808 
+1.038545 0.363970 0.541712 5.243870 0.003499 4.128591 
+2.066040 0.390192 1.437645 0.844926 0.569265 0.267959 0.348847 
+0.358858 2.426601 4.509238 0.927114 0.640543 4.813505 0.423881 0.311484 
+0.149830 0.126991 0.191503 0.010690 0.320627 0.072854 0.044265 0.008705 0.108882 
+0.395337 0.301848 0.068427 0.015076 0.594007 0.582457 0.069673 0.044261 0.366317 4.145067 
+0.536518 6.326067 2.145078 0.282959 0.013266 3.234294 1.807177 0.296636 0.697264 0.159069 0.137500 
+1.124035 0.484133 0.371004 0.025548 0.893680 1.672569 0.173735 0.139538 0.442472 4.273607 6.312358 0.656604 
+0.253701 0.052722 0.089525 0.017416 1.105251 0.035855 0.018811 0.089586 0.682139 1.112727 2.592692 0.023918 1.798853 
+1.177651 0.332533 0.161787 0.394456 0.075382 0.624294 0.419409 0.196961 0.508851 0.078281 0.249060 0.390322 0.099849 0.094464 
+4.727182 0.858151 4.008358 1.240275 2.784478 1.223828 0.611973 1.739990 0.990012 0.064105 0.182287 0.748683 0.346960 0.361819 1.338132 
+2.139501 0.578987 2.000679 0.425860 1.143480 1.080136 0.604545 0.129836 0.584262 1.033739 0.302936 1.136863 2.020366 0.165001 0.571468 6.472279 
+0.180717 0.593607 0.045376 0.029890 0.670128 0.236199 0.077852 0.268491 0.597054 0.111660 0.619632 0.049906 0.696175 2.457121 0.095131 0.248862 0.140825 
+0.218959 0.314440 0.612025 0.135107 1.165532 0.257336 0.120037 0.054679 5.306834 0.232523 0.299648 0.131932 0.481306 7.803902 0.089613 0.400547 0.245841 3.151815 
+2.547870 0.170887 0.083688 0.037967 1.959291 0.210332 0.245034 0.076701 0.119013 10.649107 1.702745 0.185202 1.898718 0.654683 0.296501 0.098369 2.188158 0.189510 0.249313 
+
+0.079066 0.055941 0.041977 0.053052 0.012937 0.040767 0.071586 0.057337 0.022355 0.062157 0.099081 0.064600 0.022951 0.042302 0.044040 0.061197 0.053287 0.012066 0.034155 0.069147 
+
+ A   R   N   D   C   Q   E   G   H   I   L   K   M   F   P   S   T   W   Y   V
+Ala Arg Asn Asp Cys Gln Glu Gly His Ile Leu Lys Met Phe Pro Ser Thr Trp Tyr Val
+]
+
+[
+This is, I THINK, the MrBayes input order for the LG matrix (above diagonal, ordered alphabetically by full amino acid name.
+It is scaled such that the mean rate is 100, but relative rate matrices can in general be rescaled by any constant factor without changing the meaning. 
+If you are using this as a Direchlet prior then the scaling DOES MATTER. 
+If you are going to use this as MrBayes input YOU are responsible for understanding the implications of what you are doing 
+(setting a prior) and for double checking that the ordering is correct.
+
+	41.586	27.080	38.656	243.500	101.598	94.882	202.114	35.106	14.657	38.675	52.486	109.961	24.819	115.206	462.446	209.301	17.679	21.420	249.250	
+		73.554	12.126	52.294	35.606	274.689	38.171	237.387	12.423	29.529	618.860	47.361	5.158	32.531	83.950	56.641	58.071	30.761	16.717	
+			496.584	51.728	52.994	165.890	140.640	441.125	18.734	6.694	209.847	36.294	8.758	15.827	392.126	195.720	4.439	59.873	8.187	
+				6.120	512.992	51.201	82.657	90.697	1.046	1.475	27.681	2.499	1.704	38.588	121.332	41.661	2.924	13.217	3.714	
+					0.342	8.297	55.689	62.662	31.366	58.110	1.298	87.426	108.123	7.374	272.397	111.863	65.557	114.020	191.672	
+						403.888	34.127	41.467	4.330	6.816	176.791	16.996	1.840	41.030	59.867	59.141	7.616	11.743	23.971	
+							26.214	470.891	7.127	56.980	316.401	163.622	3.508	61.073	119.723	105.666	23.107	25.174	20.576	
+								30.472	0.852	4.330	29.019	13.651	8.764	19.268	170.218	12.701	26.266	5.349	7.503	
+									10.652	35.836	68.211	43.286	66.732	49.779	96.850	57.157	58.408	519.152	11.643	
+										405.499	15.561	418.074	108.855	7.658	6.271	101.128	10.923	22.747	1041.770	
+											13.451	617.519	253.635	24.365	17.833	29.635	60.617	29.314	166.574	
+												64.234	2.340	38.184	73.241	111.216	4.882	12.907	18.118	
+													175.976	9.768	33.942	197.646	68.105	47.085	185.746	
+														9.241	35.396	16.142	240.373	763.432	64.046	
+															130.905	55.905	9.306	8.767	29.006	
+																633.164	24.345	39.184	9.623	
+																	13.776	24.050	214.061	
+																		308.333	18.539	
+																			24.390	
+
+
+The amino acid frequencies, in MrBayes order:
+0.079066	0.055941	0.041977	0.053052	0.012937	0.071586	0.040767	0.057337	0.022355	0.062157	0.099081	0.0646	0.022951	0.042302	0.04404	0.061197	0.053287	0.012066	0.034155	0.069147	
+]
diff --git a/example/basic/garli.conf b/example/basic/garli.conf
new file mode 100644
index 0000000..9a36c73
--- /dev/null
+++ b/example/basic/garli.conf
@@ -0,0 +1,65 @@
+[general]
+datafname = rana.nex
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = rana.nuc.GTRIG
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 20000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+outputsitelikelihoods = 0
+optimizeinputonly = 0
+collapsebranches = 1
+
+searchreps = 2
+bootstrapreps = 0
+
+[model1]
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
diff --git a/example/basic/garli.conf.AA.LGmodel b/example/basic/garli.conf.AA.LGmodel
new file mode 100644
index 0000000..a6c924c
--- /dev/null
+++ b/example/basic/garli.conf.AA.LGmodel
@@ -0,0 +1,66 @@
+[general]
+datafname = zakonEtAl2006.11tax.nex
+constraintfile = none
+streefname = LGmodel.mod
+attachmentspertaxon = 50
+ofprefix = AA.LGmodel
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 20000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+outputsitelikelihoods = 0
+optimizeinputonly = 0
+collapsebranches = 1
+
+searchreps = 2
+bootstrapreps = 0
+
+[model1]
+datatype = codon-aminoacid
+geneticcode = standard
+ratematrix = fixed
+statefrequencies = fixed
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
diff --git a/example/basic/garli.conf.AA.defaultSettings b/example/basic/garli.conf.AA.defaultSettings
new file mode 100644
index 0000000..a6e25ca
--- /dev/null
+++ b/example/basic/garli.conf.AA.defaultSettings
@@ -0,0 +1,65 @@
+[general]
+datafname = zakonEtAl2006.11tax.nex
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = AA.jonesFIG
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 20000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+outputsitelikelihoods = 0
+optimizeinputonly = 0
+collapsebranches = 1
+
+searchreps = 2
+bootstrapreps = 0
+
+[model1]
+datatype = aminoacid
+ratematrix = jones
+statefrequencies = empirical
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
diff --git a/example/basic/garli.conf.AA.test b/example/basic/garli.conf.AA.test
new file mode 100644
index 0000000..beaa428
--- /dev/null
+++ b/example/basic/garli.conf.AA.test
@@ -0,0 +1,66 @@
+[general]
+datafname = zakonEtAl2006.11tax.nex
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = AA.jonesFIG
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+outputsitelikelihoods = 0
+optimizeinputonly = 0
+collapsebranches = 1
+
+searchreps = 2
+bootstrapreps = 0
+
+[model1]
+datatype = codon-aminoacid
+geneticcode = standard
+ratematrix = jones
+statefrequencies = empirical
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
diff --git a/example/basic/garli.conf.codon.defaultSettings b/example/basic/garli.conf.codon.defaultSettings
new file mode 100644
index 0000000..6537ed0
--- /dev/null
+++ b/example/basic/garli.conf.codon.defaultSettings
@@ -0,0 +1,66 @@
+[general]
+datafname = zakonEtAl2006.11tax.nex
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = codon.GY94.F3x4
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 20000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+outputsitelikelihoods = 0
+optimizeinputonly = 0
+collapsebranches = 1
+
+searchreps = 2
+bootstrapreps = 0
+
+[model1]
+datatype = codon
+geneticcode = standard
+ratematrix = 2rate
+statefrequencies = f3x4
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
diff --git a/example/basic/garli.conf.codon.test b/example/basic/garli.conf.codon.test
new file mode 100644
index 0000000..b0c85e8
--- /dev/null
+++ b/example/basic/garli.conf.codon.test
@@ -0,0 +1,66 @@
+[general]
+datafname = zakonEtAl2006.11tax.nex
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = codon.GY94.F3x4
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+outputsitelikelihoods = 0
+optimizeinputonly = 0
+collapsebranches = 1
+
+searchreps = 2
+bootstrapreps = 0
+
+[model1]
+datatype = codon
+geneticcode = standard
+ratematrix = 2rate
+statefrequencies = f3x4
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
diff --git a/example/basic/garli.conf.nuc.defaultSettings b/example/basic/garli.conf.nuc.defaultSettings
new file mode 100644
index 0000000..6f7249e
--- /dev/null
+++ b/example/basic/garli.conf.nuc.defaultSettings
@@ -0,0 +1,65 @@
+[general]
+datafname = zakonEtAl2006.11tax.nex
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = nuc.GTRIG
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 20000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+outputsitelikelihoods = 0
+optimizeinputonly = 0
+collapsebranches = 1
+
+searchreps = 2
+bootstrapreps = 0
+
+[model1]
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
diff --git a/example/basic/garli.conf.nuc.test b/example/basic/garli.conf.nuc.test
new file mode 100644
index 0000000..f2b33ed
--- /dev/null
+++ b/example/basic/garli.conf.nuc.test
@@ -0,0 +1,65 @@
+[general]
+datafname = zakonEtAl2006.11tax.nex
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = nuc.GTRIG
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+outputsitelikelihoods = 0
+optimizeinputonly = 0
+collapsebranches = 1
+
+searchreps = 2
+bootstrapreps = 0
+
+[model1]
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
diff --git a/example/basic/rana.nex b/example/basic/rana.nex
new file mode 100644
index 0000000..1e7984c
--- /dev/null
+++ b/example/basic/rana.nex
@@ -0,0 +1,76 @@
+#NEXUS 
+
+[this dataset is from:
+Hillis and Wilcox. 2005. Phylogeny of the New World true frogs (Rana). Mol Phylogenet Evol. 34(2):299-314. 	
+]
+
+Begin data;
+	Dimensions ntax=64 nchar=1976;
+	Format datatype=dna gap=-;
+	Matrix
+temporariaDMH84R1         GCCGTAAACAATTAACTCACATCCACA-CCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTTCACCTAACCATCCCTCGCCTACCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCC-GCAGTAAGCTTAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGGGACGGAAAGTAATGGGCTACAATTTCTAATCTAGAACAAACGAAAGACTATGTGAAACCCTAGTCATGAAGGTGGATTTAGTAGTAAAAAAAAAATATAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA-C-CCCGTATGTTCCTAACCC-AACAC-CACGTTTT-AGAAGAAGCAAGTCGTAACATGGTGAGTGTA [...]
+boyliiMVZ148929           GCCGTAAACAATTAACTCACACC-TCCAGCGCCAGGGGATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTTCACCCGACCACTCCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCC-ACAGTAAGCCCAATGATGTCAACACGTCAGGTCAAGGTGCAGCTCAAGGAATGGGAAGTAATGGGCTACAATTTCTAATTTAGAACAAACGAAAGACTATGTGAAACCCTAGTCATGAAGGTGGATTTAGTAGTAAAAGGGAAATAGAGTGTTCCTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTT-TTTC-TCATGTCCTTAACCC-CCGCG-CACATTTT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+luteiventris_MT_MVZ191016 GCCGTAAACAATTAACTTACATT-TCCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTTCACCTGACCACTCCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCC-GCAGTAAGCCTAATGATATCAACACGTCAGGTCAAGGTGCAGCTCAAGGAATGGGAAGTAATGGGCTACAATTTCTAACTTAGAACAAACGAAAGACTATGTGAAACCCTAGTCATGAAGGTGGATTTAGTAGTAAAAAGAAAATATAGTATTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA--TTT-TTTTGTTCCTAACCC-CCTACACACGTCTT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+luteiventris_WA_MVZ225749 GCCGTAAACAATTAACTTACATT-TCCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTTCACCTGACCACTCCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCC-GCAGTAAGCCTAATGATATCAACACGTCAGGTCAAGGTGCAGCTCAAGGAATGGGAAGTAATGGGCTACAATTTCTAATTTAGAACAAACGAAAGACTATGTGAAACCCTAGTCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTATTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA--TTT-TTTTGTTCCTAACCC-CCTACACACGTCTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+muscosaMVZ149006          GCCGTAAACAATTAATTTACACC-TCCAACGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTTCACCCGACCGTTCCTCGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCA-ACAGTAAGCTTAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGGAATGGGAAGTAATGGGCTACAATTTCTAATTTAGAACAAACGAAAGACTATGTGAAATCCTAGTCATGAAGGTGGATTTAGTAGTAAAAAGGAAATAGAGTGTCCTTTTTAACTCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA-CTTT-TCCTGTTCCTAACCC-ACACG-CACATTTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+auroraMVZ13957            GCCGTAAACAATTAACTTACACC-TCCAACGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTTCACCCGACCGTTCCTCGCCTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCA-GCAGTAAGCTTAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGGAACGGGAAGCAATGGGCTACAATTTCTAATCTAGAACAAACGAAAGATTATGTGAAATCCTAATCATGAAGGTGGATTTAGTAGTAAAAAGGAAATATAGTGTTCTTTTTAACTCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA--TTT-TCCTGTCCCTAACCC-CCTTA-CACATTTT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+cascadaeMVZ148946         GCCGTTTACAATTAACTTACACC-TCCAACGCCAGGGGATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTTCACCCGACCGTTCCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCA-ACAGTAAGCTTAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGGAACGGGAAGCAATGGGCTACAATTTCTAATTTAGAACAAACGAAAGATTATGTGAAATCCTAATCATGAAGGTGGATTTAGTAGTAAAAAGGAAATAGAGTGTCCTTTTTAACTCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA-TTTT-TTCTGTCCCTAACCC-CCCTCGCACATTTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+sylvaticaMVZ137426        GCCGTAAACAATTAATTTACACCCACCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTTCACCCGACCACTCCTTG-CTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCC-AAAGTAGGCTTAATGACGTCAACACGTCAGGTCAAGGTGCAGCTTAAGGGGTGGGAAGTAATGGGCTACAATTTCTAATCTAGAACAAACGAAAGACTATGTGAAATACTAGTCATGAAGGTGGATTTAGTAGTAAAAAGAAAGTAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA-ATTTATCCTGTTTCTAACCC-ACTAC-TACATTTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+sylvaticaDMH84R43         GCCGTAAACAATTAATTTACACCCACCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTTCACCCGACCACTCCTTG-CTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCC-AAAGTAGGCTTAATGACGTCAACACGTCAGGTCAAGGTGCAGCTTAAGGGGTGGGAAGTAATGGGCTACAATTTCTAATCTAGAACAAACGAAAGACTATGTGAAATACTAGTCATGAAGGTGGATTTAGTAGTAAAAAGAAAGTAGAGTGTTCTTTTTAACTCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-ATTTATCCTGTTTCTAACCC-ACTAC-TACGTTTT-AAAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+septentrionalesDCC3588    GCCGTAAACAATTAATTTACACCAATAAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGATACACCCGACCATTTCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCC-GCAGTAGGCTTAATGACGTCAGTACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATGGGCTACAATTTCTAATTTAGAACAAACGAAAGACTGTATGAAATTACAATCATGAAGGTGGATTTAGTAGTAAAAAGAAAGTAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-TCTTATCTAGTTCCTAACCT-ATTAC-TACATTTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+grylioMVZ175945           ???????????????TTCACACCAATAAGCGCCAGGGAATTACGAGCAACGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGATATACCCGACCATTTCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCT-GCAGTAAGCTTAATGACGTCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGTAATGGGCTACAATTTCTAACTTAGAACAAACGAAAGACTGTATGAAATTACAATCATGAAGGTGGATTTAGTAGTAAAAAAAAAGTATAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAACAGTT-TACCATCCCGTTTCTAACCC-ATCAT-TACATTTT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+virgatipesMVZ175944       ACCGTAAACAATTAATTTACACCAATAAGCGCCAGGGAATTACGAGCAACGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCC-GCAGTAGGCTTAATGATGTCAATACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGTAATGGGCTACAATTTCTAACTTAGAACAAACGAAAGACTGTGTGAAATCACAATCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTATTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-TCATATTCAGTTCTTAACCC-ATCAT-TACGTTTT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+okaloosae                 GCCGTAAACAATTAATTTACACCAATAAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGATATACCCGACCATTTCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCT-GCAGTAGGCTTAATGACGTCAGTACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGTAATGGGCTACAATTTCTAACTTAGAACAAACGAAAGACTGTATGAAATTACAATCATGAAGGTGGATTTAGTAGTAAAAAGAAAGTAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-TCTTATCCCGTTCCTAACCC-ACCAT-TACATTTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+clamitansJSF1118          GCCGTAAACAATTAATTTACACCAATAAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGATATACCCGACCATTTCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCT-GCAGTAGGCTTAATGACGTCAATACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGTAATGGGCTACAATTTCTAACTTAGAACAAACGAAAGACTGTATGAAATTACAATCATGAAGGTGGATTTAGTAGTAAAAAAAAAGTATAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-TCTTATCCCGTTCCTAACCC-ATCAT-TACATTTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+heckscheriMVZ164908       GCCGTAAACAATTAACTCACACCAATAAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGATATACCTAACCATTTCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCT-GCAGTAGGCTTAATGACGTCAATACGTCAGGTCAAGGTGCAACTTAAGAAGTGGAAAGTAATGGGCTACAATTTCTATCTTAGAACAAACGAAAGACTGTATGAAATTACAGTCATGAAGGTGGATTTAGCAGTAAAAAGAAAGTAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-TCTTATCCCGTTCCTAACTC-ATTAT-TACATTTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+catesbianaX12841          GCCGTAAACAATTAATTTACACCAATAAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGATATACCCGACCATTTCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTT-GCAGTAGGCTTAATGACGTCAATACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGTAATGGGCTACAATTTCTAATCTAGAACAAACGAAAGACTATATGAAATTATAATCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-TCTCACCCCGTTCCTAACCC-ACTAT-TACATTTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+catesbianaDMH84R2         GCCGTAAACAATTAATTTACACCAATAAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGATATACCCGACCATTTCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTT-GCAGTAGGCTTAATGACGTCAATACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGTAATGGGCTACAATTTCTAATCTAGAACAAACGAAAGACTATATGAAATTATAATCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-TCTCACCCCGTTCCTAACCC-ACTAT-TACATTTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+maculataKU195258          GCCGTAAACAATTAATTTACACCAATCACCGCCAGGGGACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTATACCCGACCATTCCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTTT-ACAGTATGCTTAATGACGTCAACACGTCAGGTCAAGGTGCAGCTTAAGGAATGGGAAGTGATGGGCTACAATTTCTAATCTAAAACAAACGGAAAGCTATGTGAAATCTTAGCCATGAAGGTGGATTTAGTAGTAAAAAGAAAGTATAGTGTTCTTTGTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA-TCTT-CTATGTTCCTAACCT-ATTAT-TACACCTT-AAAAAAGGCAAGTCGTAACATGGTAAGTGTA [...]
+vibicariaMVZ11035         GCCGTAAACAATTAATTCACAACCAACAACGCCTGGGGACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCATCCTACTAGAGGAGCCTGTTCTATAATCGATAATCCCCGCTACACCTGACCACTCCTCGCTTTTCAGCCTGTATACCTCCGTCGAAAGCTTACCGCGTGAACGTTT-GCAGTGTGCTTAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGGAATGGGAAGTAACTGGCTACAATCTCTAATTTAGAACAAACGAAAGACTGCATGAAATACAAGTCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACAAGTACACACCGCCCGTCACCCTCTTCGAAAATATTTTTTTTATGTTCCTAACCC-GTTAA-CACATTAT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+warszewitshiiJSF1127      GCCGTAAACAATTAATTTACAACCAACAACGCCTGGGAACTACGAGCCATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCCCTAGAGGAGCCTGTTCTATAATCGATAACCCCCGCTACACCTTACCACTCCTCGCTTACCAGTCTGTATACCTCCGTCGAAAGCTTACCGTGTGAACGCCT-ACAGTATGCTTAATGATACCAATACGTCAGGTCAAGGTGCAACTTAAGGAGCGGAAAGCAATGGGCTACAATTTCTAACCTAGAACAAACGAAAGACTGCATGAAATACAAGTCATGAAGGTGGATCTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACAAGTACATACCGCCCGTCACCCTCTTCGACAGTATTTTTCCCTAGTCCTTAACCC-GCTAT-CACATTTT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+palmipesVenAMNHA118801    ACCGTAAACAATTGATTTACACCTACAAACGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGACTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTCCTTGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCT-GCAGTAAGCTCAATGACGTCAACACGTCAGGTCAAGGTGCAACTCAAGGACTGGGAAGTAATGGGCTACAATTTCTAATTTAGAACAAACGGAAGACTATGTGAAATCTTAGTCATGAAGGTGGATTTAGCAGTAAAAAGAAAATAGAGTGTTCTTTTTAACTTGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCAATAGTA--TACTATTAGTTCTTAACCC-ACAAT-CACGTTTT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+palmipesEcuKU204425       ACCGTAAACAATTGATTTACACCTACAAACGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGACTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTCCTTGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCT-GCAGTAAGCTCAATGACGTCAACACGTCAGGTCAAGGTGCAACTCAAGGACTGGGAAGTAATGGGCTACAATTTCTAATTTAGAACAAACGGAAGACTATGTGAAATCTTAGTCATGAAGGTGGATTTAGCAGTAAAAAGAAAATAGAGTGTTCTTTTTAACTTGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCAATAGTA--TACTATTAGTTCTTAACCC-ATAAT-CACGTTTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+bwanaQCAZ13964            ACCGTAAACAATTGATTTACACCCACAAACGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCACTCCTTGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCT-GCAGTAAGCTCAAGGACGTCAACACGTCAGGTCAAGGTGCAGCTTAAGGACTGGGAAGTAATGGGCTACAATTTCTAATCTAGAACAAACGGAAGACTATGTGAAATCTTAGTCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACTCGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCAATAGTA--TAATATCAGTTCTTAACCC-ACTAT-CACGCCTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+Sp_1_ecuadorQCAZ13219     ACCGTAAACAATTGACTTACACCCACAAACGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCACTCCTTGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCT-GAAGTAAGCTCAATGACGTCAACACGTCAGGTCAAGGTGCAGCTTAAGGACTGGGAAGTAATGGGCTACAATTTCTAGTTTAGAACAAACGGAAGACTATGTGAAATCTTAGTCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACTCGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCAATAGTA--TATTACTAGTTCTTAACCC-ACTAT-CACGTCTT-AGAAGAGGCAAGTCGTA-CATGGTAAGTGTA [...]
+vaillantiKU195299         ACCGTAAACAATTGATTTACACCCACAAACGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCACTCCTTGCCCATCAGTCTGTTTACCTCCGTCGAAAGCTTACCATGTGAACGTCT-GCAGTAAGCCCAATGACGTCAACACGTCAGGTCAAGGTGCAGCTTAAGGACTGGGAAGTAATGGGCTACAATTTCTAATCTAGAACAAACGGAAGACTATGTGAAACCCTAGTCATGAAGGTGGATTTAGTAGTAAAAAGAAAATATAGTGTTCTTTTTAACTCGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCAATAGTA--TCTCCTCAGTTCCTAACCC-ACTAT-TACGTCTT-AAAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+julianiTNHC60324          ??CGTA?ACAATTGAT?TACACCCATA??CGCCA?GGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTC?CACCCAACTATAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCACTCCTTGCCTAT?A?TCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCT-ACAGTATGCCCAATGAC?TCAACACGTCAGGTCAAGGTGCAGCTTAAGGACTGGGAAGTAATGGGCTACAGTTTCTAATTTAGAACAAACGGAAGACTATGTGAAATCCTAGTCATGAAGGTGGATTTAGTAGTAAGAAGAAAATAGAGTGTTCTTTTTAACTCGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCAATAGTA--?CTTTTTAGTT?TTAACAC-ACTAC-CACGCCTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+sierramadrensisKU195181   GCCATAAACAATTAATTTACACTTATCAACGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATAATCCCCGCTATACCTCACCATTCCTCGCTT-TCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCT-ACAGTAGGCCCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGGAATAGGAAGAAATGGGCTACAATTTCTAATTTAGAACAAACGGAAGACTATGTGAAACC-TAGTCATGAAGGCGGATTTAGCAGTAAAAAGGAAATA?AGTGTTCTTTTTAATCTGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA-ACTTTATTTGTTTCTAACCT-ATTAT-TACATTTT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+psilonotaKU195119         ACCGTAAACAATTAATTTACACCAATCAGCGCCAGGGGATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCAACCATTTCTCGCTC-TCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTTT-ACAGTAGGCCCAAGGACGTCAATACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATGGGCTACAATTTCTAATTTAGAACAAACGAAAGACTATGTGAAACCATAATC-TGAAGGTGGATTTAGCAGTAAAAAGGAAATATAGTGTTCTTTTTAACCTGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-CTCCCATTTGTTCCTAACTT-ATTAT-TACGCCTT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+tarahumaraeKU194596       GCCGTAAACAATTAATTTACACCTACCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATAATCCCCGCTACACCTAACCATTCCTTGCTT-TCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCT-ACAGTAAGCCTAATGACGTCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGAAAGCAATGGGCTACAATTTCTAATTTAGAATAAACGGAAGACTATGTGAAATCCTAGTCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA-TTTTTCTCCGTTCCTAACTC-ACTAT-CACGTCTT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+zweifeliJAC7514           ACCGTAAACAATTAATTTACACCAATCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGACTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATAATCCCCGCTACACCCGACCATTTCTTGCTT-TCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCT-ACAGTAAGCCCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAGTGGGAAGCAATGGGCTACAATTTCTAATTTAGAACAAACGAAAGATTATGTGAAATCATATTC-TGAAGGTGGATTTAGCAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-AAATACTCTGTTCCTAACTC-ACTAT-TACGCCTT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+pustulosaJAC10555         ACCGTAAACAATTAATTTACACCAATCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGCCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATAATCCCCGCTACACCTGACCATTTCTCGCCT-TCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTTT-ACAGTAAGCCTAATGACGTCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATGGGCTACAATTTCTAATTTAGAACAAACGGAAGACTATGTGAAACCCTAGTC-TCAAGGTGGATTTAGTAGTAAAAAGAAAATAAAGTGTTCTTTTTAACCTGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-TATTCTTCTGTTCCTAACTA-ACTACTCACGTTTT-AGAAAAGGTAAGTCGTAACATGGTAAGTGTA [...]
+pipiensJSF1119            ACCGTAAACAATTAATTTACACCCATCAGCGCCAGGGAAATACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTTTAATCGATGATCCCCGCTACACCTGACCATTTCTTGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCT-TCAGTAGGCTCAATGATATCAATACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACCATTTCTAATATAGAACAAACGAAAGGCTATGTGAAATCATAGCAGCGAAGGTGGATTTAGTAATAAAAAAAAAATATAGTGTTCTTTTTAACCCGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-AATAATATTGTCCCTAACCC-ATTAT-CACGTTTT-AGAAGAAGCAAGTCGAAACATGGTAAGTGTA [...]
+pipiensY10945             GCCGTAAACAATTAATTTACACCCATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTTTAATCGATGATCCCCGCTACACCTGACCATTTCTTGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCT-TCAGTAGGCTCAATGATATCAATACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACAATTTCTAATATAGAACAA-CGAAAGGCTATGTGAAATCATAGCAGCGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-AATAATATTATCCCTAACCC-ATTAT-CACGTTTT-AGAAGAGGCAAGTCGAAACATGGTAAGTGTA [...]
+dunniJSF1017              GCCGTAAACAATTAATTTACACCCATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTTTAATCGATGATCCCCGCTACACCTAACCATTTCTTGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCC-TCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAACTTAAGAAGTGGGAAGTAATTGGCTACAATTTCTAATCTAGAACAAACGAAAGGCTATGTGAAATCATAGCAGCGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-AATAATTCTGTCCCTAACCC-ATTAT-CACGTTTT-AGAAGAGGCAAGTCGAAACATGGTAAGTGTA [...]
+montezumaeJAC8836         GCCGTAAACAATTAATTTACACCCATCAGCGCCAGGGAAATACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTTTAATCGATGATCCCCGCTACACCTAACCATTTCTTGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCC-TCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAACTTAAGAAGTGGGAAGTAATTGGCTACAATTTCTAATCTAAAACAAACGAAAGGCTATGTGAAATCATAGCAGCGAAGGTGGATTTAGTAGTAAAAAAAAAATATAGTGTTCTTTTTAACCCGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-AATAATTCTGTTCCTAACCC-ATTAT-AGCGTTTT-AGAAGAAGCAAGTCGAAACATGGTAAGTGTA [...]
+sp_2_mex_JSF1106          GCCGTAAACAATTAACTTACACCCATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTTTAATCGATGATCCCCGCTACACCTGACCATTTCTTGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCC-TCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAACTTAAGAAATGGGAAGTAATTGGCTACAATTTCTAATCTAGAACAAACGAAAGGCTATGTGAAACCATAGCAGCGAAGGTGGATTTAGTAGTAAAAAGAAAACAGAGTGTTCTTTTTAACCCGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-AATAATTCTGTCCCTAACCT-AATAT-CACGTCTT-AGAAGAGGCAAGTCGAAACATGGTAAGTGTA [...]
+chiricahuensisJSF1063     ????????????????????????ATCACCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTTTAATCGATGATCCCCGCTACACCTGACCATTTCTTGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCC-TCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAACTTAAGAAATGGGAAGTAATTGGCTACAATTTCTAATCTAGAACAAACGAAAGGCTATGTGAAATCATAGCAGCGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-AATAATTCTGTCCTTAACCT-AATAT-AACGTCTT-AGAAGAGGCAAGTCGAAACATGGTAAGTGTA [...]
+chiricahuensisJSF1092     GCCGTAAACAATTAACTTACATCCATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTTTAATCGATGATCCCCGCTACACCTGACCATTTCTTGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCC-TCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAACTTAAGAAATGGGAAGTAATTGGCTACAATTTCTAATCTAGAACAAACGAAAGGCTATGTGAAATCATAGCAGCGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-AATAATTCTGTCCTTAACCT-AATAT-AACGTCTT-AGAAGAAGCAAGTCGAAACATGGTAAGTGTA [...]
+subaquavocalis            GCCGTAAACAATTAACTTACATCCATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTTTAATCGATGATCCCCGCTACACCTGACCATTTCTTGCTCACCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCC-TCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAACTTAAGAAATGGGAAGTAATTGGCTACAATTTCTAATCTAGAACAAACGAAAGGCTATGTGAAATCATAGCAGCGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA-AATAATTCTGTCCTTAACCT-AATAT-AACGTCTT-AGAAGAGGCAAGTCGAAACATGGTAAGCGTA [...]
+palustrisJSF1110          ACCGTAAACAATTAATTTACACCTATCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTCGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTTCTTCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGTAATTGGCTACAATTTCTAATCTAGAACAAACGAAAGGCTATGTGAAATCATAACCACGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-CACAATTTTGTCCCTAACCA-ATTTT-CACGTTTT-AGAAGAAGCAAGTCGAAACACGGTAAGTGTA [...]
+areolataJSF1111           GCCGTAAACAATTTATTTACACCTATAAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTCGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTTCTTCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAACTTAAGAAATGGGAAGCAATTGGCTACAATTTCTAATCTAAAACAAACGAAAGGCTATGTGAAACCATAACCATGAAGGTGGATTTAGTAGTAAAAAAAAAATATAGTGTTCTTTTTAACCCGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-CACAATATTGTCCGTAACCA-ATTTT-TACATTTTTAGAAGAAGCAAGTCGAAACACGGTAAGTGTA [...]
+sevosaUSC8236             GCCGTAAACAATTAATTTACACCCATCAGCGCCTGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTCGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTTCTCTAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACAATTTCTAACTTAGAACAAACGAAAGGCTATGTGAAATCATAGCCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA-CACAATATTGTCCATAACCA-ATTCT-TACGTTTT-AGAAGAGGCAAGTCGAAACACGGTAAGTGTA [...]
+capitoSLU003              GCCGTAAACAATTAATTTACACCCATCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTCGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTTCTCTAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACAATTTCTAACTTAGAACAAACGAAAGGCTATGTGAAATCATAGCCATGAAGGTGGATTTAGCAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCAATAGTA-CACAATATTGTCCATAACCA-ATTCT-TACGTTTT-AGAAGAGGCAAGTCGAAACACGGTAAGTGTA [...]
+spectabilisJAC8622        GCCGTAAACAATTAATTTACATCTATCAGCGCCAGGGGACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTATACCCCACCATTTTTAGCTTATCAGTCTGTATACCTCCGTCGAAAACTTACCATGTGAACGCCCTTCAGTAGGTTCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGAAAGCAATTGGCTACAATTTCTAATTTAGAACAAACGAAAGGCTATGTGAAATCATAACCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTC-CATGATACTGTCCCTAACAA-ATTAT-TACGTTTT-AGAAGAAGCAAGTCGAAACACGGTAAGTGTA [...]
+forreriJSF1065            GCCGTAAACAATTAACTTACACCCATCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCAACCAGCTAGAGGAGCTTGTTCTATAATCGATGATCCCCGATACACCCGACCATTTTTAGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTTTCTCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTTGCTACAATTTCTAATTTAGAACAAACGAAAGGCTATGTGAAATCATAACCACGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTC-CATAATACTGTCCCTAACCC-TTTAT-TACATTTT-AGAAGAGGCAAGTCGAAACATGGTAAGTGTA [...]
+tlalociJSF1083            GCCGTAAACAATTAATTTACACCTATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTAGCTAATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCTATTGGCTACAATTTCTAACTTAGAACAAACGAAAGGCTATGTGAAATCATAACCATGAAGGTGGATTTAGTAGTAAAAAGAAAATATAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-CCTAATACTGTCCCTAACCC-ATTAT-TACATTTT-AGAAGAAGCAAGTCGAAACACGGTAAGTGTA [...]
+berlandieriJSF1136        GCCGTAAACAATTAATTTACACCTATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTAGCTAATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCTATTGGCTACAATTTCTAACTTAGAACAAACGAAAGGCTATGTGAAATCATAACCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-CCTAATACTGTCCCTAACCC-ATTAT-TACATTTT-AGAAGAAGCAAGTCGAAACACGGTAAGTGTA [...]
+neovolcanicaJSF960        GCCGTAAACAATTAATTTACACCTATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTAGCTAATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCTATTGGCTACAATTTCTAACTTAGAACAAACGAAAGGCTATGTGAAATCATAACCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-CCTAATACTGTCCCTAACCC-ATTAT-TACATTTT-AGAAGAGGCAAGTCGAAACACGGTAAGTGTA [...]
+blairiJSF830              GCCGTAAACAATTAATTTACACCTATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTAGCTAATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCTATTGGCTACAATTTCTAATTTAAAACAAACGAAAGGCTATGTGAAATCATAACCATGAAGGTGGATTTAGTAATAAAAAAAAAATATATTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-CTTAATACTGTCCCTAACCC-ATTAT-TACATTTT-AGAAGAAGCAAGTCGAAACACGGTAAGTGTA [...]
+omiltemanaJAC7413         ACCGTAAACAATTAATTTACACCTATCAGCGCCCGGGGATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCAACCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGATACACCCGACCATTTTTAGCTAATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCTCAAGGATATCAATACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGTAATTGGCTACAATTTCTAACTTAGAACAAACGAAAGGTTATGTGAAATCATAACCACGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-ATTAATATTGTTCCTAACCC-CCTAT-TACGTCTT-AGAAGAAGCAAGTCGAAACACGGTAAGTGTA [...]
+magnaocularisJSF1073      ACCGTAAACAATTAATTTACACCTATCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTCTAGCTCATCATTCTGTATACCTCCGTCAAAAGCTTACCATGTGAACCCTCTTCAGTAGGCTCAAAGATATCATCACGTCAGGTCGAGGTGCAACTTAAGAGATGGGAAGTGATTGGCTACCTTTTCTAAATTAAAACAAACAAAAGGTTATGTCAAATCCTGGCCGTGAAGGTGGATTTAGTAATAAAAAAAAATTTTATTGTTCTTTTTAACCCGGGTCTGGGACGTGTACCCCCCGCCCCTCCCCCTCTTCGATTGTC-CATGATCCTGTCCCCAACCC-TTTAT-TATTTTTA-AGAAAATGCAAGTCGAAACACTGTAATTGTA [...]
+yavapaiensisJSF1085       ACCGTAAACAATTAATTTACACCCATCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTAGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCCCAATGA-GTCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACAATTTCTAACTTAGAACAAACGAAAGGCTATGTGAAACCATAACCACGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-CAAAATACTGTCCCTAACCC-TTTAT-TACGTTTT-AGAAGAAGCAAGTCGAAACACGGTAAGTGTA [...]
+sp_7_JaliscoJSF1000       GCCGTAAACAATTAATTTACACATATCAGCGCCAGGGAATTACGAGCGATGCTTAAAACCCAAAGGATTTGACGGTGTCCCAACCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTAGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAAAAATGGGAAGTAATTGGCTACAATTTCTAACTTAAAACAAACGAAAGGCTATGTGAAATCATGGCCACGAAGGTGGATTTAGTAATAAAAAGAAAATATAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATTGTC-CATGATACTGTCCCTAACCC-TTTAT-TATTTTTT-AGAAAAGGCAAGTCGAAACACGGTAAGTGTA [...]
+macroglossaJAC10472       ACCGTAAACAATTTATTTACACCTACCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCCACCATTTCTAGCTAATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCTTAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGAAAGCAATTGGCTACAATTTCTAATTTAGAACAAACGAAAGGCTATGTGAAATCATAACCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAACT-CATGATACTGTCCCTAACCCCATTAT-TACCCTTT-AGAAGAAGCAAGTCGAAACACGGTAAGTGTA [...]
+macroglossaJSF7933        ACCGTAAACAATTTATTTACACCTACCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCCACCATTTCTAGCTAATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCTTAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGAAAGCAATTGGCTACAATTTCTAATTTAAAACAAACGAAAGGCTATGTGAAATCATAACCGTGAAGGTGGATTTAGTAGTAAAAAAAAAATATATTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAACT-CATGATACTGTCCCTAACCCCATTAT-TACCTTTT-AGAAGAGGCAAGTCGAAACACGGTAAGTGTA [...]
+taylori286                ACCGTAAACAATTAATTTACACCTATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTATACCCAACCATTTCTAGCTAATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTTTTTCAGTAGGCTTAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGAAAGCAATTGGCTACAATTTCTAACTTAGAACAAACGAAATGATATGTGAAATCATAATCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAACC-CATAATACTGTTCCTAACCCCATTAT-TTCATTTT-AGAAGAAGCAAGTCGAAACATGGTAAGTGTA [...]
+sp_4_Panama               ACCGTAAACAATTAATTTACACCTATCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGTTACACCTAACCATTTTTAGCTAATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTTTTTCAGTAGGCTTAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACAATTTCTAATCTAGAACAAACGAAAGGTTATGTGAAATCATGACCACGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-CATGATACTGTCCCTAACCC-TTTAT-TACGTTTT-AGAAGAGGCAAGTCGAAACACGGTAAGTGTA [...]
+sp_5_CostaRichDMH86_210   ACCGTAAACAATTAATTTACACCTATCAGCGCCAGGGAAATACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGTTACACCTAACCATTTTTAGCTAATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTTCTTCAGTAGGCTTAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACAATTTCTA-TTTAAAACAAACGAAAGGCTATGTGAAATCATAACCATGAAGGTGGATTTAGTAATAAAAAAAAAATATAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-CATGATACTGTCCCTAACCC-TTTAT-TACGTTTT-AGAAAAAGCAAGTCGAAACACGGTAAGTGTA [...]
+sp_6_CostaRicaDMH86_225   ACCGTAAACAATTAATTTACACCTATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCTTGTTCTATAATCGATGATCCCCGTTACACCTAACCATTTTTAGCTAATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCTTAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACAATTTCTAATCTAGAACAAACGAAAGGCTATGTGAAATCATAACCACGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTC-CATGATACTGTCCCTTACCC-TTTAT-TACATTTT-AGAAGAAGCAAGTCCAAACACGGTAAGCGTA [...]
+sp_8_PueblaJAC9467        ACCGTAAACAATTAACTCACACCTATCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCAGCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTAGCTCCGCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAATGCCCTTCAGTAGGCTCAATGATATCG-TACGTCAGGTCAAGGTGCAGCTCAAGAAATGGAAAGTAATTGGCTACAATTTCTAGTTTAGAACAAACGAAAGGCTGTGTGAAATCACGGCCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGAGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-CATAATACTGTCCCTAACCC-TTTAT-TACATTTT-AGAAGAGGCAAGTCGAAACACGGTAAGTGTA [...]
+oncaLVT3542               ACCGTAAACAATTAATTTACACCCATCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTAGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCCCAATGA-GTCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACAATTTCTAACTTAGAACAAACGAAAGGCTATGTGAAACCATAACCACGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-CAAAATACTGTCCCTAACCC-TTTAT-CACGTTTT-AGAAGAGGCAAGTCGAAACACGGTAAGTGTA [...]
+sp_3_MichoacanJSF955      GCCGTAAACAATTAATTCACACCTATCAGCGCCAGGGGATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGTTACACCCGACCATTTTTAGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCTCAATGATGTCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACAATTTCTAATCTAGAACAAACGAAAGGCTATGTGAAATCATAACCTCGAAGGTGGATTTAGTAGTAAAAAGAAAGTAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTC-CATGATACTGTTCCTAACCC-AATAT-TACATTTT-AGAAGAGGCAAGTCGAAACACGGTAAGTGTA [...]
+sphenocephalaUSC7448      GCCGTAAACAATTAATTTACACCTATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTAGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCCTTCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACAATTTCTAATCTAGAACAAACGAAAGGCTATGTGAAATCATAACCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-CATAATACTGTTCCTAACCC-ATTGT-TACATTTT-AGAAGAGGCAAGTCGAAACACGGTAAGTGTA [...]
+utriculariaJSF845         GCCGTAAACAATTAATTTACACCTACCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTAGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCCTTCAGTAGGCTCAATGATATCAACACGTCAGGTC?AGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACAATTTCTAATCTAAAACAAACGAAAGGCTATGTGAAATCATAACCATGAAGGTGGATTTAGTAATAAAAAGAAAATATAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-CATAATACTGTTCCTAACCT-ATTAT-TACATTTT-AGAAGAGGCAAGTCGAAACACGGTAAGTGTA [...]
+	;
+End;
diff --git a/example/basic/rana.phy b/example/basic/rana.phy
new file mode 100644
index 0000000..2f6f224
--- /dev/null
+++ b/example/basic/rana.phy
@@ -0,0 +1,65 @@
+64 1976
+temporariaDMH84R1         GCCGTAAACAATTAACTCACATCCACA-CCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTTCACCTAACCATCCCTCGCCTACCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCC-GCAGTAAGCTTAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGGGACGGAAAGTAATGGGCTACAATTTCTAATCTAGAACAAACGAAAGACTATGTGAAACCCTAGTCATGAAGGTGGATTTAGTAGTAAAAAAAAAATATAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA-C-CCCGTATGTTCCTAACCC-AACAC-CACGTTTT-AGAAGAAGCAAGTCGTAACATGGTGAGTGTA [...]
+boyliiMVZ148929           GCCGTAAACAATTAACTCACACC-TCCAGCGCCAGGGGATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTTCACCCGACCACTCCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCC-ACAGTAAGCCCAATGATGTCAACACGTCAGGTCAAGGTGCAGCTCAAGGAATGGGAAGTAATGGGCTACAATTTCTAATTTAGAACAAACGAAAGACTATGTGAAACCCTAGTCATGAAGGTGGATTTAGTAGTAAAAGGGAAATAGAGTGTTCCTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTT-TTTC-TCATGTCCTTAACCC-CCGCG-CACATTTT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+luteiventris_MT_MVZ191016 GCCGTAAACAATTAACTTACATT-TCCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTTCACCTGACCACTCCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCC-GCAGTAAGCCTAATGATATCAACACGTCAGGTCAAGGTGCAGCTCAAGGAATGGGAAGTAATGGGCTACAATTTCTAACTTAGAACAAACGAAAGACTATGTGAAACCCTAGTCATGAAGGTGGATTTAGTAGTAAAAAGAAAATATAGTATTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA--TTT-TTTTGTTCCTAACCC-CCTACACACGTCTT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+luteiventris_WA_MVZ225749 GCCGTAAACAATTAACTTACATT-TCCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTTCACCTGACCACTCCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCC-GCAGTAAGCCTAATGATATCAACACGTCAGGTCAAGGTGCAGCTCAAGGAATGGGAAGTAATGGGCTACAATTTCTAATTTAGAACAAACGAAAGACTATGTGAAACCCTAGTCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTATTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA--TTT-TTTTGTTCCTAACCC-CCTACACACGTCTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+muscosaMVZ149006          GCCGTAAACAATTAATTTACACC-TCCAACGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTTCACCCGACCGTTCCTCGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCA-ACAGTAAGCTTAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGGAATGGGAAGTAATGGGCTACAATTTCTAATTTAGAACAAACGAAAGACTATGTGAAATCCTAGTCATGAAGGTGGATTTAGTAGTAAAAAGGAAATAGAGTGTCCTTTTTAACTCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA-CTTT-TCCTGTTCCTAACCC-ACACG-CACATTTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+auroraMVZ13957            GCCGTAAACAATTAACTTACACC-TCCAACGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTTCACCCGACCGTTCCTCGCCTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCA-GCAGTAAGCTTAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGGAACGGGAAGCAATGGGCTACAATTTCTAATCTAGAACAAACGAAAGATTATGTGAAATCCTAATCATGAAGGTGGATTTAGTAGTAAAAAGGAAATATAGTGTTCTTTTTAACTCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA--TTT-TCCTGTCCCTAACCC-CCTTA-CACATTTT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+cascadaeMVZ148946         GCCGTTTACAATTAACTTACACC-TCCAACGCCAGGGGATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTTCACCCGACCGTTCCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCA-ACAGTAAGCTTAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGGAACGGGAAGCAATGGGCTACAATTTCTAATTTAGAACAAACGAAAGATTATGTGAAATCCTAATCATGAAGGTGGATTTAGTAGTAAAAAGGAAATAGAGTGTCCTTTTTAACTCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA-TTTT-TTCTGTCCCTAACCC-CCCTCGCACATTTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+sylvaticaMVZ137426        GCCGTAAACAATTAATTTACACCCACCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTTCACCCGACCACTCCTTG-CTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCC-AAAGTAGGCTTAATGACGTCAACACGTCAGGTCAAGGTGCAGCTTAAGGGGTGGGAAGTAATGGGCTACAATTTCTAATCTAGAACAAACGAAAGACTATGTGAAATACTAGTCATGAAGGTGGATTTAGTAGTAAAAAGAAAGTAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA-ATTTATCCTGTTTCTAACCC-ACTAC-TACATTTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+sylvaticaDMH84R43         GCCGTAAACAATTAATTTACACCCACCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTTCACCCGACCACTCCTTG-CTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCC-AAAGTAGGCTTAATGACGTCAACACGTCAGGTCAAGGTGCAGCTTAAGGGGTGGGAAGTAATGGGCTACAATTTCTAATCTAGAACAAACGAAAGACTATGTGAAATACTAGTCATGAAGGTGGATTTAGTAGTAAAAAGAAAGTAGAGTGTTCTTTTTAACTCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-ATTTATCCTGTTTCTAACCC-ACTAC-TACGTTTT-AAAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+septentrionalesDCC3588    GCCGTAAACAATTAATTTACACCAATAAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGATACACCCGACCATTTCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCC-GCAGTAGGCTTAATGACGTCAGTACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATGGGCTACAATTTCTAATTTAGAACAAACGAAAGACTGTATGAAATTACAATCATGAAGGTGGATTTAGTAGTAAAAAGAAAGTAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-TCTTATCTAGTTCCTAACCT-ATTAC-TACATTTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+grylioMVZ175945           ???????????????TTCACACCAATAAGCGCCAGGGAATTACGAGCAACGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGATATACCCGACCATTTCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCT-GCAGTAAGCTTAATGACGTCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGTAATGGGCTACAATTTCTAACTTAGAACAAACGAAAGACTGTATGAAATTACAATCATGAAGGTGGATTTAGTAGTAAAAAAAAAGTATAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAACAGTT-TACCATCCCGTTTCTAACCC-ATCAT-TACATTTT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+virgatipesMVZ175944       ACCGTAAACAATTAATTTACACCAATAAGCGCCAGGGAATTACGAGCAACGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCC-GCAGTAGGCTTAATGATGTCAATACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGTAATGGGCTACAATTTCTAACTTAGAACAAACGAAAGACTGTGTGAAATCACAATCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTATTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-TCATATTCAGTTCTTAACCC-ATCAT-TACGTTTT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+okaloosae                 GCCGTAAACAATTAATTTACACCAATAAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGATATACCCGACCATTTCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCT-GCAGTAGGCTTAATGACGTCAGTACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGTAATGGGCTACAATTTCTAACTTAGAACAAACGAAAGACTGTATGAAATTACAATCATGAAGGTGGATTTAGTAGTAAAAAGAAAGTAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-TCTTATCCCGTTCCTAACCC-ACCAT-TACATTTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+clamitansJSF1118          GCCGTAAACAATTAATTTACACCAATAAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGATATACCCGACCATTTCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCT-GCAGTAGGCTTAATGACGTCAATACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGTAATGGGCTACAATTTCTAACTTAGAACAAACGAAAGACTGTATGAAATTACAATCATGAAGGTGGATTTAGTAGTAAAAAAAAAGTATAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-TCTTATCCCGTTCCTAACCC-ATCAT-TACATTTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+heckscheriMVZ164908       GCCGTAAACAATTAACTCACACCAATAAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGATATACCTAACCATTTCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCT-GCAGTAGGCTTAATGACGTCAATACGTCAGGTCAAGGTGCAACTTAAGAAGTGGAAAGTAATGGGCTACAATTTCTATCTTAGAACAAACGAAAGACTGTATGAAATTACAGTCATGAAGGTGGATTTAGCAGTAAAAAGAAAGTAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-TCTTATCCCGTTCCTAACTC-ATTAT-TACATTTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+catesbianaX12841          GCCGTAAACAATTAATTTACACCAATAAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGATATACCCGACCATTTCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTT-GCAGTAGGCTTAATGACGTCAATACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGTAATGGGCTACAATTTCTAATCTAGAACAAACGAAAGACTATATGAAATTATAATCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-TCTCACCCCGTTCCTAACCC-ACTAT-TACATTTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+catesbianaDMH84R2         GCCGTAAACAATTAATTTACACCAATAAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGATATACCCGACCATTTCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTT-GCAGTAGGCTTAATGACGTCAATACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGTAATGGGCTACAATTTCTAATCTAGAACAAACGAAAGACTATATGAAATTATAATCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-TCTCACCCCGTTCCTAACCC-ACTAT-TACATTTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+maculataKU195258          GCCGTAAACAATTAATTTACACCAATCACCGCCAGGGGACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTATACCCGACCATTCCTCGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTTT-ACAGTATGCTTAATGACGTCAACACGTCAGGTCAAGGTGCAGCTTAAGGAATGGGAAGTGATGGGCTACAATTTCTAATCTAAAACAAACGGAAAGCTATGTGAAATCTTAGCCATGAAGGTGGATTTAGTAGTAAAAAGAAAGTATAGTGTTCTTTGTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA-TCTT-CTATGTTCCTAACCT-ATTAT-TACACCTT-AAAAAAGGCAAGTCGTAACATGGTAAGTGTA [...]
+vibicariaMVZ11035         GCCGTAAACAATTAATTCACAACCAACAACGCCTGGGGACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCATCCTACTAGAGGAGCCTGTTCTATAATCGATAATCCCCGCTACACCTGACCACTCCTCGCTTTTCAGCCTGTATACCTCCGTCGAAAGCTTACCGCGTGAACGTTT-GCAGTGTGCTTAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGGAATGGGAAGTAACTGGCTACAATCTCTAATTTAGAACAAACGAAAGACTGCATGAAATACAAGTCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACAAGTACACACCGCCCGTCACCCTCTTCGAAAATATTTTTTTTATGTTCCTAACCC-GTTAA-CACATTAT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+warszewitshiiJSF1127      GCCGTAAACAATTAATTTACAACCAACAACGCCTGGGAACTACGAGCCATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCCCCTAGAGGAGCCTGTTCTATAATCGATAACCCCCGCTACACCTTACCACTCCTCGCTTACCAGTCTGTATACCTCCGTCGAAAGCTTACCGTGTGAACGCCT-ACAGTATGCTTAATGATACCAATACGTCAGGTCAAGGTGCAACTTAAGGAGCGGAAAGCAATGGGCTACAATTTCTAACCTAGAACAAACGAAAGACTGCATGAAATACAAGTCATGAAGGTGGATCTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACAAGTACATACCGCCCGTCACCCTCTTCGACAGTATTTTTCCCTAGTCCTTAACCC-GCTAT-CACATTTT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+palmipesVenAMNHA118801    ACCGTAAACAATTGATTTACACCTACAAACGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGACTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTCCTTGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCT-GCAGTAAGCTCAATGACGTCAACACGTCAGGTCAAGGTGCAACTCAAGGACTGGGAAGTAATGGGCTACAATTTCTAATTTAGAACAAACGGAAGACTATGTGAAATCTTAGTCATGAAGGTGGATTTAGCAGTAAAAAGAAAATAGAGTGTTCTTTTTAACTTGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCAATAGTA--TACTATTAGTTCTTAACCC-ACAAT-CACGTTTT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+palmipesEcuKU204425       ACCGTAAACAATTGATTTACACCTACAAACGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGACTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTCCTTGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCT-GCAGTAAGCTCAATGACGTCAACACGTCAGGTCAAGGTGCAACTCAAGGACTGGGAAGTAATGGGCTACAATTTCTAATTTAGAACAAACGGAAGACTATGTGAAATCTTAGTCATGAAGGTGGATTTAGCAGTAAAAAGAAAATAGAGTGTTCTTTTTAACTTGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCAATAGTA--TACTATTAGTTCTTAACCC-ATAAT-CACGTTTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+bwanaQCAZ13964            ACCGTAAACAATTGATTTACACCCACAAACGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCACTCCTTGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCT-GCAGTAAGCTCAAGGACGTCAACACGTCAGGTCAAGGTGCAGCTTAAGGACTGGGAAGTAATGGGCTACAATTTCTAATCTAGAACAAACGGAAGACTATGTGAAATCTTAGTCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACTCGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCAATAGTA--TAATATCAGTTCTTAACCC-ACTAT-CACGCCTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+Sp_1_ecuadorQCAZ13219     ACCGTAAACAATTGACTTACACCCACAAACGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCACTCCTTGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCT-GAAGTAAGCTCAATGACGTCAACACGTCAGGTCAAGGTGCAGCTTAAGGACTGGGAAGTAATGGGCTACAATTTCTAGTTTAGAACAAACGGAAGACTATGTGAAATCTTAGTCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACTCGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCAATAGTA--TATTACTAGTTCTTAACCC-ACTAT-CACGTCTT-AGAAGAGGCAAGTCGTA-CATGGTAAGTGTA [...]
+vaillantiKU195299         ACCGTAAACAATTGATTTACACCCACAAACGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCACTCCTTGCCCATCAGTCTGTTTACCTCCGTCGAAAGCTTACCATGTGAACGTCT-GCAGTAAGCCCAATGACGTCAACACGTCAGGTCAAGGTGCAGCTTAAGGACTGGGAAGTAATGGGCTACAATTTCTAATCTAGAACAAACGGAAGACTATGTGAAACCCTAGTCATGAAGGTGGATTTAGTAGTAAAAAGAAAATATAGTGTTCTTTTTAACTCGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCAATAGTA--TCTCCTCAGTTCCTAACCC-ACTAT-TACGTCTT-AAAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+julianiTNHC60324          ??CGTA?ACAATTGAT?TACACCCATA??CGCCA?GGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTC?CACCCAACTATAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCACTCCTTGCCTAT?A?TCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCT-ACAGTATGCCCAATGAC?TCAACACGTCAGGTCAAGGTGCAGCTTAAGGACTGGGAAGTAATGGGCTACAGTTTCTAATTTAGAACAAACGGAAGACTATGTGAAATCCTAGTCATGAAGGTGGATTTAGTAGTAAGAAGAAAATAGAGTGTTCTTTTTAACTCGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCAATAGTA--?CTTTTTAGTT?TTAACAC-ACTAC-CACGCCTT-AGAAGAGGCAAGTCGTAACATGGTAAGTGTA [...]
+sierramadrensisKU195181   GCCATAAACAATTAATTTACACTTATCAACGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATAATCCCCGCTATACCTCACCATTCCTCGCTT-TCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCT-ACAGTAGGCCCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGGAATAGGAAGAAATGGGCTACAATTTCTAATTTAGAACAAACGGAAGACTATGTGAAACC-TAGTCATGAAGGCGGATTTAGCAGTAAAAAGGAAATA?AGTGTTCTTTTTAATCTGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA-ACTTTATTTGTTTCTAACCT-ATTAT-TACATTTT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+psilonotaKU195119         ACCGTAAACAATTAATTTACACCAATCAGCGCCAGGGGATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCAACCATTTCTCGCTC-TCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTTT-ACAGTAGGCCCAAGGACGTCAATACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATGGGCTACAATTTCTAATTTAGAACAAACGAAAGACTATGTGAAACCATAATC-TGAAGGTGGATTTAGCAGTAAAAAGGAAATATAGTGTTCTTTTTAACCTGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-CTCCCATTTGTTCCTAACTT-ATTAT-TACGCCTT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+tarahumaraeKU194596       GCCGTAAACAATTAATTTACACCTACCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATAATCCCCGCTACACCTAACCATTCCTTGCTT-TCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCT-ACAGTAAGCCTAATGACGTCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGAAAGCAATGGGCTACAATTTCTAATTTAGAATAAACGGAAGACTATGTGAAATCCTAGTCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA-TTTTTCTCCGTTCCTAACTC-ACTAT-CACGTCTT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+zweifeliJAC7514           ACCGTAAACAATTAATTTACACCAATCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGACTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATAATCCCCGCTACACCCGACCATTTCTTGCTT-TCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCT-ACAGTAAGCCCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAGTGGGAAGCAATGGGCTACAATTTCTAATTTAGAACAAACGAAAGATTATGTGAAATCATATTC-TGAAGGTGGATTTAGCAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-AAATACTCTGTTCCTAACTC-ACTAT-TACGCCTT-AGAAGAAGCAAGTCGTAACATGGTAAGTGTA [...]
+pustulosaJAC10555         ACCGTAAACAATTAATTTACACCAATCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGCCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATAATCCCCGCTACACCTGACCATTTCTCGCCT-TCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTTT-ACAGTAAGCCTAATGACGTCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATGGGCTACAATTTCTAATTTAGAACAAACGGAAGACTATGTGAAACCCTAGTC-TCAAGGTGGATTTAGTAGTAAAAAGAAAATAAAGTGTTCTTTTTAACCTGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-TATTCTTCTGTTCCTAACTA-ACTACTCACGTTTT-AGAAAAGGTAAGTCGTAACATGGTAAGTGTA [...]
+pipiensJSF1119            ACCGTAAACAATTAATTTACACCCATCAGCGCCAGGGAAATACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTTTAATCGATGATCCCCGCTACACCTGACCATTTCTTGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCT-TCAGTAGGCTCAATGATATCAATACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACCATTTCTAATATAGAACAAACGAAAGGCTATGTGAAATCATAGCAGCGAAGGTGGATTTAGTAATAAAAAAAAAATATAGTGTTCTTTTTAACCCGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-AATAATATTGTCCCTAACCC-ATTAT-CACGTTTT-AGAAGAAGCAAGTCGAAACATGGTAAGTGTA [...]
+pipiensY10945             GCCGTAAACAATTAATTTACACCCATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTTTAATCGATGATCCCCGCTACACCTGACCATTTCTTGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCT-TCAGTAGGCTCAATGATATCAATACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACAATTTCTAATATAGAACAA-CGAAAGGCTATGTGAAATCATAGCAGCGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-AATAATATTATCCCTAACCC-ATTAT-CACGTTTT-AGAAGAGGCAAGTCGAAACATGGTAAGTGTA [...]
+dunniJSF1017              GCCGTAAACAATTAATTTACACCCATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTTTAATCGATGATCCCCGCTACACCTAACCATTTCTTGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCC-TCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAACTTAAGAAGTGGGAAGTAATTGGCTACAATTTCTAATCTAGAACAAACGAAAGGCTATGTGAAATCATAGCAGCGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-AATAATTCTGTCCCTAACCC-ATTAT-CACGTTTT-AGAAGAGGCAAGTCGAAACATGGTAAGTGTA [...]
+montezumaeJAC8836         GCCGTAAACAATTAATTTACACCCATCAGCGCCAGGGAAATACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTTTAATCGATGATCCCCGCTACACCTAACCATTTCTTGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCC-TCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAACTTAAGAAGTGGGAAGTAATTGGCTACAATTTCTAATCTAAAACAAACGAAAGGCTATGTGAAATCATAGCAGCGAAGGTGGATTTAGTAGTAAAAAAAAAATATAGTGTTCTTTTTAACCCGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-AATAATTCTGTTCCTAACCC-ATTAT-AGCGTTTT-AGAAGAAGCAAGTCGAAACATGGTAAGTGTA [...]
+sp_2_mex_JSF1106          GCCGTAAACAATTAACTTACACCCATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTTTAATCGATGATCCCCGCTACACCTGACCATTTCTTGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCC-TCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAACTTAAGAAATGGGAAGTAATTGGCTACAATTTCTAATCTAGAACAAACGAAAGGCTATGTGAAACCATAGCAGCGAAGGTGGATTTAGTAGTAAAAAGAAAACAGAGTGTTCTTTTTAACCCGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-AATAATTCTGTCCCTAACCT-AATAT-CACGTCTT-AGAAGAGGCAAGTCGAAACATGGTAAGTGTA [...]
+chiricahuensisJSF1063     ????????????????????????ATCACCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTTTAATCGATGATCCCCGCTACACCTGACCATTTCTTGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCC-TCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAACTTAAGAAATGGGAAGTAATTGGCTACAATTTCTAATCTAGAACAAACGAAAGGCTATGTGAAATCATAGCAGCGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-AATAATTCTGTCCTTAACCT-AATAT-AACGTCTT-AGAAGAGGCAAGTCGAAACATGGTAAGTGTA [...]
+chiricahuensisJSF1092     GCCGTAAACAATTAACTTACATCCATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTTTAATCGATGATCCCCGCTACACCTGACCATTTCTTGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCC-TCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAACTTAAGAAATGGGAAGTAATTGGCTACAATTTCTAATCTAGAACAAACGAAAGGCTATGTGAAATCATAGCAGCGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-AATAATTCTGTCCTTAACCT-AATAT-AACGTCTT-AGAAGAAGCAAGTCGAAACATGGTAAGTGTA [...]
+subaquavocalis            GCCGTAAACAATTAACTTACATCCATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTTTAATCGATGATCCCCGCTACACCTGACCATTTCTTGCTCACCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTCC-TCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAACTTAAGAAATGGGAAGTAATTGGCTACAATTTCTAATCTAGAACAAACGAAAGGCTATGTGAAATCATAGCAGCGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA-AATAATTCTGTCCTTAACCT-AATAT-AACGTCTT-AGAAGAGGCAAGTCGAAACATGGTAAGCGTA [...]
+palustrisJSF1110          ACCGTAAACAATTAATTTACACCTATCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTCGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTTCTTCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGTAATTGGCTACAATTTCTAATCTAGAACAAACGAAAGGCTATGTGAAATCATAACCACGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-CACAATTTTGTCCCTAACCA-ATTTT-CACGTTTT-AGAAGAAGCAAGTCGAAACACGGTAAGTGTA [...]
+areolataJSF1111           GCCGTAAACAATTTATTTACACCTATAAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTCGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTTCTTCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAACTTAAGAAATGGGAAGCAATTGGCTACAATTTCTAATCTAAAACAAACGAAAGGCTATGTGAAACCATAACCATGAAGGTGGATTTAGTAGTAAAAAAAAAATATAGTGTTCTTTTTAACCCGGCTCTGGGATGCGTACACACCGCCCGTCACCCTCTTCGATAGTA-CACAATATTGTCCGTAACCA-ATTTT-TACATTTTTAGAAGAAGCAAGTCGAAACACGGTAAGTGTA [...]
+sevosaUSC8236             GCCGTAAACAATTAATTTACACCCATCAGCGCCTGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTCGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTTCTCTAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACAATTTCTAACTTAGAACAAACGAAAGGCTATGTGAAATCATAGCCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGCGTACACACCGCCCGTCACCCTCTTCAATAGTA-CACAATATTGTCCATAACCA-ATTCT-TACGTTTT-AGAAGAGGCAAGTCGAAACACGGTAAGTGTA [...]
+capitoSLU003              GCCGTAAACAATTAATTTACACCCATCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAACTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTCGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTTCTCTAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACAATTTCTAACTTAGAACAAACGAAAGGCTATGTGAAATCATAGCCATGAAGGTGGATTTAGCAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCAATAGTA-CACAATATTGTCCATAACCA-ATTCT-TACGTTTT-AGAAGAGGCAAGTCGAAACACGGTAAGTGTA [...]
+spectabilisJAC8622        GCCGTAAACAATTAATTTACATCTATCAGCGCCAGGGGACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTATACCCCACCATTTTTAGCTTATCAGTCTGTATACCTCCGTCGAAAACTTACCATGTGAACGCCCTTCAGTAGGTTCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGAAAGCAATTGGCTACAATTTCTAATTTAGAACAAACGAAAGGCTATGTGAAATCATAACCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTC-CATGATACTGTCCCTAACAA-ATTAT-TACGTTTT-AGAAGAAGCAAGTCGAAACACGGTAAGTGTA [...]
+forreriJSF1065            GCCGTAAACAATTAACTTACACCCATCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCAACCAGCTAGAGGAGCTTGTTCTATAATCGATGATCCCCGATACACCCGACCATTTTTAGCTTATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTTTCTCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTTGCTACAATTTCTAATTTAGAACAAACGAAAGGCTATGTGAAATCATAACCACGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTC-CATAATACTGTCCCTAACCC-TTTAT-TACATTTT-AGAAGAGGCAAGTCGAAACATGGTAAGTGTA [...]
+tlalociJSF1083            GCCGTAAACAATTAATTTACACCTATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTAGCTAATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCTATTGGCTACAATTTCTAACTTAGAACAAACGAAAGGCTATGTGAAATCATAACCATGAAGGTGGATTTAGTAGTAAAAAGAAAATATAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-CCTAATACTGTCCCTAACCC-ATTAT-TACATTTT-AGAAGAAGCAAGTCGAAACACGGTAAGTGTA [...]
+berlandieriJSF1136        GCCGTAAACAATTAATTTACACCTATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTAGCTAATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCTATTGGCTACAATTTCTAACTTAGAACAAACGAAAGGCTATGTGAAATCATAACCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-CCTAATACTGTCCCTAACCC-ATTAT-TACATTTT-AGAAGAAGCAAGTCGAAACACGGTAAGTGTA [...]
+neovolcanicaJSF960        GCCGTAAACAATTAATTTACACCTATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTAGCTAATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCTATTGGCTACAATTTCTAACTTAGAACAAACGAAAGGCTATGTGAAATCATAACCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-CCTAATACTGTCCCTAACCC-ATTAT-TACATTTT-AGAAGAGGCAAGTCGAAACACGGTAAGTGTA [...]
+blairiJSF830              GCCGTAAACAATTAATTTACACCTATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTAGCTAATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCTATTGGCTACAATTTCTAATTTAAAACAAACGAAAGGCTATGTGAAATCATAACCATGAAGGTGGATTTAGTAATAAAAAAAAAATATATTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-CTTAATACTGTCCCTAACCC-ATTAT-TACATTTT-AGAAGAAGCAAGTCGAAACACGGTAAGTGTA [...]
+omiltemanaJAC7413         ACCGTAAACAATTAATTTACACCTATCAGCGCCCGGGGATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCAACCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGATACACCCGACCATTTTTAGCTAATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCTCAAGGATATCAATACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGTAATTGGCTACAATTTCTAACTTAGAACAAACGAAAGGTTATGTGAAATCATAACCACGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-ATTAATATTGTTCCTAACCC-CCTAT-TACGTCTT-AGAAGAAGCAAGTCGAAACACGGTAAGTGTA [...]
+magnaocularisJSF1073      ACCGTAAACAATTAATTTACACCTATCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTCTAGCTCATCATTCTGTATACCTCCGTCAAAAGCTTACCATGTGAACCCTCTTCAGTAGGCTCAAAGATATCATCACGTCAGGTCGAGGTGCAACTTAAGAGATGGGAAGTGATTGGCTACCTTTTCTAAATTAAAACAAACAAAAGGTTATGTCAAATCCTGGCCGTGAAGGTGGATTTAGTAATAAAAAAAAATTTTATTGTTCTTTTTAACCCGGGTCTGGGACGTGTACCCCCCGCCCCTCCCCCTCTTCGATTGTC-CATGATCCTGTCCCCAACCC-TTTAT-TATTTTTA-AGAAAATGCAAGTCGAAACACTGTAATTGTA [...]
+yavapaiensisJSF1085       ACCGTAAACAATTAATTTACACCCATCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTAGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCCCAATGA-GTCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACAATTTCTAACTTAGAACAAACGAAAGGCTATGTGAAACCATAACCACGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-CAAAATACTGTCCCTAACCC-TTTAT-TACGTTTT-AGAAGAAGCAAGTCGAAACACGGTAAGTGTA [...]
+sp_7_JaliscoJSF1000       GCCGTAAACAATTAATTTACACATATCAGCGCCAGGGAATTACGAGCGATGCTTAAAACCCAAAGGATTTGACGGTGTCCCAACCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTAGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAAAAATGGGAAGTAATTGGCTACAATTTCTAACTTAAAACAAACGAAAGGCTATGTGAAATCATGGCCACGAAGGTGGATTTAGTAATAAAAAGAAAATATAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATTGTC-CATGATACTGTCCCTAACCC-TTTAT-TATTTTTT-AGAAAAGGCAAGTCGAAACACGGTAAGTGTA [...]
+macroglossaJAC10472       ACCGTAAACAATTTATTTACACCTACCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCCACCATTTCTAGCTAATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCTTAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGAAAGCAATTGGCTACAATTTCTAATTTAGAACAAACGAAAGGCTATGTGAAATCATAACCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAACT-CATGATACTGTCCCTAACCCCATTAT-TACCCTTT-AGAAGAAGCAAGTCGAAACACGGTAAGTGTA [...]
+macroglossaJSF7933        ACCGTAAACAATTTATTTACACCTACCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCCACCATTTCTAGCTAATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCTTAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGAAAGCAATTGGCTACAATTTCTAATTTAAAACAAACGAAAGGCTATGTGAAATCATAACCGTGAAGGTGGATTTAGTAGTAAAAAAAAAATATATTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAACT-CATGATACTGTCCCTAACCCCATTAT-TACCTTTT-AGAAGAGGCAAGTCGAAACACGGTAAGTGTA [...]
+taylori286                ACCGTAAACAATTAATTTACACCTATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTATACCCAACCATTTCTAGCTAATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTTTTTCAGTAGGCTTAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGAAAGCAATTGGCTACAATTTCTAACTTAGAACAAACGAAATGATATGTGAAATCATAATCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAACC-CATAATACTGTTCCTAACCCCATTAT-TTCATTTT-AGAAGAAGCAAGTCGAAACATGGTAAGTGTA [...]
+sp_4_Panama               ACCGTAAACAATTAATTTACACCTATCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGTTACACCTAACCATTTTTAGCTAATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTTTTTCAGTAGGCTTAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACAATTTCTAATCTAGAACAAACGAAAGGTTATGTGAAATCATGACCACGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-CATGATACTGTCCCTAACCC-TTTAT-TACGTTTT-AGAAGAGGCAAGTCGAAACACGGTAAGTGTA [...]
+sp_5_CostaRichDMH86_210   ACCGTAAACAATTAATTTACACCTATCAGCGCCAGGGAAATACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGTTACACCTAACCATTTTTAGCTAATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGTTCTTCAGTAGGCTTAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACAATTTCTA-TTTAAAACAAACGAAAGGCTATGTGAAATCATAACCATGAAGGTGGATTTAGTAATAAAAAAAAAATATAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-CATGATACTGTCCCTAACCC-TTTAT-TACGTTTT-AGAAAAAGCAAGTCGAAACACGGTAAGTGTA [...]
+sp_6_CostaRicaDMH86_225   ACCGTAAACAATTAATTTACACCTATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCTTGTTCTATAATCGATGATCCCCGTTACACCTAACCATTTTTAGCTAATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCTTAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACAATTTCTAATCTAGAACAAACGAAAGGCTATGTGAAATCATAACCACGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTC-CATGATACTGTCCCTTACCC-TTTAT-TACATTTT-AGAAGAAGCAAGTCCAAACACGGTAAGCGTA [...]
+sp_8_PueblaJAC9467        ACCGTAAACAATTAACTCACACCTATCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCAGCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTAGCTCCGCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAATGCCCTTCAGTAGGCTCAATGATATCG-TACGTCAGGTCAAGGTGCAGCTCAAGAAATGGAAAGTAATTGGCTACAATTTCTAGTTTAGAACAAACGAAAGGCTGTGTGAAATCACGGCCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGAGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-CATAATACTGTCCCTAACCC-TTTAT-TACATTTT-AGAAGAGGCAAGTCGAAACACGGTAAGTGTA [...]
+oncaLVT3542               ACCGTAAACAATTAATTTACACCCATCAGCGCCAGGGAATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTAGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCCCAATGA-GTCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACAATTTCTAACTTAGAACAAACGAAAGGCTATGTGAAACCATAACCACGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-CAAAATACTGTCCCTAACCC-TTTAT-CACGTTTT-AGAAGAGGCAAGTCGAAACACGGTAAGTGTA [...]
+sp_3_MichoacanJSF955      GCCGTAAACAATTAATTCACACCTATCAGCGCCAGGGGATTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGTTACACCCGACCATTTTTAGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCTCTTCAGTAGGCTCAATGATGTCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACAATTTCTAATCTAGAACAAACGAAAGGCTATGTGAAATCATAACCTCGAAGGTGGATTTAGTAGTAAAAAGAAAGTAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTC-CATGATACTGTTCCTAACCC-AATAT-TACATTTT-AGAAGAGGCAAGTCGAAACACGGTAAGTGTA [...]
+sphenocephalaUSC7448      GCCGTAAACAATTAATTTACACCTATCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTAGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCCTTCAGTAGGCTCAATGATATCAACACGTCAGGTCAAGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACAATTTCTAATCTAGAACAAACGAAAGGCTATGTGAAATCATAACCATGAAGGTGGATTTAGTAGTAAAAAGAAAATAGAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-CATAATACTGTTCCTAACCC-ATTGT-TACATTTT-AGAAGAGGCAAGTCGAAACACGGTAAGTGTA [...]
+utriculariaJSF845         GCCGTAAACAATTAATTTACACCTACCAGCGCCAGGGAACTACGAGCAATGCTTAAAACCCAAAGGATTTGACGGTGTCCCACCCAGCTAGAGGAGCCTGTTCTATAATCGATGATCCCCGCTACACCCGACCATTTTTAGCTCATCAGTCTGTATACCTCCGTCGAAAGCTTACCATGTGAACGCCCTTCAGTAGGCTCAATGATATCAACACGTCAGGTC?AGGTGCAGCTTAAGAAATGGGAAGCAATTGGCTACAATTTCTAATCTAAAACAAACGAAAGGCTATGTGAAATCATAACCATGAAGGTGGATTTAGTAATAAAAAGAAAATATAGTGTTCTTTTTAACCCGGCTCTGGGACGTGTACACACCGCCCGTCACCCTCTTCGATAGTT-CATAATACTGTTCCTAACCT-ATTAT-TACATTTT-AGAAGAGGCAAGTCGAAACACGGTAAGTGTA [...]
diff --git a/example/basic/ranaconstraint.format1 b/example/basic/ranaconstraint.format1
new file mode 100644
index 0000000..6acec77
--- /dev/null
+++ b/example/basic/ranaconstraint.format1
@@ -0,0 +1,2 @@
++((1,2,3,4,5,6,7,8,9),10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64);
+
diff --git a/example/basic/ranaconstraint.format2 b/example/basic/ranaconstraint.format2
new file mode 100644
index 0000000..2f37964
--- /dev/null
+++ b/example/basic/ranaconstraint.format2
@@ -0,0 +1,2 @@
++*********.......................................................
+
diff --git a/example/basic/ranastart.nexus.tre b/example/basic/ranastart.nexus.tre
new file mode 100644
index 0000000..b2821bf
--- /dev/null
+++ b/example/basic/ranastart.nexus.tre
@@ -0,0 +1,75 @@
+#NEXUS 
+
+begin garli;
+r 2.3632 8.3104 2.3675 0.97512 19.142 b 0.34589 0.20981 0.14884 0.29546 a 0.58462 p 0.29489;
+end;
+
+Begin trees;
+	Translate
+		1 temporariaDMH84R1,
+		2 boyliiMVZ148929,
+		3 luteiventris_MT_MVZ191016,
+		4 luteiventris_WA_MVZ225749,
+		5 muscosaMVZ149006,
+		6 auroraMVZ13957,
+		7 cascadaeMVZ148946,
+		8 sylvaticaMVZ137426,
+		9 sylvaticaDMH84R43,
+		10 septentrionalesDCC3588,
+		11 grylioMVZ175945,
+		12 virgatipesMVZ175944,
+		13 okaloosae,
+		14 clamitansJSF1118,
+		15 heckscheriMVZ164908,
+		16 catesbianaX12841,
+		17 catesbianaDMH84R2,
+		18 maculataKU195258,
+		19 vibicariaMVZ11035,
+		20 warszewitshiiJSF1127,
+		21 palmipesVenAMNHA118801,
+		22 palmipesEcuKU204425,
+		23 bwanaQCAZ13964,
+		24 Sp_1_ecuadorQCAZ13219,
+		25 vaillantiKU195299,
+		26 julianiTNHC60324,
+		27 sierramadrensisKU195181,
+		28 psilonotaKU195119,
+		29 tarahumaraeKU194596,
+		30 zweifeliJAC7514,
+		31 pustulosaJAC10555,
+		32 pipiensJSF1119,
+		33 pipiensY10945,
+		34 dunniJSF1017,
+		35 montezumaeJAC8836,
+		36 sp_2_mex_JSF1106,
+		37 chiricahuensisJSF1063,
+		38 chiricahuensisJSF1092,
+		39 subaquavocalis,
+		40 palustrisJSF1110,
+		41 areolataJSF1111,
+		42 sevosaUSC8236,
+		43 capitoSLU003,
+		44 spectabilisJAC8622,
+		45 forreriJSF1065,
+		46 tlalociJSF1083,
+		47 berlandieriJSF1136,
+		48 neovolcanicaJSF960,
+		49 blairiJSF830,
+		50 omiltemanaJAC7413,
+		51 magnaocularisJSF1073,
+		52 yavapaiensisJSF1085,
+		53 sp_7_JaliscoJSF1000,
+		54 macroglossaJAC10472,
+		55 macroglossaJSF7933,
+		56 taylori286,
+		57 sp_4_Panama,
+		58 sp_5_CostaRichDMH86_210,
+		59 sp_6_CostaRicaDMH86_225,
+		60 sp_8_PueblaJAC9467,
+		61 oncaLVT3542,
+		62 sp_3_MichoacanJSF955,
+		63 sphenocephalaUSC7448,
+		64 utriculariaJSF845
+		;
+tree start = [&U] ((40:0.02390280,((43:0.01019800,42:0.00212128):0.02307062,41:0.03616946):0.00883063):0.01463739,(((32:0.00722334,33:0.00204765):0.02609594,((34:0.01049106,35:0.01695165):0.01589729,((38:0.00849269,(37:0.02125788,39:0.00797791):0.00155937):0.00951851,36:0.01916016):0.00603120):0.02141512):0.03480802,(((((31:0.08886663,29:0.03220190):0.01558966,(30:0.05714606,28:0.08150107):0.01778533):0.04266049,27:0.11352818):0.03367044,(((8:0.00402014,9:0.00245546):0.05750656,(12:0.044 [...]
+end;
diff --git a/example/basic/ranastart.oldformat.tre b/example/basic/ranastart.oldformat.tre
new file mode 100644
index 0000000..5b5942c
--- /dev/null
+++ b/example/basic/ranastart.oldformat.tre
@@ -0,0 +1 @@
+r 2.3632 8.3104 2.3675 0.97512 19.142 b 0.34589 0.20981 0.14884 0.29546 a 0.58462 p 0.29489 ((40:0.02390280,((43:0.01019800,42:0.00212128):0.02307062,41:0.03616946):0.00883063):0.01463739,(((32:0.00722334,33:0.00204765):0.02609594,((34:0.01049106,35:0.01695165):0.01589729,((38:0.00849269,(37:0.02125788,39:0.00797791):0.00155937):0.00951851,36:0.01916016):0.00603120):0.02141512):0.03480802,(((((31:0.08886663,29:0.03220190):0.01558966,(30:0.05714606,28:0.08150107):0.01778533):0.04266049,27 [...]
diff --git a/example/basic/zakonEtAl2006.11tax.nex b/example/basic/zakonEtAl2006.11tax.nex
new file mode 100644
index 0000000..fb42190
--- /dev/null
+++ b/example/basic/zakonEtAl2006.11tax.nex
@@ -0,0 +1,25 @@
+#NEXUS
+
+[
+This dataset is from:
+Zakon, Lu, Zwickl and Hillis. 2006. Sodium channel genes and the evolution of diversity in communication signals of electric fishes: Convergent molecular evolution. Proc. Natl. Acad. Sci. USA. 103(10):3675-80.
+]
+
+begin data;
+dimensions ntax=11 nchar=2178;
+format datatype=dna missing=? gap=-;
+matrix
+MorNa6    CCTGTGACTCCACATTTTGAGCACGTACTCAGTGTGGGAAACCTGGTTTTCTCAGGGATATTTGCTGGTGAAATGGTCTTGAAAATTATTGCTATGGACCCCTACTACTACTTCCAGGTTGGATGGAACGTGTTTGACAGCATCATTGTTACCATGAGTATGGTGGAGATGGTACTGGCTGATGTAGAGGGTCTGTCGGTTCTGCGGTCCTTTCGTTTGCTACGTGTCTTCAAGCTTGCCAAATCATGGCCTACCCTCAACATGCTGCTAACGATCATCGGAAACTCAGTGGGTGCTCTGGGGAACCTCACCGTGGTGCTGGCCATCATCGTTTTCATCTTCGCTGTGGTTGGAATGCAGCTGTTTGCCAAAAACTACAAGGACTGCGTCTGCAAGATCGCCGAGGATTGTGAGCTGCCCCGGTGGCACATGCATGACTTCTTCCACTCTTTCCTCATCGTGTTCCGCATCCTCTGTGGAGA [...]
+ClownNa6  CCCATGAGCCCTGAGTTTGACCACATGCTCTCTGTGGGAAACCTGGTTTTCACTGGAATCTTCACAGCTGAAATGGTCCTAAAACTCATTGCTATGGACCCCTACTACTACTTCCAGGTTGGATGGAACATATTTGACAGCATCATTGTCACTCTAAGCCTAGTGGAACTGGGGCTCGCTAATGTTCAGGGTCTGTCAGTCCTGCGATCCTTTCGTTTGTTGCGAGTGTTCAAGCTGGCAAAGTCTTGGCCCACCCTCAACATGCTGATCAAGATCATCGGGAATTCCGTGGGCGCCCTGGGCAACCTGACCCTGGTGCTGGCCATCATCGTCTTCATCTTCGCCGTGGTGGGCATGCAGCTCTTTGGGAAGACCTACAAGGACTGCGTGTGCAAGATTGCCAGTGACTGCGAGCTTCCCCGCTGGCACATGAATGACTTCTTCCACTCGTTCCTTATCGTGTTCCGCATCCTCTGCGGGGA [...]
+AraNa6    CCAATGAGTCCCGCGTTTGACCATATGCTGACCGTGGGAAACCTCGTTTTTACGGGGATCTTTACAGCTGAGATGGTATTCAAGCTCATCGCCATGGATCCATACCACTACTTCCAGGTTGGATGGAACATTTTTGACAGCATCATTGTCACACTTAGCCTGGTGGAGCTGGGTCTCGCGAATGTTCAGGGCCTTTCGGTCTTGCGCTCCTTCCGCTTGCTGCGGGTCTTCAAGCTGGCCAAGTCTTGGCCTACCCTGAACATGCTCATCAAGATCATTGGAAACTCAGTGGGTGCCCTAGGGAACCTCACACTGGTGCTGGCCATCATCGTCTTCATCTTCGCTGTCGTGGGCATGCAGCTGTTCGGTAAGAGCTACAAGGACTGTGTGTGTAAGATTGCAGAGGACTGTGAGCTACCCCGCTGGCACATGAATGACTTCTTCCACTCCTTCCTCATCGTGTTCCGCATCTTGTGTGGCGA [...]
+puffNa6   CCCATGACCGAAGAGTTCGACTACATGCTTTCAGTGGGAAATCTGGTTTTCACAGGAATCTTCGCGGCGGAAATGTTCTTCAAATTGATCGCCATGGATCCGTACTACTATTTCCAAGTTGGCTGGAACATTTTTGACAGCATCATCGTCACGCTCAGTCTGGTGGAGTTAGGGCTTGCAAACGTCCAGGGGCTGTCCGTCCTCAGGTCCTTCCGTCTGCTTCGGGTCTTCAAACTTGCCAAGTCCTGGCCCACGCTCAACATGCTGATCAAGATTATCGGTAATTCAGTTGGAGCTTTAGGGAATCTGACTTTGGTGCTGGCCATCATCGTCTTCATCTTCGCTGTGGTGGGGATGCAGCTCTTCGGCAAAAGCTACAAGGACTGTGTGTGCAAGATTTCCTCCGACTGCGAGCTGCCACGCTGGCACATGAATGACTTCTTCCACTCCTTCCTCATCGTGTTCCGCATCCTGTGCGGCGA [...]
+NewZebra  CCTATGAGTCCACATTTTGAACATGTCCTCTCAGTGGGCAACTTGGTGTTCACAGGAATCTTCACAGCTGAAATGGTGTTCAAGCTTATAGCTATGGACCCTTACTACTACTTCCAGGTGGGCTGGAACATTTTTGACAGCATCATTGTCACACTCAGCCTGGTGGAGTTGGGACTGGCCAACGTTCAGGGATTGTCCGTTCTAAGGTCCTTTCGTTTGCTACGTGTCTTCAAACTGGCTAAATCTTGGCCCACCCTTAACATGCTGATCAAGATCATCGGCAACTCAGTGGGTGCTCTAGGGAACCTAACACTTGTTCTGGCCATCATTGTCTTCATCTTTGCCGTGGTGGGCATGCAGCTTTTTGGAAAAAGCTACAAGGACTGCGTTTGTAAGATCTCTGAGGATTGCGAGCTGCCCCGCTGGCACATGAACGACTTCTTCCACTCATTCCTCATCGTCTTTCGGATCTTATGTGGAGA [...]
+SterNa6   CCCATGAGCGAAACCTTTCAACACGTGCTCACCATAGGGAACCTGGTGTTTACTACCATCTTTACGGCTGAAATGGTGTCGAAGATCATCGCCCTGGACCCTTACTACTACTTCCAGGTGGGCTGGAACATCTTCGACTGCATCATCGTCACTCTCAGTCTGGTGGAGCTAAGCCTATCCAACATGCCGGGCCTGTCTGTGCTCAGATCCTTTCGTTTGATGCGTATTTTCAAGCTGGCCAAGTCCTGGCCCACGCTCAACATGCTGATCAAGATCATCGGCAACTCAATGGGCGCCCTGGGGAACCTGACCTTCGTGTTGGCCATCGTCATCTTCATCTTCGCCGTGGTGGGCTTCCAGCTGTTCGGGAAGAGCTACAAGGACAACGTGTGCAAGGTCAGCGCGGACTGCACGCTGCCTCGCTGGCACATGAACGACTTCTTCCACTCCTTCCTGATCGTGTTTCGCATCCTGTGCGGCGA [...]
+eelNa6    CCCATGAACGAAAGCTTTCAGAGTCTGCTCAGTGCAGGAAACCTGGTGTTTACCACTATCTTTGCGGCTGAAATGGTGTTGAAGATCATTGCCTTGGACCCCTACTACTACTTCCAGCAGACGTGGAACATATTTGACAGCATCATTGTCAGTCTCAGTCTGTTGGAGCTTGGACTATCCAATATGCAAGGAATGTCTGTGCTCAGATCCTTACGTTTGCTGCGTATCTTCAAATTGGCCAAGTCCTGGCCCACGCTCAACATTCTGATCAAGATAATCTGCAACTCGGTGGGCGCTCTGGGCAACCTGACCATTGTGCTGGCCATTATCGTCTTCATCTTCGCCTTGGTGGGCTTTCAGCTGTTCGGAAAGAACTACAAGGAGTACGTGTGCAAGATCTCTGATGACTGTGAGCTGCCCCGCTGGCACATGAATGACTTCTTCCACTCCTTCCTGATTGTGTTCCGTGCCTTGTGTGGCGA [...]
+catNa6    CCCATGAGTTCGAACTTTGAACACGTGCTCAGTGTTGGCAATTTGGTGTTCACTGGTATTTTCACGGCTGAAATGGTGTTCAAGCTCATTGCCTTGGACCCCTTCTACTACTTCCAGGTTGGCTGGAACATATTTGACAGCATCATCGTCACTCTTAGCCTGGTGGAGTTAGGCCTGGCCAATGTGCAGGGTCTGTCTGTACTCAGATCCTTTCGTTTGCTGCGAGTCTTTAAGCTGGCTAAATCCTGGCCCACGCTCAACATGCTGATCAAAATCATTGGAAACTCTGTGGGTGCTCTGGGGAACCTGACTCTGGTGCTGGCCATCGTCGTCTTCATCTTCGCCGTCGTAGGCATGCAACTTTTTGGCAAGAGCTACAAGGACTGCGTGTGTAAGATTGCAGAGGACTGCGAACTGCCCCGCTGGCACATGAACGATTTTTTCCATTCGTTTCTCATTGTCTTCCGCATCCTTTGTGGTGA [...]
+AptNa6    ---------------------------CTCACTGTGGGGAACCTGGTGTTTACTGGCATCTTTACGGCTGAAATGGTGTTTAAGCTCATTGCCATGGACCCCTACTACTACTTCCAGGTGGGCTGGAACATCTTCGACAGCATCATCGTCACCCTCAGTCTGGTGGAGCTGGGGCTAGCCAACGTGCAGGGTCTGTCTGTGCTCAGGTCCTTCCGTTTGCTGCGTGTCTTCAAGTTGGCCAAGTCCTGGCCAACGCTCAATATGCTCATCAAGATCATTGGCAACTCGGTGGGAGCCCTGGGCAACCTGACACTGGTGCTGGCCATTATTGTCTTCATCTTTGCCGTGGTGGGCATGCAGCTATTTGGGAAGAGCTACAAGGACTGCGTGTGCAAGATTGCGCTGGACTGCGAGCTTCCCCGCTGGCACATGACGGACTTCTTCCACTCCTTCCTGATCGTGTTCCGCATCCTATGCGGCGA [...]
+PinniNa6  CCCATGAGTGAAACGTTTGATTACGTCCTCAGCACAGGGAACCTGGTGTTTACCATCATCTTTGCAGCTGAAATGGTCTTGAAGCTCATTGCCATGGACCCCTACTACTACTTCCAGCAGACGTGGAACATCTTTGACTTTTTCATTGTCTCACTCAGTCTGGTGGAGATGGGACTGGCTAACATGCAGGGGCTGTCAGTGCTTAGGTCCTTTCGACTGCTGCGTATCTTTAAGTTGGCCAAGTCCTGGCCCACGCTCAATATTCTGATCAAGATCATCTGCAACTCGGTGGGCGCCCTGGGAAACCTGACCATCGTGCTGGCCATTATCGTCTTCATCTTCGCCTTGGTGGGCATGCAGCTGTTCGGGAAGAATTACAAAGAGTTTGTGTGCAAGATCAGTGCAGACTGTACGCTGCCTCGCTGGCATATGAATGACTTCTTCCATTCCTTCCTGATTGTGTTCCGCTGCCTGTGCGGCGA [...]
+tetra     CCCATGACCCAGGAGTTCGACTACATGCTTTCAGTGGGAAATCTGGTTTTCACAGGAATTTTTGCAGCAGAAATGTTCTTCAAGCTGATCGCCATGGATCCGTACTACTATTTCCAAGTTGGCTGGAACATTTTTGACAGCATCATTGTCACCCTCAGCCTGGTAGAGTTGGGGCTTGCGAACGTCCAGGGCCTGTCTGTCCTCAGGTCCTTCCGCCTGCTCCGTGTCTTCAAACTTGCCAAATCCTGGCCCACACTCAACATGCTGATCAAGATTATTGGGAGCTCAGTTGGAGCGCTAGGGAATCTGACGTTGGTGCTGGCCATCATCGTCTTCATCTTCGCTGTGGTGGGGATGCAGCTCTTTGGCAAAAGCTACAAGGACTGCGTGTGCAAGATTTCCACGGAGTGCGAGCTGCCGCGCTGGCACATGAATGACTTCTTCCACTCCTTCCTCATCGTCTTCCGCATCCTGTGTGGCGA [...]
+;
+end;
+
diff --git a/example/partition/EXAMPLES.txt b/example/partition/EXAMPLES.txt
new file mode 100644
index 0000000..d1de786
--- /dev/null
+++ b/example/partition/EXAMPLES.txt
@@ -0,0 +1,18 @@
+
+Included here are template config files and example analysis results for partitioned
+analyses.
+
+Looking at the .screen.log files in the example runs (especially the end) will
+give you a feeling for what the program is estimating and what the results
+will consist of.
+
+For the template config files, "large data" generally refers to alignments with
+more than about 50 sequences.  
+
+Note that to use the template configs you'd still need to specify the partitioning 
+of your data, which is done in the nexus file containing your alignment (sorry, 
+nexus format required for this).  See this page for help on doing this:
+
+http://www.nescent.org/wg_garli/Using_partitioned_models
+
+or look at the datafiles in the example runs directory.
diff --git a/example/partition/exampleRuns/3parts.diffModelTypes/3diffModels.byCodonPos.best.all.tre b/example/partition/exampleRuns/3parts.diffModelTypes/3diffModels.byCodonPos.best.all.tre
new file mode 100644
index 0000000..6c16bc6
--- /dev/null
+++ b/example/partition/exampleRuns/3parts.diffModelTypes/3diffModels.byCodonPos.best.all.tre
@@ -0,0 +1,45 @@
+#NEXUS
+
+begin trees;
+translate
+  1  MorNa6,
+  2  ClownNa6,
+  3  AraNa6,
+  4  puffNa6,
+  5  NewZebra,
+  6  SterNa6,
+  7  eelNa6,
+  8  catNa6,
+  9  AptNa6,
+  10  PinniNa6,
+  11  tetra;
+tree rep1BEST = [&U][!GarliScore -13315.772][!GarliModel  S  0.541083  0.300389  2.158528  M1 r  1.96588 2.57892 1.41068 1.41068 3.72213 1.00000 e 0.31012 0.17667 0.29716 0.21605 a 0.40969  M2 r  4.38001 7.08451 1.60936 7.08451 4.38001 1.00000 e 0.26922 0.16358 0.16049 0.40670 a 0.36093  M3 r  1.00000 4.93590 3.39070 0.45684 4.93590 1.00000 e 0.15654 0.35368 0.28766 0.20212 a 4.01423 p 0.03350 ](1:0.21759518,(3:0.12609984,((4:0.05332794,11:0.06160710):0.18946162,(5:0.14365194,(8:0.091225 [...]
+tree rep2 = [&U][!GarliScore -13315.77229666][!GarliModel  S  0.541345  0.300381  2.158273  M1 r  1.96172 2.57460 1.40818 1.40818 3.71484 1.00000 e 0.31015 0.17669 0.29714 0.21602 a 0.40961  M2 r  4.40047 7.11569 1.61706 7.11569 4.40047 1.00000 e 0.26920 0.16358 0.16053 0.40669 a 0.36105  M3 r  1.00000 4.93800 3.39310 0.45719 4.93800 1.00000 e 0.15654 0.35368 0.28766 0.20212 a 4.01602 p 0.03354 ](2:0.10626455,(((11:0.06161183,4:0.05330808):0.18948346,(5:0.14366753,((9:0.05810558,(6:0.112 [...]
+tree rep3 = [&U][!GarliScore -13315.77224255][!GarliModel  S  0.540836  0.300086  2.159077  M1 r  1.96446 2.57738 1.40996 1.40996 3.71994 1.00000 e 0.31014 0.17667 0.29716 0.21603 a 0.40977  M2 r  4.38218 7.08739 1.61042 7.08739 4.38218 1.00000 e 0.26921 0.16357 0.16049 0.40673 a 0.36094  M3 r  1.00000 4.93832 3.39276 0.45687 4.93832 1.00000 e 0.15654 0.35368 0.28765 0.20213 a 4.00776 p 0.03342 ](2:0.10629075,(((4:0.05333074,11:0.06162012):0.18950693,(5:0.14367501,(8:0.09123564,(9:0.0581 [...]
+tree rep4 = [&U][!GarliScore -13315.77217788][!GarliModel  S  0.540963  0.300207  2.158830  M1 r  1.96456 2.57739 1.40997 1.40997 3.72040 1.00000 e 0.31015 0.17665 0.29715 0.21604 a 0.40965  M2 r  4.38364 7.09014 1.61093 7.09014 4.38364 1.00000 e 0.26922 0.16357 0.16049 0.40673 a 0.36086  M3 r  1.00000 4.93944 3.39448 0.45719 4.93944 1.00000 e 0.15653 0.35369 0.28766 0.20212 a 4.01150 p 0.03349 ](1:0.21760998,(((11:0.06163237,4:0.05331949):0.18948609,((8:0.09121350,(9:0.05809253,((7:0.09 [...]
+tree rep5 = [&U][!GarliScore -13315.77223006][!GarliModel  S  0.541067  0.300689  2.158244  M1 r  1.96243 2.57513 1.40854 1.40854 3.71682 1.00000 e 0.31016 0.17668 0.29715 0.21601 a 0.40971  M2 r  4.38087 7.08608 1.60937 7.08608 4.38087 1.00000 e 0.26923 0.16359 0.16050 0.40668 a 0.36115  M3 r  1.00000 4.93780 3.39315 0.45723 4.93780 1.00000 e 0.15654 0.35368 0.28767 0.20211 a 4.01707 p 0.03353 ](1:0.21757792,(((5:0.14364584,(8:0.09121837,(9:0.05810218,(6:0.11278051,(10:0.10108817,7:0.09 [...]
+end;
+[M1
+begin paup;
+clear;
+gett file=3diffModels.byCodonPos.best.all.tre storebr;
+lset userbr nst=6 rclass=( 0 1 2 2 3 4 ) rmat=(1.96587554 2.57891825 1.41068018 1.41068018 3.72213378) base=(0.31012353 0.17666541 0.29716350) rates=gamma shape= 0.40969102 ncat=4 pinv= 0.00000000;
+end;
+
+]
+[M2
+begin paup;
+clear;
+gett file=3diffModels.byCodonPos.best.all.tre storebr;
+lset userbr nst=6 rclass=( 0 1 2 1 0 3 ) rmat=(4.38001120 7.08450573 1.60935984 7.08450573 4.38001120) base=(0.26922421 0.16357952 0.16049220) rates=gamma shape= 0.36092727 ncat=4 pinv= 0.00000000;
+end;
+
+]
+[M3
+begin paup;
+clear;
+gett file=3diffModels.byCodonPos.best.all.tre storebr;
+lset userbr nst=6 rclass=( 0 1 2 3 1 0 ) rmat=(1.00000000 4.93590137 3.39069798 0.45684430 4.93590137) base=(0.15654232 0.35367871 0.28765655) rates=gamma shape= 4.01423139 ncat=4 pinv= 0.03350150;
+end;
+
+]
diff --git a/example/partition/exampleRuns/3parts.diffModelTypes/3diffModels.byCodonPos.best.tre b/example/partition/exampleRuns/3parts.diffModelTypes/3diffModels.byCodonPos.best.tre
new file mode 100644
index 0000000..811624a
--- /dev/null
+++ b/example/partition/exampleRuns/3parts.diffModelTypes/3diffModels.byCodonPos.best.tre
@@ -0,0 +1,20 @@
+#NEXUS
+
+begin trees;
+translate
+ 1 MorNa6,
+ 2 ClownNa6,
+ 3 AraNa6,
+ 4 puffNa6,
+ 5 NewZebra,
+ 6 SterNa6,
+ 7 eelNa6,
+ 8 catNa6,
+ 9 AptNa6,
+ 10 PinniNa6,
+ 11 tetra;
+tree bestREP1 = [&U][!GarliScore -13315.772132][!GarliModel  S  0.541083  0.300389  2.158528  M1 r  1.96588 2.57892 1.41068 1.41068 3.72213 1.00000 e 0.31012 0.17667 0.29716 0.21605 a 0.40969  M2 r  4.38001 7.08451 1.60936 7.08451 4.38001 1.00000 e 0.26922 0.16358 0.16049 0.40670 a 0.36093  M3 r  1.00000 4.93590 3.39070 0.45684 4.93590 1.00000 e 0.15654 0.35368 0.28766 0.20212 a 4.01423 p 0.03350 ](1:0.21759518,(3:0.12609984,((4:0.05332794,11:0.06160710):0.18946162,(5:0.14365194,(8:0.091 [...]
+end;
+[
+ S  0.541083  0.300389  2.158528  M1 r  1.96588 2.57892 1.41068 1.41068 3.72213 1.00000 e 0.31012 0.17667 0.29716 0.21605 a 0.40969  M2 r  4.38001 7.08451 1.60936 7.08451 4.38001 1.00000 e 0.26922 0.16358 0.16049 0.40670 a 0.36093  M3 r  1.00000 4.93590 3.39070 0.45684 4.93590 1.00000 e 0.15654 0.35368 0.28766 0.20212 a 4.01423 p 0.03350 
+]
diff --git a/example/partition/exampleRuns/3parts.diffModelTypes/3diffModels.byCodonPos.log00.log b/example/partition/exampleRuns/3parts.diffModelTypes/3diffModels.byCodonPos.log00.log
new file mode 100644
index 0000000..8fb3d55
--- /dev/null
+++ b/example/partition/exampleRuns/3parts.diffModelTypes/3diffModels.byCodonPos.log00.log
@@ -0,0 +1,3980 @@
+Search rep 1 (of 5)
+random seed = 852004
+gen	best_like	time	optPrecision
+0	-13370.00554	1	0.5
+10	-13331.52657	2	0.5
+20	-13331.25468	2	0.5
+30	-13319.95803	2	0.5
+40	-13319.53005	2	0.5
+50	-13319.53005	2	0.5
+60	-13319.42267	2	0.5
+70	-13319.20903	2	0.5
+80	-13319.02858	2	0.5
+90	-13319.02858	2	0.5
+100	-13318.75875	2	0.5
+110	-13318.75875	2	0.5
+120	-13318.6918	3	0.5
+130	-13318.6918	3	0.5
+140	-13318.67738	3	0.5
+150	-13318.03798	3	0.5
+160	-13318.03798	3	0.5
+170	-13318.00773	3	0.5
+180	-13317.88994	3	0.5
+190	-13317.88346	3	0.5
+200	-13317.86398	3	0.5
+210	-13317.86244	3	0.5
+220	-13317.75838	4	0.5
+230	-13317.68772	4	0.5
+240	-13317.68772	4	0.5
+250	-13317.68772	4	0.5
+260	-13317.68772	4	0.5
+270	-13317.68772	4	0.5
+280	-13317.66103	4	0.5
+290	-13317.52471	4	0.5
+300	-13317.35386	4	0.5
+310	-13317.35386	4	0.5
+320	-13317.31751	5	0.5
+330	-13317.31751	5	0.5
+340	-13317.31751	5	0.5
+350	-13317.31751	5	0.5
+360	-13317.23419	5	0.5
+370	-13317.21712	5	0.5
+380	-13317.21712	5	0.5
+390	-13317.11526	5	0.5
+400	-13317.11237	5	0.5
+410	-13317.11066	6	0.5
+420	-13317.05928	6	0.5
+430	-13317.04815	6	0.5
+440	-13317.04586	6	0.5
+450	-13317.01279	6	0.5
+460	-13317.01279	6	0.5
+470	-13317.00404	6	0.5
+480	-13317.00352	6	0.5
+490	-13317.00352	6	0.5
+500	-13316.99313	7	0.5
+510	-13316.98931	7	0.5
+520	-13316.98931	7	0.5
+530	-13316.95647	7	0.5
+540	-13316.8836	7	0.5
+550	-13316.8836	7	0.5
+560	-13316.81087	7	0.5
+570	-13316.81087	7	0.5
+580	-13316.79839	7	0.5
+590	-13316.75335	7	0.5
+600	-13316.75335	8	0.5
+610	-13316.65766	8	0.402
+620	-13316.65766	8	0.402
+630	-13316.62249	8	0.402
+640	-13316.61034	8	0.402
+650	-13316.55455	8	0.402
+660	-13316.5506	8	0.402
+670	-13316.5482	8	0.402
+680	-13316.5482	8	0.402
+690	-13316.54015	8	0.402
+700	-13316.53197	8	0.402
+710	-13316.51527	9	0.402
+720	-13316.51527	9	0.402
+730	-13316.51527	9	0.402
+740	-13316.51527	9	0.402
+750	-13316.51071	9	0.402
+760	-13316.50156	9	0.402
+770	-13316.49125	9	0.402
+780	-13316.49125	9	0.402
+790	-13316.44795	9	0.402
+800	-13316.44795	9	0.402
+810	-13316.43994	9	0.402
+820	-13316.42609	9	0.402
+830	-13316.42609	10	0.402
+840	-13316.42609	10	0.402
+850	-13316.42609	10	0.402
+860	-13316.42507	10	0.402
+870	-13316.4201	10	0.402
+880	-13316.4201	10	0.402
+890	-13316.4201	10	0.402
+900	-13316.4201	10	0.402
+910	-13316.4201	10	0.402
+920	-13316.40262	10	0.402
+930	-13316.40262	10	0.402
+940	-13316.38502	10	0.402
+950	-13316.38395	11	0.402
+960	-13316.38395	11	0.402
+970	-13316.38395	11	0.402
+980	-13316.38395	11	0.402
+990	-13316.35742	11	0.402
+1000	-13316.35742	11	0.402
+1010	-13316.35327	11	0.402
+1020	-13316.35327	11	0.402
+1030	-13316.34275	11	0.402
+1040	-13316.27344	12	0.402
+1050	-13316.27344	12	0.402
+1060	-13316.27136	12	0.402
+1070	-13316.24888	12	0.402
+1080	-13316.24882	12	0.402
+1090	-13316.24882	12	0.402
+1100	-13316.24882	12	0.402
+1110	-13316.22498	12	0.304
+1120	-13316.22014	12	0.304
+1130	-13316.22014	12	0.304
+1140	-13316.21597	13	0.304
+1150	-13316.21597	13	0.304
+1160	-13316.21597	13	0.304
+1170	-13316.19966	13	0.304
+1180	-13316.18592	13	0.304
+1190	-13316.18592	13	0.304
+1200	-13316.17579	13	0.304
+1210	-13316.17579	13	0.304
+1220	-13316.17579	13	0.304
+1230	-13316.17539	13	0.304
+1240	-13316.17539	14	0.304
+1250	-13316.17539	14	0.304
+1260	-13316.17539	14	0.304
+1270	-13316.17539	14	0.304
+1280	-13316.17505	14	0.304
+1290	-13316.1715	14	0.304
+1300	-13316.17144	14	0.304
+1310	-13316.17144	14	0.304
+1320	-13316.16515	14	0.304
+1330	-13316.16489	14	0.304
+1340	-13316.12089	14	0.304
+1350	-13316.12089	15	0.304
+1360	-13316.12089	15	0.304
+1370	-13316.12089	15	0.304
+1380	-13316.09721	15	0.304
+1390	-13316.09721	15	0.304
+1400	-13316.09377	15	0.304
+1410	-13316.09127	15	0.304
+1420	-13316.09127	15	0.304
+1430	-13316.09127	15	0.304
+1440	-13316.08964	15	0.304
+1450	-13316.06292	16	0.304
+1460	-13316.06292	16	0.304
+1470	-13316.06292	16	0.304
+1480	-13316.06292	16	0.304
+1490	-13316.06292	16	0.304
+1500	-13316.05179	16	0.304
+1510	-13316.04494	16	0.304
+1520	-13316.04391	16	0.304
+1530	-13316.0305	16	0.304
+1540	-13316.0305	16	0.304
+1550	-13316.0305	17	0.304
+1560	-13316.0268	17	0.304
+1570	-13316.0268	17	0.304
+1580	-13316.00242	17	0.304
+1590	-13316.00242	17	0.304
+1600	-13315.99578	17	0.304
+1610	-13315.97958	17	0.206
+1620	-13315.97958	17	0.206
+1630	-13315.96539	17	0.206
+1640	-13315.96408	18	0.206
+1650	-13315.9544	18	0.206
+1660	-13315.9544	18	0.206
+1670	-13315.9544	18	0.206
+1680	-13315.94914	18	0.206
+1690	-13315.94641	18	0.206
+1700	-13315.94236	18	0.206
+1710	-13315.93311	18	0.206
+1720	-13315.93311	18	0.206
+1730	-13315.93272	18	0.206
+1740	-13315.93272	19	0.206
+1750	-13315.93272	19	0.206
+1760	-13315.92785	19	0.206
+1770	-13315.92785	19	0.206
+1780	-13315.92785	19	0.206
+1790	-13315.92785	19	0.206
+1800	-13315.92785	19	0.206
+1810	-13315.92698	19	0.206
+1820	-13315.92698	19	0.206
+1830	-13315.92246	19	0.206
+1840	-13315.92246	20	0.206
+1850	-13315.92246	20	0.206
+1860	-13315.92246	20	0.206
+1870	-13315.90992	20	0.206
+1880	-13315.90663	20	0.206
+1890	-13315.89028	20	0.206
+1900	-13315.89028	20	0.206
+1910	-13315.89028	20	0.206
+1920	-13315.89028	20	0.206
+1930	-13315.89028	20	0.206
+1940	-13315.86739	21	0.206
+1950	-13315.86739	21	0.206
+1960	-13315.86739	21	0.206
+1970	-13315.86739	21	0.206
+1980	-13315.86423	21	0.206
+1990	-13315.86423	21	0.206
+2000	-13315.86423	21	0.206
+2010	-13315.86423	21	0.206
+2020	-13315.86423	21	0.206
+2030	-13315.86416	21	0.206
+2040	-13315.86416	22	0.206
+2050	-13315.86415	22	0.206
+2060	-13315.85797	22	0.206
+2070	-13315.85797	22	0.206
+2080	-13315.85797	22	0.206
+2090	-13315.85797	22	0.206
+2100	-13315.85797	22	0.206
+2110	-13315.85497	22	0.108
+2120	-13315.85476	23	0.108
+2130	-13315.85461	23	0.108
+2140	-13315.85461	23	0.108
+2150	-13315.85461	23	0.108
+2160	-13315.85401	23	0.108
+2170	-13315.85401	23	0.108
+2180	-13315.85401	23	0.108
+2190	-13315.85401	23	0.108
+2200	-13315.85399	23	0.108
+2210	-13315.85399	24	0.108
+2220	-13315.85399	24	0.108
+2230	-13315.85399	24	0.108
+2240	-13315.85399	24	0.108
+2250	-13315.85399	24	0.108
+2260	-13315.85293	24	0.108
+2270	-13315.85293	24	0.108
+2280	-13315.85293	24	0.108
+2290	-13315.85293	24	0.108
+2300	-13315.85293	25	0.108
+2310	-13315.85293	25	0.108
+2320	-13315.85207	25	0.108
+2330	-13315.85207	25	0.108
+2340	-13315.85207	25	0.108
+2350	-13315.85207	25	0.108
+2360	-13315.85207	25	0.108
+2370	-13315.84607	25	0.108
+2380	-13315.84607	25	0.108
+2390	-13315.84607	25	0.108
+2400	-13315.84607	26	0.108
+2410	-13315.84607	26	0.108
+2420	-13315.84582	26	0.108
+2430	-13315.84582	26	0.108
+2440	-13315.84582	26	0.108
+2450	-13315.84582	26	0.108
+2460	-13315.84582	26	0.108
+2470	-13315.84582	26	0.108
+2480	-13315.84582	26	0.108
+2490	-13315.84582	27	0.108
+2500	-13315.84582	27	0.108
+2510	-13315.84582	27	0.108
+2520	-13315.84533	27	0.108
+2530	-13315.84533	27	0.108
+2540	-13315.84533	27	0.108
+2550	-13315.84533	27	0.108
+2560	-13315.84533	27	0.108
+2570	-13315.84533	27	0.108
+2580	-13315.84533	28	0.108
+2590	-13315.84533	28	0.108
+2600	-13315.84533	28	0.108
+2610	-13315.82789	28	0.01
+2620	-13315.82789	28	0.01
+2630	-13315.82789	28	0.01
+2640	-13315.82789	29	0.01
+2650	-13315.82789	29	0.01
+2660	-13315.82789	29	0.01
+2670	-13315.82789	29	0.01
+2680	-13315.82789	29	0.01
+2690	-13315.82789	29	0.01
+2700	-13315.82789	29	0.01
+2710	-13315.82789	29	0.01
+2720	-13315.82789	30	0.01
+2730	-13315.82789	30	0.01
+2740	-13315.82789	30	0.01
+2750	-13315.82789	30	0.01
+2760	-13315.82789	30	0.01
+2770	-13315.8275	30	0.01
+2780	-13315.8275	30	0.01
+2790	-13315.8275	30	0.01
+2800	-13315.8275	31	0.01
+2810	-13315.82638	31	0.01
+2820	-13315.82638	31	0.01
+2830	-13315.82638	31	0.01
+2840	-13315.82638	31	0.01
+2850	-13315.82638	31	0.01
+2860	-13315.82597	31	0.01
+2870	-13315.82565	31	0.01
+2880	-13315.82565	32	0.01
+2890	-13315.82565	32	0.01
+2900	-13315.82565	32	0.01
+2910	-13315.82435	32	0.01
+2920	-13315.82435	32	0.01
+2930	-13315.82435	32	0.01
+2940	-13315.82435	33	0.01
+2950	-13315.82435	33	0.01
+2960	-13315.82435	33	0.01
+2970	-13315.82435	33	0.01
+2980	-13315.82435	33	0.01
+2990	-13315.82435	33	0.01
+3000	-13315.8242	33	0.01
+3010	-13315.8242	33	0.01
+3020	-13315.8242	34	0.01
+3030	-13315.8242	34	0.01
+3040	-13315.8242	34	0.01
+3050	-13315.8242	34	0.01
+3060	-13315.82399	34	0.01
+3070	-13315.82399	34	0.01
+3080	-13315.82399	34	0.01
+3090	-13315.82399	34	0.01
+3100	-13315.82399	35	0.01
+3110	-13315.82399	35	0.01
+3120	-13315.82399	35	0.01
+3130	-13315.82399	35	0.01
+3140	-13315.82399	35	0.01
+3150	-13315.82399	35	0.01
+3160	-13315.82399	35	0.01
+3170	-13315.82399	36	0.01
+3180	-13315.82399	36	0.01
+3190	-13315.82367	36	0.01
+3200	-13315.82367	36	0.01
+3210	-13315.82367	36	0.01
+3220	-13315.81722	36	0.01
+3230	-13315.81722	36	0.01
+3240	-13315.81722	37	0.01
+3250	-13315.8169	37	0.01
+3260	-13315.81332	37	0.01
+3270	-13315.81332	37	0.01
+3280	-13315.81332	37	0.01
+3290	-13315.81301	37	0.01
+3300	-13315.81301	37	0.01
+3310	-13315.81301	38	0.01
+3320	-13315.81301	38	0.01
+3330	-13315.81301	38	0.01
+3340	-13315.81301	38	0.01
+3350	-13315.81301	38	0.01
+3360	-13315.81301	38	0.01
+3370	-13315.81301	38	0.01
+3380	-13315.81301	39	0.01
+3390	-13315.81301	39	0.01
+3400	-13315.81301	39	0.01
+3410	-13315.81194	39	0.01
+3420	-13315.81194	39	0.01
+3430	-13315.8102	39	0.01
+3440	-13315.8102	39	0.01
+3450	-13315.80929	39	0.01
+3460	-13315.80926	40	0.01
+3470	-13315.80926	40	0.01
+3480	-13315.80926	40	0.01
+3490	-13315.80926	40	0.01
+3500	-13315.80926	40	0.01
+3510	-13315.80883	40	0.01
+3520	-13315.80883	40	0.01
+3530	-13315.80883	40	0.01
+3540	-13315.80883	41	0.01
+3550	-13315.80883	41	0.01
+3560	-13315.80866	41	0.01
+3570	-13315.80866	41	0.01
+3580	-13315.80866	41	0.01
+3590	-13315.80866	41	0.01
+3600	-13315.80866	42	0.01
+3610	-13315.80866	42	0.01
+3620	-13315.80866	42	0.01
+3630	-13315.80856	42	0.01
+3640	-13315.80856	42	0.01
+3650	-13315.80856	42	0.01
+3660	-13315.80856	42	0.01
+3670	-13315.80856	43	0.01
+3680	-13315.80856	43	0.01
+3690	-13315.80856	43	0.01
+3700	-13315.80856	43	0.01
+3710	-13315.80777	43	0.01
+3720	-13315.80777	43	0.01
+3730	-13315.80777	43	0.01
+3740	-13315.80777	44	0.01
+3750	-13315.80777	44	0.01
+3760	-13315.80777	44	0.01
+3770	-13315.80777	44	0.01
+3780	-13315.80777	44	0.01
+3790	-13315.80777	44	0.01
+3800	-13315.80777	44	0.01
+3810	-13315.80777	44	0.01
+3820	-13315.80762	45	0.01
+3830	-13315.80762	45	0.01
+3840	-13315.80762	45	0.01
+3850	-13315.80762	45	0.01
+3860	-13315.80762	45	0.01
+3870	-13315.80762	45	0.01
+3880	-13315.80721	45	0.01
+3890	-13315.80721	46	0.01
+3900	-13315.80721	46	0.01
+3910	-13315.80721	46	0.01
+3920	-13315.80721	46	0.01
+3930	-13315.80721	46	0.01
+3940	-13315.80721	46	0.01
+3950	-13315.80721	46	0.01
+3960	-13315.80721	46	0.01
+3970	-13315.80721	47	0.01
+3980	-13315.80721	47	0.01
+3990	-13315.80721	47	0.01
+4000	-13315.80721	47	0.01
+4010	-13315.80721	47	0.01
+4020	-13315.80721	47	0.01
+4030	-13315.80334	47	0.01
+4040	-13315.80334	48	0.01
+4050	-13315.80334	48	0.01
+4060	-13315.8016	48	0.01
+4070	-13315.8016	48	0.01
+4080	-13315.8016	48	0.01
+4090	-13315.8016	48	0.01
+4100	-13315.8016	48	0.01
+4110	-13315.8016	48	0.01
+4120	-13315.8016	49	0.01
+4130	-13315.8016	49	0.01
+4140	-13315.80071	49	0.01
+4150	-13315.80071	49	0.01
+4160	-13315.80071	49	0.01
+4170	-13315.80071	49	0.01
+4180	-13315.80071	49	0.01
+4190	-13315.80071	50	0.01
+4200	-13315.80071	50	0.01
+4210	-13315.80071	50	0.01
+4220	-13315.79892	50	0.01
+4230	-13315.79892	50	0.01
+4240	-13315.79892	50	0.01
+4250	-13315.79806	50	0.01
+4260	-13315.79806	51	0.01
+4270	-13315.79784	51	0.01
+4280	-13315.79784	51	0.01
+4290	-13315.79784	51	0.01
+4300	-13315.79784	51	0.01
+4310	-13315.79784	51	0.01
+4320	-13315.79784	51	0.01
+4330	-13315.79784	52	0.01
+4340	-13315.79784	52	0.01
+4350	-13315.79784	52	0.01
+4360	-13315.79784	52	0.01
+4370	-13315.79749	52	0.01
+4380	-13315.79749	52	0.01
+4390	-13315.79733	52	0.01
+4400	-13315.79733	53	0.01
+4410	-13315.79733	53	0.01
+4420	-13315.79733	53	0.01
+4430	-13315.79733	53	0.01
+4440	-13315.79733	53	0.01
+4450	-13315.79733	53	0.01
+4460	-13315.79733	53	0.01
+4470	-13315.79715	54	0.01
+4480	-13315.79696	54	0.01
+4490	-13315.79696	54	0.01
+4500	-13315.79696	54	0.01
+4510	-13315.79667	54	0.01
+4520	-13315.79667	54	0.01
+4530	-13315.79667	54	0.01
+4540	-13315.79667	55	0.01
+4550	-13315.79667	55	0.01
+4560	-13315.79667	55	0.01
+4570	-13315.79667	55	0.01
+4580	-13315.79667	55	0.01
+4590	-13315.79667	55	0.01
+4600	-13315.79667	55	0.01
+4610	-13315.79667	56	0.01
+4620	-13315.79667	56	0.01
+4630	-13315.79667	56	0.01
+4640	-13315.79667	56	0.01
+4650	-13315.7957	56	0.01
+4660	-13315.7957	56	0.01
+4670	-13315.795	56	0.01
+4680	-13315.79486	57	0.01
+4690	-13315.79486	57	0.01
+4700	-13315.79486	57	0.01
+4710	-13315.79486	57	0.01
+4720	-13315.79486	57	0.01
+4730	-13315.79486	57	0.01
+4740	-13315.79486	57	0.01
+4750	-13315.79486	58	0.01
+4760	-13315.79486	58	0.01
+4770	-13315.79486	58	0.01
+4780	-13315.79486	58	0.01
+4790	-13315.79485	58	0.01
+4800	-13315.79485	58	0.01
+4810	-13315.79485	58	0.01
+4820	-13315.79485	59	0.01
+4830	-13315.79485	59	0.01
+4840	-13315.79485	59	0.01
+4850	-13315.79485	59	0.01
+4860	-13315.79485	59	0.01
+4870	-13315.79485	59	0.01
+4880	-13315.79485	59	0.01
+4890	-13315.79485	60	0.01
+4900	-13315.79485	60	0.01
+4910	-13315.79485	60	0.01
+4920	-13315.79485	60	0.01
+4930	-13315.79485	60	0.01
+4940	-13315.79485	60	0.01
+4950	-13315.79457	61	0.01
+4960	-13315.79455	61	0.01
+4970	-13315.79455	61	0.01
+4980	-13315.79186	61	0.01
+4990	-13315.79186	61	0.01
+5000	-13315.79186	61	0.01
+5010	-13315.79186	61	0.01
+5020	-13315.79186	62	0.01
+5030	-13315.79186	62	0.01
+5040	-13315.79186	62	0.01
+5050	-13315.79156	62	0.01
+5060	-13315.79109	62	0.01
+5070	-13315.79109	62	0.01
+5080	-13315.79109	62	0.01
+5090	-13315.79109	63	0.01
+5100	-13315.79109	63	0.01
+5110	-13315.79109	63	0.01
+5120	-13315.79109	63	0.01
+5130	-13315.79109	63	0.01
+5140	-13315.79109	63	0.01
+5150	-13315.79109	63	0.01
+5160	-13315.79109	63	0.01
+5170	-13315.79109	64	0.01
+5180	-13315.79109	64	0.01
+5190	-13315.79109	64	0.01
+5200	-13315.79109	64	0.01
+5210	-13315.79109	64	0.01
+5220	-13315.79109	64	0.01
+5230	-13315.79109	65	0.01
+5240	-13315.79109	65	0.01
+5250	-13315.79109	65	0.01
+5260	-13315.79109	65	0.01
+5270	-13315.79063	65	0.01
+5280	-13315.79063	65	0.01
+5290	-13315.79063	65	0.01
+5300	-13315.79063	66	0.01
+5310	-13315.79063	66	0.01
+5320	-13315.79063	66	0.01
+5330	-13315.79063	66	0.01
+5340	-13315.79063	66	0.01
+5350	-13315.79063	66	0.01
+5360	-13315.79063	66	0.01
+5370	-13315.79063	67	0.01
+5380	-13315.79063	67	0.01
+5390	-13315.79063	67	0.01
+5400	-13315.79063	67	0.01
+5410	-13315.79063	67	0.01
+5420	-13315.79063	67	0.01
+5430	-13315.79032	67	0.01
+5440	-13315.79032	67	0.01
+5450	-13315.79032	68	0.01
+5460	-13315.79032	68	0.01
+5470	-13315.79032	68	0.01
+5480	-13315.79032	68	0.01
+5490	-13315.79032	68	0.01
+5500	-13315.79032	68	0.01
+5510	-13315.79032	68	0.01
+5520	-13315.79032	69	0.01
+5530	-13315.79032	69	0.01
+5540	-13315.79032	69	0.01
+5550	-13315.79032	69	0.01
+5560	-13315.79032	69	0.01
+5570	-13315.79032	69	0.01
+5580	-13315.79032	69	0.01
+5590	-13315.79032	69	0.01
+5600	-13315.78988	70	0.01
+5610	-13315.78988	70	0.01
+5620	-13315.78988	70	0.01
+5630	-13315.78859	70	0.01
+5640	-13315.78833	70	0.01
+5650	-13315.78833	70	0.01
+5660	-13315.78833	70	0.01
+5670	-13315.78833	70	0.01
+5680	-13315.78833	71	0.01
+5690	-13315.78833	71	0.01
+5700	-13315.78833	71	0.01
+5710	-13315.78833	71	0.01
+5720	-13315.78833	71	0.01
+5730	-13315.78833	71	0.01
+5740	-13315.78833	71	0.01
+5750	-13315.78799	72	0.01
+5760	-13315.78799	72	0.01
+5770	-13315.78799	72	0.01
+5780	-13315.78799	72	0.01
+5790	-13315.78799	72	0.01
+5800	-13315.78799	72	0.01
+5810	-13315.78799	72	0.01
+5820	-13315.78799	73	0.01
+5830	-13315.78799	73	0.01
+5840	-13315.78799	73	0.01
+5850	-13315.78799	73	0.01
+5860	-13315.78799	73	0.01
+5870	-13315.78799	73	0.01
+5880	-13315.78799	73	0.01
+5890	-13315.78781	73	0.01
+5900	-13315.7876	74	0.01
+5910	-13315.7876	74	0.01
+5920	-13315.7876	74	0.01
+5930	-13315.7876	74	0.01
+5940	-13315.78729	74	0.01
+5950	-13315.78729	74	0.01
+5960	-13315.78729	74	0.01
+5970	-13315.78729	74	0.01
+5980	-13315.78729	75	0.01
+5990	-13315.78729	75	0.01
+6000	-13315.78729	75	0.01
+6010	-13315.78729	75	0.01
+6020	-13315.78729	75	0.01
+6030	-13315.78729	75	0.01
+6040	-13315.78729	75	0.01
+6050	-13315.78729	76	0.01
+6060	-13315.78729	76	0.01
+6070	-13315.78729	76	0.01
+6080	-13315.78729	76	0.01
+6090	-13315.78729	76	0.01
+6100	-13315.78729	76	0.01
+6110	-13315.78729	76	0.01
+6120	-13315.78729	77	0.01
+6130	-13315.78729	77	0.01
+6140	-13315.78729	77	0.01
+6150	-13315.78728	77	0.01
+6160	-13315.78728	77	0.01
+6170	-13315.78728	77	0.01
+6180	-13315.78728	77	0.01
+6190	-13315.78728	78	0.01
+6200	-13315.78699	78	0.01
+6210	-13315.78699	78	0.01
+6220	-13315.78699	78	0.01
+6230	-13315.78664	78	0.01
+6240	-13315.78664	78	0.01
+6250	-13315.78662	78	0.01
+6260	-13315.78662	78	0.01
+6270	-13315.78662	79	0.01
+6280	-13315.78662	79	0.01
+6290	-13315.78632	79	0.01
+6300	-13315.78632	79	0.01
+6310	-13315.78632	79	0.01
+6320	-13315.78632	79	0.01
+6330	-13315.78632	79	0.01
+6340	-13315.78632	80	0.01
+6350	-13315.78632	80	0.01
+6360	-13315.78632	80	0.01
+6370	-13315.78508	80	0.01
+6380	-13315.78508	80	0.01
+6390	-13315.78508	80	0.01
+6400	-13315.78508	80	0.01
+6410	-13315.7847	81	0.01
+6420	-13315.7847	81	0.01
+6430	-13315.7847	81	0.01
+6440	-13315.78462	81	0.01
+6450	-13315.78462	81	0.01
+6460	-13315.78462	81	0.01
+6470	-13315.78462	81	0.01
+6480	-13315.78462	82	0.01
+6490	-13315.78462	82	0.01
+6500	-13315.78462	82	0.01
+6510	-13315.78462	82	0.01
+6520	-13315.78462	82	0.01
+6530	-13315.78462	82	0.01
+6540	-13315.78462	82	0.01
+6550	-13315.78462	82	0.01
+6560	-13315.78462	83	0.01
+6570	-13315.78462	83	0.01
+6580	-13315.78462	83	0.01
+6590	-13315.78462	83	0.01
+6600	-13315.78462	83	0.01
+6610	-13315.78462	83	0.01
+6620	-13315.78462	83	0.01
+6630	-13315.78462	84	0.01
+6640	-13315.78462	84	0.01
+6650	-13315.78462	84	0.01
+6660	-13315.78462	84	0.01
+6670	-13315.78462	84	0.01
+6680	-13315.78462	84	0.01
+6690	-13315.78462	84	0.01
+6700	-13315.78462	85	0.01
+6710	-13315.78462	85	0.01
+6720	-13315.78462	85	0.01
+6730	-13315.78462	85	0.01
+6740	-13315.78462	85	0.01
+6750	-13315.78462	85	0.01
+6760	-13315.78462	85	0.01
+6770	-13315.78462	85	0.01
+6780	-13315.78462	86	0.01
+6790	-13315.78462	86	0.01
+6800	-13315.78462	86	0.01
+6810	-13315.78462	86	0.01
+6820	-13315.78444	86	0.01
+6830	-13315.78444	86	0.01
+6840	-13315.78444	86	0.01
+6850	-13315.78444	87	0.01
+6860	-13315.78443	87	0.01
+6870	-13315.78443	87	0.01
+6880	-13315.78443	87	0.01
+6890	-13315.78443	87	0.01
+6900	-13315.78443	87	0.01
+6910	-13315.78443	88	0.01
+6920	-13315.78443	88	0.01
+6930	-13315.78385	88	0.01
+6940	-13315.78385	88	0.01
+6950	-13315.78385	88	0.01
+6960	-13315.78385	88	0.01
+6970	-13315.78385	88	0.01
+6980	-13315.78385	89	0.01
+6990	-13315.78376	89	0.01
+7000	-13315.78376	89	0.01
+7010	-13315.78376	89	0.01
+7020	-13315.78376	89	0.01
+7030	-13315.78376	89	0.01
+7040	-13315.78376	89	0.01
+7050	-13315.78376	90	0.01
+7060	-13315.78376	90	0.01
+7070	-13315.78376	90	0.01
+7080	-13315.78376	90	0.01
+7090	-13315.78376	90	0.01
+7100	-13315.78374	90	0.01
+7110	-13315.78374	90	0.01
+7120	-13315.78374	91	0.01
+7130	-13315.78374	91	0.01
+7140	-13315.78374	91	0.01
+7150	-13315.78374	91	0.01
+7160	-13315.78374	91	0.01
+7170	-13315.78374	91	0.01
+7180	-13315.78374	91	0.01
+7190	-13315.78374	92	0.01
+7200	-13315.78374	92	0.01
+7210	-13315.78374	92	0.01
+7220	-13315.78374	92	0.01
+7230	-13315.78374	92	0.01
+7240	-13315.78374	92	0.01
+7250	-13315.78374	93	0.01
+7260	-13315.78374	93	0.01
+7270	-13315.78374	93	0.01
+7280	-13315.78374	93	0.01
+7290	-13315.78374	93	0.01
+7300	-13315.78374	93	0.01
+7310	-13315.78374	93	0.01
+7320	-13315.78374	93	0.01
+7330	-13315.78374	94	0.01
+7340	-13315.78374	94	0.01
+7350	-13315.78374	94	0.01
+7360	-13315.78374	94	0.01
+7370	-13315.78374	94	0.01
+7380	-13315.78374	94	0.01
+7390	-13315.78374	95	0.01
+7400	-13315.78374	95	0.01
+7410	-13315.78374	95	0.01
+7420	-13315.78374	95	0.01
+7430	-13315.78374	95	0.01
+7440	-13315.78374	95	0.01
+7450	-13315.78374	95	0.01
+7460	-13315.78374	96	0.01
+7470	-13315.78374	96	0.01
+7480	-13315.78374	96	0.01
+7490	-13315.78374	96	0.01
+7500	-13315.78374	96	0.01
+7510	-13315.78374	96	0.01
+7520	-13315.78374	96	0.01
+7530	-13315.78374	96	0.01
+7540	-13315.78374	97	0.01
+7550	-13315.78374	97	0.01
+7560	-13315.78374	97	0.01
+7570	-13315.78374	97	0.01
+7580	-13315.78374	97	0.01
+7590	-13315.78374	97	0.01
+7600	-13315.78374	97	0.01
+7610	-13315.78374	98	0.01
+7620	-13315.78374	98	0.01
+7630	-13315.78374	98	0.01
+7640	-13315.78374	98	0.01
+7650	-13315.78374	98	0.01
+7660	-13315.78329	98	0.01
+7670	-13315.78329	98	0.01
+7680	-13315.78329	98	0.01
+7690	-13315.78327	99	0.01
+7700	-13315.78327	99	0.01
+Score after final optimization: -13315.77213
+Final	-13315.77213	102	0.01
+Search rep 2 (of 5)
+random seed = 1163395386
+gen	best_like	time	optPrecision
+0	-13348.82185	103	0.5
+10	-13319.8483	103	0.5
+20	-13319.57921	104	0.5
+30	-13319.53859	104	0.5
+40	-13319.42017	104	0.5
+50	-13319.21279	104	0.5
+60	-13319.20966	104	0.5
+70	-13319.20966	104	0.5
+80	-13319.11572	104	0.5
+90	-13319.11198	104	0.5
+100	-13319.10226	104	0.5
+110	-13318.98462	104	0.5
+120	-13318.98462	105	0.5
+130	-13318.86383	105	0.5
+140	-13318.86383	105	0.5
+150	-13318.66867	105	0.5
+160	-13318.66867	105	0.5
+170	-13318.62358	105	0.5
+180	-13318.56492	105	0.5
+190	-13318.56143	105	0.5
+200	-13318.53644	105	0.5
+210	-13318.34236	105	0.5
+220	-13317.90712	106	0.5
+230	-13317.80359	106	0.5
+240	-13317.7967	106	0.5
+250	-13317.75861	106	0.5
+260	-13317.75861	106	0.5
+270	-13317.75861	106	0.5
+280	-13317.67583	106	0.5
+290	-13317.61521	106	0.5
+300	-13317.61521	106	0.5
+310	-13317.61521	106	0.5
+320	-13317.60652	107	0.5
+330	-13317.60589	107	0.5
+340	-13317.60425	107	0.5
+350	-13317.5982	107	0.5
+360	-13317.58768	107	0.5
+370	-13317.58768	107	0.5
+380	-13317.58768	107	0.5
+390	-13317.58768	107	0.5
+400	-13317.57903	107	0.5
+410	-13317.57853	108	0.5
+420	-13317.52186	108	0.5
+430	-13317.52186	108	0.5
+440	-13317.49657	108	0.5
+450	-13317.49657	108	0.5
+460	-13317.46735	108	0.5
+470	-13317.46537	108	0.5
+480	-13317.41746	108	0.5
+490	-13317.41746	108	0.5
+500	-13317.41746	109	0.5
+510	-13317.41746	109	0.5
+520	-13317.41746	109	0.5
+530	-13317.41565	109	0.5
+540	-13317.4126	109	0.5
+550	-13317.39076	109	0.5
+560	-13317.39076	109	0.5
+570	-13317.39076	109	0.5
+580	-13317.38936	109	0.5
+590	-13317.38936	109	0.5
+600	-13317.38936	110	0.5
+610	-13316.73215	110	0.402
+620	-13316.72441	110	0.402
+630	-13316.72153	110	0.402
+640	-13316.68597	110	0.402
+650	-13316.64244	110	0.402
+660	-13316.64149	110	0.402
+670	-13316.64149	110	0.402
+680	-13316.61078	110	0.402
+690	-13316.53917	110	0.402
+700	-13316.53917	111	0.402
+710	-13316.53702	111	0.402
+720	-13316.52312	111	0.402
+730	-13316.5209	111	0.402
+740	-13316.5209	111	0.402
+750	-13316.5209	111	0.402
+760	-13316.49329	111	0.402
+770	-13316.47786	111	0.402
+780	-13316.38914	111	0.402
+790	-13316.38914	111	0.402
+800	-13316.38914	111	0.402
+810	-13316.36233	111	0.402
+820	-13316.35892	112	0.402
+830	-13316.35652	112	0.402
+840	-13316.35652	112	0.402
+850	-13316.35554	112	0.402
+860	-13316.33649	112	0.402
+870	-13316.33649	112	0.402
+880	-13316.33518	112	0.402
+890	-13316.33144	112	0.402
+900	-13316.31814	112	0.402
+910	-13316.30738	112	0.402
+920	-13316.30706	112	0.402
+930	-13316.30706	112	0.402
+940	-13316.29971	113	0.402
+950	-13316.23186	113	0.402
+960	-13316.23186	113	0.402
+970	-13316.22679	113	0.402
+980	-13316.22679	113	0.402
+990	-13316.18818	113	0.402
+1000	-13316.18412	113	0.402
+1010	-13316.1831	113	0.402
+1020	-13316.17432	113	0.402
+1030	-13316.17432	113	0.402
+1040	-13316.17276	113	0.402
+1050	-13316.17115	114	0.402
+1060	-13316.17061	114	0.402
+1070	-13316.16313	114	0.402
+1080	-13316.16313	114	0.402
+1090	-13316.16313	114	0.402
+1100	-13316.10418	114	0.402
+1110	-13316.08857	114	0.304
+1120	-13316.08857	114	0.304
+1130	-13316.08857	114	0.304
+1140	-13316.08857	114	0.304
+1150	-13316.08857	115	0.304
+1160	-13316.08855	115	0.304
+1170	-13316.08855	115	0.304
+1180	-13316.08855	115	0.304
+1190	-13316.08855	115	0.304
+1200	-13316.08855	115	0.304
+1210	-13316.08855	115	0.304
+1220	-13316.08855	115	0.304
+1230	-13316.08855	115	0.304
+1240	-13316.08629	115	0.304
+1250	-13316.08315	115	0.304
+1260	-13316.08315	116	0.304
+1270	-13316.08315	116	0.304
+1280	-13316.08315	116	0.304
+1290	-13316.06789	116	0.304
+1300	-13316.06637	116	0.304
+1310	-13316.06637	116	0.304
+1320	-13316.06637	116	0.304
+1330	-13316.06637	116	0.304
+1340	-13316.05161	116	0.304
+1350	-13316.05161	117	0.304
+1360	-13316.05161	117	0.304
+1370	-13316.05137	117	0.304
+1380	-13316.05137	117	0.304
+1390	-13316.04832	117	0.304
+1400	-13316.04807	117	0.304
+1410	-13316.04807	117	0.304
+1420	-13316.04807	117	0.304
+1430	-13316.04722	117	0.304
+1440	-13316.04722	117	0.304
+1450	-13316.03089	118	0.304
+1460	-13316.02977	118	0.304
+1470	-13316.02847	118	0.304
+1480	-13316.02847	118	0.304
+1490	-13316.02847	118	0.304
+1500	-13316.02847	118	0.304
+1510	-13315.97306	118	0.304
+1520	-13315.97306	118	0.304
+1530	-13315.97306	118	0.304
+1540	-13315.97306	118	0.304
+1550	-13315.95239	119	0.304
+1560	-13315.95239	119	0.304
+1570	-13315.95239	119	0.304
+1580	-13315.95239	119	0.304
+1590	-13315.95239	119	0.304
+1600	-13315.95239	119	0.304
+1610	-13315.94794	119	0.206
+1620	-13315.94794	119	0.206
+1630	-13315.94794	120	0.206
+1640	-13315.94794	120	0.206
+1650	-13315.94794	120	0.206
+1660	-13315.94794	120	0.206
+1670	-13315.94794	120	0.206
+1680	-13315.94794	120	0.206
+1690	-13315.94794	120	0.206
+1700	-13315.94794	120	0.206
+1710	-13315.93159	120	0.206
+1720	-13315.93159	121	0.206
+1730	-13315.93159	121	0.206
+1740	-13315.93159	121	0.206
+1750	-13315.92881	121	0.206
+1760	-13315.92881	121	0.206
+1770	-13315.92881	121	0.206
+1780	-13315.92837	121	0.206
+1790	-13315.92837	121	0.206
+1800	-13315.92837	121	0.206
+1810	-13315.87529	121	0.206
+1820	-13315.87511	122	0.206
+1830	-13315.87511	122	0.206
+1840	-13315.87322	122	0.206
+1850	-13315.87322	122	0.206
+1860	-13315.8732	122	0.206
+1870	-13315.8732	122	0.206
+1880	-13315.8732	122	0.206
+1890	-13315.8732	122	0.206
+1900	-13315.8732	122	0.206
+1910	-13315.8732	123	0.206
+1920	-13315.8732	123	0.206
+1930	-13315.8732	123	0.206
+1940	-13315.85154	123	0.206
+1950	-13315.85154	123	0.206
+1960	-13315.85154	123	0.206
+1970	-13315.85154	123	0.206
+1980	-13315.85154	123	0.206
+1990	-13315.85154	123	0.206
+2000	-13315.85154	123	0.206
+2010	-13315.85154	124	0.206
+2020	-13315.85154	124	0.206
+2030	-13315.85154	124	0.206
+2040	-13315.85154	124	0.206
+2050	-13315.84851	124	0.206
+2060	-13315.84849	124	0.206
+2070	-13315.84849	124	0.206
+2080	-13315.84849	124	0.206
+2090	-13315.84769	124	0.206
+2100	-13315.84769	124	0.206
+2110	-13315.84606	125	0.108
+2120	-13315.84606	125	0.108
+2130	-13315.84606	125	0.108
+2140	-13315.84606	125	0.108
+2150	-13315.84606	125	0.108
+2160	-13315.84606	125	0.108
+2170	-13315.84606	125	0.108
+2180	-13315.84606	125	0.108
+2190	-13315.84606	126	0.108
+2200	-13315.84606	126	0.108
+2210	-13315.84606	126	0.108
+2220	-13315.83754	126	0.108
+2230	-13315.82652	126	0.108
+2240	-13315.82652	126	0.108
+2250	-13315.82652	126	0.108
+2260	-13315.82652	126	0.108
+2270	-13315.82652	126	0.108
+2280	-13315.82652	127	0.108
+2290	-13315.82652	127	0.108
+2300	-13315.82652	127	0.108
+2310	-13315.82652	127	0.108
+2320	-13315.82652	127	0.108
+2330	-13315.82652	127	0.108
+2340	-13315.82652	127	0.108
+2350	-13315.82652	127	0.108
+2360	-13315.82652	127	0.108
+2370	-13315.82652	128	0.108
+2380	-13315.8263	128	0.108
+2390	-13315.8263	128	0.108
+2400	-13315.81178	128	0.108
+2410	-13315.81178	128	0.108
+2420	-13315.81178	128	0.108
+2430	-13315.81141	128	0.108
+2440	-13315.81141	128	0.108
+2450	-13315.81141	128	0.108
+2460	-13315.81141	129	0.108
+2470	-13315.81073	129	0.108
+2480	-13315.81073	129	0.108
+2490	-13315.81073	129	0.108
+2500	-13315.81073	129	0.108
+2510	-13315.81073	129	0.108
+2520	-13315.80987	129	0.108
+2530	-13315.80987	129	0.108
+2540	-13315.80987	129	0.108
+2550	-13315.80987	130	0.108
+2560	-13315.80987	130	0.108
+2570	-13315.80987	130	0.108
+2580	-13315.80698	130	0.108
+2590	-13315.80698	130	0.108
+2600	-13315.80433	130	0.108
+2610	-13315.80366	130	0.01
+2620	-13315.80134	131	0.01
+2630	-13315.80134	131	0.01
+2640	-13315.80134	131	0.01
+2650	-13315.80134	131	0.01
+2660	-13315.80134	131	0.01
+2670	-13315.80134	131	0.01
+2680	-13315.80129	131	0.01
+2690	-13315.80129	131	0.01
+2700	-13315.80129	132	0.01
+2710	-13315.80129	132	0.01
+2720	-13315.80129	132	0.01
+2730	-13315.80129	132	0.01
+2740	-13315.80129	132	0.01
+2750	-13315.80129	132	0.01
+2760	-13315.80129	132	0.01
+2770	-13315.80129	132	0.01
+2780	-13315.79999	133	0.01
+2790	-13315.79999	133	0.01
+2800	-13315.79999	133	0.01
+2810	-13315.79999	133	0.01
+2820	-13315.79999	133	0.01
+2830	-13315.79999	133	0.01
+2840	-13315.79999	133	0.01
+2850	-13315.79999	134	0.01
+2860	-13315.79999	134	0.01
+2870	-13315.79999	134	0.01
+2880	-13315.79999	134	0.01
+2890	-13315.79999	134	0.01
+2900	-13315.79978	134	0.01
+2910	-13315.79978	134	0.01
+2920	-13315.79978	134	0.01
+2930	-13315.79978	135	0.01
+2940	-13315.79978	135	0.01
+2950	-13315.79978	135	0.01
+2960	-13315.79978	135	0.01
+2970	-13315.79978	135	0.01
+2980	-13315.79978	135	0.01
+2990	-13315.79978	135	0.01
+3000	-13315.79945	135	0.01
+3010	-13315.79945	136	0.01
+3020	-13315.79945	136	0.01
+3030	-13315.79945	136	0.01
+3040	-13315.79945	136	0.01
+3050	-13315.79945	136	0.01
+3060	-13315.79945	136	0.01
+3070	-13315.79945	136	0.01
+3080	-13315.79945	136	0.01
+3090	-13315.79945	137	0.01
+3100	-13315.79945	137	0.01
+3110	-13315.79945	137	0.01
+3120	-13315.79945	137	0.01
+3130	-13315.79945	137	0.01
+3140	-13315.79942	137	0.01
+3150	-13315.79942	138	0.01
+3160	-13315.79942	138	0.01
+3170	-13315.79931	138	0.01
+3180	-13315.79931	138	0.01
+3190	-13315.79931	138	0.01
+3200	-13315.79931	138	0.01
+3210	-13315.79751	138	0.01
+3220	-13315.79751	138	0.01
+3230	-13315.79751	139	0.01
+3240	-13315.79751	139	0.01
+3250	-13315.79751	139	0.01
+3260	-13315.79751	139	0.01
+3270	-13315.79751	139	0.01
+3280	-13315.79751	139	0.01
+3290	-13315.79751	139	0.01
+3300	-13315.79751	140	0.01
+3310	-13315.79751	140	0.01
+3320	-13315.79751	140	0.01
+3330	-13315.79751	140	0.01
+3340	-13315.79751	140	0.01
+3350	-13315.79751	140	0.01
+3360	-13315.79745	140	0.01
+3370	-13315.79745	141	0.01
+3380	-13315.79745	141	0.01
+3390	-13315.79745	141	0.01
+3400	-13315.79745	141	0.01
+3410	-13315.79745	141	0.01
+3420	-13315.79745	141	0.01
+3430	-13315.79745	141	0.01
+3440	-13315.79745	142	0.01
+3450	-13315.79745	142	0.01
+3460	-13315.79745	142	0.01
+3470	-13315.79745	142	0.01
+3480	-13315.79732	142	0.01
+3490	-13315.79732	142	0.01
+3500	-13315.79732	142	0.01
+3510	-13315.79732	143	0.01
+3520	-13315.79732	143	0.01
+3530	-13315.79732	143	0.01
+3540	-13315.79732	143	0.01
+3550	-13315.79732	143	0.01
+3560	-13315.79732	143	0.01
+3570	-13315.79732	143	0.01
+3580	-13315.79732	143	0.01
+3590	-13315.79732	144	0.01
+3600	-13315.79732	144	0.01
+3610	-13315.79732	144	0.01
+3620	-13315.79732	144	0.01
+3630	-13315.79732	144	0.01
+3640	-13315.79732	144	0.01
+3650	-13315.79732	144	0.01
+3660	-13315.79732	145	0.01
+3670	-13315.79732	145	0.01
+3680	-13315.79732	145	0.01
+3690	-13315.79724	145	0.01
+3700	-13315.79724	145	0.01
+3710	-13315.79723	145	0.01
+3720	-13315.79723	145	0.01
+3730	-13315.79723	146	0.01
+3740	-13315.79723	146	0.01
+3750	-13315.79723	146	0.01
+3760	-13315.79723	146	0.01
+3770	-13315.79723	146	0.01
+3780	-13315.79723	146	0.01
+3790	-13315.79723	146	0.01
+3800	-13315.79723	147	0.01
+3810	-13315.79723	147	0.01
+3820	-13315.79723	147	0.01
+3830	-13315.79723	147	0.01
+3840	-13315.79723	147	0.01
+3850	-13315.79723	147	0.01
+3860	-13315.79723	147	0.01
+3870	-13315.79723	148	0.01
+3880	-13315.79723	148	0.01
+3890	-13315.79723	148	0.01
+3900	-13315.79723	148	0.01
+3910	-13315.79723	148	0.01
+3920	-13315.79722	148	0.01
+3930	-13315.79722	148	0.01
+3940	-13315.79057	149	0.01
+3950	-13315.79057	149	0.01
+3960	-13315.79057	149	0.01
+3970	-13315.79057	149	0.01
+3980	-13315.79057	149	0.01
+3990	-13315.79057	149	0.01
+4000	-13315.79057	149	0.01
+4010	-13315.79057	149	0.01
+4020	-13315.79057	150	0.01
+4030	-13315.79057	150	0.01
+4040	-13315.79055	150	0.01
+4050	-13315.79055	150	0.01
+4060	-13315.79055	150	0.01
+4070	-13315.79055	150	0.01
+4080	-13315.79054	150	0.01
+4090	-13315.79054	151	0.01
+4100	-13315.79054	151	0.01
+4110	-13315.79054	151	0.01
+4120	-13315.79054	151	0.01
+4130	-13315.79054	151	0.01
+4140	-13315.79054	151	0.01
+4150	-13315.79054	151	0.01
+4160	-13315.79032	152	0.01
+4170	-13315.79032	152	0.01
+4180	-13315.79032	152	0.01
+4190	-13315.79032	152	0.01
+4200	-13315.79032	152	0.01
+4210	-13315.79032	152	0.01
+4220	-13315.79032	152	0.01
+4230	-13315.79014	152	0.01
+4240	-13315.79014	153	0.01
+4250	-13315.79014	153	0.01
+4260	-13315.79014	153	0.01
+4270	-13315.79014	153	0.01
+4280	-13315.79014	153	0.01
+4290	-13315.79014	153	0.01
+4300	-13315.79014	154	0.01
+4310	-13315.79014	154	0.01
+4320	-13315.79014	154	0.01
+4330	-13315.79014	154	0.01
+4340	-13315.79014	154	0.01
+4350	-13315.79014	154	0.01
+4360	-13315.79014	154	0.01
+4370	-13315.79014	155	0.01
+4380	-13315.79014	155	0.01
+4390	-13315.79014	155	0.01
+4400	-13315.79014	155	0.01
+4410	-13315.79014	155	0.01
+4420	-13315.79014	155	0.01
+4430	-13315.79014	155	0.01
+4440	-13315.79014	156	0.01
+4450	-13315.79014	156	0.01
+4460	-13315.79014	156	0.01
+4470	-13315.79014	156	0.01
+4480	-13315.79014	156	0.01
+4490	-13315.79014	156	0.01
+4500	-13315.79014	156	0.01
+4510	-13315.79014	157	0.01
+4520	-13315.79014	157	0.01
+4530	-13315.79014	157	0.01
+4540	-13315.79014	157	0.01
+4550	-13315.79014	157	0.01
+4560	-13315.79014	157	0.01
+4570	-13315.79014	157	0.01
+4580	-13315.79014	158	0.01
+4590	-13315.79014	158	0.01
+4600	-13315.79014	158	0.01
+4610	-13315.79014	158	0.01
+4620	-13315.79014	158	0.01
+4630	-13315.79014	158	0.01
+4640	-13315.79007	158	0.01
+4650	-13315.79007	159	0.01
+4660	-13315.79007	159	0.01
+4670	-13315.79007	159	0.01
+4680	-13315.79007	159	0.01
+4690	-13315.79007	159	0.01
+4700	-13315.79007	159	0.01
+4710	-13315.79007	159	0.01
+4720	-13315.79007	160	0.01
+4730	-13315.79007	160	0.01
+4740	-13315.79007	160	0.01
+4750	-13315.79007	160	0.01
+4760	-13315.79007	160	0.01
+4770	-13315.79007	160	0.01
+4780	-13315.79007	160	0.01
+4790	-13315.79007	160	0.01
+4800	-13315.79007	161	0.01
+4810	-13315.79007	161	0.01
+4820	-13315.79	161	0.01
+4830	-13315.79	161	0.01
+4840	-13315.79	161	0.01
+4850	-13315.79	161	0.01
+4860	-13315.79	162	0.01
+4870	-13315.79	162	0.01
+4880	-13315.79	162	0.01
+4890	-13315.79	162	0.01
+4900	-13315.79	162	0.01
+4910	-13315.79	162	0.01
+4920	-13315.79	162	0.01
+4930	-13315.79	162	0.01
+4940	-13315.79	163	0.01
+4950	-13315.79	163	0.01
+4960	-13315.79	163	0.01
+4970	-13315.79	163	0.01
+4980	-13315.79	163	0.01
+4990	-13315.79	163	0.01
+5000	-13315.79	163	0.01
+5010	-13315.79	164	0.01
+5020	-13315.79	164	0.01
+5030	-13315.7899	164	0.01
+5040	-13315.7899	164	0.01
+5050	-13315.7899	164	0.01
+5060	-13315.7899	164	0.01
+5070	-13315.7899	164	0.01
+5080	-13315.7899	165	0.01
+5090	-13315.7899	165	0.01
+5100	-13315.7899	165	0.01
+5110	-13315.7899	165	0.01
+5120	-13315.7899	165	0.01
+5130	-13315.7899	165	0.01
+5140	-13315.7899	165	0.01
+5150	-13315.7899	166	0.01
+5160	-13315.7899	166	0.01
+5170	-13315.7899	166	0.01
+5180	-13315.7899	166	0.01
+5190	-13315.7899	166	0.01
+5200	-13315.7899	166	0.01
+5210	-13315.7899	166	0.01
+5220	-13315.7899	167	0.01
+5230	-13315.7899	167	0.01
+5240	-13315.7899	167	0.01
+5250	-13315.7899	167	0.01
+5260	-13315.7899	167	0.01
+5270	-13315.7899	167	0.01
+5280	-13315.7899	167	0.01
+5290	-13315.7899	167	0.01
+5300	-13315.7899	168	0.01
+5310	-13315.7899	168	0.01
+5320	-13315.7899	168	0.01
+5330	-13315.7899	168	0.01
+5340	-13315.7899	168	0.01
+5350	-13315.7899	168	0.01
+5360	-13315.7899	168	0.01
+5370	-13315.7899	169	0.01
+5380	-13315.7899	169	0.01
+5390	-13315.7899	169	0.01
+5400	-13315.7899	169	0.01
+5410	-13315.7899	169	0.01
+5420	-13315.7899	169	0.01
+5430	-13315.7899	169	0.01
+5440	-13315.7899	169	0.01
+5450	-13315.7899	170	0.01
+5460	-13315.7899	170	0.01
+5470	-13315.7899	170	0.01
+5480	-13315.7899	170	0.01
+5490	-13315.7899	170	0.01
+5500	-13315.7899	170	0.01
+5510	-13315.7899	170	0.01
+5520	-13315.7899	171	0.01
+5530	-13315.7899	171	0.01
+5540	-13315.7899	171	0.01
+5550	-13315.7899	171	0.01
+5560	-13315.7899	171	0.01
+5570	-13315.7899	171	0.01
+5580	-13315.7899	171	0.01
+5590	-13315.7899	172	0.01
+5600	-13315.7899	172	0.01
+5610	-13315.7899	172	0.01
+5620	-13315.7899	172	0.01
+5630	-13315.7899	172	0.01
+5640	-13315.7899	172	0.01
+5650	-13315.7899	173	0.01
+5660	-13315.7899	173	0.01
+5670	-13315.7899	173	0.01
+5680	-13315.7899	173	0.01
+5690	-13315.7899	173	0.01
+5700	-13315.7899	173	0.01
+5710	-13315.7899	173	0.01
+5720	-13315.78888	173	0.01
+5730	-13315.78888	174	0.01
+5740	-13315.78888	174	0.01
+5750	-13315.78888	174	0.01
+5760	-13315.78888	174	0.01
+5770	-13315.78888	174	0.01
+5780	-13315.78888	174	0.01
+5790	-13315.78886	174	0.01
+5800	-13315.78886	175	0.01
+5810	-13315.78885	175	0.01
+5820	-13315.78885	175	0.01
+5830	-13315.78885	175	0.01
+5840	-13315.78885	175	0.01
+5850	-13315.78885	175	0.01
+5860	-13315.78885	176	0.01
+5870	-13315.78885	176	0.01
+5880	-13315.78885	176	0.01
+5890	-13315.78885	176	0.01
+5900	-13315.78885	176	0.01
+5910	-13315.78885	176	0.01
+5920	-13315.78885	176	0.01
+5930	-13315.78885	177	0.01
+5940	-13315.78885	177	0.01
+5950	-13315.78885	177	0.01
+5960	-13315.78885	177	0.01
+5970	-13315.78885	177	0.01
+5980	-13315.78885	177	0.01
+5990	-13315.78885	177	0.01
+6000	-13315.78885	178	0.01
+6010	-13315.78885	178	0.01
+6020	-13315.78885	178	0.01
+6030	-13315.78885	178	0.01
+6040	-13315.78885	178	0.01
+6050	-13315.78885	178	0.01
+6060	-13315.78885	178	0.01
+6070	-13315.78885	179	0.01
+6080	-13315.78885	179	0.01
+6090	-13315.78885	179	0.01
+6100	-13315.78885	179	0.01
+6110	-13315.78885	179	0.01
+6120	-13315.78885	179	0.01
+6130	-13315.78885	179	0.01
+6140	-13315.78885	180	0.01
+6150	-13315.78885	180	0.01
+6160	-13315.78885	180	0.01
+6170	-13315.78885	180	0.01
+6180	-13315.78885	180	0.01
+6190	-13315.78885	180	0.01
+6200	-13315.78885	181	0.01
+6210	-13315.78839	181	0.01
+6220	-13315.78839	181	0.01
+6230	-13315.78839	181	0.01
+6240	-13315.78839	181	0.01
+6250	-13315.78839	181	0.01
+6260	-13315.78839	181	0.01
+6270	-13315.78839	182	0.01
+6280	-13315.78839	182	0.01
+6290	-13315.78839	182	0.01
+6300	-13315.78839	182	0.01
+6310	-13315.78839	182	0.01
+6320	-13315.78839	182	0.01
+6330	-13315.78839	182	0.01
+6340	-13315.78839	183	0.01
+6350	-13315.78839	183	0.01
+6360	-13315.78839	183	0.01
+6370	-13315.78839	183	0.01
+6380	-13315.78839	183	0.01
+6390	-13315.78839	183	0.01
+6400	-13315.78839	183	0.01
+6410	-13315.78839	184	0.01
+6420	-13315.78839	184	0.01
+6430	-13315.78839	184	0.01
+6440	-13315.78839	184	0.01
+6450	-13315.78839	184	0.01
+6460	-13315.78839	184	0.01
+6470	-13315.78839	184	0.01
+6480	-13315.78839	185	0.01
+6490	-13315.78839	185	0.01
+6500	-13315.78839	185	0.01
+6510	-13315.78839	185	0.01
+6520	-13315.78839	185	0.01
+6530	-13315.78839	185	0.01
+6540	-13315.78839	185	0.01
+6550	-13315.78839	186	0.01
+6560	-13315.78839	186	0.01
+6570	-13315.78839	186	0.01
+6580	-13315.78839	186	0.01
+6590	-13315.78729	186	0.01
+6600	-13315.78729	186	0.01
+6610	-13315.78729	186	0.01
+6620	-13315.78729	187	0.01
+6630	-13315.78729	187	0.01
+6640	-13315.78729	187	0.01
+6650	-13315.78729	187	0.01
+6660	-13315.78729	187	0.01
+6670	-13315.78729	187	0.01
+6680	-13315.78729	187	0.01
+6690	-13315.78729	188	0.01
+6700	-13315.78729	188	0.01
+6710	-13315.78729	188	0.01
+6720	-13315.78729	188	0.01
+6730	-13315.78729	188	0.01
+6740	-13315.78729	188	0.01
+6750	-13315.78729	188	0.01
+6760	-13315.78729	189	0.01
+6770	-13315.78729	189	0.01
+6780	-13315.78729	189	0.01
+6790	-13315.78729	189	0.01
+6800	-13315.78729	189	0.01
+6810	-13315.78729	189	0.01
+6820	-13315.78729	189	0.01
+6830	-13315.78729	190	0.01
+6840	-13315.78702	190	0.01
+6850	-13315.78702	190	0.01
+6860	-13315.78702	190	0.01
+6870	-13315.78702	190	0.01
+6880	-13315.78702	190	0.01
+6890	-13315.78702	190	0.01
+6900	-13315.787	191	0.01
+6910	-13315.787	191	0.01
+6920	-13315.787	191	0.01
+6930	-13315.787	191	0.01
+6940	-13315.787	191	0.01
+6950	-13315.787	191	0.01
+6960	-13315.787	191	0.01
+6970	-13315.787	191	0.01
+6980	-13315.787	192	0.01
+6990	-13315.787	192	0.01
+7000	-13315.787	192	0.01
+7010	-13315.787	192	0.01
+7020	-13315.787	192	0.01
+7030	-13315.787	192	0.01
+7040	-13315.787	193	0.01
+7050	-13315.787	193	0.01
+7060	-13315.787	193	0.01
+7070	-13315.787	193	0.01
+7080	-13315.787	193	0.01
+7090	-13315.787	193	0.01
+7100	-13315.787	194	0.01
+7110	-13315.787	194	0.01
+7120	-13315.78693	194	0.01
+7130	-13315.78693	194	0.01
+7140	-13315.78693	194	0.01
+7150	-13315.78693	194	0.01
+7160	-13315.78693	194	0.01
+7170	-13315.78693	194	0.01
+7180	-13315.78693	195	0.01
+7190	-13315.78693	195	0.01
+7200	-13315.78693	195	0.01
+7210	-13315.78693	195	0.01
+7220	-13315.78665	195	0.01
+7230	-13315.78665	195	0.01
+7240	-13315.78665	195	0.01
+7250	-13315.78665	196	0.01
+7260	-13315.78665	196	0.01
+7270	-13315.78665	196	0.01
+7280	-13315.78665	196	0.01
+7290	-13315.78665	196	0.01
+7300	-13315.78665	196	0.01
+7310	-13315.78665	196	0.01
+7320	-13315.78665	197	0.01
+7330	-13315.78665	197	0.01
+7340	-13315.7836	197	0.01
+7350	-13315.7836	197	0.01
+7360	-13315.7836	197	0.01
+7370	-13315.7836	197	0.01
+7380	-13315.7836	197	0.01
+7390	-13315.7836	198	0.01
+7400	-13315.7836	198	0.01
+7410	-13315.7836	198	0.01
+7420	-13315.7836	198	0.01
+7430	-13315.7836	198	0.01
+7440	-13315.78359	198	0.01
+7450	-13315.78359	198	0.01
+7460	-13315.78359	199	0.01
+7470	-13315.78359	199	0.01
+7480	-13315.78359	199	0.01
+7490	-13315.78359	199	0.01
+7500	-13315.78359	199	0.01
+7510	-13315.78359	199	0.01
+7520	-13315.78359	200	0.01
+7530	-13315.78359	200	0.01
+7540	-13315.78359	200	0.01
+7550	-13315.78359	200	0.01
+7560	-13315.78359	200	0.01
+7570	-13315.78359	200	0.01
+7580	-13315.78359	200	0.01
+7590	-13315.78359	200	0.01
+7600	-13315.78359	201	0.01
+7610	-13315.78359	201	0.01
+7620	-13315.78359	201	0.01
+7630	-13315.78359	201	0.01
+7640	-13315.78359	201	0.01
+7650	-13315.78359	201	0.01
+7660	-13315.78359	202	0.01
+7670	-13315.78359	202	0.01
+7680	-13315.78359	202	0.01
+7690	-13315.78359	202	0.01
+7700	-13315.78359	202	0.01
+7710	-13315.78359	202	0.01
+7720	-13315.78359	203	0.01
+7730	-13315.78359	203	0.01
+7740	-13315.78359	203	0.01
+7750	-13315.78359	203	0.01
+7760	-13315.78359	203	0.01
+7770	-13315.78359	203	0.01
+7780	-13315.78359	203	0.01
+7790	-13315.78359	203	0.01
+7800	-13315.78359	204	0.01
+7810	-13315.78359	204	0.01
+7820	-13315.78359	204	0.01
+7830	-13315.78359	204	0.01
+7840	-13315.78359	204	0.01
+7850	-13315.78359	204	0.01
+7860	-13315.78359	204	0.01
+7870	-13315.78359	204	0.01
+7880	-13315.78359	205	0.01
+7890	-13315.78359	205	0.01
+7900	-13315.78359	205	0.01
+Score after final optimization: -13315.7723
+Final	-13315.7723	207	0.01
+Search rep 3 (of 5)
+random seed = 1320446270
+gen	best_like	time	optPrecision
+0	-13320.76166	208	0.5
+10	-13320.56725	209	0.5
+20	-13320.35101	209	0.5
+30	-13320.10911	209	0.5
+40	-13319.65416	209	0.5
+50	-13319.53784	209	0.5
+60	-13319.44464	209	0.5
+70	-13319.26453	209	0.5
+80	-13319.2113	209	0.5
+90	-13318.94718	209	0.5
+100	-13318.90046	209	0.5
+110	-13318.90046	210	0.5
+120	-13318.88804	210	0.5
+130	-13318.82832	210	0.5
+140	-13318.79406	210	0.5
+150	-13318.79059	210	0.5
+160	-13318.56543	210	0.5
+170	-13318.55598	210	0.5
+180	-13318.28694	210	0.5
+190	-13318.2657	210	0.5
+200	-13318.22546	210	0.5
+210	-13318.22546	211	0.5
+220	-13318.22546	211	0.5
+230	-13318.22514	211	0.5
+240	-13318.14759	211	0.5
+250	-13318.08656	211	0.5
+260	-13318.05186	211	0.5
+270	-13318.05186	211	0.5
+280	-13318.04652	211	0.5
+290	-13318.01808	211	0.5
+300	-13318.01808	211	0.5
+310	-13317.82127	211	0.5
+320	-13317.82127	212	0.5
+330	-13317.65959	212	0.5
+340	-13317.65847	212	0.5
+350	-13317.52506	212	0.5
+360	-13317.46046	212	0.5
+370	-13317.46016	212	0.5
+380	-13317.4182	212	0.5
+390	-13317.38069	212	0.5
+400	-13317.3604	212	0.5
+410	-13317.32338	212	0.5
+420	-13317.28348	212	0.5
+430	-13317.28047	212	0.5
+440	-13317.28047	212	0.5
+450	-13317.2202	212	0.5
+460	-13317.2202	212	0.5
+470	-13317.19565	213	0.5
+480	-13317.18121	213	0.5
+490	-13317.07817	213	0.5
+500	-13316.94075	213	0.5
+510	-13316.86696	213	0.402
+520	-13316.7731	213	0.402
+530	-13316.7731	213	0.402
+540	-13316.71734	213	0.402
+550	-13316.71063	213	0.402
+560	-13316.71063	213	0.402
+570	-13316.71063	213	0.402
+580	-13316.70254	213	0.402
+590	-13316.66392	214	0.402
+600	-13316.66392	214	0.402
+610	-13316.65972	214	0.402
+620	-13316.65972	214	0.402
+630	-13316.61056	214	0.402
+640	-13316.61056	214	0.402
+650	-13316.61025	214	0.402
+660	-13316.60883	214	0.402
+670	-13316.60448	214	0.402
+680	-13316.59658	214	0.402
+690	-13316.59658	214	0.402
+700	-13316.59144	215	0.402
+710	-13316.58214	215	0.402
+720	-13316.58214	215	0.402
+730	-13316.5726	215	0.402
+740	-13316.5726	215	0.402
+750	-13316.5726	215	0.402
+760	-13316.5726	215	0.402
+770	-13316.5726	215	0.402
+780	-13316.55612	215	0.402
+790	-13316.55612	215	0.402
+800	-13316.55508	215	0.402
+810	-13316.55508	216	0.402
+820	-13316.55508	216	0.402
+830	-13316.5507	216	0.402
+840	-13316.50905	216	0.402
+850	-13316.49098	216	0.402
+860	-13316.49098	216	0.402
+870	-13316.49098	216	0.402
+880	-13316.45639	216	0.402
+890	-13316.43433	216	0.402
+900	-13316.42274	216	0.402
+910	-13316.42157	216	0.402
+920	-13316.42111	217	0.402
+930	-13316.41141	217	0.402
+940	-13316.41141	217	0.402
+950	-13316.41141	217	0.402
+960	-13316.4105	217	0.402
+970	-13316.4105	217	0.402
+980	-13316.4105	217	0.402
+990	-13316.40871	217	0.402
+1000	-13316.40194	217	0.402
+1010	-13316.37437	218	0.304
+1020	-13316.37174	218	0.304
+1030	-13316.3638	218	0.304
+1040	-13316.35515	218	0.304
+1050	-13316.35505	218	0.304
+1060	-13316.35505	218	0.304
+1070	-13316.35505	219	0.304
+1080	-13316.35505	219	0.304
+1090	-13316.35505	219	0.304
+1100	-13316.35505	219	0.304
+1110	-13316.35505	219	0.304
+1120	-13316.35505	219	0.304
+1130	-13316.35505	219	0.304
+1140	-13316.33861	219	0.304
+1150	-13316.33861	219	0.304
+1160	-13316.33809	220	0.304
+1170	-13316.33787	220	0.304
+1180	-13316.3373	220	0.304
+1190	-13316.3373	220	0.304
+1200	-13316.3373	220	0.304
+1210	-13316.3373	220	0.304
+1220	-13316.3373	220	0.304
+1230	-13316.3373	221	0.304
+1240	-13316.29705	221	0.304
+1250	-13316.29705	221	0.304
+1260	-13316.29705	221	0.304
+1270	-13316.28279	221	0.304
+1280	-13316.28279	221	0.304
+1290	-13316.28279	221	0.304
+1300	-13316.28279	221	0.304
+1310	-13316.28279	221	0.304
+1320	-13316.28279	221	0.304
+1330	-13316.28279	222	0.304
+1340	-13316.28279	222	0.304
+1350	-13316.28279	222	0.304
+1360	-13316.28212	222	0.304
+1370	-13316.28212	222	0.304
+1380	-13316.28212	222	0.304
+1390	-13316.27963	222	0.304
+1400	-13316.27963	222	0.304
+1410	-13316.27963	223	0.304
+1420	-13316.22859	223	0.304
+1430	-13316.22859	223	0.304
+1440	-13316.22859	223	0.304
+1450	-13316.22848	223	0.304
+1460	-13316.22848	223	0.304
+1470	-13316.2271	223	0.304
+1480	-13316.2271	224	0.304
+1490	-13316.2271	224	0.304
+1500	-13316.20453	224	0.304
+1510	-13316.19028	224	0.206
+1520	-13316.19028	224	0.206
+1530	-13316.18145	224	0.206
+1540	-13316.18145	225	0.206
+1550	-13316.16632	225	0.206
+1560	-13316.15128	225	0.206
+1570	-13316.15128	225	0.206
+1580	-13316.14972	225	0.206
+1590	-13316.14661	225	0.206
+1600	-13316.14661	225	0.206
+1610	-13316.14661	225	0.206
+1620	-13316.14066	225	0.206
+1630	-13316.10845	226	0.206
+1640	-13316.10845	226	0.206
+1650	-13316.10662	226	0.206
+1660	-13316.10662	226	0.206
+1670	-13316.10637	226	0.206
+1680	-13316.10593	226	0.206
+1690	-13316.10593	226	0.206
+1700	-13316.10593	226	0.206
+1710	-13316.10593	226	0.206
+1720	-13316.10593	227	0.206
+1730	-13316.10593	227	0.206
+1740	-13316.10543	227	0.206
+1750	-13316.10527	227	0.206
+1760	-13316.10527	227	0.206
+1770	-13316.10527	227	0.206
+1780	-13316.10298	227	0.206
+1790	-13316.09991	227	0.206
+1800	-13316.09991	227	0.206
+1810	-13316.09991	228	0.206
+1820	-13316.09991	228	0.206
+1830	-13316.09991	228	0.206
+1840	-13316.09991	228	0.206
+1850	-13316.09991	228	0.206
+1860	-13316.0997	228	0.206
+1870	-13316.0997	229	0.206
+1880	-13316.0997	229	0.206
+1890	-13316.0997	229	0.206
+1900	-13316.0997	229	0.206
+1910	-13316.0997	229	0.206
+1920	-13316.06937	229	0.206
+1930	-13316.06937	229	0.206
+1940	-13316.06937	230	0.206
+1950	-13316.06261	230	0.206
+1960	-13316.06204	230	0.206
+1970	-13316.06204	230	0.206
+1980	-13316.06204	230	0.206
+1990	-13316.06204	230	0.206
+2000	-13316.06204	230	0.206
+2010	-13315.94136	231	0.108
+2020	-13315.94136	231	0.108
+2030	-13315.94136	231	0.108
+2040	-13315.94136	231	0.108
+2050	-13315.94136	231	0.108
+2060	-13315.94136	231	0.108
+2070	-13315.94136	232	0.108
+2080	-13315.94136	232	0.108
+2090	-13315.94119	232	0.108
+2100	-13315.94119	232	0.108
+2110	-13315.94119	232	0.108
+2120	-13315.94034	232	0.108
+2130	-13315.94034	232	0.108
+2140	-13315.94034	233	0.108
+2150	-13315.94034	233	0.108
+2160	-13315.94034	233	0.108
+2170	-13315.94034	233	0.108
+2180	-13315.93843	233	0.108
+2190	-13315.93843	233	0.108
+2200	-13315.93843	233	0.108
+2210	-13315.93843	233	0.108
+2220	-13315.93843	234	0.108
+2230	-13315.93843	234	0.108
+2240	-13315.93843	234	0.108
+2250	-13315.93843	234	0.108
+2260	-13315.93843	234	0.108
+2270	-13315.93843	234	0.108
+2280	-13315.93843	234	0.108
+2290	-13315.93843	235	0.108
+2300	-13315.93843	235	0.108
+2310	-13315.93805	235	0.108
+2320	-13315.93805	235	0.108
+2330	-13315.90236	235	0.108
+2340	-13315.90236	235	0.108
+2350	-13315.90236	235	0.108
+2360	-13315.90236	235	0.108
+2370	-13315.90236	235	0.108
+2380	-13315.90236	236	0.108
+2390	-13315.90069	236	0.108
+2400	-13315.90069	236	0.108
+2410	-13315.90069	236	0.108
+2420	-13315.90069	236	0.108
+2430	-13315.90069	236	0.108
+2440	-13315.90069	236	0.108
+2450	-13315.90069	236	0.108
+2460	-13315.90069	237	0.108
+2470	-13315.88712	237	0.108
+2480	-13315.88216	237	0.108
+2490	-13315.88216	237	0.108
+2500	-13315.881	237	0.108
+2510	-13315.84332	238	0.01
+2520	-13315.84332	238	0.01
+2530	-13315.84332	238	0.01
+2540	-13315.84332	238	0.01
+2550	-13315.84245	238	0.01
+2560	-13315.84245	239	0.01
+2570	-13315.84245	239	0.01
+2580	-13315.84245	239	0.01
+2590	-13315.84245	239	0.01
+2600	-13315.84245	239	0.01
+2610	-13315.84245	240	0.01
+2620	-13315.84245	240	0.01
+2630	-13315.84245	240	0.01
+2640	-13315.84245	240	0.01
+2650	-13315.84245	240	0.01
+2660	-13315.84245	241	0.01
+2670	-13315.84229	241	0.01
+2680	-13315.84161	241	0.01
+2690	-13315.84161	241	0.01
+2700	-13315.84161	242	0.01
+2710	-13315.84161	242	0.01
+2720	-13315.84161	242	0.01
+2730	-13315.84161	242	0.01
+2740	-13315.84161	242	0.01
+2750	-13315.84161	243	0.01
+2760	-13315.84161	243	0.01
+2770	-13315.84161	243	0.01
+2780	-13315.84161	243	0.01
+2790	-13315.84161	243	0.01
+2800	-13315.84161	244	0.01
+2810	-13315.84161	244	0.01
+2820	-13315.84161	244	0.01
+2830	-13315.84161	244	0.01
+2840	-13315.84161	244	0.01
+2850	-13315.84161	244	0.01
+2860	-13315.84142	245	0.01
+2870	-13315.84142	245	0.01
+2880	-13315.82938	245	0.01
+2890	-13315.82938	245	0.01
+2900	-13315.82938	245	0.01
+2910	-13315.82938	246	0.01
+2920	-13315.82938	246	0.01
+2930	-13315.82872	246	0.01
+2940	-13315.82851	246	0.01
+2950	-13315.82851	246	0.01
+2960	-13315.82851	247	0.01
+2970	-13315.82851	247	0.01
+2980	-13315.82851	247	0.01
+2990	-13315.82851	247	0.01
+3000	-13315.82851	247	0.01
+3010	-13315.82851	248	0.01
+3020	-13315.82851	248	0.01
+3030	-13315.82851	248	0.01
+3040	-13315.82851	248	0.01
+3050	-13315.82851	248	0.01
+3060	-13315.82851	249	0.01
+3070	-13315.82851	249	0.01
+3080	-13315.82851	249	0.01
+3090	-13315.82851	249	0.01
+3100	-13315.82818	249	0.01
+3110	-13315.82818	250	0.01
+3120	-13315.82818	250	0.01
+3130	-13315.82818	250	0.01
+3140	-13315.82818	250	0.01
+3150	-13315.82745	250	0.01
+3160	-13315.82745	251	0.01
+3170	-13315.82745	251	0.01
+3180	-13315.82745	251	0.01
+3190	-13315.82723	251	0.01
+3200	-13315.82723	251	0.01
+3210	-13315.82723	252	0.01
+3220	-13315.82404	252	0.01
+3230	-13315.82404	252	0.01
+3240	-13315.82404	252	0.01
+3250	-13315.82404	252	0.01
+3260	-13315.82404	253	0.01
+3270	-13315.82404	253	0.01
+3280	-13315.82404	253	0.01
+3290	-13315.82404	253	0.01
+3300	-13315.82404	253	0.01
+3310	-13315.82404	254	0.01
+3320	-13315.82404	254	0.01
+3330	-13315.82404	254	0.01
+3340	-13315.82404	254	0.01
+3350	-13315.82091	254	0.01
+3360	-13315.82091	255	0.01
+3370	-13315.82091	255	0.01
+3380	-13315.82091	255	0.01
+3390	-13315.82091	255	0.01
+3400	-13315.82089	255	0.01
+3410	-13315.82089	256	0.01
+3420	-13315.82088	256	0.01
+3430	-13315.82088	256	0.01
+3440	-13315.82088	256	0.01
+3450	-13315.82088	256	0.01
+3460	-13315.82088	257	0.01
+3470	-13315.81947	257	0.01
+3480	-13315.81947	257	0.01
+3490	-13315.81947	257	0.01
+3500	-13315.81947	258	0.01
+3510	-13315.81947	258	0.01
+3520	-13315.81947	258	0.01
+3530	-13315.81735	258	0.01
+3540	-13315.81735	259	0.01
+3550	-13315.81735	259	0.01
+3560	-13315.81735	259	0.01
+3570	-13315.81735	259	0.01
+3580	-13315.81733	259	0.01
+3590	-13315.81733	260	0.01
+3600	-13315.81733	260	0.01
+3610	-13315.81733	260	0.01
+3620	-13315.81733	260	0.01
+3630	-13315.81733	260	0.01
+3640	-13315.81733	261	0.01
+3650	-13315.81733	261	0.01
+3660	-13315.81733	261	0.01
+3670	-13315.81733	261	0.01
+3680	-13315.81733	262	0.01
+3690	-13315.81733	262	0.01
+3700	-13315.81733	262	0.01
+3710	-13315.81733	262	0.01
+3720	-13315.81733	262	0.01
+3730	-13315.81733	263	0.01
+3740	-13315.81733	263	0.01
+3750	-13315.81733	263	0.01
+3760	-13315.81733	263	0.01
+3770	-13315.81733	263	0.01
+3780	-13315.81576	264	0.01
+3790	-13315.81576	264	0.01
+3800	-13315.81576	264	0.01
+3810	-13315.81576	264	0.01
+3820	-13315.81576	264	0.01
+3830	-13315.81576	265	0.01
+3840	-13315.81576	265	0.01
+3850	-13315.81572	265	0.01
+3860	-13315.81572	265	0.01
+3870	-13315.81572	265	0.01
+3880	-13315.81572	266	0.01
+3890	-13315.81572	266	0.01
+3900	-13315.81572	266	0.01
+3910	-13315.81572	266	0.01
+3920	-13315.81572	267	0.01
+3930	-13315.81572	267	0.01
+3940	-13315.81572	267	0.01
+3950	-13315.81572	267	0.01
+3960	-13315.81215	267	0.01
+3970	-13315.81215	268	0.01
+3980	-13315.81215	268	0.01
+3990	-13315.81215	268	0.01
+4000	-13315.81215	268	0.01
+4010	-13315.81215	268	0.01
+4020	-13315.81215	269	0.01
+4030	-13315.81155	269	0.01
+4040	-13315.8113	269	0.01
+4050	-13315.8113	269	0.01
+4060	-13315.8113	270	0.01
+4070	-13315.8113	270	0.01
+4080	-13315.81119	270	0.01
+4090	-13315.81119	270	0.01
+4100	-13315.81119	270	0.01
+4110	-13315.81119	271	0.01
+4120	-13315.81119	271	0.01
+4130	-13315.81119	271	0.01
+4140	-13315.81119	271	0.01
+4150	-13315.81119	271	0.01
+4160	-13315.81119	272	0.01
+4170	-13315.81119	272	0.01
+4180	-13315.81119	272	0.01
+4190	-13315.81119	272	0.01
+4200	-13315.81119	272	0.01
+4210	-13315.81119	273	0.01
+4220	-13315.81119	273	0.01
+4230	-13315.81119	273	0.01
+4240	-13315.81119	273	0.01
+4250	-13315.81119	273	0.01
+4260	-13315.81119	274	0.01
+4270	-13315.81119	274	0.01
+4280	-13315.81119	274	0.01
+4290	-13315.81119	274	0.01
+4300	-13315.81119	274	0.01
+4310	-13315.81119	275	0.01
+4320	-13315.81119	275	0.01
+4330	-13315.81119	275	0.01
+4340	-13315.81119	275	0.01
+4350	-13315.81119	276	0.01
+4360	-13315.81119	276	0.01
+4370	-13315.81119	276	0.01
+4380	-13315.81119	276	0.01
+4390	-13315.81119	276	0.01
+4400	-13315.81119	277	0.01
+4410	-13315.81119	277	0.01
+4420	-13315.81119	277	0.01
+4430	-13315.81119	277	0.01
+4440	-13315.81119	278	0.01
+4450	-13315.81119	278	0.01
+4460	-13315.81119	278	0.01
+4470	-13315.81119	278	0.01
+4480	-13315.81119	278	0.01
+4490	-13315.81119	279	0.01
+4500	-13315.81119	279	0.01
+4510	-13315.81119	279	0.01
+4520	-13315.81119	279	0.01
+4530	-13315.81119	279	0.01
+4540	-13315.81119	280	0.01
+4550	-13315.81119	280	0.01
+4560	-13315.81119	280	0.01
+4570	-13315.80966	280	0.01
+4580	-13315.80931	280	0.01
+4590	-13315.80931	281	0.01
+4600	-13315.80825	281	0.01
+4610	-13315.80808	281	0.01
+4620	-13315.80748	281	0.01
+4630	-13315.80748	281	0.01
+4640	-13315.80748	281	0.01
+4650	-13315.80748	281	0.01
+4660	-13315.80748	282	0.01
+4670	-13315.80748	282	0.01
+4680	-13315.80748	282	0.01
+4690	-13315.80748	282	0.01
+4700	-13315.80748	282	0.01
+4710	-13315.80709	282	0.01
+4720	-13315.80709	283	0.01
+4730	-13315.80709	283	0.01
+4740	-13315.80709	283	0.01
+4750	-13315.80709	283	0.01
+4760	-13315.80709	283	0.01
+4770	-13315.80709	283	0.01
+4780	-13315.80702	283	0.01
+4790	-13315.80702	284	0.01
+4800	-13315.80702	284	0.01
+4810	-13315.80702	284	0.01
+4820	-13315.80702	284	0.01
+4830	-13315.80702	284	0.01
+4840	-13315.80702	284	0.01
+4850	-13315.80702	284	0.01
+4860	-13315.80702	284	0.01
+4870	-13315.80702	285	0.01
+4880	-13315.80702	285	0.01
+4890	-13315.80702	285	0.01
+4900	-13315.80702	285	0.01
+4910	-13315.80702	285	0.01
+4920	-13315.80702	285	0.01
+4930	-13315.80702	285	0.01
+4940	-13315.80702	286	0.01
+4950	-13315.80702	286	0.01
+4960	-13315.80702	286	0.01
+4970	-13315.80702	286	0.01
+4980	-13315.80702	286	0.01
+4990	-13315.80702	286	0.01
+5000	-13315.80702	286	0.01
+5010	-13315.80702	287	0.01
+5020	-13315.80702	287	0.01
+5030	-13315.80702	287	0.01
+5040	-13315.80702	287	0.01
+5050	-13315.80702	287	0.01
+5060	-13315.80702	287	0.01
+5070	-13315.80702	288	0.01
+5080	-13315.80702	288	0.01
+5090	-13315.80702	288	0.01
+5100	-13315.80702	288	0.01
+5110	-13315.80702	288	0.01
+5120	-13315.80702	288	0.01
+5130	-13315.80702	288	0.01
+5140	-13315.80702	289	0.01
+5150	-13315.80702	289	0.01
+5160	-13315.80702	289	0.01
+5170	-13315.80702	289	0.01
+5180	-13315.80702	289	0.01
+5190	-13315.80702	289	0.01
+5200	-13315.80672	289	0.01
+5210	-13315.80672	290	0.01
+5220	-13315.80672	290	0.01
+5230	-13315.80672	290	0.01
+5240	-13315.80672	290	0.01
+5250	-13315.80672	290	0.01
+5260	-13315.80672	290	0.01
+5270	-13315.80672	291	0.01
+5280	-13315.80672	291	0.01
+5290	-13315.80672	291	0.01
+5300	-13315.80672	291	0.01
+5310	-13315.80672	291	0.01
+5320	-13315.80672	291	0.01
+5330	-13315.80672	292	0.01
+5340	-13315.80672	292	0.01
+5350	-13315.80672	292	0.01
+5360	-13315.80672	292	0.01
+5370	-13315.80672	292	0.01
+5380	-13315.80656	292	0.01
+5390	-13315.80593	292	0.01
+5400	-13315.80593	293	0.01
+5410	-13315.80593	293	0.01
+5420	-13315.80593	293	0.01
+5430	-13315.80593	293	0.01
+5440	-13315.80593	293	0.01
+5450	-13315.80588	293	0.01
+5460	-13315.80588	293	0.01
+5470	-13315.80579	294	0.01
+5480	-13315.80579	294	0.01
+5490	-13315.80579	294	0.01
+5500	-13315.80579	294	0.01
+5510	-13315.80579	294	0.01
+5520	-13315.80579	294	0.01
+5530	-13315.80579	295	0.01
+5540	-13315.80579	295	0.01
+5550	-13315.80579	295	0.01
+5560	-13315.80403	295	0.01
+5570	-13315.80403	295	0.01
+5580	-13315.80403	295	0.01
+5590	-13315.80403	295	0.01
+5600	-13315.80403	296	0.01
+5610	-13315.80403	296	0.01
+5620	-13315.80403	296	0.01
+5630	-13315.80403	296	0.01
+5640	-13315.80403	296	0.01
+5650	-13315.80403	296	0.01
+5660	-13315.80318	296	0.01
+5670	-13315.80318	297	0.01
+5680	-13315.80283	297	0.01
+5690	-13315.80283	297	0.01
+5700	-13315.80263	297	0.01
+5710	-13315.80263	297	0.01
+5720	-13315.80263	297	0.01
+5730	-13315.80263	298	0.01
+5740	-13315.80263	298	0.01
+5750	-13315.80263	298	0.01
+5760	-13315.80263	298	0.01
+5770	-13315.80263	298	0.01
+5780	-13315.80263	298	0.01
+5790	-13315.80263	298	0.01
+5800	-13315.80263	299	0.01
+5810	-13315.80263	299	0.01
+5820	-13315.80263	299	0.01
+5830	-13315.80263	299	0.01
+5840	-13315.80263	299	0.01
+5850	-13315.80263	299	0.01
+5860	-13315.80263	299	0.01
+5870	-13315.80263	300	0.01
+5880	-13315.80263	300	0.01
+5890	-13315.80263	300	0.01
+5900	-13315.80263	300	0.01
+5910	-13315.80263	300	0.01
+5920	-13315.80263	300	0.01
+5930	-13315.80263	300	0.01
+5940	-13315.80251	301	0.01
+5950	-13315.80243	301	0.01
+5960	-13315.80243	301	0.01
+5970	-13315.80243	301	0.01
+5980	-13315.80243	301	0.01
+5990	-13315.80243	301	0.01
+6000	-13315.80243	301	0.01
+6010	-13315.80243	302	0.01
+6020	-13315.80243	302	0.01
+6030	-13315.80243	302	0.01
+6040	-13315.80148	302	0.01
+6050	-13315.80148	302	0.01
+6060	-13315.80148	302	0.01
+6070	-13315.80148	302	0.01
+6080	-13315.80148	303	0.01
+6090	-13315.80148	303	0.01
+6100	-13315.80148	303	0.01
+6110	-13315.80148	303	0.01
+6120	-13315.80148	303	0.01
+6130	-13315.80148	303	0.01
+6140	-13315.80148	303	0.01
+6150	-13315.80121	304	0.01
+6160	-13315.80121	304	0.01
+6170	-13315.80104	304	0.01
+6180	-13315.80104	304	0.01
+6190	-13315.80104	304	0.01
+6200	-13315.80104	304	0.01
+6210	-13315.80104	304	0.01
+6220	-13315.80104	305	0.01
+6230	-13315.80104	305	0.01
+6240	-13315.80104	305	0.01
+6250	-13315.80104	305	0.01
+6260	-13315.80104	305	0.01
+6270	-13315.80104	305	0.01
+6280	-13315.80104	305	0.01
+6290	-13315.80104	306	0.01
+6300	-13315.80104	306	0.01
+6310	-13315.80065	306	0.01
+6320	-13315.80065	306	0.01
+6330	-13315.80065	306	0.01
+6340	-13315.80065	306	0.01
+6350	-13315.80065	306	0.01
+6360	-13315.79967	307	0.01
+6370	-13315.79962	307	0.01
+6380	-13315.79962	307	0.01
+6390	-13315.79962	307	0.01
+6400	-13315.79962	307	0.01
+6410	-13315.79962	307	0.01
+6420	-13315.79927	307	0.01
+6430	-13315.79927	308	0.01
+6440	-13315.79927	308	0.01
+6450	-13315.79927	308	0.01
+6460	-13315.79927	308	0.01
+6470	-13315.79927	308	0.01
+6480	-13315.79927	308	0.01
+6490	-13315.79927	308	0.01
+6500	-13315.79927	308	0.01
+6510	-13315.79927	309	0.01
+6520	-13315.79926	309	0.01
+6530	-13315.79926	309	0.01
+6540	-13315.79926	309	0.01
+6550	-13315.79926	309	0.01
+6560	-13315.79926	309	0.01
+6570	-13315.79926	309	0.01
+6580	-13315.79926	310	0.01
+6590	-13315.79926	310	0.01
+6600	-13315.79926	310	0.01
+6610	-13315.79926	310	0.01
+6620	-13315.7964	310	0.01
+6630	-13315.7964	310	0.01
+6640	-13315.7964	310	0.01
+6650	-13315.7964	311	0.01
+6660	-13315.7964	311	0.01
+6670	-13315.7964	311	0.01
+6680	-13315.7964	311	0.01
+6690	-13315.7964	311	0.01
+6700	-13315.7964	311	0.01
+6710	-13315.7964	311	0.01
+6720	-13315.7964	312	0.01
+6730	-13315.79258	312	0.01
+6740	-13315.79258	312	0.01
+6750	-13315.79258	312	0.01
+6760	-13315.79258	312	0.01
+6770	-13315.79258	312	0.01
+6780	-13315.79258	312	0.01
+6790	-13315.79258	313	0.01
+6800	-13315.79258	313	0.01
+6810	-13315.79258	313	0.01
+6820	-13315.79258	313	0.01
+6830	-13315.79258	313	0.01
+6840	-13315.79258	313	0.01
+6850	-13315.79258	313	0.01
+6860	-13315.79258	314	0.01
+6870	-13315.79258	314	0.01
+6880	-13315.79258	314	0.01
+6890	-13315.79258	314	0.01
+6900	-13315.79258	314	0.01
+6910	-13315.79258	314	0.01
+6920	-13315.79258	314	0.01
+6930	-13315.79258	314	0.01
+6940	-13315.79251	315	0.01
+6950	-13315.79251	315	0.01
+6960	-13315.79251	315	0.01
+6970	-13315.79251	315	0.01
+6980	-13315.79251	315	0.01
+6990	-13315.79251	315	0.01
+7000	-13315.79251	315	0.01
+7010	-13315.79251	315	0.01
+7020	-13315.79251	316	0.01
+7030	-13315.79249	316	0.01
+7040	-13315.79249	316	0.01
+7050	-13315.79249	316	0.01
+7060	-13315.79249	316	0.01
+7070	-13315.79249	316	0.01
+7080	-13315.79249	316	0.01
+7090	-13315.79249	317	0.01
+7100	-13315.79249	317	0.01
+7110	-13315.79249	317	0.01
+7120	-13315.79249	317	0.01
+7130	-13315.79249	317	0.01
+7140	-13315.79249	317	0.01
+7150	-13315.79249	318	0.01
+7160	-13315.79249	318	0.01
+7170	-13315.79249	318	0.01
+7180	-13315.79249	318	0.01
+7190	-13315.79249	318	0.01
+7200	-13315.79249	318	0.01
+7210	-13315.79249	318	0.01
+7220	-13315.79249	319	0.01
+7230	-13315.79249	319	0.01
+7240	-13315.79249	319	0.01
+7250	-13315.79249	319	0.01
+7260	-13315.79249	319	0.01
+7270	-13315.79249	319	0.01
+7280	-13315.79249	319	0.01
+7290	-13315.79249	319	0.01
+7300	-13315.79249	320	0.01
+7310	-13315.79249	320	0.01
+7320	-13315.79249	320	0.01
+7330	-13315.79249	320	0.01
+7340	-13315.79249	320	0.01
+7350	-13315.79249	320	0.01
+7360	-13315.79249	320	0.01
+7370	-13315.79249	321	0.01
+7380	-13315.79249	321	0.01
+7390	-13315.79249	321	0.01
+7400	-13315.79249	321	0.01
+7410	-13315.7924	321	0.01
+7420	-13315.7924	321	0.01
+7430	-13315.7924	321	0.01
+7440	-13315.7924	322	0.01
+7450	-13315.7924	322	0.01
+7460	-13315.7924	322	0.01
+7470	-13315.7924	322	0.01
+7480	-13315.7924	322	0.01
+7490	-13315.7924	322	0.01
+7500	-13315.7924	322	0.01
+7510	-13315.79232	323	0.01
+7520	-13315.79232	323	0.01
+7530	-13315.79232	323	0.01
+7540	-13315.79232	323	0.01
+7550	-13315.79232	323	0.01
+7560	-13315.79232	323	0.01
+7570	-13315.79232	323	0.01
+7580	-13315.79219	323	0.01
+7590	-13315.79219	324	0.01
+7600	-13315.79219	324	0.01
+Score after final optimization: -13315.77224
+Final	-13315.77224	327	0.01
+Search rep 4 (of 5)
+random seed = 490393635
+gen	best_like	time	optPrecision
+0	-13441.56693	328	0.5
+10	-13331.78392	328	0.5
+20	-13331.75972	328	0.5
+30	-13320.32036	328	0.5
+40	-13320.32036	328	0.5
+50	-13320.07741	329	0.5
+60	-13319.73373	329	0.5
+70	-13319.70037	329	0.5
+80	-13319.33744	329	0.5
+90	-13319.33341	329	0.5
+100	-13319.1751	329	0.5
+110	-13319.1751	329	0.5
+120	-13319.04336	329	0.5
+130	-13319.00592	329	0.5
+140	-13319.00592	329	0.5
+150	-13318.91698	330	0.5
+160	-13318.91698	330	0.5
+170	-13318.89162	330	0.5
+180	-13318.87854	330	0.5
+190	-13318.69756	330	0.5
+200	-13318.66575	330	0.5
+210	-13318.63415	330	0.5
+220	-13318.63415	330	0.5
+230	-13318.61855	330	0.5
+240	-13318.5997	330	0.5
+250	-13318.5997	331	0.5
+260	-13318.59891	331	0.5
+270	-13318.5964	331	0.5
+280	-13318.59424	331	0.5
+290	-13318.59424	331	0.5
+300	-13318.59424	331	0.5
+310	-13318.59424	331	0.5
+320	-13318.59424	331	0.5
+330	-13318.59424	331	0.5
+340	-13318.59424	332	0.5
+350	-13318.59424	332	0.5
+360	-13318.59424	332	0.5
+370	-13318.59424	332	0.5
+380	-13318.59424	332	0.5
+390	-13318.59424	332	0.5
+400	-13318.56634	332	0.5
+410	-13318.56634	332	0.5
+420	-13318.56634	333	0.5
+430	-13318.56634	333	0.5
+440	-13318.52691	333	0.5
+450	-13318.5143	333	0.5
+460	-13318.5143	333	0.5
+470	-13318.50763	333	0.5
+480	-13318.50763	333	0.5
+490	-13318.48973	333	0.5
+500	-13318.47806	334	0.5
+510	-13318.42501	334	0.5
+520	-13318.36756	334	0.5
+530	-13318.36419	334	0.5
+540	-13318.36419	334	0.5
+550	-13318.36419	334	0.5
+560	-13318.36419	334	0.5
+570	-13318.36419	334	0.5
+580	-13318.25123	335	0.5
+590	-13318.25123	335	0.5
+600	-13318.25123	335	0.5
+610	-13318.16834	335	0.402
+620	-13318.15342	335	0.402
+630	-13318.15184	335	0.402
+640	-13318.04647	335	0.402
+650	-13318.04284	335	0.402
+660	-13318.00229	335	0.402
+670	-13317.94633	335	0.402
+680	-13317.7301	336	0.402
+690	-13317.71433	336	0.402
+700	-13317.53164	336	0.402
+710	-13317.52339	336	0.402
+720	-13317.49094	336	0.402
+730	-13317.4839	336	0.402
+740	-13317.4839	336	0.402
+750	-13317.48193	336	0.402
+760	-13317.45917	336	0.402
+770	-13317.4232	336	0.402
+780	-13317.29582	336	0.402
+790	-13317.2393	336	0.402
+800	-13317.2393	337	0.402
+810	-13317.23172	337	0.402
+820	-13317.21622	337	0.402
+830	-13317.19016	337	0.402
+840	-13317.16977	337	0.402
+850	-13317.0217	337	0.402
+860	-13317.02106	337	0.402
+870	-13316.99115	337	0.402
+880	-13316.98533	337	0.402
+890	-13316.98085	337	0.402
+900	-13316.92257	337	0.402
+910	-13316.92257	337	0.402
+920	-13316.92257	337	0.402
+930	-13316.76706	338	0.402
+940	-13316.76706	338	0.402
+950	-13316.76706	338	0.402
+960	-13316.66838	338	0.402
+970	-13316.64144	338	0.402
+980	-13316.64144	338	0.402
+990	-13316.64109	338	0.402
+1000	-13316.64109	338	0.402
+1010	-13316.60216	338	0.402
+1020	-13316.60031	338	0.402
+1030	-13316.60031	338	0.402
+1040	-13316.60031	339	0.402
+1050	-13316.59495	339	0.402
+1060	-13316.59495	339	0.402
+1070	-13316.51591	339	0.402
+1080	-13316.37927	339	0.402
+1090	-13316.36555	339	0.402
+1100	-13316.36555	339	0.402
+1110	-13316.2968	339	0.304
+1120	-13316.29181	339	0.304
+1130	-13316.29181	339	0.304
+1140	-13316.29181	339	0.304
+1150	-13316.29181	340	0.304
+1160	-13316.29181	340	0.304
+1170	-13316.29181	340	0.304
+1180	-13316.29143	340	0.304
+1190	-13316.28755	340	0.304
+1200	-13316.28755	340	0.304
+1210	-13316.28755	340	0.304
+1220	-13316.2683	340	0.304
+1230	-13316.26549	340	0.304
+1240	-13316.26067	340	0.304
+1250	-13316.24544	340	0.304
+1260	-13316.23072	340	0.304
+1270	-13316.23072	341	0.304
+1280	-13316.22196	341	0.304
+1290	-13316.22146	341	0.304
+1300	-13316.22146	341	0.304
+1310	-13316.2083	341	0.304
+1320	-13316.2083	341	0.304
+1330	-13316.2083	341	0.304
+1340	-13316.2083	341	0.304
+1350	-13316.2083	341	0.304
+1360	-13316.2083	341	0.304
+1370	-13316.1857	342	0.304
+1380	-13316.1857	342	0.304
+1390	-13316.18517	342	0.304
+1400	-13316.18494	342	0.304
+1410	-13316.18494	342	0.304
+1420	-13316.17968	342	0.304
+1430	-13316.17968	342	0.304
+1440	-13316.17968	342	0.304
+1450	-13316.17962	342	0.304
+1460	-13316.17058	342	0.304
+1470	-13316.17023	342	0.304
+1480	-13316.17023	343	0.304
+1490	-13316.16	343	0.304
+1500	-13316.16	343	0.304
+1510	-13316.16	343	0.304
+1520	-13316.14123	343	0.304
+1530	-13316.14123	343	0.304
+1540	-13316.13091	343	0.304
+1550	-13316.13091	343	0.304
+1560	-13316.13091	343	0.304
+1570	-13316.12869	343	0.304
+1580	-13316.12869	344	0.304
+1590	-13316.12869	344	0.304
+1600	-13316.12869	344	0.304
+1610	-13316.10142	344	0.206
+1620	-13316.01985	344	0.206
+1630	-13316.01445	344	0.206
+1640	-13316.01275	344	0.206
+1650	-13316.01271	344	0.206
+1660	-13316.01271	344	0.206
+1670	-13316.01271	345	0.206
+1680	-13315.98462	345	0.206
+1690	-13315.98462	345	0.206
+1700	-13315.98462	345	0.206
+1710	-13315.98294	345	0.206
+1720	-13315.98294	345	0.206
+1730	-13315.98294	345	0.206
+1740	-13315.98294	345	0.206
+1750	-13315.98294	345	0.206
+1760	-13315.98094	345	0.206
+1770	-13315.98094	345	0.206
+1780	-13315.98094	346	0.206
+1790	-13315.98037	346	0.206
+1800	-13315.97974	346	0.206
+1810	-13315.97214	346	0.206
+1820	-13315.96604	346	0.206
+1830	-13315.96604	346	0.206
+1840	-13315.96604	346	0.206
+1850	-13315.96271	346	0.206
+1860	-13315.96259	346	0.206
+1870	-13315.9624	347	0.206
+1880	-13315.9624	347	0.206
+1890	-13315.9624	347	0.206
+1900	-13315.96032	347	0.206
+1910	-13315.95968	347	0.206
+1920	-13315.95108	347	0.206
+1930	-13315.95108	347	0.206
+1940	-13315.95108	347	0.206
+1950	-13315.95108	347	0.206
+1960	-13315.95108	347	0.206
+1970	-13315.95108	348	0.206
+1980	-13315.95108	348	0.206
+1990	-13315.95093	348	0.206
+2000	-13315.95093	348	0.206
+2010	-13315.95093	348	0.206
+2020	-13315.95093	348	0.206
+2030	-13315.95093	348	0.206
+2040	-13315.95093	348	0.206
+2050	-13315.93479	348	0.206
+2060	-13315.93479	349	0.206
+2070	-13315.93479	349	0.206
+2080	-13315.93479	349	0.206
+2090	-13315.93479	349	0.206
+2100	-13315.93479	349	0.206
+2110	-13315.92588	349	0.108
+2120	-13315.92588	349	0.108
+2130	-13315.92367	350	0.108
+2140	-13315.91639	350	0.108
+2150	-13315.91639	350	0.108
+2160	-13315.91639	350	0.108
+2170	-13315.91639	350	0.108
+2180	-13315.91191	350	0.108
+2190	-13315.91191	350	0.108
+2200	-13315.91191	350	0.108
+2210	-13315.91191	350	0.108
+2220	-13315.91191	351	0.108
+2230	-13315.91191	351	0.108
+2240	-13315.91191	351	0.108
+2250	-13315.91191	351	0.108
+2260	-13315.91092	351	0.108
+2270	-13315.91092	351	0.108
+2280	-13315.91092	351	0.108
+2290	-13315.90826	351	0.108
+2300	-13315.90826	351	0.108
+2310	-13315.90826	352	0.108
+2320	-13315.90826	352	0.108
+2330	-13315.90826	352	0.108
+2340	-13315.90826	352	0.108
+2350	-13315.90826	352	0.108
+2360	-13315.90826	352	0.108
+2370	-13315.90826	352	0.108
+2380	-13315.90826	352	0.108
+2390	-13315.90542	352	0.108
+2400	-13315.90542	353	0.108
+2410	-13315.90172	353	0.108
+2420	-13315.90172	353	0.108
+2430	-13315.89957	353	0.108
+2440	-13315.89739	353	0.108
+2450	-13315.89739	353	0.108
+2460	-13315.89739	353	0.108
+2470	-13315.89338	353	0.108
+2480	-13315.89338	353	0.108
+2490	-13315.89338	354	0.108
+2500	-13315.88262	354	0.108
+2510	-13315.88262	354	0.108
+2520	-13315.88262	354	0.108
+2530	-13315.88262	354	0.108
+2540	-13315.88262	354	0.108
+2550	-13315.88262	354	0.108
+2560	-13315.88262	354	0.108
+2570	-13315.88262	354	0.108
+2580	-13315.88149	355	0.108
+2590	-13315.88149	355	0.108
+2600	-13315.88149	355	0.108
+2610	-13315.84585	355	0.01
+2620	-13315.84585	355	0.01
+2630	-13315.84585	355	0.01
+2640	-13315.84326	355	0.01
+2650	-13315.84326	356	0.01
+2660	-13315.84326	356	0.01
+2670	-13315.84326	356	0.01
+2680	-13315.84189	356	0.01
+2690	-13315.84189	356	0.01
+2700	-13315.84189	356	0.01
+2710	-13315.84189	356	0.01
+2720	-13315.84189	356	0.01
+2730	-13315.84189	357	0.01
+2740	-13315.84189	357	0.01
+2750	-13315.84189	357	0.01
+2760	-13315.84189	357	0.01
+2770	-13315.84189	357	0.01
+2780	-13315.84189	357	0.01
+2790	-13315.84142	357	0.01
+2800	-13315.84142	358	0.01
+2810	-13315.84142	358	0.01
+2820	-13315.84142	358	0.01
+2830	-13315.84142	358	0.01
+2840	-13315.84138	358	0.01
+2850	-13315.84138	358	0.01
+2860	-13315.84138	359	0.01
+2870	-13315.84138	359	0.01
+2880	-13315.84138	359	0.01
+2890	-13315.84138	359	0.01
+2900	-13315.84138	359	0.01
+2910	-13315.84138	359	0.01
+2920	-13315.83452	360	0.01
+2930	-13315.83452	360	0.01
+2940	-13315.83452	360	0.01
+2950	-13315.83452	360	0.01
+2960	-13315.83452	360	0.01
+2970	-13315.83452	361	0.01
+2980	-13315.83452	361	0.01
+2990	-13315.83452	361	0.01
+3000	-13315.83452	361	0.01
+3010	-13315.83452	361	0.01
+3020	-13315.83452	362	0.01
+3030	-13315.83452	362	0.01
+3040	-13315.83364	362	0.01
+3050	-13315.8329	362	0.01
+3060	-13315.8329	362	0.01
+3070	-13315.8329	363	0.01
+3080	-13315.8329	363	0.01
+3090	-13315.8329	363	0.01
+3100	-13315.83244	363	0.01
+3110	-13315.83244	363	0.01
+3120	-13315.83244	364	0.01
+3130	-13315.83211	364	0.01
+3140	-13315.83104	364	0.01
+3150	-13315.83104	364	0.01
+3160	-13315.83104	364	0.01
+3170	-13315.83039	365	0.01
+3180	-13315.82741	365	0.01
+3190	-13315.82741	365	0.01
+3200	-13315.82697	365	0.01
+3210	-13315.82697	365	0.01
+3220	-13315.82688	366	0.01
+3230	-13315.82688	366	0.01
+3240	-13315.82688	366	0.01
+3250	-13315.82688	366	0.01
+3260	-13315.82326	366	0.01
+3270	-13315.8142	367	0.01
+3280	-13315.8142	367	0.01
+3290	-13315.81166	367	0.01
+3300	-13315.81166	367	0.01
+3310	-13315.80982	368	0.01
+3320	-13315.80982	368	0.01
+3330	-13315.80982	368	0.01
+3340	-13315.80982	368	0.01
+3350	-13315.80956	368	0.01
+3360	-13315.80956	369	0.01
+3370	-13315.80956	369	0.01
+3380	-13315.80912	369	0.01
+3390	-13315.80912	369	0.01
+3400	-13315.80912	369	0.01
+3410	-13315.80912	370	0.01
+3420	-13315.80912	370	0.01
+3430	-13315.80912	370	0.01
+3440	-13315.80912	370	0.01
+3450	-13315.80912	371	0.01
+3460	-13315.80912	371	0.01
+3470	-13315.80912	371	0.01
+3480	-13315.8058	371	0.01
+3490	-13315.8058	371	0.01
+3500	-13315.8058	372	0.01
+3510	-13315.8058	372	0.01
+3520	-13315.8058	372	0.01
+3530	-13315.80481	372	0.01
+3540	-13315.80481	372	0.01
+3550	-13315.80481	372	0.01
+3560	-13315.80481	373	0.01
+3570	-13315.80481	373	0.01
+3580	-13315.80481	373	0.01
+3590	-13315.80481	373	0.01
+3600	-13315.80481	373	0.01
+3610	-13315.80481	374	0.01
+3620	-13315.80481	374	0.01
+3630	-13315.80481	374	0.01
+3640	-13315.80481	374	0.01
+3650	-13315.80481	375	0.01
+3660	-13315.80481	375	0.01
+3670	-13315.80481	375	0.01
+3680	-13315.80481	375	0.01
+3690	-13315.80478	375	0.01
+3700	-13315.80478	376	0.01
+3710	-13315.80468	376	0.01
+3720	-13315.80468	376	0.01
+3730	-13315.80468	376	0.01
+3740	-13315.80468	376	0.01
+3750	-13315.80468	377	0.01
+3760	-13315.80172	377	0.01
+3770	-13315.80172	377	0.01
+3780	-13315.80172	377	0.01
+3790	-13315.80172	377	0.01
+3800	-13315.80172	378	0.01
+3810	-13315.80172	378	0.01
+3820	-13315.80172	378	0.01
+3830	-13315.80172	378	0.01
+3840	-13315.80172	379	0.01
+3850	-13315.80165	379	0.01
+3860	-13315.80165	379	0.01
+3870	-13315.80165	379	0.01
+3880	-13315.80165	380	0.01
+3890	-13315.80165	380	0.01
+3900	-13315.80165	380	0.01
+3910	-13315.80165	380	0.01
+3920	-13315.80165	380	0.01
+3930	-13315.80165	381	0.01
+3940	-13315.80165	381	0.01
+3950	-13315.80165	381	0.01
+3960	-13315.80165	381	0.01
+3970	-13315.80165	381	0.01
+3980	-13315.80165	382	0.01
+3990	-13315.80164	382	0.01
+4000	-13315.80164	382	0.01
+4010	-13315.80164	382	0.01
+4020	-13315.80164	383	0.01
+4030	-13315.80164	383	0.01
+4040	-13315.80107	383	0.01
+4050	-13315.80107	383	0.01
+4060	-13315.80107	384	0.01
+4070	-13315.80107	384	0.01
+4080	-13315.80107	384	0.01
+4090	-13315.80107	384	0.01
+4100	-13315.80107	385	0.01
+4110	-13315.80107	385	0.01
+4120	-13315.80107	385	0.01
+4130	-13315.80107	385	0.01
+4140	-13315.80107	386	0.01
+4150	-13315.80107	386	0.01
+4160	-13315.80107	386	0.01
+4170	-13315.80107	386	0.01
+4180	-13315.80107	386	0.01
+4190	-13315.80107	387	0.01
+4200	-13315.80107	387	0.01
+4210	-13315.80107	387	0.01
+4220	-13315.80107	387	0.01
+4230	-13315.80107	387	0.01
+4240	-13315.80107	388	0.01
+4250	-13315.80107	388	0.01
+4260	-13315.80107	388	0.01
+4270	-13315.80107	388	0.01
+4280	-13315.80107	389	0.01
+4290	-13315.80107	389	0.01
+4300	-13315.80107	389	0.01
+4310	-13315.80107	390	0.01
+4320	-13315.80107	390	0.01
+4330	-13315.80107	390	0.01
+4340	-13315.80107	391	0.01
+4350	-13315.80107	391	0.01
+4360	-13315.80107	391	0.01
+4370	-13315.80107	391	0.01
+4380	-13315.80107	391	0.01
+4390	-13315.80107	392	0.01
+4400	-13315.80107	392	0.01
+4410	-13315.80107	392	0.01
+4420	-13315.80107	392	0.01
+4430	-13315.80107	392	0.01
+4440	-13315.80107	393	0.01
+4450	-13315.80107	393	0.01
+4460	-13315.80107	393	0.01
+4470	-13315.80107	393	0.01
+4480	-13315.79616	393	0.01
+4490	-13315.79616	394	0.01
+4500	-13315.79616	394	0.01
+4510	-13315.79616	394	0.01
+4520	-13315.79616	394	0.01
+4530	-13315.79616	395	0.01
+4540	-13315.79616	395	0.01
+4550	-13315.79616	395	0.01
+4560	-13315.79616	395	0.01
+4570	-13315.79616	395	0.01
+4580	-13315.79616	396	0.01
+4590	-13315.79616	396	0.01
+4600	-13315.79616	396	0.01
+4610	-13315.79616	396	0.01
+4620	-13315.79616	397	0.01
+4630	-13315.79616	397	0.01
+4640	-13315.79616	397	0.01
+4650	-13315.79616	397	0.01
+4660	-13315.79616	397	0.01
+4670	-13315.79616	397	0.01
+4680	-13315.79616	398	0.01
+4690	-13315.79616	398	0.01
+4700	-13315.79616	398	0.01
+4710	-13315.79616	398	0.01
+4720	-13315.7959	399	0.01
+4730	-13315.7959	399	0.01
+4740	-13315.7959	399	0.01
+4750	-13315.7959	399	0.01
+4760	-13315.7959	399	0.01
+4770	-13315.7959	400	0.01
+4780	-13315.7959	400	0.01
+4790	-13315.79526	400	0.01
+4800	-13315.79526	400	0.01
+4810	-13315.79526	401	0.01
+4820	-13315.79526	401	0.01
+4830	-13315.79526	401	0.01
+4840	-13315.79526	401	0.01
+4850	-13315.79526	401	0.01
+4860	-13315.79526	402	0.01
+4870	-13315.79526	402	0.01
+4880	-13315.79526	402	0.01
+4890	-13315.79526	402	0.01
+4900	-13315.79526	402	0.01
+4910	-13315.79526	403	0.01
+4920	-13315.79526	403	0.01
+4930	-13315.79526	403	0.01
+4940	-13315.79526	403	0.01
+4950	-13315.79526	404	0.01
+4960	-13315.79526	404	0.01
+4970	-13315.79526	404	0.01
+4980	-13315.79526	404	0.01
+4990	-13315.79526	404	0.01
+5000	-13315.79526	405	0.01
+5010	-13315.79526	405	0.01
+5020	-13315.79526	405	0.01
+5030	-13315.79526	405	0.01
+5040	-13315.79526	406	0.01
+5050	-13315.79526	406	0.01
+5060	-13315.79526	406	0.01
+5070	-13315.79526	406	0.01
+5080	-13315.79526	406	0.01
+5090	-13315.79526	407	0.01
+5100	-13315.79526	407	0.01
+5110	-13315.79526	407	0.01
+5120	-13315.79526	407	0.01
+5130	-13315.79526	408	0.01
+5140	-13315.79526	408	0.01
+5150	-13315.79526	408	0.01
+5160	-13315.79526	408	0.01
+5170	-13315.79526	408	0.01
+5180	-13315.79526	409	0.01
+5190	-13315.79526	409	0.01
+5200	-13315.79526	409	0.01
+5210	-13315.79526	409	0.01
+5220	-13315.79526	409	0.01
+5230	-13315.79526	410	0.01
+5240	-13315.79359	410	0.01
+5250	-13315.79359	410	0.01
+5260	-13315.79359	410	0.01
+5270	-13315.79359	411	0.01
+5280	-13315.79359	411	0.01
+5290	-13315.79359	411	0.01
+5300	-13315.79359	411	0.01
+5310	-13315.79359	411	0.01
+5320	-13315.79359	412	0.01
+5330	-13315.79355	412	0.01
+5340	-13315.79355	412	0.01
+5350	-13315.79355	412	0.01
+5360	-13315.79355	412	0.01
+5370	-13315.79355	413	0.01
+5380	-13315.79355	413	0.01
+5390	-13315.79355	413	0.01
+5400	-13315.79355	413	0.01
+5410	-13315.79355	413	0.01
+5420	-13315.79355	414	0.01
+5430	-13315.79351	414	0.01
+5440	-13315.79351	414	0.01
+5450	-13315.79351	414	0.01
+5460	-13315.79351	415	0.01
+5470	-13315.79351	415	0.01
+5480	-13315.79351	415	0.01
+5490	-13315.79351	415	0.01
+5500	-13315.79327	416	0.01
+5510	-13315.79317	416	0.01
+5520	-13315.79317	416	0.01
+5530	-13315.79317	416	0.01
+5540	-13315.79305	416	0.01
+5550	-13315.79305	417	0.01
+5560	-13315.79305	417	0.01
+5570	-13315.79305	417	0.01
+5580	-13315.79305	417	0.01
+5590	-13315.79305	418	0.01
+5600	-13315.79305	418	0.01
+5610	-13315.79305	418	0.01
+5620	-13315.79305	418	0.01
+5630	-13315.79305	418	0.01
+5640	-13315.79305	419	0.01
+5650	-13315.79282	419	0.01
+5660	-13315.79282	419	0.01
+5670	-13315.79281	419	0.01
+5680	-13315.79281	420	0.01
+5690	-13315.79281	420	0.01
+5700	-13315.79281	420	0.01
+5710	-13315.79281	420	0.01
+5720	-13315.79281	420	0.01
+5730	-13315.79273	421	0.01
+5740	-13315.79273	421	0.01
+5750	-13315.79273	421	0.01
+5760	-13315.79273	421	0.01
+5770	-13315.79273	422	0.01
+5780	-13315.79273	422	0.01
+5790	-13315.79273	422	0.01
+5800	-13315.79143	422	0.01
+5810	-13315.79143	422	0.01
+5820	-13315.79143	423	0.01
+5830	-13315.79143	423	0.01
+5840	-13315.79143	423	0.01
+5850	-13315.79143	423	0.01
+5860	-13315.79143	423	0.01
+5870	-13315.79143	423	0.01
+5880	-13315.79143	424	0.01
+5890	-13315.79143	424	0.01
+5900	-13315.79143	424	0.01
+5910	-13315.7914	424	0.01
+5920	-13315.7914	424	0.01
+5930	-13315.7914	424	0.01
+5940	-13315.7914	425	0.01
+5950	-13315.7914	425	0.01
+5960	-13315.7914	425	0.01
+5970	-13315.7914	425	0.01
+5980	-13315.7914	425	0.01
+5990	-13315.7914	425	0.01
+6000	-13315.7914	426	0.01
+6010	-13315.7914	426	0.01
+6020	-13315.7914	426	0.01
+6030	-13315.7914	426	0.01
+6040	-13315.7914	426	0.01
+6050	-13315.7914	426	0.01
+6060	-13315.7914	427	0.01
+6070	-13315.7914	427	0.01
+6080	-13315.7914	427	0.01
+6090	-13315.79121	427	0.01
+6100	-13315.79121	427	0.01
+6110	-13315.79121	427	0.01
+6120	-13315.79121	428	0.01
+6130	-13315.79121	428	0.01
+6140	-13315.79121	428	0.01
+6150	-13315.79103	428	0.01
+6160	-13315.79103	428	0.01
+6170	-13315.79103	428	0.01
+6180	-13315.79103	429	0.01
+6190	-13315.79103	429	0.01
+6200	-13315.79103	429	0.01
+6210	-13315.78959	429	0.01
+6220	-13315.78959	429	0.01
+6230	-13315.78959	430	0.01
+6240	-13315.78959	430	0.01
+6250	-13315.78959	430	0.01
+6260	-13315.78959	430	0.01
+6270	-13315.78959	430	0.01
+6280	-13315.78959	430	0.01
+6290	-13315.78959	431	0.01
+6300	-13315.78959	431	0.01
+6310	-13315.78907	431	0.01
+6320	-13315.78907	431	0.01
+6330	-13315.78907	431	0.01
+6340	-13315.78907	432	0.01
+6350	-13315.78888	432	0.01
+6360	-13315.78888	432	0.01
+6370	-13315.78812	432	0.01
+6380	-13315.78762	432	0.01
+6390	-13315.78762	432	0.01
+6400	-13315.78762	432	0.01
+6410	-13315.78759	433	0.01
+6420	-13315.78759	433	0.01
+6430	-13315.78759	433	0.01
+6440	-13315.78753	433	0.01
+6450	-13315.78753	433	0.01
+6460	-13315.78753	433	0.01
+6470	-13315.78753	434	0.01
+6480	-13315.78753	434	0.01
+6490	-13315.78753	434	0.01
+6500	-13315.78753	434	0.01
+6510	-13315.78753	434	0.01
+6520	-13315.78753	434	0.01
+6530	-13315.78753	435	0.01
+6540	-13315.78753	435	0.01
+6550	-13315.78683	435	0.01
+6560	-13315.78683	435	0.01
+6570	-13315.78682	435	0.01
+6580	-13315.78682	435	0.01
+6590	-13315.78682	435	0.01
+6600	-13315.78682	436	0.01
+6610	-13315.78682	436	0.01
+6620	-13315.78682	436	0.01
+6630	-13315.78672	436	0.01
+6640	-13315.78672	436	0.01
+6650	-13315.78672	436	0.01
+6660	-13315.78672	436	0.01
+6670	-13315.78672	437	0.01
+6680	-13315.78672	437	0.01
+6690	-13315.78672	437	0.01
+6700	-13315.78672	437	0.01
+6710	-13315.78672	437	0.01
+6720	-13315.78672	437	0.01
+6730	-13315.78669	437	0.01
+6740	-13315.78669	438	0.01
+6750	-13315.78669	438	0.01
+6760	-13315.78669	438	0.01
+6770	-13315.78669	438	0.01
+6780	-13315.78669	438	0.01
+6790	-13315.78669	438	0.01
+6800	-13315.78669	438	0.01
+6810	-13315.78669	439	0.01
+6820	-13315.78669	439	0.01
+6830	-13315.78669	439	0.01
+6840	-13315.78669	439	0.01
+6850	-13315.78669	439	0.01
+6860	-13315.78669	439	0.01
+6870	-13315.78669	439	0.01
+6880	-13315.78669	440	0.01
+6890	-13315.78669	440	0.01
+6900	-13315.78669	440	0.01
+6910	-13315.78657	440	0.01
+6920	-13315.78657	440	0.01
+6930	-13315.78657	440	0.01
+6940	-13315.78657	440	0.01
+6950	-13315.78657	440	0.01
+6960	-13315.78657	441	0.01
+6970	-13315.78657	441	0.01
+6980	-13315.78657	441	0.01
+6990	-13315.78657	441	0.01
+7000	-13315.78657	441	0.01
+7010	-13315.78657	441	0.01
+7020	-13315.78646	441	0.01
+7030	-13315.78646	442	0.01
+7040	-13315.78646	442	0.01
+7050	-13315.78646	442	0.01
+7060	-13315.78646	442	0.01
+7070	-13315.78646	442	0.01
+7080	-13315.78646	442	0.01
+7090	-13315.78646	442	0.01
+7100	-13315.78646	443	0.01
+7110	-13315.78646	443	0.01
+7120	-13315.78646	443	0.01
+7130	-13315.78646	443	0.01
+7140	-13315.78646	443	0.01
+7150	-13315.78646	443	0.01
+7160	-13315.78646	444	0.01
+7170	-13315.78646	444	0.01
+7180	-13315.78646	444	0.01
+7190	-13315.78646	444	0.01
+7200	-13315.78646	444	0.01
+7210	-13315.78646	444	0.01
+7220	-13315.78646	444	0.01
+7230	-13315.78646	445	0.01
+7240	-13315.78646	445	0.01
+7250	-13315.78646	445	0.01
+7260	-13315.78646	445	0.01
+7270	-13315.78646	445	0.01
+7280	-13315.78646	445	0.01
+7290	-13315.78646	445	0.01
+7300	-13315.78646	446	0.01
+7310	-13315.78646	446	0.01
+7320	-13315.78646	446	0.01
+7330	-13315.78646	446	0.01
+7340	-13315.78646	446	0.01
+7350	-13315.78646	446	0.01
+7360	-13315.78646	446	0.01
+7370	-13315.78646	447	0.01
+7380	-13315.78646	447	0.01
+7390	-13315.78646	447	0.01
+7400	-13315.78646	447	0.01
+7410	-13315.78646	447	0.01
+7420	-13315.78646	447	0.01
+7430	-13315.78646	447	0.01
+7440	-13315.78646	448	0.01
+7450	-13315.78646	448	0.01
+7460	-13315.78646	448	0.01
+7470	-13315.78646	448	0.01
+7480	-13315.78646	448	0.01
+7490	-13315.78646	448	0.01
+7500	-13315.78646	448	0.01
+7510	-13315.78646	449	0.01
+7520	-13315.78589	449	0.01
+7530	-13315.78589	449	0.01
+7540	-13315.78589	449	0.01
+7550	-13315.78589	449	0.01
+7560	-13315.78589	449	0.01
+7570	-13315.78589	450	0.01
+7580	-13315.78589	450	0.01
+7590	-13315.78589	450	0.01
+7600	-13315.78589	450	0.01
+7610	-13315.78589	450	0.01
+7620	-13315.78589	451	0.01
+7630	-13315.78496	451	0.01
+7640	-13315.78496	451	0.01
+7650	-13315.78496	451	0.01
+7660	-13315.78496	452	0.01
+7670	-13315.78496	452	0.01
+7680	-13315.78484	452	0.01
+7690	-13315.78481	452	0.01
+7700	-13315.78481	452	0.01
+7710	-13315.78481	453	0.01
+7720	-13315.78481	453	0.01
+7730	-13315.78481	453	0.01
+7740	-13315.78481	453	0.01
+7750	-13315.78481	454	0.01
+7760	-13315.78481	454	0.01
+7770	-13315.78481	454	0.01
+7780	-13315.78481	454	0.01
+7790	-13315.78481	454	0.01
+7800	-13315.78481	455	0.01
+7810	-13315.78418	455	0.01
+7820	-13315.78418	455	0.01
+7830	-13315.78418	455	0.01
+7840	-13315.78418	455	0.01
+7850	-13315.78418	456	0.01
+7860	-13315.78418	456	0.01
+7870	-13315.78418	456	0.01
+7880	-13315.78418	456	0.01
+7890	-13315.78418	456	0.01
+7900	-13315.78418	457	0.01
+7910	-13315.78418	457	0.01
+7920	-13315.78418	457	0.01
+7930	-13315.78418	457	0.01
+7940	-13315.78418	457	0.01
+7950	-13315.78418	458	0.01
+7960	-13315.78418	458	0.01
+7970	-13315.78418	458	0.01
+7980	-13315.78418	458	0.01
+7990	-13315.78418	458	0.01
+8000	-13315.78418	459	0.01
+8010	-13315.78418	459	0.01
+8020	-13315.78418	459	0.01
+8030	-13315.78418	459	0.01
+8040	-13315.78418	459	0.01
+8050	-13315.78418	460	0.01
+8060	-13315.78418	460	0.01
+8070	-13315.78418	460	0.01
+8080	-13315.78418	460	0.01
+8090	-13315.78418	461	0.01
+8100	-13315.78418	461	0.01
+8110	-13315.78418	461	0.01
+8120	-13315.78418	461	0.01
+8130	-13315.78418	461	0.01
+8140	-13315.78418	462	0.01
+8150	-13315.78418	462	0.01
+8160	-13315.78418	462	0.01
+8170	-13315.78418	462	0.01
+8180	-13315.78418	462	0.01
+8190	-13315.78418	463	0.01
+8200	-13315.78418	463	0.01
+Score after final optimization: -13315.77218
+Final	-13315.77218	466	0.01
+Search rep 5 (of 5)
+random seed = 1922346580
+gen	best_like	time	optPrecision
+0	-13319.99284	467	0.5
+10	-13319.76095	467	0.5
+20	-13319.70018	468	0.5
+30	-13319.63555	468	0.5
+40	-13319.49603	468	0.5
+50	-13319.18633	468	0.5
+60	-13319.18532	468	0.5
+70	-13319.08671	468	0.5
+80	-13318.98798	468	0.5
+90	-13318.97757	469	0.5
+100	-13318.89307	469	0.5
+110	-13318.75436	469	0.5
+120	-13318.69836	469	0.5
+130	-13318.59378	469	0.5
+140	-13318.5079	469	0.5
+150	-13318.42449	470	0.5
+160	-13318.31475	470	0.5
+170	-13318.31475	470	0.5
+180	-13318.21475	470	0.5
+190	-13318.19611	470	0.5
+200	-13318.14024	470	0.5
+210	-13318.13844	470	0.5
+220	-13318.12972	471	0.5
+230	-13318.12972	471	0.5
+240	-13318.08978	471	0.5
+250	-13317.99067	471	0.5
+260	-13317.99067	471	0.5
+270	-13317.79027	471	0.5
+280	-13317.79027	471	0.5
+290	-13317.75134	472	0.5
+300	-13317.74894	472	0.5
+310	-13317.70056	472	0.5
+320	-13317.69769	472	0.5
+330	-13317.65426	472	0.5
+340	-13317.65404	472	0.5
+350	-13317.64935	472	0.5
+360	-13317.58268	472	0.5
+370	-13317.53005	472	0.5
+380	-13317.43266	472	0.5
+390	-13317.40829	472	0.5
+400	-13317.40829	473	0.5
+410	-13317.28143	473	0.5
+420	-13317.27859	473	0.5
+430	-13317.14806	473	0.5
+440	-13317.05268	473	0.5
+450	-13316.99617	473	0.5
+460	-13316.96588	473	0.5
+470	-13316.94562	473	0.5
+480	-13316.88107	473	0.5
+490	-13316.84664	473	0.5
+500	-13316.81576	474	0.5
+510	-13316.71105	474	0.402
+520	-13316.69375	474	0.402
+530	-13316.64256	474	0.402
+540	-13316.64256	474	0.402
+550	-13316.63836	474	0.402
+560	-13316.62322	474	0.402
+570	-13316.55017	474	0.402
+580	-13316.55017	474	0.402
+590	-13316.54717	475	0.402
+600	-13316.54611	475	0.402
+610	-13316.53539	475	0.402
+620	-13316.53157	475	0.402
+630	-13316.43549	475	0.402
+640	-13316.43549	475	0.402
+650	-13316.43549	475	0.402
+660	-13316.43549	475	0.402
+670	-13316.43549	475	0.402
+680	-13316.43549	475	0.402
+690	-13316.43549	476	0.402
+700	-13316.43549	476	0.402
+710	-13316.4086	476	0.402
+720	-13316.40273	476	0.402
+730	-13316.37552	476	0.402
+740	-13316.37187	476	0.402
+750	-13316.3702	476	0.402
+760	-13316.3702	476	0.402
+770	-13316.35655	477	0.402
+780	-13316.34464	477	0.402
+790	-13316.34464	477	0.402
+800	-13316.34464	477	0.402
+810	-13316.33891	477	0.402
+820	-13316.33662	477	0.402
+830	-13316.32935	477	0.402
+840	-13316.32729	477	0.402
+850	-13316.32729	478	0.402
+860	-13316.32729	478	0.402
+870	-13316.32729	478	0.402
+880	-13316.30352	478	0.402
+890	-13316.30352	478	0.402
+900	-13316.30352	478	0.402
+910	-13316.30352	478	0.402
+920	-13316.30352	478	0.402
+930	-13316.28992	479	0.402
+940	-13316.2777	479	0.402
+950	-13316.27239	479	0.402
+960	-13316.26332	479	0.402
+970	-13316.26332	479	0.402
+980	-13316.26332	479	0.402
+990	-13316.23841	479	0.402
+1000	-13316.23695	479	0.402
+1010	-13316.20227	480	0.304
+1020	-13316.20227	480	0.304
+1030	-13316.20227	480	0.304
+1040	-13316.20227	480	0.304
+1050	-13316.19131	480	0.304
+1060	-13316.1868	480	0.304
+1070	-13316.17517	480	0.304
+1080	-13316.17109	481	0.304
+1090	-13316.17109	481	0.304
+1100	-13316.15384	481	0.304
+1110	-13316.15384	481	0.304
+1120	-13316.15384	481	0.304
+1130	-13316.15384	481	0.304
+1140	-13316.15384	481	0.304
+1150	-13316.15384	482	0.304
+1160	-13316.14933	482	0.304
+1170	-13316.12856	482	0.304
+1180	-13316.09176	482	0.304
+1190	-13316.09176	482	0.304
+1200	-13316.07887	482	0.304
+1210	-13316.07887	482	0.304
+1220	-13316.07887	482	0.304
+1230	-13316.07887	483	0.304
+1240	-13316.07887	483	0.304
+1250	-13316.07887	483	0.304
+1260	-13316.07576	483	0.304
+1270	-13316.07576	483	0.304
+1280	-13316.07396	483	0.304
+1290	-13316.05162	483	0.304
+1300	-13316.05162	484	0.304
+1310	-13316.05162	484	0.304
+1320	-13316.05162	484	0.304
+1330	-13316.02759	484	0.304
+1340	-13316.02759	484	0.304
+1350	-13316.02759	484	0.304
+1360	-13316.02759	484	0.304
+1370	-13316.02759	485	0.304
+1380	-13316.02759	485	0.304
+1390	-13316.0267	485	0.304
+1400	-13316.0267	485	0.304
+1410	-13316.02643	485	0.304
+1420	-13316.02643	485	0.304
+1430	-13316.02643	485	0.304
+1440	-13316.02643	485	0.304
+1450	-13316.02643	486	0.304
+1460	-13316.02643	486	0.304
+1470	-13316.02643	486	0.304
+1480	-13316.02643	486	0.304
+1490	-13316.02643	486	0.304
+1500	-13316.02317	486	0.304
+1510	-13316.00151	487	0.206
+1520	-13315.99882	487	0.206
+1530	-13315.99792	487	0.206
+1540	-13315.99341	487	0.206
+1550	-13315.98703	487	0.206
+1560	-13315.98703	487	0.206
+1570	-13315.98703	487	0.206
+1580	-13315.98648	487	0.206
+1590	-13315.98648	488	0.206
+1600	-13315.98648	488	0.206
+1610	-13315.98648	488	0.206
+1620	-13315.98648	488	0.206
+1630	-13315.98648	488	0.206
+1640	-13315.98648	488	0.206
+1650	-13315.98598	489	0.206
+1660	-13315.98598	489	0.206
+1670	-13315.98411	489	0.206
+1680	-13315.98347	489	0.206
+1690	-13315.97194	489	0.206
+1700	-13315.96749	489	0.206
+1710	-13315.96517	490	0.206
+1720	-13315.96354	490	0.206
+1730	-13315.96354	490	0.206
+1740	-13315.9587	490	0.206
+1750	-13315.94803	490	0.206
+1760	-13315.94456	490	0.206
+1770	-13315.94454	491	0.206
+1780	-13315.94454	491	0.206
+1790	-13315.92242	491	0.206
+1800	-13315.92242	491	0.206
+1810	-13315.92242	491	0.206
+1820	-13315.92242	491	0.206
+1830	-13315.92242	491	0.206
+1840	-13315.92236	492	0.206
+1850	-13315.92236	492	0.206
+1860	-13315.92151	492	0.206
+1870	-13315.92151	492	0.206
+1880	-13315.92151	492	0.206
+1890	-13315.92151	492	0.206
+1900	-13315.92151	493	0.206
+1910	-13315.92043	493	0.206
+1920	-13315.92041	493	0.206
+1930	-13315.92041	493	0.206
+1940	-13315.92041	493	0.206
+1950	-13315.91985	493	0.206
+1960	-13315.91985	494	0.206
+1970	-13315.91961	494	0.206
+1980	-13315.91961	494	0.206
+1990	-13315.91961	494	0.206
+2000	-13315.91961	494	0.206
+2010	-13315.91356	494	0.108
+2020	-13315.90952	494	0.108
+2030	-13315.90952	495	0.108
+2040	-13315.90952	495	0.108
+2050	-13315.90952	495	0.108
+2060	-13315.90952	495	0.108
+2070	-13315.90952	495	0.108
+2080	-13315.90952	495	0.108
+2090	-13315.90952	496	0.108
+2100	-13315.90952	496	0.108
+2110	-13315.90711	496	0.108
+2120	-13315.90711	496	0.108
+2130	-13315.90711	496	0.108
+2140	-13315.90711	496	0.108
+2150	-13315.906	496	0.108
+2160	-13315.906	497	0.108
+2170	-13315.90456	497	0.108
+2180	-13315.90373	497	0.108
+2190	-13315.90373	497	0.108
+2200	-13315.90372	497	0.108
+2210	-13315.90149	497	0.108
+2220	-13315.90139	498	0.108
+2230	-13315.90074	498	0.108
+2240	-13315.90074	498	0.108
+2250	-13315.89847	498	0.108
+2260	-13315.89847	498	0.108
+2270	-13315.89847	498	0.108
+2280	-13315.89847	499	0.108
+2290	-13315.89847	499	0.108
+2300	-13315.89847	499	0.108
+2310	-13315.89847	499	0.108
+2320	-13315.88899	499	0.108
+2330	-13315.88899	499	0.108
+2340	-13315.88899	500	0.108
+2350	-13315.88899	500	0.108
+2360	-13315.88899	500	0.108
+2370	-13315.88899	500	0.108
+2380	-13315.88899	500	0.108
+2390	-13315.88899	500	0.108
+2400	-13315.88899	501	0.108
+2410	-13315.88899	501	0.108
+2420	-13315.88899	501	0.108
+2430	-13315.88899	501	0.108
+2440	-13315.87966	501	0.108
+2450	-13315.87966	501	0.108
+2460	-13315.87966	502	0.108
+2470	-13315.87966	502	0.108
+2480	-13315.87966	502	0.108
+2490	-13315.87957	502	0.108
+2500	-13315.87957	502	0.108
+2510	-13315.85394	502	0.01
+2520	-13315.85362	503	0.01
+2530	-13315.85362	503	0.01
+2540	-13315.85362	503	0.01
+2550	-13315.85236	503	0.01
+2560	-13315.85236	504	0.01
+2570	-13315.85236	504	0.01
+2580	-13315.85236	504	0.01
+2590	-13315.85236	504	0.01
+2600	-13315.85236	504	0.01
+2610	-13315.85236	504	0.01
+2620	-13315.85236	505	0.01
+2630	-13315.85046	505	0.01
+2640	-13315.85046	505	0.01
+2650	-13315.85046	505	0.01
+2660	-13315.85046	505	0.01
+2670	-13315.85024	506	0.01
+2680	-13315.85024	506	0.01
+2690	-13315.84355	506	0.01
+2700	-13315.84192	506	0.01
+2710	-13315.84192	506	0.01
+2720	-13315.84192	507	0.01
+2730	-13315.84192	507	0.01
+2740	-13315.84192	507	0.01
+2750	-13315.84192	507	0.01
+2760	-13315.84192	507	0.01
+2770	-13315.84186	507	0.01
+2780	-13315.84186	508	0.01
+2790	-13315.83994	508	0.01
+2800	-13315.83994	508	0.01
+2810	-13315.83994	508	0.01
+2820	-13315.83994	509	0.01
+2830	-13315.83994	509	0.01
+2840	-13315.83994	509	0.01
+2850	-13315.83994	509	0.01
+2860	-13315.83994	509	0.01
+2870	-13315.83994	509	0.01
+2880	-13315.83925	510	0.01
+2890	-13315.83797	510	0.01
+2900	-13315.83797	510	0.01
+2910	-13315.83797	510	0.01
+2920	-13315.83574	510	0.01
+2930	-13315.83574	511	0.01
+2940	-13315.83574	511	0.01
+2950	-13315.83114	511	0.01
+2960	-13315.83114	511	0.01
+2970	-13315.83114	511	0.01
+2980	-13315.83114	511	0.01
+2990	-13315.83098	512	0.01
+3000	-13315.83098	512	0.01
+3010	-13315.83098	512	0.01
+3020	-13315.83097	512	0.01
+3030	-13315.83097	512	0.01
+3040	-13315.83097	513	0.01
+3050	-13315.83097	513	0.01
+3060	-13315.83097	513	0.01
+3070	-13315.83097	513	0.01
+3080	-13315.83097	513	0.01
+3090	-13315.83097	514	0.01
+3100	-13315.82923	514	0.01
+3110	-13315.82923	514	0.01
+3120	-13315.82923	514	0.01
+3130	-13315.82923	514	0.01
+3140	-13315.82923	514	0.01
+3150	-13315.82923	515	0.01
+3160	-13315.82922	515	0.01
+3170	-13315.82922	515	0.01
+3180	-13315.82922	515	0.01
+3190	-13315.82922	515	0.01
+3200	-13315.82922	516	0.01
+3210	-13315.82922	516	0.01
+3220	-13315.82922	516	0.01
+3230	-13315.82922	516	0.01
+3240	-13315.82919	516	0.01
+3250	-13315.82896	517	0.01
+3260	-13315.82896	517	0.01
+3270	-13315.82896	517	0.01
+3280	-13315.82896	517	0.01
+3290	-13315.82896	517	0.01
+3300	-13315.82896	518	0.01
+3310	-13315.82896	518	0.01
+3320	-13315.82896	518	0.01
+3330	-13315.82896	518	0.01
+3340	-13315.82896	518	0.01
+3350	-13315.82896	519	0.01
+3360	-13315.82896	519	0.01
+3370	-13315.82896	519	0.01
+3380	-13315.82881	519	0.01
+3390	-13315.82881	519	0.01
+3400	-13315.82881	519	0.01
+3410	-13315.82881	519	0.01
+3420	-13315.82679	520	0.01
+3430	-13315.82679	520	0.01
+3440	-13315.82679	520	0.01
+3450	-13315.82679	520	0.01
+3460	-13315.82602	520	0.01
+3470	-13315.82602	520	0.01
+3480	-13315.82602	520	0.01
+3490	-13315.82602	520	0.01
+3500	-13315.82602	521	0.01
+3510	-13315.82602	521	0.01
+3520	-13315.82602	521	0.01
+3530	-13315.82602	521	0.01
+3540	-13315.82602	521	0.01
+3550	-13315.82602	521	0.01
+3560	-13315.82602	522	0.01
+3570	-13315.82548	522	0.01
+3580	-13315.82548	522	0.01
+3590	-13315.82548	522	0.01
+3600	-13315.82548	522	0.01
+3610	-13315.82548	522	0.01
+3620	-13315.82548	523	0.01
+3630	-13315.82548	523	0.01
+3640	-13315.82548	523	0.01
+3650	-13315.82533	523	0.01
+3660	-13315.82533	523	0.01
+3670	-13315.82533	523	0.01
+3680	-13315.82533	523	0.01
+3690	-13315.82533	524	0.01
+3700	-13315.82533	524	0.01
+3710	-13315.82093	524	0.01
+3720	-13315.82093	524	0.01
+3730	-13315.82093	524	0.01
+3740	-13315.82093	524	0.01
+3750	-13315.82093	524	0.01
+3760	-13315.82093	525	0.01
+3770	-13315.82093	525	0.01
+3780	-13315.82093	525	0.01
+3790	-13315.82093	525	0.01
+3800	-13315.82093	525	0.01
+3810	-13315.82093	525	0.01
+3820	-13315.82093	525	0.01
+3830	-13315.82093	526	0.01
+3840	-13315.82093	526	0.01
+3850	-13315.82093	526	0.01
+3860	-13315.82093	526	0.01
+3870	-13315.82093	526	0.01
+3880	-13315.82093	526	0.01
+3890	-13315.82093	526	0.01
+3900	-13315.82093	526	0.01
+3910	-13315.82067	527	0.01
+3920	-13315.82067	527	0.01
+3930	-13315.82067	527	0.01
+3940	-13315.82067	527	0.01
+3950	-13315.82067	527	0.01
+3960	-13315.82067	527	0.01
+3970	-13315.82067	528	0.01
+3980	-13315.82066	528	0.01
+3990	-13315.82066	528	0.01
+4000	-13315.82066	528	0.01
+4010	-13315.82066	528	0.01
+4020	-13315.82066	528	0.01
+4030	-13315.82066	528	0.01
+4040	-13315.82066	529	0.01
+4050	-13315.82066	529	0.01
+4060	-13315.82066	529	0.01
+4070	-13315.82066	529	0.01
+4080	-13315.82066	529	0.01
+4090	-13315.82066	529	0.01
+4100	-13315.82066	530	0.01
+4110	-13315.82066	530	0.01
+4120	-13315.82066	530	0.01
+4130	-13315.82066	530	0.01
+4140	-13315.82066	530	0.01
+4150	-13315.82066	530	0.01
+4160	-13315.82029	530	0.01
+4170	-13315.82029	531	0.01
+4180	-13315.82029	531	0.01
+4190	-13315.82029	531	0.01
+4200	-13315.81756	531	0.01
+4210	-13315.81756	531	0.01
+4220	-13315.81754	531	0.01
+4230	-13315.81754	531	0.01
+4240	-13315.81731	532	0.01
+4250	-13315.81731	532	0.01
+4260	-13315.81731	532	0.01
+4270	-13315.81731	532	0.01
+4280	-13315.81348	532	0.01
+4290	-13315.81348	532	0.01
+4300	-13315.81298	532	0.01
+4310	-13315.81298	533	0.01
+4320	-13315.81298	533	0.01
+4330	-13315.81298	533	0.01
+4340	-13315.81298	533	0.01
+4350	-13315.81298	533	0.01
+4360	-13315.81298	533	0.01
+4370	-13315.81298	534	0.01
+4380	-13315.81298	534	0.01
+4390	-13315.81273	534	0.01
+4400	-13315.81273	534	0.01
+4410	-13315.81273	534	0.01
+4420	-13315.81273	534	0.01
+4430	-13315.81273	534	0.01
+4440	-13315.81273	534	0.01
+4450	-13315.81273	535	0.01
+4460	-13315.81273	535	0.01
+4470	-13315.81273	535	0.01
+4480	-13315.81219	535	0.01
+4490	-13315.81219	535	0.01
+4500	-13315.81219	535	0.01
+4510	-13315.81219	535	0.01
+4520	-13315.81219	535	0.01
+4530	-13315.81219	536	0.01
+4540	-13315.81219	536	0.01
+4550	-13315.81219	536	0.01
+4560	-13315.81219	536	0.01
+4570	-13315.81219	536	0.01
+4580	-13315.81219	536	0.01
+4590	-13315.81219	537	0.01
+4600	-13315.81219	537	0.01
+4610	-13315.81219	537	0.01
+4620	-13315.81219	537	0.01
+4630	-13315.80919	537	0.01
+4640	-13315.80919	537	0.01
+4650	-13315.80919	537	0.01
+4660	-13315.80919	537	0.01
+4670	-13315.80919	538	0.01
+4680	-13315.80892	538	0.01
+4690	-13315.80892	538	0.01
+4700	-13315.80892	538	0.01
+4710	-13315.80892	538	0.01
+4720	-13315.80892	538	0.01
+4730	-13315.80892	538	0.01
+4740	-13315.80892	538	0.01
+4750	-13315.80892	539	0.01
+4760	-13315.80874	539	0.01
+4770	-13315.80801	539	0.01
+4780	-13315.80801	539	0.01
+4790	-13315.80801	539	0.01
+4800	-13315.80801	539	0.01
+4810	-13315.80801	539	0.01
+4820	-13315.80801	539	0.01
+4830	-13315.80801	540	0.01
+4840	-13315.80801	540	0.01
+4850	-13315.80801	540	0.01
+4860	-13315.80801	540	0.01
+4870	-13315.80801	540	0.01
+4880	-13315.80801	540	0.01
+4890	-13315.80801	541	0.01
+4900	-13315.80801	541	0.01
+4910	-13315.80801	541	0.01
+4920	-13315.80801	541	0.01
+4930	-13315.80801	541	0.01
+4940	-13315.80801	541	0.01
+4950	-13315.80801	542	0.01
+4960	-13315.80801	542	0.01
+4970	-13315.80801	542	0.01
+4980	-13315.80801	542	0.01
+4990	-13315.80801	542	0.01
+5000	-13315.80801	542	0.01
+5010	-13315.80801	542	0.01
+5020	-13315.80801	542	0.01
+5030	-13315.80801	543	0.01
+5040	-13315.80801	543	0.01
+5050	-13315.80801	543	0.01
+5060	-13315.80801	543	0.01
+5070	-13315.80801	543	0.01
+5080	-13315.80801	543	0.01
+5090	-13315.80801	543	0.01
+5100	-13315.80801	544	0.01
+5110	-13315.80801	544	0.01
+5120	-13315.80801	544	0.01
+5130	-13315.80801	544	0.01
+5140	-13315.80801	544	0.01
+5150	-13315.80801	544	0.01
+5160	-13315.80801	544	0.01
+5170	-13315.80801	545	0.01
+5180	-13315.80801	545	0.01
+5190	-13315.80801	545	0.01
+5200	-13315.80801	545	0.01
+5210	-13315.80801	545	0.01
+5220	-13315.80801	545	0.01
+5230	-13315.80801	545	0.01
+5240	-13315.80798	546	0.01
+5250	-13315.80798	546	0.01
+5260	-13315.80798	546	0.01
+5270	-13315.80798	546	0.01
+5280	-13315.80798	546	0.01
+5290	-13315.80798	546	0.01
+5300	-13315.80796	546	0.01
+5310	-13315.80796	547	0.01
+5320	-13315.80796	547	0.01
+5330	-13315.80796	547	0.01
+5340	-13315.80763	547	0.01
+5350	-13315.80763	547	0.01
+5360	-13315.80763	547	0.01
+5370	-13315.80763	547	0.01
+5380	-13315.80763	547	0.01
+5390	-13315.80763	548	0.01
+5400	-13315.80763	548	0.01
+5410	-13315.80763	548	0.01
+5420	-13315.80763	548	0.01
+5430	-13315.80763	548	0.01
+5440	-13315.80763	548	0.01
+5450	-13315.80763	549	0.01
+5460	-13315.80763	549	0.01
+5470	-13315.80763	549	0.01
+5480	-13315.80763	549	0.01
+5490	-13315.80763	549	0.01
+5500	-13315.80763	549	0.01
+5510	-13315.80763	549	0.01
+5520	-13315.80758	550	0.01
+5530	-13315.80758	550	0.01
+5540	-13315.80758	550	0.01
+5550	-13315.80758	550	0.01
+5560	-13315.80715	550	0.01
+5570	-13315.80715	550	0.01
+5580	-13315.80715	551	0.01
+5590	-13315.80715	551	0.01
+5600	-13315.80715	551	0.01
+5610	-13315.80715	551	0.01
+5620	-13315.80715	551	0.01
+5630	-13315.80715	551	0.01
+5640	-13315.80715	551	0.01
+5650	-13315.80715	552	0.01
+5660	-13315.80715	552	0.01
+5670	-13315.80715	552	0.01
+5680	-13315.80715	552	0.01
+5690	-13315.80715	552	0.01
+5700	-13315.80715	552	0.01
+5710	-13315.80715	552	0.01
+5720	-13315.80715	553	0.01
+5730	-13315.80715	553	0.01
+5740	-13315.80715	553	0.01
+5750	-13315.80715	553	0.01
+5760	-13315.80715	553	0.01
+5770	-13315.80715	553	0.01
+5780	-13315.80715	553	0.01
+5790	-13315.80715	554	0.01
+5800	-13315.80715	554	0.01
+5810	-13315.80715	554	0.01
+5820	-13315.80715	554	0.01
+5830	-13315.80715	554	0.01
+5840	-13315.80715	554	0.01
+5850	-13315.80715	554	0.01
+5860	-13315.80715	555	0.01
+5870	-13315.80715	555	0.01
+5880	-13315.80715	555	0.01
+5890	-13315.80715	555	0.01
+5900	-13315.80715	555	0.01
+5910	-13315.80715	555	0.01
+5920	-13315.80715	555	0.01
+5930	-13315.80656	556	0.01
+5940	-13315.80656	556	0.01
+5950	-13315.80656	556	0.01
+5960	-13315.80656	556	0.01
+5970	-13315.80656	556	0.01
+5980	-13315.80656	556	0.01
+5990	-13315.80656	556	0.01
+6000	-13315.80656	557	0.01
+6010	-13315.80656	557	0.01
+6020	-13315.80656	557	0.01
+6030	-13315.80656	557	0.01
+6040	-13315.80656	557	0.01
+6050	-13315.80656	557	0.01
+6060	-13315.80656	558	0.01
+6070	-13315.80656	558	0.01
+6080	-13315.80656	558	0.01
+6090	-13315.80656	558	0.01
+6100	-13315.80635	558	0.01
+6110	-13315.80635	558	0.01
+6120	-13315.80635	558	0.01
+6130	-13315.80634	559	0.01
+6140	-13315.80634	559	0.01
+6150	-13315.80634	559	0.01
+6160	-13315.80634	559	0.01
+6170	-13315.80634	559	0.01
+6180	-13315.80634	559	0.01
+6190	-13315.80634	559	0.01
+6200	-13315.80634	559	0.01
+6210	-13315.80634	560	0.01
+6220	-13315.80493	560	0.01
+6230	-13315.80493	560	0.01
+6240	-13315.80493	560	0.01
+6250	-13315.80493	560	0.01
+6260	-13315.80493	560	0.01
+6270	-13315.80493	561	0.01
+6280	-13315.80493	561	0.01
+6290	-13315.80493	561	0.01
+6300	-13315.80493	561	0.01
+6310	-13315.80493	561	0.01
+6320	-13315.80493	561	0.01
+6330	-13315.80493	561	0.01
+6340	-13315.80493	561	0.01
+6350	-13315.80493	562	0.01
+6360	-13315.80493	562	0.01
+6370	-13315.80493	562	0.01
+6380	-13315.80479	562	0.01
+6390	-13315.80479	562	0.01
+6400	-13315.80479	562	0.01
+6410	-13315.80479	562	0.01
+6420	-13315.80479	563	0.01
+6430	-13315.80479	563	0.01
+6440	-13315.80479	563	0.01
+6450	-13315.80479	563	0.01
+6460	-13315.80479	563	0.01
+6470	-13315.80479	563	0.01
+6480	-13315.80479	563	0.01
+6490	-13315.80479	564	0.01
+6500	-13315.80479	564	0.01
+6510	-13315.80479	564	0.01
+6520	-13315.80479	564	0.01
+6530	-13315.80469	564	0.01
+6540	-13315.80457	564	0.01
+6550	-13315.80457	564	0.01
+6560	-13315.80457	565	0.01
+6570	-13315.80457	565	0.01
+6580	-13315.80457	565	0.01
+6590	-13315.80457	565	0.01
+6600	-13315.80457	565	0.01
+6610	-13315.80457	565	0.01
+6620	-13315.80457	565	0.01
+6630	-13315.8023	566	0.01
+6640	-13315.8023	566	0.01
+6650	-13315.8023	566	0.01
+6660	-13315.8023	566	0.01
+6670	-13315.8023	566	0.01
+6680	-13315.8023	566	0.01
+6690	-13315.8023	566	0.01
+6700	-13315.8023	567	0.01
+6710	-13315.8023	567	0.01
+6720	-13315.80209	567	0.01
+6730	-13315.80172	567	0.01
+6740	-13315.80172	567	0.01
+6750	-13315.80172	567	0.01
+6760	-13315.80172	567	0.01
+6770	-13315.80172	568	0.01
+6780	-13315.80172	568	0.01
+6790	-13315.80172	568	0.01
+6800	-13315.80172	568	0.01
+6810	-13315.80172	568	0.01
+6820	-13315.80172	568	0.01
+6830	-13315.80172	568	0.01
+6840	-13315.80172	569	0.01
+6850	-13315.80172	569	0.01
+6860	-13315.80172	569	0.01
+6870	-13315.80172	569	0.01
+6880	-13315.80172	569	0.01
+6890	-13315.80172	569	0.01
+6900	-13315.80172	569	0.01
+6910	-13315.80172	570	0.01
+6920	-13315.80172	570	0.01
+6930	-13315.80172	570	0.01
+6940	-13315.80172	570	0.01
+6950	-13315.80172	570	0.01
+6960	-13315.80172	570	0.01
+6970	-13315.80172	570	0.01
+6980	-13315.80161	571	0.01
+6990	-13315.80161	571	0.01
+7000	-13315.80161	571	0.01
+7010	-13315.80161	571	0.01
+7020	-13315.80161	571	0.01
+7030	-13315.80161	571	0.01
+7040	-13315.80161	571	0.01
+7050	-13315.80161	571	0.01
+7060	-13315.80161	572	0.01
+7070	-13315.80161	572	0.01
+7080	-13315.79931	572	0.01
+7090	-13315.79931	572	0.01
+7100	-13315.79931	572	0.01
+7110	-13315.79931	572	0.01
+7120	-13315.79906	572	0.01
+7130	-13315.79906	573	0.01
+7140	-13315.79906	573	0.01
+7150	-13315.79906	573	0.01
+7160	-13315.79906	573	0.01
+7170	-13315.79906	573	0.01
+7180	-13315.79906	573	0.01
+7190	-13315.79906	573	0.01
+7200	-13315.79906	574	0.01
+7210	-13315.79906	574	0.01
+7220	-13315.79906	574	0.01
+7230	-13315.79906	574	0.01
+7240	-13315.79906	574	0.01
+7250	-13315.79906	574	0.01
+7260	-13315.79906	574	0.01
+7270	-13315.79906	574	0.01
+7280	-13315.79906	575	0.01
+7290	-13315.79906	575	0.01
+7300	-13315.79906	575	0.01
+7310	-13315.79869	575	0.01
+7320	-13315.79869	575	0.01
+7330	-13315.79869	575	0.01
+7340	-13315.79869	575	0.01
+7350	-13315.79869	576	0.01
+7360	-13315.79869	576	0.01
+7370	-13315.79869	576	0.01
+7380	-13315.79546	576	0.01
+7390	-13315.79546	576	0.01
+7400	-13315.79411	576	0.01
+7410	-13315.79411	576	0.01
+7420	-13315.79411	577	0.01
+7430	-13315.79411	577	0.01
+7440	-13315.79411	577	0.01
+7450	-13315.79393	577	0.01
+7460	-13315.79393	577	0.01
+7470	-13315.79393	577	0.01
+7480	-13315.79393	577	0.01
+7490	-13315.79393	578	0.01
+7500	-13315.79393	578	0.01
+7510	-13315.79393	578	0.01
+7520	-13315.79273	578	0.01
+7530	-13315.79273	578	0.01
+7540	-13315.79273	578	0.01
+7550	-13315.79273	578	0.01
+7560	-13315.79273	578	0.01
+7570	-13315.79273	579	0.01
+7580	-13315.79273	579	0.01
+7590	-13315.79273	579	0.01
+7600	-13315.79273	579	0.01
+7610	-13315.79273	579	0.01
+7620	-13315.79273	579	0.01
+7630	-13315.79273	580	0.01
+7640	-13315.79273	580	0.01
+7650	-13315.79273	580	0.01
+7660	-13315.79235	580	0.01
+7670	-13315.79235	580	0.01
+7680	-13315.79235	580	0.01
+7690	-13315.79234	580	0.01
+7700	-13315.79234	580	0.01
+7710	-13315.79234	581	0.01
+7720	-13315.79229	581	0.01
+7730	-13315.79229	581	0.01
+7740	-13315.79229	581	0.01
+7750	-13315.79229	581	0.01
+7760	-13315.79229	581	0.01
+7770	-13315.79229	581	0.01
+7780	-13315.79229	582	0.01
+7790	-13315.79229	582	0.01
+7800	-13315.79229	582	0.01
+7810	-13315.79229	582	0.01
+7820	-13315.79229	582	0.01
+7830	-13315.79227	582	0.01
+7840	-13315.79227	582	0.01
+7850	-13315.79227	583	0.01
+7860	-13315.79227	583	0.01
+7870	-13315.79212	583	0.01
+7880	-13315.79212	583	0.01
+7890	-13315.79212	583	0.01
+7900	-13315.79212	583	0.01
+7910	-13315.79212	583	0.01
+7920	-13315.79212	583	0.01
+7930	-13315.79212	584	0.01
+7940	-13315.79212	584	0.01
+7950	-13315.79212	584	0.01
+7960	-13315.79212	584	0.01
+7970	-13315.79212	584	0.01
+7980	-13315.79212	584	0.01
+7990	-13315.79212	584	0.01
+8000	-13315.79212	585	0.01
+8010	-13315.79212	585	0.01
+8020	-13315.79212	585	0.01
+8030	-13315.79212	585	0.01
+8040	-13315.79212	585	0.01
+8050	-13315.79212	585	0.01
+8060	-13315.79212	586	0.01
+8070	-13315.79212	586	0.01
+8080	-13315.79212	586	0.01
+8090	-13315.79212	586	0.01
+8100	-13315.79212	586	0.01
+Score after final optimization: -13315.77223
+Final	-13315.77223	590	0.01
diff --git a/example/partition/exampleRuns/3parts.diffModelTypes/3diffModels.byCodonPos.screen.log b/example/partition/exampleRuns/3parts.diffModelTypes/3diffModels.byCodonPos.screen.log
new file mode 100644
index 0000000..b1c0743
--- /dev/null
+++ b/example/partition/exampleRuns/3parts.diffModelTypes/3diffModels.byCodonPos.screen.log
@@ -0,0 +1,1450 @@
+Running GARLI-PART Version 2.0.1008 (17 Mar 2011)
+->Single processor version<-
+
+##############################################################
+ This is GARLI 2.0, the first "official" release including 
+          partitioned models.  It is a merging of
+   official release 1.0 and beta version GARLI-PART 0.97
+  Briefly, it includes models for nucleotides, amino acids,
+ codons, and morphology-like characters, any of which can be 
+  mixed together and applied to different subsets of data.
+
+    General program usage is extensively documented here:
+            http://www.nescent.org/wg_garli/
+      see this page for details on partitioned usage:
+  http://www.nescent.org/wg_garli/Partition_testing_version
+   and this page for details on Mkv mophology model usage:
+    http://www.nescent.org/wg_garli/Mkv_morphology_model
+         PLEASE LET ME KNOW OF ANY PROBLEMS AT:
+                garli.support at gmail.com
+##############################################################
+This version has undergone much testing, but is still a BETA VERSION.
+   - Please check results carefully! -
+Compiled Mar 21 2011 13:13:18 using Intel icc compiler version 9.10
+Using NCL version 2.1.10
+
+#######################################################
+Reading config file garli.conf
+###################################################
+READING OF DATA
+Attempting to read data file in Nexus format (using NCL):
+	zakonEtAl2006.11tax.nex ...
+Reading DATA block... successful
+Reading SETS block... successful
+
+###################################################
+PARTITIONING OF DATA AND MODELS
+
+CHECK: DIFFERENT MODEL TYPES AND MODEL PARAMETERS APPLY
+	TO EACH DATA SUBSET (no linkage)
+
+GARLI data subset 1
+	CHARACTERS block #1 ("Untitled DATA Block 1")
+	CHARPARTITION subset #1 ("1stpos")
+	Data read as Nucleotide data,
+	modeled as Nucleotide data
+	Summary of data:
+	  11 sequences.
+	  441 constant characters.
+	  171 parsimony-informative characters.
+	  114 uninformative variable characters.
+	  726 total characters.
+	  238 unique patterns in compressed data matrix.
+	Pattern processing required < 1 second
+
+GARLI data subset 2
+	CHARACTERS block #1 ("Untitled DATA Block 1")
+	CHARPARTITION subset #2 ("2ndpos")
+	Data read as Nucleotide data,
+	modeled as Nucleotide data
+	Summary of data:
+	  11 sequences.
+	  528 constant characters.
+	  90 parsimony-informative characters.
+	  108 uninformative variable characters.
+	  726 total characters.
+	  158 unique patterns in compressed data matrix.
+	Pattern processing required < 1 second
+
+GARLI data subset 3
+	CHARACTERS block #1 ("Untitled DATA Block 1")
+	CHARPARTITION subset #3 ("3rdpos")
+	Data read as Nucleotide data,
+	modeled as Nucleotide data
+	Summary of data:
+	  11 sequences.
+	  103 constant characters.
+	  507 parsimony-informative characters.
+	  116 uninformative variable characters.
+	  726 total characters.
+	  549 unique patterns in compressed data matrix.
+	Pattern processing required < 1 second
+
+
+###################################################
+NOTE: Unlike many programs, the amount of system memory that Garli will
+use can be controlled by the user.
+(This comes from the availablememory setting in the configuration file.
+Availablememory should NOT be set to more than the actual amount of 
+physical memory that your computer has installed)
+
+For this dataset:
+ Mem level		availablememory setting
+  great			    >= 11 MB
+  good			approx 10 MB to 9 MB
+  low			approx 8 MB to 5 MB
+  very low		approx 4 MB to 4 MB
+the minimum required availablememory is 4 MB
+
+You specified that Garli should use at most 512.0 MB of memory.
+
+Garli will actually use approx. 16.1 MB of memory
+**Your memory level is: great (you don't need to change anything)**
+
+#######################################################
+Found outgroup specification:  1
+
+#######################################################
+STARTING RUN
+
+>>>Search rep 1 (of 5)<<<
+MODEL REPORT - Parameters are at their INITIAL values (not yet optimized)
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 2 3 4 ) 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3157 0.1746 0.3004 0.2093 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Model 2
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 1 0 3 ) 
+    AC = 4.000, AG = 4.000, AT = 1.000, CG = 4.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.2703 0.1566 0.1628 0.4103 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Model 3
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 3 1 0 ) 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.1460 0.3609 0.2915 0.2015 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    with an invariant (invariable) site category, proportion estimated
+      0.0355
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0000	0.0355
+      0.0334	0.2411
+      0.2519	0.2411
+      0.8203	0.2411
+      2.8944	0.2411
+
+Subset rate multipliers:
+    1.00  1.00  1.00
+Starting with seed=852004
+
+creating likelihood stepwise addition starting tree...
+number of taxa added:
+ 4  5  6 
+Optimizing parameters... improved 284.867 lnL
+Optimizing branchlengths... improved 109.865 lnL
+ 7  8  9  10  11 
+Initial ln Likelihood: -13739.2722
+optimizing: starting branch lengths, alpha shape, prop. invar, rel rates, eq freqs, subset rates...
+pass 1:+  197.592 (branch=   5.99 scale=  0.00 alpha= 39.14 freqs= 25.16 rel rates= 71.09 pinv=  0.00 subset rates= 56.21)
+pass 2:+   93.534 (branch=  11.02 scale=  1.42 alpha=  7.20 freqs= 12.45 rel rates=  4.35 pinv=  0.79 subset rates= 56.30)
+pass 3:+   52.621 (branch=   5.01 scale=  1.30 alpha=  7.59 freqs=  1.02 rel rates=  1.79 pinv=  0.01 subset rates= 35.90)
+pass 4:+   16.507 (branch=   0.00 scale=  0.81 alpha=  0.95 freqs=  0.16 rel rates=  1.58 pinv=  0.01 subset rates= 13.00)
+pass 5:+    8.128 (branch=   0.68 scale=  0.00 alpha=  0.01 freqs=  0.20 rel rates=  1.99 pinv=  0.01 subset rates=  5.23)
+pass 6:+    0.727 (branch=   0.00 scale=  0.00 alpha=  0.01 freqs=  0.15 rel rates=  0.01 pinv=  0.01 subset rates=  0.54)
+pass 7:+    0.157 (branch=   0.00 scale=  0.00 alpha=  0.00 freqs=  0.13 rel rates=  0.01 pinv=  0.01 subset rates=  0.00)
+lnL after optimization: -13370.0055
+gen      current_lnL    precision  last_tree_imp  
+0        -13370.0055      0.500           0 
+100      -13318.7588      0.500          30 
+200      -13317.8640      0.500          30 
+300      -13317.3539      0.500          30 
+400      -13317.1124      0.500          30 
+500      -13316.9931      0.500          30 
+600      -13316.7533      0.500          30 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.052 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+700      -13316.5320      0.402          30 
+800      -13316.4480      0.402          30 
+900      -13316.4201      0.402          30 
+1000     -13316.3574      0.402          30 
+1100     -13316.2488      0.402          30 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.024 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+1200     -13316.1758      0.304          30 
+1300     -13316.1714      0.304          30 
+1400     -13316.0938      0.304          30 
+1500     -13316.0518      0.304          30 
+1600     -13315.9958      0.304          30 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.013 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+1700     -13315.9424      0.206          30 
+1800     -13315.9278      0.206          30 
+1900     -13315.8903      0.206          30 
+2000     -13315.8642      0.206          30 
+2100     -13315.8580      0.206          30 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.003 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+2200     -13315.8540      0.108          30 
+2300     -13315.8529      0.108          30 
+2400     -13315.8461      0.108          30 
+2500     -13315.8458      0.108          30 
+2600     -13315.8453      0.108          30 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.001 lnL
+   Optimizing branchlengths... improved    0.017 lnL
+2700     -13315.8279      0.010          30 
+2800     -13315.8275      0.010          30 
+2900     -13315.8257      0.010          30 
+3000     -13315.8242      0.010          30 
+3100     -13315.8240      0.010          30 
+3200     -13315.8237      0.010          30 
+3300     -13315.8130      0.010          30 
+3400     -13315.8130      0.010          30 
+3500     -13315.8093      0.010          30 
+3600     -13315.8087      0.010          30 
+3700     -13315.8086      0.010          30 
+3800     -13315.8078      0.010          30 
+3900     -13315.8072      0.010          30 
+4000     -13315.8072      0.010          30 
+4100     -13315.8016      0.010          30 
+4200     -13315.8007      0.010          30 
+4300     -13315.7978      0.010          30 
+4400     -13315.7973      0.010          30 
+4500     -13315.7970      0.010          30 
+4600     -13315.7967      0.010          30 
+4700     -13315.7949      0.010          30 
+4800     -13315.7948      0.010          30 
+4900     -13315.7948      0.010          30 
+5000     -13315.7919      0.010          30 
+5100     -13315.7911      0.010          30 
+5200     -13315.7911      0.010          30 
+5300     -13315.7906      0.010          30 
+5400     -13315.7906      0.010          30 
+5500     -13315.7903      0.010          30 
+5600     -13315.7899      0.010          30 
+5700     -13315.7883      0.010          30 
+5800     -13315.7880      0.010          30 
+5900     -13315.7876      0.010          30 
+6000     -13315.7873      0.010          30 
+6100     -13315.7873      0.010          30 
+6200     -13315.7870      0.010          30 
+6300     -13315.7863      0.010          30 
+6400     -13315.7851      0.010          30 
+6500     -13315.7846      0.010          30 
+6600     -13315.7846      0.010          30 
+6700     -13315.7846      0.010          30 
+6800     -13315.7846      0.010          30 
+6900     -13315.7844      0.010          30 
+7000     -13315.7838      0.010          30 
+7100     -13315.7837      0.010          30 
+7200     -13315.7837      0.010          30 
+7300     -13315.7837      0.010          30 
+7400     -13315.7837      0.010          30 
+7500     -13315.7837      0.010          30 
+7600     -13315.7837      0.010          30 
+7700     -13315.7833      0.010          30 
+Reached termination condition!
+last topological improvement at gen 30
+Improvement over last 500 gen = 0.00047
+Current score = -13315.7833
+Performing final optimizations...
+pass 1 : -13315.7830   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0001  rel rates= 0.0001  subset rates= 0.0000)
+pass 2 : -13315.7827   (branch= 0.0000  alpha= 0.0001  pinv= 0.0000  eq freqs= 0.0001  rel rates= 0.0001  subset rates= 0.0000)
+pass 3 : -13315.7772   (branch= 0.0054  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0001  subset rates= 0.0000)
+pass 4 : -13315.7748   (branch= 0.0024  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 5 : -13315.7740   (branch= 0.0007  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0001  subset rates= 0.0000)
+pass 6 : -13315.7729   (branch= 0.0011  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 7 : -13315.7726   (branch= 0.0002  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0001  subset rates= 0.0000)
+pass 8 : -13315.7725   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 9 : -13315.7723   (branch= 0.0001  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 10: -13315.7722   (branch= 0.0001  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 11: -13315.7722   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 12: -13315.7722   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 13: -13315.7722   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 14: -13315.7721   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 15: -13315.7721   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 16: -13315.7721   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+Looking for minimum length branches...
+Final score = -13315.7721
+Time used so far = 0 hours, 1 minutes and 42 seconds
+
+MODEL REPORT - Parameter values are FINAL
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 2 3 4 ) 
+    AC = 1.966, AG = 2.579, AT = 1.411, CG = 1.411, CT = 3.722, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3101 0.1767 0.2972 0.2160 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.4097
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0181	0.2500
+      0.1890	0.2500
+      0.7416	0.2500
+      3.0513	0.2500
+
+Model 2
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 1 0 3 ) 
+    AC = 4.380, AG = 7.085, AT = 1.609, CG = 7.085, CT = 4.380, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.2692 0.1636 0.1605 0.4067 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.3609
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0115	0.2500
+      0.1520	0.2500
+      0.6853	0.2500
+      3.1512	0.2500
+
+Model 3
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 3 1 0 ) 
+    AC = 1.000, AG = 4.936, AT = 3.391, CG = 0.457, CT = 4.936, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.1565 0.3537 0.2877 0.2021 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      4.0142
+    with an invariant (invariable) site category, proportion estimated
+      0.0335
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0000	0.0335
+      0.4551	0.2416
+      0.7757	0.2416
+      1.0844	0.2416
+      1.6848	0.2416
+
+Subset rate multipliers:
+    0.54  0.30  2.16
+NOTE: Collapsing of minimum length branches was requested (collapsebranches = 1)
+    No branches were short enough to be collapsed.
+
+>>>Completed Search rep 1 (of 5)<<<
+
+>>>Search rep 2 (of 5)<<<
+MODEL REPORT - Parameters are at their INITIAL values (not yet optimized)
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 2 3 4 ) 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3157 0.1746 0.3004 0.2093 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Model 2
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 1 0 3 ) 
+    AC = 4.000, AG = 4.000, AT = 1.000, CG = 4.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.2703 0.1566 0.1628 0.4103 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Model 3
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 3 1 0 ) 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.1460 0.3609 0.2915 0.2015 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    with an invariant (invariable) site category, proportion estimated
+      0.0355
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0000	0.0355
+      0.0334	0.2411
+      0.2519	0.2411
+      0.8203	0.2411
+      2.8944	0.2411
+
+Subset rate multipliers:
+    1.00  1.00  1.00
+Starting with seed=1163395386
+
+creating likelihood stepwise addition starting tree...
+number of taxa added:
+ 4  5  6 
+Optimizing parameters... improved 251.052 lnL
+Optimizing branchlengths... improved 42.822 lnL
+ 7  8  9  10  11 
+Initial ln Likelihood: -13708.2945
+optimizing: starting branch lengths, alpha shape, prop. invar, rel rates, eq freqs, subset rates...
+pass 1:+  195.142 (branch=   3.84 scale=  0.00 alpha= 39.93 freqs= 28.21 rel rates= 67.92 pinv=  0.00 subset rates= 55.24)
+pass 2:+   90.129 (branch=   9.79 scale=  1.73 alpha=  6.49 freqs= 11.51 rel rates=  4.22 pinv=  1.00 subset rates= 55.39)
+pass 3:+   50.181 (branch=   8.72 scale=  0.00 alpha=  4.95 freqs=  1.58 rel rates=  1.37 pinv=  0.01 subset rates= 33.53)
+pass 4:+   18.019 (branch=   1.73 scale=  0.71 alpha=  0.96 freqs=  0.15 rel rates=  2.28 pinv=  0.01 subset rates= 12.18)
+pass 5:+    5.247 (branch=   0.00 scale=  0.00 alpha=  0.01 freqs=  0.14 rel rates=  0.54 pinv=  0.01 subset rates=  4.54)
+pass 6:+    0.677 (branch=   0.00 scale=  0.00 alpha=  0.01 freqs=  0.64 rel rates=  0.01 pinv=  0.01 subset rates=  0.00)
+pass 7:+    0.077 (branch=   0.00 scale=  0.00 alpha=  0.01 freqs=  0.04 rel rates=  0.01 pinv=  0.01 subset rates=  0.00)
+lnL after optimization: -13348.8218
+gen      current_lnL    precision  last_tree_imp  
+0        -13348.8218      0.500           0 
+100      -13319.1023      0.500           3 
+200      -13318.5364      0.500           3 
+300      -13317.6152      0.500           3 
+400      -13317.5790      0.500           3 
+500      -13317.4175      0.500           3 
+600      -13317.3894      0.500           3 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.627 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+700      -13316.5392      0.402           3 
+800      -13316.3891      0.402           3 
+900      -13316.3181      0.402           3 
+1000     -13316.1841      0.402           3 
+1100     -13316.1042      0.402           3 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.014 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+1200     -13316.0886      0.304           3 
+1300     -13316.0664      0.304           3 
+1400     -13316.0481      0.304           3 
+1500     -13316.0285      0.304           3 
+1600     -13315.9524      0.304           3 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.004 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+1700     -13315.9479      0.206           3 
+1800     -13315.9284      0.206           3 
+1900     -13315.8732      0.206           3 
+2000     -13315.8515      0.206           3 
+2100     -13315.8477      0.206           3 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.002 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+2200     -13315.8461      0.108           3 
+2300     -13315.8265      0.108           3 
+2400     -13315.8118      0.108           3 
+2500     -13315.8107      0.108           3 
+2600     -13315.8043      0.108           3 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.001 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+2700     -13315.8013      0.010           3 
+2800     -13315.8000      0.010           3 
+2900     -13315.7998      0.010           3 
+3000     -13315.7995      0.010           3 
+3100     -13315.7995      0.010           3 
+3200     -13315.7993      0.010           3 
+3300     -13315.7975      0.010           3 
+3400     -13315.7975      0.010           3 
+3500     -13315.7973      0.010           3 
+3600     -13315.7973      0.010           3 
+3700     -13315.7972      0.010           3 
+3800     -13315.7972      0.010           3 
+3900     -13315.7972      0.010           3 
+4000     -13315.7906      0.010           3 
+4100     -13315.7905      0.010           3 
+4200     -13315.7903      0.010           3 
+4300     -13315.7901      0.010           3 
+4400     -13315.7901      0.010           3 
+4500     -13315.7901      0.010           3 
+4600     -13315.7901      0.010           3 
+4700     -13315.7901      0.010           3 
+4800     -13315.7901      0.010           3 
+4900     -13315.7900      0.010           3 
+5000     -13315.7900      0.010           3 
+5100     -13315.7899      0.010           3 
+5200     -13315.7899      0.010           3 
+5300     -13315.7899      0.010           3 
+5400     -13315.7899      0.010           3 
+5500     -13315.7899      0.010           3 
+5600     -13315.7899      0.010           3 
+5700     -13315.7899      0.010           3 
+5800     -13315.7889      0.010           3 
+5900     -13315.7889      0.010           3 
+6000     -13315.7889      0.010           3 
+6100     -13315.7889      0.010           3 
+6200     -13315.7889      0.010           3 
+6300     -13315.7884      0.010           3 
+6400     -13315.7884      0.010           3 
+6500     -13315.7884      0.010           3 
+6600     -13315.7873      0.010           3 
+6700     -13315.7873      0.010           3 
+6800     -13315.7873      0.010           3 
+6900     -13315.7870      0.010           3 
+7000     -13315.7870      0.010           3 
+7100     -13315.7870      0.010           3 
+7200     -13315.7869      0.010           3 
+7300     -13315.7866      0.010           3 
+7400     -13315.7836      0.010           3 
+7500     -13315.7836      0.010           3 
+7600     -13315.7836      0.010           3 
+7700     -13315.7836      0.010           3 
+7800     -13315.7836      0.010           3 
+7900     -13315.7836      0.010           3 
+Reached termination condition!
+last topological improvement at gen 3
+Improvement over last 500 gen = 0.00001
+Current score = -13315.7836
+Performing final optimizations...
+pass 1 : -13315.7832   (branch= 0.0000  alpha= 0.0001  pinv= 0.0000  eq freqs= 0.0002  rel rates= 0.0001  subset rates= 0.0000)
+pass 2 : -13315.7829   (branch= 0.0000  alpha= 0.0001  pinv= 0.0000  eq freqs= 0.0001  rel rates= 0.0001  subset rates= 0.0000)
+pass 3 : -13315.7783   (branch= 0.0043  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0001  rel rates= 0.0001  subset rates= 0.0000)
+pass 4 : -13315.7757   (branch= 0.0025  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0001  subset rates= 0.0000)
+pass 5 : -13315.7732   (branch= 0.0024  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0001  subset rates= 0.0000)
+pass 6 : -13315.7728   (branch= 0.0003  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0001  subset rates= 0.0000)
+pass 7 : -13315.7726   (branch= 0.0002  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 8 : -13315.7726   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 9 : -13315.7725   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 10: -13315.7725   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 11: -13315.7724   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 12: -13315.7723   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0001)
+Looking for minimum length branches...
+Final score = -13315.7723
+Time used so far = 0 hours, 3 minutes and 27 seconds
+
+MODEL REPORT - Parameter values are FINAL
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 2 3 4 ) 
+    AC = 1.962, AG = 2.575, AT = 1.408, CG = 1.408, CT = 3.715, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3102 0.1767 0.2971 0.2160 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.4096
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0181	0.2500
+      0.1889	0.2500
+      0.7415	0.2500
+      3.0515	0.2500
+
+Model 2
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 1 0 3 ) 
+    AC = 4.400, AG = 7.116, AT = 1.617, CG = 7.116, CT = 4.400, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.2692 0.1636 0.1605 0.4067 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.3611
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0115	0.2500
+      0.1521	0.2500
+      0.6854	0.2500
+      3.1509	0.2500
+
+Model 3
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 3 1 0 ) 
+    AC = 1.000, AG = 4.938, AT = 3.393, CG = 0.457, CT = 4.938, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.1565 0.3537 0.2877 0.2021 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      4.0160
+    with an invariant (invariable) site category, proportion estimated
+      0.0335
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0000	0.0335
+      0.4552	0.2416
+      0.7758	0.2416
+      1.0844	0.2416
+      1.6846	0.2416
+
+Subset rate multipliers:
+    0.54  0.30  2.16
+NOTE: Collapsing of minimum length branches was requested (collapsebranches = 1)
+    No branches were short enough to be collapsed.
+
+>>>Completed Search rep 2 (of 5)<<<
+
+>>>Search rep 3 (of 5)<<<
+MODEL REPORT - Parameters are at their INITIAL values (not yet optimized)
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 2 3 4 ) 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3157 0.1746 0.3004 0.2093 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Model 2
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 1 0 3 ) 
+    AC = 4.000, AG = 4.000, AT = 1.000, CG = 4.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.2703 0.1566 0.1628 0.4103 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Model 3
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 3 1 0 ) 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.1460 0.3609 0.2915 0.2015 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    with an invariant (invariable) site category, proportion estimated
+      0.0355
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0000	0.0355
+      0.0334	0.2411
+      0.2519	0.2411
+      0.8203	0.2411
+      2.8944	0.2411
+
+Subset rate multipliers:
+    1.00  1.00  1.00
+Starting with seed=1320446270
+
+creating likelihood stepwise addition starting tree...
+number of taxa added:
+ 4  5  6 
+Optimizing parameters... improved 182.213 lnL
+Optimizing branchlengths... improved 23.611 lnL
+ 7  8  9  10  11 
+Initial ln Likelihood: -13653.6032
+optimizing: starting branch lengths, alpha shape, prop. invar, rel rates, eq freqs, subset rates...
+pass 1:+  178.674 (branch=  11.12 scale=  0.00 alpha= 11.90 freqs= 26.62 rel rates= 64.15 pinv=  0.37 subset rates= 64.52)
+pass 2:+   86.362 (branch=   4.68 scale=  1.93 alpha=  5.43 freqs= 12.73 rel rates=  3.97 pinv=  0.01 subset rates= 57.60)
+pass 3:+   44.763 (branch=   3.77 scale=  0.92 alpha=  3.02 freqs=  0.93 rel rates=  2.17 pinv=  0.01 subset rates= 33.93)
+pass 4:+   17.413 (branch=   1.07 scale=  0.00 alpha=  0.66 freqs=  0.18 rel rates=  3.09 pinv=  0.01 subset rates= 12.39)
+pass 5:+    5.472 (branch=   0.00 scale=  0.00 alpha=  0.01 freqs=  0.17 rel rates=  0.63 pinv=  0.01 subset rates=  4.66)
+pass 6:+    0.158 (branch=   0.00 scale=  0.00 alpha=  0.00 freqs=  0.13 rel rates=  0.01 pinv=  0.01 subset rates=  0.00)
+lnL after optimization: -13320.7617
+gen      current_lnL    precision  last_tree_imp  
+0        -13320.7617      0.500           0 
+100      -13318.9005      0.500           0 
+200      -13318.2255      0.500           0 
+300      -13318.0181      0.500           0 
+400      -13317.3604      0.500           0 
+500      -13316.9407      0.500           0 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.061 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+600      -13316.6639      0.402           0 
+700      -13316.5914      0.402           0 
+800      -13316.5551      0.402           0 
+900      -13316.4227      0.402           0 
+1000     -13316.4019      0.402           0 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.025 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+1100     -13316.3551      0.304           0 
+1200     -13316.3373      0.304           0 
+1300     -13316.2828      0.304           0 
+1400     -13316.2796      0.304           0 
+1500     -13316.2045      0.304           0 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.014 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+1600     -13316.1466      0.206           0 
+1700     -13316.1059      0.206           0 
+1800     -13316.0999      0.206           0 
+1900     -13316.0997      0.206           0 
+2000     -13316.0620      0.206           0 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.121 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+2100     -13315.9412      0.108           0 
+2200     -13315.9384      0.108           0 
+2300     -13315.9384      0.108           0 
+2400     -13315.9007      0.108           0 
+2500     -13315.8810      0.108           0 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.034 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+2600     -13315.8424      0.010           0 
+2700     -13315.8416      0.010           0 
+2800     -13315.8416      0.010           0 
+2900     -13315.8294      0.010           0 
+3000     -13315.8285      0.010           0 
+3100     -13315.8282      0.010           0 
+3200     -13315.8272      0.010           0 
+3300     -13315.8240      0.010           0 
+3400     -13315.8209      0.010           0 
+3500     -13315.8195      0.010           0 
+3600     -13315.8173      0.010           0 
+3700     -13315.8173      0.010           0 
+3800     -13315.8158      0.010           0 
+3900     -13315.8157      0.010           0 
+4000     -13315.8122      0.010           0 
+4100     -13315.8112      0.010           0 
+4200     -13315.8112      0.010           0 
+4300     -13315.8112      0.010           0 
+4400     -13315.8112      0.010           0 
+4500     -13315.8112      0.010           0 
+4600     -13315.8083      0.010           0 
+4700     -13315.8075      0.010           0 
+4800     -13315.8070      0.010           0 
+4900     -13315.8070      0.010           0 
+5000     -13315.8070      0.010           0 
+5100     -13315.8070      0.010           0 
+5200     -13315.8067      0.010           0 
+5300     -13315.8067      0.010           0 
+5400     -13315.8059      0.010           0 
+5500     -13315.8058      0.010           0 
+5600     -13315.8040      0.010           0 
+5700     -13315.8026      0.010           0 
+5800     -13315.8026      0.010           0 
+5900     -13315.8026      0.010           0 
+6000     -13315.8024      0.010           0 
+6100     -13315.8015      0.010           0 
+6200     -13315.8010      0.010           0 
+6300     -13315.8010      0.010           0 
+6400     -13315.7996      0.010           0 
+6500     -13315.7993      0.010           0 
+6600     -13315.7993      0.010           0 
+6700     -13315.7964      0.010           0 
+6800     -13315.7926      0.010           0 
+6900     -13315.7926      0.010           0 
+7000     -13315.7925      0.010           0 
+7100     -13315.7925      0.010           0 
+7200     -13315.7925      0.010           0 
+7300     -13315.7925      0.010           0 
+7400     -13315.7925      0.010           0 
+7500     -13315.7924      0.010           0 
+7600     -13315.7922      0.010           0 
+Reached termination condition!
+last topological improvement at gen 0
+Improvement over last 500 gen = 0.00030
+Current score = -13315.7922
+Performing final optimizations...
+pass 1 : -13315.7848   (branch= 0.0069  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0003  rel rates= 0.0002  subset rates= 0.0000)
+pass 2 : -13315.7809   (branch= 0.0032  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0002  rel rates= 0.0001  subset rates= 0.0004)
+pass 3 : -13315.7772   (branch= 0.0034  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0002  rel rates= 0.0001  subset rates= 0.0000)
+pass 4 : -13315.7770   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0001  rel rates= 0.0001  subset rates= 0.0000)
+pass 5 : -13315.7750   (branch= 0.0017  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0002  rel rates= 0.0001  subset rates= 0.0000)
+pass 6 : -13315.7737   (branch= 0.0009  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0001  rel rates= 0.0001  subset rates= 0.0002)
+pass 7 : -13315.7730   (branch= 0.0006  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0001  rel rates= 0.0001  subset rates= 0.0000)
+pass 8 : -13315.7727   (branch= 0.0001  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0001  rel rates= 0.0001  subset rates= 0.0000)
+pass 9 : -13315.7724   (branch= 0.0002  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 10: -13315.7724   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 11: -13315.7723   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 12: -13315.7723   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 13: -13315.7723   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 14: -13315.7723   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 15: -13315.7722   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 16: -13315.7722   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+Looking for minimum length branches...
+Final score = -13315.7722
+Time used so far = 0 hours, 5 minutes and 27 seconds
+
+MODEL REPORT - Parameter values are FINAL
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 2 3 4 ) 
+    AC = 1.964, AG = 2.577, AT = 1.410, CG = 1.410, CT = 3.720, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3101 0.1767 0.2972 0.2160 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.4098
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0181	0.2500
+      0.1890	0.2500
+      0.7416	0.2500
+      3.0512	0.2500
+
+Model 2
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 1 0 3 ) 
+    AC = 4.382, AG = 7.087, AT = 1.610, CG = 7.087, CT = 4.382, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.2692 0.1636 0.1605 0.4067 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.3609
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0115	0.2500
+      0.1520	0.2500
+      0.6853	0.2500
+      3.1512	0.2500
+
+Model 3
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 3 1 0 ) 
+    AC = 1.000, AG = 4.938, AT = 3.393, CG = 0.457, CT = 4.938, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.1565 0.3537 0.2877 0.2021 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      4.0078
+    with an invariant (invariable) site category, proportion estimated
+      0.0334
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0000	0.0334
+      0.4548	0.2416
+      0.7755	0.2416
+      1.0844	0.2416
+      1.6853	0.2416
+
+Subset rate multipliers:
+    0.54  0.30  2.16
+NOTE: Collapsing of minimum length branches was requested (collapsebranches = 1)
+    No branches were short enough to be collapsed.
+
+>>>Completed Search rep 3 (of 5)<<<
+
+>>>Search rep 4 (of 5)<<<
+MODEL REPORT - Parameters are at their INITIAL values (not yet optimized)
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 2 3 4 ) 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3157 0.1746 0.3004 0.2093 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Model 2
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 1 0 3 ) 
+    AC = 4.000, AG = 4.000, AT = 1.000, CG = 4.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.2703 0.1566 0.1628 0.4103 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Model 3
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 3 1 0 ) 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.1460 0.3609 0.2915 0.2015 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    with an invariant (invariable) site category, proportion estimated
+      0.0355
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0000	0.0355
+      0.0334	0.2411
+      0.2519	0.2411
+      0.8203	0.2411
+      2.8944	0.2411
+
+Subset rate multipliers:
+    1.00  1.00  1.00
+Starting with seed=490393635
+
+creating likelihood stepwise addition starting tree...
+number of taxa added:
+ 4  5  6 
+Optimizing parameters... improved 254.487 lnL
+Optimizing branchlengths... improved 50.375 lnL
+ 7  8  9  10  11 
+Initial ln Likelihood: -13796.1049
+optimizing: starting branch lengths, alpha shape, prop. invar, rel rates, eq freqs, subset rates...
+pass 1:+  200.360 (branch=  15.47 scale=  0.00 alpha= 26.67 freqs= 29.27 rel rates= 69.20 pinv=  0.96 subset rates= 58.78)
+pass 2:+   84.224 (branch=   7.28 scale=  1.63 alpha=  5.32 freqs= 13.47 rel rates=  3.51 pinv=  1.20 subset rates= 51.81)
+pass 3:+   47.400 (branch=   4.57 scale=  1.26 alpha=  5.73 freqs=  1.41 rel rates=  2.51 pinv=  0.01 subset rates= 31.92)
+pass 4:+   16.242 (branch=   1.20 scale=  0.50 alpha=  0.72 freqs=  0.16 rel rates=  1.54 pinv=  0.00 subset rates= 12.11)
+pass 5:+    5.048 (branch=   0.00 scale=  0.00 alpha=  0.01 freqs=  0.13 rel rates=  0.01 pinv=  0.00 subset rates=  4.90)
+pass 6:+    1.167 (branch=   0.00 scale=  0.00 alpha=  0.00 freqs=  0.11 rel rates=  0.58 pinv=  0.00 subset rates=  0.47)
+pass 7:+    0.096 (branch=   0.00 scale=  0.00 alpha=  0.00 freqs=  0.09 rel rates=  0.01 pinv=  0.00 subset rates=  0.00)
+lnL after optimization: -13441.5669
+gen      current_lnL    precision  last_tree_imp  
+0        -13441.5669      0.500           0 
+100      -13319.1751      0.500          27 
+200      -13318.6657      0.500          27 
+300      -13318.5942      0.500          27 
+400      -13318.5663      0.500          27 
+500      -13318.4781      0.500          27 
+600      -13318.2512      0.500          27 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.082 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+700      -13317.5316      0.402          27 
+800      -13317.2393      0.402          27 
+900      -13316.9226      0.402          27 
+1000     -13316.6411      0.402          27 
+1100     -13316.3656      0.402          27 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.045 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+1200     -13316.2876      0.304          27 
+1300     -13316.2215      0.304          27 
+1400     -13316.1849      0.304          27 
+1500     -13316.1600      0.304          27 
+1600     -13316.1287      0.304          27 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.027 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+1700     -13315.9846      0.206          27 
+1800     -13315.9797      0.206          27 
+1900     -13315.9603      0.206          27 
+2000     -13315.9509      0.206          27 
+2100     -13315.9348      0.206          27 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.009 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+2200     -13315.9119      0.108          27 
+2300     -13315.9083      0.108          27 
+2400     -13315.9054      0.108          27 
+2500     -13315.8826      0.108          27 
+2600     -13315.8815      0.108          27 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.014 lnL
+   Optimizing branchlengths... improved    0.021 lnL
+2700     -13315.8419      0.010          27 
+2800     -13315.8414      0.010          27 
+2900     -13315.8414      0.010          27 
+3000     -13315.8345      0.010          27 
+3100     -13315.8324      0.010          27 
+3200     -13315.8270      0.010          27 
+3300     -13315.8117      0.010          27 
+3400     -13315.8091      0.010          27 
+3500     -13315.8058      0.010          27 
+3600     -13315.8048      0.010          27 
+3700     -13315.8048      0.010          27 
+3800     -13315.8017      0.010          27 
+3900     -13315.8016      0.010          27 
+4000     -13315.8016      0.010          27 
+4100     -13315.8011      0.010          27 
+4200     -13315.8011      0.010          27 
+4300     -13315.8011      0.010          27 
+4400     -13315.8011      0.010          27 
+4500     -13315.7962      0.010          27 
+4600     -13315.7962      0.010          27 
+4700     -13315.7962      0.010          27 
+4800     -13315.7953      0.010          27 
+4900     -13315.7953      0.010          27 
+5000     -13315.7953      0.010          27 
+5100     -13315.7953      0.010          27 
+5200     -13315.7953      0.010          27 
+5300     -13315.7936      0.010          27 
+5400     -13315.7935      0.010          27 
+5500     -13315.7933      0.010          27 
+5600     -13315.7931      0.010          27 
+5700     -13315.7928      0.010          27 
+5800     -13315.7914      0.010          27 
+5900     -13315.7914      0.010          27 
+6000     -13315.7914      0.010          27 
+6100     -13315.7912      0.010          27 
+6200     -13315.7910      0.010          27 
+6300     -13315.7896      0.010          27 
+6400     -13315.7876      0.010          27 
+6500     -13315.7875      0.010          27 
+6600     -13315.7868      0.010          27 
+6700     -13315.7867      0.010          27 
+6800     -13315.7867      0.010          27 
+6900     -13315.7867      0.010          27 
+7000     -13315.7866      0.010          27 
+7100     -13315.7865      0.010          27 
+7200     -13315.7865      0.010          27 
+7300     -13315.7865      0.010          27 
+7400     -13315.7865      0.010          27 
+7500     -13315.7865      0.010          27 
+7600     -13315.7859      0.010          27 
+7700     -13315.7848      0.010          27 
+7800     -13315.7848      0.010          27 
+7900     -13315.7842      0.010          27 
+8000     -13315.7842      0.010          27 
+8100     -13315.7842      0.010          27 
+8200     -13315.7842      0.010          27 
+Reached termination condition!
+last topological improvement at gen 27
+Improvement over last 500 gen = 0.00063
+Current score = -13315.7842
+Performing final optimizations...
+pass 1 : -13315.7835   (branch= 0.0000  alpha= 0.0001  pinv= 0.0000  eq freqs= 0.0003  rel rates= 0.0002  subset rates= 0.0002)
+pass 2 : -13315.7829   (branch= 0.0000  alpha= 0.0001  pinv= 0.0000  eq freqs= 0.0003  rel rates= 0.0001  subset rates= 0.0001)
+pass 3 : -13315.7779   (branch= 0.0035  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0015  rel rates= 0.0000  subset rates= 0.0000)
+pass 4 : -13315.7760   (branch= 0.0014  alpha= 0.0001  pinv= 0.0000  eq freqs= 0.0002  rel rates= 0.0001  subset rates= 0.0000)
+pass 5 : -13315.7734   (branch= 0.0023  alpha= 0.0001  pinv= 0.0000  eq freqs= 0.0002  rel rates= 0.0000  subset rates= 0.0000)
+pass 6 : -13315.7730   (branch= 0.0000  alpha= 0.0001  pinv= 0.0000  eq freqs= 0.0003  rel rates= 0.0000  subset rates= 0.0000)
+pass 7 : -13315.7727   (branch= 0.0002  alpha= 0.0001  pinv= 0.0000  eq freqs= 0.0001  rel rates= 0.0000  subset rates= 0.0000)
+pass 8 : -13315.7724   (branch= 0.0003  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 9 : -13315.7722   (branch= 0.0001  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 10: -13315.7722   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 11: -13315.7722   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+Looking for minimum length branches...
+Final score = -13315.7722
+Time used so far = 0 hours, 7 minutes and 46 seconds
+
+MODEL REPORT - Parameter values are FINAL
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 2 3 4 ) 
+    AC = 1.965, AG = 2.577, AT = 1.410, CG = 1.410, CT = 3.720, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3102 0.1767 0.2972 0.2160 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.4097
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0181	0.2500
+      0.1889	0.2500
+      0.7415	0.2500
+      3.0514	0.2500
+
+Model 2
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 1 0 3 ) 
+    AC = 4.384, AG = 7.090, AT = 1.611, CG = 7.090, CT = 4.384, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.2692 0.1636 0.1605 0.4067 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.3609
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0115	0.2500
+      0.1520	0.2500
+      0.6852	0.2500
+      3.1513	0.2500
+
+Model 3
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 3 1 0 ) 
+    AC = 1.000, AG = 4.939, AT = 3.394, CG = 0.457, CT = 4.939, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.1565 0.3537 0.2877 0.2021 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      4.0115
+    with an invariant (invariable) site category, proportion estimated
+      0.0335
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0000	0.0335
+      0.4550	0.2416
+      0.7756	0.2416
+      1.0844	0.2416
+      1.6850	0.2416
+
+Subset rate multipliers:
+    0.54  0.30  2.16
+NOTE: Collapsing of minimum length branches was requested (collapsebranches = 1)
+    No branches were short enough to be collapsed.
+
+>>>Completed Search rep 4 (of 5)<<<
+
+>>>Search rep 5 (of 5)<<<
+MODEL REPORT - Parameters are at their INITIAL values (not yet optimized)
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 2 3 4 ) 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3157 0.1746 0.3004 0.2093 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Model 2
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 1 0 3 ) 
+    AC = 4.000, AG = 4.000, AT = 1.000, CG = 4.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.2703 0.1566 0.1628 0.4103 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Model 3
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 3 1 0 ) 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.1460 0.3609 0.2915 0.2015 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    with an invariant (invariable) site category, proportion estimated
+      0.0355
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0000	0.0355
+      0.0334	0.2411
+      0.2519	0.2411
+      0.8203	0.2411
+      2.8944	0.2411
+
+Subset rate multipliers:
+    1.00  1.00  1.00
+Starting with seed=1922346580
+
+creating likelihood stepwise addition starting tree...
+number of taxa added:
+ 4  5  6 
+Optimizing parameters... improved 198.984 lnL
+Optimizing branchlengths... improved 64.290 lnL
+ 7  8  9  10  11 
+Initial ln Likelihood: -13643.0835
+optimizing: starting branch lengths, alpha shape, prop. invar, rel rates, eq freqs, subset rates...
+pass 1:+  166.300 (branch=   6.38 scale=  1.32 alpha=  5.62 freqs= 26.48 rel rates= 65.82 pinv=  0.81 subset rates= 59.87)
+pass 2:+   86.601 (branch=   7.41 scale=  1.89 alpha=  5.35 freqs= 12.24 rel rates=  3.04 pinv=  0.66 subset rates= 56.01)
+pass 3:+   47.155 (branch=   5.78 scale=  0.66 alpha=  3.94 freqs=  0.98 rel rates=  2.37 pinv=  0.01 subset rates= 33.42)
+pass 4:+   17.442 (branch=   0.49 scale=  0.57 alpha=  0.74 freqs=  0.18 rel rates=  3.03 pinv=  0.02 subset rates= 12.41)
+pass 5:+    5.438 (branch=   0.00 scale=  0.00 alpha=  0.01 freqs=  0.17 rel rates=  0.56 pinv=  0.02 subset rates=  4.69)
+pass 6:+    0.155 (branch=   0.00 scale=  0.00 alpha=  0.00 freqs=  0.13 rel rates=  0.01 pinv=  0.01 subset rates=  0.00)
+lnL after optimization: -13319.9928
+gen      current_lnL    precision  last_tree_imp  
+0        -13319.9928      0.500           0 
+100      -13318.8931      0.500           0 
+200      -13318.1402      0.500           0 
+300      -13317.7489      0.500           0 
+400      -13317.4083      0.500           0 
+500      -13316.8158      0.500           0 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.067 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+600      -13316.5461      0.402           0 
+700      -13316.4355      0.402           0 
+800      -13316.3446      0.402           0 
+900      -13316.3035      0.402           0 
+1000     -13316.2369      0.402           0 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.035 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+1100     -13316.1538      0.304           0 
+1200     -13316.0789      0.304           0 
+1300     -13316.0516      0.304           0 
+1400     -13316.0267      0.304           0 
+1500     -13316.0232      0.304           0 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.020 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+1600     -13315.9865      0.206           0 
+1700     -13315.9675      0.206           0 
+1800     -13315.9224      0.206           0 
+1900     -13315.9215      0.206           0 
+2000     -13315.9196      0.206           0 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.006 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+2100     -13315.9095      0.108           0 
+2200     -13315.9037      0.108           0 
+2300     -13315.8985      0.108           0 
+2400     -13315.8890      0.108           0 
+2500     -13315.8796      0.108           0 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.013 lnL
+   Optimizing branchlengths... improved    0.011 lnL
+2600     -13315.8524      0.010           0 
+2700     -13315.8419      0.010           0 
+2800     -13315.8399      0.010           0 
+2900     -13315.8380      0.010           0 
+3000     -13315.8310      0.010           0 
+3100     -13315.8292      0.010           0 
+3200     -13315.8292      0.010           0 
+3300     -13315.8290      0.010           0 
+3400     -13315.8288      0.010           0 
+3500     -13315.8260      0.010           0 
+3600     -13315.8255      0.010           0 
+3700     -13315.8253      0.010           0 
+3800     -13315.8209      0.010           0 
+3900     -13315.8209      0.010           0 
+4000     -13315.8207      0.010           0 
+4100     -13315.8207      0.010           0 
+4200     -13315.8176      0.010           0 
+4300     -13315.8130      0.010           0 
+4400     -13315.8127      0.010           0 
+4500     -13315.8122      0.010           0 
+4600     -13315.8122      0.010           0 
+4700     -13315.8089      0.010           0 
+4800     -13315.8080      0.010           0 
+4900     -13315.8080      0.010           0 
+5000     -13315.8080      0.010           0 
+5100     -13315.8080      0.010           0 
+5200     -13315.8080      0.010           0 
+5300     -13315.8080      0.010           0 
+5400     -13315.8076      0.010           0 
+5500     -13315.8076      0.010           0 
+5600     -13315.8071      0.010           0 
+5700     -13315.8071      0.010           0 
+5800     -13315.8071      0.010           0 
+5900     -13315.8071      0.010           0 
+6000     -13315.8066      0.010           0 
+6100     -13315.8063      0.010           0 
+6200     -13315.8063      0.010           0 
+6300     -13315.8049      0.010           0 
+6400     -13315.8048      0.010           0 
+6500     -13315.8048      0.010           0 
+6600     -13315.8046      0.010           0 
+6700     -13315.8023      0.010           0 
+6800     -13315.8017      0.010           0 
+6900     -13315.8017      0.010           0 
+7000     -13315.8016      0.010           0 
+7100     -13315.7993      0.010           0 
+7200     -13315.7991      0.010           0 
+7300     -13315.7991      0.010           0 
+7400     -13315.7941      0.010           0 
+7500     -13315.7939      0.010           0 
+7600     -13315.7927      0.010           0 
+7700     -13315.7923      0.010           0 
+7800     -13315.7923      0.010           0 
+7900     -13315.7921      0.010           0 
+8000     -13315.7921      0.010           0 
+8100     -13315.7921      0.010           0 
+Reached termination condition!
+last topological improvement at gen 0
+Improvement over last 500 gen = 0.00061
+Current score = -13315.7921
+Performing final optimizations...
+pass 1 : -13315.7914   (branch= 0.0000  alpha= 0.0001  pinv= 0.0000  eq freqs= 0.0003  rel rates= 0.0004  subset rates= 0.0000)
+pass 2 : -13315.7882   (branch= 0.0000  alpha= 0.0026  pinv= 0.0000  eq freqs= 0.0003  rel rates= 0.0002  subset rates= 0.0000)
+pass 3 : -13315.7851   (branch= 0.0013  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0017  rel rates= 0.0002  subset rates= 0.0000)
+pass 4 : -13315.7799   (branch= 0.0041  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0002  rel rates= 0.0008  subset rates= 0.0000)
+pass 5 : -13315.7758   (branch= 0.0020  alpha= 0.0004  pinv= 0.0000  eq freqs= 0.0010  rel rates= 0.0006  subset rates= 0.0001)
+pass 6 : -13315.7743   (branch= 0.0009  alpha= 0.0000  pinv= 0.0002  eq freqs= 0.0001  rel rates= 0.0001  subset rates= 0.0001)
+pass 7 : -13315.7735   (branch= 0.0003  alpha= 0.0001  pinv= 0.0000  eq freqs= 0.0001  rel rates= 0.0002  subset rates= 0.0000)
+pass 8 : -13315.7733   (branch= 0.0001  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0002  subset rates= 0.0000)
+pass 9 : -13315.7727   (branch= 0.0002  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0003  subset rates= 0.0000)
+pass 10: -13315.7726   (branch= 0.0001  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0001  subset rates= 0.0000)
+pass 11: -13315.7725   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0001  subset rates= 0.0000)
+pass 12: -13315.7724   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 13: -13315.7724   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 14: -13315.7724   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 15: -13315.7723   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 16: -13315.7723   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 17: -13315.7723   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 18: -13315.7723   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 19: -13315.7722   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 20: -13315.7722   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+ optimization up to ...
+pass 21: -13315.7722   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+Looking for minimum length branches...
+Final score = -13315.7722
+Time used = 0 hours, 9 minutes and 50 seconds
+
+MODEL REPORT - Parameter values are FINAL
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 2 3 4 ) 
+    AC = 1.962, AG = 2.575, AT = 1.409, CG = 1.409, CT = 3.717, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3102 0.1767 0.2971 0.2160 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.4097
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0181	0.2500
+      0.1890	0.2500
+      0.7416	0.2500
+      3.0513	0.2500
+
+Model 2
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 1 0 3 ) 
+    AC = 4.381, AG = 7.086, AT = 1.609, CG = 7.086, CT = 4.381, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.2692 0.1636 0.1605 0.4067 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.3612
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0115	0.2500
+      0.1522	0.2500
+      0.6856	0.2500
+      3.1507	0.2500
+
+Model 3
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix: 
+    User specified matrix type: ( 0 1 2 3 1 0 ) 
+    AC = 1.000, AG = 4.938, AT = 3.393, CG = 0.457, CT = 4.938, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.1565 0.3537 0.2877 0.2021 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      4.0171
+    with an invariant (invariable) site category, proportion estimated
+      0.0335
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0000	0.0335
+      0.4553	0.2416
+      0.7758	0.2416
+      1.0844	0.2416
+      1.6845	0.2416
+
+Subset rate multipliers:
+    0.54  0.30  2.16
+NOTE: Collapsing of minimum length branches was requested (collapsebranches = 1)
+    No branches were short enough to be collapsed.
+
+>>>Completed Search rep 5 (of 5)<<<
+
+#######################################################
+
+Completed 5 replicate search(es) (of 5).
+
+NOTE: Unless the following output indicates that search replicates found the
+	same topology, you should assume that they found different topologies.
+Results:
+Replicate 1 : -13315.7721 (best)
+Replicate 2 : -13315.7723        (same topology as 1)
+Replicate 3 : -13315.7722        (same topology as 1)
+Replicate 4 : -13315.7722        (same topology as 1)
+Replicate 5 : -13315.7722        (same topology as 1)
+
+Parameter estimates across search replicates:
+
+Partition model subset 1:
+         r(AC)  r(AG)  r(AT)  r(CG)  r(CT)  r(GT) pi(A) pi(C) pi(G) pi(T) alpha
+rep 1:   1.966  2.579  1.411  1.411  3.722      1 0.310 0.177 0.297 0.216 0.410
+rep 2:   1.962  2.575  1.408  1.408  3.715      1 0.310 0.177 0.297 0.216 0.410
+rep 3:   1.964  2.577   1.41   1.41   3.72      1 0.310 0.177 0.297 0.216 0.410
+rep 4:   1.965  2.577   1.41   1.41   3.72      1 0.310 0.177 0.297 0.216 0.410
+rep 5:   1.962  2.575  1.409  1.409  3.717      1 0.310 0.177 0.297 0.216 0.410
+
+Partition model subset 2:
+         r(AC)  r(AG)  r(AT)  r(CG)  r(CT)  r(GT) pi(A) pi(C) pi(G) pi(T) alpha
+rep 1:    4.38  7.085  1.609  7.085   4.38      1 0.269 0.164 0.160 0.407 0.361
+rep 2:     4.4  7.116  1.617  7.116    4.4      1 0.269 0.164 0.161 0.407 0.361
+rep 3:   4.382  7.087   1.61  7.087  4.382      1 0.269 0.164 0.160 0.407 0.361
+rep 4:   4.384   7.09  1.611   7.09  4.384      1 0.269 0.164 0.160 0.407 0.361
+rep 5:   4.381  7.086  1.609  7.086  4.381      1 0.269 0.164 0.161 0.407 0.361
+
+Partition model subset 3:
+         r(AC)  r(AG)  r(AT)  r(CG)  r(CT)  r(GT) pi(A) pi(C) pi(G) pi(T) alpha  pinv
+rep 1:       1  4.936  3.391 0.4568  4.936      1 0.157 0.354 0.288 0.202 4.014 0.034
+rep 2:       1  4.938  3.393 0.4572  4.938      1 0.157 0.354 0.288 0.202 4.016 0.034
+rep 3:       1  4.938  3.393 0.4569  4.938      1 0.157 0.354 0.288 0.202 4.008 0.033
+rep 4:       1  4.939  3.394 0.4572  4.939      1 0.157 0.354 0.288 0.202 4.011 0.033
+rep 5:       1  4.938  3.393 0.4572  4.938      1 0.157 0.354 0.288 0.202 4.017 0.034
+
+Treelengths and subset rate multipliers:
+          TL   R(1)  R(2)  R(3)
+rep 1:  1.693 0.541 0.300 2.159
+rep 2:  1.693 0.541 0.300 2.158
+rep 3:  1.693 0.541 0.300 2.159
+rep 4:  1.693 0.541 0.300 2.159
+rep 5:  1.693 0.541 0.301 2.158
+
+Saving final trees from all search reps to 3diffModels.byCodonPos.best.all.tre
+
+Saving final tree from best search rep (#1) to 3diffModels.byCodonPos.best.tre
+#######################################################
diff --git a/example/partition/exampleRuns/3parts.diffModelTypes/garli.conf b/example/partition/exampleRuns/3parts.diffModelTypes/garli.conf
new file mode 100644
index 0000000..167ee1c
--- /dev/null
+++ b/example/partition/exampleRuns/3parts.diffModelTypes/garli.conf
@@ -0,0 +1,83 @@
+[general]
+datafname = zakonEtAl2006.11tax.nex
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = 3diffModels.byCodonPos
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 5000
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+outputsitelikelihoods = 0
+optimizeinputonly = 0
+collapsebranches = 1
+
+searchreps = 5
+bootstrapreps = 0
+linkmodels = 0
+subsetspecificrates = 1
+
+[model1]
+datatype = nucleotide
+ratematrix = ( 0 1 2 2 3 4 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = none
+
+[model2]
+datatype = nucleotide
+ratematrix = ( 0 1 2 1 0 3 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = none
+
+[model3]
+datatype = nucleotide
+ratematrix = ( 0 1 2 3 1 0 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 5
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
diff --git a/example/partition/exampleRuns/3parts.diffModelTypes/zakonEtAl2006.11tax.nex b/example/partition/exampleRuns/3parts.diffModelTypes/zakonEtAl2006.11tax.nex
new file mode 100644
index 0000000..0a676a5
--- /dev/null
+++ b/example/partition/exampleRuns/3parts.diffModelTypes/zakonEtAl2006.11tax.nex
@@ -0,0 +1,32 @@
+#NEXUS
+
+[
+This dataset is from:
+Zakon, Lu, Zwickl and Hillis. 2006. Sodium channel genes and the evolution of diversity in communication signals of electric fishes: Convergent molecular evolution. Proc. Natl. Acad. Sci. USA. 103(10):3675-80.
+]
+
+begin data;
+dimensions ntax=11 nchar=2178;
+format datatype=dna missing=? gap=-;
+matrix
+MorNa6    CCTGTGACTCCACATTTTGAGCACGTACTCAGTGTGGGAAACCTGGTTTTCTCAGGGATATTTGCTGGTGAAATGGTCTTGAAAATTATTGCTATGGACCCCTACTACTACTTCCAGGTTGGATGGAACGTGTTTGACAGCATCATTGTTACCATGAGTATGGTGGAGATGGTACTGGCTGATGTAGAGGGTCTGTCGGTTCTGCGGTCCTTTCGTTTGCTACGTGTCTTCAAGCTTGCCAAATCATGGCCTACCCTCAACATGCTGCTAACGATCATCGGAAACTCAGTGGGTGCTCTGGGGAACCTCACCGTGGTGCTGGCCATCATCGTTTTCATCTTCGCTGTGGTTGGAATGCAGCTGTTTGCCAAAAACTACAAGGACTGCGTCTGCAAGATCGCCGAGGATTGTGAGCTGCCCCGGTGGCACATGCATGACTTCTTCCACTCTTTCCTCATCGTGTTCCGCATCCTCTGTGGAGA [...]
+ClownNa6  CCCATGAGCCCTGAGTTTGACCACATGCTCTCTGTGGGAAACCTGGTTTTCACTGGAATCTTCACAGCTGAAATGGTCCTAAAACTCATTGCTATGGACCCCTACTACTACTTCCAGGTTGGATGGAACATATTTGACAGCATCATTGTCACTCTAAGCCTAGTGGAACTGGGGCTCGCTAATGTTCAGGGTCTGTCAGTCCTGCGATCCTTTCGTTTGTTGCGAGTGTTCAAGCTGGCAAAGTCTTGGCCCACCCTCAACATGCTGATCAAGATCATCGGGAATTCCGTGGGCGCCCTGGGCAACCTGACCCTGGTGCTGGCCATCATCGTCTTCATCTTCGCCGTGGTGGGCATGCAGCTCTTTGGGAAGACCTACAAGGACTGCGTGTGCAAGATTGCCAGTGACTGCGAGCTTCCCCGCTGGCACATGAATGACTTCTTCCACTCGTTCCTTATCGTGTTCCGCATCCTCTGCGGGGA [...]
+AraNa6    CCAATGAGTCCCGCGTTTGACCATATGCTGACCGTGGGAAACCTCGTTTTTACGGGGATCTTTACAGCTGAGATGGTATTCAAGCTCATCGCCATGGATCCATACCACTACTTCCAGGTTGGATGGAACATTTTTGACAGCATCATTGTCACACTTAGCCTGGTGGAGCTGGGTCTCGCGAATGTTCAGGGCCTTTCGGTCTTGCGCTCCTTCCGCTTGCTGCGGGTCTTCAAGCTGGCCAAGTCTTGGCCTACCCTGAACATGCTCATCAAGATCATTGGAAACTCAGTGGGTGCCCTAGGGAACCTCACACTGGTGCTGGCCATCATCGTCTTCATCTTCGCTGTCGTGGGCATGCAGCTGTTCGGTAAGAGCTACAAGGACTGTGTGTGTAAGATTGCAGAGGACTGTGAGCTACCCCGCTGGCACATGAATGACTTCTTCCACTCCTTCCTCATCGTGTTCCGCATCTTGTGTGGCGA [...]
+puffNa6   CCCATGACCGAAGAGTTCGACTACATGCTTTCAGTGGGAAATCTGGTTTTCACAGGAATCTTCGCGGCGGAAATGTTCTTCAAATTGATCGCCATGGATCCGTACTACTATTTCCAAGTTGGCTGGAACATTTTTGACAGCATCATCGTCACGCTCAGTCTGGTGGAGTTAGGGCTTGCAAACGTCCAGGGGCTGTCCGTCCTCAGGTCCTTCCGTCTGCTTCGGGTCTTCAAACTTGCCAAGTCCTGGCCCACGCTCAACATGCTGATCAAGATTATCGGTAATTCAGTTGGAGCTTTAGGGAATCTGACTTTGGTGCTGGCCATCATCGTCTTCATCTTCGCTGTGGTGGGGATGCAGCTCTTCGGCAAAAGCTACAAGGACTGTGTGTGCAAGATTTCCTCCGACTGCGAGCTGCCACGCTGGCACATGAATGACTTCTTCCACTCCTTCCTCATCGTGTTCCGCATCCTGTGCGGCGA [...]
+NewZebra  CCTATGAGTCCACATTTTGAACATGTCCTCTCAGTGGGCAACTTGGTGTTCACAGGAATCTTCACAGCTGAAATGGTGTTCAAGCTTATAGCTATGGACCCTTACTACTACTTCCAGGTGGGCTGGAACATTTTTGACAGCATCATTGTCACACTCAGCCTGGTGGAGTTGGGACTGGCCAACGTTCAGGGATTGTCCGTTCTAAGGTCCTTTCGTTTGCTACGTGTCTTCAAACTGGCTAAATCTTGGCCCACCCTTAACATGCTGATCAAGATCATCGGCAACTCAGTGGGTGCTCTAGGGAACCTAACACTTGTTCTGGCCATCATTGTCTTCATCTTTGCCGTGGTGGGCATGCAGCTTTTTGGAAAAAGCTACAAGGACTGCGTTTGTAAGATCTCTGAGGATTGCGAGCTGCCCCGCTGGCACATGAACGACTTCTTCCACTCATTCCTCATCGTCTTTCGGATCTTATGTGGAGA [...]
+SterNa6   CCCATGAGCGAAACCTTTCAACACGTGCTCACCATAGGGAACCTGGTGTTTACTACCATCTTTACGGCTGAAATGGTGTCGAAGATCATCGCCCTGGACCCTTACTACTACTTCCAGGTGGGCTGGAACATCTTCGACTGCATCATCGTCACTCTCAGTCTGGTGGAGCTAAGCCTATCCAACATGCCGGGCCTGTCTGTGCTCAGATCCTTTCGTTTGATGCGTATTTTCAAGCTGGCCAAGTCCTGGCCCACGCTCAACATGCTGATCAAGATCATCGGCAACTCAATGGGCGCCCTGGGGAACCTGACCTTCGTGTTGGCCATCGTCATCTTCATCTTCGCCGTGGTGGGCTTCCAGCTGTTCGGGAAGAGCTACAAGGACAACGTGTGCAAGGTCAGCGCGGACTGCACGCTGCCTCGCTGGCACATGAACGACTTCTTCCACTCCTTCCTGATCGTGTTTCGCATCCTGTGCGGCGA [...]
+eelNa6    CCCATGAACGAAAGCTTTCAGAGTCTGCTCAGTGCAGGAAACCTGGTGTTTACCACTATCTTTGCGGCTGAAATGGTGTTGAAGATCATTGCCTTGGACCCCTACTACTACTTCCAGCAGACGTGGAACATATTTGACAGCATCATTGTCAGTCTCAGTCTGTTGGAGCTTGGACTATCCAATATGCAAGGAATGTCTGTGCTCAGATCCTTACGTTTGCTGCGTATCTTCAAATTGGCCAAGTCCTGGCCCACGCTCAACATTCTGATCAAGATAATCTGCAACTCGGTGGGCGCTCTGGGCAACCTGACCATTGTGCTGGCCATTATCGTCTTCATCTTCGCCTTGGTGGGCTTTCAGCTGTTCGGAAAGAACTACAAGGAGTACGTGTGCAAGATCTCTGATGACTGTGAGCTGCCCCGCTGGCACATGAATGACTTCTTCCACTCCTTCCTGATTGTGTTCCGTGCCTTGTGTGGCGA [...]
+catNa6    CCCATGAGTTCGAACTTTGAACACGTGCTCAGTGTTGGCAATTTGGTGTTCACTGGTATTTTCACGGCTGAAATGGTGTTCAAGCTCATTGCCTTGGACCCCTTCTACTACTTCCAGGTTGGCTGGAACATATTTGACAGCATCATCGTCACTCTTAGCCTGGTGGAGTTAGGCCTGGCCAATGTGCAGGGTCTGTCTGTACTCAGATCCTTTCGTTTGCTGCGAGTCTTTAAGCTGGCTAAATCCTGGCCCACGCTCAACATGCTGATCAAAATCATTGGAAACTCTGTGGGTGCTCTGGGGAACCTGACTCTGGTGCTGGCCATCGTCGTCTTCATCTTCGCCGTCGTAGGCATGCAACTTTTTGGCAAGAGCTACAAGGACTGCGTGTGTAAGATTGCAGAGGACTGCGAACTGCCCCGCTGGCACATGAACGATTTTTTCCATTCGTTTCTCATTGTCTTCCGCATCCTTTGTGGTGA [...]
+AptNa6    ---------------------------CTCACTGTGGGGAACCTGGTGTTTACTGGCATCTTTACGGCTGAAATGGTGTTTAAGCTCATTGCCATGGACCCCTACTACTACTTCCAGGTGGGCTGGAACATCTTCGACAGCATCATCGTCACCCTCAGTCTGGTGGAGCTGGGGCTAGCCAACGTGCAGGGTCTGTCTGTGCTCAGGTCCTTCCGTTTGCTGCGTGTCTTCAAGTTGGCCAAGTCCTGGCCAACGCTCAATATGCTCATCAAGATCATTGGCAACTCGGTGGGAGCCCTGGGCAACCTGACACTGGTGCTGGCCATTATTGTCTTCATCTTTGCCGTGGTGGGCATGCAGCTATTTGGGAAGAGCTACAAGGACTGCGTGTGCAAGATTGCGCTGGACTGCGAGCTTCCCCGCTGGCACATGACGGACTTCTTCCACTCCTTCCTGATCGTGTTCCGCATCCTATGCGGCGA [...]
+PinniNa6  CCCATGAGTGAAACGTTTGATTACGTCCTCAGCACAGGGAACCTGGTGTTTACCATCATCTTTGCAGCTGAAATGGTCTTGAAGCTCATTGCCATGGACCCCTACTACTACTTCCAGCAGACGTGGAACATCTTTGACTTTTTCATTGTCTCACTCAGTCTGGTGGAGATGGGACTGGCTAACATGCAGGGGCTGTCAGTGCTTAGGTCCTTTCGACTGCTGCGTATCTTTAAGTTGGCCAAGTCCTGGCCCACGCTCAATATTCTGATCAAGATCATCTGCAACTCGGTGGGCGCCCTGGGAAACCTGACCATCGTGCTGGCCATTATCGTCTTCATCTTCGCCTTGGTGGGCATGCAGCTGTTCGGGAAGAATTACAAAGAGTTTGTGTGCAAGATCAGTGCAGACTGTACGCTGCCTCGCTGGCATATGAATGACTTCTTCCATTCCTTCCTGATTGTGTTCCGCTGCCTGTGCGGCGA [...]
+tetra     CCCATGACCCAGGAGTTCGACTACATGCTTTCAGTGGGAAATCTGGTTTTCACAGGAATTTTTGCAGCAGAAATGTTCTTCAAGCTGATCGCCATGGATCCGTACTACTATTTCCAAGTTGGCTGGAACATTTTTGACAGCATCATTGTCACCCTCAGCCTGGTAGAGTTGGGGCTTGCGAACGTCCAGGGCCTGTCTGTCCTCAGGTCCTTCCGCCTGCTCCGTGTCTTCAAACTTGCCAAATCCTGGCCCACACTCAACATGCTGATCAAGATTATTGGGAGCTCAGTTGGAGCGCTAGGGAATCTGACGTTGGTGCTGGCCATCATCGTCTTCATCTTCGCTGTGGTGGGGATGCAGCTCTTTGGCAAAAGCTACAAGGACTGCGTGTGCAAGATTTCCACGGAGTGCGAGCTGCCGCGCTGGCACATGAATGACTTCTTCCACTCCTTCCTCATCGTCTTCCGCATCCTGTGTGGCGA [...]
+;
+end;
+
+begin sets;
+charset 1st = 1-2178\3;
+charset 2nd = 2-2178\3;
+charset 3rd = 3-2178\3;
+
+charpartition byPos = 1stpos:1st, 2ndpos:2nd, 3rdpos:3rd;
+end;
diff --git a/example/partition/exampleRuns/3parts.sameModelType/GTRG.byCodonPos.best.all.tre b/example/partition/exampleRuns/3parts.sameModelType/GTRG.byCodonPos.best.all.tre
new file mode 100644
index 0000000..b55c470
--- /dev/null
+++ b/example/partition/exampleRuns/3parts.sameModelType/GTRG.byCodonPos.best.all.tre
@@ -0,0 +1,45 @@
+#NEXUS
+
+begin trees;
+translate
+  1  MorNa6,
+  2  ClownNa6,
+  3  AraNa6,
+  4  puffNa6,
+  5  NewZebra,
+  6  SterNa6,
+  7  eelNa6,
+  8  catNa6,
+  9  AptNa6,
+  10  PinniNa6,
+  11  tetra;
+tree rep1 = [&U][!GarliScore -13317.476][!GarliModel  S  0.537510  0.298334  2.164156  M1 r  1.96303 2.57644 1.41588 1.40309 3.71934 1.00000 e 0.31003 0.17680 0.29731 0.21587 a 0.40948  M2 r  4.35487 7.08884 1.61154 7.10637 4.40765 1.00000 e 0.26945 0.16356 0.16047 0.40652 a 0.36068  M3 r  1.05753 5.26691 3.56999 0.45425 5.00066 1.00000 e 0.15376 0.35598 0.28703 0.20323 a 2.98105 ](2:0.10703165,(((4:0.05364663,11:0.06184584):0.19108047,(5:0.14417819,((9:0.05850189,(6:0.11371497,(7:0.0914 [...]
+tree rep2 = [&U][!GarliScore -13317.47562068][!GarliModel  S  0.537815  0.298299  2.163886  M1 r  1.96121 2.57482 1.41467 1.40183 3.71590 1.00000 e 0.31004 0.17684 0.29727 0.21585 a 0.40945  M2 r  4.34466 7.07387 1.60798 7.08746 4.39742 1.00000 e 0.26945 0.16357 0.16046 0.40651 a 0.36064  M3 r  1.05779 5.26662 3.56935 0.45432 4.99980 1.00000 e 0.15376 0.35598 0.28703 0.20323 a 2.98250 ](1:0.21918938,(3:0.12723378,((11:0.06183524,4:0.05365126):0.19104889,(5:0.14416302,(((6:0.11370992,(7:0 [...]
+tree rep3BEST = [&U][!GarliScore -13317.47553635][!GarliModel  S  0.537685  0.298385  2.163931  M1 r  1.96467 2.57867 1.41721 1.40421 3.72196 1.00000 e 0.31001 0.17680 0.29731 0.21588 a 0.40946  M2 r  4.35109 7.08420 1.61029 7.09735 4.40365 1.00000 e 0.26944 0.16357 0.16047 0.40651 a 0.36069  M3 r  1.05688 5.26146 3.56445 0.45377 4.99483 1.00000 e 0.15376 0.35599 0.28702 0.20324 a 2.98242 ](2:0.10704821,(3:0.12724057,((((9:0.05848787,(6:0.11368725,(10:0.10150703,7:0.09144655):0.05202563) [...]
+tree rep4 = [&U][!GarliScore -13317.47562688][!GarliModel  S  0.537329  0.298606  2.164065  M1 r  1.96515 2.57963 1.41791 1.40466 3.72296 1.00000 e 0.31000 0.17681 0.29731 0.21588 a 0.40937  M2 r  4.35036 7.08252 1.60977 7.09693 4.40309 1.00000 e 0.26945 0.16358 0.16048 0.40649 a 0.36085  M3 r  1.05782 5.26791 3.56940 0.45444 4.99990 1.00000 e 0.15375 0.35598 0.28701 0.20325 a 2.98191 ](1:0.21921103,(((5:0.14417250,(((6:0.11369300,(10:0.10148761,7:0.09145309):0.05203563):0.02485464,9:0.0 [...]
+tree rep5 = [&U][!GarliScore -13317.47556216][!GarliModel  S  0.537809  0.298334  2.163856  M1 r  1.96255 2.57667 1.41592 1.40291 3.71885 1.00000 e 0.31002 0.17683 0.29729 0.21586 a 0.40947  M2 r  4.35420 7.08806 1.61141 7.10209 4.40718 1.00000 e 0.26944 0.16356 0.16048 0.40652 a 0.36067  M3 r  1.05664 5.26048 3.56398 0.45380 4.99439 1.00000 e 0.15377 0.35599 0.28701 0.20323 a 2.98294 ](2:0.10701725,(((4:0.05365011,11:0.06184420):0.19105362,(5:0.14416439,(8:0.09164590,(9:0.05848480,(6:0. [...]
+end;
+[M1
+begin paup;
+clear;
+gett file=GTRG.byCodonPos.best.all.tre storebr;
+lset userbr nst=6 rmat=(1.96466607 2.57866828 1.41720682 1.40421118 3.72196291) base=(0.31001147 0.17679842 0.29731015) rates=gamma shape= 0.40945560 ncat=4 pinv= 0.00000000;
+end;
+
+]
+[M2
+begin paup;
+clear;
+gett file=GTRG.byCodonPos.best.all.tre storebr;
+lset userbr nst=6 rmat=(4.35109191 7.08420034 1.61028932 7.09735225 4.40364615) base=(0.26944152 0.16357276 0.16047328) rates=gamma shape= 0.36068741 ncat=4 pinv= 0.00000000;
+end;
+
+]
+[M3
+begin paup;
+clear;
+gett file=GTRG.byCodonPos.best.all.tre storebr;
+lset userbr nst=6 rmat=(1.05688356 5.26146270 3.56444849 0.45377036 4.99483076) base=(0.15376193 0.35598688 0.28701584) rates=gamma shape= 2.98242438 ncat=4 pinv= 0.00000000;
+end;
+
+]
diff --git a/example/partition/exampleRuns/3parts.sameModelType/GTRG.byCodonPos.best.tre b/example/partition/exampleRuns/3parts.sameModelType/GTRG.byCodonPos.best.tre
new file mode 100644
index 0000000..e8d4ca2
--- /dev/null
+++ b/example/partition/exampleRuns/3parts.sameModelType/GTRG.byCodonPos.best.tre
@@ -0,0 +1,20 @@
+#NEXUS
+
+begin trees;
+translate
+ 1 MorNa6,
+ 2 ClownNa6,
+ 3 AraNa6,
+ 4 puffNa6,
+ 5 NewZebra,
+ 6 SterNa6,
+ 7 eelNa6,
+ 8 catNa6,
+ 9 AptNa6,
+ 10 PinniNa6,
+ 11 tetra;
+tree bestREP3 = [&U][!GarliScore -13317.475536][!GarliModel  S  0.537685  0.298385  2.163931  M1 r  1.96467 2.57867 1.41721 1.40421 3.72196 1.00000 e 0.31001 0.17680 0.29731 0.21588 a 0.40946  M2 r  4.35109 7.08420 1.61029 7.09735 4.40365 1.00000 e 0.26944 0.16357 0.16047 0.40651 a 0.36069  M3 r  1.05688 5.26146 3.56445 0.45377 4.99483 1.00000 e 0.15376 0.35599 0.28702 0.20324 a 2.98242 ](2:0.10704821,(3:0.12724057,((((9:0.05848787,(6:0.11368725,(10:0.10150703,7:0.09144655):0.05202563):0 [...]
+end;
+[
+ S  0.537685  0.298385  2.163931  M1 r  1.96467 2.57867 1.41721 1.40421 3.72196 1.00000 e 0.31001 0.17680 0.29731 0.21588 a 0.40946  M2 r  4.35109 7.08420 1.61029 7.09735 4.40365 1.00000 e 0.26944 0.16357 0.16047 0.40651 a 0.36069  M3 r  1.05688 5.26146 3.56445 0.45377 4.99483 1.00000 e 0.15376 0.35599 0.28702 0.20324 a 2.98242 
+]
diff --git a/example/partition/exampleRuns/3parts.sameModelType/GTRG.byCodonPos.log00.log b/example/partition/exampleRuns/3parts.sameModelType/GTRG.byCodonPos.log00.log
new file mode 100644
index 0000000..c996595
--- /dev/null
+++ b/example/partition/exampleRuns/3parts.sameModelType/GTRG.byCodonPos.log00.log
@@ -0,0 +1,3980 @@
+Search rep 1 (of 5)
+random seed = 406932
+gen	best_like	time	optPrecision
+0	-13490.0811	1	0.5
+10	-13374.29999	1	0.5
+20	-13374.23319	1	0.5
+30	-13374.20572	1	0.5
+40	-13336.92602	1	0.5
+50	-13336.92566	1	0.5
+60	-13325.49332	1	0.5
+70	-13324.96079	2	0.5
+80	-13324.67627	2	0.5
+90	-13324.51124	2	0.5
+100	-13324.39124	2	0.5
+110	-13324.20155	2	0.5
+120	-13324.06185	2	0.5
+130	-13323.89357	2	0.5
+140	-13323.89276	2	0.5
+150	-13323.49276	2	0.5
+160	-13323.42757	3	0.5
+170	-13323.37692	3	0.5
+180	-13323.37692	3	0.5
+190	-13323.3742	3	0.5
+200	-13323.13567	3	0.5
+210	-13323.03843	3	0.5
+220	-13322.98322	3	0.5
+230	-13322.97665	3	0.5
+240	-13322.97246	3	0.5
+250	-13322.92396	3	0.5
+260	-13322.91993	4	0.5
+270	-13322.85394	4	0.5
+280	-13322.62924	4	0.5
+290	-13322.62605	4	0.5
+300	-13322.60346	4	0.5
+310	-13322.60346	4	0.5
+320	-13322.57552	4	0.5
+330	-13322.57552	4	0.5
+340	-13322.57106	5	0.5
+350	-13322.57106	5	0.5
+360	-13322.56375	5	0.5
+370	-13322.56375	5	0.5
+380	-13322.55287	5	0.5
+390	-13322.50803	5	0.5
+400	-13322.47816	5	0.5
+410	-13322.47816	6	0.5
+420	-13322.47816	6	0.5
+430	-13322.47816	6	0.5
+440	-13322.47816	6	0.5
+450	-13322.46686	6	0.5
+460	-13322.46686	6	0.5
+470	-13322.46686	6	0.5
+480	-13322.19862	7	0.5
+490	-13322.06992	7	0.5
+500	-13321.87547	7	0.5
+510	-13321.87547	7	0.5
+520	-13321.81395	7	0.5
+530	-13321.76208	7	0.5
+540	-13321.76208	7	0.5
+550	-13321.60849	7	0.5
+560	-13321.57194	7	0.5
+570	-13321.551	8	0.5
+580	-13321.47403	8	0.5
+590	-13321.47403	8	0.5
+600	-13321.47403	8	0.5
+610	-13319.59121	8	0.402
+620	-13319.55148	8	0.402
+630	-13319.50292	8	0.402
+640	-13319.2316	8	0.402
+650	-13318.94168	8	0.402
+660	-13318.81817	8	0.402
+670	-13318.77936	9	0.402
+680	-13318.75982	9	0.402
+690	-13318.74722	9	0.402
+700	-13318.70112	9	0.402
+710	-13318.66809	9	0.402
+720	-13318.6542	9	0.402
+730	-13318.64871	9	0.402
+740	-13318.59713	9	0.402
+750	-13318.5966	9	0.402
+760	-13318.57454	9	0.402
+770	-13318.57203	9	0.402
+780	-13318.46912	9	0.402
+790	-13318.46912	9	0.402
+800	-13318.46856	9	0.402
+810	-13318.46781	9	0.402
+820	-13318.46781	10	0.402
+830	-13318.40551	10	0.402
+840	-13318.37206	10	0.402
+850	-13318.26884	10	0.402
+860	-13318.2574	10	0.402
+870	-13318.2574	10	0.402
+880	-13318.2574	10	0.402
+890	-13318.25655	10	0.402
+900	-13318.23403	10	0.402
+910	-13318.2299	10	0.402
+920	-13318.22587	10	0.402
+930	-13318.20646	10	0.402
+940	-13318.173	10	0.402
+950	-13318.173	11	0.402
+960	-13318.14896	11	0.402
+970	-13318.08722	11	0.402
+980	-13318.07017	11	0.402
+990	-13318.06091	11	0.402
+1000	-13318.06091	11	0.402
+1010	-13318.06091	11	0.402
+1020	-13318.06091	11	0.402
+1030	-13318.06091	11	0.402
+1040	-13318.05977	11	0.402
+1050	-13318.02462	11	0.402
+1060	-13318.02462	11	0.402
+1070	-13318.02462	11	0.402
+1080	-13318.02213	11	0.402
+1090	-13318.01818	12	0.402
+1100	-13317.99538	12	0.402
+1110	-13317.9589	12	0.304
+1120	-13317.94955	12	0.304
+1130	-13317.94955	12	0.304
+1140	-13317.94955	12	0.304
+1150	-13317.93711	12	0.304
+1160	-13317.93711	12	0.304
+1170	-13317.93711	12	0.304
+1180	-13317.92948	12	0.304
+1190	-13317.92834	12	0.304
+1200	-13317.88246	12	0.304
+1210	-13317.88246	13	0.304
+1220	-13317.88246	13	0.304
+1230	-13317.88246	13	0.304
+1240	-13317.88246	13	0.304
+1250	-13317.84679	13	0.304
+1260	-13317.84679	13	0.304
+1270	-13317.84572	13	0.304
+1280	-13317.84572	13	0.304
+1290	-13317.84572	13	0.304
+1300	-13317.84314	13	0.304
+1310	-13317.84293	14	0.304
+1320	-13317.84184	14	0.304
+1330	-13317.84184	14	0.304
+1340	-13317.84184	14	0.304
+1350	-13317.84184	14	0.304
+1360	-13317.83326	14	0.304
+1370	-13317.83326	14	0.304
+1380	-13317.83326	14	0.304
+1390	-13317.78328	14	0.304
+1400	-13317.78221	14	0.304
+1410	-13317.76229	14	0.304
+1420	-13317.76229	15	0.304
+1430	-13317.759	15	0.304
+1440	-13317.75679	15	0.304
+1450	-13317.75679	15	0.304
+1460	-13317.75679	15	0.304
+1470	-13317.75634	15	0.304
+1480	-13317.74915	15	0.304
+1490	-13317.74915	15	0.304
+1500	-13317.74907	15	0.304
+1510	-13317.72829	15	0.304
+1520	-13317.72829	16	0.304
+1530	-13317.72829	16	0.304
+1540	-13317.72829	16	0.304
+1550	-13317.72829	16	0.304
+1560	-13317.72829	16	0.304
+1570	-13317.72829	16	0.304
+1580	-13317.7278	16	0.304
+1590	-13317.72287	16	0.304
+1600	-13317.71347	16	0.304
+1610	-13317.70469	17	0.206
+1620	-13317.69782	17	0.206
+1630	-13317.69782	17	0.206
+1640	-13317.69782	17	0.206
+1650	-13317.66852	17	0.206
+1660	-13317.65347	17	0.206
+1670	-13317.65234	17	0.206
+1680	-13317.64329	17	0.206
+1690	-13317.64125	17	0.206
+1700	-13317.62107	18	0.206
+1710	-13317.61836	18	0.206
+1720	-13317.59447	18	0.206
+1730	-13317.59447	18	0.206
+1740	-13317.59447	18	0.206
+1750	-13317.59357	18	0.206
+1760	-13317.59314	18	0.206
+1770	-13317.59314	18	0.206
+1780	-13317.59314	18	0.206
+1790	-13317.59314	18	0.206
+1800	-13317.59314	18	0.206
+1810	-13317.59078	19	0.206
+1820	-13317.59078	19	0.206
+1830	-13317.59078	19	0.206
+1840	-13317.59078	19	0.206
+1850	-13317.5885	19	0.206
+1860	-13317.5885	19	0.206
+1870	-13317.5885	19	0.206
+1880	-13317.5885	19	0.206
+1890	-13317.5885	19	0.206
+1900	-13317.58753	20	0.206
+1910	-13317.58753	20	0.206
+1920	-13317.58753	20	0.206
+1930	-13317.58753	20	0.206
+1940	-13317.58753	20	0.206
+1950	-13317.58753	20	0.206
+1960	-13317.58753	20	0.206
+1970	-13317.58753	20	0.206
+1980	-13317.58728	20	0.206
+1990	-13317.58728	20	0.206
+2000	-13317.582	21	0.206
+2010	-13317.582	21	0.206
+2020	-13317.582	21	0.206
+2030	-13317.582	21	0.206
+2040	-13317.582	21	0.206
+2050	-13317.582	21	0.206
+2060	-13317.582	21	0.206
+2070	-13317.582	21	0.206
+2080	-13317.582	21	0.206
+2090	-13317.57753	21	0.206
+2100	-13317.57753	22	0.206
+2110	-13317.57344	22	0.108
+2120	-13317.57263	22	0.108
+2130	-13317.57257	22	0.108
+2140	-13317.57257	22	0.108
+2150	-13317.57257	22	0.108
+2160	-13317.57257	22	0.108
+2170	-13317.57257	22	0.108
+2180	-13317.57257	23	0.108
+2190	-13317.57228	23	0.108
+2200	-13317.57228	23	0.108
+2210	-13317.57228	23	0.108
+2220	-13317.57228	23	0.108
+2230	-13317.56999	23	0.108
+2240	-13317.56997	23	0.108
+2250	-13317.56997	23	0.108
+2260	-13317.56997	23	0.108
+2270	-13317.56997	24	0.108
+2280	-13317.56789	24	0.108
+2290	-13317.56789	24	0.108
+2300	-13317.56789	24	0.108
+2310	-13317.56789	24	0.108
+2320	-13317.56658	24	0.108
+2330	-13317.56658	24	0.108
+2340	-13317.56658	24	0.108
+2350	-13317.56658	24	0.108
+2360	-13317.56519	24	0.108
+2370	-13317.56519	25	0.108
+2380	-13317.56519	25	0.108
+2390	-13317.56519	25	0.108
+2400	-13317.56519	25	0.108
+2410	-13317.56056	25	0.108
+2420	-13317.56056	25	0.108
+2430	-13317.56056	25	0.108
+2440	-13317.56056	25	0.108
+2450	-13317.56056	25	0.108
+2460	-13317.56056	26	0.108
+2470	-13317.56056	26	0.108
+2480	-13317.56056	26	0.108
+2490	-13317.56048	26	0.108
+2500	-13317.56048	26	0.108
+2510	-13317.56027	26	0.108
+2520	-13317.56027	26	0.108
+2530	-13317.56027	26	0.108
+2540	-13317.56027	26	0.108
+2550	-13317.55523	27	0.108
+2560	-13317.55523	27	0.108
+2570	-13317.55523	27	0.108
+2580	-13317.55523	27	0.108
+2590	-13317.55523	27	0.108
+2600	-13317.55413	27	0.108
+2610	-13317.55338	27	0.01
+2620	-13317.55338	27	0.01
+2630	-13317.54977	28	0.01
+2640	-13317.54799	28	0.01
+2650	-13317.54799	28	0.01
+2660	-13317.54799	28	0.01
+2670	-13317.54799	28	0.01
+2680	-13317.54799	28	0.01
+2690	-13317.54799	28	0.01
+2700	-13317.54706	29	0.01
+2710	-13317.54706	29	0.01
+2720	-13317.54706	29	0.01
+2730	-13317.54706	29	0.01
+2740	-13317.54535	29	0.01
+2750	-13317.54535	29	0.01
+2760	-13317.54535	29	0.01
+2770	-13317.54314	29	0.01
+2780	-13317.53888	30	0.01
+2790	-13317.53888	30	0.01
+2800	-13317.53888	30	0.01
+2810	-13317.53735	30	0.01
+2820	-13317.5358	30	0.01
+2830	-13317.5358	30	0.01
+2840	-13317.5358	30	0.01
+2850	-13317.5358	30	0.01
+2860	-13317.5358	31	0.01
+2870	-13317.5358	31	0.01
+2880	-13317.5358	31	0.01
+2890	-13317.5358	31	0.01
+2900	-13317.5358	31	0.01
+2910	-13317.52774	31	0.01
+2920	-13317.52774	31	0.01
+2930	-13317.52774	32	0.01
+2940	-13317.52774	32	0.01
+2950	-13317.52753	32	0.01
+2960	-13317.52753	32	0.01
+2970	-13317.52753	32	0.01
+2980	-13317.52753	32	0.01
+2990	-13317.52753	32	0.01
+3000	-13317.52753	32	0.01
+3010	-13317.52753	33	0.01
+3020	-13317.52753	33	0.01
+3030	-13317.52753	33	0.01
+3040	-13317.52753	33	0.01
+3050	-13317.52753	33	0.01
+3060	-13317.52753	33	0.01
+3070	-13317.52753	33	0.01
+3080	-13317.52753	34	0.01
+3090	-13317.52677	34	0.01
+3100	-13317.52677	34	0.01
+3110	-13317.52677	34	0.01
+3120	-13317.52677	34	0.01
+3130	-13317.52677	34	0.01
+3140	-13317.52677	34	0.01
+3150	-13317.52677	34	0.01
+3160	-13317.52677	35	0.01
+3170	-13317.52677	35	0.01
+3180	-13317.52677	35	0.01
+3190	-13317.52677	35	0.01
+3200	-13317.52593	35	0.01
+3210	-13317.52593	35	0.01
+3220	-13317.52593	35	0.01
+3230	-13317.5256	35	0.01
+3240	-13317.5256	36	0.01
+3250	-13317.5256	36	0.01
+3260	-13317.52451	36	0.01
+3270	-13317.52451	36	0.01
+3280	-13317.52451	36	0.01
+3290	-13317.52451	36	0.01
+3300	-13317.52451	36	0.01
+3310	-13317.52451	36	0.01
+3320	-13317.52451	37	0.01
+3330	-13317.5244	37	0.01
+3340	-13317.5244	37	0.01
+3350	-13317.52281	37	0.01
+3360	-13317.5228	37	0.01
+3370	-13317.5228	37	0.01
+3380	-13317.5228	37	0.01
+3390	-13317.5228	38	0.01
+3400	-13317.5228	38	0.01
+3410	-13317.52207	38	0.01
+3420	-13317.52207	38	0.01
+3430	-13317.52207	38	0.01
+3440	-13317.52207	38	0.01
+3450	-13317.52207	38	0.01
+3460	-13317.52207	38	0.01
+3470	-13317.52207	39	0.01
+3480	-13317.52207	39	0.01
+3490	-13317.52207	39	0.01
+3500	-13317.52207	39	0.01
+3510	-13317.52207	39	0.01
+3520	-13317.52207	39	0.01
+3530	-13317.52207	39	0.01
+3540	-13317.52207	39	0.01
+3550	-13317.52207	39	0.01
+3560	-13317.52207	40	0.01
+3570	-13317.52207	40	0.01
+3580	-13317.52207	40	0.01
+3590	-13317.52179	40	0.01
+3600	-13317.52179	40	0.01
+3610	-13317.52179	40	0.01
+3620	-13317.52179	40	0.01
+3630	-13317.52179	41	0.01
+3640	-13317.52179	41	0.01
+3650	-13317.52179	41	0.01
+3660	-13317.52179	41	0.01
+3670	-13317.52179	41	0.01
+3680	-13317.52179	41	0.01
+3690	-13317.52179	41	0.01
+3700	-13317.52179	41	0.01
+3710	-13317.52179	42	0.01
+3720	-13317.52179	42	0.01
+3730	-13317.52179	42	0.01
+3740	-13317.52146	42	0.01
+3750	-13317.52052	42	0.01
+3760	-13317.52052	42	0.01
+3770	-13317.51929	42	0.01
+3780	-13317.51929	43	0.01
+3790	-13317.51929	43	0.01
+3800	-13317.51919	43	0.01
+3810	-13317.51894	43	0.01
+3820	-13317.51894	43	0.01
+3830	-13317.51824	43	0.01
+3840	-13317.51824	43	0.01
+3850	-13317.51824	44	0.01
+3860	-13317.51824	44	0.01
+3870	-13317.51824	44	0.01
+3880	-13317.51686	44	0.01
+3890	-13317.51686	44	0.01
+3900	-13317.51624	44	0.01
+3910	-13317.51624	44	0.01
+3920	-13317.51624	45	0.01
+3930	-13317.51624	45	0.01
+3940	-13317.51624	45	0.01
+3950	-13317.51624	45	0.01
+3960	-13317.51624	45	0.01
+3970	-13317.51571	45	0.01
+3980	-13317.51571	45	0.01
+3990	-13317.51421	45	0.01
+4000	-13317.51421	46	0.01
+4010	-13317.51421	46	0.01
+4020	-13317.51421	46	0.01
+4030	-13317.51421	46	0.01
+4040	-13317.51421	46	0.01
+4050	-13317.51421	46	0.01
+4060	-13317.51421	46	0.01
+4070	-13317.51421	47	0.01
+4080	-13317.51421	47	0.01
+4090	-13317.51386	47	0.01
+4100	-13317.51386	47	0.01
+4110	-13317.51386	47	0.01
+4120	-13317.51386	47	0.01
+4130	-13317.51386	47	0.01
+4140	-13317.51386	48	0.01
+4150	-13317.51386	48	0.01
+4160	-13317.51386	48	0.01
+4170	-13317.5138	48	0.01
+4180	-13317.5138	48	0.01
+4190	-13317.5138	48	0.01
+4200	-13317.5138	48	0.01
+4210	-13317.5138	49	0.01
+4220	-13317.5138	49	0.01
+4230	-13317.5138	49	0.01
+4240	-13317.5138	49	0.01
+4250	-13317.5138	49	0.01
+4260	-13317.5138	49	0.01
+4270	-13317.5138	49	0.01
+4280	-13317.5138	50	0.01
+4290	-13317.5138	50	0.01
+4300	-13317.5138	50	0.01
+4310	-13317.5138	50	0.01
+4320	-13317.51376	50	0.01
+4330	-13317.51376	50	0.01
+4340	-13317.51376	50	0.01
+4350	-13317.51376	51	0.01
+4360	-13317.51376	51	0.01
+4370	-13317.51372	51	0.01
+4380	-13317.51372	51	0.01
+4390	-13317.51372	51	0.01
+4400	-13317.51372	51	0.01
+4410	-13317.51322	51	0.01
+4420	-13317.51322	52	0.01
+4430	-13317.51322	52	0.01
+4440	-13317.51322	52	0.01
+4450	-13317.51322	52	0.01
+4460	-13317.51322	52	0.01
+4470	-13317.51322	52	0.01
+4480	-13317.51322	52	0.01
+4490	-13317.51322	53	0.01
+4500	-13317.51322	53	0.01
+4510	-13317.51322	53	0.01
+4520	-13317.51322	53	0.01
+4530	-13317.51322	53	0.01
+4540	-13317.51322	53	0.01
+4550	-13317.51322	54	0.01
+4560	-13317.51322	54	0.01
+4570	-13317.51074	54	0.01
+4580	-13317.51074	54	0.01
+4590	-13317.51074	54	0.01
+4600	-13317.51074	54	0.01
+4610	-13317.51074	54	0.01
+4620	-13317.51074	55	0.01
+4630	-13317.51074	55	0.01
+4640	-13317.51074	55	0.01
+4650	-13317.51074	55	0.01
+4660	-13317.51074	55	0.01
+4670	-13317.51074	55	0.01
+4680	-13317.51074	55	0.01
+4690	-13317.51074	55	0.01
+4700	-13317.51074	56	0.01
+4710	-13317.51074	56	0.01
+4720	-13317.51074	56	0.01
+4730	-13317.51074	56	0.01
+4740	-13317.51074	56	0.01
+4750	-13317.51074	56	0.01
+4760	-13317.51074	56	0.01
+4770	-13317.51074	57	0.01
+4780	-13317.50842	57	0.01
+4790	-13317.50842	57	0.01
+4800	-13317.50839	57	0.01
+4810	-13317.50839	57	0.01
+4820	-13317.50821	57	0.01
+4830	-13317.50821	57	0.01
+4840	-13317.50821	58	0.01
+4850	-13317.50821	58	0.01
+4860	-13317.50821	58	0.01
+4870	-13317.50821	58	0.01
+4880	-13317.50779	58	0.01
+4890	-13317.50779	58	0.01
+4900	-13317.50739	58	0.01
+4910	-13317.50739	59	0.01
+4920	-13317.50739	59	0.01
+4930	-13317.50739	59	0.01
+4940	-13317.50713	59	0.01
+4950	-13317.50713	59	0.01
+4960	-13317.50713	59	0.01
+4970	-13317.50713	60	0.01
+4980	-13317.50713	60	0.01
+4990	-13317.50713	60	0.01
+5000	-13317.50704	60	0.01
+5010	-13317.50704	60	0.01
+5020	-13317.50704	60	0.01
+5030	-13317.50704	60	0.01
+5040	-13317.50704	61	0.01
+5050	-13317.50679	61	0.01
+5060	-13317.50679	61	0.01
+5070	-13317.50679	61	0.01
+5080	-13317.50679	61	0.01
+5090	-13317.50679	61	0.01
+5100	-13317.50589	62	0.01
+5110	-13317.50589	62	0.01
+5120	-13317.50589	62	0.01
+5130	-13317.50589	62	0.01
+5140	-13317.50589	62	0.01
+5150	-13317.50589	62	0.01
+5160	-13317.50589	62	0.01
+5170	-13317.50589	63	0.01
+5180	-13317.50589	63	0.01
+5190	-13317.50589	63	0.01
+5200	-13317.50589	63	0.01
+5210	-13317.50589	63	0.01
+5220	-13317.50589	63	0.01
+5230	-13317.50589	63	0.01
+5240	-13317.50454	63	0.01
+5250	-13317.50454	64	0.01
+5260	-13317.50454	64	0.01
+5270	-13317.50426	64	0.01
+5280	-13317.50426	64	0.01
+5290	-13317.50426	64	0.01
+5300	-13317.50426	64	0.01
+5310	-13317.50426	65	0.01
+5320	-13317.50426	65	0.01
+5330	-13317.50426	65	0.01
+5340	-13317.50339	65	0.01
+5350	-13317.50339	65	0.01
+5360	-13317.50339	65	0.01
+5370	-13317.50339	65	0.01
+5380	-13317.50339	65	0.01
+5390	-13317.50339	66	0.01
+5400	-13317.50338	66	0.01
+5410	-13317.50338	66	0.01
+5420	-13317.50338	66	0.01
+5430	-13317.50338	66	0.01
+5440	-13317.50338	66	0.01
+5450	-13317.50338	66	0.01
+5460	-13317.50338	67	0.01
+5470	-13317.50338	67	0.01
+5480	-13317.50338	67	0.01
+5490	-13317.50338	67	0.01
+5500	-13317.50337	67	0.01
+5510	-13317.50337	67	0.01
+5520	-13317.50337	67	0.01
+5530	-13317.50337	68	0.01
+5540	-13317.50337	68	0.01
+5550	-13317.50329	68	0.01
+5560	-13317.50306	68	0.01
+5570	-13317.50306	68	0.01
+5580	-13317.50306	68	0.01
+5590	-13317.50306	68	0.01
+5600	-13317.50306	69	0.01
+5610	-13317.50306	69	0.01
+5620	-13317.50276	69	0.01
+5630	-13317.50276	69	0.01
+5640	-13317.50276	69	0.01
+5650	-13317.50276	69	0.01
+5660	-13317.50276	69	0.01
+5670	-13317.50276	69	0.01
+5680	-13317.50276	70	0.01
+5690	-13317.50276	70	0.01
+5700	-13317.50276	70	0.01
+5710	-13317.50276	70	0.01
+5720	-13317.50276	70	0.01
+5730	-13317.50276	70	0.01
+5740	-13317.50276	70	0.01
+5750	-13317.50276	71	0.01
+5760	-13317.50276	71	0.01
+5770	-13317.50275	71	0.01
+5780	-13317.50275	71	0.01
+5790	-13317.50275	71	0.01
+5800	-13317.50275	71	0.01
+5810	-13317.50275	71	0.01
+5820	-13317.50275	72	0.01
+5830	-13317.50275	72	0.01
+5840	-13317.50275	72	0.01
+5850	-13317.50275	72	0.01
+5860	-13317.50275	72	0.01
+5870	-13317.50275	72	0.01
+5880	-13317.50275	72	0.01
+5890	-13317.50275	73	0.01
+5900	-13317.50275	73	0.01
+5910	-13317.50275	73	0.01
+5920	-13317.50275	73	0.01
+5930	-13317.50275	73	0.01
+5940	-13317.50275	73	0.01
+5950	-13317.50275	73	0.01
+5960	-13317.50275	74	0.01
+5970	-13317.50267	74	0.01
+5980	-13317.50267	74	0.01
+5990	-13317.50222	74	0.01
+6000	-13317.50222	74	0.01
+6010	-13317.50222	74	0.01
+6020	-13317.50222	74	0.01
+6030	-13317.50222	74	0.01
+6040	-13317.50222	75	0.01
+6050	-13317.50222	75	0.01
+6060	-13317.50222	75	0.01
+6070	-13317.50222	75	0.01
+6080	-13317.50222	75	0.01
+6090	-13317.50222	75	0.01
+6100	-13317.50222	76	0.01
+6110	-13317.50222	76	0.01
+6120	-13317.50206	76	0.01
+6130	-13317.50206	76	0.01
+6140	-13317.50141	76	0.01
+6150	-13317.50141	76	0.01
+6160	-13317.50029	77	0.01
+6170	-13317.50029	77	0.01
+6180	-13317.50029	77	0.01
+6190	-13317.50029	77	0.01
+6200	-13317.50029	77	0.01
+6210	-13317.50029	77	0.01
+6220	-13317.50029	77	0.01
+6230	-13317.50029	77	0.01
+6240	-13317.50029	78	0.01
+6250	-13317.50019	78	0.01
+6260	-13317.50019	78	0.01
+6270	-13317.50019	78	0.01
+6280	-13317.50019	78	0.01
+6290	-13317.50019	78	0.01
+6300	-13317.50019	78	0.01
+6310	-13317.50019	79	0.01
+6320	-13317.50019	79	0.01
+6330	-13317.50019	79	0.01
+6340	-13317.50019	79	0.01
+6350	-13317.50019	79	0.01
+6360	-13317.50019	79	0.01
+6370	-13317.50019	79	0.01
+6380	-13317.50019	80	0.01
+6390	-13317.50019	80	0.01
+6400	-13317.50019	80	0.01
+6410	-13317.50019	80	0.01
+6420	-13317.50019	80	0.01
+6430	-13317.50019	80	0.01
+6440	-13317.50019	80	0.01
+6450	-13317.50019	81	0.01
+6460	-13317.50019	81	0.01
+6470	-13317.50019	81	0.01
+6480	-13317.50019	81	0.01
+6490	-13317.50012	81	0.01
+6500	-13317.50012	81	0.01
+6510	-13317.50012	81	0.01
+6520	-13317.50012	82	0.01
+6530	-13317.50012	82	0.01
+6540	-13317.50012	82	0.01
+6550	-13317.50012	82	0.01
+6560	-13317.49972	82	0.01
+6570	-13317.49972	82	0.01
+6580	-13317.49972	82	0.01
+6590	-13317.49972	83	0.01
+6600	-13317.49972	83	0.01
+6610	-13317.49972	83	0.01
+6620	-13317.49972	83	0.01
+6630	-13317.49972	83	0.01
+6640	-13317.49972	83	0.01
+6650	-13317.49972	83	0.01
+6660	-13317.49972	83	0.01
+6670	-13317.49972	84	0.01
+6680	-13317.49966	84	0.01
+6690	-13317.49966	84	0.01
+6700	-13317.49966	84	0.01
+6710	-13317.49966	84	0.01
+6720	-13317.49966	84	0.01
+6730	-13317.49953	84	0.01
+6740	-13317.49953	84	0.01
+6750	-13317.49953	85	0.01
+6760	-13317.49953	85	0.01
+6770	-13317.49953	85	0.01
+6780	-13317.49953	85	0.01
+6790	-13317.49953	85	0.01
+6800	-13317.49953	85	0.01
+6810	-13317.49953	85	0.01
+6820	-13317.49953	86	0.01
+6830	-13317.49953	86	0.01
+6840	-13317.49953	86	0.01
+6850	-13317.49953	86	0.01
+6860	-13317.49953	86	0.01
+6870	-13317.49953	86	0.01
+6880	-13317.49953	86	0.01
+6890	-13317.49953	87	0.01
+6900	-13317.49953	87	0.01
+6910	-13317.49952	87	0.01
+6920	-13317.49952	87	0.01
+6930	-13317.49952	87	0.01
+6940	-13317.49952	87	0.01
+6950	-13317.49952	87	0.01
+6960	-13317.49952	88	0.01
+6970	-13317.49952	88	0.01
+6980	-13317.49949	88	0.01
+6990	-13317.49949	88	0.01
+7000	-13317.49949	88	0.01
+7010	-13317.49949	88	0.01
+7020	-13317.49949	88	0.01
+7030	-13317.49949	89	0.01
+7040	-13317.49949	89	0.01
+7050	-13317.49949	89	0.01
+7060	-13317.49949	89	0.01
+7070	-13317.49849	89	0.01
+7080	-13317.49849	89	0.01
+7090	-13317.49849	89	0.01
+7100	-13317.49849	90	0.01
+7110	-13317.49829	90	0.01
+7120	-13317.49829	90	0.01
+7130	-13317.49829	90	0.01
+7140	-13317.49829	90	0.01
+7150	-13317.49829	90	0.01
+7160	-13317.49829	90	0.01
+7170	-13317.49829	90	0.01
+7180	-13317.49829	91	0.01
+7190	-13317.49829	91	0.01
+7200	-13317.49829	91	0.01
+7210	-13317.49829	91	0.01
+7220	-13317.49829	91	0.01
+7230	-13317.49829	91	0.01
+7240	-13317.49829	92	0.01
+7250	-13317.49829	92	0.01
+7260	-13317.49651	92	0.01
+7270	-13317.49651	92	0.01
+7280	-13317.49651	92	0.01
+7290	-13317.49651	92	0.01
+7300	-13317.49651	92	0.01
+7310	-13317.49651	93	0.01
+7320	-13317.49651	93	0.01
+7330	-13317.49651	93	0.01
+7340	-13317.49651	93	0.01
+7350	-13317.49651	93	0.01
+7360	-13317.49651	93	0.01
+7370	-13317.49651	93	0.01
+7380	-13317.49651	94	0.01
+7390	-13317.49651	94	0.01
+7400	-13317.49651	94	0.01
+7410	-13317.49651	94	0.01
+7420	-13317.49651	94	0.01
+7430	-13317.49651	94	0.01
+7440	-13317.49651	94	0.01
+7450	-13317.49651	95	0.01
+7460	-13317.49651	95	0.01
+7470	-13317.49651	95	0.01
+7480	-13317.49651	95	0.01
+7490	-13317.49651	95	0.01
+7500	-13317.49651	95	0.01
+7510	-13317.49651	96	0.01
+7520	-13317.49651	96	0.01
+7530	-13317.49651	96	0.01
+7540	-13317.49651	96	0.01
+7550	-13317.49651	96	0.01
+7560	-13317.49651	96	0.01
+7570	-13317.49651	96	0.01
+7580	-13317.49651	97	0.01
+7590	-13317.49651	97	0.01
+7600	-13317.49651	97	0.01
+7610	-13317.49651	97	0.01
+7620	-13317.49651	97	0.01
+7630	-13317.4964	97	0.01
+7640	-13317.4964	97	0.01
+7650	-13317.4964	98	0.01
+7660	-13317.4964	98	0.01
+7670	-13317.4964	98	0.01
+7680	-13317.4964	98	0.01
+7690	-13317.4964	98	0.01
+7700	-13317.4964	98	0.01
+7710	-13317.4964	98	0.01
+7720	-13317.4964	98	0.01
+7730	-13317.49638	99	0.01
+7740	-13317.49638	99	0.01
+7750	-13317.49638	99	0.01
+7760	-13317.49638	99	0.01
+7770	-13317.49638	99	0.01
+7780	-13317.49638	99	0.01
+7790	-13317.49638	99	0.01
+7800	-13317.49638	100	0.01
+Score after final optimization: -13317.4756
+Final	-13317.4756	102	0.01
+Search rep 2 (of 5)
+random seed = 459000111
+gen	best_like	time	optPrecision
+0	-13325.02307	103	0.5
+10	-13324.51715	103	0.5
+20	-13324.51715	103	0.5
+30	-13324.00223	103	0.5
+40	-13323.4358	104	0.5
+50	-13323.20651	104	0.5
+60	-13323.05858	104	0.5
+70	-13322.72526	104	0.5
+80	-13322.72116	104	0.5
+90	-13322.1786	104	0.5
+100	-13322.06157	104	0.5
+110	-13321.99279	104	0.5
+120	-13321.87016	104	0.5
+130	-13321.87016	105	0.5
+140	-13321.61574	105	0.5
+150	-13321.48941	105	0.5
+160	-13321.18067	105	0.5
+170	-13321.10628	105	0.5
+180	-13321.05786	105	0.5
+190	-13321.05554	105	0.5
+200	-13320.98992	105	0.5
+210	-13320.91141	105	0.5
+220	-13320.89396	105	0.5
+230	-13320.89396	106	0.5
+240	-13320.84072	106	0.5
+250	-13320.71324	106	0.5
+260	-13320.71324	106	0.5
+270	-13320.67877	106	0.5
+280	-13320.67877	106	0.5
+290	-13320.67877	106	0.5
+300	-13320.25334	106	0.5
+310	-13320.15569	106	0.5
+320	-13320.06637	106	0.5
+330	-13320.06637	106	0.5
+340	-13320.04345	106	0.5
+350	-13320.02502	106	0.5
+360	-13319.88285	106	0.5
+370	-13319.88285	107	0.5
+380	-13319.68149	107	0.5
+390	-13319.68149	107	0.5
+400	-13319.68149	107	0.5
+410	-13319.68149	107	0.5
+420	-13319.67414	107	0.5
+430	-13319.67414	107	0.5
+440	-13319.67414	107	0.5
+450	-13319.65574	107	0.5
+460	-13319.58478	107	0.5
+470	-13319.56491	107	0.5
+480	-13319.55692	107	0.5
+490	-13319.52813	107	0.5
+500	-13319.46273	107	0.5
+510	-13319.38792	107	0.402
+520	-13319.375	107	0.402
+530	-13319.3594	108	0.402
+540	-13319.3594	108	0.402
+550	-13319.33266	108	0.402
+560	-13319.33266	108	0.402
+570	-13319.32329	108	0.402
+580	-13319.26312	108	0.402
+590	-13319.26071	108	0.402
+600	-13319.24262	108	0.402
+610	-13319.20564	108	0.402
+620	-13319.01061	108	0.402
+630	-13319.00319	108	0.402
+640	-13319.00319	108	0.402
+650	-13319.00319	108	0.402
+660	-13319.00246	108	0.402
+670	-13318.88184	109	0.402
+680	-13318.87742	109	0.402
+690	-13318.84759	109	0.402
+700	-13318.83515	109	0.402
+710	-13318.81224	109	0.402
+720	-13318.79535	109	0.402
+730	-13318.79535	109	0.402
+740	-13318.79102	109	0.402
+750	-13318.78345	109	0.402
+760	-13318.77696	109	0.402
+770	-13318.77696	109	0.402
+780	-13318.73097	109	0.402
+790	-13318.73097	109	0.402
+800	-13318.68164	110	0.402
+810	-13318.67634	110	0.402
+820	-13318.67226	110	0.402
+830	-13318.66374	110	0.402
+840	-13318.66374	110	0.402
+850	-13318.63281	110	0.402
+860	-13318.63066	110	0.402
+870	-13318.62216	110	0.402
+880	-13318.62038	110	0.402
+890	-13318.61417	110	0.402
+900	-13318.60552	110	0.402
+910	-13318.6045	111	0.402
+920	-13318.55982	111	0.402
+930	-13318.55982	111	0.402
+940	-13318.52384	111	0.402
+950	-13318.50074	111	0.402
+960	-13318.48382	111	0.402
+970	-13318.45251	111	0.402
+980	-13318.44831	111	0.402
+990	-13318.44831	111	0.402
+1000	-13318.44831	111	0.402
+1010	-13318.42659	112	0.304
+1020	-13318.42659	112	0.304
+1030	-13318.42659	112	0.304
+1040	-13318.42659	112	0.304
+1050	-13318.42659	112	0.304
+1060	-13318.42455	112	0.304
+1070	-13318.38099	112	0.304
+1080	-13318.38099	112	0.304
+1090	-13318.37444	112	0.304
+1100	-13318.37444	112	0.304
+1110	-13318.37444	113	0.304
+1120	-13318.35093	113	0.304
+1130	-13318.16837	113	0.304
+1140	-13318.16837	113	0.304
+1150	-13318.1125	113	0.304
+1160	-13318.1125	113	0.304
+1170	-13318.1125	113	0.304
+1180	-13318.0297	113	0.304
+1190	-13318.02441	113	0.304
+1200	-13318.02441	113	0.304
+1210	-13318.01159	114	0.304
+1220	-13318.01159	114	0.304
+1230	-13317.98848	114	0.304
+1240	-13317.98848	114	0.304
+1250	-13317.98817	114	0.304
+1260	-13317.98817	114	0.304
+1270	-13317.98817	114	0.304
+1280	-13317.95278	114	0.304
+1290	-13317.95278	114	0.304
+1300	-13317.95278	114	0.304
+1310	-13317.95159	114	0.304
+1320	-13317.95159	115	0.304
+1330	-13317.95159	115	0.304
+1340	-13317.95159	115	0.304
+1350	-13317.95136	115	0.304
+1360	-13317.95136	115	0.304
+1370	-13317.95136	115	0.304
+1380	-13317.94395	115	0.304
+1390	-13317.94395	115	0.304
+1400	-13317.94395	115	0.304
+1410	-13317.94112	115	0.304
+1420	-13317.93788	116	0.304
+1430	-13317.8572	116	0.304
+1440	-13317.85306	116	0.304
+1450	-13317.84599	116	0.304
+1460	-13317.84599	116	0.304
+1470	-13317.84599	116	0.304
+1480	-13317.84599	116	0.304
+1490	-13317.8336	116	0.304
+1500	-13317.8239	116	0.304
+1510	-13317.80593	116	0.206
+1520	-13317.79398	117	0.206
+1530	-13317.79398	117	0.206
+1540	-13317.79398	117	0.206
+1550	-13317.79398	117	0.206
+1560	-13317.78727	117	0.206
+1570	-13317.77227	117	0.206
+1580	-13317.77227	117	0.206
+1590	-13317.77227	117	0.206
+1600	-13317.77227	117	0.206
+1610	-13317.74288	117	0.206
+1620	-13317.74288	118	0.206
+1630	-13317.73937	118	0.206
+1640	-13317.73937	118	0.206
+1650	-13317.73191	118	0.206
+1660	-13317.73118	118	0.206
+1670	-13317.73033	118	0.206
+1680	-13317.73033	118	0.206
+1690	-13317.73033	118	0.206
+1700	-13317.72056	118	0.206
+1710	-13317.72056	118	0.206
+1720	-13317.72056	118	0.206
+1730	-13317.72056	119	0.206
+1740	-13317.72056	119	0.206
+1750	-13317.71021	119	0.206
+1760	-13317.71018	119	0.206
+1770	-13317.71018	119	0.206
+1780	-13317.70579	119	0.206
+1790	-13317.70579	119	0.206
+1800	-13317.70579	119	0.206
+1810	-13317.69594	119	0.206
+1820	-13317.69282	120	0.206
+1830	-13317.69282	120	0.206
+1840	-13317.69019	120	0.206
+1850	-13317.69019	120	0.206
+1860	-13317.68284	120	0.206
+1870	-13317.68284	120	0.206
+1880	-13317.68284	120	0.206
+1890	-13317.68284	120	0.206
+1900	-13317.68284	120	0.206
+1910	-13317.68284	120	0.206
+1920	-13317.68284	121	0.206
+1930	-13317.67989	121	0.206
+1940	-13317.679	121	0.206
+1950	-13317.679	121	0.206
+1960	-13317.6759	121	0.206
+1970	-13317.6759	121	0.206
+1980	-13317.6759	121	0.206
+1990	-13317.6759	121	0.206
+2000	-13317.6463	121	0.206
+2010	-13317.63954	121	0.108
+2020	-13317.63954	122	0.108
+2030	-13317.63954	122	0.108
+2040	-13317.63954	122	0.108
+2050	-13317.63546	122	0.108
+2060	-13317.62927	122	0.108
+2070	-13317.62927	122	0.108
+2080	-13317.62927	122	0.108
+2090	-13317.62927	122	0.108
+2100	-13317.62927	122	0.108
+2110	-13317.62651	123	0.108
+2120	-13317.62301	123	0.108
+2130	-13317.61437	123	0.108
+2140	-13317.61437	123	0.108
+2150	-13317.61437	123	0.108
+2160	-13317.61005	123	0.108
+2170	-13317.61005	123	0.108
+2180	-13317.61005	123	0.108
+2190	-13317.61005	124	0.108
+2200	-13317.61005	124	0.108
+2210	-13317.61005	124	0.108
+2220	-13317.61005	124	0.108
+2230	-13317.61005	124	0.108
+2240	-13317.61005	124	0.108
+2250	-13317.61005	124	0.108
+2260	-13317.61005	124	0.108
+2270	-13317.61005	124	0.108
+2280	-13317.61005	125	0.108
+2290	-13317.60997	125	0.108
+2300	-13317.60997	125	0.108
+2310	-13317.60262	125	0.108
+2320	-13317.60243	125	0.108
+2330	-13317.60243	125	0.108
+2340	-13317.60243	125	0.108
+2350	-13317.56133	125	0.108
+2360	-13317.56133	125	0.108
+2370	-13317.56133	126	0.108
+2380	-13317.56133	126	0.108
+2390	-13317.56133	126	0.108
+2400	-13317.55121	126	0.108
+2410	-13317.55121	126	0.108
+2420	-13317.55121	126	0.108
+2430	-13317.55121	126	0.108
+2440	-13317.55121	126	0.108
+2450	-13317.55121	126	0.108
+2460	-13317.55121	126	0.108
+2470	-13317.55121	127	0.108
+2480	-13317.55121	127	0.108
+2490	-13317.55121	127	0.108
+2500	-13317.54568	127	0.108
+2510	-13317.51739	127	0.01
+2520	-13317.51739	127	0.01
+2530	-13317.51739	127	0.01
+2540	-13317.51739	127	0.01
+2550	-13317.51739	128	0.01
+2560	-13317.51739	128	0.01
+2570	-13317.51739	128	0.01
+2580	-13317.51739	128	0.01
+2590	-13317.51739	128	0.01
+2600	-13317.51091	128	0.01
+2610	-13317.51091	128	0.01
+2620	-13317.51091	128	0.01
+2630	-13317.51036	129	0.01
+2640	-13317.51036	129	0.01
+2650	-13317.51036	129	0.01
+2660	-13317.51036	129	0.01
+2670	-13317.51036	129	0.01
+2680	-13317.51036	129	0.01
+2690	-13317.51036	129	0.01
+2700	-13317.51036	129	0.01
+2710	-13317.51036	130	0.01
+2720	-13317.51036	130	0.01
+2730	-13317.5096	130	0.01
+2740	-13317.5096	130	0.01
+2750	-13317.5096	130	0.01
+2760	-13317.5096	130	0.01
+2770	-13317.5096	130	0.01
+2780	-13317.5096	130	0.01
+2790	-13317.50567	131	0.01
+2800	-13317.50567	131	0.01
+2810	-13317.50556	131	0.01
+2820	-13317.50255	131	0.01
+2830	-13317.50255	131	0.01
+2840	-13317.50255	131	0.01
+2850	-13317.50255	131	0.01
+2860	-13317.50255	132	0.01
+2870	-13317.50231	132	0.01
+2880	-13317.50226	132	0.01
+2890	-13317.50226	132	0.01
+2900	-13317.50226	132	0.01
+2910	-13317.50226	132	0.01
+2920	-13317.5	132	0.01
+2930	-13317.49808	133	0.01
+2940	-13317.49793	133	0.01
+2950	-13317.4979	133	0.01
+2960	-13317.4979	133	0.01
+2970	-13317.4979	133	0.01
+2980	-13317.4979	133	0.01
+2990	-13317.4979	133	0.01
+3000	-13317.4979	134	0.01
+3010	-13317.4979	134	0.01
+3020	-13317.4979	134	0.01
+3030	-13317.4979	134	0.01
+3040	-13317.4979	134	0.01
+3050	-13317.4979	134	0.01
+3060	-13317.4979	134	0.01
+3070	-13317.4979	134	0.01
+3080	-13317.49788	135	0.01
+3090	-13317.49788	135	0.01
+3100	-13317.49769	135	0.01
+3110	-13317.49769	135	0.01
+3120	-13317.49132	135	0.01
+3130	-13317.49098	135	0.01
+3140	-13317.49098	135	0.01
+3150	-13317.49098	136	0.01
+3160	-13317.49098	136	0.01
+3170	-13317.49098	136	0.01
+3180	-13317.49012	136	0.01
+3190	-13317.49012	136	0.01
+3200	-13317.49012	136	0.01
+3210	-13317.49012	136	0.01
+3220	-13317.49012	136	0.01
+3230	-13317.49012	137	0.01
+3240	-13317.49012	137	0.01
+3250	-13317.49012	137	0.01
+3260	-13317.49012	137	0.01
+3270	-13317.49012	137	0.01
+3280	-13317.49012	137	0.01
+3290	-13317.49012	137	0.01
+3300	-13317.49012	138	0.01
+3310	-13317.49012	138	0.01
+3320	-13317.49012	138	0.01
+3330	-13317.49012	138	0.01
+3340	-13317.49012	138	0.01
+3350	-13317.49012	138	0.01
+3360	-13317.49012	138	0.01
+3370	-13317.49012	138	0.01
+3380	-13317.49012	138	0.01
+3390	-13317.49012	139	0.01
+3400	-13317.49012	139	0.01
+3410	-13317.49012	139	0.01
+3420	-13317.49012	139	0.01
+3430	-13317.49012	139	0.01
+3440	-13317.49012	139	0.01
+3450	-13317.48961	139	0.01
+3460	-13317.48961	140	0.01
+3470	-13317.48961	140	0.01
+3480	-13317.48961	140	0.01
+3490	-13317.48961	140	0.01
+3500	-13317.48961	140	0.01
+3510	-13317.48961	140	0.01
+3520	-13317.48961	140	0.01
+3530	-13317.48961	141	0.01
+3540	-13317.48961	141	0.01
+3550	-13317.48961	141	0.01
+3560	-13317.48943	141	0.01
+3570	-13317.48943	141	0.01
+3580	-13317.48943	141	0.01
+3590	-13317.48943	141	0.01
+3600	-13317.48943	141	0.01
+3610	-13317.48943	142	0.01
+3620	-13317.48943	142	0.01
+3630	-13317.48943	142	0.01
+3640	-13317.48943	142	0.01
+3650	-13317.48943	142	0.01
+3660	-13317.48943	142	0.01
+3670	-13317.48943	142	0.01
+3680	-13317.48943	142	0.01
+3690	-13317.48943	143	0.01
+3700	-13317.48943	143	0.01
+3710	-13317.48943	143	0.01
+3720	-13317.4894	143	0.01
+3730	-13317.4894	143	0.01
+3740	-13317.4894	143	0.01
+3750	-13317.4894	143	0.01
+3760	-13317.4894	143	0.01
+3770	-13317.4894	144	0.01
+3780	-13317.48939	144	0.01
+3790	-13317.48939	144	0.01
+3800	-13317.48939	144	0.01
+3810	-13317.48939	144	0.01
+3820	-13317.48939	144	0.01
+3830	-13317.48939	144	0.01
+3840	-13317.48939	144	0.01
+3850	-13317.48939	145	0.01
+3860	-13317.48939	145	0.01
+3870	-13317.48939	145	0.01
+3880	-13317.48939	145	0.01
+3890	-13317.4883	145	0.01
+3900	-13317.4883	145	0.01
+3910	-13317.48785	145	0.01
+3920	-13317.48785	146	0.01
+3930	-13317.48785	146	0.01
+3940	-13317.48785	146	0.01
+3950	-13317.48785	146	0.01
+3960	-13317.48785	146	0.01
+3970	-13317.48774	146	0.01
+3980	-13317.48774	146	0.01
+3990	-13317.48774	147	0.01
+4000	-13317.48774	147	0.01
+4010	-13317.48774	147	0.01
+4020	-13317.48774	147	0.01
+4030	-13317.48774	147	0.01
+4040	-13317.48774	147	0.01
+4050	-13317.48774	147	0.01
+4060	-13317.4871	148	0.01
+4070	-13317.4871	148	0.01
+4080	-13317.4871	148	0.01
+4090	-13317.4871	148	0.01
+4100	-13317.4871	148	0.01
+4110	-13317.4871	148	0.01
+4120	-13317.4871	148	0.01
+4130	-13317.4871	149	0.01
+4140	-13317.4871	149	0.01
+4150	-13317.4871	149	0.01
+4160	-13317.4871	149	0.01
+4170	-13317.4871	149	0.01
+4180	-13317.4871	149	0.01
+4190	-13317.4871	149	0.01
+4200	-13317.4871	149	0.01
+4210	-13317.4871	150	0.01
+4220	-13317.4871	150	0.01
+4230	-13317.48707	150	0.01
+4240	-13317.48707	150	0.01
+4250	-13317.48707	150	0.01
+4260	-13317.48707	150	0.01
+4270	-13317.48707	150	0.01
+4280	-13317.48707	151	0.01
+4290	-13317.48707	151	0.01
+4300	-13317.48701	151	0.01
+4310	-13317.48701	151	0.01
+4320	-13317.48701	151	0.01
+4330	-13317.48701	151	0.01
+4340	-13317.48701	151	0.01
+4350	-13317.48701	152	0.01
+4360	-13317.48701	152	0.01
+4370	-13317.48701	152	0.01
+4380	-13317.48701	152	0.01
+4390	-13317.48701	152	0.01
+4400	-13317.48701	152	0.01
+4410	-13317.48701	152	0.01
+4420	-13317.48701	153	0.01
+4430	-13317.48701	153	0.01
+4440	-13317.48701	153	0.01
+4450	-13317.48701	153	0.01
+4460	-13317.48701	153	0.01
+4470	-13317.48701	153	0.01
+4480	-13317.48701	153	0.01
+4490	-13317.48701	154	0.01
+4500	-13317.48701	154	0.01
+4510	-13317.48701	154	0.01
+4520	-13317.48701	154	0.01
+4530	-13317.48701	154	0.01
+4540	-13317.48701	154	0.01
+4550	-13317.48701	154	0.01
+4560	-13317.48701	155	0.01
+4570	-13317.48701	155	0.01
+4580	-13317.48691	155	0.01
+4590	-13317.48691	155	0.01
+4600	-13317.48691	155	0.01
+4610	-13317.48691	155	0.01
+4620	-13317.48691	155	0.01
+4630	-13317.48691	155	0.01
+4640	-13317.48691	156	0.01
+4650	-13317.48691	156	0.01
+4660	-13317.48691	156	0.01
+4670	-13317.48691	156	0.01
+4680	-13317.48691	156	0.01
+4690	-13317.48691	156	0.01
+4700	-13317.48691	156	0.01
+4710	-13317.48691	157	0.01
+4720	-13317.48635	157	0.01
+4730	-13317.48635	157	0.01
+4740	-13317.48635	157	0.01
+4750	-13317.48635	157	0.01
+4760	-13317.48635	157	0.01
+4770	-13317.48635	157	0.01
+4780	-13317.48635	158	0.01
+4790	-13317.48635	158	0.01
+4800	-13317.48635	158	0.01
+4810	-13317.48635	158	0.01
+4820	-13317.48588	158	0.01
+4830	-13317.48588	158	0.01
+4840	-13317.48588	159	0.01
+4850	-13317.48588	159	0.01
+4860	-13317.48588	159	0.01
+4870	-13317.48588	159	0.01
+4880	-13317.48588	159	0.01
+4890	-13317.48588	159	0.01
+4900	-13317.48588	159	0.01
+4910	-13317.48588	160	0.01
+4920	-13317.4857	160	0.01
+4930	-13317.4857	160	0.01
+4940	-13317.4857	160	0.01
+4950	-13317.4857	160	0.01
+4960	-13317.4857	160	0.01
+4970	-13317.4855	160	0.01
+4980	-13317.4855	161	0.01
+4990	-13317.4855	161	0.01
+5000	-13317.4855	161	0.01
+5010	-13317.4855	161	0.01
+5020	-13317.4855	161	0.01
+5030	-13317.4855	161	0.01
+5040	-13317.4855	161	0.01
+5050	-13317.48484	162	0.01
+5060	-13317.48484	162	0.01
+5070	-13317.48484	162	0.01
+5080	-13317.48484	162	0.01
+5090	-13317.48484	162	0.01
+5100	-13317.48484	162	0.01
+5110	-13317.48484	163	0.01
+5120	-13317.48484	163	0.01
+5130	-13317.48484	163	0.01
+5140	-13317.48484	163	0.01
+5150	-13317.48484	163	0.01
+5160	-13317.48484	163	0.01
+5170	-13317.48484	164	0.01
+5180	-13317.48484	164	0.01
+5190	-13317.48484	164	0.01
+5200	-13317.48484	164	0.01
+5210	-13317.48484	164	0.01
+5220	-13317.4847	164	0.01
+5230	-13317.4847	164	0.01
+5240	-13317.4847	165	0.01
+5250	-13317.4847	165	0.01
+5260	-13317.4847	165	0.01
+5270	-13317.48392	165	0.01
+5280	-13317.48392	165	0.01
+5290	-13317.48392	165	0.01
+5300	-13317.48392	165	0.01
+5310	-13317.48392	166	0.01
+5320	-13317.48392	166	0.01
+5330	-13317.48392	166	0.01
+5340	-13317.48392	166	0.01
+5350	-13317.48392	166	0.01
+5360	-13317.48392	167	0.01
+5370	-13317.48392	167	0.01
+5380	-13317.48392	167	0.01
+5390	-13317.48392	167	0.01
+5400	-13317.48392	167	0.01
+5410	-13317.48392	167	0.01
+5420	-13317.48392	167	0.01
+5430	-13317.48392	168	0.01
+5440	-13317.48392	168	0.01
+5450	-13317.48392	168	0.01
+5460	-13317.48392	168	0.01
+5470	-13317.48392	168	0.01
+5480	-13317.48392	168	0.01
+5490	-13317.48392	168	0.01
+5500	-13317.48392	169	0.01
+5510	-13317.48392	169	0.01
+5520	-13317.48392	169	0.01
+5530	-13317.48392	169	0.01
+5540	-13317.48392	169	0.01
+5550	-13317.48392	169	0.01
+5560	-13317.48392	170	0.01
+5570	-13317.48392	170	0.01
+5580	-13317.48392	170	0.01
+5590	-13317.48392	170	0.01
+5600	-13317.48392	170	0.01
+5610	-13317.48392	170	0.01
+5620	-13317.48392	171	0.01
+5630	-13317.48392	171	0.01
+5640	-13317.48392	171	0.01
+5650	-13317.48392	171	0.01
+5660	-13317.48392	171	0.01
+5670	-13317.48392	171	0.01
+5680	-13317.48392	172	0.01
+5690	-13317.48392	172	0.01
+5700	-13317.48392	172	0.01
+5710	-13317.48392	172	0.01
+5720	-13317.48392	172	0.01
+5730	-13317.48392	172	0.01
+5740	-13317.48392	173	0.01
+5750	-13317.48392	173	0.01
+5760	-13317.48392	173	0.01
+5770	-13317.48322	173	0.01
+5780	-13317.48322	173	0.01
+5790	-13317.48322	173	0.01
+5800	-13317.48322	173	0.01
+5810	-13317.48322	174	0.01
+5820	-13317.48322	174	0.01
+5830	-13317.48322	174	0.01
+5840	-13317.48322	174	0.01
+5850	-13317.48322	174	0.01
+5860	-13317.48322	175	0.01
+5870	-13317.48322	175	0.01
+5880	-13317.48322	175	0.01
+5890	-13317.48322	175	0.01
+5900	-13317.48322	175	0.01
+5910	-13317.48322	175	0.01
+5920	-13317.48322	176	0.01
+5930	-13317.48322	176	0.01
+5940	-13317.48322	176	0.01
+5950	-13317.48317	176	0.01
+5960	-13317.48317	176	0.01
+5970	-13317.48317	176	0.01
+5980	-13317.48317	176	0.01
+5990	-13317.483	176	0.01
+6000	-13317.483	177	0.01
+6010	-13317.483	177	0.01
+6020	-13317.483	177	0.01
+6030	-13317.483	177	0.01
+6040	-13317.48291	177	0.01
+6050	-13317.48291	177	0.01
+6060	-13317.48291	178	0.01
+6070	-13317.48291	178	0.01
+6080	-13317.48291	178	0.01
+6090	-13317.48291	178	0.01
+6100	-13317.48291	178	0.01
+6110	-13317.48291	178	0.01
+6120	-13317.48238	179	0.01
+6130	-13317.48238	179	0.01
+6140	-13317.48238	179	0.01
+6150	-13317.48238	179	0.01
+6160	-13317.48238	179	0.01
+6170	-13317.48238	179	0.01
+6180	-13317.48238	180	0.01
+6190	-13317.48238	180	0.01
+6200	-13317.48238	180	0.01
+6210	-13317.48238	180	0.01
+6220	-13317.48238	180	0.01
+6230	-13317.48238	180	0.01
+6240	-13317.48238	180	0.01
+6250	-13317.48238	181	0.01
+6260	-13317.4823	181	0.01
+6270	-13317.4823	181	0.01
+6280	-13317.4823	181	0.01
+6290	-13317.4823	181	0.01
+6300	-13317.4823	181	0.01
+6310	-13317.4823	182	0.01
+6320	-13317.48216	182	0.01
+6330	-13317.48216	182	0.01
+6340	-13317.48216	182	0.01
+6350	-13317.48213	182	0.01
+6360	-13317.48213	182	0.01
+6370	-13317.48213	182	0.01
+6380	-13317.48159	183	0.01
+6390	-13317.48159	183	0.01
+6400	-13317.48159	183	0.01
+6410	-13317.48159	183	0.01
+6420	-13317.48159	183	0.01
+6430	-13317.48159	183	0.01
+6440	-13317.48159	183	0.01
+6450	-13317.48135	184	0.01
+6460	-13317.48135	184	0.01
+6470	-13317.48135	184	0.01
+6480	-13317.48135	184	0.01
+6490	-13317.48135	184	0.01
+6500	-13317.48135	184	0.01
+6510	-13317.48135	184	0.01
+6520	-13317.48135	185	0.01
+6530	-13317.48135	185	0.01
+6540	-13317.48135	185	0.01
+6550	-13317.48135	185	0.01
+6560	-13317.48135	185	0.01
+6570	-13317.48135	185	0.01
+6580	-13317.48135	185	0.01
+6590	-13317.48135	185	0.01
+6600	-13317.48119	186	0.01
+6610	-13317.48119	186	0.01
+6620	-13317.48119	186	0.01
+6630	-13317.48119	186	0.01
+6640	-13317.48119	186	0.01
+6650	-13317.48116	186	0.01
+6660	-13317.48116	187	0.01
+6670	-13317.48116	187	0.01
+6680	-13317.48116	187	0.01
+6690	-13317.48116	187	0.01
+6700	-13317.48116	187	0.01
+6710	-13317.48116	187	0.01
+6720	-13317.48116	187	0.01
+6730	-13317.48116	188	0.01
+6740	-13317.48116	188	0.01
+6750	-13317.48116	188	0.01
+6760	-13317.48116	188	0.01
+6770	-13317.48116	188	0.01
+6780	-13317.48116	188	0.01
+6790	-13317.48113	188	0.01
+6800	-13317.48113	189	0.01
+6810	-13317.48113	189	0.01
+6820	-13317.48113	189	0.01
+6830	-13317.48113	189	0.01
+6840	-13317.48113	189	0.01
+6850	-13317.48113	189	0.01
+6860	-13317.48113	189	0.01
+6870	-13317.48113	190	0.01
+6880	-13317.48113	190	0.01
+6890	-13317.48113	190	0.01
+6900	-13317.48113	190	0.01
+6910	-13317.48113	190	0.01
+6920	-13317.48113	190	0.01
+6930	-13317.48113	191	0.01
+6940	-13317.48113	191	0.01
+6950	-13317.48113	191	0.01
+6960	-13317.48113	191	0.01
+6970	-13317.48113	191	0.01
+6980	-13317.48113	191	0.01
+6990	-13317.48113	191	0.01
+7000	-13317.48111	192	0.01
+7010	-13317.48111	192	0.01
+7020	-13317.48111	192	0.01
+7030	-13317.48111	192	0.01
+7040	-13317.48111	192	0.01
+7050	-13317.48111	192	0.01
+7060	-13317.48111	193	0.01
+7070	-13317.48111	193	0.01
+7080	-13317.48111	193	0.01
+7090	-13317.48111	193	0.01
+7100	-13317.48104	193	0.01
+7110	-13317.48104	193	0.01
+7120	-13317.48104	194	0.01
+7130	-13317.48104	194	0.01
+7140	-13317.48104	194	0.01
+7150	-13317.48104	194	0.01
+7160	-13317.48104	194	0.01
+7170	-13317.48104	194	0.01
+7180	-13317.48104	195	0.01
+7190	-13317.48046	195	0.01
+7200	-13317.48046	195	0.01
+7210	-13317.48046	195	0.01
+7220	-13317.48046	195	0.01
+7230	-13317.48046	195	0.01
+7240	-13317.48046	195	0.01
+7250	-13317.48046	196	0.01
+7260	-13317.48046	196	0.01
+7270	-13317.48046	196	0.01
+7280	-13317.48046	196	0.01
+7290	-13317.48046	196	0.01
+7300	-13317.48046	196	0.01
+7310	-13317.48046	197	0.01
+7320	-13317.48046	197	0.01
+7330	-13317.48046	197	0.01
+7340	-13317.48046	197	0.01
+7350	-13317.48046	197	0.01
+7360	-13317.48046	197	0.01
+7370	-13317.48044	197	0.01
+7380	-13317.48044	198	0.01
+7390	-13317.48044	198	0.01
+7400	-13317.48044	198	0.01
+7410	-13317.48044	198	0.01
+7420	-13317.48044	198	0.01
+7430	-13317.48044	198	0.01
+7440	-13317.48044	198	0.01
+7450	-13317.48044	199	0.01
+7460	-13317.48044	199	0.01
+7470	-13317.48039	199	0.01
+7480	-13317.48039	199	0.01
+7490	-13317.48039	199	0.01
+7500	-13317.48039	199	0.01
+7510	-13317.48039	199	0.01
+7520	-13317.48039	200	0.01
+7530	-13317.48032	200	0.01
+7540	-13317.48032	200	0.01
+7550	-13317.48032	200	0.01
+7560	-13317.48032	200	0.01
+7570	-13317.48032	200	0.01
+7580	-13317.48032	200	0.01
+7590	-13317.48032	201	0.01
+7600	-13317.48032	201	0.01
+Score after final optimization: -13317.47562
+Final	-13317.47562	203	0.01
+Search rep 3 (of 5)
+random seed = 401425806
+gen	best_like	time	optPrecision
+0	-13353.44503	205	0.5
+10	-13324.06974	205	0.5
+20	-13323.64916	205	0.5
+30	-13323.40712	205	0.5
+40	-13323.04703	205	0.5
+50	-13322.97844	205	0.5
+60	-13322.93355	205	0.5
+70	-13322.88542	205	0.5
+80	-13322.88542	205	0.5
+90	-13322.88542	206	0.5
+100	-13322.77988	206	0.5
+110	-13322.71935	206	0.5
+120	-13322.06842	206	0.5
+130	-13321.99112	206	0.5
+140	-13321.99112	206	0.5
+150	-13321.98281	206	0.5
+160	-13321.96558	206	0.5
+170	-13321.86967	206	0.5
+180	-13321.67566	206	0.5
+190	-13321.46219	207	0.5
+200	-13321.29083	207	0.5
+210	-13321.23515	207	0.5
+220	-13321.17043	207	0.5
+230	-13320.97826	207	0.5
+240	-13320.97165	207	0.5
+250	-13320.81538	207	0.5
+260	-13320.81538	207	0.5
+270	-13320.72868	207	0.5
+280	-13320.47589	207	0.5
+290	-13320.47586	208	0.5
+300	-13320.47586	208	0.5
+310	-13320.34727	208	0.5
+320	-13320.34615	208	0.5
+330	-13320.29727	208	0.5
+340	-13320.27726	208	0.5
+350	-13320.27127	208	0.5
+360	-13320.2277	208	0.5
+370	-13320.04459	208	0.5
+380	-13319.92709	208	0.5
+390	-13319.9059	209	0.5
+400	-13319.9059	209	0.5
+410	-13319.9059	209	0.5
+420	-13319.90107	209	0.5
+430	-13319.8152	209	0.5
+440	-13319.8152	209	0.5
+450	-13319.78187	209	0.5
+460	-13319.77703	209	0.5
+470	-13319.75341	209	0.5
+480	-13319.7331	209	0.5
+490	-13319.72034	210	0.5
+500	-13319.72034	210	0.5
+510	-13319.71533	210	0.5
+520	-13319.69541	210	0.5
+530	-13319.69541	210	0.5
+540	-13319.65304	210	0.5
+550	-13319.65304	210	0.5
+560	-13319.65304	210	0.5
+570	-13319.65304	210	0.5
+580	-13319.37328	210	0.5
+590	-13319.12326	211	0.5
+600	-13319.05626	211	0.5
+610	-13318.99156	211	0.402
+620	-13318.86779	211	0.402
+630	-13318.83132	211	0.402
+640	-13318.78219	211	0.402
+650	-13318.77422	211	0.402
+660	-13318.74741	211	0.402
+670	-13318.44879	211	0.402
+680	-13318.39683	211	0.402
+690	-13318.30094	211	0.402
+700	-13318.28122	211	0.402
+710	-13318.25973	212	0.402
+720	-13318.24778	212	0.402
+730	-13318.21259	212	0.402
+740	-13318.18139	212	0.402
+750	-13318.16642	212	0.402
+760	-13318.15442	212	0.402
+770	-13318.14029	212	0.402
+780	-13318.12337	212	0.402
+790	-13318.02245	212	0.402
+800	-13318.02098	212	0.402
+810	-13318.01935	212	0.402
+820	-13318.01935	212	0.402
+830	-13318.00471	212	0.402
+840	-13318.00471	212	0.402
+850	-13317.97753	213	0.402
+860	-13317.97753	213	0.402
+870	-13317.97753	213	0.402
+880	-13317.97753	213	0.402
+890	-13317.97746	213	0.402
+900	-13317.97746	213	0.402
+910	-13317.97746	213	0.402
+920	-13317.97746	213	0.402
+930	-13317.95789	213	0.402
+940	-13317.92398	213	0.402
+950	-13317.92398	213	0.402
+960	-13317.91016	214	0.402
+970	-13317.91016	214	0.402
+980	-13317.91016	214	0.402
+990	-13317.87481	214	0.402
+1000	-13317.84277	214	0.402
+1010	-13317.82631	214	0.402
+1020	-13317.82631	214	0.402
+1030	-13317.82631	214	0.402
+1040	-13317.82631	214	0.402
+1050	-13317.82631	214	0.402
+1060	-13317.82631	214	0.402
+1070	-13317.82543	215	0.402
+1080	-13317.82543	215	0.402
+1090	-13317.7993	215	0.402
+1100	-13317.78887	215	0.402
+1110	-13317.77626	215	0.304
+1120	-13317.77626	215	0.304
+1130	-13317.77582	215	0.304
+1140	-13317.77582	215	0.304
+1150	-13317.77528	215	0.304
+1160	-13317.73499	215	0.304
+1170	-13317.73499	216	0.304
+1180	-13317.73499	216	0.304
+1190	-13317.69839	216	0.304
+1200	-13317.69839	216	0.304
+1210	-13317.69839	216	0.304
+1220	-13317.69695	216	0.304
+1230	-13317.69695	216	0.304
+1240	-13317.69695	216	0.304
+1250	-13317.69382	216	0.304
+1260	-13317.69382	216	0.304
+1270	-13317.69382	217	0.304
+1280	-13317.69382	217	0.304
+1290	-13317.69178	217	0.304
+1300	-13317.69178	217	0.304
+1310	-13317.69178	217	0.304
+1320	-13317.69178	217	0.304
+1330	-13317.69178	217	0.304
+1340	-13317.69178	217	0.304
+1350	-13317.69154	218	0.304
+1360	-13317.6896	218	0.304
+1370	-13317.6896	218	0.304
+1380	-13317.68822	218	0.304
+1390	-13317.68822	218	0.304
+1400	-13317.68822	218	0.304
+1410	-13317.68705	218	0.304
+1420	-13317.66021	218	0.304
+1430	-13317.66021	218	0.304
+1440	-13317.66021	219	0.304
+1450	-13317.66021	219	0.304
+1460	-13317.66021	219	0.304
+1470	-13317.66021	219	0.304
+1480	-13317.66021	219	0.304
+1490	-13317.66021	219	0.304
+1500	-13317.66021	219	0.304
+1510	-13317.66021	219	0.304
+1520	-13317.66021	219	0.304
+1530	-13317.66021	219	0.304
+1540	-13317.65616	220	0.304
+1550	-13317.65616	220	0.304
+1560	-13317.65616	220	0.304
+1570	-13317.65616	220	0.304
+1580	-13317.65616	220	0.304
+1590	-13317.65616	220	0.304
+1600	-13317.64299	220	0.304
+1610	-13317.63151	220	0.206
+1620	-13317.63151	220	0.206
+1630	-13317.62989	220	0.206
+1640	-13317.62989	221	0.206
+1650	-13317.62989	221	0.206
+1660	-13317.62831	221	0.206
+1670	-13317.62831	221	0.206
+1680	-13317.62831	221	0.206
+1690	-13317.62805	221	0.206
+1700	-13317.62	221	0.206
+1710	-13317.62	221	0.206
+1720	-13317.62	221	0.206
+1730	-13317.62	222	0.206
+1740	-13317.62	222	0.206
+1750	-13317.61644	222	0.206
+1760	-13317.61644	222	0.206
+1770	-13317.61644	222	0.206
+1780	-13317.61644	222	0.206
+1790	-13317.61644	222	0.206
+1800	-13317.61644	222	0.206
+1810	-13317.61644	222	0.206
+1820	-13317.61644	222	0.206
+1830	-13317.61644	223	0.206
+1840	-13317.61644	223	0.206
+1850	-13317.61644	223	0.206
+1860	-13317.61644	223	0.206
+1870	-13317.61644	223	0.206
+1880	-13317.61644	223	0.206
+1890	-13317.61383	223	0.206
+1900	-13317.61383	223	0.206
+1910	-13317.61383	224	0.206
+1920	-13317.61383	224	0.206
+1930	-13317.61383	224	0.206
+1940	-13317.59982	224	0.206
+1950	-13317.59982	224	0.206
+1960	-13317.59982	224	0.206
+1970	-13317.58087	224	0.206
+1980	-13317.57192	224	0.206
+1990	-13317.57178	224	0.206
+2000	-13317.57178	225	0.206
+2010	-13317.57	225	0.206
+2020	-13317.57	225	0.206
+2030	-13317.57	225	0.206
+2040	-13317.56565	225	0.206
+2050	-13317.56565	225	0.206
+2060	-13317.56151	225	0.206
+2070	-13317.56112	225	0.206
+2080	-13317.56112	225	0.206
+2090	-13317.56112	225	0.206
+2100	-13317.56112	226	0.206
+2110	-13317.55762	226	0.108
+2120	-13317.55762	226	0.108
+2130	-13317.55762	226	0.108
+2140	-13317.55762	226	0.108
+2150	-13317.5575	226	0.108
+2160	-13317.5575	226	0.108
+2170	-13317.5575	226	0.108
+2180	-13317.5575	227	0.108
+2190	-13317.55718	227	0.108
+2200	-13317.55718	227	0.108
+2210	-13317.54587	227	0.108
+2220	-13317.54587	227	0.108
+2230	-13317.54587	227	0.108
+2240	-13317.54233	227	0.108
+2250	-13317.54233	227	0.108
+2260	-13317.54233	227	0.108
+2270	-13317.53019	228	0.108
+2280	-13317.53019	228	0.108
+2290	-13317.53019	228	0.108
+2300	-13317.53019	228	0.108
+2310	-13317.53018	228	0.108
+2320	-13317.53018	228	0.108
+2330	-13317.53018	228	0.108
+2340	-13317.53018	228	0.108
+2350	-13317.53018	228	0.108
+2360	-13317.53018	229	0.108
+2370	-13317.53018	229	0.108
+2380	-13317.53018	229	0.108
+2390	-13317.53018	229	0.108
+2400	-13317.53018	229	0.108
+2410	-13317.53018	229	0.108
+2420	-13317.53005	229	0.108
+2430	-13317.53005	229	0.108
+2440	-13317.53003	229	0.108
+2450	-13317.53003	229	0.108
+2460	-13317.53003	230	0.108
+2470	-13317.53003	230	0.108
+2480	-13317.53003	230	0.108
+2490	-13317.52878	230	0.108
+2500	-13317.52878	230	0.108
+2510	-13317.52878	230	0.108
+2520	-13317.52878	230	0.108
+2530	-13317.52878	230	0.108
+2540	-13317.52878	231	0.108
+2550	-13317.52878	231	0.108
+2560	-13317.52766	231	0.108
+2570	-13317.51581	231	0.108
+2580	-13317.51581	231	0.108
+2590	-13317.51581	231	0.108
+2600	-13317.51581	231	0.108
+2610	-13317.51526	231	0.01
+2620	-13317.51526	232	0.01
+2630	-13317.51526	232	0.01
+2640	-13317.51487	232	0.01
+2650	-13317.50863	232	0.01
+2660	-13317.50863	232	0.01
+2670	-13317.50863	232	0.01
+2680	-13317.50854	232	0.01
+2690	-13317.50854	232	0.01
+2700	-13317.50854	233	0.01
+2710	-13317.50854	233	0.01
+2720	-13317.50854	233	0.01
+2730	-13317.50854	233	0.01
+2740	-13317.50854	233	0.01
+2750	-13317.50854	233	0.01
+2760	-13317.50854	233	0.01
+2770	-13317.50854	233	0.01
+2780	-13317.50854	233	0.01
+2790	-13317.50854	234	0.01
+2800	-13317.50854	234	0.01
+2810	-13317.50854	234	0.01
+2820	-13317.50814	234	0.01
+2830	-13317.50814	234	0.01
+2840	-13317.50814	234	0.01
+2850	-13317.50814	234	0.01
+2860	-13317.50814	235	0.01
+2870	-13317.50814	235	0.01
+2880	-13317.50748	235	0.01
+2890	-13317.50748	235	0.01
+2900	-13317.50748	235	0.01
+2910	-13317.50748	235	0.01
+2920	-13317.50748	235	0.01
+2930	-13317.50748	235	0.01
+2940	-13317.50748	236	0.01
+2950	-13317.50748	236	0.01
+2960	-13317.50748	236	0.01
+2970	-13317.50748	236	0.01
+2980	-13317.50748	236	0.01
+2990	-13317.50748	236	0.01
+3000	-13317.50691	236	0.01
+3010	-13317.50691	237	0.01
+3020	-13317.50691	237	0.01
+3030	-13317.50691	237	0.01
+3040	-13317.50691	237	0.01
+3050	-13317.50691	237	0.01
+3060	-13317.50691	237	0.01
+3070	-13317.50691	237	0.01
+3080	-13317.5069	237	0.01
+3090	-13317.5069	237	0.01
+3100	-13317.50671	238	0.01
+3110	-13317.50671	238	0.01
+3120	-13317.50671	238	0.01
+3130	-13317.50671	238	0.01
+3140	-13317.50671	238	0.01
+3150	-13317.50671	238	0.01
+3160	-13317.50671	238	0.01
+3170	-13317.50671	239	0.01
+3180	-13317.50671	239	0.01
+3190	-13317.50671	239	0.01
+3200	-13317.50671	239	0.01
+3210	-13317.50671	239	0.01
+3220	-13317.50671	239	0.01
+3230	-13317.50671	239	0.01
+3240	-13317.50671	240	0.01
+3250	-13317.50671	240	0.01
+3260	-13317.50671	240	0.01
+3270	-13317.50671	240	0.01
+3280	-13317.50671	240	0.01
+3290	-13317.50671	240	0.01
+3300	-13317.50671	240	0.01
+3310	-13317.50671	241	0.01
+3320	-13317.50671	241	0.01
+3330	-13317.50671	241	0.01
+3340	-13317.50671	241	0.01
+3350	-13317.50671	241	0.01
+3360	-13317.50671	241	0.01
+3370	-13317.50671	241	0.01
+3380	-13317.50671	241	0.01
+3390	-13317.50671	241	0.01
+3400	-13317.50671	242	0.01
+3410	-13317.50671	242	0.01
+3420	-13317.50671	242	0.01
+3430	-13317.50671	242	0.01
+3440	-13317.50671	242	0.01
+3450	-13317.50671	242	0.01
+3460	-13317.50671	242	0.01
+3470	-13317.50671	243	0.01
+3480	-13317.50671	243	0.01
+3490	-13317.50671	243	0.01
+3500	-13317.50671	243	0.01
+3510	-13317.50671	243	0.01
+3520	-13317.50671	243	0.01
+3530	-13317.50671	243	0.01
+3540	-13317.50671	244	0.01
+3550	-13317.50671	244	0.01
+3560	-13317.50671	244	0.01
+3570	-13317.50671	244	0.01
+3580	-13317.50671	244	0.01
+3590	-13317.50671	244	0.01
+3600	-13317.50564	244	0.01
+3610	-13317.50564	245	0.01
+3620	-13317.50564	245	0.01
+3630	-13317.50564	245	0.01
+3640	-13317.50402	245	0.01
+3650	-13317.50391	245	0.01
+3660	-13317.50391	245	0.01
+3670	-13317.50391	245	0.01
+3680	-13317.50391	246	0.01
+3690	-13317.50391	246	0.01
+3700	-13317.50391	246	0.01
+3710	-13317.50391	246	0.01
+3720	-13317.50391	246	0.01
+3730	-13317.50114	246	0.01
+3740	-13317.50114	246	0.01
+3750	-13317.50114	246	0.01
+3760	-13317.50114	246	0.01
+3770	-13317.50114	247	0.01
+3780	-13317.50114	247	0.01
+3790	-13317.50114	247	0.01
+3800	-13317.50114	247	0.01
+3810	-13317.50114	247	0.01
+3820	-13317.50114	247	0.01
+3830	-13317.50114	247	0.01
+3840	-13317.50114	248	0.01
+3850	-13317.50081	248	0.01
+3860	-13317.50081	248	0.01
+3870	-13317.50081	248	0.01
+3880	-13317.50081	248	0.01
+3890	-13317.50081	248	0.01
+3900	-13317.50081	248	0.01
+3910	-13317.50081	249	0.01
+3920	-13317.50081	249	0.01
+3930	-13317.50081	249	0.01
+3940	-13317.50081	249	0.01
+3950	-13317.50081	249	0.01
+3960	-13317.50081	249	0.01
+3970	-13317.50081	249	0.01
+3980	-13317.50081	249	0.01
+3990	-13317.50081	250	0.01
+4000	-13317.50081	250	0.01
+4010	-13317.50081	250	0.01
+4020	-13317.50081	250	0.01
+4030	-13317.50081	250	0.01
+4040	-13317.50081	250	0.01
+4050	-13317.50081	251	0.01
+4060	-13317.50081	251	0.01
+4070	-13317.50081	251	0.01
+4080	-13317.50081	251	0.01
+4090	-13317.50081	251	0.01
+4100	-13317.50081	251	0.01
+4110	-13317.50081	251	0.01
+4120	-13317.50081	252	0.01
+4130	-13317.50081	252	0.01
+4140	-13317.50081	252	0.01
+4150	-13317.50081	252	0.01
+4160	-13317.50081	252	0.01
+4170	-13317.50081	252	0.01
+4180	-13317.50081	252	0.01
+4190	-13317.50081	253	0.01
+4200	-13317.50081	253	0.01
+4210	-13317.50081	253	0.01
+4220	-13317.50081	253	0.01
+4230	-13317.50081	253	0.01
+4240	-13317.50081	253	0.01
+4250	-13317.50081	253	0.01
+4260	-13317.50081	254	0.01
+4270	-13317.50081	254	0.01
+4280	-13317.50081	254	0.01
+4290	-13317.50081	254	0.01
+4300	-13317.50081	254	0.01
+4310	-13317.50081	255	0.01
+4320	-13317.50081	255	0.01
+4330	-13317.50081	255	0.01
+4340	-13317.50081	255	0.01
+4350	-13317.50081	255	0.01
+4360	-13317.50074	255	0.01
+4370	-13317.50074	255	0.01
+4380	-13317.50074	256	0.01
+4390	-13317.50074	256	0.01
+4400	-13317.50073	256	0.01
+4410	-13317.50073	256	0.01
+4420	-13317.50073	256	0.01
+4430	-13317.50073	256	0.01
+4440	-13317.50073	256	0.01
+4450	-13317.50073	257	0.01
+4460	-13317.50073	257	0.01
+4470	-13317.50073	257	0.01
+4480	-13317.50073	257	0.01
+4490	-13317.50073	257	0.01
+4500	-13317.50073	257	0.01
+4510	-13317.50073	258	0.01
+4520	-13317.50073	258	0.01
+4530	-13317.50073	258	0.01
+4540	-13317.50073	258	0.01
+4550	-13317.50063	258	0.01
+4560	-13317.50063	258	0.01
+4570	-13317.50063	258	0.01
+4580	-13317.50063	259	0.01
+4590	-13317.50063	259	0.01
+4600	-13317.50063	259	0.01
+4610	-13317.5001	259	0.01
+4620	-13317.5001	259	0.01
+4630	-13317.5001	259	0.01
+4640	-13317.5001	260	0.01
+4650	-13317.5001	260	0.01
+4660	-13317.5001	260	0.01
+4670	-13317.5001	260	0.01
+4680	-13317.5001	260	0.01
+4690	-13317.5001	260	0.01
+4700	-13317.5001	261	0.01
+4710	-13317.5001	261	0.01
+4720	-13317.5001	261	0.01
+4730	-13317.5001	261	0.01
+4740	-13317.50009	261	0.01
+4750	-13317.50009	261	0.01
+4760	-13317.50009	262	0.01
+4770	-13317.50009	262	0.01
+4780	-13317.50009	262	0.01
+4790	-13317.50009	262	0.01
+4800	-13317.50009	262	0.01
+4810	-13317.50009	262	0.01
+4820	-13317.50009	262	0.01
+4830	-13317.50009	263	0.01
+4840	-13317.50009	263	0.01
+4850	-13317.50009	263	0.01
+4860	-13317.50009	263	0.01
+4870	-13317.50009	263	0.01
+4880	-13317.50008	263	0.01
+4890	-13317.50008	263	0.01
+4900	-13317.50008	264	0.01
+4910	-13317.50008	264	0.01
+4920	-13317.50008	264	0.01
+4930	-13317.50008	264	0.01
+4940	-13317.50008	264	0.01
+4950	-13317.50004	264	0.01
+4960	-13317.50004	264	0.01
+4970	-13317.50004	265	0.01
+4980	-13317.50004	265	0.01
+4990	-13317.50004	265	0.01
+5000	-13317.50004	265	0.01
+5010	-13317.50004	265	0.01
+5020	-13317.50004	265	0.01
+5030	-13317.50004	265	0.01
+5040	-13317.50003	266	0.01
+5050	-13317.50003	266	0.01
+5060	-13317.50003	266	0.01
+5070	-13317.50003	266	0.01
+5080	-13317.50003	266	0.01
+5090	-13317.50003	266	0.01
+5100	-13317.50003	266	0.01
+5110	-13317.50003	267	0.01
+5120	-13317.50003	267	0.01
+5130	-13317.50003	267	0.01
+5140	-13317.50003	267	0.01
+5150	-13317.49676	267	0.01
+5160	-13317.49676	267	0.01
+5170	-13317.49676	267	0.01
+5180	-13317.49676	268	0.01
+5190	-13317.49676	268	0.01
+5200	-13317.49676	268	0.01
+5210	-13317.49676	268	0.01
+5220	-13317.49676	268	0.01
+5230	-13317.49676	268	0.01
+5240	-13317.49676	268	0.01
+5250	-13317.49676	268	0.01
+5260	-13317.49676	269	0.01
+5270	-13317.49676	269	0.01
+5280	-13317.49676	269	0.01
+5290	-13317.49676	269	0.01
+5300	-13317.49676	269	0.01
+5310	-13317.49676	269	0.01
+5320	-13317.49676	270	0.01
+5330	-13317.49676	270	0.01
+5340	-13317.49676	270	0.01
+5350	-13317.49676	270	0.01
+5360	-13317.49337	270	0.01
+5370	-13317.49337	270	0.01
+5380	-13317.49337	270	0.01
+5390	-13317.49337	270	0.01
+5400	-13317.4933	271	0.01
+5410	-13317.4933	271	0.01
+5420	-13317.4933	271	0.01
+5430	-13317.4933	271	0.01
+5440	-13317.4933	271	0.01
+5450	-13317.4933	271	0.01
+5460	-13317.4933	271	0.01
+5470	-13317.4933	272	0.01
+5480	-13317.4933	272	0.01
+5490	-13317.4933	272	0.01
+5500	-13317.4933	272	0.01
+5510	-13317.4933	272	0.01
+5520	-13317.4933	272	0.01
+5530	-13317.4933	272	0.01
+5540	-13317.4933	273	0.01
+5550	-13317.4933	273	0.01
+5560	-13317.4933	273	0.01
+5570	-13317.4933	273	0.01
+5580	-13317.4933	273	0.01
+5590	-13317.4933	273	0.01
+5600	-13317.4933	274	0.01
+5610	-13317.4933	274	0.01
+5620	-13317.4933	274	0.01
+5630	-13317.4933	274	0.01
+5640	-13317.4933	274	0.01
+5650	-13317.4933	274	0.01
+5660	-13317.4933	274	0.01
+5670	-13317.4933	275	0.01
+5680	-13317.4933	275	0.01
+5690	-13317.4933	275	0.01
+5700	-13317.4933	275	0.01
+5710	-13317.4933	275	0.01
+5720	-13317.4933	275	0.01
+5730	-13317.4933	275	0.01
+5740	-13317.49329	275	0.01
+5750	-13317.49329	276	0.01
+5760	-13317.49329	276	0.01
+5770	-13317.49329	276	0.01
+5780	-13317.49329	276	0.01
+5790	-13317.49329	276	0.01
+5800	-13317.49329	276	0.01
+5810	-13317.49329	277	0.01
+5820	-13317.49329	277	0.01
+5830	-13317.49329	277	0.01
+5840	-13317.49329	277	0.01
+5850	-13317.49329	277	0.01
+5860	-13317.49329	277	0.01
+5870	-13317.49329	278	0.01
+5880	-13317.49329	278	0.01
+5890	-13317.49329	278	0.01
+5900	-13317.49329	278	0.01
+5910	-13317.49329	278	0.01
+5920	-13317.49329	278	0.01
+5930	-13317.49329	278	0.01
+5940	-13317.49329	279	0.01
+5950	-13317.49329	279	0.01
+5960	-13317.49329	279	0.01
+5970	-13317.49329	279	0.01
+5980	-13317.49329	279	0.01
+5990	-13317.49329	279	0.01
+6000	-13317.49329	279	0.01
+6010	-13317.49329	280	0.01
+6020	-13317.49329	280	0.01
+6030	-13317.49329	280	0.01
+6040	-13317.49329	280	0.01
+6050	-13317.49329	280	0.01
+6060	-13317.49329	280	0.01
+6070	-13317.49329	281	0.01
+6080	-13317.49329	281	0.01
+6090	-13317.49329	281	0.01
+6100	-13317.49329	281	0.01
+6110	-13317.49329	281	0.01
+6120	-13317.49329	282	0.01
+6130	-13317.49329	282	0.01
+6140	-13317.49329	282	0.01
+6150	-13317.49329	282	0.01
+6160	-13317.49329	282	0.01
+6170	-13317.49329	282	0.01
+6180	-13317.49329	282	0.01
+6190	-13317.49329	283	0.01
+6200	-13317.49329	283	0.01
+6210	-13317.49329	283	0.01
+6220	-13317.49329	283	0.01
+6230	-13317.49329	283	0.01
+6240	-13317.49329	283	0.01
+6250	-13317.49329	283	0.01
+6260	-13317.49329	284	0.01
+6270	-13317.49329	284	0.01
+6280	-13317.49329	284	0.01
+6290	-13317.49329	284	0.01
+6300	-13317.49329	284	0.01
+6310	-13317.49329	284	0.01
+6320	-13317.49329	284	0.01
+6330	-13317.49329	285	0.01
+6340	-13317.49329	285	0.01
+6350	-13317.49329	285	0.01
+6360	-13317.49329	285	0.01
+6370	-13317.49329	285	0.01
+6380	-13317.49329	285	0.01
+6390	-13317.49323	285	0.01
+6400	-13317.49323	286	0.01
+6410	-13317.49323	286	0.01
+6420	-13317.49323	286	0.01
+6430	-13317.49323	286	0.01
+6440	-13317.49323	286	0.01
+6450	-13317.49323	286	0.01
+6460	-13317.49323	286	0.01
+6470	-13317.49323	287	0.01
+6480	-13317.49323	287	0.01
+6490	-13317.49236	287	0.01
+6500	-13317.49236	287	0.01
+6510	-13317.49236	287	0.01
+6520	-13317.49236	287	0.01
+6530	-13317.49236	287	0.01
+6540	-13317.49236	288	0.01
+6550	-13317.49092	288	0.01
+6560	-13317.49092	288	0.01
+6570	-13317.49092	288	0.01
+6580	-13317.49092	288	0.01
+6590	-13317.49092	288	0.01
+6600	-13317.49092	288	0.01
+6610	-13317.49092	289	0.01
+6620	-13317.49092	289	0.01
+6630	-13317.49092	289	0.01
+6640	-13317.49092	289	0.01
+6650	-13317.49092	289	0.01
+6660	-13317.49092	289	0.01
+6670	-13317.49092	290	0.01
+6680	-13317.49092	290	0.01
+6690	-13317.49092	290	0.01
+6700	-13317.49092	290	0.01
+6710	-13317.49092	290	0.01
+6720	-13317.49073	290	0.01
+6730	-13317.49073	290	0.01
+6740	-13317.49073	291	0.01
+6750	-13317.49073	291	0.01
+6760	-13317.49073	291	0.01
+6770	-13317.49073	291	0.01
+6780	-13317.49073	291	0.01
+6790	-13317.49073	291	0.01
+6800	-13317.49072	291	0.01
+6810	-13317.49072	291	0.01
+6820	-13317.49072	292	0.01
+6830	-13317.49072	292	0.01
+6840	-13317.49072	292	0.01
+6850	-13317.49072	292	0.01
+6860	-13317.49072	292	0.01
+6870	-13317.49072	292	0.01
+6880	-13317.49072	292	0.01
+6890	-13317.49072	293	0.01
+6900	-13317.49072	293	0.01
+6910	-13317.49072	293	0.01
+6920	-13317.49072	293	0.01
+6930	-13317.49072	293	0.01
+6940	-13317.49072	293	0.01
+6950	-13317.49072	293	0.01
+6960	-13317.49053	294	0.01
+6970	-13317.49053	294	0.01
+6980	-13317.49053	294	0.01
+6990	-13317.49053	294	0.01
+7000	-13317.49053	294	0.01
+7010	-13317.49053	294	0.01
+7020	-13317.49053	294	0.01
+7030	-13317.49053	295	0.01
+7040	-13317.49053	295	0.01
+7050	-13317.49053	295	0.01
+7060	-13317.49053	295	0.01
+7070	-13317.49053	295	0.01
+7080	-13317.49053	295	0.01
+7090	-13317.49053	295	0.01
+7100	-13317.49053	295	0.01
+7110	-13317.49053	296	0.01
+7120	-13317.49021	296	0.01
+7130	-13317.49021	296	0.01
+7140	-13317.49021	296	0.01
+7150	-13317.49021	296	0.01
+7160	-13317.49021	296	0.01
+7170	-13317.49021	297	0.01
+7180	-13317.49021	297	0.01
+7190	-13317.49021	297	0.01
+7200	-13317.49021	297	0.01
+7210	-13317.49021	297	0.01
+7220	-13317.49021	297	0.01
+7230	-13317.49021	297	0.01
+7240	-13317.49021	297	0.01
+7250	-13317.49021	298	0.01
+7260	-13317.49021	298	0.01
+7270	-13317.49021	298	0.01
+7280	-13317.49021	298	0.01
+7290	-13317.49021	298	0.01
+7300	-13317.49021	298	0.01
+7310	-13317.49021	298	0.01
+7320	-13317.49021	299	0.01
+7330	-13317.49021	299	0.01
+7340	-13317.49019	299	0.01
+7350	-13317.49019	299	0.01
+7360	-13317.49019	299	0.01
+7370	-13317.49019	299	0.01
+7380	-13317.49019	299	0.01
+7390	-13317.49019	299	0.01
+7400	-13317.49019	300	0.01
+7410	-13317.49019	300	0.01
+7420	-13317.49019	300	0.01
+7430	-13317.49019	300	0.01
+7440	-13317.49019	300	0.01
+7450	-13317.49019	300	0.01
+7460	-13317.49019	300	0.01
+7470	-13317.49019	301	0.01
+7480	-13317.49019	301	0.01
+7490	-13317.49019	301	0.01
+7500	-13317.49019	301	0.01
+7510	-13317.49019	301	0.01
+7520	-13317.49019	301	0.01
+7530	-13317.49019	301	0.01
+7540	-13317.49019	301	0.01
+7550	-13317.49019	302	0.01
+7560	-13317.4874	302	0.01
+7570	-13317.4874	302	0.01
+7580	-13317.4874	302	0.01
+7590	-13317.4874	302	0.01
+7600	-13317.4874	302	0.01
+7610	-13317.4874	302	0.01
+7620	-13317.4874	303	0.01
+7630	-13317.4874	303	0.01
+7640	-13317.4874	303	0.01
+7650	-13317.4874	303	0.01
+7660	-13317.4874	303	0.01
+7670	-13317.4873	303	0.01
+7680	-13317.4873	303	0.01
+7690	-13317.4873	304	0.01
+7700	-13317.4873	304	0.01
+7710	-13317.4873	304	0.01
+7720	-13317.4873	304	0.01
+7730	-13317.4873	304	0.01
+7740	-13317.4873	304	0.01
+7750	-13317.4873	304	0.01
+7760	-13317.4873	305	0.01
+7770	-13317.4873	305	0.01
+7780	-13317.4873	305	0.01
+7790	-13317.4873	305	0.01
+7800	-13317.4873	305	0.01
+7810	-13317.4873	305	0.01
+7820	-13317.4873	305	0.01
+7830	-13317.4873	306	0.01
+7840	-13317.4873	306	0.01
+7850	-13317.4873	306	0.01
+7860	-13317.4873	306	0.01
+7870	-13317.4873	306	0.01
+7880	-13317.4873	306	0.01
+7890	-13317.4873	306	0.01
+7900	-13317.4873	307	0.01
+7910	-13317.4873	307	0.01
+7920	-13317.4873	307	0.01
+7930	-13317.4873	307	0.01
+7940	-13317.4873	307	0.01
+7950	-13317.4873	307	0.01
+7960	-13317.4873	307	0.01
+7970	-13317.4873	308	0.01
+7980	-13317.4873	308	0.01
+7990	-13317.4873	308	0.01
+8000	-13317.4873	308	0.01
+8010	-13317.4873	308	0.01
+8020	-13317.4873	308	0.01
+8030	-13317.4873	308	0.01
+8040	-13317.4873	309	0.01
+8050	-13317.4873	309	0.01
+8060	-13317.4873	309	0.01
+8070	-13317.4873	309	0.01
+8080	-13317.4873	309	0.01
+8090	-13317.4873	309	0.01
+8100	-13317.4873	310	0.01
+Score after final optimization: -13317.47554
+Final	-13317.47554	312	0.01
+Search rep 4 (of 5)
+random seed = 110869126
+gen	best_like	time	optPrecision
+0	-13321.7448	313	0.5
+10	-13321.48088	313	0.5
+20	-13321.27649	313	0.5
+30	-13320.87017	313	0.5
+40	-13320.86055	313	0.5
+50	-13320.58557	313	0.5
+60	-13320.44456	313	0.5
+70	-13320.44456	314	0.5
+80	-13320.32512	314	0.5
+90	-13320.26584	314	0.5
+100	-13320.26584	314	0.5
+110	-13320.26584	314	0.5
+120	-13320.10416	314	0.5
+130	-13320.10416	314	0.5
+140	-13320.10416	314	0.5
+150	-13320.10416	314	0.5
+160	-13320.07877	314	0.5
+170	-13320.07877	315	0.5
+180	-13320.07326	315	0.5
+190	-13320.07326	315	0.5
+200	-13320.06456	315	0.5
+210	-13320.06252	315	0.5
+220	-13319.91828	315	0.5
+230	-13319.70442	315	0.5
+240	-13319.69485	315	0.5
+250	-13319.59035	315	0.5
+260	-13319.59035	315	0.5
+270	-13319.58404	316	0.5
+280	-13319.4582	316	0.5
+290	-13319.37065	316	0.5
+300	-13319.37062	316	0.5
+310	-13319.36638	316	0.5
+320	-13319.28528	316	0.5
+330	-13319.26666	316	0.5
+340	-13319.1797	316	0.5
+350	-13319.13239	316	0.5
+360	-13319.13239	316	0.5
+370	-13319.0221	316	0.5
+380	-13319.01756	316	0.5
+390	-13318.65671	316	0.5
+400	-13318.64058	316	0.5
+410	-13318.64058	317	0.5
+420	-13318.63112	317	0.5
+430	-13318.58058	317	0.5
+440	-13318.47314	317	0.5
+450	-13318.3126	317	0.5
+460	-13318.28538	317	0.5
+470	-13318.28538	317	0.5
+480	-13318.25998	317	0.5
+490	-13318.24302	317	0.5
+500	-13318.24302	317	0.5
+510	-13318.19182	317	0.402
+520	-13318.17521	317	0.402
+530	-13318.13165	317	0.402
+540	-13318.13055	317	0.402
+550	-13318.09195	318	0.402
+560	-13318.09195	318	0.402
+570	-13318.0884	318	0.402
+580	-13318.0884	318	0.402
+590	-13318.06929	318	0.402
+600	-13318.06929	318	0.402
+610	-13317.94676	318	0.402
+620	-13317.94646	318	0.402
+630	-13317.94646	318	0.402
+640	-13317.94583	318	0.402
+650	-13317.90326	318	0.402
+660	-13317.89888	318	0.402
+670	-13317.89888	318	0.402
+680	-13317.89486	319	0.402
+690	-13317.89486	319	0.402
+700	-13317.86313	319	0.402
+710	-13317.85023	319	0.402
+720	-13317.83894	319	0.402
+730	-13317.83614	319	0.402
+740	-13317.82721	319	0.402
+750	-13317.82691	319	0.402
+760	-13317.81454	319	0.402
+770	-13317.81454	319	0.402
+780	-13317.80419	319	0.402
+790	-13317.79143	319	0.402
+800	-13317.79041	320	0.402
+810	-13317.78633	320	0.402
+820	-13317.78633	320	0.402
+830	-13317.78594	320	0.402
+840	-13317.78594	320	0.402
+850	-13317.78594	320	0.402
+860	-13317.78427	320	0.402
+870	-13317.78369	320	0.402
+880	-13317.78369	320	0.402
+890	-13317.77565	320	0.402
+900	-13317.73522	320	0.402
+910	-13317.73522	321	0.402
+920	-13317.73522	321	0.402
+930	-13317.73522	321	0.402
+940	-13317.73299	321	0.402
+950	-13317.73299	321	0.402
+960	-13317.73299	321	0.402
+970	-13317.71359	321	0.402
+980	-13317.70083	321	0.402
+990	-13317.67725	321	0.402
+1000	-13317.67337	321	0.402
+1010	-13317.65979	322	0.304
+1020	-13317.65979	322	0.304
+1030	-13317.65979	322	0.304
+1040	-13317.65979	322	0.304
+1050	-13317.65979	322	0.304
+1060	-13317.65917	322	0.304
+1070	-13317.65917	322	0.304
+1080	-13317.62755	322	0.304
+1090	-13317.62755	322	0.304
+1100	-13317.62755	322	0.304
+1110	-13317.62613	322	0.304
+1120	-13317.62613	323	0.304
+1130	-13317.62588	323	0.304
+1140	-13317.6253	323	0.304
+1150	-13317.6253	323	0.304
+1160	-13317.6253	323	0.304
+1170	-13317.61932	323	0.304
+1180	-13317.6191	323	0.304
+1190	-13317.6191	323	0.304
+1200	-13317.6191	323	0.304
+1210	-13317.61724	323	0.304
+1220	-13317.61724	324	0.304
+1230	-13317.61724	324	0.304
+1240	-13317.61724	324	0.304
+1250	-13317.61724	324	0.304
+1260	-13317.61724	324	0.304
+1270	-13317.61467	324	0.304
+1280	-13317.61467	324	0.304
+1290	-13317.60885	324	0.304
+1300	-13317.60885	324	0.304
+1310	-13317.60885	325	0.304
+1320	-13317.60061	325	0.304
+1330	-13317.58994	325	0.304
+1340	-13317.58953	325	0.304
+1350	-13317.58953	325	0.304
+1360	-13317.58953	325	0.304
+1370	-13317.58673	325	0.304
+1380	-13317.58673	325	0.304
+1390	-13317.58673	325	0.304
+1400	-13317.58673	325	0.304
+1410	-13317.5863	325	0.304
+1420	-13317.58468	326	0.304
+1430	-13317.58201	326	0.304
+1440	-13317.58201	326	0.304
+1450	-13317.58201	326	0.304
+1460	-13317.58183	326	0.304
+1470	-13317.58183	326	0.304
+1480	-13317.58183	326	0.304
+1490	-13317.58183	326	0.304
+1500	-13317.58183	326	0.304
+1510	-13317.57484	327	0.206
+1520	-13317.57484	327	0.206
+1530	-13317.57204	327	0.206
+1540	-13317.56918	327	0.206
+1550	-13317.5683	327	0.206
+1560	-13317.5683	327	0.206
+1570	-13317.5683	327	0.206
+1580	-13317.5683	327	0.206
+1590	-13317.5683	327	0.206
+1600	-13317.5683	328	0.206
+1610	-13317.5683	328	0.206
+1620	-13317.5683	328	0.206
+1630	-13317.5683	328	0.206
+1640	-13317.56222	328	0.206
+1650	-13317.56222	328	0.206
+1660	-13317.56222	328	0.206
+1670	-13317.56222	328	0.206
+1680	-13317.56145	328	0.206
+1690	-13317.56115	329	0.206
+1700	-13317.56115	329	0.206
+1710	-13317.56115	329	0.206
+1720	-13317.56072	329	0.206
+1730	-13317.56072	329	0.206
+1740	-13317.56072	329	0.206
+1750	-13317.56072	329	0.206
+1760	-13317.56072	329	0.206
+1770	-13317.56072	329	0.206
+1780	-13317.56072	329	0.206
+1790	-13317.56071	330	0.206
+1800	-13317.56071	330	0.206
+1810	-13317.56071	330	0.206
+1820	-13317.56071	330	0.206
+1830	-13317.56071	330	0.206
+1840	-13317.56071	330	0.206
+1850	-13317.56071	330	0.206
+1860	-13317.55917	330	0.206
+1870	-13317.55917	330	0.206
+1880	-13317.55917	331	0.206
+1890	-13317.55917	331	0.206
+1900	-13317.55917	331	0.206
+1910	-13317.55716	331	0.206
+1920	-13317.55702	331	0.206
+1930	-13317.55702	331	0.206
+1940	-13317.557	331	0.206
+1950	-13317.557	331	0.206
+1960	-13317.55647	331	0.206
+1970	-13317.55647	331	0.206
+1980	-13317.55647	332	0.206
+1990	-13317.55624	332	0.206
+2000	-13317.55592	332	0.206
+2010	-13317.55191	332	0.108
+2020	-13317.55191	332	0.108
+2030	-13317.54915	332	0.108
+2040	-13317.54915	332	0.108
+2050	-13317.54915	332	0.108
+2060	-13317.54915	333	0.108
+2070	-13317.54915	333	0.108
+2080	-13317.54915	333	0.108
+2090	-13317.54915	333	0.108
+2100	-13317.54915	333	0.108
+2110	-13317.54915	333	0.108
+2120	-13317.54915	333	0.108
+2130	-13317.54915	333	0.108
+2140	-13317.54915	333	0.108
+2150	-13317.54915	334	0.108
+2160	-13317.54915	334	0.108
+2170	-13317.54915	334	0.108
+2180	-13317.5483	334	0.108
+2190	-13317.5483	334	0.108
+2200	-13317.5483	334	0.108
+2210	-13317.5483	334	0.108
+2220	-13317.5483	334	0.108
+2230	-13317.5483	334	0.108
+2240	-13317.5483	335	0.108
+2250	-13317.5483	335	0.108
+2260	-13317.5483	335	0.108
+2270	-13317.5483	335	0.108
+2280	-13317.5483	335	0.108
+2290	-13317.5483	335	0.108
+2300	-13317.5483	335	0.108
+2310	-13317.54826	335	0.108
+2320	-13317.54826	335	0.108
+2330	-13317.54826	336	0.108
+2340	-13317.54826	336	0.108
+2350	-13317.54777	336	0.108
+2360	-13317.54777	336	0.108
+2370	-13317.54777	336	0.108
+2380	-13317.54777	336	0.108
+2390	-13317.54777	336	0.108
+2400	-13317.54777	336	0.108
+2410	-13317.54777	336	0.108
+2420	-13317.54777	337	0.108
+2430	-13317.54777	337	0.108
+2440	-13317.54777	337	0.108
+2450	-13317.54689	337	0.108
+2460	-13317.54689	337	0.108
+2470	-13317.54689	337	0.108
+2480	-13317.54689	337	0.108
+2490	-13317.54689	337	0.108
+2500	-13317.5468	337	0.108
+2510	-13317.52253	338	0.01
+2520	-13317.52253	338	0.01
+2530	-13317.52079	338	0.01
+2540	-13317.52079	338	0.01
+2550	-13317.52079	338	0.01
+2560	-13317.52079	338	0.01
+2570	-13317.52079	338	0.01
+2580	-13317.52079	339	0.01
+2590	-13317.52042	339	0.01
+2600	-13317.52042	339	0.01
+2610	-13317.52042	339	0.01
+2620	-13317.52042	339	0.01
+2630	-13317.52014	339	0.01
+2640	-13317.51868	339	0.01
+2650	-13317.51868	339	0.01
+2660	-13317.51868	340	0.01
+2670	-13317.51866	340	0.01
+2680	-13317.51866	340	0.01
+2690	-13317.51866	340	0.01
+2700	-13317.51866	340	0.01
+2710	-13317.51866	340	0.01
+2720	-13317.51866	340	0.01
+2730	-13317.51866	341	0.01
+2740	-13317.51866	341	0.01
+2750	-13317.51866	341	0.01
+2760	-13317.51866	341	0.01
+2770	-13317.51866	341	0.01
+2780	-13317.51866	341	0.01
+2790	-13317.51866	341	0.01
+2800	-13317.51866	341	0.01
+2810	-13317.51866	342	0.01
+2820	-13317.51814	342	0.01
+2830	-13317.51814	342	0.01
+2840	-13317.51814	342	0.01
+2850	-13317.51814	342	0.01
+2860	-13317.51814	342	0.01
+2870	-13317.51814	342	0.01
+2880	-13317.51814	343	0.01
+2890	-13317.51814	343	0.01
+2900	-13317.51804	343	0.01
+2910	-13317.51804	343	0.01
+2920	-13317.51804	343	0.01
+2930	-13317.51804	343	0.01
+2940	-13317.51804	343	0.01
+2950	-13317.51804	343	0.01
+2960	-13317.51804	344	0.01
+2970	-13317.51804	344	0.01
+2980	-13317.51804	344	0.01
+2990	-13317.51131	344	0.01
+3000	-13317.51131	344	0.01
+3010	-13317.51131	344	0.01
+3020	-13317.50684	344	0.01
+3030	-13317.50684	344	0.01
+3040	-13317.50684	345	0.01
+3050	-13317.50684	345	0.01
+3060	-13317.50577	345	0.01
+3070	-13317.50577	345	0.01
+3080	-13317.50577	345	0.01
+3090	-13317.50577	345	0.01
+3100	-13317.50577	345	0.01
+3110	-13317.50577	345	0.01
+3120	-13317.50577	346	0.01
+3130	-13317.50577	346	0.01
+3140	-13317.50577	346	0.01
+3150	-13317.50577	346	0.01
+3160	-13317.50577	346	0.01
+3170	-13317.50577	346	0.01
+3180	-13317.50577	346	0.01
+3190	-13317.50577	347	0.01
+3200	-13317.50577	347	0.01
+3210	-13317.50577	347	0.01
+3220	-13317.50577	347	0.01
+3230	-13317.50577	347	0.01
+3240	-13317.50577	347	0.01
+3250	-13317.50577	347	0.01
+3260	-13317.50577	347	0.01
+3270	-13317.50567	348	0.01
+3280	-13317.50567	348	0.01
+3290	-13317.50441	348	0.01
+3300	-13317.50441	348	0.01
+3310	-13317.50441	348	0.01
+3320	-13317.50441	348	0.01
+3330	-13317.50441	348	0.01
+3340	-13317.50441	349	0.01
+3350	-13317.50441	349	0.01
+3360	-13317.50437	349	0.01
+3370	-13317.50437	349	0.01
+3380	-13317.50437	349	0.01
+3390	-13317.50419	349	0.01
+3400	-13317.50419	349	0.01
+3410	-13317.50419	350	0.01
+3420	-13317.50419	350	0.01
+3430	-13317.50419	350	0.01
+3440	-13317.50419	350	0.01
+3450	-13317.50419	350	0.01
+3460	-13317.50419	350	0.01
+3470	-13317.50419	350	0.01
+3480	-13317.50419	350	0.01
+3490	-13317.50419	351	0.01
+3500	-13317.50419	351	0.01
+3510	-13317.50419	351	0.01
+3520	-13317.50419	351	0.01
+3530	-13317.50419	351	0.01
+3540	-13317.50419	351	0.01
+3550	-13317.50419	351	0.01
+3560	-13317.50419	351	0.01
+3570	-13317.50419	352	0.01
+3580	-13317.50419	352	0.01
+3590	-13317.50419	352	0.01
+3600	-13317.50419	352	0.01
+3610	-13317.50419	352	0.01
+3620	-13317.50419	352	0.01
+3630	-13317.50419	352	0.01
+3640	-13317.50419	353	0.01
+3650	-13317.50419	353	0.01
+3660	-13317.50419	353	0.01
+3670	-13317.50419	353	0.01
+3680	-13317.50419	353	0.01
+3690	-13317.50413	353	0.01
+3700	-13317.50413	353	0.01
+3710	-13317.50413	354	0.01
+3720	-13317.50413	354	0.01
+3730	-13317.49939	354	0.01
+3740	-13317.49939	354	0.01
+3750	-13317.49939	354	0.01
+3760	-13317.49939	354	0.01
+3770	-13317.49939	354	0.01
+3780	-13317.49939	355	0.01
+3790	-13317.49939	355	0.01
+3800	-13317.49939	355	0.01
+3810	-13317.49939	355	0.01
+3820	-13317.49939	355	0.01
+3830	-13317.49939	355	0.01
+3840	-13317.49939	355	0.01
+3850	-13317.49939	356	0.01
+3860	-13317.49939	356	0.01
+3870	-13317.49939	356	0.01
+3880	-13317.49939	356	0.01
+3890	-13317.49939	356	0.01
+3900	-13317.49939	356	0.01
+3910	-13317.49939	356	0.01
+3920	-13317.49939	357	0.01
+3930	-13317.49939	357	0.01
+3940	-13317.49939	357	0.01
+3950	-13317.49939	357	0.01
+3960	-13317.49914	357	0.01
+3970	-13317.49914	357	0.01
+3980	-13317.49914	357	0.01
+3990	-13317.49914	358	0.01
+4000	-13317.49914	358	0.01
+4010	-13317.49914	358	0.01
+4020	-13317.49914	358	0.01
+4030	-13317.49914	358	0.01
+4040	-13317.49914	358	0.01
+4050	-13317.49914	358	0.01
+4060	-13317.49914	359	0.01
+4070	-13317.49914	359	0.01
+4080	-13317.49914	359	0.01
+4090	-13317.49914	359	0.01
+4100	-13317.49914	359	0.01
+4110	-13317.49911	359	0.01
+4120	-13317.49911	359	0.01
+4130	-13317.49911	360	0.01
+4140	-13317.49911	360	0.01
+4150	-13317.49911	360	0.01
+4160	-13317.49911	360	0.01
+4170	-13317.49911	360	0.01
+4180	-13317.49911	360	0.01
+4190	-13317.49818	360	0.01
+4200	-13317.49818	361	0.01
+4210	-13317.49818	361	0.01
+4220	-13317.49818	361	0.01
+4230	-13317.49818	361	0.01
+4240	-13317.49818	361	0.01
+4250	-13317.49818	361	0.01
+4260	-13317.49795	361	0.01
+4270	-13317.49795	362	0.01
+4280	-13317.49795	362	0.01
+4290	-13317.49795	362	0.01
+4300	-13317.49795	362	0.01
+4310	-13317.49795	362	0.01
+4320	-13317.49795	362	0.01
+4330	-13317.49792	362	0.01
+4340	-13317.49792	362	0.01
+4350	-13317.49792	363	0.01
+4360	-13317.49788	363	0.01
+4370	-13317.49788	363	0.01
+4380	-13317.49788	363	0.01
+4390	-13317.49788	363	0.01
+4400	-13317.49788	363	0.01
+4410	-13317.49788	363	0.01
+4420	-13317.49788	363	0.01
+4430	-13317.49788	364	0.01
+4440	-13317.49788	364	0.01
+4450	-13317.49729	364	0.01
+4460	-13317.49729	364	0.01
+4470	-13317.49729	364	0.01
+4480	-13317.49729	364	0.01
+4490	-13317.49729	364	0.01
+4500	-13317.49637	365	0.01
+4510	-13317.49637	365	0.01
+4520	-13317.49637	365	0.01
+4530	-13317.49637	365	0.01
+4540	-13317.49637	365	0.01
+4550	-13317.49637	365	0.01
+4560	-13317.49637	365	0.01
+4570	-13317.49637	366	0.01
+4580	-13317.49637	366	0.01
+4590	-13317.49637	366	0.01
+4600	-13317.49637	366	0.01
+4610	-13317.49637	366	0.01
+4620	-13317.49637	366	0.01
+4630	-13317.49637	366	0.01
+4640	-13317.49637	367	0.01
+4650	-13317.49637	367	0.01
+4660	-13317.4963	367	0.01
+4670	-13317.49621	367	0.01
+4680	-13317.49621	367	0.01
+4690	-13317.49621	367	0.01
+4700	-13317.49621	367	0.01
+4710	-13317.49608	367	0.01
+4720	-13317.49608	368	0.01
+4730	-13317.49608	368	0.01
+4740	-13317.49608	368	0.01
+4750	-13317.49608	368	0.01
+4760	-13317.49608	368	0.01
+4770	-13317.49608	368	0.01
+4780	-13317.49608	368	0.01
+4790	-13317.49608	369	0.01
+4800	-13317.49586	369	0.01
+4810	-13317.49586	369	0.01
+4820	-13317.49586	369	0.01
+4830	-13317.49586	369	0.01
+4840	-13317.49586	369	0.01
+4850	-13317.49586	369	0.01
+4860	-13317.49586	370	0.01
+4870	-13317.49581	370	0.01
+4880	-13317.4954	370	0.01
+4890	-13317.4954	370	0.01
+4900	-13317.4954	370	0.01
+4910	-13317.4954	370	0.01
+4920	-13317.4954	371	0.01
+4930	-13317.4954	371	0.01
+4940	-13317.49534	371	0.01
+4950	-13317.49534	371	0.01
+4960	-13317.49534	371	0.01
+4970	-13317.49534	371	0.01
+4980	-13317.49534	371	0.01
+4990	-13317.49532	372	0.01
+5000	-13317.49532	372	0.01
+5010	-13317.49532	372	0.01
+5020	-13317.49532	372	0.01
+5030	-13317.49532	372	0.01
+5040	-13317.49532	372	0.01
+5050	-13317.49532	373	0.01
+5060	-13317.49494	373	0.01
+5070	-13317.49494	373	0.01
+5080	-13317.49494	373	0.01
+5090	-13317.49494	373	0.01
+5100	-13317.49494	373	0.01
+5110	-13317.49494	373	0.01
+5120	-13317.49322	374	0.01
+5130	-13317.49322	374	0.01
+5140	-13317.49316	374	0.01
+5150	-13317.49316	374	0.01
+5160	-13317.49316	374	0.01
+5170	-13317.49316	374	0.01
+5180	-13317.49316	374	0.01
+5190	-13317.49316	374	0.01
+5200	-13317.49316	375	0.01
+5210	-13317.49316	375	0.01
+5220	-13317.49316	375	0.01
+5230	-13317.49316	375	0.01
+5240	-13317.49316	375	0.01
+5250	-13317.49316	375	0.01
+5260	-13317.49314	376	0.01
+5270	-13317.49314	376	0.01
+5280	-13317.49314	376	0.01
+5290	-13317.49314	376	0.01
+5300	-13317.49314	376	0.01
+5310	-13317.49314	376	0.01
+5320	-13317.49314	376	0.01
+5330	-13317.49314	376	0.01
+5340	-13317.49314	377	0.01
+5350	-13317.49314	377	0.01
+5360	-13317.49314	377	0.01
+5370	-13317.49314	377	0.01
+5380	-13317.49314	377	0.01
+5390	-13317.49314	377	0.01
+5400	-13317.49313	378	0.01
+5410	-13317.49313	378	0.01
+5420	-13317.49313	378	0.01
+5430	-13317.49313	378	0.01
+5440	-13317.49313	378	0.01
+5450	-13317.49313	378	0.01
+5460	-13317.49313	378	0.01
+5470	-13317.49313	379	0.01
+5480	-13317.49313	379	0.01
+5490	-13317.49313	379	0.01
+5500	-13317.49313	379	0.01
+5510	-13317.49313	379	0.01
+5520	-13317.49313	379	0.01
+5530	-13317.49313	379	0.01
+5540	-13317.49313	380	0.01
+5550	-13317.49313	380	0.01
+5560	-13317.49313	380	0.01
+5570	-13317.49313	380	0.01
+5580	-13317.49313	380	0.01
+5590	-13317.49303	380	0.01
+5600	-13317.49302	380	0.01
+5610	-13317.49302	381	0.01
+5620	-13317.49275	381	0.01
+5630	-13317.49275	381	0.01
+5640	-13317.49275	381	0.01
+5650	-13317.49275	381	0.01
+5660	-13317.49275	381	0.01
+5670	-13317.49275	381	0.01
+5680	-13317.49275	382	0.01
+5690	-13317.49275	382	0.01
+5700	-13317.49275	382	0.01
+5710	-13317.49275	382	0.01
+5720	-13317.49275	382	0.01
+5730	-13317.49263	382	0.01
+5740	-13317.49263	382	0.01
+5750	-13317.49263	383	0.01
+5760	-13317.49263	383	0.01
+5770	-13317.49263	383	0.01
+5780	-13317.49263	383	0.01
+5790	-13317.49263	383	0.01
+5800	-13317.49263	383	0.01
+5810	-13317.49263	384	0.01
+5820	-13317.49263	384	0.01
+5830	-13317.49263	384	0.01
+5840	-13317.49263	384	0.01
+5850	-13317.49263	384	0.01
+5860	-13317.49263	384	0.01
+5870	-13317.49263	384	0.01
+5880	-13317.49263	385	0.01
+5890	-13317.49263	385	0.01
+5900	-13317.49263	385	0.01
+5910	-13317.49263	385	0.01
+5920	-13317.49263	385	0.01
+5930	-13317.49263	385	0.01
+5940	-13317.49263	385	0.01
+5950	-13317.49263	386	0.01
+5960	-13317.49263	386	0.01
+5970	-13317.49263	386	0.01
+5980	-13317.49263	386	0.01
+5990	-13317.49263	386	0.01
+6000	-13317.49263	386	0.01
+6010	-13317.49263	386	0.01
+6020	-13317.49263	386	0.01
+6030	-13317.49263	387	0.01
+6040	-13317.49263	387	0.01
+6050	-13317.49263	387	0.01
+6060	-13317.49263	387	0.01
+6070	-13317.49263	387	0.01
+6080	-13317.49261	387	0.01
+6090	-13317.49261	387	0.01
+6100	-13317.49261	388	0.01
+6110	-13317.49261	388	0.01
+6120	-13317.49261	388	0.01
+6130	-13317.49261	388	0.01
+6140	-13317.49261	388	0.01
+6150	-13317.49261	388	0.01
+6160	-13317.49261	389	0.01
+6170	-13317.4923	389	0.01
+6180	-13317.49228	389	0.01
+6190	-13317.49228	389	0.01
+6200	-13317.49228	389	0.01
+6210	-13317.49228	389	0.01
+6220	-13317.49228	389	0.01
+6230	-13317.49228	390	0.01
+6240	-13317.49228	390	0.01
+6250	-13317.49228	390	0.01
+6260	-13317.49228	390	0.01
+6270	-13317.49228	390	0.01
+6280	-13317.49228	390	0.01
+6290	-13317.49228	390	0.01
+6300	-13317.49228	390	0.01
+6310	-13317.49228	391	0.01
+6320	-13317.49228	391	0.01
+6330	-13317.49228	391	0.01
+6340	-13317.49228	391	0.01
+6350	-13317.49213	391	0.01
+6360	-13317.49213	391	0.01
+6370	-13317.49205	392	0.01
+6380	-13317.49205	392	0.01
+6390	-13317.49205	392	0.01
+6400	-13317.49205	392	0.01
+6410	-13317.49205	392	0.01
+6420	-13317.49205	392	0.01
+6430	-13317.49205	392	0.01
+6440	-13317.49205	392	0.01
+6450	-13317.49205	393	0.01
+6460	-13317.49205	393	0.01
+6470	-13317.49205	393	0.01
+6480	-13317.49205	393	0.01
+6490	-13317.49205	393	0.01
+6500	-13317.49205	393	0.01
+6510	-13317.49205	393	0.01
+6520	-13317.49205	394	0.01
+6530	-13317.49205	394	0.01
+6540	-13317.49205	394	0.01
+6550	-13317.49205	394	0.01
+6560	-13317.49205	394	0.01
+6570	-13317.49205	394	0.01
+6580	-13317.49205	394	0.01
+6590	-13317.49205	394	0.01
+6600	-13317.49205	395	0.01
+6610	-13317.49205	395	0.01
+6620	-13317.49205	395	0.01
+6630	-13317.49205	395	0.01
+6640	-13317.49205	395	0.01
+6650	-13317.49205	395	0.01
+6660	-13317.49205	395	0.01
+6670	-13317.49205	396	0.01
+6680	-13317.49205	396	0.01
+6690	-13317.49205	396	0.01
+6700	-13317.49205	396	0.01
+6710	-13317.49205	396	0.01
+6720	-13317.49205	396	0.01
+6730	-13317.49205	396	0.01
+6740	-13317.49205	397	0.01
+6750	-13317.49205	397	0.01
+6760	-13317.49205	397	0.01
+6770	-13317.49205	397	0.01
+6780	-13317.49205	397	0.01
+6790	-13317.49205	397	0.01
+6800	-13317.49205	397	0.01
+6810	-13317.49205	398	0.01
+6820	-13317.49205	398	0.01
+6830	-13317.49205	398	0.01
+6840	-13317.49205	398	0.01
+6850	-13317.49205	398	0.01
+6860	-13317.49205	398	0.01
+6870	-13317.49205	398	0.01
+6880	-13317.49205	399	0.01
+6890	-13317.49205	399	0.01
+6900	-13317.49205	399	0.01
+6910	-13317.49205	399	0.01
+6920	-13317.49205	399	0.01
+6930	-13317.49205	399	0.01
+6940	-13317.49205	399	0.01
+6950	-13317.49205	399	0.01
+6960	-13317.49205	400	0.01
+6970	-13317.49205	400	0.01
+6980	-13317.49205	400	0.01
+6990	-13317.49205	400	0.01
+7000	-13317.49205	400	0.01
+7010	-13317.49205	400	0.01
+7020	-13317.49205	400	0.01
+7030	-13317.49205	401	0.01
+7040	-13317.49205	401	0.01
+7050	-13317.49205	401	0.01
+7060	-13317.49205	401	0.01
+7070	-13317.49205	401	0.01
+7080	-13317.49205	401	0.01
+7090	-13317.49205	402	0.01
+7100	-13317.49205	402	0.01
+7110	-13317.49205	402	0.01
+7120	-13317.49205	402	0.01
+7130	-13317.49205	402	0.01
+7140	-13317.49203	402	0.01
+7150	-13317.49203	402	0.01
+7160	-13317.49203	403	0.01
+7170	-13317.49203	403	0.01
+7180	-13317.49203	403	0.01
+7190	-13317.49203	403	0.01
+7200	-13317.49203	403	0.01
+7210	-13317.49203	403	0.01
+7220	-13317.49203	403	0.01
+7230	-13317.49203	404	0.01
+7240	-13317.49203	404	0.01
+7250	-13317.49203	404	0.01
+7260	-13317.49203	404	0.01
+7270	-13317.49203	404	0.01
+7280	-13317.49203	404	0.01
+7290	-13317.49203	404	0.01
+7300	-13317.49203	404	0.01
+7310	-13317.49203	405	0.01
+7320	-13317.49203	405	0.01
+7330	-13317.49203	405	0.01
+7340	-13317.49203	405	0.01
+7350	-13317.49203	405	0.01
+7360	-13317.49203	405	0.01
+7370	-13317.49203	405	0.01
+7380	-13317.49203	405	0.01
+7390	-13317.49203	406	0.01
+7400	-13317.49203	406	0.01
+7410	-13317.49203	406	0.01
+7420	-13317.49203	406	0.01
+7430	-13317.49203	406	0.01
+7440	-13317.49203	406	0.01
+7450	-13317.49203	406	0.01
+7460	-13317.49203	407	0.01
+7470	-13317.49203	407	0.01
+7480	-13317.49203	407	0.01
+7490	-13317.49203	407	0.01
+7500	-13317.49202	407	0.01
+7510	-13317.49202	407	0.01
+7520	-13317.49202	407	0.01
+7530	-13317.49202	408	0.01
+7540	-13317.49202	408	0.01
+7550	-13317.49202	408	0.01
+7560	-13317.49202	408	0.01
+7570	-13317.49202	408	0.01
+7580	-13317.49202	408	0.01
+7590	-13317.49202	408	0.01
+7600	-13317.49194	409	0.01
+Score after final optimization: -13317.47563
+Final	-13317.47563	411	0.01
+Search rep 5 (of 5)
+random seed = 1432730019
+gen	best_like	time	optPrecision
+0	-13474.52557	412	0.5
+10	-13392.08788	412	0.5
+20	-13391.3331	412	0.5
+30	-13375.34983	412	0.5
+40	-13325.12271	412	0.5
+50	-13325.01589	412	0.5
+60	-13324.85339	412	0.5
+70	-13324.47682	413	0.5
+80	-13324.2634	413	0.5
+90	-13324.13502	413	0.5
+100	-13324.03907	413	0.5
+110	-13323.97991	413	0.5
+120	-13323.78415	413	0.5
+130	-13323.78415	413	0.5
+140	-13323.77993	413	0.5
+150	-13323.52058	413	0.5
+160	-13323.48048	413	0.5
+170	-13323.48048	414	0.5
+180	-13323.48048	414	0.5
+190	-13323.4676	414	0.5
+200	-13323.44057	414	0.5
+210	-13323.40539	414	0.5
+220	-13322.9793	414	0.5
+230	-13322.92935	414	0.5
+240	-13322.92935	414	0.5
+250	-13322.87384	414	0.5
+260	-13322.79327	414	0.5
+270	-13322.72325	415	0.5
+280	-13322.72101	415	0.5
+290	-13322.70679	415	0.5
+300	-13322.70679	415	0.5
+310	-13322.6431	415	0.5
+320	-13322.6431	415	0.5
+330	-13322.6431	415	0.5
+340	-13322.53123	415	0.5
+350	-13322.53123	415	0.5
+360	-13322.5241	416	0.5
+370	-13322.40777	416	0.5
+380	-13322.40777	416	0.5
+390	-13322.40777	416	0.5
+400	-13322.38756	416	0.5
+410	-13322.3831	416	0.5
+420	-13322.25863	416	0.5
+430	-13321.57153	416	0.5
+440	-13321.49974	417	0.5
+450	-13321.49974	417	0.5
+460	-13321.49842	417	0.5
+470	-13321.49706	417	0.5
+480	-13321.49706	417	0.5
+490	-13321.44517	417	0.5
+500	-13321.44517	417	0.5
+510	-13321.44517	418	0.5
+520	-13321.37968	418	0.5
+530	-13321.37968	418	0.5
+540	-13321.354	418	0.5
+550	-13321.15271	418	0.5
+560	-13321.14272	418	0.5
+570	-13321.07504	418	0.5
+580	-13321.00807	418	0.5
+590	-13321.00807	418	0.5
+600	-13320.99243	419	0.5
+610	-13320.31091	419	0.402
+620	-13320.26101	419	0.402
+630	-13320.11014	419	0.402
+640	-13320.09341	419	0.402
+650	-13320.09341	419	0.402
+660	-13320.04027	419	0.402
+670	-13319.91277	419	0.402
+680	-13319.74383	419	0.402
+690	-13319.73305	419	0.402
+700	-13319.64631	419	0.402
+710	-13319.62081	419	0.402
+720	-13319.61134	419	0.402
+730	-13319.50252	419	0.402
+740	-13319.35737	419	0.402
+750	-13319.33204	419	0.402
+760	-13319.31767	420	0.402
+770	-13319.31767	420	0.402
+780	-13319.3156	420	0.402
+790	-13319.26735	420	0.402
+800	-13319.1584	420	0.402
+810	-13319.08946	420	0.402
+820	-13319.06551	420	0.402
+830	-13319.04743	420	0.402
+840	-13319.03107	420	0.402
+850	-13319.03107	420	0.402
+860	-13318.97433	420	0.402
+870	-13318.96616	420	0.402
+880	-13318.96616	420	0.402
+890	-13318.94442	420	0.402
+900	-13318.89028	420	0.402
+910	-13318.85707	421	0.402
+920	-13318.82453	421	0.402
+930	-13318.82263	421	0.402
+940	-13318.81387	421	0.402
+950	-13318.81075	421	0.402
+960	-13318.68655	421	0.402
+970	-13318.68655	421	0.402
+980	-13318.57201	421	0.402
+990	-13318.52716	421	0.402
+1000	-13318.51342	421	0.402
+1010	-13318.50519	421	0.402
+1020	-13318.48221	421	0.402
+1030	-13318.48221	421	0.402
+1040	-13318.44969	421	0.402
+1050	-13318.44969	422	0.402
+1060	-13318.44969	422	0.402
+1070	-13318.4494	422	0.402
+1080	-13318.27275	422	0.402
+1090	-13318.27275	422	0.402
+1100	-13318.26127	422	0.402
+1110	-13318.23273	422	0.304
+1120	-13318.19228	422	0.304
+1130	-13318.17896	422	0.304
+1140	-13318.123	422	0.304
+1150	-13318.123	422	0.304
+1160	-13318.123	422	0.304
+1170	-13318.123	423	0.304
+1180	-13318.123	423	0.304
+1190	-13318.10724	423	0.304
+1200	-13318.10724	423	0.304
+1210	-13318.10684	423	0.304
+1220	-13318.10559	423	0.304
+1230	-13318.10559	423	0.304
+1240	-13318.10293	423	0.304
+1250	-13318.10293	423	0.304
+1260	-13318.0828	423	0.304
+1270	-13318.0828	423	0.304
+1280	-13318.0828	424	0.304
+1290	-13318.0828	424	0.304
+1300	-13318.0828	424	0.304
+1310	-13318.08085	424	0.304
+1320	-13318.05701	424	0.304
+1330	-13318.05489	424	0.304
+1340	-13318.05264	424	0.304
+1350	-13318.05264	424	0.304
+1360	-13318.05264	424	0.304
+1370	-13317.98427	424	0.304
+1380	-13317.98427	425	0.304
+1390	-13317.98427	425	0.304
+1400	-13317.97791	425	0.304
+1410	-13317.97791	425	0.304
+1420	-13317.97381	425	0.304
+1430	-13317.97381	425	0.304
+1440	-13317.97133	425	0.304
+1450	-13317.97133	425	0.304
+1460	-13317.97133	425	0.304
+1470	-13317.97119	425	0.304
+1480	-13317.96623	425	0.304
+1490	-13317.96623	425	0.304
+1500	-13317.96332	426	0.304
+1510	-13317.96268	426	0.304
+1520	-13317.96268	426	0.304
+1530	-13317.96257	426	0.304
+1540	-13317.96257	426	0.304
+1550	-13317.96257	426	0.304
+1560	-13317.96257	426	0.304
+1570	-13317.96257	426	0.304
+1580	-13317.96257	426	0.304
+1590	-13317.96257	426	0.304
+1600	-13317.95863	427	0.304
+1610	-13317.94386	427	0.206
+1620	-13317.94052	427	0.206
+1630	-13317.94052	427	0.206
+1640	-13317.94052	427	0.206
+1650	-13317.9076	427	0.206
+1660	-13317.9076	427	0.206
+1670	-13317.90496	427	0.206
+1680	-13317.86252	427	0.206
+1690	-13317.86252	427	0.206
+1700	-13317.86252	428	0.206
+1710	-13317.8146	428	0.206
+1720	-13317.8146	428	0.206
+1730	-13317.8146	428	0.206
+1740	-13317.8146	428	0.206
+1750	-13317.81009	428	0.206
+1760	-13317.80752	428	0.206
+1770	-13317.80752	428	0.206
+1780	-13317.80752	428	0.206
+1790	-13317.76495	429	0.206
+1800	-13317.76111	429	0.206
+1810	-13317.75887	429	0.206
+1820	-13317.74433	429	0.206
+1830	-13317.74433	429	0.206
+1840	-13317.74433	429	0.206
+1850	-13317.69193	429	0.206
+1860	-13317.66429	429	0.206
+1870	-13317.66429	429	0.206
+1880	-13317.66393	430	0.206
+1890	-13317.66393	430	0.206
+1900	-13317.66209	430	0.206
+1910	-13317.66162	430	0.206
+1920	-13317.63963	430	0.206
+1930	-13317.63946	430	0.206
+1940	-13317.63946	430	0.206
+1950	-13317.63946	430	0.206
+1960	-13317.63946	430	0.206
+1970	-13317.63946	430	0.206
+1980	-13317.63946	431	0.206
+1990	-13317.63946	431	0.206
+2000	-13317.63946	431	0.206
+2010	-13317.63946	431	0.206
+2020	-13317.63946	431	0.206
+2030	-13317.63946	431	0.206
+2040	-13317.63946	431	0.206
+2050	-13317.63946	431	0.206
+2060	-13317.63946	431	0.206
+2070	-13317.63946	432	0.206
+2080	-13317.63946	432	0.206
+2090	-13317.63386	432	0.206
+2100	-13317.63334	432	0.206
+2110	-13317.62807	432	0.108
+2120	-13317.62807	432	0.108
+2130	-13317.62807	432	0.108
+2140	-13317.62534	432	0.108
+2150	-13317.62534	433	0.108
+2160	-13317.62534	433	0.108
+2170	-13317.62534	433	0.108
+2180	-13317.62454	433	0.108
+2190	-13317.62224	433	0.108
+2200	-13317.62224	433	0.108
+2210	-13317.62164	433	0.108
+2220	-13317.62164	434	0.108
+2230	-13317.62027	434	0.108
+2240	-13317.62027	434	0.108
+2250	-13317.61867	434	0.108
+2260	-13317.61867	434	0.108
+2270	-13317.61867	434	0.108
+2280	-13317.61867	434	0.108
+2290	-13317.61867	434	0.108
+2300	-13317.6178	434	0.108
+2310	-13317.6178	435	0.108
+2320	-13317.61773	435	0.108
+2330	-13317.61773	435	0.108
+2340	-13317.61773	435	0.108
+2350	-13317.61773	435	0.108
+2360	-13317.61773	435	0.108
+2370	-13317.60614	435	0.108
+2380	-13317.60614	435	0.108
+2390	-13317.60614	436	0.108
+2400	-13317.60614	436	0.108
+2410	-13317.60614	436	0.108
+2420	-13317.60614	436	0.108
+2430	-13317.60614	436	0.108
+2440	-13317.60614	436	0.108
+2450	-13317.60614	436	0.108
+2460	-13317.60614	436	0.108
+2470	-13317.60614	436	0.108
+2480	-13317.60614	436	0.108
+2490	-13317.60614	437	0.108
+2500	-13317.60614	437	0.108
+2510	-13317.60614	437	0.108
+2520	-13317.60614	437	0.108
+2530	-13317.60559	437	0.108
+2540	-13317.60559	437	0.108
+2550	-13317.60481	437	0.108
+2560	-13317.60481	437	0.108
+2570	-13317.60481	438	0.108
+2580	-13317.60479	438	0.108
+2590	-13317.60479	438	0.108
+2600	-13317.60479	438	0.108
+2610	-13317.55487	438	0.01
+2620	-13317.55487	438	0.01
+2630	-13317.55487	438	0.01
+2640	-13317.55487	438	0.01
+2650	-13317.55386	439	0.01
+2660	-13317.55386	439	0.01
+2670	-13317.55253	439	0.01
+2680	-13317.55057	439	0.01
+2690	-13317.55057	439	0.01
+2700	-13317.54622	439	0.01
+2710	-13317.54612	439	0.01
+2720	-13317.53933	439	0.01
+2730	-13317.53933	440	0.01
+2740	-13317.53808	440	0.01
+2750	-13317.53808	440	0.01
+2760	-13317.52937	440	0.01
+2770	-13317.52937	440	0.01
+2780	-13317.52937	440	0.01
+2790	-13317.52932	440	0.01
+2800	-13317.52932	440	0.01
+2810	-13317.52932	441	0.01
+2820	-13317.52932	441	0.01
+2830	-13317.52932	441	0.01
+2840	-13317.52932	441	0.01
+2850	-13317.52932	441	0.01
+2860	-13317.52932	441	0.01
+2870	-13317.52932	441	0.01
+2880	-13317.52932	441	0.01
+2890	-13317.52932	442	0.01
+2900	-13317.52925	442	0.01
+2910	-13317.52922	442	0.01
+2920	-13317.52922	442	0.01
+2930	-13317.52922	442	0.01
+2940	-13317.52922	442	0.01
+2950	-13317.52894	442	0.01
+2960	-13317.52894	442	0.01
+2970	-13317.52892	443	0.01
+2980	-13317.52892	443	0.01
+2990	-13317.52892	443	0.01
+3000	-13317.52659	443	0.01
+3010	-13317.52659	443	0.01
+3020	-13317.52659	443	0.01
+3030	-13317.52659	443	0.01
+3040	-13317.52656	444	0.01
+3050	-13317.52656	444	0.01
+3060	-13317.52656	444	0.01
+3070	-13317.52656	444	0.01
+3080	-13317.52506	444	0.01
+3090	-13317.52506	444	0.01
+3100	-13317.52495	444	0.01
+3110	-13317.52495	445	0.01
+3120	-13317.52495	445	0.01
+3130	-13317.52495	445	0.01
+3140	-13317.52495	445	0.01
+3150	-13317.52495	445	0.01
+3160	-13317.52305	445	0.01
+3170	-13317.52305	445	0.01
+3180	-13317.52305	445	0.01
+3190	-13317.52305	446	0.01
+3200	-13317.52305	446	0.01
+3210	-13317.52184	446	0.01
+3220	-13317.52184	446	0.01
+3230	-13317.52184	446	0.01
+3240	-13317.52184	446	0.01
+3250	-13317.52184	447	0.01
+3260	-13317.52051	447	0.01
+3270	-13317.52051	447	0.01
+3280	-13317.52051	447	0.01
+3290	-13317.52051	447	0.01
+3300	-13317.52051	447	0.01
+3310	-13317.52051	447	0.01
+3320	-13317.52051	447	0.01
+3330	-13317.52051	448	0.01
+3340	-13317.52051	448	0.01
+3350	-13317.52051	448	0.01
+3360	-13317.52038	448	0.01
+3370	-13317.52038	448	0.01
+3380	-13317.52021	448	0.01
+3390	-13317.52021	448	0.01
+3400	-13317.52021	448	0.01
+3410	-13317.52021	449	0.01
+3420	-13317.52021	449	0.01
+3430	-13317.52021	449	0.01
+3440	-13317.52021	449	0.01
+3450	-13317.52021	449	0.01
+3460	-13317.52017	449	0.01
+3470	-13317.52017	449	0.01
+3480	-13317.52017	449	0.01
+3490	-13317.52017	450	0.01
+3500	-13317.52017	450	0.01
+3510	-13317.52017	450	0.01
+3520	-13317.52017	450	0.01
+3530	-13317.52017	450	0.01
+3540	-13317.52017	450	0.01
+3550	-13317.52017	450	0.01
+3560	-13317.52017	451	0.01
+3570	-13317.52017	451	0.01
+3580	-13317.52017	451	0.01
+3590	-13317.52017	451	0.01
+3600	-13317.52017	451	0.01
+3610	-13317.51999	451	0.01
+3620	-13317.51999	451	0.01
+3630	-13317.51999	452	0.01
+3640	-13317.51999	452	0.01
+3650	-13317.51999	452	0.01
+3660	-13317.51999	452	0.01
+3670	-13317.51999	452	0.01
+3680	-13317.51999	452	0.01
+3690	-13317.51999	452	0.01
+3700	-13317.51999	453	0.01
+3710	-13317.51999	453	0.01
+3720	-13317.51999	453	0.01
+3730	-13317.51999	453	0.01
+3740	-13317.50937	453	0.01
+3750	-13317.50937	453	0.01
+3760	-13317.50937	453	0.01
+3770	-13317.50937	454	0.01
+3780	-13317.50937	454	0.01
+3790	-13317.50937	454	0.01
+3800	-13317.50937	454	0.01
+3810	-13317.50914	454	0.01
+3820	-13317.50914	454	0.01
+3830	-13317.50914	454	0.01
+3840	-13317.50263	454	0.01
+3850	-13317.50263	455	0.01
+3860	-13317.50263	455	0.01
+3870	-13317.50263	455	0.01
+3880	-13317.50263	455	0.01
+3890	-13317.50263	455	0.01
+3900	-13317.49939	455	0.01
+3910	-13317.49939	455	0.01
+3920	-13317.49939	456	0.01
+3930	-13317.49939	456	0.01
+3940	-13317.4988	456	0.01
+3950	-13317.4988	456	0.01
+3960	-13317.4988	456	0.01
+3970	-13317.4988	456	0.01
+3980	-13317.4988	456	0.01
+3990	-13317.49847	457	0.01
+4000	-13317.49847	457	0.01
+4010	-13317.49847	457	0.01
+4020	-13317.49847	457	0.01
+4030	-13317.49847	457	0.01
+4040	-13317.49847	457	0.01
+4050	-13317.49847	457	0.01
+4060	-13317.49847	458	0.01
+4070	-13317.49847	458	0.01
+4080	-13317.49839	458	0.01
+4090	-13317.49839	458	0.01
+4100	-13317.49839	458	0.01
+4110	-13317.49839	458	0.01
+4120	-13317.49839	458	0.01
+4130	-13317.49839	459	0.01
+4140	-13317.49839	459	0.01
+4150	-13317.49839	459	0.01
+4160	-13317.49839	459	0.01
+4170	-13317.49839	459	0.01
+4180	-13317.49839	459	0.01
+4190	-13317.49839	459	0.01
+4200	-13317.49839	460	0.01
+4210	-13317.49839	460	0.01
+4220	-13317.49839	460	0.01
+4230	-13317.49839	460	0.01
+4240	-13317.49839	460	0.01
+4250	-13317.49839	460	0.01
+4260	-13317.49839	460	0.01
+4270	-13317.49839	460	0.01
+4280	-13317.49839	461	0.01
+4290	-13317.49839	461	0.01
+4300	-13317.49796	461	0.01
+4310	-13317.49796	461	0.01
+4320	-13317.49796	461	0.01
+4330	-13317.49796	461	0.01
+4340	-13317.49796	461	0.01
+4350	-13317.49796	462	0.01
+4360	-13317.49796	462	0.01
+4370	-13317.49556	462	0.01
+4380	-13317.49466	462	0.01
+4390	-13317.49466	462	0.01
+4400	-13317.49466	462	0.01
+4410	-13317.49465	462	0.01
+4420	-13317.49465	463	0.01
+4430	-13317.49465	463	0.01
+4440	-13317.49465	463	0.01
+4450	-13317.49465	463	0.01
+4460	-13317.49465	463	0.01
+4470	-13317.49465	463	0.01
+4480	-13317.49465	463	0.01
+4490	-13317.49465	463	0.01
+4500	-13317.4942	464	0.01
+4510	-13317.4942	464	0.01
+4520	-13317.4942	464	0.01
+4530	-13317.4942	464	0.01
+4540	-13317.4942	464	0.01
+4550	-13317.4942	464	0.01
+4560	-13317.4942	464	0.01
+4570	-13317.4942	465	0.01
+4580	-13317.4942	465	0.01
+4590	-13317.4942	465	0.01
+4600	-13317.4942	465	0.01
+4610	-13317.4942	465	0.01
+4620	-13317.4942	465	0.01
+4630	-13317.4942	465	0.01
+4640	-13317.4942	465	0.01
+4650	-13317.4942	466	0.01
+4660	-13317.4942	466	0.01
+4670	-13317.49362	466	0.01
+4680	-13317.49297	466	0.01
+4690	-13317.49269	466	0.01
+4700	-13317.49269	466	0.01
+4710	-13317.49269	466	0.01
+4720	-13317.49269	467	0.01
+4730	-13317.49269	467	0.01
+4740	-13317.49269	467	0.01
+4750	-13317.49269	467	0.01
+4760	-13317.49269	467	0.01
+4770	-13317.49269	467	0.01
+4780	-13317.49269	467	0.01
+4790	-13317.49269	467	0.01
+4800	-13317.49269	468	0.01
+4810	-13317.49269	468	0.01
+4820	-13317.49268	468	0.01
+4830	-13317.49268	468	0.01
+4840	-13317.49268	468	0.01
+4850	-13317.49268	468	0.01
+4860	-13317.49268	468	0.01
+4870	-13317.49268	469	0.01
+4880	-13317.49268	469	0.01
+4890	-13317.49207	469	0.01
+4900	-13317.49207	469	0.01
+4910	-13317.49207	469	0.01
+4920	-13317.49207	469	0.01
+4930	-13317.49207	469	0.01
+4940	-13317.49207	470	0.01
+4950	-13317.49189	470	0.01
+4960	-13317.49189	470	0.01
+4970	-13317.49164	470	0.01
+4980	-13317.49164	470	0.01
+4990	-13317.49119	470	0.01
+5000	-13317.49119	470	0.01
+5010	-13317.49119	470	0.01
+5020	-13317.49116	471	0.01
+5030	-13317.49116	471	0.01
+5040	-13317.49116	471	0.01
+5050	-13317.49116	471	0.01
+5060	-13317.49116	471	0.01
+5070	-13317.49116	471	0.01
+5080	-13317.49116	472	0.01
+5090	-13317.49116	472	0.01
+5100	-13317.49075	472	0.01
+5110	-13317.49062	472	0.01
+5120	-13317.49062	472	0.01
+5130	-13317.49062	472	0.01
+5140	-13317.49062	472	0.01
+5150	-13317.49062	473	0.01
+5160	-13317.49062	473	0.01
+5170	-13317.49062	473	0.01
+5180	-13317.49062	473	0.01
+5190	-13317.49062	473	0.01
+5200	-13317.49062	473	0.01
+5210	-13317.49062	473	0.01
+5220	-13317.49062	473	0.01
+5230	-13317.49062	474	0.01
+5240	-13317.49062	474	0.01
+5250	-13317.49062	474	0.01
+5260	-13317.49062	474	0.01
+5270	-13317.49062	474	0.01
+5280	-13317.49062	474	0.01
+5290	-13317.49062	475	0.01
+5300	-13317.49062	475	0.01
+5310	-13317.49062	475	0.01
+5320	-13317.49062	475	0.01
+5330	-13317.49062	475	0.01
+5340	-13317.49062	475	0.01
+5350	-13317.49062	475	0.01
+5360	-13317.49062	476	0.01
+5370	-13317.49062	476	0.01
+5380	-13317.49062	476	0.01
+5390	-13317.49062	476	0.01
+5400	-13317.49062	476	0.01
+5410	-13317.49062	476	0.01
+5420	-13317.49062	476	0.01
+5430	-13317.49062	477	0.01
+5440	-13317.49062	477	0.01
+5450	-13317.49062	477	0.01
+5460	-13317.49062	477	0.01
+5470	-13317.49031	477	0.01
+5480	-13317.49031	477	0.01
+5490	-13317.49031	477	0.01
+5500	-13317.49031	478	0.01
+5510	-13317.49031	478	0.01
+5520	-13317.48962	478	0.01
+5530	-13317.48962	478	0.01
+5540	-13317.48962	478	0.01
+5550	-13317.48962	478	0.01
+5560	-13317.48962	478	0.01
+5570	-13317.48962	479	0.01
+5580	-13317.48962	479	0.01
+5590	-13317.48962	479	0.01
+5600	-13317.48962	479	0.01
+5610	-13317.48962	479	0.01
+5620	-13317.48962	479	0.01
+5630	-13317.48962	479	0.01
+5640	-13317.48962	480	0.01
+5650	-13317.48962	480	0.01
+5660	-13317.48962	480	0.01
+5670	-13317.48946	480	0.01
+5680	-13317.48946	480	0.01
+5690	-13317.48946	480	0.01
+5700	-13317.48946	480	0.01
+5710	-13317.48946	480	0.01
+5720	-13317.48946	481	0.01
+5730	-13317.48946	481	0.01
+5740	-13317.48946	481	0.01
+5750	-13317.48946	481	0.01
+5760	-13317.48946	481	0.01
+5770	-13317.48939	481	0.01
+5780	-13317.48939	481	0.01
+5790	-13317.48939	482	0.01
+5800	-13317.48939	482	0.01
+5810	-13317.48939	482	0.01
+5820	-13317.48939	482	0.01
+5830	-13317.48939	482	0.01
+5840	-13317.48939	482	0.01
+5850	-13317.48939	482	0.01
+5860	-13317.48939	482	0.01
+5870	-13317.48939	483	0.01
+5880	-13317.48939	483	0.01
+5890	-13317.48939	483	0.01
+5900	-13317.48939	483	0.01
+5910	-13317.48939	483	0.01
+5920	-13317.48835	483	0.01
+5930	-13317.48835	483	0.01
+5940	-13317.48835	484	0.01
+5950	-13317.48835	484	0.01
+5960	-13317.48835	484	0.01
+5970	-13317.48812	484	0.01
+5980	-13317.48812	484	0.01
+5990	-13317.48812	484	0.01
+6000	-13317.48812	484	0.01
+6010	-13317.48812	484	0.01
+6020	-13317.48812	485	0.01
+6030	-13317.48812	485	0.01
+6040	-13317.48808	485	0.01
+6050	-13317.48808	485	0.01
+6060	-13317.48796	485	0.01
+6070	-13317.48796	485	0.01
+6080	-13317.48796	486	0.01
+6090	-13317.48796	486	0.01
+6100	-13317.48796	486	0.01
+6110	-13317.48791	486	0.01
+6120	-13317.48791	486	0.01
+6130	-13317.48791	486	0.01
+6140	-13317.48791	486	0.01
+6150	-13317.48791	486	0.01
+6160	-13317.48791	487	0.01
+6170	-13317.48791	487	0.01
+6180	-13317.48791	487	0.01
+6190	-13317.48759	487	0.01
+6200	-13317.48759	487	0.01
+6210	-13317.48759	487	0.01
+6220	-13317.48759	487	0.01
+6230	-13317.48759	488	0.01
+6240	-13317.48759	488	0.01
+6250	-13317.48759	488	0.01
+6260	-13317.48759	488	0.01
+6270	-13317.48759	488	0.01
+6280	-13317.48759	488	0.01
+6290	-13317.48759	488	0.01
+6300	-13317.48753	488	0.01
+6310	-13317.48752	489	0.01
+6320	-13317.48752	489	0.01
+6330	-13317.48752	489	0.01
+6340	-13317.48751	489	0.01
+6350	-13317.48751	489	0.01
+6360	-13317.48751	489	0.01
+6370	-13317.48751	489	0.01
+6380	-13317.48751	490	0.01
+6390	-13317.48751	490	0.01
+6400	-13317.48751	490	0.01
+6410	-13317.48751	490	0.01
+6420	-13317.48751	490	0.01
+6430	-13317.48751	490	0.01
+6440	-13317.48751	490	0.01
+6450	-13317.48751	491	0.01
+6460	-13317.48751	491	0.01
+6470	-13317.48742	491	0.01
+6480	-13317.48742	491	0.01
+6490	-13317.48742	491	0.01
+6500	-13317.48742	491	0.01
+6510	-13317.48742	491	0.01
+6520	-13317.48742	492	0.01
+6530	-13317.48742	492	0.01
+6540	-13317.48742	492	0.01
+6550	-13317.48742	492	0.01
+6560	-13317.48742	492	0.01
+6570	-13317.48742	492	0.01
+6580	-13317.48742	493	0.01
+6590	-13317.48742	493	0.01
+6600	-13317.48742	493	0.01
+6610	-13317.48742	493	0.01
+6620	-13317.48742	493	0.01
+6630	-13317.48742	493	0.01
+6640	-13317.48742	493	0.01
+6650	-13317.48742	493	0.01
+6660	-13317.48729	494	0.01
+6670	-13317.48729	494	0.01
+6680	-13317.48729	494	0.01
+6690	-13317.48729	494	0.01
+6700	-13317.48729	494	0.01
+6710	-13317.48729	494	0.01
+6720	-13317.48729	494	0.01
+6730	-13317.48729	495	0.01
+6740	-13317.48729	495	0.01
+6750	-13317.48729	495	0.01
+6760	-13317.48729	495	0.01
+6770	-13317.48729	495	0.01
+6780	-13317.48729	495	0.01
+6790	-13317.48729	495	0.01
+6800	-13317.48729	496	0.01
+6810	-13317.48729	496	0.01
+6820	-13317.48729	496	0.01
+6830	-13317.48729	496	0.01
+6840	-13317.48729	496	0.01
+6850	-13317.48729	496	0.01
+6860	-13317.48726	496	0.01
+6870	-13317.48726	496	0.01
+6880	-13317.48726	497	0.01
+6890	-13317.48726	497	0.01
+6900	-13317.48726	497	0.01
+6910	-13317.48726	497	0.01
+6920	-13317.48718	497	0.01
+6930	-13317.48718	497	0.01
+6940	-13317.48718	497	0.01
+6950	-13317.48718	498	0.01
+6960	-13317.48718	498	0.01
+6970	-13317.48718	498	0.01
+6980	-13317.48718	498	0.01
+6990	-13317.48718	498	0.01
+7000	-13317.48718	498	0.01
+7010	-13317.48718	498	0.01
+7020	-13317.48718	499	0.01
+7030	-13317.48718	499	0.01
+7040	-13317.48718	499	0.01
+7050	-13317.48718	499	0.01
+7060	-13317.48718	499	0.01
+7070	-13317.48718	499	0.01
+7080	-13317.48718	499	0.01
+7090	-13317.48718	500	0.01
+7100	-13317.48718	500	0.01
+7110	-13317.48707	500	0.01
+7120	-13317.48707	500	0.01
+7130	-13317.48707	500	0.01
+7140	-13317.48707	500	0.01
+7150	-13317.48707	500	0.01
+7160	-13317.48707	501	0.01
+7170	-13317.48707	501	0.01
+7180	-13317.48707	501	0.01
+7190	-13317.48707	501	0.01
+7200	-13317.48707	501	0.01
+7210	-13317.48693	501	0.01
+7220	-13317.48687	501	0.01
+7230	-13317.48687	502	0.01
+7240	-13317.48687	502	0.01
+7250	-13317.48687	502	0.01
+7260	-13317.48687	502	0.01
+7270	-13317.48687	502	0.01
+7280	-13317.48684	502	0.01
+7290	-13317.48684	503	0.01
+7300	-13317.48684	503	0.01
+7310	-13317.48683	503	0.01
+7320	-13317.48683	503	0.01
+7330	-13317.48633	503	0.01
+7340	-13317.48633	503	0.01
+7350	-13317.48633	504	0.01
+7360	-13317.48633	504	0.01
+7370	-13317.48633	504	0.01
+7380	-13317.48633	504	0.01
+7390	-13317.48633	504	0.01
+7400	-13317.48618	504	0.01
+7410	-13317.48618	504	0.01
+7420	-13317.48618	505	0.01
+7430	-13317.48618	505	0.01
+7440	-13317.48618	505	0.01
+7450	-13317.48618	505	0.01
+7460	-13317.48618	505	0.01
+7470	-13317.48618	506	0.01
+7480	-13317.486	506	0.01
+7490	-13317.486	506	0.01
+7500	-13317.486	506	0.01
+7510	-13317.486	506	0.01
+7520	-13317.486	506	0.01
+7530	-13317.486	507	0.01
+7540	-13317.486	507	0.01
+7550	-13317.486	507	0.01
+7560	-13317.486	507	0.01
+7570	-13317.486	507	0.01
+7580	-13317.486	507	0.01
+7590	-13317.48571	507	0.01
+7600	-13317.48571	508	0.01
+7610	-13317.48571	508	0.01
+7620	-13317.48571	508	0.01
+7630	-13317.48571	508	0.01
+7640	-13317.48571	508	0.01
+7650	-13317.48571	508	0.01
+7660	-13317.48571	508	0.01
+7670	-13317.48571	509	0.01
+7680	-13317.48571	509	0.01
+7690	-13317.48571	509	0.01
+7700	-13317.48571	509	0.01
+7710	-13317.48571	509	0.01
+7720	-13317.48571	509	0.01
+7730	-13317.48571	509	0.01
+7740	-13317.48571	510	0.01
+7750	-13317.48571	510	0.01
+7760	-13317.4857	510	0.01
+7770	-13317.4857	510	0.01
+7780	-13317.4857	510	0.01
+7790	-13317.4857	510	0.01
+7800	-13317.4857	510	0.01
+7810	-13317.4857	511	0.01
+7820	-13317.4857	511	0.01
+7830	-13317.4857	511	0.01
+7840	-13317.4857	511	0.01
+7850	-13317.48261	511	0.01
+7860	-13317.48261	511	0.01
+7870	-13317.48261	511	0.01
+7880	-13317.48261	512	0.01
+7890	-13317.48261	512	0.01
+7900	-13317.48261	512	0.01
+7910	-13317.48261	512	0.01
+7920	-13317.48261	512	0.01
+7930	-13317.48261	512	0.01
+7940	-13317.48261	512	0.01
+7950	-13317.48261	512	0.01
+7960	-13317.48261	513	0.01
+7970	-13317.48261	513	0.01
+7980	-13317.48261	513	0.01
+7990	-13317.48261	513	0.01
+8000	-13317.48261	513	0.01
+8010	-13317.48261	513	0.01
+8020	-13317.48261	513	0.01
+8030	-13317.48261	514	0.01
+8040	-13317.48261	514	0.01
+8050	-13317.48257	514	0.01
+8060	-13317.48257	514	0.01
+8070	-13317.48257	514	0.01
+8080	-13317.48257	514	0.01
+8090	-13317.48257	515	0.01
+8100	-13317.48251	515	0.01
+8110	-13317.48251	515	0.01
+8120	-13317.48251	515	0.01
+8130	-13317.48251	515	0.01
+8140	-13317.48251	515	0.01
+8150	-13317.48251	515	0.01
+8160	-13317.48251	515	0.01
+8170	-13317.48251	516	0.01
+8180	-13317.48251	516	0.01
+8190	-13317.48209	516	0.01
+8200	-13317.48209	516	0.01
+8210	-13317.48209	516	0.01
+8220	-13317.48209	516	0.01
+8230	-13317.48209	517	0.01
+8240	-13317.48209	517	0.01
+8250	-13317.48209	517	0.01
+8260	-13317.48209	517	0.01
+8270	-13317.48209	517	0.01
+8280	-13317.48209	517	0.01
+8290	-13317.48209	517	0.01
+8300	-13317.48209	518	0.01
+8310	-13317.48209	518	0.01
+8320	-13317.48209	518	0.01
+8330	-13317.48209	518	0.01
+8340	-13317.48209	518	0.01
+8350	-13317.48209	518	0.01
+8360	-13317.48209	518	0.01
+8370	-13317.48185	518	0.01
+8380	-13317.48185	519	0.01
+8390	-13317.48185	519	0.01
+8400	-13317.48185	519	0.01
+Score after final optimization: -13317.47556
+Final	-13317.47556	521	0.01
diff --git a/example/partition/exampleRuns/3parts.sameModelType/GTRG.byCodonPos.screen.log b/example/partition/exampleRuns/3parts.sameModelType/GTRG.byCodonPos.screen.log
new file mode 100644
index 0000000..3d336b8
--- /dev/null
+++ b/example/partition/exampleRuns/3parts.sameModelType/GTRG.byCodonPos.screen.log
@@ -0,0 +1,1376 @@
+Running GARLI-PART Version 2.0.1008 (17 Mar 2011)
+->Single processor version<-
+
+##############################################################
+ This is GARLI 2.0, the first "official" release including 
+          partitioned models.  It is a merging of
+   official release 1.0 and beta version GARLI-PART 0.97
+  Briefly, it includes models for nucleotides, amino acids,
+ codons, and morphology-like characters, any of which can be 
+  mixed together and applied to different subsets of data.
+
+    General program usage is extensively documented here:
+            http://www.nescent.org/wg_garli/
+      see this page for details on partitioned usage:
+  http://www.nescent.org/wg_garli/Partition_testing_version
+   and this page for details on Mkv mophology model usage:
+    http://www.nescent.org/wg_garli/Mkv_morphology_model
+         PLEASE LET ME KNOW OF ANY PROBLEMS AT:
+                garli.support at gmail.com
+##############################################################
+This version has undergone much testing, but is still a BETA VERSION.
+   - Please check results carefully! -
+Compiled Mar 21 2011 13:13:18 using Intel icc compiler version 9.10
+Using NCL version 2.1.10
+
+#######################################################
+Reading config file garli.conf
+###################################################
+READING OF DATA
+Attempting to read data file in Nexus format (using NCL):
+	zakonEtAl2006.11tax.nex ...
+Reading DATA block... successful
+Reading SETS block... successful
+
+###################################################
+PARTITIONING OF DATA AND MODELS
+
+CHECK: ONE MODEL TYPE APPLIES TO ALL DATA SUBSETS,
+	BUT WITH INDEPENDENT MODEL PARAMETERS (no linkage)
+
+GARLI data subset 1
+	CHARACTERS block #1 ("Untitled DATA Block 1")
+	CHARPARTITION subset #1 ("1stpos")
+	Data read as Nucleotide data,
+	modeled as Nucleotide data
+	Summary of data:
+	  11 sequences.
+	  441 constant characters.
+	  171 parsimony-informative characters.
+	  114 uninformative variable characters.
+	  726 total characters.
+	  238 unique patterns in compressed data matrix.
+	Pattern processing required < 1 second
+
+GARLI data subset 2
+	CHARACTERS block #1 ("Untitled DATA Block 1")
+	CHARPARTITION subset #2 ("2ndpos")
+	Data read as Nucleotide data,
+	modeled as Nucleotide data
+	Summary of data:
+	  11 sequences.
+	  528 constant characters.
+	  90 parsimony-informative characters.
+	  108 uninformative variable characters.
+	  726 total characters.
+	  158 unique patterns in compressed data matrix.
+	Pattern processing required < 1 second
+
+GARLI data subset 3
+	CHARACTERS block #1 ("Untitled DATA Block 1")
+	CHARPARTITION subset #3 ("3rdpos")
+	Data read as Nucleotide data,
+	modeled as Nucleotide data
+	Summary of data:
+	  11 sequences.
+	  103 constant characters.
+	  507 parsimony-informative characters.
+	  116 uninformative variable characters.
+	  726 total characters.
+	  549 unique patterns in compressed data matrix.
+	Pattern processing required < 1 second
+
+
+###################################################
+NOTE: Unlike many programs, the amount of system memory that Garli will
+use can be controlled by the user.
+(This comes from the availablememory setting in the configuration file.
+Availablememory should NOT be set to more than the actual amount of 
+physical memory that your computer has installed)
+
+For this dataset:
+ Mem level		availablememory setting
+  great			    >= 11 MB
+  good			approx 10 MB to 9 MB
+  low			approx 8 MB to 5 MB
+  very low		approx 4 MB to 4 MB
+the minimum required availablememory is 4 MB
+
+You specified that Garli should use at most 512.0 MB of memory.
+
+Garli will actually use approx. 16.1 MB of memory
+**Your memory level is: great (you don't need to change anything)**
+
+#######################################################
+Found outgroup specification:  1
+
+#######################################################
+STARTING RUN
+
+>>>Search rep 1 (of 5)<<<
+MODEL REPORT - Parameters are at their INITIAL values (not yet optimized)
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3157 0.1746 0.3004 0.2093 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Model 2
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.2703 0.1566 0.1628 0.4103 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Model 3
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.1460 0.3609 0.2915 0.2015 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Subset rate multipliers:
+    1.00  1.00  1.00
+Starting with seed=406932
+
+creating likelihood stepwise addition starting tree...
+number of taxa added:
+ 4  5  6 
+Optimizing parameters... improved 210.740 lnL
+Optimizing branchlengths... improved 33.602 lnL
+ 7  8  9  10  11 
+Initial ln Likelihood: -13863.3954
+optimizing: starting branch lengths, alpha shape, rel rates, eq freqs, subset rates...
+pass 1:+  205.400 (branch=   9.43 scale=  1.70 alpha=  5.05 freqs= 34.11 rel rates= 96.25 subset rates= 58.87)
+pass 2:+  100.305 (branch=   8.26 scale=  1.50 alpha=  6.51 freqs= 16.99 rel rates=  8.80 subset rates= 58.25)
+pass 3:+   45.314 (branch=   2.13 scale=  2.25 alpha=  3.89 freqs=  1.27 rel rates=  0.79 subset rates= 34.98)
+pass 4:+   16.505 (branch=   0.00 scale=  0.00 alpha=  0.78 freqs=  0.61 rel rates=  2.25 subset rates= 12.86)
+pass 5:+    4.860 (branch=   0.00 scale=  0.00 alpha=  0.01 freqs=  0.14 rel rates=  0.01 subset rates=  4.70)
+pass 6:+    0.817 (branch=   0.00 scale=  0.00 alpha=  0.01 freqs=  0.12 rel rates=  0.69 subset rates=  0.00)
+pass 7:+    0.114 (branch=   0.00 scale=  0.00 alpha=  0.01 freqs=  0.09 rel rates=  0.01 subset rates=  0.00)
+lnL after optimization: -13490.0811
+gen      current_lnL    precision  last_tree_imp  
+0        -13490.0811      0.500           0 
+100      -13324.3912      0.500          55 
+200      -13323.1357      0.500          55 
+300      -13322.6035      0.500          55 
+400      -13322.4782      0.500          55 
+500      -13321.8755      0.500          55 
+600      -13321.4740      0.500          55 
+Optimization precision reduced 
+   Optimizing parameters...    improved    1.779 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+700      -13318.7011      0.402          55 
+800      -13318.4686      0.402          55 
+900      -13318.2340      0.402          55 
+1000     -13318.0609      0.402          55 
+1100     -13317.9954      0.402          55 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.036 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+1200     -13317.8825      0.304          55 
+1300     -13317.8431      0.304          55 
+1400     -13317.7822      0.304          55 
+1500     -13317.7491      0.304          55 
+1600     -13317.7135      0.304          55 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.009 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+1700     -13317.6211      0.206          55 
+1800     -13317.5931      0.206          55 
+1900     -13317.5875      0.206          55 
+2000     -13317.5820      0.206          55 
+2100     -13317.5775      0.206          55 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.004 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+2200     -13317.5723      0.108          55 
+2300     -13317.5679      0.108          55 
+2400     -13317.5652      0.108          55 
+2500     -13317.5605      0.108          55 
+2600     -13317.5541      0.108          55 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.001 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+2700     -13317.5471      0.010          55 
+2800     -13317.5389      0.010          55 
+2900     -13317.5358      0.010          55 
+3000     -13317.5275      0.010          55 
+3100     -13317.5268      0.010          55 
+3200     -13317.5259      0.010          55 
+3300     -13317.5245      0.010          55 
+3400     -13317.5228      0.010          55 
+3500     -13317.5221      0.010          55 
+3600     -13317.5218      0.010          55 
+3700     -13317.5218      0.010          55 
+3800     -13317.5192      0.010          55 
+3900     -13317.5162      0.010          55 
+4000     -13317.5142      0.010          55 
+4100     -13317.5139      0.010          55 
+4200     -13317.5138      0.010          55 
+4300     -13317.5138      0.010          55 
+4400     -13317.5137      0.010          55 
+4500     -13317.5132      0.010          55 
+4600     -13317.5107      0.010          55 
+4700     -13317.5107      0.010          55 
+4800     -13317.5084      0.010          55 
+4900     -13317.5074      0.010          55 
+5000     -13317.5070      0.010          55 
+5100     -13317.5059      0.010          55 
+5200     -13317.5059      0.010          55 
+5300     -13317.5043      0.010          55 
+5400     -13317.5034      0.010          55 
+5500     -13317.5034      0.010          55 
+5600     -13317.5031      0.010          55 
+5700     -13317.5028      0.010          55 
+5800     -13317.5028      0.010          55 
+5900     -13317.5028      0.010          55 
+6000     -13317.5022      0.010          55 
+6100     -13317.5022      0.010          55 
+6200     -13317.5003      0.010          55 
+6300     -13317.5002      0.010          55 
+6400     -13317.5002      0.010          55 
+6500     -13317.5001      0.010          55 
+6600     -13317.4997      0.010          55 
+6700     -13317.4997      0.010          55 
+6800     -13317.4995      0.010          55 
+6900     -13317.4995      0.010          55 
+7000     -13317.4995      0.010          55 
+7100     -13317.4985      0.010          55 
+7200     -13317.4983      0.010          55 
+7300     -13317.4965      0.010          55 
+7400     -13317.4965      0.010          55 
+7500     -13317.4965      0.010          55 
+7600     -13317.4965      0.010          55 
+7700     -13317.4964      0.010          55 
+7800     -13317.4964      0.010          55 
+Reached termination condition!
+last topological improvement at gen 55
+Improvement over last 500 gen = 0.00013
+Current score = -13317.4964
+Performing final optimizations...
+pass 1 : -13317.4958   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0003  rel rates= 0.0003  subset rates= 0.0000)
+pass 2 : -13317.4913   (branch= 0.0040  alpha= 0.0000  eq freqs= 0.0002  rel rates= 0.0002  subset rates= 0.0000)
+pass 3 : -13317.4845   (branch= 0.0050  alpha= 0.0000  eq freqs= 0.0002  rel rates= 0.0015  subset rates= 0.0000)
+pass 4 : -13317.4803   (branch= 0.0037  alpha= 0.0000  eq freqs= 0.0002  rel rates= 0.0001  subset rates= 0.0000)
+pass 5 : -13317.4783   (branch= 0.0013  alpha= 0.0000  eq freqs= 0.0006  rel rates= 0.0001  subset rates= 0.0000)
+pass 6 : -13317.4768   (branch= 0.0004  alpha= 0.0002  eq freqs= 0.0002  rel rates= 0.0007  subset rates= 0.0000)
+pass 7 : -13317.4761   (branch= 0.0003  alpha= 0.0000  eq freqs= 0.0002  rel rates= 0.0003  subset rates= 0.0000)
+pass 8 : -13317.4759   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0001  rel rates= 0.0001  subset rates= 0.0000)
+pass 9 : -13317.4757   (branch= 0.0001  alpha= 0.0000  eq freqs= 0.0001  rel rates= 0.0000  subset rates= 0.0000)
+pass 10: -13317.4756   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0001  rel rates= 0.0000  subset rates= 0.0000)
+pass 11: -13317.4756   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 12: -13317.4756   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 13: -13317.4756   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+Looking for minimum length branches...
+Final score = -13317.4756
+Time used so far = 0 hours, 1 minutes and 42 seconds
+
+MODEL REPORT - Parameter values are FINAL
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.963, AG = 2.576, AT = 1.416, CG = 1.403, CT = 3.719, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3100 0.1768 0.2973 0.2159 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.4095
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0181	0.2500
+      0.1888	0.2500
+      0.7413	0.2500
+      3.0518	0.2500
+
+Model 2
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 4.355, AG = 7.089, AT = 1.612, CG = 7.106, CT = 4.408, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.2694 0.1636 0.1605 0.4065 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.3607
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0115	0.2500
+      0.1518	0.2500
+      0.6850	0.2500
+      3.1517	0.2500
+
+Model 3
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.058, AG = 5.267, AT = 3.570, CG = 0.454, CT = 5.001, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.1538 0.3560 0.2870 0.2032 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      2.9811
+    Substitution rate categories under this model:
+      rate	proportion
+      0.3878	0.2500
+      0.7305	0.2500
+      1.0824	0.2500
+      1.7993	0.2500
+
+Subset rate multipliers:
+    0.54  0.30  2.16
+NOTE: Collapsing of minimum length branches was requested (collapsebranches = 1)
+    No branches were short enough to be collapsed.
+
+>>>Completed Search rep 1 (of 5)<<<
+
+>>>Search rep 2 (of 5)<<<
+MODEL REPORT - Parameters are at their INITIAL values (not yet optimized)
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3157 0.1746 0.3004 0.2093 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Model 2
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.2703 0.1566 0.1628 0.4103 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Model 3
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.1460 0.3609 0.2915 0.2015 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Subset rate multipliers:
+    1.00  1.00  1.00
+Starting with seed=459000111
+
+creating likelihood stepwise addition starting tree...
+number of taxa added:
+ 4  5  6 
+Optimizing parameters... improved 201.185 lnL
+Optimizing branchlengths... improved 31.443 lnL
+ 7  8  9  10  11 
+Initial ln Likelihood: -13690.6959
+optimizing: starting branch lengths, alpha shape, rel rates, eq freqs, subset rates...
+pass 1:+  202.627 (branch=   5.99 scale=  1.70 alpha= 13.57 freqs= 30.18 rel rates= 91.73 subset rates= 59.46)
+pass 2:+   98.686 (branch=   9.86 scale=  1.14 alpha=  6.13 freqs= 15.70 rel rates=  7.50 subset rates= 58.36)
+pass 3:+   43.190 (branch=   4.46 scale=  1.45 alpha=  2.52 freqs=  0.86 rel rates=  0.01 subset rates= 33.89)
+pass 4:+   15.348 (branch=   0.47 scale=  0.00 alpha=  0.73 freqs=  0.17 rel rates=  1.82 subset rates= 12.15)
+pass 5:+    5.652 (branch=   0.00 scale=  0.00 alpha=  0.01 freqs=  0.18 rel rates=  0.68 subset rates=  4.78)
+pass 6:+    0.170 (branch=   0.00 scale=  0.00 alpha=  0.01 freqs=  0.15 rel rates=  0.01 subset rates=  0.00)
+lnL after optimization: -13325.0231
+gen      current_lnL    precision  last_tree_imp  
+0        -13325.0231      0.500           0 
+100      -13322.0616      0.500           0 
+200      -13320.9899      0.500           0 
+300      -13320.2533      0.500           0 
+400      -13319.6815      0.500           0 
+500      -13319.4627      0.500           0 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.075 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+600      -13319.2426      0.402           0 
+700      -13318.8351      0.402           0 
+800      -13318.6816      0.402           0 
+900      -13318.6055      0.402           0 
+1000     -13318.4483      0.402           0 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.022 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+1100     -13318.3744      0.304           0 
+1200     -13318.0244      0.304           0 
+1300     -13317.9528      0.304           0 
+1400     -13317.9440      0.304           0 
+1500     -13317.8239      0.304           0 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.017 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+1600     -13317.7723      0.206           0 
+1700     -13317.7206      0.206           0 
+1800     -13317.7058      0.206           0 
+1900     -13317.6828      0.206           0 
+2000     -13317.6463      0.206           0 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.007 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+2100     -13317.6293      0.108           0 
+2200     -13317.6100      0.108           0 
+2300     -13317.6100      0.108           0 
+2400     -13317.5512      0.108           0 
+2500     -13317.5457      0.108           0 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.012 lnL
+   Optimizing branchlengths... improved    0.017 lnL
+2600     -13317.5109      0.010           0 
+2700     -13317.5104      0.010           0 
+2800     -13317.5057      0.010           0 
+2900     -13317.5023      0.010           0 
+3000     -13317.4979      0.010           0 
+3100     -13317.4977      0.010           0 
+3200     -13317.4901      0.010           0 
+3300     -13317.4901      0.010           0 
+3400     -13317.4901      0.010           0 
+3500     -13317.4896      0.010           0 
+3600     -13317.4894      0.010           0 
+3700     -13317.4894      0.010           0 
+3800     -13317.4894      0.010           0 
+3900     -13317.4883      0.010           0 
+4000     -13317.4877      0.010           0 
+4100     -13317.4871      0.010           0 
+4200     -13317.4871      0.010           0 
+4300     -13317.4870      0.010           0 
+4400     -13317.4870      0.010           0 
+4500     -13317.4870      0.010           0 
+4600     -13317.4869      0.010           0 
+4700     -13317.4869      0.010           0 
+4800     -13317.4864      0.010           0 
+4900     -13317.4859      0.010           0 
+5000     -13317.4855      0.010           0 
+5100     -13317.4848      0.010           0 
+5200     -13317.4848      0.010           0 
+5300     -13317.4839      0.010           0 
+5400     -13317.4839      0.010           0 
+5500     -13317.4839      0.010           0 
+5600     -13317.4839      0.010           0 
+5700     -13317.4839      0.010           0 
+5800     -13317.4832      0.010           0 
+5900     -13317.4832      0.010           0 
+6000     -13317.4830      0.010           0 
+6100     -13317.4829      0.010           0 
+6200     -13317.4824      0.010           0 
+6300     -13317.4823      0.010           0 
+6400     -13317.4816      0.010           0 
+6500     -13317.4813      0.010           0 
+6600     -13317.4812      0.010           0 
+6700     -13317.4812      0.010           0 
+6800     -13317.4811      0.010           0 
+6900     -13317.4811      0.010           0 
+7000     -13317.4811      0.010           0 
+7100     -13317.4810      0.010           0 
+7200     -13317.4805      0.010           0 
+7300     -13317.4805      0.010           0 
+7400     -13317.4804      0.010           0 
+7500     -13317.4804      0.010           0 
+7600     -13317.4803      0.010           0 
+Reached termination condition!
+last topological improvement at gen 0
+Improvement over last 500 gen = 0.00072
+Current score = -13317.4803
+Performing final optimizations...
+pass 1 : -13317.4799   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0002  rel rates= 0.0001  subset rates= 0.0000)
+pass 2 : -13317.4797   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0001  rel rates= 0.0001  subset rates= 0.0000)
+pass 3 : -13317.4795   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0001  rel rates= 0.0001  subset rates= 0.0000)
+pass 4 : -13317.4794   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0001  rel rates= 0.0000  subset rates= 0.0000)
+pass 5 : -13317.4771   (branch= 0.0021  alpha= 0.0000  eq freqs= 0.0001  rel rates= 0.0001  subset rates= 0.0000)
+pass 6 : -13317.4766   (branch= 0.0004  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0001  subset rates= 0.0000)
+pass 7 : -13317.4763   (branch= 0.0003  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 8 : -13317.4760   (branch= 0.0003  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 9 : -13317.4758   (branch= 0.0002  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0001  subset rates= 0.0000)
+pass 10: -13317.4757   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 11: -13317.4757   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 12: -13317.4756   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 13: -13317.4756   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 14: -13317.4756   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+Looking for minimum length branches...
+Final score = -13317.4756
+Time used so far = 0 hours, 3 minutes and 23 seconds
+
+MODEL REPORT - Parameter values are FINAL
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.961, AG = 2.575, AT = 1.415, CG = 1.402, CT = 3.716, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3100 0.1768 0.2973 0.2159 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.4094
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0181	0.2500
+      0.1888	0.2500
+      0.7413	0.2500
+      3.0518	0.2500
+
+Model 2
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 4.345, AG = 7.074, AT = 1.608, CG = 7.087, CT = 4.397, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.2695 0.1636 0.1605 0.4065 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.3606
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0115	0.2500
+      0.1518	0.2500
+      0.6849	0.2500
+      3.1518	0.2500
+
+Model 3
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.058, AG = 5.267, AT = 3.569, CG = 0.454, CT = 5.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.1538 0.3560 0.2870 0.2032 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      2.9825
+    Substitution rate categories under this model:
+      rate	proportion
+      0.3879	0.2500
+      0.7306	0.2500
+      1.0824	0.2500
+      1.7991	0.2500
+
+Subset rate multipliers:
+    0.54  0.30  2.16
+NOTE: Collapsing of minimum length branches was requested (collapsebranches = 1)
+    No branches were short enough to be collapsed.
+
+>>>Completed Search rep 2 (of 5)<<<
+
+>>>Search rep 3 (of 5)<<<
+MODEL REPORT - Parameters are at their INITIAL values (not yet optimized)
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3157 0.1746 0.3004 0.2093 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Model 2
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.2703 0.1566 0.1628 0.4103 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Model 3
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.1460 0.3609 0.2915 0.2015 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Subset rate multipliers:
+    1.00  1.00  1.00
+Starting with seed=401425806
+
+creating likelihood stepwise addition starting tree...
+number of taxa added:
+ 4  5  6 
+Optimizing parameters... improved 179.383 lnL
+Optimizing branchlengths... improved 52.565 lnL
+ 7  8  9  10  11 
+Initial ln Likelihood: -13715.9016
+optimizing: starting branch lengths, alpha shape, rel rates, eq freqs, subset rates...
+pass 1:+  198.274 (branch=   5.93 scale=  1.29 alpha=  6.51 freqs= 33.68 rel rates= 89.23 subset rates= 61.63)
+pass 2:+   98.585 (branch=   9.39 scale=  0.81 alpha=  6.30 freqs= 15.61 rel rates=  7.49 subset rates= 58.98)
+pass 3:+   43.758 (branch=   2.89 scale=  1.86 alpha=  3.08 freqs=  1.01 rel rates=  0.58 subset rates= 34.34)
+pass 4:+   15.850 (branch=   0.00 scale=  0.00 alpha=  0.80 freqs=  0.69 rel rates=  1.97 subset rates= 12.39)
+pass 5:+    5.880 (branch=   0.00 scale=  0.00 alpha=  0.01 freqs=  0.13 rel rates=  0.85 subset rates=  4.89)
+pass 6:+    0.109 (branch=   0.00 scale=  0.00 alpha=  0.01 freqs=  0.09 rel rates=  0.01 subset rates=  0.00)
+lnL after optimization: -13353.4450
+gen      current_lnL    precision  last_tree_imp  
+0        -13353.4450      0.500           0 
+100      -13322.7799      0.500          10 
+200      -13321.2908      0.500          10 
+300      -13320.4759      0.500          10 
+400      -13319.9059      0.500          10 
+500      -13319.7203      0.500          10 
+600      -13319.0563      0.500          10 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.032 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+700      -13318.2812      0.402          10 
+800      -13318.0210      0.402          10 
+900      -13317.9775      0.402          10 
+1000     -13317.8428      0.402          10 
+1100     -13317.7889      0.402          10 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.013 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+1200     -13317.6984      0.304          10 
+1300     -13317.6918      0.304          10 
+1400     -13317.6882      0.304          10 
+1500     -13317.6602      0.304          10 
+1600     -13317.6430      0.304          10 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.006 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+1700     -13317.6200      0.206          10 
+1800     -13317.6164      0.206          10 
+1900     -13317.6138      0.206          10 
+2000     -13317.5718      0.206          10 
+2100     -13317.5611      0.206          10 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.003 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+2200     -13317.5572      0.108          10 
+2300     -13317.5302      0.108          10 
+2400     -13317.5302      0.108          10 
+2500     -13317.5288      0.108          10 
+2600     -13317.5158      0.108          10 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.001 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+2700     -13317.5085      0.010          10 
+2800     -13317.5085      0.010          10 
+2900     -13317.5075      0.010          10 
+3000     -13317.5069      0.010          10 
+3100     -13317.5067      0.010          10 
+3200     -13317.5067      0.010          10 
+3300     -13317.5067      0.010          10 
+3400     -13317.5067      0.010          10 
+3500     -13317.5067      0.010          10 
+3600     -13317.5056      0.010          10 
+3700     -13317.5039      0.010          10 
+3800     -13317.5011      0.010          10 
+3900     -13317.5008      0.010          10 
+4000     -13317.5008      0.010          10 
+4100     -13317.5008      0.010          10 
+4200     -13317.5008      0.010          10 
+4300     -13317.5008      0.010          10 
+4400     -13317.5007      0.010          10 
+4500     -13317.5007      0.010          10 
+4600     -13317.5006      0.010          10 
+4700     -13317.5001      0.010          10 
+4800     -13317.5001      0.010          10 
+4900     -13317.5001      0.010          10 
+5000     -13317.5000      0.010          10 
+5100     -13317.5000      0.010          10 
+5200     -13317.4968      0.010          10 
+5300     -13317.4968      0.010          10 
+5400     -13317.4933      0.010          10 
+5500     -13317.4933      0.010          10 
+5600     -13317.4933      0.010          10 
+5700     -13317.4933      0.010          10 
+5800     -13317.4933      0.010          10 
+5900     -13317.4933      0.010          10 
+6000     -13317.4933      0.010          10 
+6100     -13317.4933      0.010          10 
+6200     -13317.4933      0.010          10 
+6300     -13317.4933      0.010          10 
+6400     -13317.4932      0.010          10 
+6500     -13317.4924      0.010          10 
+6600     -13317.4909      0.010          10 
+6700     -13317.4909      0.010          10 
+6800     -13317.4907      0.010          10 
+6900     -13317.4907      0.010          10 
+7000     -13317.4905      0.010          10 
+7100     -13317.4905      0.010          10 
+7200     -13317.4902      0.010          10 
+7300     -13317.4902      0.010          10 
+7400     -13317.4902      0.010          10 
+7500     -13317.4902      0.010          10 
+7600     -13317.4874      0.010          10 
+7700     -13317.4873      0.010          10 
+7800     -13317.4873      0.010          10 
+7900     -13317.4873      0.010          10 
+8000     -13317.4873      0.010          10 
+8100     -13317.4873      0.010          10 
+Reached termination condition!
+last topological improvement at gen 10
+Improvement over last 500 gen = 0.00010
+Current score = -13317.4873
+Performing final optimizations...
+pass 1 : -13317.4869   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0001  rel rates= 0.0002  subset rates= 0.0000)
+pass 2 : -13317.4838   (branch= 0.0028  alpha= 0.0000  eq freqs= 0.0001  rel rates= 0.0002  subset rates= 0.0000)
+pass 3 : -13317.4806   (branch= 0.0031  alpha= 0.0000  eq freqs= 0.0001  rel rates= 0.0001  subset rates= 0.0000)
+pass 4 : -13317.4784   (branch= 0.0019  alpha= 0.0000  eq freqs= 0.0001  rel rates= 0.0000  subset rates= 0.0000)
+pass 5 : -13317.4773   (branch= 0.0010  alpha= 0.0000  eq freqs= 0.0001  rel rates= 0.0000  subset rates= 0.0000)
+pass 6 : -13317.4765   (branch= 0.0005  alpha= 0.0000  eq freqs= 0.0003  rel rates= 0.0001  subset rates= 0.0000)
+pass 7 : -13317.4759   (branch= 0.0005  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 8 : -13317.4757   (branch= 0.0001  alpha= 0.0000  eq freqs= 0.0001  rel rates= 0.0000  subset rates= 0.0000)
+pass 9 : -13317.4756   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 10: -13317.4756   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 11: -13317.4755   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 12: -13317.4755   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+Looking for minimum length branches...
+Final score = -13317.4755
+Time used so far = 0 hours, 5 minutes and 12 seconds
+
+MODEL REPORT - Parameter values are FINAL
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.965, AG = 2.579, AT = 1.417, CG = 1.404, CT = 3.722, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3100 0.1768 0.2973 0.2159 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.4095
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0181	0.2500
+      0.1888	0.2500
+      0.7413	0.2500
+      3.0518	0.2500
+
+Model 2
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 4.351, AG = 7.084, AT = 1.610, CG = 7.097, CT = 4.404, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.2694 0.1636 0.1605 0.4065 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.3607
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0115	0.2500
+      0.1518	0.2500
+      0.6850	0.2500
+      3.1517	0.2500
+
+Model 3
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.057, AG = 5.261, AT = 3.564, CG = 0.454, CT = 4.995, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.1538 0.3560 0.2870 0.2032 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      2.9824
+    Substitution rate categories under this model:
+      rate	proportion
+      0.3879	0.2500
+      0.7306	0.2500
+      1.0824	0.2500
+      1.7991	0.2500
+
+Subset rate multipliers:
+    0.54  0.30  2.16
+NOTE: Collapsing of minimum length branches was requested (collapsebranches = 1)
+    No branches were short enough to be collapsed.
+
+>>>Completed Search rep 3 (of 5)<<<
+
+>>>Search rep 4 (of 5)<<<
+MODEL REPORT - Parameters are at their INITIAL values (not yet optimized)
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3157 0.1746 0.3004 0.2093 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Model 2
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.2703 0.1566 0.1628 0.4103 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Model 3
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.1460 0.3609 0.2915 0.2015 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Subset rate multipliers:
+    1.00  1.00  1.00
+Starting with seed=110869126
+
+creating likelihood stepwise addition starting tree...
+number of taxa added:
+ 4  5  6 
+Optimizing parameters... improved 222.535 lnL
+Optimizing branchlengths... improved 12.552 lnL
+ 7  8  9  10  11 
+Initial ln Likelihood: -13686.2656
+optimizing: starting branch lengths, alpha shape, rel rates, eq freqs, subset rates...
+pass 1:+  197.479 (branch=   6.03 scale=  1.63 alpha=  8.07 freqs= 28.85 rel rates= 93.04 subset rates= 59.85)
+pass 2:+   96.629 (branch=  12.32 scale=  0.50 alpha=  5.59 freqs= 14.32 rel rates=  6.45 subset rates= 57.45)
+pass 3:+   46.043 (branch=   7.56 scale=  0.62 alpha=  2.44 freqs=  1.83 rel rates=  0.01 subset rates= 33.58)
+pass 4:+   17.375 (branch=   1.70 scale=  0.00 alpha=  0.69 freqs=  0.15 rel rates=  2.55 subset rates= 12.29)
+pass 5:+    5.749 (branch=   0.00 scale=  0.00 alpha=  0.29 freqs=  0.69 rel rates=  0.01 subset rates=  4.75)
+pass 6:+    1.159 (branch=   0.00 scale=  0.00 alpha=  0.01 freqs=  0.10 rel rates=  0.47 subset rates=  0.59)
+pass 7:+    0.086 (branch=   0.00 scale=  0.00 alpha=  0.00 freqs=  0.07 rel rates=  0.01 subset rates=  0.00)
+lnL after optimization: -13321.7448
+gen      current_lnL    precision  last_tree_imp  
+0        -13321.7448      0.500           0 
+100      -13320.2658      0.500           0 
+200      -13320.0646      0.500           0 
+300      -13319.3706      0.500           0 
+400      -13318.6406      0.500           0 
+500      -13318.2430      0.500           0 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.042 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+600      -13318.0693      0.402           0 
+700      -13317.8631      0.402           0 
+800      -13317.7904      0.402           0 
+900      -13317.7352      0.402           0 
+1000     -13317.6734      0.402           0 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.014 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+1100     -13317.6275      0.304           0 
+1200     -13317.6191      0.304           0 
+1300     -13317.6089      0.304           0 
+1400     -13317.5867      0.304           0 
+1500     -13317.5818      0.304           0 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.006 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+1600     -13317.5683      0.206           0 
+1700     -13317.5612      0.206           0 
+1800     -13317.5607      0.206           0 
+1900     -13317.5592      0.206           0 
+2000     -13317.5559      0.206           0 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.004 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+2100     -13317.5491      0.108           0 
+2200     -13317.5483      0.108           0 
+2300     -13317.5483      0.108           0 
+2400     -13317.5478      0.108           0 
+2500     -13317.5468      0.108           0 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.001 lnL
+   Optimizing branchlengths... improved    0.023 lnL
+2600     -13317.5204      0.010           0 
+2700     -13317.5187      0.010           0 
+2800     -13317.5187      0.010           0 
+2900     -13317.5180      0.010           0 
+3000     -13317.5113      0.010           0 
+3100     -13317.5058      0.010           0 
+3200     -13317.5058      0.010           0 
+3300     -13317.5044      0.010           0 
+3400     -13317.5042      0.010           0 
+3500     -13317.5042      0.010           0 
+3600     -13317.5042      0.010           0 
+3700     -13317.5041      0.010           0 
+3800     -13317.4994      0.010           0 
+3900     -13317.4994      0.010           0 
+4000     -13317.4991      0.010           0 
+4100     -13317.4991      0.010           0 
+4200     -13317.4982      0.010           0 
+4300     -13317.4979      0.010           0 
+4400     -13317.4979      0.010           0 
+4500     -13317.4964      0.010           0 
+4600     -13317.4964      0.010           0 
+4700     -13317.4962      0.010           0 
+4800     -13317.4959      0.010           0 
+4900     -13317.4954      0.010           0 
+5000     -13317.4953      0.010           0 
+5100     -13317.4949      0.010           0 
+5200     -13317.4932      0.010           0 
+5300     -13317.4931      0.010           0 
+5400     -13317.4931      0.010           0 
+5500     -13317.4931      0.010           0 
+5600     -13317.4930      0.010           0 
+5700     -13317.4928      0.010           0 
+5800     -13317.4926      0.010           0 
+5900     -13317.4926      0.010           0 
+6000     -13317.4926      0.010           0 
+6100     -13317.4926      0.010           0 
+6200     -13317.4923      0.010           0 
+6300     -13317.4923      0.010           0 
+6400     -13317.4920      0.010           0 
+6500     -13317.4920      0.010           0 
+6600     -13317.4920      0.010           0 
+6700     -13317.4920      0.010           0 
+6800     -13317.4920      0.010           0 
+6900     -13317.4920      0.010           0 
+7000     -13317.4920      0.010           0 
+7100     -13317.4920      0.010           0 
+7200     -13317.4920      0.010           0 
+7300     -13317.4920      0.010           0 
+7400     -13317.4920      0.010           0 
+7500     -13317.4920      0.010           0 
+7600     -13317.4919      0.010           0 
+Reached termination condition!
+last topological improvement at gen 0
+Improvement over last 500 gen = 0.00011
+Current score = -13317.4919
+Performing final optimizations...
+pass 1 : -13317.4915   (branch= 0.0000  alpha= 0.0001  eq freqs= 0.0003  rel rates= 0.0001  subset rates= 0.0000)
+pass 2 : -13317.4913   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0002  rel rates= 0.0001  subset rates= 0.0000)
+pass 3 : -13317.4809   (branch= 0.0101  alpha= 0.0000  eq freqs= 0.0002  rel rates= 0.0000  subset rates= 0.0000)
+pass 4 : -13317.4791   (branch= 0.0016  alpha= 0.0000  eq freqs= 0.0001  rel rates= 0.0000  subset rates= 0.0000)
+pass 5 : -13317.4775   (branch= 0.0014  alpha= 0.0000  eq freqs= 0.0001  rel rates= 0.0000  subset rates= 0.0000)
+pass 6 : -13317.4765   (branch= 0.0009  alpha= 0.0000  eq freqs= 0.0001  rel rates= 0.0000  subset rates= 0.0000)
+pass 7 : -13317.4759   (branch= 0.0003  alpha= 0.0000  eq freqs= 0.0001  rel rates= 0.0000  subset rates= 0.0000)
+pass 8 : -13317.4758   (branch= 0.0001  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 9 : -13317.4757   (branch= 0.0001  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 10: -13317.4757   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 11: -13317.4756   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 12: -13317.4756   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+Looking for minimum length branches...
+Final score = -13317.4756
+Time used so far = 0 hours, 6 minutes and 51 seconds
+
+MODEL REPORT - Parameter values are FINAL
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.965, AG = 2.580, AT = 1.418, CG = 1.405, CT = 3.723, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3100 0.1768 0.2973 0.2159 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.4094
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0181	0.2500
+      0.1887	0.2500
+      0.7412	0.2500
+      3.0520	0.2500
+
+Model 2
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 4.350, AG = 7.083, AT = 1.610, CG = 7.097, CT = 4.403, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.2695 0.1636 0.1605 0.4065 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.3609
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0115	0.2500
+      0.1520	0.2500
+      0.6852	0.2500
+      3.1513	0.2500
+
+Model 3
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.058, AG = 5.268, AT = 3.569, CG = 0.454, CT = 5.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.1538 0.3560 0.2870 0.2032 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      2.9819
+    Substitution rate categories under this model:
+      rate	proportion
+      0.3879	0.2500
+      0.7305	0.2500
+      1.0824	0.2500
+      1.7992	0.2500
+
+Subset rate multipliers:
+    0.54  0.30  2.16
+NOTE: Collapsing of minimum length branches was requested (collapsebranches = 1)
+    No branches were short enough to be collapsed.
+
+>>>Completed Search rep 4 (of 5)<<<
+
+>>>Search rep 5 (of 5)<<<
+MODEL REPORT - Parameters are at their INITIAL values (not yet optimized)
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3157 0.1746 0.3004 0.2093 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Model 2
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.2703 0.1566 0.1628 0.4103 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Model 3
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.1460 0.3609 0.2915 0.2015 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0334	0.2500
+      0.2519	0.2500
+      0.8203	0.2500
+      2.8944	0.2500
+
+Subset rate multipliers:
+    1.00  1.00  1.00
+Starting with seed=1432730019
+
+creating likelihood stepwise addition starting tree...
+number of taxa added:
+ 4  5  6 
+Optimizing parameters... improved 204.175 lnL
+Optimizing branchlengths... improved 54.430 lnL
+ 7  8  9  10  11 
+Initial ln Likelihood: -13850.6663
+optimizing: starting branch lengths, alpha shape, rel rates, eq freqs, subset rates...
+pass 1:+  206.901 (branch=  10.49 scale=  0.59 alpha=  2.66 freqs= 34.28 rel rates= 99.72 subset rates= 59.16)
+pass 2:+   96.794 (branch=   7.46 scale=  2.85 alpha=  6.26 freqs= 16.52 rel rates=  6.62 subset rates= 57.09)
+pass 3:+   45.055 (branch=   5.78 scale=  0.00 alpha=  3.33 freqs=  1.52 rel rates=  1.31 subset rates= 33.11)
+pass 4:+   20.882 (branch=   3.40 scale=  0.00 alpha=  0.78 freqs=  0.71 rel rates=  3.02 subset rates= 12.98)
+pass 5:+    6.430 (branch=   0.00 scale=  0.00 alpha=  0.01 freqs=  0.07 rel rates=  1.39 subset rates=  4.96)
+pass 6:+    0.079 (branch=   0.00 scale=  0.00 alpha=  0.01 freqs=  0.06 rel rates=  0.01 subset rates=  0.00)
+lnL after optimization: -13474.5256
+gen      current_lnL    precision  last_tree_imp  
+0        -13474.5256      0.500           0 
+100      -13324.0391      0.500          40 
+200      -13323.4406      0.500          40 
+300      -13322.7068      0.500          40 
+400      -13322.3876      0.500          40 
+500      -13321.4452      0.500          40 
+600      -13320.9924      0.500          40 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.541 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+700      -13319.6463      0.402          40 
+800      -13319.1584      0.402          40 
+900      -13318.8903      0.402          40 
+1000     -13318.5134      0.402          40 
+1100     -13318.2613      0.402          40 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.027 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+1200     -13318.1072      0.304          40 
+1300     -13318.0828      0.304          40 
+1400     -13317.9779      0.304          40 
+1500     -13317.9633      0.304          40 
+1600     -13317.9586      0.304          40 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.015 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+1700     -13317.8625      0.206          40 
+1800     -13317.7611      0.206          40 
+1900     -13317.6621      0.206          40 
+2000     -13317.6395      0.206          40 
+2100     -13317.6333      0.206          40 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.005 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+2200     -13317.6222      0.108          40 
+2300     -13317.6178      0.108          40 
+2400     -13317.6061      0.108          40 
+2500     -13317.6061      0.108          40 
+2600     -13317.6048      0.108          40 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.001 lnL
+   Optimizing branchlengths... improved    0.049 lnL
+2700     -13317.5462      0.010          40 
+2800     -13317.5293      0.010          40 
+2900     -13317.5292      0.010          40 
+3000     -13317.5266      0.010          40 
+3100     -13317.5249      0.010          40 
+3200     -13317.5230      0.010          40 
+3300     -13317.5205      0.010          40 
+3400     -13317.5202      0.010          40 
+3500     -13317.5202      0.010          40 
+3600     -13317.5202      0.010          40 
+3700     -13317.5200      0.010          40 
+3800     -13317.5094      0.010          40 
+3900     -13317.4994      0.010          40 
+4000     -13317.4985      0.010          40 
+4100     -13317.4984      0.010          40 
+4200     -13317.4984      0.010          40 
+4300     -13317.4980      0.010          40 
+4400     -13317.4947      0.010          40 
+4500     -13317.4942      0.010          40 
+4600     -13317.4942      0.010          40 
+4700     -13317.4927      0.010          40 
+4800     -13317.4927      0.010          40 
+4900     -13317.4921      0.010          40 
+5000     -13317.4912      0.010          40 
+5100     -13317.4907      0.010          40 
+5200     -13317.4906      0.010          40 
+5300     -13317.4906      0.010          40 
+5400     -13317.4906      0.010          40 
+5500     -13317.4903      0.010          40 
+5600     -13317.4896      0.010          40 
+5700     -13317.4895      0.010          40 
+5800     -13317.4894      0.010          40 
+5900     -13317.4894      0.010          40 
+6000     -13317.4881      0.010          40 
+6100     -13317.4880      0.010          40 
+6200     -13317.4876      0.010          40 
+6300     -13317.4875      0.010          40 
+6400     -13317.4875      0.010          40 
+6500     -13317.4874      0.010          40 
+6600     -13317.4874      0.010          40 
+6700     -13317.4873      0.010          40 
+6800     -13317.4873      0.010          40 
+6900     -13317.4873      0.010          40 
+7000     -13317.4872      0.010          40 
+7100     -13317.4872      0.010          40 
+7200     -13317.4871      0.010          40 
+7300     -13317.4868      0.010          40 
+7400     -13317.4862      0.010          40 
+7500     -13317.4860      0.010          40 
+7600     -13317.4857      0.010          40 
+7700     -13317.4857      0.010          40 
+7800     -13317.4857      0.010          40 
+7900     -13317.4826      0.010          40 
+8000     -13317.4826      0.010          40 
+8100     -13317.4825      0.010          40 
+8200     -13317.4821      0.010          40 
+8300     -13317.4821      0.010          40 
+8400     -13317.4819      0.010          40 
+Reached termination condition!
+last topological improvement at gen 40
+Improvement over last 500 gen = 0.00076
+Current score = -13317.4819
+Performing final optimizations...
+pass 1 : -13317.4814   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0003  rel rates= 0.0001  subset rates= 0.0000)
+pass 2 : -13317.4810   (branch= 0.0000  alpha= 0.0001  eq freqs= 0.0002  rel rates= 0.0002  subset rates= 0.0000)
+pass 3 : -13317.4807   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0002  rel rates= 0.0001  subset rates= 0.0000)
+pass 4 : -13317.4805   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0001  rel rates= 0.0001  subset rates= 0.0000)
+pass 5 : -13317.4768   (branch= 0.0031  alpha= 0.0000  eq freqs= 0.0001  rel rates= 0.0004  subset rates= 0.0000)
+pass 6 : -13317.4763   (branch= 0.0004  alpha= 0.0000  eq freqs= 0.0001  rel rates= 0.0000  subset rates= 0.0000)
+pass 7 : -13317.4759   (branch= 0.0002  alpha= 0.0000  eq freqs= 0.0001  rel rates= 0.0000  subset rates= 0.0000)
+pass 8 : -13317.4758   (branch= 0.0001  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 9 : -13317.4756   (branch= 0.0002  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 10: -13317.4756   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 11: -13317.4756   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 12: -13317.4756   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 13: -13317.4756   (branch= 0.0000  alpha= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+Looking for minimum length branches...
+Final score = -13317.4756
+Time used = 0 hours, 8 minutes and 41 seconds
+
+MODEL REPORT - Parameter values are FINAL
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.963, AG = 2.577, AT = 1.416, CG = 1.403, CT = 3.719, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3100 0.1768 0.2973 0.2159 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.4095
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0181	0.2500
+      0.1888	0.2500
+      0.7413	0.2500
+      3.0518	0.2500
+
+Model 2
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 4.354, AG = 7.088, AT = 1.611, CG = 7.102, CT = 4.407, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.2694 0.1636 0.1605 0.4065 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.3607
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0115	0.2500
+      0.1518	0.2500
+      0.6850	0.2500
+      3.1517	0.2500
+
+Model 3
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.057, AG = 5.260, AT = 3.564, CG = 0.454, CT = 4.994, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.1538 0.3560 0.2870 0.2032 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      2.9829
+    Substitution rate categories under this model:
+      rate	proportion
+      0.3879	0.2500
+      0.7306	0.2500
+      1.0824	0.2500
+      1.7991	0.2500
+
+Subset rate multipliers:
+    0.54  0.30  2.16
+NOTE: Collapsing of minimum length branches was requested (collapsebranches = 1)
+    No branches were short enough to be collapsed.
+
+>>>Completed Search rep 5 (of 5)<<<
+
+#######################################################
+
+Completed 5 replicate search(es) (of 5).
+
+NOTE: Unless the following output indicates that search replicates found the
+	same topology, you should assume that they found different topologies.
+Results:
+Replicate 1 : -13317.4756       
+Replicate 2 : -13317.4756        (same topology as 1)
+Replicate 3 : -13317.4755 (best) (same topology as 1)
+Replicate 4 : -13317.4756        (same topology as 1)
+Replicate 5 : -13317.4756        (same topology as 1)
+
+Parameter estimates across search replicates:
+
+Partition model subset 1:
+         r(AC)  r(AG)  r(AT)  r(CG)  r(CT)  r(GT) pi(A) pi(C) pi(G) pi(T) alpha
+rep 1:   1.963  2.576  1.416  1.403  3.719      1 0.310 0.177 0.297 0.216 0.409
+rep 2:   1.961  2.575  1.415  1.402  3.716      1 0.310 0.177 0.297 0.216 0.409
+rep 3:   1.965  2.579  1.417  1.404  3.722      1 0.310 0.177 0.297 0.216 0.409
+rep 4:   1.965   2.58  1.418  1.405  3.723      1 0.310 0.177 0.297 0.216 0.409
+rep 5:   1.963  2.577  1.416  1.403  3.719      1 0.310 0.177 0.297 0.216 0.409
+
+Partition model subset 2:
+         r(AC)  r(AG)  r(AT)  r(CG)  r(CT)  r(GT) pi(A) pi(C) pi(G) pi(T) alpha
+rep 1:   4.355  7.089  1.612  7.106  4.408      1 0.269 0.164 0.160 0.407 0.361
+rep 2:   4.345  7.074  1.608  7.087  4.397      1 0.269 0.164 0.160 0.407 0.361
+rep 3:   4.351  7.084   1.61  7.097  4.404      1 0.269 0.164 0.160 0.407 0.361
+rep 4:    4.35  7.083   1.61  7.097  4.403      1 0.269 0.164 0.160 0.406 0.361
+rep 5:   4.354  7.088  1.611  7.102  4.407      1 0.269 0.164 0.160 0.407 0.361
+
+Partition model subset 3:
+         r(AC)  r(AG)  r(AT)  r(CG)  r(CT)  r(GT) pi(A) pi(C) pi(G) pi(T) alpha
+rep 1:   1.058  5.267   3.57 0.4542  5.001      1 0.154 0.356 0.287 0.203 2.981
+rep 2:   1.058  5.267  3.569 0.4543      5      1 0.154 0.356 0.287 0.203 2.982
+rep 3:   1.057  5.261  3.564 0.4538  4.995      1 0.154 0.356 0.287 0.203 2.982
+rep 4:   1.058  5.268  3.569 0.4544      5      1 0.154 0.356 0.287 0.203 2.982
+rep 5:   1.057   5.26  3.564 0.4538  4.994      1 0.154 0.356 0.287 0.203 2.983
+
+Treelengths and subset rate multipliers:
+          TL   R(1)  R(2)  R(3)
+rep 1:  1.704 0.538 0.298 2.164
+rep 2:  1.704 0.538 0.298 2.164
+rep 3:  1.704 0.538 0.298 2.164
+rep 4:  1.704 0.537 0.299 2.164
+rep 5:  1.704 0.538 0.298 2.164
+
+Saving final trees from all search reps to GTRG.byCodonPos.best.all.tre
+
+Saving final tree from best search rep (#3) to GTRG.byCodonPos.best.tre
+#######################################################
diff --git a/example/partition/exampleRuns/3parts.sameModelType/garli.conf b/example/partition/exampleRuns/3parts.sameModelType/garli.conf
new file mode 100644
index 0000000..6215f15
--- /dev/null
+++ b/example/partition/exampleRuns/3parts.sameModelType/garli.conf
@@ -0,0 +1,67 @@
+[general]
+datafname = zakonEtAl2006.11tax.nex
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = GTRG.byCodonPos
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 5000
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+outputsitelikelihoods = 0
+optimizeinputonly = 0
+collapsebranches = 1
+
+searchreps = 5
+bootstrapreps = 0
+linkmodels = 0
+subsetspecificrates = 1
+
+[model1]
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 5
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
diff --git a/example/partition/exampleRuns/3parts.sameModelType/zakonEtAl2006.11tax.nex b/example/partition/exampleRuns/3parts.sameModelType/zakonEtAl2006.11tax.nex
new file mode 100644
index 0000000..0a676a5
--- /dev/null
+++ b/example/partition/exampleRuns/3parts.sameModelType/zakonEtAl2006.11tax.nex
@@ -0,0 +1,32 @@
+#NEXUS
+
+[
+This dataset is from:
+Zakon, Lu, Zwickl and Hillis. 2006. Sodium channel genes and the evolution of diversity in communication signals of electric fishes: Convergent molecular evolution. Proc. Natl. Acad. Sci. USA. 103(10):3675-80.
+]
+
+begin data;
+dimensions ntax=11 nchar=2178;
+format datatype=dna missing=? gap=-;
+matrix
+MorNa6    CCTGTGACTCCACATTTTGAGCACGTACTCAGTGTGGGAAACCTGGTTTTCTCAGGGATATTTGCTGGTGAAATGGTCTTGAAAATTATTGCTATGGACCCCTACTACTACTTCCAGGTTGGATGGAACGTGTTTGACAGCATCATTGTTACCATGAGTATGGTGGAGATGGTACTGGCTGATGTAGAGGGTCTGTCGGTTCTGCGGTCCTTTCGTTTGCTACGTGTCTTCAAGCTTGCCAAATCATGGCCTACCCTCAACATGCTGCTAACGATCATCGGAAACTCAGTGGGTGCTCTGGGGAACCTCACCGTGGTGCTGGCCATCATCGTTTTCATCTTCGCTGTGGTTGGAATGCAGCTGTTTGCCAAAAACTACAAGGACTGCGTCTGCAAGATCGCCGAGGATTGTGAGCTGCCCCGGTGGCACATGCATGACTTCTTCCACTCTTTCCTCATCGTGTTCCGCATCCTCTGTGGAGA [...]
+ClownNa6  CCCATGAGCCCTGAGTTTGACCACATGCTCTCTGTGGGAAACCTGGTTTTCACTGGAATCTTCACAGCTGAAATGGTCCTAAAACTCATTGCTATGGACCCCTACTACTACTTCCAGGTTGGATGGAACATATTTGACAGCATCATTGTCACTCTAAGCCTAGTGGAACTGGGGCTCGCTAATGTTCAGGGTCTGTCAGTCCTGCGATCCTTTCGTTTGTTGCGAGTGTTCAAGCTGGCAAAGTCTTGGCCCACCCTCAACATGCTGATCAAGATCATCGGGAATTCCGTGGGCGCCCTGGGCAACCTGACCCTGGTGCTGGCCATCATCGTCTTCATCTTCGCCGTGGTGGGCATGCAGCTCTTTGGGAAGACCTACAAGGACTGCGTGTGCAAGATTGCCAGTGACTGCGAGCTTCCCCGCTGGCACATGAATGACTTCTTCCACTCGTTCCTTATCGTGTTCCGCATCCTCTGCGGGGA [...]
+AraNa6    CCAATGAGTCCCGCGTTTGACCATATGCTGACCGTGGGAAACCTCGTTTTTACGGGGATCTTTACAGCTGAGATGGTATTCAAGCTCATCGCCATGGATCCATACCACTACTTCCAGGTTGGATGGAACATTTTTGACAGCATCATTGTCACACTTAGCCTGGTGGAGCTGGGTCTCGCGAATGTTCAGGGCCTTTCGGTCTTGCGCTCCTTCCGCTTGCTGCGGGTCTTCAAGCTGGCCAAGTCTTGGCCTACCCTGAACATGCTCATCAAGATCATTGGAAACTCAGTGGGTGCCCTAGGGAACCTCACACTGGTGCTGGCCATCATCGTCTTCATCTTCGCTGTCGTGGGCATGCAGCTGTTCGGTAAGAGCTACAAGGACTGTGTGTGTAAGATTGCAGAGGACTGTGAGCTACCCCGCTGGCACATGAATGACTTCTTCCACTCCTTCCTCATCGTGTTCCGCATCTTGTGTGGCGA [...]
+puffNa6   CCCATGACCGAAGAGTTCGACTACATGCTTTCAGTGGGAAATCTGGTTTTCACAGGAATCTTCGCGGCGGAAATGTTCTTCAAATTGATCGCCATGGATCCGTACTACTATTTCCAAGTTGGCTGGAACATTTTTGACAGCATCATCGTCACGCTCAGTCTGGTGGAGTTAGGGCTTGCAAACGTCCAGGGGCTGTCCGTCCTCAGGTCCTTCCGTCTGCTTCGGGTCTTCAAACTTGCCAAGTCCTGGCCCACGCTCAACATGCTGATCAAGATTATCGGTAATTCAGTTGGAGCTTTAGGGAATCTGACTTTGGTGCTGGCCATCATCGTCTTCATCTTCGCTGTGGTGGGGATGCAGCTCTTCGGCAAAAGCTACAAGGACTGTGTGTGCAAGATTTCCTCCGACTGCGAGCTGCCACGCTGGCACATGAATGACTTCTTCCACTCCTTCCTCATCGTGTTCCGCATCCTGTGCGGCGA [...]
+NewZebra  CCTATGAGTCCACATTTTGAACATGTCCTCTCAGTGGGCAACTTGGTGTTCACAGGAATCTTCACAGCTGAAATGGTGTTCAAGCTTATAGCTATGGACCCTTACTACTACTTCCAGGTGGGCTGGAACATTTTTGACAGCATCATTGTCACACTCAGCCTGGTGGAGTTGGGACTGGCCAACGTTCAGGGATTGTCCGTTCTAAGGTCCTTTCGTTTGCTACGTGTCTTCAAACTGGCTAAATCTTGGCCCACCCTTAACATGCTGATCAAGATCATCGGCAACTCAGTGGGTGCTCTAGGGAACCTAACACTTGTTCTGGCCATCATTGTCTTCATCTTTGCCGTGGTGGGCATGCAGCTTTTTGGAAAAAGCTACAAGGACTGCGTTTGTAAGATCTCTGAGGATTGCGAGCTGCCCCGCTGGCACATGAACGACTTCTTCCACTCATTCCTCATCGTCTTTCGGATCTTATGTGGAGA [...]
+SterNa6   CCCATGAGCGAAACCTTTCAACACGTGCTCACCATAGGGAACCTGGTGTTTACTACCATCTTTACGGCTGAAATGGTGTCGAAGATCATCGCCCTGGACCCTTACTACTACTTCCAGGTGGGCTGGAACATCTTCGACTGCATCATCGTCACTCTCAGTCTGGTGGAGCTAAGCCTATCCAACATGCCGGGCCTGTCTGTGCTCAGATCCTTTCGTTTGATGCGTATTTTCAAGCTGGCCAAGTCCTGGCCCACGCTCAACATGCTGATCAAGATCATCGGCAACTCAATGGGCGCCCTGGGGAACCTGACCTTCGTGTTGGCCATCGTCATCTTCATCTTCGCCGTGGTGGGCTTCCAGCTGTTCGGGAAGAGCTACAAGGACAACGTGTGCAAGGTCAGCGCGGACTGCACGCTGCCTCGCTGGCACATGAACGACTTCTTCCACTCCTTCCTGATCGTGTTTCGCATCCTGTGCGGCGA [...]
+eelNa6    CCCATGAACGAAAGCTTTCAGAGTCTGCTCAGTGCAGGAAACCTGGTGTTTACCACTATCTTTGCGGCTGAAATGGTGTTGAAGATCATTGCCTTGGACCCCTACTACTACTTCCAGCAGACGTGGAACATATTTGACAGCATCATTGTCAGTCTCAGTCTGTTGGAGCTTGGACTATCCAATATGCAAGGAATGTCTGTGCTCAGATCCTTACGTTTGCTGCGTATCTTCAAATTGGCCAAGTCCTGGCCCACGCTCAACATTCTGATCAAGATAATCTGCAACTCGGTGGGCGCTCTGGGCAACCTGACCATTGTGCTGGCCATTATCGTCTTCATCTTCGCCTTGGTGGGCTTTCAGCTGTTCGGAAAGAACTACAAGGAGTACGTGTGCAAGATCTCTGATGACTGTGAGCTGCCCCGCTGGCACATGAATGACTTCTTCCACTCCTTCCTGATTGTGTTCCGTGCCTTGTGTGGCGA [...]
+catNa6    CCCATGAGTTCGAACTTTGAACACGTGCTCAGTGTTGGCAATTTGGTGTTCACTGGTATTTTCACGGCTGAAATGGTGTTCAAGCTCATTGCCTTGGACCCCTTCTACTACTTCCAGGTTGGCTGGAACATATTTGACAGCATCATCGTCACTCTTAGCCTGGTGGAGTTAGGCCTGGCCAATGTGCAGGGTCTGTCTGTACTCAGATCCTTTCGTTTGCTGCGAGTCTTTAAGCTGGCTAAATCCTGGCCCACGCTCAACATGCTGATCAAAATCATTGGAAACTCTGTGGGTGCTCTGGGGAACCTGACTCTGGTGCTGGCCATCGTCGTCTTCATCTTCGCCGTCGTAGGCATGCAACTTTTTGGCAAGAGCTACAAGGACTGCGTGTGTAAGATTGCAGAGGACTGCGAACTGCCCCGCTGGCACATGAACGATTTTTTCCATTCGTTTCTCATTGTCTTCCGCATCCTTTGTGGTGA [...]
+AptNa6    ---------------------------CTCACTGTGGGGAACCTGGTGTTTACTGGCATCTTTACGGCTGAAATGGTGTTTAAGCTCATTGCCATGGACCCCTACTACTACTTCCAGGTGGGCTGGAACATCTTCGACAGCATCATCGTCACCCTCAGTCTGGTGGAGCTGGGGCTAGCCAACGTGCAGGGTCTGTCTGTGCTCAGGTCCTTCCGTTTGCTGCGTGTCTTCAAGTTGGCCAAGTCCTGGCCAACGCTCAATATGCTCATCAAGATCATTGGCAACTCGGTGGGAGCCCTGGGCAACCTGACACTGGTGCTGGCCATTATTGTCTTCATCTTTGCCGTGGTGGGCATGCAGCTATTTGGGAAGAGCTACAAGGACTGCGTGTGCAAGATTGCGCTGGACTGCGAGCTTCCCCGCTGGCACATGACGGACTTCTTCCACTCCTTCCTGATCGTGTTCCGCATCCTATGCGGCGA [...]
+PinniNa6  CCCATGAGTGAAACGTTTGATTACGTCCTCAGCACAGGGAACCTGGTGTTTACCATCATCTTTGCAGCTGAAATGGTCTTGAAGCTCATTGCCATGGACCCCTACTACTACTTCCAGCAGACGTGGAACATCTTTGACTTTTTCATTGTCTCACTCAGTCTGGTGGAGATGGGACTGGCTAACATGCAGGGGCTGTCAGTGCTTAGGTCCTTTCGACTGCTGCGTATCTTTAAGTTGGCCAAGTCCTGGCCCACGCTCAATATTCTGATCAAGATCATCTGCAACTCGGTGGGCGCCCTGGGAAACCTGACCATCGTGCTGGCCATTATCGTCTTCATCTTCGCCTTGGTGGGCATGCAGCTGTTCGGGAAGAATTACAAAGAGTTTGTGTGCAAGATCAGTGCAGACTGTACGCTGCCTCGCTGGCATATGAATGACTTCTTCCATTCCTTCCTGATTGTGTTCCGCTGCCTGTGCGGCGA [...]
+tetra     CCCATGACCCAGGAGTTCGACTACATGCTTTCAGTGGGAAATCTGGTTTTCACAGGAATTTTTGCAGCAGAAATGTTCTTCAAGCTGATCGCCATGGATCCGTACTACTATTTCCAAGTTGGCTGGAACATTTTTGACAGCATCATTGTCACCCTCAGCCTGGTAGAGTTGGGGCTTGCGAACGTCCAGGGCCTGTCTGTCCTCAGGTCCTTCCGCCTGCTCCGTGTCTTCAAACTTGCCAAATCCTGGCCCACACTCAACATGCTGATCAAGATTATTGGGAGCTCAGTTGGAGCGCTAGGGAATCTGACGTTGGTGCTGGCCATCATCGTCTTCATCTTCGCTGTGGTGGGGATGCAGCTCTTTGGCAAAAGCTACAAGGACTGCGTGTGCAAGATTTCCACGGAGTGCGAGCTGCCGCGCTGGCACATGAATGACTTCTTCCACTCCTTCCTCATCGTCTTCCGCATCCTGTGTGGCGA [...]
+;
+end;
+
+begin sets;
+charset 1st = 1-2178\3;
+charset 2nd = 2-2178\3;
+charset 3rd = 3-2178\3;
+
+charpartition byPos = 1stpos:1st, 2ndpos:2nd, 3rdpos:3rd;
+end;
diff --git a/example/partition/exampleRuns/dna+Mkv/dnaPlusGapCoding.nex b/example/partition/exampleRuns/dna+Mkv/dnaPlusGapCoding.nex
new file mode 100644
index 0000000..f25c501
--- /dev/null
+++ b/example/partition/exampleRuns/dna+Mkv/dnaPlusGapCoding.nex
@@ -0,0 +1,2873 @@
+#NEXUS
+BEGIN TAXA;
+    TITLE Untitled_TAXA_Block_1;
+    DIMENSIONS NTax = 64;
+    TAXLABELS temporariaDMH84R1 boyliiMVZ148929 luteiventris_MT_MVZ191016 luteiventris_WA_MVZ225749 muscosaMVZ149006 auroraMVZ13957 cascadaeMVZ148946 sylvaticaMVZ137426 sylvaticaDMH84R43 septentrionalesDCC3588 grylioMVZ175945 okaloosae clamitansJSF1118 heckscheriMVZ164908 catesbianaX12841 catesbianaDMH84R2 virgatipesMVZ175944 maculataKU195258 vibicariaMVZ11035 warszewitshiiJSF1127 palmipesVenAMNHA118801 palmipesEcuKU204425 Sp_1_ecuadorQCAZ13219 bwanaQCAZ13964 vaillantiKU195299 julianiTNH [...]
+END;
+BEGIN CHARACTERS;
+    TITLE Untitled_DATA_Block_1GapsAsMissing;
+    LINK TAXA = Untitled_TAXA_Block_1;
+    DIMENSIONS NChar=3211;
+    FORMAT Datatype=DNA;
+Matrix
+temporariaDMH84R1             ACA?CTTGT?A??AGTG?GC?T????????GACCTGTAG??TT???T?TT?AACAAACTA????GCG??????????GGTG?ACAAACAT??GGT?TTTAATCT??TG?TGTT?GA??TT???TT?A???????T?AC???????C?AA?????????CCAACT?ACAA??CCAGTAACGAC????G??CCCGAATATG??C?TA?AT?TAT?AT??CGG???AT?ACT?????????T??ACACTGTCGTTG?CTATCGTTAT???CTTGGTTGTA?TCT??????????A?CGATATA?ATGGAAT?CTGAGAT???AC????CTCC???TCAACTCGC??CT????????CTCTAAAT?????TG?T??C?AATG??TAGATACTA???????ATAAAACTTTC??C????????GCCATTAC??T??????????AAAAATTGACAGTA??TACA?AC [...]
+boyliiMVZ148929               ACT?CCCGC?A??AGTG?GC?T????????GACCTGTAG??T?????????AACCAACTA????GTG???????????GTG?ACAAACCC??GGT?TTTAATCT??CG?TAAT?GA??TTGA?TT?A???????C?AC???????G?AA?????????CCCATT?ACAG??CCAGTAACGAC????G??CTCGAATATA??C?TA?GT?TAT?AT??CGG???ATAACC?????????AG?ACACCG??GCTG?ATAGC????????TTTAGTTGTA?TCT??????????A?CGGTATACATGGAA??CTGAGG????AC????CTCC???TTTACTCGC??CT????????CTTTAAAT?????TG?T??C?AATG??TTGATACTA???????CTGATATTTTC??C????????GCCATTAC??A???????????AAAGTTGACAAAA??CACA?AC [...]
+luteiventris_MT_MVZ191016     ACC?CTCGT?A??AGTG?GC?T????????GACCTGTAG??T?????????AACAAACTA????GTG??????????GGTG?ACAAACCT??GGT?TTTGACCT??CG?TATT?GA??TTGA?TT?A???????C?AC???????T?AA?????????CCAATT?ACAA??CCCGTAACGAC????G??CTTGAATA?A??A?TA?AT?TAT?AT??CGG???ACAACC?????????AG?ACATCGTCGCTG?TCATC????????TTTAGTTGCA?T?T???????????????TATA?ATGGAAT?CTGAGGT???AC????CTCC???TTCACTCGC??CT????????CTCTAAAT?????TG?T??T?AATG??TTGATACTA???????ATGAGGCTTTC??C????????GCCATTAC??A??????????AGAAGTTGACAAAA??TACA?AC [...]
+luteiventris_WA_MVZ225749     ACC?CTCGT?A??AGTG?GC?T????????GACCTGTAG??T?????????AACAAACTA????GTG??????????GGTG?ACAAACCT??GGT?TTTGACCT??CG?TATT?GA??TTGA?TT?A???????C?AC???????T?AA?????????CCAATT?ACAA??CCCGTAACGAC????G??CTTGAATA?A??T?TA?AT?TAT?AT??CGG???ACAACC?????????AG?ACATCGTCGCTG?TTATC????????TTTAGTTGCA?T?T???????????????TATA?ATGGAAT?CTGAGGT???AC????CTCC???TTCACTCGC??CT????????CTCTAAAT?????TG?T??T?AATG??TTGATACTA???????ATGAGGCTTTC??C????????GCCATTAC??A??????????AGAAGTTGACAAAA??TACA?AC [...]
+muscosaMVZ149006              ACT?CCCGT?A??AGTG?GC?T????????GACCTGTAG??TT???T?TT?AACAAACTA????GTG??????????GGTG?ACAAACCT??GGC?TTTGACCT??CG?TCTT?GA??TTGA?TT?A???????C?AC??????????A?????????CCAATT?ACAA??TCCGTAACGAC????A??CTCGAATATA??C?TA?AT?TAT?AT??CGG???ATAACC?????????AG?ACACCGTCGCTG?TTATC????????TTTAGTTGTA?TCT??????????A?CGGTATA?ATGGAAT?CTGAGGT???AC????CTCC???TATACTCGC??CT????????CTTTAAAT?????TG?T??T?TATG??TAGATACTA???????CTAAAACTTTC??C????????GCCATTAC??A??????????AGAAGTTGACACAA????CG?AC [...]
+auroraMVZ13957                ?TC?CCCAT?A??AGTG?GC?T????????GACCTGTAG??TT???T?TT?AACAAACTA????GTG??????????GGTG?ACAAACTC??GGC?TTTTACCT??TG?TCAT?GA??TCGA?TT?A???????C?AT???????A?AA?????????CCAATT?ACAA??CCCGTAACGAC????A??CTCGTGTATA??T?TA?AT?TAT?AT??CGG???ATAACC?????????AG?ACACTGTCGCTG?TTATC????????TTTAGTTGTA?TCT??????????A?CGGTATA?ATGGAAT?CTGAGAT???AC????CACC???TTTACTCGC??CT????????TTCTAAAT?????TG?T??T?AATA??TTGATACTA???????ATAAAACTTTC??C????????GCCATTAC??A??????????AGAAGTTGACAAAA????CA?AC [...]
+cascadaeMVZ148946             ATC?CCCAC?A??AGTG?GC?T????????GACCTGTAG??TT???T?TT?AACGAACTA????GTG??????????GGTG?ACAAACTT??GGC?TTTAATCT??TG?TCAT?CA??TCGA?TT?A???????T?AT???????A?AA?????????CCCATT?ACAA??CCCGTAACGAC????A??CTCGAGTATA??T?TA?AT?TAT?AT??CGG???ATAACC?????????GG?ACACCGACGCTG?TCACC????????TTTTGTTGTA?TCT??????????A?CGATATA?ATGGAAT?CTGAGAT???AC????CTCC???T????TCGC??CT????????CTCTAAAT?????TG?T??C?TATA??TTGATACTA???????TTAAAACTTTC??C????????GCCATTAC??A??????????AGAAATTGACAAAA????CG?AC [...]
+sylvaticaMVZ137426            ACC?CCTGT?A??AGTG?GC?T????????GTCCTGTTG??TT???T?TT?AACTAA??A????GTG??????????GGTG?ACA????????GT?TTTGACCT???????????????TGA?TT?A???????C?AC???????A?AA?????????CCGATT?ACAA??CCCGTAATGTC????A????????TATA??C?TA??T?TAT?AT??CAG???ACAACCTTCAT??A?AG?ACAAAGTCGCTG?TTAAC????????CATAGTTGTTCTCT??????????A?CGCTATA?ATGGAAT?CTGAGGT???AC????CTCC???TCTACTCGC??CT????????CCCTAAAT?????TG?T??T?AATG??TAGATACTA???????ATGAAACTTTC??C????????GCCTTTAC??A??????????ACAAGTTGACACAA??TACG??C [...]
+sylvaticaDMH84R43             ACC?CCTGT?A??AGTG?GC?T????????GTCCTGTTG??TT???T?TT?AACTAA??A????GTG??????????GGTG?ACA????????GT?TTTGACCT???????????????TGA?TT?A???????C?AC???????A?AA?????????CCGATT?ACAA??CCCGTAATGTC????A????????TATA??C?TA??T?TAT?AT??CAG???ACGACCTTCAT??A?AG?ACAATGTCGCTG?TTAAC????????CATAGTTGTTCTCT??????????A?CGCTATA?ATGGAAT?CTGAGAT???AC????CTCC???TCTGCTCGC??CT????????CCCTAAAT?????TG?T??T?AATG??TAGATACTA???????ATGAAACTTTC??C????????GCCTTTAC??A??????????ACAAGTTGACACAA??TACG??C [...]
+septentrionalesDCC3588        ACTTCTC???AT?AGTG?GC?T????????GTCCTGTCG??TT???T?TT?AAGTAACTG????GTG??????????GGTG?ACA????????GT?TTTAATTT??TAGTATCAAAAGTTGA?TT?A???????C?AC???????C?AA?????????CCTATT?ATAG??CCCGTAATGAC????A????????TATA??T?TA?GT?TAT?????CAG???ATGACCTTCAC??A?CC?ACCGTGTCGCTG?CCATT????????TCTAGTTGTA?TCT??????????A?CGTTATA?ATGGAAT?CTGAGAT???AC????CTCC???TTTACTCGC??CT????????TTTTAAAT?????TG?T??T?GATG??TGGATACCA???????ATGAAACTTTC??C????????GCCATTAC??A??????????AAAAATTGACAGAA??CACA??C [...]
+grylioMVZ175945               ACTCCTC???AT?AGTG?AC?T????????GTCCTTTTG??TT???T?CT?AAGTAACTG????GTG??????????GGTG?ACA????????GT?TTTAACTT??TAGTATCACA??TTGA?CT?A???????C?AC???????A?AA?????????CCAATT?GCAA??CCCGTAATGACT???A????????TATA??C?TA?TT?TAT?????CAG???ATGACCTTCAT??A?CA?ACTGTGTCGTTG?CTAAC????????CTTAGTTGTC?TCT??????????A?CGCTATA?ATGGAAT?CTGAGAT???AC????CTCC???TTTACTCGC??CT????????ACTTAAAT?????TG?T??T?GATG??TCGATACCA???????ATGATACTTTC??T????????GCCATTAC??A??????????AAAAATTGTCAGGA??CACA??C [...]
+okaloosae                     ACTTCTT???AT?AGTG?GC?T????????GTCCTGTTG??CT???T?TT?AAGTAGCTA????ATG??????????GGTG?ACA????????GT?TTTAATTT??CAGTATCAAA??TTGA?TT?A???????C?AC???????A?AA?????????CCAATT?ACAA??CCCGTAATGAC????A????????TATA??C?TA?AT?TAT?????CAG???ATGACCTTCTT??A?TA?ACCGAGTCGCTG?CTAAC????????TATAGTTGCA?TCT??????????A?CGCTATA?ATGGAAT?CTGAGAT???AC????CTCC???TTTTCTCGC??CT????????AATTAAAT?????T?????C?GATG??TAGATACCA???????ATGAAACTTTC??C????????GCCGTTAC??A??????????ACAAATTGTCAGTA??CACA??C [...]
+clamitansJSF1118              ACTTCTC???AT?AGTG?GC?T????????GTCCTGTTG??TT???T?TT?AAGTAGCTG????ATG??????????GGTG?ACA????????GT?TTTAATTT??TAGTATCAAA??TTGA?TT?A???????C?AC???????A?AA?????????CCAATT?ACAA??CCTGTAATGAC????A????????TATA??C?TA?AT?TAT?????CAG???ATGACCTTCAT??A?TA?ACCGAGTCGCTG?CTAAC????????TATAGTTGCA?TCT??????????A?CGCTATA?ATGGAAT?CTGAGAT???AC????CTCC???TTTTCTCGC??CT????????AATTAAAT?????T?????T?GATG??TTGATACCA???????TTGAAACTTTC??C????????GCCGTTAC??A??????????ATAAATTGTCAGTA??CACA??C [...]
+heckscheriMVZ164908           ACTTCTC???AT?AGTG?GC?T????????GTCCTGTTG??TT???T?CT?AAGCAGCTG????GTT??????????GGTG?ACA????????GC?TTTAATTT??TAGTGTCAAA??TTGA?TT?A???????C?AC???????A?AA?????????CCAATT?ACAA??CCCGTAATGAC????A????????TATA??C?TA?AT?TAT?????CAG???ATGACCTTCAT??A?TA?ACCGGGTCGCTG?CCAAC????????TAGAGTTGCA?TCT??????????A?CGCTATA?ATGGAAT?C??AGAT???AC????CTCC???TCTGCTCGC??CT????????AATTAAAT?????T?????A?GATG??TAGATACCA???????GTAATACTTTC??T????????GCCGTTAC??A??????????ACAAATTGCCAATA??CACA??C [...]
+catesbianaX12841              ACTTCTC???AT?AGTG?GC?T????????GTCCTGTTG??TT???T?TT?AAGG?ACTG????GTG??????????GGTG?ACA????????GT?TTTAATTT??CAGTATCAAA??TTGA?TT?A???????C?AC???????A?AA?????????CCAATT?ACAA??CCCGTAACGAC????T????????TATA??A?TA?GT?TAT?????CAG???ATGACCTTCAT??A?TA?ACCAGGTCGCTG?CCAAC????????TACAGTTGTG?TCT??????????A?CGTTATA?ATGGAAT?CTGAGAT???AC????CTCC???TTTGCTCGC??CT????????AATTAAAT?????T?????C?GATG??TTGATACCA???????ATGATACTTTC??C????????GCCGTTAC??A??????????ATAAGTTGTCAATA??CACA??C [...]
+catesbianaDMH84R2             ACTTCTC???AT?AGTG?GC?T????????GTCCTGTTG??TT???T?TT?AAGG?ACTG????GTG??????????GGTG?ACA????????GT?TTTAATTT??CAGTATCAAA??TTGA?TT?A???????C?AC???????A?AA?????????CCAATT?ACAA??CCCGTAACGAC????T????????TATA??A?TA?GT?TAT?????CAG???ATGACCTTCAT??A?TA?ACCAGGTCGCTG?CCAAC????????TACAGTTGTG?TCT??????????A?CGTTATA?ATGGAAT?CTGAGAT???AC????CTCC???TTTGCTCGC??CT????????AACTAAAT?????T?????C?GATG??TTGATACCA???????ATGATACTTTC??C????????GCCGTTAC??A??????????ATAAGTTGTCAATA??CACA??C [...]
+virgatipesMVZ175944           ACCTCTTAT?AT?AGTG?GC?T????????GTCCTG?CG??TT???T?TT?GAGTAACTG????GTG??????????AGTG?ACA????????GC?TTTAATTT??CAGTAACAAA??TTGA?TT?A???????C?AC???????A?AA?????????CCAATT?ACAA??CCCGTAAAGAC????A????????TATA??C?TAAAT?TAT?????CAA???ATGACCTTCAT??A?AA?ACCAAGTCGCTG?CT??????????????AGTTGTG?TCT??????????A?CGCTATA?ATGGAAT?CTGAGGT???AC????CTCC???TTCACTCGC??CT????????ACTTAAAT?????TG?T??G?GATG??TAGATACCA???????ATTAAATTTTC??C????????GCCGTTAC??C??????????ATAAGTTGGCAGAA??CACA??C [...]
+maculataKU195258              ACC?CCCGT?A??AGTG?GC?T????????GTCCTGTCG??TT???T?CT?AACTAACTA????GTA???TA?AC??GGTG?ACAATCTT??GGT?TTT??CCT??TA?TATT?TA??TTAA?TT?A???????C?AC???????G?AA?????????CCAATT?ACAA??TCCGTAATGAC????AA???????TGTATAC?TA?AT???T?AT??CAT???ATGACTTTCAT??A?AG?ACATAGACGTTG?CCAAC????????TTTAGTTGTC?TCC??????????A?CGATTTA?ATGGAAT?CTGAGGTAT?AC????CTCC???TTTACTCGC??CT????????CCGTAAA??????TG?T??T?CATT??TCGATACTA???????ATGAAATTTTC??C????????GCCCTTAC??A??????????A??AGTTGGCACAAA?CACA??C [...]
+vibicariaMVZ11035             ACT?C?????????????GC?T????????GACCTGTGG??TT???T?TT?CATT????A????ATG???TA?GC??GGTG?ACAACCAA??GGT?TTT??TCTGACCGTAGC?CA??TTGA?TT?A???????CGAT???????G?GA?????????CCAA?????????????TAACGAC????G?T??????TATA??T?TA?TT???T?AT??CAG???ATAACCCTCAT??ACGT?ACAAAGGCGCTG?CTATC????????TTC?GTTGGT?TCT??????????A?CGTTCTA?ATGGAAT?CT?????????C????CTCC???TTCC?TCGC??CT????????CTCTAAA??????TG?T??T?CATG??TAGATACTA???????CTGAAACTTTC??C????????GCCATTAC??ATTTTTTAC??A??AGTTGACAAAA??CACCT?C [...]
+warszewitshiiJSF1127          ACA?CCTGT????AGTG?GC?T????????GT?CTGTGG??TT???T?CT?CAAA???TA????ATG???TA?G????GTG?AC?ATCGC??GGC?TTT??CCT??CAGCAAC?TA??TTAA?GT?A???????C?AC???????T?AA?????????TC???????????????????GAC????G?A??????CATA??T?TA?CT???T?AG??CAA???ATAAACCTCAC??ACGC?ACAAAGACGCTG?ACAAC?????GTCTTC?????TC?TCT??????????A?C?GTCTA?ATGGAAT?CTGA????????ACAGCTCC???TTT??????????????????CTGTAAA??????TG?T??T?CATG??TGGATACTACATTTCCCTAAACT?TTC??C????????GCCATTA???A??????????A??AGTTGACAAAA??CACA??C [...]
+palmipesVenAMNHA118801        TCT?CCCGG?A??AGTG?GC?T????????GCCCTATCG??TT???T?AT?AATAACCTA????GTGAGATAAAA??GGTG?ACAATCTT??GGC?TTTGATCT??TAGTGTT?TA??TTAG?TT?A???????C?AC???????T?AA?????????CCTATT?GCAA??CCTGTAACGAC????A????????CATA??G?TA?AT???T?AT??CAA???AATACCTTCAT??A?CT?ACAGGGACGTTG?TAATC????????TGGAGTTGTT?TCT??????????A?CG?TTTA?ATGGAAG?CTGAAAT???AC????CTCC????CTACTCGC???T????????CAATACAT?????TG?T??A?C??????CGATACTA???????TTAAAAATTTC??T????????GCCTTTAC???????????????????TGCCAAAA??CACA??C [...]
+palmipesEcuKU204425           ACT?CCCGG?A??AGCG?GC?T????????GCCCTGTTG??TT???T?TT?AATTACCTA????GTGAGTTACAT??GGTG?ACAATCCA??GGC?TTTGATCT??CAGTACT?TA??TTAG?TT?A???????C?AT???????A?AA?????????CCAATT?ACAA??CCCGTAACGAC????A????????TATA??G?TA?GT???T?AT??CAG???ATTAACTTCAT??A?AT?ACAGAGACGTTG?TTAAC????????TGGAGTTGTC?TCC??????????A?CG?TGTA?ATGGAAA?CTGAGCT???AC????CTCC????CTACTCGC??CT????????CCATACAT?????TG?T??C?C??????TGATACTA???????CTAAAAATTTC??T????????GCCATTAC??A??????????A??AGTTGACAAAA??CACA??C [...]
+Sp_1_ecuadorQCAZ13219         ACT?CTTGA?A??AGCG?GC?T????????GCCCTGTCG??TT???T?TT?AATAACCTA????GTG???TACAC??GGTG?ACAATCTA??GGT?TTTAATCT??TAGTACT?TA??TTAG?TT?A???????C?AT???????G?AA?????????CCAATT?ACAA??CCTGTAACGAC????A????????TATA??G?TA?CT???T?ATTTCAA???ATTACCTTCGT??A?AC?ACAAAGACGTTG?TAATC????????TAGAGTTGTT?TCC??????????A?CG?TGTA?ATGGAAT?CTGAGAT???AC????CTCC????CTACTCGC??CT????????TCATACAT?????TG?T??C?C??????CGATACTA???????CTAAAACTTTC??T????????GCCATTAC??A??????????A??AGTTGACAAAA??CACT??C [...]
+bwanaQCAZ13964                ACT?CCCGC?A??AGTG?GC?T????????GCCCTGTTG??TT???T?TT?AACTATCTA????GTG???TACAT??GGTG?ACA???????GGT?TTTGATCT??TAGTATC?TA??TTAG?TT?A???????C?AT???????A?AA?????????ACAATT?ACAA??CC??TAATGAC????T????????TATA??GCTA?AT???T?AT??CAG???ATAAACTACAT??A?AC?ACAAGGACGTTG?TGAAC????????TTGAGTTGTC?TCC??????????A?CG?TGTA?ATGGAAT?CTGAGAT???AC????CTCC????CCACTCGC??CT????????CTATACAT?????TG?T??C?C??????TGA???TA???????ATAA?ATTTTC??C????????GCCATTAC??A??????????A??AGTTGACAAAA??CACA??C [...]
+vaillantiKU195299             ????????C?A??AGTG?GC?T????????GCCCT?T?G??TT???T?TT?CACCACCTA????GTG???TA?AC??GGTG?GCAATCCA??GGC?TTTGATCT??TAGTTGC?T????TAG?CT?A???????C?AT???????ATAA?????????CCGATT?ACAA??CCCGTAACGAC????A????????AATA??G?TA?TT???T?AT??CAG???ATAACTTTCAT??A?AT?ACATAGACGTTG?TAACC????????CGTAGTTGTC?TC???????????A?CGCTGTA?ATGGAAT?CTGAGAT???AC????CTCC????TTACTCGC??CT????????CTATACAT?????TG?T??C?C??????CGATACTA???????TTAAAATTTTC???????????GCCATTAC??A??????????A??AGTTGACATAA??TACA??C [...]
+julianiTNHC60324              ????????T?A??AGTG?GC?T????????GCCCT?TCG??TT???T?AT?AATAACCTA????GTG???TA?AT??GGTG?ACAATCCA??GGC?TTTGATCT??TAGTCCC?A????TAG?TT?C???????C?AT???????G?AA?????????CCAATT???????CCCGTAACGGC????A????????TATA??G?TA?ATG??T?AT??C??????TAACCTTCGT??A?AC?ACAAA?GCGTTG????CC????????CTTAGTTGAT?TC???????????A?CGTTGTA?ATGGAAT?CTGAAAT???AC????CTCC????CTACTCGCAACT????????TAATACAT?????TG?T??C?C??????AGATACTA???????TTAATACTTTC??C????????GCCATTAC??A??????????A??AATTGACAAAA??CACC??C [...]
+sierramadrensisKU195181       ACA?CCAGT?A??AGTG?GC?T????????GTCCTGTCG??CT???T?CT?AACCAACTA????GCG??????????GGTG?TCAAACGT??GG??TTTGAACT??CAGCATC?AA??TTGATTT?A???????C?AT???????A?AA?????????TCGATT?ACAA??ACTGTAATGAC????C????????TATA??T?TA?TT???T?AT??CAG???ATAACCTTCAT??A?AG????ATGGCGATG?TGGGC????????TCTAGTTGTT?TCA??????????A?CGTTCTA?ATGGAAT?CTGAGTT???AC????CTCC???TCTGCTCGC??CT????????CCATAAAT?????AG?T??A?AATG??TAGATACTA???????ATAAAACTTTC??C????????GCCATTAC??A??????????A??AATTGACAAAA??CACG??C [...]
+psilonotaKU195119             ACC?CA??C??????CG?GC?T???????????CTGTAG??TT???TTTT?AACTACCTAA?TCGCG??????????GGTG?GCAATCCC???GT?TTTCA?CT??CAGCATC?CA??T?????TTAAC?????T?ATCCTCTT?T?AA?????????TCAATT?AT????CCTGTAACGAC?CCCG????????TATA??C?TA?AT???T?AT??CCG???ATGACTTTCAT??A?AG????TA??CGTTG?TAGAC????????TATAGTTGTA?TCC?????????????GCTTTA?ATGGAAT?CTGAACT???AC????CTCC???TCTACTCGC??CT????????CCCTAAAT?????TG?T??C?AATG??TCGATACCA???????TTAAAAATTT???T????????GCCCTTAC??A??????????A??AGTTGCCATAA??CACG??C [...]
+zweifeliJAC7514               ????CACGT?A??AGTG?GC?T????????GTCCTGTCG??TT???T?TT?AACCAACTAATGCGCG??????????GGTG?TCAATCCC??GGT?TTTGATCT??AAGCATC?CA??T?????T?AAA?????C?AT???????C?AA?????????TCAATT?AT????CCTGTAATGAC?CCCG????????TATA??C?TA?AT???T?AT??CAA???ATAACGTTCAT??A?AA????CGGACGTTG?TTGAC????????TTTAGTTGTT?TCC??????????A?CGCTTTA?A?GGAAT?CTGAAGT???AC????CTCC???TATACTCGC???T????????CCGTAAAT?????TG?T??C?AATA??TAGATACTA???????GTAAAATTTT???T????????GCCATTAC??A????????TAA??ACTTGTCATAA??CACA??C [...]
+tarahumaraeKU194596           A?C?CCC???A??AGTG?GC?T????????GTCCTGTTG??TTTTGT?CT?GACCAACTAATGTGCG??????????GGTG?ACAATCTT??GGC?TTTGATCT??CAGTGTC?AA??TTGA?CT?AAC?????C?AT???????C?AA?????????TCTATT?AT????CCTGTAAAGAC?CCCG????????TATA??C?TA?AT???T?AT??CAG???ACAACCTTCAT??A?AAG???TGGACGTTG?TTGAC????????TCCAGTTGTT?TCC??????????A?CGC?CTA?ATGGAAC?CTGACAT??TAC????CTCC???TTTACTCGC??CT????????CCTTAAAT?????TG?T??T?AATA??TAGATACCA???????GTAAAATTTTC??T????????GCCATTAC??G??????????A??AGTTGACAAAA??CACA??C [...]
+pustulosaJAC10555             AAT?CCCGA?A??AGTGTGC?T????????GTCCTGTAG??TTTTGT?CT?GACTACCTATTGTGCG??????????GGTG?ACAATCCC??GGC?TTTAACCT??GCGCAAC?AA??T?????T?CAT?????C?AT???????C?AA?????????TCAATT?AT????TCTGTAATGAC?CCCG????????TGTA??A?TA?AT???T?AT??CAA???ACAACGTTCGT??A?AA????TTGACGTTG?TAGTC????????TTCAGTTGAA?TCC??????????A?CGT?CTA?ATGGAAT?CTGAAAT???AC????CTCC???TTTCCTCGC??CT????????ACTCAAAT?????TG?T??C?AATA??TAGATACTA???????A??AAAATTTC??T????????GCCATTAC??A??????????A??AATTGACAAA?????????? [...]
+pipiensJSF1119                ACC?CCCGC?A??AGCG?GC?T????????GTCCTGTTG??CT???T?TT?CATAAACTA????GTG??????????GGTG?ACAAACTC??GGTTTTTAATCT??GGGTACC?TA??TTAG?AT?A???????C?AA???????G?TA?????????CCAATT?ACAAAACCTGTAATGCC????T????????GATA??C?TA?TT???T?AT??CAG???ATAACCTT??T??A?TT????TAGACGTTG?TTATC????????TACAGTTGCA???CCCTGTCCTACA?CGATCTA?ATGGAAC?CTGAGCT????C????CTCCCTATTCGCTCGC???C????????CTTTAAAT?????TG?T??A?AATG??TCGATACTA???????ATGAAAATTTC??T????????GCCATTAC??A??????????A??ATTTGACATAA?ACACT??? [...]
+pipiensY10945                 ACC?CCCGC?A??AGCG?GC?T????????GTCCTGTCG??CT???T?TT?CATAAACTA????GTG??????????GGTG?ACAAACTC??GGTTTTTAATCT??GGGTACC?TA??TTAG?AT?A???????C?AA???????G?TA?????????CCAATT?ACAAAACCTGTAATGCC????T????????GATA??C?TA?AT???T?AT??CAG???ATAACCTT??TACA?TT????TAGACGTTG?TTATC????????TACAGTTGCA???CCCTGTCCTACA?CGATCTA?ATGGAAC?CTGAGCT????C????CTCCCTATTCACTCGC???C????????CTTTAAAT?????TG?T??A?AATG??TCGATACT????????????GAATTTC??T????????GCCATTAC??A??????????A??ATTTGACATAA?ACACC??? [...]
+dunniJSF1017                  ACC?CCCGT?A??AGCG????T????????GTCCTGTTG??TT???T?TT?CACAAACTA????GTG??????????GGTG?GCAAACTT??GGTCTTTAATCT??TGGTACC?TA??TTAG?AT?A???????T?AA???????G?TA?????????TCAATT?ACAAAACCTGTAATGTC????C????????TATA??T?TA?AT?????AT??CAG???ATAACCTT??T??A?AT????TCGACGTTG?TT??????????????AGTTGCA???C??????????A?CGATCTA?ATGGAAC?CTGAGCT????C????CTCCCTATTTACTCGC???T????????CTTTAAAT?????TG?T??C?AATG??TCGATACTA???????ATCAAACTTTC??G????????GCCATTAC?????????????A??ACTTGACATAA??CACC??? [...]
+montezumaeJAC8836             ACC?CCAGT?A??AGCG????T????????GTCCTGTCG??TT???T?CT?CACCAACTA????GTG??????????GGTG?GCAAACTT??GGTCTTTAATCT??TGGTACC?TA??TTAG?AT?A???????T?AA???????G?TA?????????CCGATT?ATAAGACCTGTAATGCC????T????????TATA??T?TA?GT?????AT??AAG???ATAACCTT??T??A?AT????TCGACGTTG?TT??????????????AGT???A???C??????????A?CGATTTA?ATGGAAC?CTGAGCT????C????CTCCCTATATACTCGC???T????????CGTTAAAT?????TG?T??T?AATG??TCGATACTA???????TTCAAATTTTC??G????????GCCATTAC?????????????A??ATTTGACATAA??CACC??? [...]
+sp_2_mex_JSF1106              ACC?CTCGT?A??AGCG????T????????GTCCTGTTG??TT???T?TT?CATAAACTA????GTG??????????GGTG?GCAAACTT??GGTCTTTAACCT??CGGTACC?TA??TTAG?AT?A???????T?AA???????G?TA?????????CCAATT?ATAAGACCTGTAATGCC????T????????TATA??C?TA?GT???T?AT??CAG???ATAACCTT??T??A?AT????CCGACGCTG?TT??????????????AGTTGCA???C??????????A?CGATTTA?ATGGAAC?CTGAGTT????C????CTCCCTATTTACTCGC???C????????ACTTAAATGCATCTG?T??G?AATG??TCGATACTA???????ATCAAGTTTTC??C????????GCCATTACCT???????????A??ACTTGACATAA??CACT??? [...]
+chiricahuensisJSF1063         ACT?CTTGT?A??AGCG????T????????GTCCTGTTG??TT???T?CT?CAAAAACTA????GTG??????????GGTG?CCAAACCT??GGTCTTTAATCT??TGGTACC?TA??TTAG?AT?A???????T?AA???????G?TA?????????CCAATT?ATAAGACCTGTAATGCC????A????????TATA??C?TA?GT???T?AT??CAG???ATTACCTT??T??A?AT????CAGACGTTG?TT??????????????AGTTGTT???C??????????A?CGATTTA?ATGGAAC?CTGAGTT????C????CTCCCTATTTACTCGC???T????????CTTTAAAT?????TG?T??T?A?????TCGATACTA???????GTCAGATTTTC??C????????GCCATTAC?????????????A??ACTTGACATAA??CACT??? [...]
+subaquavocalis                ACC?CCAGT?A?AAGCG????T????????GCCCTGTTG??TT???T?CT?AATAAACTA????GTG??????????GGTG?GCAAACCT??GGTCTTTAACCT??CGGTACC?CA??TTAG?AT?A???????T?AA???????G?TA?????????CCGATT?ATAAGACCTGTAATGCC????A????????TATA??C?TA?GT???T?AT??CAG???ATAACCTT??T??A?AT????TAGACGTTG?TT??????????????AGTTGCG???C??????????A?CGATTTA?ATGGAAC?CTGAGTT????C????CTCCCTATTTACTCGC???T????????CCTTAAAT?????TG?T??G?AATG??TTGATACTA???????ATCAAATTTTC??C????????GCCATTAC?????????????A??ACTTGACATAA??CACC??? [...]
+chiricahuensisJSF1092         ACC?CCCGT?A??AGCG????T????????GTCCTGTTG??TT???T?T??AATAAACTA????GTG??????????GGTG?GCAAACTT??GGTCTTTAACCT??CGGTACC?AA??TTAG?AT?A???????T?AA???????G?TA?????????CCCATT?ATAAGACCTGTAATGCC????T????????TATA??C?TA?GT???T?AT??CAG???ATAACCTT??T??A?AT????TAGACGTTG?TT??????????????AGTTGCG???C??????????A?CGATTTA?ATGGAAC?CTGAGTT????C????CTCCCTATTTTCTCGC???T????????CCTTAAAT?????TG?T??G?AATG??TTGATACTA???????ACCAAATTTTC??C????????GCCATTAC?????????????A??ACTTGACATAA??CACC??? [...]
+palustrisJSF1110              ACT?CTCGC?A??AGCG?GC?T????????GTCCTGTAG??TT???T?TT?AATTAACTA????GTG??????????GGTG?GCAAACTT??GGCCTTTAAACT??AGGTATT?CA??TTAA?AT?A???????C?AC???????A?TA?????????CCGATT?ACAAAATCTGTAATGGC????T????????AATA??C?TA?AT???A?AT??CAG???ATGACCTT??T??A?CC????GGGACGATG?TCACC????????TTTAGTTGCA?TCC??????????A?CGGTTTA?ATGGAAC?CTGAGCT????C????CTCC???TTCACTCGC???TA???ATTACCTTAACT?????TG?T??A?AATGTGTAGATACTA???????ATGAAGCTTTC??C????????GCCATTAC??A??????????A??ATTTGTCACAA??CACT??? [...]
+areolataJSF1111               ACT?CTCGC?A??AGCG?GC?T????????GTCCTGTAG??TT???T?TT?AATTACCTA????GTG??????????G?TG?GCAAACTCGCGGCCTTTCAACT??AGGCATG?CA??TTAA?AT?A???????C?AC???????G?TA?????????CCAATT?ATAAAGCCTGTAATGTC????T????????AATA??C?TA?TT???T?AT??CAG???ATAACTTT??C??A?AC????GGGACGCTG?TCATC????????TTTAGTTGCA?TCC??????????A?CGATTTA?ATGGAAC?CTGAGCT????C????CTCC???TTCACTCGC???TA???ATTACCCTAAAT?????TG?T??A?AATGTATAGATACTA???????ATGAAG?????????????????CCATTAC??A??????????A??ATTTGCCACAA??CACT??? [...]
+sevosaUSC8236                 ACT?CTTGT?A??AGCG?GC?T????????GTCCTGTAG??TT???T?TT?AACCAACTA????GTG??????????GGTG?TCAAACTT??GGTCTTTTAACT??GGGTATC?CA??TTAA?AT?A???????C?AT???????A?TA?????????CCGATT?ACAAAGTCTGTAATGCC????T????????AATA??C?TA?CT???T?AT??CAG???ATAACTTT??T??A?AC????GGGACGTTG?TAACC????????TCTAGTTGCA?TCC??????????A?CGATTTA?ATGGAAC?CTGAGTT????C????CTCC???TTCACTCGC???TA???ATTACCTTAAAT?????TG?T??A?AATGTATAGATACTA???????ATGAAG?????????????????CCATTAC??A??????????A??ATTTGTCACAA??CACT??? [...]
+capitoSLU003                  ACC?CTTGC?A??AGCG?GC?T????????GTCCTGTA???TT???T?TT?AACCAACTA????GTG??????????GGTG?TCAAACTT??GGCCTTTTAACT??AGGTATC?CA??TTAA?AT?A???????C?AT???????A?TA?????????CCGATT?ACAAAGTCTGTAATGCC????T????????AATA??C?TA?CT???T?AT??CAG???ATAACTTT??T??A?AC????AGGACGTTG?TTACC????????TTTAGTTGCA?TCC??????????A?CGATTTA?ATGGAAC?CTGAGTT????C????CTCC????TCACTCGC???TA???ATTACCCTAAAT?????TG?T??A?AATGTATAGATACTA???????ATGAAG?????????????????CCATTAC??A????????????????TGTCACAA??CACT??? [...]
+spectabilisJAC8622            ATT?CCCGC?A??AGCG?GC?T????????G?CCTGTCG??TT???T?GT?AACAAACTA????ATG??????????GGTG?GCAAACTT??GGCCTTTGATCT??AGGTACC?TA??TTAA?TT?A???????C?AC???????C?TA?????????CCCATT?ACAAAGCCTGTAATGCC????C????????AATA??T?TA?AT???T?AT??CAG???ACAACCTT??T??A?AT????TAGACGTTG?ATACC????????TATAGTTGTA?TCC??????????A?CGATTTA?ATGGAAC?CTGAATT????C????CTCC???TTCACTCGC???TA???ACTGCTTTAAAT?????TG?T??T?AATGTATAGATACTA???????CTGAAACTTTCAAC????????GCCATTAC??A??????????A??ATTTGCCATAA??CACT??? [...]
+omiltemanaJAC7413             ATC?CTCGC?A??AGCG?GC?T????????GTCCTGACG??TT???T?AT?CACGATCTA????GCG??????????GGTG?GCA???????GGACTTTGATCT??AGGTACT?CA??TTAA?AT?A???????C?AC???????A?TA?????????CCCATT?ACAAAGCCTGTAATGTC????T????????GATA??T?TA?AT???T?AT??CAG???ATAACTTT??T??A?AT????TTGACGTTG?ATATC????????TCAAGTTGTT?TCC??????????A?CGATCTA?ATGGAAC?CTGAATT????C????CTCC???TTCACTCGC???TAAAGGCTATTCTAAAT?????TG?T??A?AATGTATAGATACTA???????GTGAAACTTTCTAT????????GCCATTAC??A??????????A??AATTGTCACAA??CACT??? [...]
+sp_3_MichoacanJSF955          ACA?CTCGC?A??AGCG?GC?T????????GTCCTGTCG??TT???T?GT?GACAAACTA????GTG???????????GTG?GCAAACTT??GGCCTTTGATCT??AGGTACC?TA??TTAA?AT?A???????C?AC???????G?TA?????????CCCATT?ACAAAGCCTGTAACGAC????T????????AATA??T?TA?AT???T?AT??CAG???ATAACTTT??T??A?AC????TAGACGTTG?ATACC????????TTTAGTTGTA?TCC??????????A?CGA?TTA?ATGGAAC?CTGAATT????C????CTCC???TTCGCTCGC???TA???GTTACTTTAAAT?????TG?T??T?AATGTATAGATACTA???????ATGAAATTCTCTAC????????GCCATTAC??A??????????A??AGTTGTCATAA??CACT??? [...]
+tlalociJSF1083                ACT?CTCGC?A??AGCG?GC?T????????GTCCTGTCG??TT???T?TT?AACG?ACTA????GTG??????????GGTG?GCAAACAC??GGCTTTTAAGCT??AGGTACC?CA??TTAA?CT?A???????C?AT???????A?TA?????????CCCATT?ACAAAGCCTGTAATGCC????T????????AATA??T?TA?AT???T????????????TAACTTT??C??A?AT????TTGACGTTG?ACACC????????CCTAGTTGTT?TCC??????????A?CGATTTA?ATGGAAC?CTG?ATT????C????CTCC???TCCC???GC???TA???GCTTTTTTAAAT?????TG?T??T?AATGTATTGATACTA???????CTGAAACTTTCTAT????????GCCTTTAC??A??????????A??AATTGTCACAA??TACC??? [...]
+neovolcanicaJSF960            ACT?CTTGC?A??AGCG?GC?T????????GTCCTGTCG??TT???T?TT?GACG?ACTA????GTG??????????GGTG?GCAAACAC??GGCTTTTAAGCT??AGGTACC?CA??TTAA?CT?A???????C?AT???????A?TA?????????CCCATT?ACAAAGCCTGTAATGCC????T????????AATA??T?TA?AT???T?AT??CAG???ATAACTTT??C??A?AT????TTGACGTTG?ACACC????????CCTAGTTGTT?TCC??????????A?CGATTTA?ATGGAAC?CTG?ACT????C????CTCC???TCCC???GC???TA???GCTTTTTTAAAT?????TG?T??T?AATGTATAGATACTA???????TTGAAACTTTCTAT????????GCCTTTAC??A??????????A??AATTGTCACAA??TACC??? [...]
+berlandieriJSF1136            ACT?CTTGC?A??AGCG?GC?T????????GTCCTGTCG??TT???T?GT?AACA?ACTA????GTG??????????GGTG?GCAAACAC??GGCCTTTAAGCT??AGGTACC?CA??TTAA?CT?A???????C?AT???????A?TA?????????CCCATT?ACAAAACCTGTAATGCC????T????????AATA??T?TA?AT???T?AT??CAG???ATAACTTT??C??A?AT????TTGACGTTG?ACACC????????CCTAGTTGTT?TCC??????????A?CGATTTA?ATGGAAC?CTG?ATT????C????CTCC???TCGC???GC???TA???GCTTTTTTAAAT?????TG?T??T?AATGTATAGATACTA???????ATGAAACTTTCTAT????????GCCTTTAC??A??????????A??AATTGTCACAA??TACC??? [...]
+blairiJSF830                  ACT?CTTGC?A??AGCG?GC?T????????GTCCTGTCG??TT???T?GT?AACA?ACTA????GTG??????????GGTG?GCAAACAC??GGCCTTTAATCT??AGGTACC?CA??TTAA?CT?A??CGATAC?AT???????A?TA?????????CCCATT?ACAAAGCCTGTAATGCC????T????????AATA??T?TA?AT???T?AT??CAG???ATAACTTT??C??A?AT????TTGACGTTG?ACACC????????CCTAGTTGTT?TCC??????????A?CGATTTA?ATGGAAC?CTG?ATT????C????CTCC???TTCC???GC???TA???GTTTCTTTAAAT?????TG?T??T?A?TGTATAGATACTA???????ATGAAACTTTCTAC????????GCCTTTAC??T??????????A??AATTGACACAA??TACC??? [...]
+sphenocephalaUSC7448          ACT?CTCGT?A??AGCG?GC?T????????GTCCTGTTG??TT???T?GT?AACC?ACTA????GTG??????????GGTG?GCAAACTT??GGCTTTTGACCT??TAGTGCC?AA??TTAA?AT?A???????C?AC???????G?TA?????????CCTATT?ACAAAGCCTGTAATGCC????T????????AATA??T?TA?AT???T?AT??CAG???ATAACTTT??C??A?AC????ACGACGTTG?ACAAC????????TCTAGTTGCA?TCT??????????A?CGGTTTA?ATGGAAC?CTGAATT????C????CTCC???TCCGCTCGC???TA???ATTACTTTAAAT?????TG?T??T?AATGTATAGATACTA???????TTGAAATTTTCTAC????????GCCTTTAC??A??????????A??AATTGTCACAA??TACT??? [...]
+utriculariaJSF845             ACT?CTTGC?A??AGCG?GC?T????????GTCCTGTTG??TT???T?GT?AACC?ACTA????GTG??????????GGTG?GCAAACTC??GGCTTTTGAACT??AAGTATC?CA??TTAA?AT?A???????C?AC???????G?TA?????????CCCATT?ACAAAGCCTGTAATGCC????T????????AATA??T?TA?AT???T?AT??CAG???ATAACTTT??C??A?AT????TCGACGTTG?ATAAC????????TCTAGTTGTA?TCC??????????A?CGGTTTA?ATGGAAC?CTGAATT????C????CTCC???TCCACTCGC???TA???GTTACTTTAAAT?????TG?T??T?AATGTATAGATACTA???????ATGAAATTTTCTAC????????GCCTTTAC??A??????????A??AATTGTCACAA??TACT??? [...]
+forreriJSF1065                AC???ACAT?A??AGCG?GC?T????????GTCCTGTAG??TT???T?CT?AATGAACTA????GCG??????????GGTG?GCAAACCT??GGCCTTTGACCT??AGGTACC?TA??TTAA?AT?A???????C?AC???????A?TA?????????CCCACT?ACAAAACCTGTAACGTC????T????????AATA??C?TA?TT???T?AT??CAG???ATAACCTT??T??A?AC????TAGACGCTG?ATATT????????TTAAGTTGTA?TCT??????????A?CGATTTA?ATGGAAACCTGAACT????C????CTCC???TTCACTCGC????????G?TGCTCTAAAT?????TG?TGAT?AATGTATAGATAC????????????AAACTTTCTAC????????GCCATTAC??A??????????A??ACTTGTCACAA??CACT??? [...]
+magnaocularisJSF1073          GCG?CTCGC????AGCG?GCAT????????GTCCTGTTG??TT???T?TT?CATGAGCTA????ACG????????GCGGTG?????ACCT??GGCTTTTAACCT??A?GTAAC?TA??TTAA?AT?T???????C?AC???????A?TA?????????CCTATT?ACAAAGCCTGTAACGTC????A????????AATA??T?TA?A?????CAT??CA???????ACTTT??C??A?CT????TAG????TG?ACATC????????CTATGTTGTG?TCC??????????A?CGGTCTA?ATGGAAC????AATT????C????CTCC???TCCACTCGC????????GTTACCCTAGAT?????TG????ATAATGTATCGATACTA???????GTAAAACTTTCTAC????????GCCGTTAC??A??????????A??ATTTGGCATAA??CACT??? [...]
+sp_7_JaliscoJSF1000           ACA?CTTGT?A??AGCG?GCATTAAAA???GTCCTGTTG??TT???T?CT?AATAAACTA????GCG??????????GGTG?TCAAAC???????CTTTGATCT??A?GTGCC?AA??TTAA?AT?A???????C?AT???????A?TA?????????CCAATT?ATAAAGCCTGTAATGCC????C????????AATA??T?TA?AT???CAAT??CAG???ATAACTTT??C??A?AT????TCG?????G?GCATC????????TTTAGTTGTA?TCC??????????A?CGATCTA?ATGGAAC?CTGAATT????C????CTCC???TCTCCTCGC????????GTTGCGTTAAAT?????TGCT??T?AATGTATTGATACTA???????ATAAAACTTTCTAC????????GCCGTTAC??A??????????A??ATTTGTCACAA??CACC??? [...]
+yavapaiensisJSF1085           ACA?CTCGC?A??AGCG?GC?T????????GTCCTGTCGTGTT???T?TT?AACGAACTA????GCG??????????GGTGTGCAAACTT??GGCCTTTCACCT??AGGTACC?TA??TTAA?AT?A???????C?AC???????A?TA?????????CCTATT?ACAAAACCTGTAATGCC????T????????AATA??T?TA?AT???TAAT??C??????TAACTTT??T??A?AT????CCGACGTTG?GCAAC????????AATA??TGTA?TCC??????????A?CGATTTA?A?GGAAT?CTGAATT????C????CTCC???TTCACTCGC????????GTTCCTCTAAAT?????TG?T??A?AATATATAGATACTA???????CTGA?ATTTTCTATCACCTTATGCCATTAC??A??????????A??ATTTGCCACAA??CACT??? [...]
+oncaLVT3542                   ACA?CTCGC?A??AGCG?GC?T????????GTCCTGTCGTGTT???T?TT?AACGAACTA????GCG??????????GGTG?GCAAACAT??GGCCTTTTACCT??AGGTATC?TA??TTAA?AT?A???????C?AC???????A?TA?????????CCCATT?ACAAACCCTGTAATGCC????T????????AATA??T?TA?AT???TAAT??C??????TAACTTT??T??A?AT????TCGACGTTG?GCAAC????????TATA??TGTG?TCC??????????A?CGATTTA?A?GGAAT?CTGAATT????C????CTCC???TTCACTCGC????????GTTCCTTTAAAT?????TG?T??A?AATGTATAGATACTA???????CTGA?ACTTTCTATCACCTTATGCCATTAC??A??????????A??ACTTGTCACAA??CACT??? [...]
+sp_8_PueblaJAC9467            ACA?CTTGC?A??AGTG?GC?T????????GTCCTGTAGTGTT???T?TTAAATCAACTA????GCG??????????GGTG?GCAAACTT??GGCCTTTAATCT??AGGAACT?CA??TTAA?TT?A???????C?AC???????G?TA?????????CCCATT?ACAAAACCTGTAATGCC????T????????AATA??C?TA?AT???TAAA??C??????TAACTTT??T??A?AC????CTG???TTG?GTACT????????TCTAGTTGTG?TCC??????????A?CGATTTA?ATGGAA??CTGAAAT????C????CTCC???TCCACTCGC????????ATTTCGTTAAAT?????TG?T??T?AATGTATTGATACCA???????GTAAAATTTTCTACCACCTCACGCCATTAC??A??????????A??ATTTGCCACAA??CACT??? [...]
+macroglossaJAC10472           ACC?CTCGC?A??AGCG?GC?T????????GTCCTGTTG??TT???T?TT?AA????CTA????GCG??????????GGTG?GCAAGCCT??GGCCTTTGACCT??AGGTACC?AA??TTAA?AT?A???????C?AC???????A?TA?????????CCTATTTACAAAACCTGTAATGTC????T????????A??A??T?TA?AT???TAAT??CAG???ATAACTTT??T??A?TC????TTGACGTTG?ACATC????????CATAGTTGTA?TCC??????????A?CGATTTA?ATGGAAC?CTGAACT????C????CTCC???TTCACTCGC????????GCTGCTCTAAAT?????TG?T??T?AATGTATGGATACTA???????CTGAAATTTTCTAC????????GCCATTAC??A??????????A??ATTTGCCACAA??CACA??? [...]
+macroglossaJSF7933            ACC?CTCGC?A??AGCG?GC?T????????GTCCTGTCG??TT???T?TT?AA????CTA????GCG??????????GGTG?GCAAACTT??GGCCTTTGATCT??AGGTACC?TA??TTAA?AT?A???????C?AC???????A?TA?????????CCTATTTACAAAGCCTGTAATGTC????T????????A??A??T?TA?AT???TAAT??CAA???ATAACTTT??T??A?TC????TAGACGTTG?ACATC????????CATAGTTGTA?TCC??????????A?CGATTTA?ATGGAAC?CTGAACT????C????CTCC???TTCGCTCGC????????GCTGCACTAAAT?????TG?T??T?AATGTATAGATACTA???????TTGAAATTTTCTAC????????GCCATTAC??A??????????A??ATTTGCCACAA??CACA??? [...]
+taylori286                    ATA?CTCGC?A??AGCG?GC?T?????TCAGTCCTGTCG??TT???T?TT?AACGAACTA????GCG??????????GGTG?GCAAACCT??GGCCTTTGACCT??AGGAAAC?TA??TCAA?AT?A???????C?AC???????A?TA?????????ACC?TTTACAAAGCCTGTAATGCC????T????????GATA??T?TA?GT???TAAT??CAG???ATAACCTT??T??A?AC????CCGACGTTG?ATATC????????CACAGTTGTA?TCC??????????A?CGTTTTA?ATGGAAC?CTGAACT????C????CTCC???TCCACTCGC????????GTTGCCCTAAAT?????TG?T??G?AATGTATAGATACTA???????ATAAGACTTTCTAC????????GCCATTAC??A??????????A??AGTTGTCACAA??CACA??? [...]
+sp_4_Panama                   ACC?CTCGC?A??AGCG?GC?T????????GTCCTATCG??TT???T?TT?AATGAACTA????GCG??????????GGTG?GCAAACTT??GGCTTTTGACCT??AGGTACC?TA??TTAA??T?A???????C?AC???????A?TA?????????CCCATT?ACAAAGCCTGTAATGTC????T????????AATA??T?TA?AT???CAAT??CCG???ATAACTTT??T??A?AC????TAGACGTTG?ACAAC????????TATAGTTGTA?TCC??????????A?CGATTTA?ATGGAAC?CTGAATT????C????CTCC???TCCACTCGC????????CTTACCCTAAAT?????TG?T??T?AATGTATAGATACTA???????ATGAAACTTTCTAC????????GCCATTAC??A??????????A??ATTTGCCACAA??CACT??? [...]
+sp_5_CostaRichDMH86_210       ACA?CTCGTTA??AGCG?GC?T????????GTCCTGTCG??TT???T?TT?AATAAACTA????GCG??????????GGTG?GCAAACCT??GGCCTTTG?TCT??AGGCACC?CA??TTAA?GT?A???????C?AC???????A?CA?????????CCTATT?AAAAAGCCTGTAACGCC????C????????AATA??T?TA?GT???CAAT??CAGTTTATAACTTT??T??A?AC????AAGACGTTG?ATAAC????????TATCGTTGTT?TCC??????????ATCGATTTA?ATGGAAC?CTGAACT????C????CTCC???TCCACTCGC????????GTTGTTTTAAAT?????TG?T??C?AATGTATAGATACTA???????ATGAGATTTTCTAC????????GCCATTAC??A??????????A??ATTTGCCACAA??CACT??? [...]
+sp_6_CostaRicaDMH86_225       AAC?CTCGC?A??AGCG?GC?T????????GTCCTGTAG??TT???T?TT?AATGAACTA????GCG??????????GGTG?GCAAACCC??GGCCTTTGATCT??AGGTATC?TA??TTAA?AT?T???????C?AC??????CA?TATAGTCGGAACCCATT?ACAAATCCTGTAATGCC????C????????AATA??T?TA?AT???TAAT??CAG???ATAACTTT??T??A?GC????TAGACGTTGAATAAC????????TGTAGTTGTA?TCC??????????A?CGATTTA?ATGGAAC?CTGAATT????C????CTCC???TTCACTCGC????????GCTGCTCTAAAT?????TG?T??T?GATATAT?GATACCA???????ATGAAACTTTCTAC????????GCCATTAC??A??????????A??ACTTGTCACAA??CACA??? [...]
+;
+END;
+BEGIN CHARACTERS;
+    TITLE Untitled_DATA_Block_1GapsAsBinary;
+    LINK TAXA = Untitled_TAXA_Block_1;
+    DIMENSIONS NChar=2723;
+ CharStateLabels 1 col_1,
+    2 col_2,
+    3 col_3,
+    4 col_4,
+    5 col_5,
+    6 col_6,
+    7 col_7,
+    8 col_8,
+    9 col_9,
+    10 col_10,
+    11 col_11,
+    12 col_12,
+    13 col_13,
+    14 col_14,
+    15 col_15,
+    16 col_16,
+    17 col_17,
+    18 col_18,
+    19 col_19,
+    20 col_20,
+    21 col_21,
+    22 col_23,
+    23 col_24,
+    24 col_25,
+    25 col_26,
+    26 col_27,
+    27 col_28,
+    28 col_29,
+    29 col_30,
+    30 col_31,
+    31 col_32,
+    32 col_33,
+    33 col_36,
+    34 col_37,
+    35 col_38,
+    36 col_39,
+    37 col_40,
+    38 col_41,
+    39 col_43,
+    40 col_44,
+    41 col_45,
+    42 col_46,
+    43 col_47,
+    44 col_48,
+    45 col_49,
+    46 col_50,
+    47 col_51,
+    48 col_54,
+    49 col_55,
+    50 col_56,
+    51 col_57,
+    52 col_58,
+    53 col_59,
+    54 col_61,
+    55 col_62,
+    56 col_63,
+    57 col_64,
+    58 col_68,
+    59 col_69,
+    60 col_70,
+    61 col_71,
+    62 col_72,
+    63 col_73,
+    64 col_74,
+    65 col_75,
+    66 col_76,
+    67 col_77,
+    68 col_78,
+    69 col_79,
+    70 col_82,
+    71 col_83,
+    72 col_84,
+    73 col_85,
+    74 col_86,
+    75 col_87,
+    76 col_88,
+    77 col_89,
+    78 col_90,
+    79 col_91,
+    80 col_92,
+    81 col_93,
+    82 col_94,
+    83 col_95,
+    84 col_96,
+    85 col_100,
+    86 col_101,
+    87 col_102,
+    88 col_105,
+    89 col_106,
+    90 col_107,
+    91 col_108,
+    92 col_109,
+    93 col_110,
+    94 col_111,
+    95 col_112,
+    96 col_113,
+    97 col_114,
+    98 col_115,
+    99 col_116,
+    100 col_117,
+    101 col_118,
+    102 col_119,
+    103 col_120,
+    104 col_121,
+    105 col_122,
+    106 col_123,
+    107 col_124,
+    108 col_126,
+    109 col_128,
+    110 col_129,
+    111 col_130,
+    112 col_131,
+    113 col_132,
+    114 col_133,
+    115 col_134,
+    116 col_136,
+    117 col_139,
+    118 col_140,
+    119 col_141,
+    120 col_142,
+    121 col_143,
+    122 col_144,
+    123 col_145,
+    124 col_146,
+    125 col_147,
+    126 col_148,
+    127 col_150,
+    128 col_151,
+    129 col_152,
+    130 col_153,
+    131 col_154,
+    132 col_155,
+    133 col_156,
+    134 col_157,
+    135 col_158,
+    136 col_161,
+    137 col_162,
+    138 col_163,
+    139 col_164,
+    140 col_165,
+    141 col_166,
+    142 col_167,
+    143 col_168,
+    144 col_169,
+    145 col_170,
+    146 col_171,
+    147 col_172,
+    148 col_173,
+    149 col_174,
+    150 col_175,
+    151 col_176,
+    152 col_177,
+    153 col_178,
+    154 col_179,
+    155 col_183,
+    156 col_184,
+    157 col_185,
+    158 col_186,
+    159 col_188,
+    160 col_189,
+    161 col_190,
+    162 col_191,
+    163 col_192,
+    164 col_193,
+    165 col_194,
+    166 col_195,
+    167 col_197,
+    168 col_198,
+    169 col_200,
+    170 col_201,
+    171 col_203,
+    172 col_206,
+    173 col_207,
+    174 col_208,
+    175 col_209,
+    176 col_210,
+    177 col_211,
+    178 col_212,
+    179 col_213,
+    180 col_214,
+    181 col_215,
+    182 col_216,
+    183 col_217,
+    184 col_218,
+    185 col_219,
+    186 col_220,
+    187 col_221,
+    188 col_222,
+    189 col_223,
+    190 col_224,
+    191 col_225,
+    192 col_226,
+    193 col_230,
+    194 col_231,
+    195 col_232,
+    196 col_233,
+    197 col_234,
+    198 col_235,
+    199 col_236,
+    200 col_237,
+    201 col_238,
+    202 col_240,
+    203 col_241,
+    204 col_242,
+    205 col_243,
+    206 col_244,
+    207 col_247,
+    208 col_248,
+    209 col_249,
+    210 col_250,
+    211 col_251,
+    212 col_252,
+    213 col_254,
+    214 col_255,
+    215 col_256,
+    216 col_257,
+    217 col_258,
+    218 col_259,
+    219 col_260,
+    220 col_261,
+    221 col_262,
+    222 col_263,
+    223 col_264,
+    224 col_265,
+    225 col_266,
+    226 col_267,
+    227 col_268,
+    228 col_269,
+    229 col_270,
+    230 col_271,
+    231 col_272,
+    232 col_273,
+    233 col_274,
+    234 col_275,
+    235 col_276,
+    236 col_278,
+    237 col_279,
+    238 col_280,
+    239 col_281,
+    240 col_282,
+    241 col_283,
+    242 col_284,
+    243 col_285,
+    244 col_286,
+    245 col_287,
+    246 col_288,
+    247 col_289,
+    248 col_290,
+    249 col_291,
+    250 col_292,
+    251 col_293,
+    252 col_294,
+    253 col_295,
+    254 col_296,
+    255 col_297,
+    256 col_301,
+    257 col_303,
+    258 col_308,
+    259 col_309,
+    260 col_310,
+    261 col_311,
+    262 col_312,
+    263 col_313,
+    264 col_314,
+    265 col_315,
+    266 col_316,
+    267 col_317,
+    268 col_318,
+    269 col_319,
+    270 col_320,
+    271 col_321,
+    272 col_322,
+    273 col_323,
+    274 col_324,
+    275 col_325,
+    276 col_330,
+    277 col_331,
+    278 col_332,
+    279 col_333,
+    280 col_334,
+    281 col_335,
+    282 col_336,
+    283 col_337,
+    284 col_338,
+    285 col_339,
+    286 col_340,
+    287 col_341,
+    288 col_342,
+    289 col_343,
+    290 col_344,
+    291 col_345,
+    292 col_346,
+    293 col_347,
+    294 col_348,
+    295 col_349,
+    296 col_350,
+    297 col_351,
+    298 col_352,
+    299 col_353,
+    300 col_361,
+    301 col_362,
+    302 col_363,
+    303 col_364,
+    304 col_365,
+    305 col_366,
+    306 col_368,
+    307 col_369,
+    308 col_370,
+    309 col_371,
+    310 col_372,
+    311 col_374,
+    312 col_376,
+    313 col_377,
+    314 col_378,
+    315 col_379,
+    316 col_380,
+    317 col_381,
+    318 col_382,
+    319 col_385,
+    320 col_386,
+    321 col_387,
+    322 col_388,
+    323 col_389,
+    324 col_390,
+    325 col_391,
+    326 col_392,
+    327 col_393,
+    328 col_394,
+    329 col_395,
+    330 col_396,
+    331 col_397,
+    332 col_398,
+    333 col_399,
+    334 col_400,
+    335 col_401,
+    336 col_403,
+    337 col_404,
+    338 col_405,
+    339 col_406,
+    340 col_407,
+    341 col_408,
+    342 col_409,
+    343 col_410,
+    344 col_411,
+    345 col_412,
+    346 col_413,
+    347 col_414,
+    348 col_415,
+    349 col_416,
+    350 col_417,
+    351 col_418,
+    352 col_419,
+    353 col_426,
+    354 col_427,
+    355 col_428,
+    356 col_429,
+    357 col_430,
+    358 col_431,
+    359 col_432,
+    360 col_433,
+    361 col_434,
+    362 col_435,
+    363 col_436,
+    364 col_437,
+    365 col_438,
+    366 col_439,
+    367 col_440,
+    368 col_441,
+    369 col_442,
+    370 col_443,
+    371 col_444,
+    372 col_445,
+    373 col_453,
+    374 col_454,
+    375 col_455,
+    376 col_456,
+    377 col_457,
+    378 col_458,
+    379 col_459,
+    380 col_460,
+    381 col_461,
+    382 col_462,
+    383 col_463,
+    384 col_464,
+    385 col_465,
+    386 col_466,
+    387 col_467,
+    388 col_468,
+    389 col_469,
+    390 col_470,
+    391 col_471,
+    392 col_472,
+    393 col_474,
+    394 col_475,
+    395 col_477,
+    396 col_478,
+    397 col_479,
+    398 col_480,
+    399 col_481,
+    400 col_482,
+    401 col_483,
+    402 col_484,
+    403 col_485,
+    404 col_486,
+    405 col_487,
+    406 col_488,
+    407 col_489,
+    408 col_490,
+    409 col_491,
+    410 col_492,
+    411 col_493,
+    412 col_494,
+    413 col_496,
+    414 col_497,
+    415 col_499,
+    416 col_501,
+    417 col_502,
+    418 col_504,
+    419 col_505,
+    420 col_506,
+    421 col_507,
+    422 col_508,
+    423 col_509,
+    424 col_510,
+    425 col_511,
+    426 col_514,
+    427 col_516,
+    428 col_517,
+    429 col_518,
+    430 col_519,
+    431 col_520,
+    432 col_521,
+    433 col_523,
+    434 col_524,
+    435 col_525,
+    436 col_526,
+    437 col_527,
+    438 col_528,
+    439 col_529,
+    440 col_530,
+    441 col_531,
+    442 col_532,
+    443 col_533,
+    444 col_534,
+    445 col_535,
+    446 col_536,
+    447 col_537,
+    448 col_538,
+    449 col_539,
+    450 col_540,
+    451 col_541,
+    452 col_542,
+    453 col_543,
+    454 col_544,
+    455 col_545,
+    456 col_546,
+    457 col_547,
+    458 col_548,
+    459 col_549,
+    460 col_550,
+    461 col_552,
+    462 col_553,
+    463 col_554,
+    464 col_555,
+    465 col_556,
+    466 col_557,
+    467 col_558,
+    468 col_559,
+    469 col_560,
+    470 col_561,
+    471 col_562,
+    472 col_563,
+    473 col_564,
+    474 col_565,
+    475 col_566,
+    476 col_567,
+    477 col_568,
+    478 col_569,
+    479 col_570,
+    480 col_571,
+    481 col_572,
+    482 col_573,
+    483 col_574,
+    484 col_575,
+    485 col_576,
+    486 col_577,
+    487 col_578,
+    488 col_579,
+    489 col_580,
+    490 col_581,
+    491 col_582,
+    492 col_583,
+    493 col_584,
+    494 col_585,
+    495 col_586,
+    496 col_587,
+    497 col_588,
+    498 col_590,
+    499 col_591,
+    500 col_593,
+    501 col_594,
+    502 col_595,
+    503 col_596,
+    504 col_597,
+    505 col_598,
+    506 col_599,
+    507 col_600,
+    508 col_601,
+    509 col_602,
+    510 col_603,
+    511 col_604,
+    512 col_607,
+    513 col_609,
+    514 col_612,
+    515 col_614,
+    516 col_617,
+    517 col_618,
+    518 col_619,
+    519 col_620,
+    520 col_621,
+    521 col_623,
+    522 col_624,
+    523 col_625,
+    524 col_626,
+    525 col_630,
+    526 col_632,
+    527 col_633,
+    528 col_634,
+    529 col_635,
+    530 col_636,
+    531 col_637,
+    532 col_638,
+    533 col_639,
+    534 col_640,
+    535 col_641,
+    536 col_642,
+    537 col_643,
+    538 col_644,
+    539 col_645,
+    540 col_646,
+    541 col_647,
+    542 col_648,
+    543 col_649,
+    544 col_650,
+    545 col_651,
+    546 col_653,
+    547 col_657,
+    548 col_658,
+    549 col_659,
+    550 col_660,
+    551 col_661,
+    552 col_662,
+    553 col_663,
+    554 col_664,
+    555 col_665,
+    556 col_666,
+    557 col_667,
+    558 col_668,
+    559 col_669,
+    560 col_670,
+    561 col_671,
+    562 col_672,
+    563 col_673,
+    564 col_674,
+    565 col_675,
+    566 col_676,
+    567 col_677,
+    568 col_678,
+    569 col_679,
+    570 col_680,
+    571 col_681,
+    572 col_682,
+    573 col_683,
+    574 col_684,
+    575 col_685,
+    576 col_687,
+    577 col_688,
+    578 col_689,
+    579 col_690,
+    580 col_691,
+    581 col_693,
+    582 col_694,
+    583 col_695,
+    584 col_696,
+    585 col_697,
+    586 col_698,
+    587 col_699,
+    588 col_700,
+    589 col_701,
+    590 col_702,
+    591 col_703,
+    592 col_704,
+    593 col_706,
+    594 col_707,
+    595 col_708,
+    596 col_712,
+    597 col_713,
+    598 col_714,
+    599 col_715,
+    600 col_716,
+    601 col_717,
+    602 col_718,
+    603 col_719,
+    604 col_720,
+    605 col_721,
+    606 col_722,
+    607 col_723,
+    608 col_724,
+    609 col_725,
+    610 col_726,
+    611 col_727,
+    612 col_728,
+    613 col_729,
+    614 col_730,
+    615 col_731,
+    616 col_732,
+    617 col_733,
+    618 col_736,
+    619 col_737,
+    620 col_738,
+    621 col_739,
+    622 col_740,
+    623 col_741,
+    624 col_742,
+    625 col_743,
+    626 col_744,
+    627 col_745,
+    628 col_746,
+    629 col_747,
+    630 col_748,
+    631 col_749,
+    632 col_750,
+    633 col_751,
+    634 col_752,
+    635 col_753,
+    636 col_754,
+    637 col_755,
+    638 col_756,
+    639 col_757,
+    640 col_758,
+    641 col_759,
+    642 col_760,
+    643 col_761,
+    644 col_762,
+    645 col_763,
+    646 col_764,
+    647 col_765,
+    648 col_766,
+    649 col_767,
+    650 col_768,
+    651 col_769,
+    652 col_770,
+    653 col_771,
+    654 col_772,
+    655 col_773,
+    656 col_774,
+    657 col_775,
+    658 col_776,
+    659 col_777,
+    660 col_778,
+    661 col_779,
+    662 col_780,
+    663 col_781,
+    664 col_782,
+    665 col_783,
+    666 col_784,
+    667 col_785,
+    668 col_786,
+    669 col_787,
+    670 col_788,
+    671 col_789,
+    672 col_790,
+    673 col_792,
+    674 col_793,
+    675 col_794,
+    676 col_795,
+    677 col_796,
+    678 col_801,
+    679 col_802,
+    680 col_803,
+    681 col_804,
+    682 col_807,
+    683 col_808,
+    684 col_811,
+    685 col_812,
+    686 col_813,
+    687 col_814,
+    688 col_815,
+    689 col_816,
+    690 col_817,
+    691 col_818,
+    692 col_819,
+    693 col_820,
+    694 col_821,
+    695 col_822,
+    696 col_823,
+    697 col_824,
+    698 col_825,
+    699 col_826,
+    700 col_827,
+    701 col_828,
+    702 col_830,
+    703 col_831,
+    704 col_832,
+    705 col_833,
+    706 col_834,
+    707 col_835,
+    708 col_836,
+    709 col_837,
+    710 col_838,
+    711 col_839,
+    712 col_840,
+    713 col_842,
+    714 col_843,
+    715 col_844,
+    716 col_845,
+    717 col_846,
+    718 col_847,
+    719 col_848,
+    720 col_849,
+    721 col_850,
+    722 col_851,
+    723 col_852,
+    724 col_853,
+    725 col_854,
+    726 col_855,
+    727 col_856,
+    728 col_857,
+    729 col_858,
+    730 col_859,
+    731 col_860,
+    732 col_861,
+    733 col_862,
+    734 col_863,
+    735 col_864,
+    736 col_865,
+    737 col_866,
+    738 col_867,
+    739 col_868,
+    740 col_869,
+    741 col_870,
+    742 col_871,
+    743 col_872,
+    744 col_873,
+    745 col_874,
+    746 col_875,
+    747 col_876,
+    748 col_877,
+    749 col_878,
+    750 col_879,
+    751 col_880,
+    752 col_881,
+    753 col_882,
+    754 col_883,
+    755 col_884,
+    756 col_885,
+    757 col_886,
+    758 col_887,
+    759 col_888,
+    760 col_890,
+    761 col_892,
+    762 col_893,
+    763 col_894,
+    764 col_895,
+    765 col_896,
+    766 col_897,
+    767 col_898,
+    768 col_899,
+    769 col_900,
+    770 col_901,
+    771 col_902,
+    772 col_903,
+    773 col_904,
+    774 col_905,
+    775 col_906,
+    776 col_907,
+    777 col_908,
+    778 col_912,
+    779 col_913,
+    780 col_914,
+    781 col_916,
+    782 col_919,
+    783 col_920,
+    784 col_921,
+    785 col_922,
+    786 col_923,
+    787 col_924,
+    788 col_925,
+    789 col_926,
+    790 col_927,
+    791 col_928,
+    792 col_929,
+    793 col_930,
+    794 col_931,
+    795 col_932,
+    796 col_933,
+    797 col_934,
+    798 col_935,
+    799 col_936,
+    800 col_937,
+    801 col_938,
+    802 col_939,
+    803 col_940,
+    804 col_941,
+    805 col_942,
+    806 col_943,
+    807 col_944,
+    808 col_945,
+    809 col_946,
+    810 col_947,
+    811 col_948,
+    812 col_949,
+    813 col_950,
+    814 col_951,
+    815 col_952,
+    816 col_953,
+    817 col_954,
+    818 col_955,
+    819 col_956,
+    820 col_957,
+    821 col_960,
+    822 col_961,
+    823 col_962,
+    824 col_963,
+    825 col_964,
+    826 col_965,
+    827 col_966,
+    828 col_967,
+    829 col_968,
+    830 col_969,
+    831 col_971,
+    832 col_972,
+    833 col_973,
+    834 col_974,
+    835 col_975,
+    836 col_976,
+    837 col_977,
+    838 col_978,
+    839 col_979,
+    840 col_980,
+    841 col_981,
+    842 col_982,
+    843 col_983,
+    844 col_984,
+    845 col_985,
+    846 col_986,
+    847 col_987,
+    848 col_988,
+    849 col_989,
+    850 col_990,
+    851 col_991,
+    852 col_994,
+    853 col_995,
+    854 col_996,
+    855 col_998,
+    856 col_999,
+    857 col_1008,
+    858 col_1009,
+    859 col_1010,
+    860 col_1012,
+    861 col_1013,
+    862 col_1014,
+    863 col_1015,
+    864 col_1016,
+    865 col_1017,
+    866 col_1018,
+    867 col_1019,
+    868 col_1020,
+    869 col_1021,
+    870 col_1022,
+    871 col_1023,
+    872 col_1024,
+    873 col_1025,
+    874 col_1026,
+    875 col_1027,
+    876 col_1028,
+    877 col_1029,
+    878 col_1030,
+    879 col_1031,
+    880 col_1032,
+    881 col_1033,
+    882 col_1034,
+    883 col_1035,
+    884 col_1036,
+    885 col_1037,
+    886 col_1038,
+    887 col_1039,
+    888 col_1040,
+    889 col_1041,
+    890 col_1042,
+    891 col_1043,
+    892 col_1044,
+    893 col_1045,
+    894 col_1047,
+    895 col_1052,
+    896 col_1056,
+    897 col_1057,
+    898 col_1058,
+    899 col_1059,
+    900 col_1060,
+    901 col_1062,
+    902 col_1067,
+    903 col_1068,
+    904 col_1069,
+    905 col_1070,
+    906 col_1071,
+    907 col_1072,
+    908 col_1073,
+    909 col_1074,
+    910 col_1075,
+    911 col_1076,
+    912 col_1077,
+    913 col_1078,
+    914 col_1079,
+    915 col_1080,
+    916 col_1081,
+    917 col_1082,
+    918 col_1083,
+    919 col_1084,
+    920 col_1085,
+    921 col_1086,
+    922 col_1089,
+    923 col_1090,
+    924 col_1091,
+    925 col_1092,
+    926 col_1096,
+    927 col_1097,
+    928 col_1098,
+    929 col_1099,
+    930 col_1100,
+    931 col_1101,
+    932 col_1102,
+    933 col_1103,
+    934 col_1104,
+    935 col_1105,
+    936 col_1106,
+    937 col_1107,
+    938 col_1108,
+    939 col_1109,
+    940 col_1111,
+    941 col_1112,
+    942 col_1114,
+    943 col_1115,
+    944 col_1116,
+    945 col_1117,
+    946 col_1118,
+    947 col_1119,
+    948 col_1120,
+    949 col_1121,
+    950 col_1123,
+    951 col_1124,
+    952 col_1125,
+    953 col_1126,
+    954 col_1127,
+    955 col_1128,
+    956 col_1129,
+    957 col_1130,
+    958 col_1131,
+    959 col_1132,
+    960 col_1134,
+    961 col_1135,
+    962 col_1136,
+    963 col_1137,
+    964 col_1138,
+    965 col_1139,
+    966 col_1141,
+    967 col_1142,
+    968 col_1143,
+    969 col_1144,
+    970 col_1146,
+    971 col_1147,
+    972 col_1148,
+    973 col_1150,
+    974 col_1153,
+    975 col_1154,
+    976 col_1157,
+    977 col_1158,
+    978 col_1159,
+    979 col_1161,
+    980 col_1163,
+    981 col_1164,
+    982 col_1167,
+    983 col_1168,
+    984 col_1171,
+    985 col_1172,
+    986 col_1173,
+    987 col_1174,
+    988 col_1175,
+    989 col_1176,
+    990 col_1177,
+    991 col_1178,
+    992 col_1179,
+    993 col_1182,
+    994 col_1183,
+    995 col_1184,
+    996 col_1185,
+    997 col_1186,
+    998 col_1187,
+    999 col_1188,
+    1000 col_1189,
+    1001 col_1190,
+    1002 col_1191,
+    1003 col_1192,
+    1004 col_1193,
+    1005 col_1194,
+    1006 col_1195,
+    1007 col_1196,
+    1008 col_1197,
+    1009 col_1198,
+    1010 col_1199,
+    1011 col_1200,
+    1012 col_1201,
+    1013 col_1202,
+    1014 col_1203,
+    1015 col_1204,
+    1016 col_1205,
+    1017 col_1208,
+    1018 col_1209,
+    1019 col_1211,
+    1020 col_1212,
+    1021 col_1213,
+    1022 col_1214,
+    1023 col_1215,
+    1024 col_1216,
+    1025 col_1217,
+    1026 col_1218,
+    1027 col_1219,
+    1028 col_1220,
+    1029 col_1221,
+    1030 col_1223,
+    1031 col_1224,
+    1032 col_1228,
+    1033 col_1229,
+    1034 col_1230,
+    1035 col_1231,
+    1036 col_1232,
+    1037 col_1233,
+    1038 col_1234,
+    1039 col_1235,
+    1040 col_1236,
+    1041 col_1237,
+    1042 col_1238,
+    1043 col_1239,
+    1044 col_1240,
+    1045 col_1241,
+    1046 col_1247,
+    1047 col_1248,
+    1048 col_1249,
+    1049 col_1250,
+    1050 col_1251,
+    1051 col_1252,
+    1052 col_1253,
+    1053 col_1254,
+    1054 col_1255,
+    1055 col_1256,
+    1056 col_1257,
+    1057 col_1258,
+    1058 col_1262,
+    1059 col_1267,
+    1060 col_1268,
+    1061 col_1269,
+    1062 col_1270,
+    1063 col_1271,
+    1064 col_1272,
+    1065 col_1273,
+    1066 col_1274,
+    1067 col_1275,
+    1068 col_1276,
+    1069 col_1277,
+    1070 col_1278,
+    1071 col_1279,
+    1072 col_1280,
+    1073 col_1281,
+    1074 col_1282,
+    1075 col_1283,
+    1076 col_1286,
+    1077 col_1288,
+    1078 col_1289,
+    1079 col_1290,
+    1080 col_1291,
+    1081 col_1292,
+    1082 col_1293,
+    1083 col_1294,
+    1084 col_1295,
+    1085 col_1296,
+    1086 col_1297,
+    1087 col_1298,
+    1088 col_1299,
+    1089 col_1300,
+    1090 col_1301,
+    1091 col_1302,
+    1092 col_1303,
+    1093 col_1304,
+    1094 col_1305,
+    1095 col_1306,
+    1096 col_1307,
+    1097 col_1308,
+    1098 col_1309,
+    1099 col_1310,
+    1100 col_1311,
+    1101 col_1312,
+    1102 col_1313,
+    1103 col_1314,
+    1104 col_1315,
+    1105 col_1316,
+    1106 col_1317,
+    1107 col_1318,
+    1108 col_1319,
+    1109 col_1320,
+    1110 col_1321,
+    1111 col_1322,
+    1112 col_1323,
+    1113 col_1324,
+    1114 col_1325,
+    1115 col_1326,
+    1116 col_1327,
+    1117 col_1328,
+    1118 col_1329,
+    1119 col_1330,
+    1120 col_1331,
+    1121 col_1332,
+    1122 col_1333,
+    1123 col_1334,
+    1124 col_1335,
+    1125 col_1336,
+    1126 col_1337,
+    1127 col_1338,
+    1128 col_1339,
+    1129 col_1340,
+    1130 col_1341,
+    1131 col_1342,
+    1132 col_1343,
+    1133 col_1344,
+    1134 col_1345,
+    1135 col_1346,
+    1136 col_1347,
+    1137 col_1348,
+    1138 col_1349,
+    1139 col_1350,
+    1140 col_1351,
+    1141 col_1352,
+    1142 col_1353,
+    1143 col_1354,
+    1144 col_1357,
+    1145 col_1358,
+    1146 col_1359,
+    1147 col_1360,
+    1148 col_1361,
+    1149 col_1362,
+    1150 col_1363,
+    1151 col_1367,
+    1152 col_1369,
+    1153 col_1370,
+    1154 col_1371,
+    1155 col_1372,
+    1156 col_1373,
+    1157 col_1374,
+    1158 col_1377,
+    1159 col_1378,
+    1160 col_1379,
+    1161 col_1380,
+    1162 col_1381,
+    1163 col_1382,
+    1164 col_1383,
+    1165 col_1384,
+    1166 col_1385,
+    1167 col_1386,
+    1168 col_1387,
+    1169 col_1388,
+    1170 col_1389,
+    1171 col_1390,
+    1172 col_1391,
+    1173 col_1392,
+    1174 col_1393,
+    1175 col_1394,
+    1176 col_1395,
+    1177 col_1396,
+    1178 col_1397,
+    1179 col_1399,
+    1180 col_1400,
+    1181 col_1401,
+    1182 col_1402,
+    1183 col_1403,
+    1184 col_1404,
+    1185 col_1405,
+    1186 col_1406,
+    1187 col_1407,
+    1188 col_1408,
+    1189 col_1411,
+    1190 col_1412,
+    1191 col_1413,
+    1192 col_1414,
+    1193 col_1415,
+    1194 col_1416,
+    1195 col_1417,
+    1196 col_1418,
+    1197 col_1419,
+    1198 col_1420,
+    1199 col_1421,
+    1200 col_1422,
+    1201 col_1423,
+    1202 col_1424,
+    1203 col_1425,
+    1204 col_1426,
+    1205 col_1432,
+    1206 col_1433,
+    1207 col_1434,
+    1208 col_1435,
+    1209 col_1436,
+    1210 col_1438,
+    1211 col_1440,
+    1212 col_1441,
+    1213 col_1442,
+    1214 col_1443,
+    1215 col_1444,
+    1216 col_1446,
+    1217 col_1447,
+    1218 col_1448,
+    1219 col_1449,
+    1220 col_1450,
+    1221 col_1451,
+    1222 col_1452,
+    1223 col_1453,
+    1224 col_1454,
+    1225 col_1455,
+    1226 col_1456,
+    1227 col_1457,
+    1228 col_1458,
+    1229 col_1459,
+    1230 col_1460,
+    1231 col_1461,
+    1232 col_1471,
+    1233 col_1472,
+    1234 col_1473,
+    1235 col_1474,
+    1236 col_1476,
+    1237 col_1477,
+    1238 col_1478,
+    1239 col_1479,
+    1240 col_1480,
+    1241 col_1482,
+    1242 col_1483,
+    1243 col_1484,
+    1244 col_1485,
+    1245 col_1486,
+    1246 col_1487,
+    1247 col_1488,
+    1248 col_1489,
+    1249 col_1490,
+    1250 col_1491,
+    1251 col_1492,
+    1252 col_1493,
+    1253 col_1494,
+    1254 col_1495,
+    1255 col_1496,
+    1256 col_1497,
+    1257 col_1498,
+    1258 col_1499,
+    1259 col_1500,
+    1260 col_1501,
+    1261 col_1502,
+    1262 col_1503,
+    1263 col_1504,
+    1264 col_1505,
+    1265 col_1506,
+    1266 col_1507,
+    1267 col_1508,
+    1268 col_1509,
+    1269 col_1510,
+    1270 col_1511,
+    1271 col_1512,
+    1272 col_1513,
+    1273 col_1514,
+    1274 col_1515,
+    1275 col_1516,
+    1276 col_1517,
+    1277 col_1518,
+    1278 col_1519,
+    1279 col_1520,
+    1280 col_1521,
+    1281 col_1522,
+    1282 col_1523,
+    1283 col_1524,
+    1284 col_1525,
+    1285 col_1526,
+    1286 col_1527,
+    1287 col_1528,
+    1288 col_1529,
+    1289 col_1531,
+    1290 col_1533,
+    1291 col_1534,
+    1292 col_1535,
+    1293 col_1536,
+    1294 col_1537,
+    1295 col_1538,
+    1296 col_1539,
+    1297 col_1540,
+    1298 col_1541,
+    1299 col_1542,
+    1300 col_1543,
+    1301 col_1544,
+    1302 col_1545,
+    1303 col_1546,
+    1304 col_1547,
+    1305 col_1548,
+    1306 col_1549,
+    1307 col_1550,
+    1308 col_1551,
+    1309 col_1552,
+    1310 col_1553,
+    1311 col_1554,
+    1312 col_1555,
+    1313 col_1556,
+    1314 col_1557,
+    1315 col_1559,
+    1316 col_1560,
+    1317 col_1561,
+    1318 col_1562,
+    1319 col_1563,
+    1320 col_1564,
+    1321 col_1565,
+    1322 col_1566,
+    1323 col_1567,
+    1324 col_1568,
+    1325 col_1569,
+    1326 col_1570,
+    1327 col_1571,
+    1328 col_1572,
+    1329 col_1573,
+    1330 col_1574,
+    1331 col_1576,
+    1332 col_1577,
+    1333 col_1578,
+    1334 col_1579,
+    1335 col_1582,
+    1336 col_1584,
+    1337 col_1589,
+    1338 col_1590,
+    1339 col_1591,
+    1340 col_1592,
+    1341 col_1593,
+    1342 col_1594,
+    1343 col_1595,
+    1344 col_1596,
+    1345 col_1597,
+    1346 col_1598,
+    1347 col_1599,
+    1348 col_1600,
+    1349 col_1601,
+    1350 col_1602,
+    1351 col_1603,
+    1352 col_1604,
+    1353 col_1605,
+    1354 col_1606,
+    1355 col_1607,
+    1356 col_1608,
+    1357 col_1609,
+    1358 col_1610,
+    1359 col_1611,
+    1360 col_1612,
+    1361 col_1613,
+    1362 col_1614,
+    1363 col_1615,
+    1364 col_1616,
+    1365 col_1617,
+    1366 col_1618,
+    1367 col_1619,
+    1368 col_1620,
+    1369 col_1621,
+    1370 col_1622,
+    1371 col_1623,
+    1372 col_1624,
+    1373 col_1625,
+    1374 col_1626,
+    1375 col_1627,
+    1376 col_1628,
+    1377 col_1629,
+    1378 col_1630,
+    1379 col_1632,
+    1380 col_1633,
+    1381 col_1634,
+    1382 col_1635,
+    1383 col_1636,
+    1384 col_1637,
+    1385 col_1638,
+    1386 col_1639,
+    1387 col_1640,
+    1388 col_1641,
+    1389 col_1642,
+    1390 col_1644,
+    1391 col_1646,
+    1392 col_1647,
+    1393 col_1648,
+    1394 col_1649,
+    1395 col_1657,
+    1396 col_1658,
+    1397 col_1659,
+    1398 col_1661,
+    1399 col_1664,
+    1400 col_1667,
+    1401 col_1668,
+    1402 col_1669,
+    1403 col_1671,
+    1404 col_1672,
+    1405 col_1675,
+    1406 col_1677,
+    1407 col_1678,
+    1408 col_1679,
+    1409 col_1680,
+    1410 col_1682,
+    1411 col_1683,
+    1412 col_1685,
+    1413 col_1689,
+    1414 col_1690,
+    1415 col_1691,
+    1416 col_1692,
+    1417 col_1693,
+    1418 col_1694,
+    1419 col_1695,
+    1420 col_1696,
+    1421 col_1697,
+    1422 col_1698,
+    1423 col_1699,
+    1424 col_1700,
+    1425 col_1701,
+    1426 col_1702,
+    1427 col_1703,
+    1428 col_1704,
+    1429 col_1705,
+    1430 col_1706,
+    1431 col_1707,
+    1432 col_1708,
+    1433 col_1709,
+    1434 col_1710,
+    1435 col_1711,
+    1436 col_1712,
+    1437 col_1713,
+    1438 col_1714,
+    1439 col_1715,
+    1440 col_1716,
+    1441 col_1717,
+    1442 col_1718,
+    1443 col_1719,
+    1444 col_1720,
+    1445 col_1721,
+    1446 col_1722,
+    1447 col_1723,
+    1448 col_1724,
+    1449 col_1725,
+    1450 col_1726,
+    1451 col_1728,
+    1452 col_1732,
+    1453 col_1733,
+    1454 col_1734,
+    1455 col_1735,
+    1456 col_1736,
+    1457 col_1737,
+    1458 col_1738,
+    1459 col_1739,
+    1460 col_1740,
+    1461 col_1741,
+    1462 col_1742,
+    1463 col_1743,
+    1464 col_1744,
+    1465 col_1745,
+    1466 col_1747,
+    1467 col_1748,
+    1468 col_1750,
+    1469 col_1751,
+    1470 col_1752,
+    1471 col_1753,
+    1472 col_1754,
+    1473 col_1755,
+    1474 col_1756,
+    1475 col_1757,
+    1476 col_1758,
+    1477 col_1759,
+    1478 col_1760,
+    1479 col_1761,
+    1480 col_1762,
+    1481 col_1763,
+    1482 col_1764,
+    1483 col_1765,
+    1484 col_1766,
+    1485 col_1767,
+    1486 col_1770,
+    1487 col_1771,
+    1488 col_1772,
+    1489 col_1773,
+    1490 col_1774,
+    1491 col_1775,
+    1492 col_1776,
+    1493 col_1777,
+    1494 col_1779,
+    1495 col_1780,
+    1496 col_1781,
+    1497 col_1782,
+    1498 col_1783,
+    1499 col_1784,
+    1500 col_1785,
+    1501 col_1786,
+    1502 col_1787,
+    1503 col_1788,
+    1504 col_1789,
+    1505 col_1790,
+    1506 col_1791,
+    1507 col_1792,
+    1508 col_1795,
+    1509 col_1796,
+    1510 col_1797,
+    1511 col_1798,
+    1512 col_1799,
+    1513 col_1800,
+    1514 col_1801,
+    1515 col_1802,
+    1516 col_1803,
+    1517 col_1804,
+    1518 col_1805,
+    1519 col_1806,
+    1520 col_1807,
+    1521 col_1808,
+    1522 col_1809,
+    1523 col_1810,
+    1524 col_1811,
+    1525 col_1812,
+    1526 col_1813,
+    1527 col_1819,
+    1528 col_1820,
+    1529 col_1821,
+    1530 col_1822,
+    1531 col_1824,
+    1532 col_1825,
+    1533 col_1827,
+    1534 col_1828,
+    1535 col_1829,
+    1536 col_1832,
+    1537 col_1833,
+    1538 col_1834,
+    1539 col_1835,
+    1540 col_1836,
+    1541 col_1837,
+    1542 col_1838,
+    1543 col_1839,
+    1544 col_1840,
+    1545 col_1841,
+    1546 col_1842,
+    1547 col_1843,
+    1548 col_1844,
+    1549 col_1846,
+    1550 col_1847,
+    1551 col_1848,
+    1552 col_1849,
+    1553 col_1851,
+    1554 col_1852,
+    1555 col_1853,
+    1556 col_1854,
+    1557 col_1855,
+    1558 col_1859,
+    1559 col_1860,
+    1560 col_1861,
+    1561 col_1862,
+    1562 col_1863,
+    1563 col_1864,
+    1564 col_1865,
+    1565 col_1866,
+    1566 col_1867,
+    1567 col_1869,
+    1568 col_1870,
+    1569 col_1872,
+    1570 col_1873,
+    1571 col_1874,
+    1572 col_1875,
+    1573 col_1876,
+    1574 col_1877,
+    1575 col_1878,
+    1576 col_1879,
+    1577 col_1880,
+    1578 col_1881,
+    1579 col_1882,
+    1580 col_1883,
+    1581 col_1884,
+    1582 col_1885,
+    1583 col_1886,
+    1584 col_1887,
+    1585 col_1888,
+    1586 col_1889,
+    1587 col_1890,
+    1588 col_1891,
+    1589 col_1892,
+    1590 col_1895,
+    1591 col_1896,
+    1592 col_1897,
+    1593 col_1898,
+    1594 col_1899,
+    1595 col_1900,
+    1596 col_1901,
+    1597 col_1904,
+    1598 col_1905,
+    1599 col_1906,
+    1600 col_1907,
+    1601 col_1908,
+    1602 col_1909,
+    1603 col_1910,
+    1604 col_1911,
+    1605 col_1912,
+    1606 col_1913,
+    1607 col_1914,
+    1608 col_1915,
+    1609 col_1919,
+    1610 col_1920,
+    1611 col_1921,
+    1612 col_1922,
+    1613 col_1923,
+    1614 col_1924,
+    1615 col_1925,
+    1616 col_1926,
+    1617 col_1927,
+    1618 col_1928,
+    1619 col_1929,
+    1620 col_1930,
+    1621 col_1931,
+    1622 col_1932,
+    1623 col_1933,
+    1624 col_1934,
+    1625 col_1935,
+    1626 col_1936,
+    1627 col_1937,
+    1628 col_1938,
+    1629 col_1939,
+    1630 col_1941,
+    1631 col_1942,
+    1632 col_1943,
+    1633 col_1944,
+    1634 col_1945,
+    1635 col_1946,
+    1636 col_1947,
+    1637 col_1948,
+    1638 col_1949,
+    1639 col_1950,
+    1640 col_1951,
+    1641 col_1952,
+    1642 col_1953,
+    1643 col_1954,
+    1644 col_1955,
+    1645 col_1956,
+    1646 col_1957,
+    1647 col_1961,
+    1648 col_1962,
+    1649 col_1963,
+    1650 col_1964,
+    1651 col_1965,
+    1652 col_1966,
+    1653 col_1967,
+    1654 col_1968,
+    1655 col_1969,
+    1656 col_1973,
+    1657 col_1974,
+    1658 col_1975,
+    1659 col_1976,
+    1660 col_1979,
+    1661 col_1984,
+    1662 col_1985,
+    1663 col_1986,
+    1664 col_1987,
+    1665 col_1990,
+    1666 col_1992,
+    1667 col_1994,
+    1668 col_1995,
+    1669 col_1997,
+    1670 col_1998,
+    1671 col_1999,
+    1672 col_2000,
+    1673 col_2001,
+    1674 col_2002,
+    1675 col_2003,
+    1676 col_2004,
+    1677 col_2005,
+    1678 col_2006,
+    1679 col_2007,
+    1680 col_2008,
+    1681 col_2009,
+    1682 col_2010,
+    1683 col_2011,
+    1684 col_2012,
+    1685 col_2013,
+    1686 col_2014,
+    1687 col_2015,
+    1688 col_2016,
+    1689 col_2017,
+    1690 col_2018,
+    1691 col_2019,
+    1692 col_2020,
+    1693 col_2021,
+    1694 col_2022,
+    1695 col_2023,
+    1696 col_2026,
+    1697 col_2027,
+    1698 col_2028,
+    1699 col_2029,
+    1700 col_2030,
+    1701 col_2031,
+    1702 col_2032,
+    1703 col_2033,
+    1704 col_2034,
+    1705 col_2035,
+    1706 col_2036,
+    1707 col_2038,
+    1708 col_2039,
+    1709 col_2040,
+    1710 col_2041,
+    1711 col_2042,
+    1712 col_2043,
+    1713 col_2044,
+    1714 col_2045,
+    1715 col_2046,
+    1716 col_2047,
+    1717 col_2048,
+    1718 col_2049,
+    1719 col_2050,
+    1720 col_2051,
+    1721 col_2052,
+    1722 col_2053,
+    1723 col_2054,
+    1724 col_2055,
+    1725 col_2056,
+    1726 col_2057,
+    1727 col_2058,
+    1728 col_2059,
+    1729 col_2060,
+    1730 col_2061,
+    1731 col_2062,
+    1732 col_2063,
+    1733 col_2064,
+    1734 col_2065,
+    1735 col_2066,
+    1736 col_2067,
+    1737 col_2068,
+    1738 col_2069,
+    1739 col_2070,
+    1740 col_2071,
+    1741 col_2072,
+    1742 col_2073,
+    1743 col_2074,
+    1744 col_2075,
+    1745 col_2076,
+    1746 col_2077,
+    1747 col_2078,
+    1748 col_2079,
+    1749 col_2082,
+    1750 col_2085,
+    1751 col_2086,
+    1752 col_2087,
+    1753 col_2088,
+    1754 col_2089,
+    1755 col_2091,
+    1756 col_2092,
+    1757 col_2093,
+    1758 col_2094,
+    1759 col_2095,
+    1760 col_2096,
+    1761 col_2097,
+    1762 col_2098,
+    1763 col_2099,
+    1764 col_2100,
+    1765 col_2101,
+    1766 col_2102,
+    1767 col_2103,
+    1768 col_2104,
+    1769 col_2105,
+    1770 col_2106,
+    1771 col_2108,
+    1772 col_2109,
+    1773 col_2116,
+    1774 col_2117,
+    1775 col_2118,
+    1776 col_2119,
+    1777 col_2120,
+    1778 col_2121,
+    1779 col_2122,
+    1780 col_2123,
+    1781 col_2124,
+    1782 col_2125,
+    1783 col_2126,
+    1784 col_2127,
+    1785 col_2128,
+    1786 col_2129,
+    1787 col_2130,
+    1788 col_2131,
+    1789 col_2132,
+    1790 col_2133,
+    1791 col_2134,
+    1792 col_2135,
+    1793 col_2136,
+    1794 col_2137,
+    1795 col_2138,
+    1796 col_2139,
+    1797 col_2140,
+    1798 col_2141,
+    1799 col_2142,
+    1800 col_2143,
+    1801 col_2144,
+    1802 col_2145,
+    1803 col_2146,
+    1804 col_2147,
+    1805 col_2148,
+    1806 col_2149,
+    1807 col_2150,
+    1808 col_2151,
+    1809 col_2152,
+    1810 col_2153,
+    1811 col_2154,
+    1812 col_2155,
+    1813 col_2157,
+    1814 col_2158,
+    1815 col_2159,
+    1816 col_2160,
+    1817 col_2161,
+    1818 col_2162,
+    1819 col_2163,
+    1820 col_2164,
+    1821 col_2165,
+    1822 col_2166,
+    1823 col_2167,
+    1824 col_2168,
+    1825 col_2169,
+    1826 col_2170,
+    1827 col_2173,
+    1828 col_2174,
+    1829 col_2175,
+    1830 col_2177,
+    1831 col_2178,
+    1832 col_2179,
+    1833 col_2181,
+    1834 col_2182,
+    1835 col_2183,
+    1836 col_2184,
+    1837 col_2187,
+    1838 col_2188,
+    1839 col_2189,
+    1840 col_2190,
+    1841 col_2191,
+    1842 col_2192,
+    1843 col_2193,
+    1844 col_2194,
+    1845 col_2195,
+    1846 col_2196,
+    1847 col_2197,
+    1848 col_2201,
+    1849 col_2202,
+    1850 col_2203,
+    1851 col_2206,
+    1852 col_2208,
+    1853 col_2210,
+    1854 col_2211,
+    1855 col_2212,
+    1856 col_2213,
+    1857 col_2216,
+    1858 col_2217,
+    1859 col_2218,
+    1860 col_2219,
+    1861 col_2220,
+    1862 col_2221,
+    1863 col_2222,
+    1864 col_2223,
+    1865 col_2224,
+    1866 col_2225,
+    1867 col_2226,
+    1868 col_2227,
+    1869 col_2228,
+    1870 col_2230,
+    1871 col_2231,
+    1872 col_2232,
+    1873 col_2233,
+    1874 col_2234,
+    1875 col_2237,
+    1876 col_2238,
+    1877 col_2239,
+    1878 col_2240,
+    1879 col_2241,
+    1880 col_2242,
+    1881 col_2243,
+    1882 col_2244,
+    1883 col_2245,
+    1884 col_2246,
+    1885 col_2247,
+    1886 col_2248,
+    1887 col_2249,
+    1888 col_2250,
+    1889 col_2251,
+    1890 col_2252,
+    1891 col_2256,
+    1892 col_2259,
+    1893 col_2260,
+    1894 col_2261,
+    1895 col_2262,
+    1896 col_2263,
+    1897 col_2264,
+    1898 col_2265,
+    1899 col_2266,
+    1900 col_2270,
+    1901 col_2271,
+    1902 col_2272,
+    1903 col_2274,
+    1904 col_2275,
+    1905 col_2276,
+    1906 col_2277,
+    1907 col_2278,
+    1908 col_2279,
+    1909 col_2280,
+    1910 col_2281,
+    1911 col_2282,
+    1912 col_2283,
+    1913 col_2284,
+    1914 col_2285,
+    1915 col_2287,
+    1916 col_2288,
+    1917 col_2289,
+    1918 col_2290,
+    1919 col_2291,
+    1920 col_2292,
+    1921 col_2293,
+    1922 col_2294,
+    1923 col_2296,
+    1924 col_2297,
+    1925 col_2298,
+    1926 col_2299,
+    1927 col_2300,
+    1928 col_2301,
+    1929 col_2302,
+    1930 col_2303,
+    1931 col_2304,
+    1932 col_2305,
+    1933 col_2306,
+    1934 col_2307,
+    1935 col_2308,
+    1936 col_2309,
+    1937 col_2310,
+    1938 col_2311,
+    1939 col_2312,
+    1940 col_2313,
+    1941 col_2314,
+    1942 col_2315,
+    1943 col_2316,
+    1944 col_2317,
+    1945 col_2318,
+    1946 col_2319,
+    1947 col_2320,
+    1948 col_2321,
+    1949 col_2322,
+    1950 col_2323,
+    1951 col_2324,
+    1952 col_2325,
+    1953 col_2326,
+    1954 col_2327,
+    1955 col_2328,
+    1956 col_2329,
+    1957 col_2330,
+    1958 col_2331,
+    1959 col_2332,
+    1960 col_2333,
+    1961 col_2334,
+    1962 col_2335,
+    1963 col_2336,
+    1964 col_2337,
+    1965 col_2338,
+    1966 col_2339,
+    1967 col_2340,
+    1968 col_2341,
+    1969 col_2342,
+    1970 col_2343,
+    1971 col_2344,
+    1972 col_2345,
+    1973 col_2346,
+    1974 col_2347,
+    1975 col_2348,
+    1976 col_2349,
+    1977 col_2350,
+    1978 col_2351,
+    1979 col_2352,
+    1980 col_2353,
+    1981 col_2354,
+    1982 col_2355,
+    1983 col_2356,
+    1984 col_2357,
+    1985 col_2358,
+    1986 col_2359,
+    1987 col_2360,
+    1988 col_2363,
+    1989 col_2364,
+    1990 col_2365,
+    1991 col_2366,
+    1992 col_2367,
+    1993 col_2368,
+    1994 col_2369,
+    1995 col_2370,
+    1996 col_2371,
+    1997 col_2372,
+    1998 col_2373,
+    1999 col_2374,
+    2000 col_2375,
+    2001 col_2376,
+    2002 col_2377,
+    2003 col_2378,
+    2004 col_2379,
+    2005 col_2380,
+    2006 col_2381,
+    2007 col_2382,
+    2008 col_2386,
+    2009 col_2387,
+    2010 col_2388,
+    2011 col_2389,
+    2012 col_2390,
+    2013 col_2391,
+    2014 col_2392,
+    2015 col_2394,
+    2016 col_2395,
+    2017 col_2396,
+    2018 col_2400,
+    2019 col_2402,
+    2020 col_2403,
+    2021 col_2405,
+    2022 col_2406,
+    2023 col_2408,
+    2024 col_2409,
+    2025 col_2410,
+    2026 col_2411,
+    2027 col_2412,
+    2028 col_2413,
+    2029 col_2414,
+    2030 col_2415,
+    2031 col_2416,
+    2032 col_2417,
+    2033 col_2418,
+    2034 col_2421,
+    2035 col_2422,
+    2036 col_2423,
+    2037 col_2424,
+    2038 col_2425,
+    2039 col_2426,
+    2040 col_2427,
+    2041 col_2429,
+    2042 col_2432,
+    2043 col_2435,
+    2044 col_2437,
+    2045 col_2438,
+    2046 col_2439,
+    2047 col_2440,
+    2048 col_2441,
+    2049 col_2442,
+    2050 col_2443,
+    2051 col_2444,
+    2052 col_2445,
+    2053 col_2447,
+    2054 col_2448,
+    2055 col_2450,
+    2056 col_2451,
+    2057 col_2452,
+    2058 col_2453,
+    2059 col_2454,
+    2060 col_2455,
+    2061 col_2456,
+    2062 col_2457,
+    2063 col_2462,
+    2064 col_2463,
+    2065 col_2464,
+    2066 col_2465,
+    2067 col_2466,
+    2068 col_2467,
+    2069 col_2468,
+    2070 col_2469,
+    2071 col_2470,
+    2072 col_2471,
+    2073 col_2472,
+    2074 col_2473,
+    2075 col_2474,
+    2076 col_2475,
+    2077 col_2476,
+    2078 col_2477,
+    2079 col_2478,
+    2080 col_2479,
+    2081 col_2480,
+    2082 col_2481,
+    2083 col_2482,
+    2084 col_2483,
+    2085 col_2484,
+    2086 col_2485,
+    2087 col_2486,
+    2088 col_2487,
+    2089 col_2489,
+    2090 col_2490,
+    2091 col_2491,
+    2092 col_2492,
+    2093 col_2493,
+    2094 col_2494,
+    2095 col_2495,
+    2096 col_2496,
+    2097 col_2497,
+    2098 col_2498,
+    2099 col_2499,
+    2100 col_2500,
+    2101 col_2501,
+    2102 col_2503,
+    2103 col_2504,
+    2104 col_2505,
+    2105 col_2506,
+    2106 col_2507,
+    2107 col_2508,
+    2108 col_2509,
+    2109 col_2510,
+    2110 col_2511,
+    2111 col_2512,
+    2112 col_2513,
+    2113 col_2514,
+    2114 col_2515,
+    2115 col_2517,
+    2116 col_2518,
+    2117 col_2519,
+    2118 col_2520,
+    2119 col_2522,
+    2120 col_2524,
+    2121 col_2526,
+    2122 col_2527,
+    2123 col_2530,
+    2124 col_2531,
+    2125 col_2532,
+    2126 col_2533,
+    2127 col_2534,
+    2128 col_2535,
+    2129 col_2536,
+    2130 col_2537,
+    2131 col_2539,
+    2132 col_2540,
+    2133 col_2541,
+    2134 col_2543,
+    2135 col_2544,
+    2136 col_2545,
+    2137 col_2546,
+    2138 col_2547,
+    2139 col_2548,
+    2140 col_2549,
+    2141 col_2550,
+    2142 col_2551,
+    2143 col_2552,
+    2144 col_2553,
+    2145 col_2554,
+    2146 col_2555,
+    2147 col_2556,
+    2148 col_2557,
+    2149 col_2558,
+    2150 col_2559,
+    2151 col_2560,
+    2152 col_2561,
+    2153 col_2562,
+    2154 col_2563,
+    2155 col_2564,
+    2156 col_2565,
+    2157 col_2566,
+    2158 col_2567,
+    2159 col_2568,
+    2160 col_2569,
+    2161 col_2570,
+    2162 col_2571,
+    2163 col_2572,
+    2164 col_2573,
+    2165 col_2574,
+    2166 col_2577,
+    2167 col_2578,
+    2168 col_2579,
+    2169 col_2580,
+    2170 col_2581,
+    2171 col_2582,
+    2172 col_2584,
+    2173 col_2585,
+    2174 col_2586,
+    2175 col_2587,
+    2176 col_2588,
+    2177 col_2589,
+    2178 col_2590,
+    2179 col_2591,
+    2180 col_2592,
+    2181 col_2593,
+    2182 col_2594,
+    2183 col_2595,
+    2184 col_2596,
+    2185 col_2597,
+    2186 col_2598,
+    2187 col_2599,
+    2188 col_2600,
+    2189 col_2601,
+    2190 col_2602,
+    2191 col_2603,
+    2192 col_2604,
+    2193 col_2605,
+    2194 col_2606,
+    2195 col_2607,
+    2196 col_2608,
+    2197 col_2610,
+    2198 col_2611,
+    2199 col_2612,
+    2200 col_2613,
+    2201 col_2614,
+    2202 col_2615,
+    2203 col_2616,
+    2204 col_2617,
+    2205 col_2618,
+    2206 col_2619,
+    2207 col_2620,
+    2208 col_2621,
+    2209 col_2623,
+    2210 col_2624,
+    2211 col_2625,
+    2212 col_2626,
+    2213 col_2627,
+    2214 col_2628,
+    2215 col_2629,
+    2216 col_2630,
+    2217 col_2632,
+    2218 col_2633,
+    2219 col_2634,
+    2220 col_2635,
+    2221 col_2636,
+    2222 col_2637,
+    2223 col_2638,
+    2224 col_2639,
+    2225 col_2640,
+    2226 col_2641,
+    2227 col_2642,
+    2228 col_2643,
+    2229 col_2644,
+    2230 col_2645,
+    2231 col_2646,
+    2232 col_2647,
+    2233 col_2648,
+    2234 col_2649,
+    2235 col_2650,
+    2236 col_2651,
+    2237 col_2652,
+    2238 col_2653,
+    2239 col_2654,
+    2240 col_2655,
+    2241 col_2656,
+    2242 col_2657,
+    2243 col_2658,
+    2244 col_2659,
+    2245 col_2660,
+    2246 col_2661,
+    2247 col_2662,
+    2248 col_2663,
+    2249 col_2664,
+    2250 col_2665,
+    2251 col_2666,
+    2252 col_2667,
+    2253 col_2668,
+    2254 col_2669,
+    2255 col_2670,
+    2256 col_2671,
+    2257 col_2672,
+    2258 col_2673,
+    2259 col_2674,
+    2260 col_2675,
+    2261 col_2676,
+    2262 col_2677,
+    2263 col_2678,
+    2264 col_2679,
+    2265 col_2680,
+    2266 col_2681,
+    2267 col_2682,
+    2268 col_2683,
+    2269 col_2684,
+    2270 col_2685,
+    2271 col_2686,
+    2272 col_2687,
+    2273 col_2688,
+    2274 col_2689,
+    2275 col_2690,
+    2276 col_2691,
+    2277 col_2692,
+    2278 col_2693,
+    2279 col_2694,
+    2280 col_2695,
+    2281 col_2696,
+    2282 col_2697,
+    2283 col_2698,
+    2284 col_2699,
+    2285 col_2700,
+    2286 col_2701,
+    2287 col_2702,
+    2288 col_2703,
+    2289 col_2704,
+    2290 col_2705,
+    2291 col_2706,
+    2292 col_2707,
+    2293 col_2708,
+    2294 col_2709,
+    2295 col_2710,
+    2296 col_2712,
+    2297 col_2713,
+    2298 col_2714,
+    2299 col_2715,
+    2300 col_2716,
+    2301 col_2717,
+    2302 col_2718,
+    2303 col_2719,
+    2304 col_2720,
+    2305 col_2721,
+    2306 col_2722,
+    2307 col_2723,
+    2308 col_2724,
+    2309 col_2725,
+    2310 col_2726,
+    2311 col_2727,
+    2312 col_2728,
+    2313 col_2729,
+    2314 col_2730,
+    2315 col_2731,
+    2316 col_2732,
+    2317 col_2735,
+    2318 col_2737,
+    2319 col_2738,
+    2320 col_2739,
+    2321 col_2740,
+    2322 col_2741,
+    2323 col_2742,
+    2324 col_2743,
+    2325 col_2744,
+    2326 col_2745,
+    2327 col_2746,
+    2328 col_2747,
+    2329 col_2748,
+    2330 col_2749,
+    2331 col_2750,
+    2332 col_2751,
+    2333 col_2752,
+    2334 col_2758,
+    2335 col_2759,
+    2336 col_2760,
+    2337 col_2761,
+    2338 col_2762,
+    2339 col_2763,
+    2340 col_2764,
+    2341 col_2765,
+    2342 col_2766,
+    2343 col_2767,
+    2344 col_2768,
+    2345 col_2769,
+    2346 col_2770,
+    2347 col_2771,
+    2348 col_2772,
+    2349 col_2773,
+    2350 col_2774,
+    2351 col_2775,
+    2352 col_2776,
+    2353 col_2777,
+    2354 col_2779,
+    2355 col_2780,
+    2356 col_2782,
+    2357 col_2783,
+    2358 col_2784,
+    2359 col_2785,
+    2360 col_2787,
+    2361 col_2788,
+    2362 col_2789,
+    2363 col_2790,
+    2364 col_2791,
+    2365 col_2792,
+    2366 col_2793,
+    2367 col_2794,
+    2368 col_2795,
+    2369 col_2796,
+    2370 col_2797,
+    2371 col_2798,
+    2372 col_2799,
+    2373 col_2800,
+    2374 col_2803,
+    2375 col_2804,
+    2376 col_2805,
+    2377 col_2806,
+    2378 col_2807,
+    2379 col_2808,
+    2380 col_2809,
+    2381 col_2810,
+    2382 col_2811,
+    2383 col_2812,
+    2384 col_2813,
+    2385 col_2814,
+    2386 col_2815,
+    2387 col_2816,
+    2388 col_2817,
+    2389 col_2818,
+    2390 col_2819,
+    2391 col_2820,
+    2392 col_2821,
+    2393 col_2822,
+    2394 col_2823,
+    2395 col_2824,
+    2396 col_2825,
+    2397 col_2826,
+    2398 col_2827,
+    2399 col_2828,
+    2400 col_2829,
+    2401 col_2830,
+    2402 col_2831,
+    2403 col_2832,
+    2404 col_2833,
+    2405 col_2834,
+    2406 col_2835,
+    2407 col_2836,
+    2408 col_2837,
+    2409 col_2838,
+    2410 col_2839,
+    2411 col_2840,
+    2412 col_2841,
+    2413 col_2842,
+    2414 col_2843,
+    2415 col_2844,
+    2416 col_2845,
+    2417 col_2846,
+    2418 col_2848,
+    2419 col_2849,
+    2420 col_2855,
+    2421 col_2856,
+    2422 col_2857,
+    2423 col_2859,
+    2424 col_2860,
+    2425 col_2861,
+    2426 col_2862,
+    2427 col_2863,
+    2428 col_2864,
+    2429 col_2865,
+    2430 col_2866,
+    2431 col_2867,
+    2432 col_2868,
+    2433 col_2869,
+    2434 col_2870,
+    2435 col_2871,
+    2436 col_2872,
+    2437 col_2873,
+    2438 col_2874,
+    2439 col_2875,
+    2440 col_2876,
+    2441 col_2877,
+    2442 col_2878,
+    2443 col_2879,
+    2444 col_2880,
+    2445 col_2881,
+    2446 col_2882,
+    2447 col_2883,
+    2448 col_2884,
+    2449 col_2885,
+    2450 col_2886,
+    2451 col_2887,
+    2452 col_2888,
+    2453 col_2889,
+    2454 col_2890,
+    2455 col_2891,
+    2456 col_2892,
+    2457 col_2893,
+    2458 col_2894,
+    2459 col_2895,
+    2460 col_2896,
+    2461 col_2897,
+    2462 col_2898,
+    2463 col_2899,
+    2464 col_2900,
+    2465 col_2901,
+    2466 col_2902,
+    2467 col_2903,
+    2468 col_2904,
+    2469 col_2905,
+    2470 col_2906,
+    2471 col_2908,
+    2472 col_2909,
+    2473 col_2913,
+    2474 col_2914,
+    2475 col_2915,
+    2476 col_2916,
+    2477 col_2920,
+    2478 col_2921,
+    2479 col_2922,
+    2480 col_2923,
+    2481 col_2924,
+    2482 col_2925,
+    2483 col_2926,
+    2484 col_2927,
+    2485 col_2928,
+    2486 col_2929,
+    2487 col_2930,
+    2488 col_2931,
+    2489 col_2932,
+    2490 col_2933,
+    2491 col_2934,
+    2492 col_2935,
+    2493 col_2936,
+    2494 col_2937,
+    2495 col_2938,
+    2496 col_2939,
+    2497 col_2940,
+    2498 col_2941,
+    2499 col_2942,
+    2500 col_2943,
+    2501 col_2944,
+    2502 col_2945,
+    2503 col_2946,
+    2504 col_2947,
+    2505 col_2948,
+    2506 col_2949,
+    2507 col_2950,
+    2508 col_2951,
+    2509 col_2952,
+    2510 col_2953,
+    2511 col_2954,
+    2512 col_2955,
+    2513 col_2956,
+    2514 col_2957,
+    2515 col_2958,
+    2516 col_2959,
+    2517 col_2960,
+    2518 col_2961,
+    2519 col_2962,
+    2520 col_2963,
+    2521 col_2964,
+    2522 col_2965,
+    2523 col_2966,
+    2524 col_2967,
+    2525 col_2968,
+    2526 col_2969,
+    2527 col_2970,
+    2528 col_2971,
+    2529 col_2972,
+    2530 col_2973,
+    2531 col_2974,
+    2532 col_2976,
+    2533 col_2979,
+    2534 col_2980,
+    2535 col_2982,
+    2536 col_2983,
+    2537 col_2986,
+    2538 col_2987,
+    2539 col_2988,
+    2540 col_2989,
+    2541 col_2990,
+    2542 col_2991,
+    2543 col_2992,
+    2544 col_2993,
+    2545 col_2994,
+    2546 col_2995,
+    2547 col_2996,
+    2548 col_2997,
+    2549 col_2998,
+    2550 col_2999,
+    2551 col_3000,
+    2552 col_3001,
+    2553 col_3002,
+    2554 col_3003,
+    2555 col_3004,
+    2556 col_3005,
+    2557 col_3006,
+    2558 col_3007,
+    2559 col_3008,
+    2560 col_3009,
+    2561 col_3010,
+    2562 col_3011,
+    2563 col_3013,
+    2564 col_3017,
+    2565 col_3018,
+    2566 col_3019,
+    2567 col_3020,
+    2568 col_3021,
+    2569 col_3022,
+    2570 col_3023,
+    2571 col_3024,
+    2572 col_3025,
+    2573 col_3026,
+    2574 col_3027,
+    2575 col_3028,
+    2576 col_3029,
+    2577 col_3030,
+    2578 col_3031,
+    2579 col_3032,
+    2580 col_3033,
+    2581 col_3034,
+    2582 col_3035,
+    2583 col_3036,
+    2584 col_3037,
+    2585 col_3038,
+    2586 col_3040,
+    2587 col_3041,
+    2588 col_3042,
+    2589 col_3043,
+    2590 col_3044,
+    2591 col_3045,
+    2592 col_3046,
+    2593 col_3047,
+    2594 col_3048,
+    2595 col_3049,
+    2596 col_3050,
+    2597 col_3051,
+    2598 col_3052,
+    2599 col_3053,
+    2600 col_3054,
+    2601 col_3055,
+    2602 col_3056,
+    2603 col_3057,
+    2604 col_3058,
+    2605 col_3059,
+    2606 col_3060,
+    2607 col_3061,
+    2608 col_3062,
+    2609 col_3063,
+    2610 col_3064,
+    2611 col_3065,
+    2612 col_3066,
+    2613 col_3069,
+    2614 col_3070,
+    2615 col_3071,
+    2616 col_3072,
+    2617 col_3073,
+    2618 col_3074,
+    2619 col_3075,
+    2620 col_3077,
+    2621 col_3078,
+    2622 col_3079,
+    2623 col_3080,
+    2624 col_3083,
+    2625 col_3084,
+    2626 col_3085,
+    2627 col_3086,
+    2628 col_3087,
+    2629 col_3088,
+    2630 col_3089,
+    2631 col_3090,
+    2632 col_3091,
+    2633 col_3092,
+    2634 col_3093,
+    2635 col_3094,
+    2636 col_3095,
+    2637 col_3096,
+    2638 col_3097,
+    2639 col_3098,
+    2640 col_3099,
+    2641 col_3100,
+    2642 col_3101,
+    2643 col_3103,
+    2644 col_3104,
+    2645 col_3105,
+    2646 col_3106,
+    2647 col_3108,
+    2648 col_3109,
+    2649 col_3113,
+    2650 col_3114,
+    2651 col_3115,
+    2652 col_3116,
+    2653 col_3117,
+    2654 col_3118,
+    2655 col_3119,
+    2656 col_3120,
+    2657 col_3121,
+    2658 col_3122,
+    2659 col_3123,
+    2660 col_3124,
+    2661 col_3125,
+    2662 col_3126,
+    2663 col_3127,
+    2664 col_3129,
+    2665 col_3130,
+    2666 col_3131,
+    2667 col_3134,
+    2668 col_3135,
+    2669 col_3136,
+    2670 col_3137,
+    2671 col_3138,
+    2672 col_3139,
+    2673 col_3140,
+    2674 col_3141,
+    2675 col_3142,
+    2676 col_3143,
+    2677 col_3144,
+    2678 col_3145,
+    2679 col_3146,
+    2680 col_3147,
+    2681 col_3148,
+    2682 col_3149,
+    2683 col_3150,
+    2684 col_3151,
+    2685 col_3152,
+    2686 col_3153,
+    2687 col_3154,
+    2688 col_3155,
+    2689 col_3156,
+    2690 col_3159,
+    2691 col_3160,
+    2692 col_3161,
+    2693 col_3162,
+    2694 col_3163,
+    2695 col_3164,
+    2696 col_3165,
+    2697 col_3166,
+    2698 col_3167,
+    2699 col_3168,
+    2700 col_3169,
+    2701 col_3170,
+    2702 col_3171,
+    2703 col_3172,
+    2704 col_3173,
+    2705 col_3174,
+    2706 col_3176,
+    2707 col_3177,
+    2708 col_3178,
+    2709 col_3179,
+    2710 col_3180,
+    2711 col_3184,
+    2712 col_3188,
+    2713 col_3191,
+    2714 col_3196,
+    2715 col_3197,
+    2716 col_3198,
+    2717 col_3199,
+    2718 col_3200,
+    2719 col_3201,
+    2720 col_3202,
+    2721 col_3205,
+    2722 col_3206,
+    2723 col_3208 ;
+Format Datatype = Standard Symbols="01" missing = '?' ;
+Matrix
+temporariaDMH84R1             111011111010011110110000000001111111001000101101111110000000000000011011111111001110111001101111011001100010000000000000000101000000000111101111001111111100000011111111000011011101100111000110000000000001111111110111111111100011111111101110000000000101111011011111110001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000111111100111101111111111010000000000000000000010111111101111110000011110111111110001001110111111 [...]
+boyliiMVZ148929               111011111010011110110000000001111111000000000001111110000000000000001011111111001110111001101111011001111010000000000000000101000000000111101111001111111100000011111111000011011101100111000111000000000101111001110111110000000011111111101110000000000101111110011111100001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000011111100111101111111111010000000000000000000010111101101111110000011110111111110001001110111111 [...]
+luteiventris_MT_MVZ191016     111011111010011110110000000001111111000000000001111110000000000000011011111111001110111001101111011001111010000000000000000101000000000111101111001111111100000011111110000011011101100111000111000000000101111111110111110000000011111111101010000000000000001011011111110001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000111111100111101111111111010000000000000000000010111111101111110000011110111111110001001110111111 [...]
+luteiventris_WA_MVZ225749     111011111010011110110000000001111111000000000001111110000000000000011011111111001110111001101111011001111010000000000000000101000000000111101111001111111100000011111110000011011101100111000111000000000101111111110111110000000011111111101010000000000000001011011111110001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000111111100111101111111111010000000000000000000010111111101111110000011110111111110001001110111111 [...]
+muscosaMVZ149006              111011111010011110110000000001111111001000101101111110000000000000011011111111001110111001101111011001111010000000000000000000000000000111101111001111111100000011111111000011011101100111000111000000000101111111110111110000000011111111101110000000000101111011011111110001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000111111100001101111111111010000000000000000000010111111101111110000011110111111110001001110000111 [...]
+auroraMVZ13957                011011111010011110110000000001111111001000101101111110000000000000011011111111001110111001101111011001111010000000000000000101000000000111101111001111111100000011111111000011011101100111000111000000000101111111110111110000000011111111101110000000000101111011011111110001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000111111100001101111111011010000000000000000000010111111101111110000011110111111110001001110000111 [...]
+cascadaeMVZ148946             111011111010011110110000000001111111001000101101111110000000000000011011111111001110111001101111011001111010000000000000000101000000000111101111001111111100000011111111000011011101100111000111000000000101111111110111110000000011111111101110000000000101111011011111110001100000001000011110011000000001000001010001110011111110000000111111111100100000000110010000000000111111100001101111111011010000000000000000000010111111101111110000011110111111110001001110000111 [...]
+sylvaticaMVZ137426            111011111010011110110000000001111111001000101101111000000000000000011011100000000110111000000000000000111010000000000000000101000000000111101111001111111100000000000011000001011101100111000111111110010101111111110111110000000011111111111110000000000101111011011111110001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000111111100111100111111111010011000000000010111010111000000000110000011110111111111011111110100111 [...]
+sylvaticaDMH84R43             111011111010011110110000000001111111001000101101111000000000000000011011100000000110111000000000000000111010000000000000000101000000000111101111001111111100000000000011000001011101100111000111111110010101111111110111110000000011111111111110000000000101111011011111110001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000111111100111100111111111010011000000000010111010111000000000110000011110111111111011111110100111 [...]
+septentrionalesDCC3588        111111100011011110110000000001111111001000101101111110000000000000011011100000000110111001111111111111111010000000000000000101000000000111101111001111111100000000000011000011011100000111000111111110010101111111110111110000000011111111101110000000000101111011011111110001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000111111100111100111111111010011000000000010111010111011101110110000111110111111111011001110111111 [...]
+grylioMVZ175945               111111100011011110110000000001111111001000101101111110000000000000011011100000000110111001111111111001111010000000000000000101000000000111101111001111111110000000000011000011011100000111000111111110010101111111110111110000000011111111101110000000000101111011011111110001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000111111100111100111111111010011000000000010111010111011101110110000011110111111111011001110111111 [...]
+okaloosae                     111111100011011110110000000001111111001000101101111110000000000000011011100000000110111001111111111001111010000000000000000101000000000111101111001111111100000000000011000011011100000111000111111110010101111111110111110000000011111111101110000000000101111011011111110001100000001111111110011000000001000000000001110011111110000000111111111100100000000110010000000000111111100111100111111111010011000000000010111010111011101110110000011110111111111011001110111111 [...]
+clamitansJSF1118              111111100011011110110000000001111111001000101101111110000000000000011011100000000110111001111111111001111010000000000000000101000000000111101111001111111100000000000011000011011100000111000111111110010101111111110111110000000011111111101110000000000101111011011111110001100000001111111110011000000001000000000001110011111110000000111111111100100000000110010000000000111111100111100111111111010011000000000010111010111011101110110000011110111111111011001110111111 [...]
+heckscheriMVZ164908           111111100011011110110000000001111111001000101101111110000000000000011011100000000110111001111111111001111010000000000000000101000000000111101111001111111100000000000011000011011100000111000111111110010101111111110111110000000011111111101110000000000101111011010011110001100000001111111110011000000001000000000001110011111110000000111111111100100000000110010000000000111111100111100111111111010011000000000010111010111011101110110000011110111111111011001110111111 [...]
+catesbianaX12841              111111100011011110110000000001111111001000101101101110000000000000011011100000000110111001111111111001111010000000000000000101000000000111101111001111111100000000000011000011011100000111000111111110010101111111110111110000000011111111101110000000000101111011011111110001100000001111111110011000000001000000000001110011111110000000111111111100100000000110010000000000111111100111100111111111010011000000000010111010111011101110110000011110111111111011001110111111 [...]
+catesbianaDMH84R2             111111100011011110110000000001111111001000101101101110000000000000011011100000000110111001111111111001111010000000000000000101000000000111101111001111111100000000000011000011011100000111000111111110010101111111110111110000000011111111101110000000000101111011011111110001100000001111111110011000000001000000000001110011111110000000111111111100100000000110010000000000111111100111100111111111010011000000000010111010111011101110110000011110111111111011001110111111 [...]
+virgatipesMVZ175944           111111111011011110110000000001111011001000101101111110000000000000011011100000000110111001111111111001111010000000000000000101000000000111101111001111111100000000000011000111011100000111000111111110010101111111110110000000000000011111101110000000000101111011011111110001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000111111100111100111111111010011000000000010111010111011101110110000011110111111111011001110111111 [...]
+maculataKU195258              111011111010011110110000000001111111001000101101111110000000110110011011111111001110001001101111011001111010000000000000000101000000000111101111001111111100001000000011110011000101100111000111111110010101111111110111110000000011111111101110000000000101111011011111111101100000001111111110011000000000000001010001110011111110000000111111111100100000000110010000000000100111110111100111110111010011000000000010111010111111101110110000011110111111111011001110111111 [...]
+vibicariaMVZ11035             111010000000000000110000000001111111001000101101100000000000110110011011111111001110001111111111011001111010000000010000000101000000000110000000000000111100000100000011000011000101100111000111111110011101111111110111110000000011101111101110000000000101111011011000000000100000001111011110011000000000000001010001110011111110000000111111111100100000000110011111111100100111100111110111111111010011000000000010111010111111101110110000011110100000000010001110111111 [...]
+warszewitshiiJSF1127          111011111000011110110000000001101111001000101101100010000000110100001011011111001110001001111111011001111010000000000000000101000000000000000000000000000000000100000011000011000101100111000111111110011101111111110111110000011111100000101110000000000101011011011110000000011110001110000000000000000000000001010001110011111111111111111111011100100000000100010000000000100111100111100111111111010011000000000010111010111111111110110000011110100000000011001110111111 [...]
+palmipesVenAMNHA118801        111011111010011110110000000001111111001000101101111110000111111110011011111111001110111001111111011001111010000000000000000101000000000111101111001111111100000000000011000011000101100111000111111110010101111111110111110000000011111111101110000000000101101011011111110001100000000111111110001000000001000001010000000001111110000000111111111100100000000110000000000000000000100111100111111111010011000000000010111010110111101110110000011110111111111011001110111111 [...]
+palmipesEcuKU204425           111011111010011110110000000001111111001000101101111110000111111110011011111111001110111001111111011001111010000000000000000101000000000111101111001111111100000000000011000011000101100111000111111110010101111111110111110000000011111111101110000000000101101011011111110001100000000111111110011000000001000001010000000001111110000000111111111100100000000110010000000000100111100111100111111111010011000000000010111010110111101110110000011110111111111011001110111111 [...]
+Sp_1_ecuadorQCAZ13219         111011111010011110110000000001111111001000101101111110000000111110011011111111001110111001111111011001111010000000000000000101000000000111101111001111111100000000000011000011000101111111000111111110010101111111110111110000000011111111101110000000000101101011011111110001100000000111111110011000000001000001010000000001111110000000111111111100100000000110010000000000100111100111100111111111010011000000000010111010111111101110110000011110111111110011001110111111 [...]
+bwanaQCAZ13964                111011111010011110110000000001111111001000101101111110000000111110011011100000001110111001111111011001111010000000000000000101000000000111101111001100111100000000000011001011000101100111000111111110010101111111110111110000000011111111101110000000000101101011011111110001100000000111111110011000000001000001010000000001000110000000111101111100100000000110010000000000100111100111100111111111010011000000000010111010111111101110110000011110111111111011001110111111 [...]
+vaillantiKU195299             000000001010011110110000000001110101001000101101111110000000110110011011111111001110111001111111010000111010000000000000000111000000000111101111001111111100000000000011000011000101100111000111111110010101111111110111110000000011111111101100000000000101111011011111110001100000000111111110011000000001000001010000000001111110000000111111111100000000000110010000000000100111100111100111111111010011000000000010111010111111101110110000000010111111111011001110111111 [...]
+julianiTNHC60324              000000001010011110110000000001110111001000101101111110000000110110011011111111001110111001111111010000111010000000000000000101000000000111100000001111111100000000000011000011100101100100000011111110010101110111110000110000000011111111101100000000000101111011011111110001100000000111111111111000000001000001010000000001111110000000111111111100100000000110010000000000100111100111100111111111010011000000000010111010111111101110110000000010111111111011001110111111 [...]
+sierramadrensisKU195181       111011111010011110110000000001111111001000101101111110000000000000011011111111001100111001111111011001111110000000000000000101000000000111101111001111111100000000000011000011000101100111000111111110010100001111110111110000000011111111101110000000000101111011011111110001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000100111100111100111111111110011000000000010111011111111101110110000010000011111111010000000011100 [...]
+psilonotaKU195119             111011001000000110110000000000001111001000111101111111011000000000011011111111000110110001111111011001000001110000001111110101000000000111101100001111111101110000000011000011000101100111000111111110010100000011110111110000000011111111101110000000000000111011011111110001100000001111111110011000000001000001010001110011111110000000111111111000100000000110010000000000100111100111100111111111110011000000000010111010100111101110110000011110111111111010000000011111 [...]
+zweifeliJAC7514               000011111010011110110000000001111111001000101101111111111000000000011011111111001110111001111111011001000000110000000000000101000000000111101100001111111101110000000011000011000101100111000111111110010100001111110111110000000011111111101110000000000101111001011111110001100000001111111110001000000001000001010001110011111110000000111111111000100000000110010000000011100111100111100111111111110011000000000010111010100111101110110000011110111111111010000000011111 [...]
+tarahumaraeKU194596           101011100010011110110000000001111111001111101101111111111000000000011011111111001110111001111111011001111010110000000000000101000000000111101100001111111101110000000011000011000101100111000111111110010110001111110111110000000011111111101110000000000101110011011111110011100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000100111100111100111111111110011000000000010111010100111101110110000011110111111111010000000011111 [...]
+pustulosaJAC10555             111011111010011111110000000001111111001111101101111111111000000000011011111111001110111001111111011001000000110000000000000101000000000111101100001111111101110000000011000011000101100111000111111110010100001111110111110000000011111111101110000000000101110011011111110001100000001111111110011000000001000001010001110011111110000000100111111100100000000110010000000000100111000000000000111111110011000000000010111010100111101110110000011110111111111110000000011111 [...]
+pipiensJSF1119                111011111010011110110000000001111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111100011111111111101111011011111110000100001111111111110001000000001000001010001110011111110000000111111111100100000000110010000000000100111101111100010011011010011111111111111111000111111101110110000011110111111111011001111111111 [...]
+pipiensY10945                 111011111010011110110000000001111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110011110100001111110111110000000011111111100011111111111101111011011111110000100001111111111110001000000001000001010001110011111100000000000011111100100000000110010000000000100111101111100011111011010011111111111111111000111111101110110000011110111111111011001111111111 [...]
+dunniJSF1017                  111011111010011110000000000001111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000001100111000111110010010100001111110110000000000000011111100010000000000101111011011111110000100001111111111110001000000001000001010001110011111110000000111111111100100000000110000000000000100111100111100011111011010011000000000011111000111111101110110000011110111111111011001111111111 [...]
+montezumaeJAC8836             111011111010011110000000000001111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000001100111000111110010010100001111110110000000000000011100000010000000000101111011011111110000100001111111111110001000000001000001010001110011111110000000111111111100100000000110000000000000100111100111100011111011010011000000000011111000111111101110110000011110111111111011001111111111 [...]
+sp_2_mex_JSF1106              111011111010011110000000000001111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110110000000000000011111100010000000000101111011011111110000100001111111111110001000000001111111010001110011111110000000111111111100100000000111100000000000100111100111100011111011010011000000000011111000111111101110110000011110111111111011001111111111 [...]
+chiricahuensisJSF1063         111011111010011110000000000001111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110110000000000000011111100010000000000101111011011111110000100001111111111110001000000001000001010000000011111110000000111111111100100000000110000000000000100111100111100011111011010011000000000011111100111111101110110000011110111111111011001111111111 [...]
+subaquavocalis                111011111010111110000000000001111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110110000000000000011111100010000000000101111011011111110000100001111111111110001000000001000001010001110011111110000000111111111100100000000110000000000000100111100111100011111011010011000000000011111000111111101110110000011110111111111011001111111111 [...]
+chiricahuensisJSF1092         111011111010011110000000000001111111001000101001111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110110000000000000011111100010000000000101111011011111110000100001111111111110001000000001000001010001110011111110000000111111111100100000000110000000000000100111100111100011111011010011000000000011111000111111101110110000011110111111111011001111111111 [...]
+palustrisJSF1110              111011111010011110110000000001111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000001111111110001100011111000001010001111111111110000000111111111100100000000110010000000000100111100111100011111011010011000000000011111000111111101110110000011100100001111011001110111111 [...]
+areolataJSF1111               111011111010011110110000000001111111001000101101111110000000000000010011111111111111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000001111111110001100011111000001010001111111111110000000111110000000000000000010010000000000100111100111100011111011010011000000000011111000111111101110000000011100100001111011001110111111 [...]
+sevosaUSC8236                 111011111010011110110000000001111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000001111111110001100011111000001010001111111111110000000111110000000000000000010010000000000100111100111100011111011010011000000000011111000111111101110111111011100100001111011001110111111 [...]
+capitoSLU003                  111011111010011110110000000001111110001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000000111111110001100011111000001010001111111111110000000111110000000000000000010010000000000000000100111100011111011010011000000000011111000111111101110111111011100100001111011001110111111 [...]
+spectabilisJAC8622            111011111010011110110000000001011111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000001111111110001100011111000001010001111111111110000000111111111111100000000110010000000000100111100111100011111011010011000000000011111000111111001110110000011111111111101011001110111111 [...]
+omiltemanaJAC7413             111011111010011110110000000001111111001000101101111110000000000000011011100000001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000001111111110001111111111000001010001111111111110000000111111111111100000000110010000000000100111100111100011111011010011000000000011111000111111100110110000011110111111101011001110111111 [...]
+sp_3_MichoacanJSF955          111011111010011110110000000001111111001000101101111110000000000000001011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101110011011111110000100000001111111110001100011111000001010001111111111110000000111111111111100000000110010000000000100111100111100011111011010011000000000011111000111111101110110000011110111111101011001110111111 [...]
+tlalociJSF1083                111011111010011110110000000001111111001000101101101110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000100000000000011110010010100001111110111110000000011111111101110000000000101111011011101110000100000001111000110001100011111000001010001111111111110000000111111111111100000000110010000000000100111100111100000000000010011000000000011111000111111101110110000011110111111101011001110111111 [...]
+neovolcanicaJSF960            111011111010011110110000000001111111001000101101101110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011011101110000100000001111000110001100011111000001010001111111111110000000111111111111100000000110010000000000100111100111100000000000010011000000000011111000111111101110110000011110111111101011001110111111 [...]
+berlandieriJSF1136            111011111010011110110000000001111111001000101101101110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011011101110000100000001111000110001100011111000001010001111111111110000000111111111111100000000110010000000000100111100111100000000000010011000000000011111000111111101110110000011110111111101011001110111111 [...]
+blairiJSF830                  111011111010011110110000000001111111001000101101101110000000000000011011111111001111111001111111011001111010001111100000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011011101110000100000001111000110001100011111000001010000111111111110000000111111111111100000000110010000000000100111100111100000000000010011000000000011111000111111101110110000011110111111101011001110111111 [...]
+sphenocephalaUSC7448          111011111010011110110000000001111111001000101101101110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000001111111110001100011111000001010001111111111110000000111111111111100000000110010000000000100111100111100011111001010011000000000011111000111111101110110000011110111111101011001110111111 [...]
+utriculariaJSF845             111011111010011110110000000001111111001000101101101110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000001111111110001100011111000001010001111111111110000000111111111111100000000110010000000000100111100111100011111001010011000000000011111000111111101110110000011110111111101011001110110111 [...]
+forreriJSF1065                110001111010011110110000000001111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011111111110000100000001111111110000000010111000001011101111111111000000000000111111111100000000110010000000000100111100111100011111011010011000000000011111000111111101110110000011110111111101011001110111011 [...]
+magnaocularisJSF1073          111011111000011110111000000001111111001000101101111110000000000001111000001111001111111001011111011001111010000000000000000101000000000111101111111111111100000000000011000010000011100110000000110010010100001000010111110000000011111111101110000000000101111011000011110000100000001111111110000000011111000001000011111111111110000000111111111111100000000110010000000000100111100111100011111011001111000000000011111000111111101110110000011110111111101011001110111111 [...]
+sp_7_JaliscoJSF1000           111011111010011110111111110001111111001000101101111110000000000000011011111100000001111001011111011001111010000000000000000101000000000111101111111111111100000000000011000011000111100111000111110010010100001000000111110000000011111111101110000000000101111011011111110000100000001111111110000000011111000001110001111111111110000000111111111111100000000110010000000000100111100111100011111011011111000000000011111000011111101110110000011110111111101011001110111111 [...]
+yavapaiensisJSF1085           111011111010011110110000000001111111111000101101111110000000000000011111111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000111100100000011110010010100001111110111110000000011110011101110000000000101111001011111110000100000001111111110000000011111000001010001111111111110000000111101111111111111111110010000000000100111100111100011111011011111000000000011111000111111101110110000011110111111101011001110111111 [...]
+oncaLVT3542                   111011111010011110110000000001111111111000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000111100100000011110010010100001111110111110000000011110011101110000000000101111001011111110000100000001111111110000000011111000001010001111111111110000000111101111111111111111110010000000000100111100111100011111011011111000000000011111000111111101110110000011110111111101011001110111111 [...]
+sp_8_PueblaJAC9467            111011111010011110110000000001111111111000101111111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000111100100000011110010010100001000110111110000000011111111101110000000000101111010011111110000100000001111111110000000011111000001010001111111111110000000111111111111111111111110010000000000100111100111100011000000001111000000000011111000111101101110110000011110111111101011001110111111 [...]
+macroglossaJAC10472           111011111010011110110000000001111111001000101100000110000000000000011011111111001111111001111111011001111010000000000000000101000000000111111111111111111100000000000000000011000111100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000001111111110000000011111000001010001111111111110000000111111111111100000000110010000000000100111100111100011111011010011000000000011111000111111101110110000011110111111101011001110111111 [...]
+macroglossaJSF7933            111011111010011110110000000001111111001000101100000110000000000000011011111111001111111001111111011001111010000000000000000101000000000111111111111111111100000000000000000011000111100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000001111111110000000011111000001010001111111111110000000111111111111100000000110010000000000100111100111100011111011010011000000000011111000111111101110110000011110111111101011001110111111 [...]
+taylori286                    111011111010011110110000001111111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000101111111111111111100000000000011000011000111100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000001111111110000000011111000001010001111111111110000000111111111111100000000110010000000000100111100111100011111011010011000000000011111000111111101110110000011110100111101011001110111111 [...]
+sp_4_Panama                   111011111010011110110000000001111111001000101101111110000000000000011011111111001111111001111111011001111000000000000000000101000000000111101111111111111100000000000011000011000111100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000001111111110000000011111000001010001111111111110000000111111111111100000000110010000000000100111100111100011111011010011000000000011111000111111101110110000011110111111101011001110111111 [...]
+sp_5_CostaRichDMH86_210       111011111110011110110000000001111111001000101101111110000000000000011011111111001111101001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000111100111111111110010010100001111110111110000000011111111101110000000000111111011011111110000100000001111111110000000011111000001010001111111111110000000111111111111100000000110010000000000100111100111100011111011010011000000000011111000111111101110110000011110111111101011001110111111 [...]
+sp_6_CostaRicaDMH86_225       111011111010011110110000000001111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000001101111111111111101111111111111100000000000011000011000111100111000111110010010100001111111111110000000011111111101110000000000101111011011111110000100000001111111110000000011111000001010001111110111110000000111111111111100000000110010000000000100111100111100011111011010011000000000011111000111111101110110000011110111111101001001110111111 [...]
+;
+END;
diff --git a/example/partition/exampleRuns/dna+Mkv/garli.conf b/example/partition/exampleRuns/dna+Mkv/garli.conf
new file mode 100644
index 0000000..2450a7b
--- /dev/null
+++ b/example/partition/exampleRuns/dna+Mkv/garli.conf
@@ -0,0 +1,75 @@
+[general]
+datafname = dnaPlusGapCoding.nex
+constraintfile = none
+streefname = random
+attachmentspertaxon = 100
+ofprefix = mixedDnaMkv
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 10000
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+outputsitelikelihoods = 0
+optimizeinputonly = 0
+collapsebranches = 1
+
+searchreps = 2
+bootstrapreps = 0
+linkmodels = 0
+subsetspecificrates = 1
+
+[model1]
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[model2]
+datatype = standardvariable
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
diff --git a/example/partition/exampleRuns/dna+Mkv/mixedDnaMkv.best.all.tre b/example/partition/exampleRuns/dna+Mkv/mixedDnaMkv.best.all.tre
new file mode 100644
index 0000000..0fd698c
--- /dev/null
+++ b/example/partition/exampleRuns/dna+Mkv/mixedDnaMkv.best.all.tre
@@ -0,0 +1,79 @@
+#NEXUS
+
+begin trees;
+translate
+  1  temporariaDMH84R1,
+  2  boyliiMVZ148929,
+  3  luteiventris_MT_MVZ191016,
+  4  luteiventris_WA_MVZ225749,
+  5  muscosaMVZ149006,
+  6  auroraMVZ13957,
+  7  cascadaeMVZ148946,
+  8  sylvaticaMVZ137426,
+  9  sylvaticaDMH84R43,
+  10  septentrionalesDCC3588,
+  11  grylioMVZ175945,
+  12  okaloosae,
+  13  clamitansJSF1118,
+  14  heckscheriMVZ164908,
+  15  catesbianaX12841,
+  16  catesbianaDMH84R2,
+  17  virgatipesMVZ175944,
+  18  maculataKU195258,
+  19  vibicariaMVZ11035,
+  20  warszewitshiiJSF1127,
+  21  palmipesVenAMNHA118801,
+  22  palmipesEcuKU204425,
+  23  Sp_1_ecuadorQCAZ13219,
+  24  bwanaQCAZ13964,
+  25  vaillantiKU195299,
+  26  julianiTNHC60324,
+  27  sierramadrensisKU195181,
+  28  psilonotaKU195119,
+  29  zweifeliJAC7514,
+  30  tarahumaraeKU194596,
+  31  pustulosaJAC10555,
+  32  pipiensJSF1119,
+  33  pipiensY10945,
+  34  dunniJSF1017,
+  35  montezumaeJAC8836,
+  36  sp_2_mex_JSF1106,
+  37  chiricahuensisJSF1063,
+  38  subaquavocalis,
+  39  chiricahuensisJSF1092,
+  40  palustrisJSF1110,
+  41  areolataJSF1111,
+  42  sevosaUSC8236,
+  43  capitoSLU003,
+  44  spectabilisJAC8622,
+  45  omiltemanaJAC7413,
+  46  sp_3_MichoacanJSF955,
+  47  tlalociJSF1083,
+  48  neovolcanicaJSF960,
+  49  berlandieriJSF1136,
+  50  blairiJSF830,
+  51  sphenocephalaUSC7448,
+  52  utriculariaJSF845,
+  53  forreriJSF1065,
+  54  magnaocularisJSF1073,
+  55  sp_7_JaliscoJSF1000,
+  56  yavapaiensisJSF1085,
+  57  oncaLVT3542,
+  58  sp_8_PueblaJAC9467,
+  59  macroglossaJAC10472,
+  60  macroglossaJSF7933,
+  61  taylori286,
+  62  sp_4_Panama,
+  63  sp_5_CostaRichDMH86_210,
+  64  sp_6_CostaRicaDMH86_225;
+tree rep1 = [&U][!GarliScore -61937.27][!GarliModel  S  1.748119  0.117688  M1 r  2.02871 7.73017 2.08171 0.81780 13.87204 1.00000 e 0.33609 0.22000 0.14234 0.30157 a 0.77482 p 0.43349  M2 e  0.50000  0.50000  ](1:0.17941819,(((17:0.06825516,(10:0.06404833,(11:0.12781767,((13:0.01322966,12:0.01059399):0.01795642,((16:0.00288901,15:0.00000001):0.04973784,14:0.06608698):0.00515382):0.02250318):0.00259060):0.01306057):0.09016985,(9:0.00303898,8:0.01059628):0.12975904):0.04107838,(((((33:0.0 [...]
+tree rep2BEST = [&U][!GarliScore -61937.27015625][!GarliModel  S  1.748173  0.117625  M1 r  2.02754 7.72587 2.08045 0.81707 13.86626 1.00000 e 0.33610 0.22001 0.14233 0.30156 a 0.77477 p 0.43346  M2 e  0.50000  0.50000  ](1:0.17947672,((((18:0.11927940,(19:0.11831549,20:0.22356705):0.17422723):0.04169982,((24:0.06672385,(23:0.03338531,(22:0.00429782,21:0.17969580):0.04868685):0.01871139):0.03360464,(26:0.13218472,25:0.12648334):0.04379631):0.08669472):0.03258189,((((28:0.16422475,29:0.09 [...]
+end;
+[M1
+begin paup;
+clear;
+gett file=mixedDnaMkv.best.all.tre storebr;
+lset userbr nst=6 rmat=(2.02754326 7.72587188 2.08045394 0.81707243 13.86625709) base=(0.33609716 0.22000583 0.14233462) rates=gamma shape= 0.77476879 ncat=4 pinv= 0.43346220;
+end;
+
+]
diff --git a/example/partition/exampleRuns/dna+Mkv/mixedDnaMkv.best.tre b/example/partition/exampleRuns/dna+Mkv/mixedDnaMkv.best.tre
new file mode 100644
index 0000000..7049001
--- /dev/null
+++ b/example/partition/exampleRuns/dna+Mkv/mixedDnaMkv.best.tre
@@ -0,0 +1,73 @@
+#NEXUS
+
+begin trees;
+translate
+ 1 temporariaDMH84R1,
+ 2 boyliiMVZ148929,
+ 3 luteiventris_MT_MVZ191016,
+ 4 luteiventris_WA_MVZ225749,
+ 5 muscosaMVZ149006,
+ 6 auroraMVZ13957,
+ 7 cascadaeMVZ148946,
+ 8 sylvaticaMVZ137426,
+ 9 sylvaticaDMH84R43,
+ 10 septentrionalesDCC3588,
+ 11 grylioMVZ175945,
+ 12 okaloosae,
+ 13 clamitansJSF1118,
+ 14 heckscheriMVZ164908,
+ 15 catesbianaX12841,
+ 16 catesbianaDMH84R2,
+ 17 virgatipesMVZ175944,
+ 18 maculataKU195258,
+ 19 vibicariaMVZ11035,
+ 20 warszewitshiiJSF1127,
+ 21 palmipesVenAMNHA118801,
+ 22 palmipesEcuKU204425,
+ 23 Sp_1_ecuadorQCAZ13219,
+ 24 bwanaQCAZ13964,
+ 25 vaillantiKU195299,
+ 26 julianiTNHC60324,
+ 27 sierramadrensisKU195181,
+ 28 psilonotaKU195119,
+ 29 zweifeliJAC7514,
+ 30 tarahumaraeKU194596,
+ 31 pustulosaJAC10555,
+ 32 pipiensJSF1119,
+ 33 pipiensY10945,
+ 34 dunniJSF1017,
+ 35 montezumaeJAC8836,
+ 36 sp_2_mex_JSF1106,
+ 37 chiricahuensisJSF1063,
+ 38 subaquavocalis,
+ 39 chiricahuensisJSF1092,
+ 40 palustrisJSF1110,
+ 41 areolataJSF1111,
+ 42 sevosaUSC8236,
+ 43 capitoSLU003,
+ 44 spectabilisJAC8622,
+ 45 omiltemanaJAC7413,
+ 46 sp_3_MichoacanJSF955,
+ 47 tlalociJSF1083,
+ 48 neovolcanicaJSF960,
+ 49 berlandieriJSF1136,
+ 50 blairiJSF830,
+ 51 sphenocephalaUSC7448,
+ 52 utriculariaJSF845,
+ 53 forreriJSF1065,
+ 54 magnaocularisJSF1073,
+ 55 sp_7_JaliscoJSF1000,
+ 56 yavapaiensisJSF1085,
+ 57 oncaLVT3542,
+ 58 sp_8_PueblaJAC9467,
+ 59 macroglossaJAC10472,
+ 60 macroglossaJSF7933,
+ 61 taylori286,
+ 62 sp_4_Panama,
+ 63 sp_5_CostaRichDMH86_210,
+ 64 sp_6_CostaRicaDMH86_225;
+tree bestREP2 = [&U][!GarliScore -61937.270156][!GarliModel  S  1.748173  0.117625  M1 r  2.02754 7.72587 2.08045 0.81707 13.86626 1.00000 e 0.33610 0.22001 0.14233 0.30156 a 0.77477 p 0.43346  M2 e  0.50000  0.50000  ](1:0.17947672,((((18:0.11927940,(19:0.11831549,20:0.22356705):0.17422723):0.04169982,((24:0.06672385,(23:0.03338531,(22:0.00429782,21:0.17969580):0.04868685):0.01871139):0.03360464,(26:0.13218472,25:0.12648334):0.04379631):0.08669472):0.03258189,((((28:0.16422475,29:0.0979 [...]
+end;
+[
+ S  1.748173  0.117625  M1 r  2.02754 7.72587 2.08045 0.81707 13.86626 1.00000 e 0.33610 0.22001 0.14233 0.30156 a 0.77477 p 0.43346  M2 e  0.50000  0.50000  
+]
diff --git a/example/partition/exampleRuns/dna+Mkv/mixedDnaMkv.log00.log b/example/partition/exampleRuns/dna+Mkv/mixedDnaMkv.log00.log
new file mode 100644
index 0000000..08aea76
--- /dev/null
+++ b/example/partition/exampleRuns/dna+Mkv/mixedDnaMkv.log00.log
@@ -0,0 +1,3292 @@
+Search rep 1 (of 2)
+random seed = 853654
+gen	best_like	time	optPrecision
+0	-101113.0297	28	0.5
+10	-100820.8477	29	0.5
+20	-99463.88968	29	0.5
+30	-98493.98737	30	0.5
+40	-98312.10553	30	0.5
+50	-96647.35981	31	0.5
+60	-94451.32369	32	0.5
+70	-94064.80284	32	0.5
+80	-92886.97454	33	0.5
+90	-91512.29965	33	0.5
+100	-90517.35366	34	0.5
+110	-90300.81805	35	0.5
+120	-88132.16511	35	0.5
+130	-87799.9098	36	0.5
+140	-86355.32816	36	0.5
+150	-86125.06835	37	0.5
+160	-86024.54664	37	0.5
+170	-84979.84955	38	0.5
+180	-84043.90482	39	0.5
+190	-83362.52924	39	0.5
+200	-83291.80983	40	0.5
+210	-83244.34687	40	0.5
+220	-82563.02346	41	0.5
+230	-82522.44927	41	0.5
+240	-82244.84075	42	0.5
+250	-82198.90106	43	0.5
+260	-80830.67788	43	0.5
+270	-80297.86066	44	0.5
+280	-79288.43519	44	0.5
+290	-78557.51741	45	0.5
+300	-78503.34478	45	0.5
+310	-77614.54839	46	0.5
+320	-76538.03957	46	0.5
+330	-76464.59157	47	0.5
+340	-76374.06924	47	0.5
+350	-75778.65476	48	0.5
+360	-75766.14777	49	0.5
+370	-74619.89639	49	0.5
+380	-74463.70233	50	0.5
+390	-73808.87366	50	0.5
+400	-73032.90792	51	0.5
+410	-73006.33487	51	0.5
+420	-72906.56377	52	0.5
+430	-72490.89132	52	0.5
+440	-72402.7476	53	0.5
+450	-72367.59175	53	0.5
+460	-71459.52105	54	0.5
+470	-70690.6552	55	0.5
+480	-70688.32998	55	0.5
+490	-69774.10168	55	0.5
+500	-69757.18877	56	0.5
+510	-69755.54355	56	0.5
+520	-69108.13277	57	0.5
+530	-68939.8519	58	0.5
+540	-68894.61966	58	0.5
+550	-68894.61966	58	0.5
+560	-68796.96332	59	0.5
+570	-68790.00753	59	0.5
+580	-68444.31206	60	0.5
+590	-67838.85468	60	0.5
+600	-67518.7818	61	0.5
+610	-67517.0523	61	0.5
+620	-67487.23389	62	0.5
+630	-67414.65302	62	0.5
+640	-67035.16876	63	0.5
+650	-66784.98145	63	0.5
+660	-66750.10446	64	0.5
+670	-66597.70036	64	0.5
+680	-66220.31136	65	0.5
+690	-66136.73245	65	0.5
+700	-66093.89128	66	0.5
+710	-66092.51107	66	0.5
+720	-66058.36884	67	0.5
+730	-65768.39892	67	0.5
+740	-65695.74167	68	0.5
+750	-65692.96024	68	0.5
+760	-65691.6879	68	0.5
+770	-65619.21496	69	0.5
+780	-65619.21496	69	0.5
+790	-65611.13894	70	0.5
+800	-65360.84324	70	0.5
+810	-65360.84324	71	0.5
+820	-65356.86001	71	0.5
+830	-65356.86001	71	0.5
+840	-65312.82483	72	0.5
+850	-65250.44599	72	0.5
+860	-65249.0973	73	0.5
+870	-65249.0973	73	0.5
+880	-65040.69938	74	0.5
+890	-65040.69938	74	0.5
+900	-64392.40941	75	0.5
+910	-64358.59015	75	0.5
+920	-64121.05938	75	0.5
+930	-64117.93083	76	0.5
+940	-63332.10981	77	0.5
+950	-63151.38524	77	0.5
+960	-63130.04928	78	0.5
+970	-63105.35674	78	0.5
+980	-63058.76922	79	0.5
+990	-63057.42141	79	0.5
+1000	-63053.1325	80	0.5
+1010	-63049.23666	80	0.5
+1020	-63029.46305	80	0.5
+1030	-62910.53822	81	0.5
+1040	-62833.42267	81	0.5
+1050	-62763.86621	82	0.5
+1060	-62763.86621	82	0.5
+1070	-62642.16077	83	0.5
+1080	-62640.95474	83	0.5
+1090	-62525.13138	84	0.5
+1100	-62393.83472	84	0.5
+1110	-62393.83472	84	0.5
+1120	-62392.95523	85	0.5
+1130	-62392.80314	85	0.5
+1140	-62391.57903	86	0.5
+1150	-62378.72345	86	0.5
+1160	-62090.94144	87	0.5
+1170	-62088.69992	87	0.5
+1180	-62080.29532	88	0.5
+1190	-62069.99382	88	0.5
+1200	-62063.35127	89	0.5
+1210	-62063.23072	89	0.5
+1220	-62062.75001	90	0.5
+1230	-62062.68122	90	0.5
+1240	-62062.50621	90	0.5
+1250	-62062.50621	91	0.5
+1260	-62061.42679	91	0.5
+1270	-62055.81019	92	0.5
+1280	-62015.87516	92	0.5
+1290	-62012.65662	93	0.5
+1300	-62005.35291	93	0.5
+1310	-62001.09751	94	0.5
+1320	-61999.26547	94	0.5
+1330	-61999.26547	95	0.5
+1340	-61998.18558	95	0.5
+1350	-61997.93004	95	0.5
+1360	-61997.64034	96	0.5
+1370	-61997.44654	96	0.5
+1380	-61997.44654	97	0.5
+1390	-61997.44654	97	0.5
+1400	-61997.11065	98	0.5
+1410	-61997.00866	98	0.5
+1420	-61996.73605	99	0.5
+1430	-61996.30766	99	0.5
+1440	-61996.30766	99	0.5
+1450	-61994.66551	100	0.5
+1460	-61994.15738	100	0.5
+1470	-61994.15738	101	0.5
+1480	-61994.11382	101	0.5
+1490	-61994.08117	101	0.5
+1500	-61993.82985	102	0.5
+1510	-61993.40329	102	0.5
+1520	-61993.40329	103	0.5
+1530	-61993.31761	103	0.5
+1540	-61990.30492	103	0.5
+1550	-61989.41057	104	0.5
+1560	-61989.06789	104	0.5
+1570	-61988.92414	105	0.5
+1580	-61988.87258	105	0.5
+1590	-61988.23504	106	0.5
+1600	-61988.1565	106	0.5
+1610	-61988.1565	107	0.5
+1620	-61988.04424	107	0.5
+1630	-61988.04424	107	0.5
+1640	-61988.03059	108	0.5
+1650	-61984.7538	108	0.5
+1660	-61984.7538	108	0.5
+1670	-61984.7538	109	0.5
+1680	-61984.62581	109	0.5
+1690	-61984.61309	110	0.5
+1700	-61984.61134	110	0.5
+1710	-61983.96933	110	0.5
+1720	-61983.66791	111	0.5
+1730	-61982.69771	111	0.5
+1740	-61982.47128	112	0.5
+1750	-61981.3041	112	0.5
+1760	-61980.20534	112	0.5
+1770	-61979.03001	113	0.5
+1780	-61976.76125	113	0.5
+1790	-61976.42917	114	0.5
+1800	-61976.37419	114	0.5
+1810	-61961.56735	115	0.451
+1820	-61959.23752	115	0.451
+1830	-61956.71346	116	0.451
+1840	-61955.99748	116	0.451
+1850	-61955.48605	117	0.451
+1860	-61954.68549	117	0.451
+1870	-61954.40884	117	0.451
+1880	-61952.83534	118	0.451
+1890	-61952.37856	118	0.451
+1900	-61951.65761	118	0.451
+1910	-61951.65235	119	0.451
+1920	-61951.59713	119	0.451
+1930	-61951.17277	119	0.451
+1940	-61950.53516	120	0.451
+1950	-61950.53516	120	0.451
+1960	-61950.35345	121	0.451
+1970	-61950.05876	121	0.451
+1980	-61950.00055	121	0.451
+1990	-61949.63206	122	0.451
+2000	-61949.59783	122	0.451
+2010	-61949.38491	122	0.451
+2020	-61949.26204	123	0.451
+2030	-61948.93053	123	0.451
+2040	-61948.90858	123	0.451
+2050	-61948.43717	124	0.451
+2060	-61947.74497	124	0.451
+2070	-61947.7316	125	0.451
+2080	-61947.50315	125	0.451
+2090	-61947.38546	125	0.451
+2100	-61947.10593	126	0.451
+2110	-61947.10593	126	0.451
+2120	-61946.99735	127	0.451
+2130	-61946.99083	127	0.451
+2140	-61946.99083	127	0.451
+2150	-61946.81033	128	0.451
+2160	-61946.58654	128	0.451
+2170	-61946.33899	128	0.451
+2180	-61946.29242	129	0.451
+2190	-61946.26008	129	0.451
+2200	-61946.07696	130	0.451
+2210	-61945.35873	130	0.451
+2220	-61945.22316	131	0.451
+2230	-61945.01116	131	0.451
+2240	-61944.73236	131	0.451
+2250	-61944.6034	132	0.451
+2260	-61944.47679	132	0.451
+2270	-61944.30789	132	0.451
+2280	-61944.25421	133	0.451
+2290	-61944.08589	133	0.451
+2300	-61944.01816	134	0.451
+2310	-61943.38042	135	0.402
+2320	-61943.26118	135	0.402
+2330	-61943.26118	135	0.402
+2340	-61943.15644	136	0.402
+2350	-61943.0575	136	0.402
+2360	-61942.92033	137	0.402
+2370	-61942.91245	137	0.402
+2380	-61942.91204	137	0.402
+2390	-61942.85258	138	0.402
+2400	-61942.79415	138	0.402
+2410	-61942.75186	138	0.402
+2420	-61942.69282	139	0.402
+2430	-61942.57882	139	0.402
+2440	-61942.57882	140	0.402
+2450	-61942.57882	140	0.402
+2460	-61942.5157	140	0.402
+2470	-61942.5157	141	0.402
+2480	-61942.5157	141	0.402
+2490	-61942.5157	141	0.402
+2500	-61942.35378	142	0.402
+2510	-61942.35378	142	0.402
+2520	-61942.25998	143	0.402
+2530	-61942.25998	143	0.402
+2540	-61942.18145	143	0.402
+2550	-61942.18145	144	0.402
+2560	-61942.12635	144	0.402
+2570	-61942.12635	144	0.402
+2580	-61942.06024	145	0.402
+2590	-61942.06007	145	0.402
+2600	-61942.05506	146	0.402
+2610	-61942.04805	146	0.402
+2620	-61942.0168	146	0.402
+2630	-61941.98237	147	0.402
+2640	-61941.98237	147	0.402
+2650	-61941.94993	147	0.402
+2660	-61941.91322	148	0.402
+2670	-61941.91322	148	0.402
+2680	-61941.91322	148	0.402
+2690	-61941.82912	149	0.402
+2700	-61941.7881	149	0.402
+2710	-61941.68605	150	0.402
+2720	-61941.58352	150	0.402
+2730	-61941.55879	150	0.402
+2740	-61941.55879	151	0.402
+2750	-61941.55879	151	0.402
+2760	-61941.55879	152	0.402
+2770	-61941.55879	152	0.402
+2780	-61941.5493	152	0.402
+2790	-61941.5493	153	0.402
+2800	-61941.5493	153	0.402
+2810	-61941.5323	154	0.353
+2820	-61941.43144	154	0.353
+2830	-61941.43144	155	0.353
+2840	-61941.42789	155	0.353
+2850	-61941.35644	156	0.353
+2860	-61941.35474	156	0.353
+2870	-61941.35474	156	0.353
+2880	-61941.35474	157	0.353
+2890	-61941.34281	157	0.353
+2900	-61941.34281	157	0.353
+2910	-61941.25392	158	0.353
+2920	-61941.21509	158	0.353
+2930	-61941.21509	159	0.353
+2940	-61941.21509	159	0.353
+2950	-61941.20291	159	0.353
+2960	-61941.20291	160	0.353
+2970	-61941.11279	160	0.353
+2980	-61941.11279	161	0.353
+2990	-61940.83965	161	0.353
+3000	-61940.80614	161	0.353
+3010	-61940.80614	162	0.353
+3020	-61940.80614	162	0.353
+3030	-61940.77818	162	0.353
+3040	-61940.7028	163	0.353
+3050	-61940.6949	163	0.353
+3060	-61940.6949	164	0.353
+3070	-61940.6949	164	0.353
+3080	-61940.6949	164	0.353
+3090	-61940.6949	165	0.353
+3100	-61940.68316	165	0.353
+3110	-61940.68316	165	0.353
+3120	-61940.68316	166	0.353
+3130	-61940.5748	166	0.353
+3140	-61940.5748	166	0.353
+3150	-61940.54833	167	0.353
+3160	-61940.51229	167	0.353
+3170	-61940.51229	168	0.353
+3180	-61940.51229	168	0.353
+3190	-61940.48176	168	0.353
+3200	-61940.48176	169	0.353
+3210	-61940.48176	169	0.353
+3220	-61940.48176	170	0.353
+3230	-61940.48176	170	0.353
+3240	-61940.4817	170	0.353
+3250	-61940.4817	171	0.353
+3260	-61940.46987	171	0.353
+3270	-61940.46987	171	0.353
+3280	-61940.45548	172	0.353
+3290	-61940.43326	172	0.353
+3300	-61940.43326	173	0.353
+3310	-61939.97375	174	0.304
+3320	-61939.97	174	0.304
+3330	-61939.87403	174	0.304
+3340	-61939.8659	175	0.304
+3350	-61939.83332	175	0.304
+3360	-61939.83332	176	0.304
+3370	-61939.75762	176	0.304
+3380	-61939.75762	176	0.304
+3390	-61939.75762	177	0.304
+3400	-61939.75762	177	0.304
+3410	-61939.75762	178	0.304
+3420	-61939.74678	178	0.304
+3430	-61939.73744	178	0.304
+3440	-61939.73443	179	0.304
+3450	-61939.73443	179	0.304
+3460	-61939.71705	179	0.304
+3470	-61939.69166	180	0.304
+3480	-61939.69166	180	0.304
+3490	-61939.69166	181	0.304
+3500	-61939.69166	181	0.304
+3510	-61939.67519	181	0.304
+3520	-61939.67519	182	0.304
+3530	-61939.67519	182	0.304
+3540	-61939.67519	182	0.304
+3550	-61939.6222	183	0.304
+3560	-61939.59002	183	0.304
+3570	-61939.57998	184	0.304
+3580	-61939.55716	184	0.304
+3590	-61939.55265	184	0.304
+3600	-61939.55265	185	0.304
+3610	-61939.55265	185	0.304
+3620	-61939.55265	186	0.304
+3630	-61939.52605	186	0.304
+3640	-61939.49636	186	0.304
+3650	-61939.45737	187	0.304
+3660	-61939.45737	187	0.304
+3670	-61939.38636	188	0.304
+3680	-61939.38636	188	0.304
+3690	-61939.38636	188	0.304
+3700	-61939.38284	189	0.304
+3710	-61939.38283	189	0.304
+3720	-61939.38147	190	0.304
+3730	-61939.38147	190	0.304
+3740	-61939.38147	190	0.304
+3750	-61939.37762	191	0.304
+3760	-61939.37725	191	0.304
+3770	-61939.37725	191	0.304
+3780	-61939.37683	192	0.304
+3790	-61939.37683	192	0.304
+3800	-61939.36642	193	0.304
+3810	-61939.35423	194	0.255
+3820	-61939.35423	194	0.255
+3830	-61939.35423	195	0.255
+3840	-61939.35423	195	0.255
+3850	-61939.34593	195	0.255
+3860	-61939.31991	196	0.255
+3870	-61939.31991	196	0.255
+3880	-61939.31991	196	0.255
+3890	-61939.2903	197	0.255
+3900	-61939.28761	197	0.255
+3910	-61939.28696	198	0.255
+3920	-61939.28095	198	0.255
+3930	-61939.28095	199	0.255
+3940	-61939.28095	199	0.255
+3950	-61939.28066	199	0.255
+3960	-61939.28066	200	0.255
+3970	-61939.28066	200	0.255
+3980	-61939.22923	201	0.255
+3990	-61939.22923	201	0.255
+4000	-61939.22923	201	0.255
+4010	-61939.22923	202	0.255
+4020	-61939.22923	202	0.255
+4030	-61939.22817	203	0.255
+4040	-61939.15429	203	0.255
+4050	-61939.15429	203	0.255
+4060	-61939.10709	204	0.255
+4070	-61939.10709	204	0.255
+4080	-61939.10709	205	0.255
+4090	-61939.10709	205	0.255
+4100	-61939.10709	205	0.255
+4110	-61939.10709	206	0.255
+4120	-61939.10541	206	0.255
+4130	-61939.08723	207	0.255
+4140	-61939.08723	207	0.255
+4150	-61939.08723	207	0.255
+4160	-61939.08723	208	0.255
+4170	-61939.06628	208	0.255
+4180	-61939.033	209	0.255
+4190	-61938.98242	209	0.255
+4200	-61938.98242	209	0.255
+4210	-61938.98242	210	0.255
+4220	-61938.98242	210	0.255
+4230	-61938.98242	211	0.255
+4240	-61938.98242	211	0.255
+4250	-61938.98242	212	0.255
+4260	-61938.98242	212	0.255
+4270	-61938.98242	212	0.255
+4280	-61938.98242	213	0.255
+4290	-61938.98242	213	0.255
+4300	-61938.9732	214	0.255
+4310	-61938.64161	215	0.206
+4320	-61938.64161	215	0.206
+4330	-61938.62753	216	0.206
+4340	-61938.62753	216	0.206
+4350	-61938.62753	216	0.206
+4360	-61938.62753	217	0.206
+4370	-61938.62753	217	0.206
+4380	-61938.62753	218	0.206
+4390	-61938.62753	218	0.206
+4400	-61938.62753	218	0.206
+4410	-61938.62753	219	0.206
+4420	-61938.62753	219	0.206
+4430	-61938.62753	220	0.206
+4440	-61938.62753	220	0.206
+4450	-61938.62753	221	0.206
+4460	-61938.58885	221	0.206
+4470	-61938.58527	221	0.206
+4480	-61938.58527	222	0.206
+4490	-61938.58048	222	0.206
+4500	-61938.54276	223	0.206
+4510	-61938.54276	223	0.206
+4520	-61938.54276	223	0.206
+4530	-61938.54276	224	0.206
+4540	-61938.51489	224	0.206
+4550	-61938.51489	225	0.206
+4560	-61938.51489	225	0.206
+4570	-61938.51489	225	0.206
+4580	-61938.51139	226	0.206
+4590	-61938.51139	226	0.206
+4600	-61938.51139	227	0.206
+4610	-61938.51139	227	0.206
+4620	-61938.51139	227	0.206
+4630	-61938.51139	228	0.206
+4640	-61938.51139	228	0.206
+4650	-61938.51139	229	0.206
+4660	-61938.51103	229	0.206
+4670	-61938.51103	230	0.206
+4680	-61938.51103	230	0.206
+4690	-61938.51103	230	0.206
+4700	-61938.51103	231	0.206
+4710	-61938.46659	231	0.206
+4720	-61938.46659	231	0.206
+4730	-61938.46659	232	0.206
+4740	-61938.45889	232	0.206
+4750	-61938.44334	233	0.206
+4760	-61938.4303	233	0.206
+4770	-61938.4303	234	0.206
+4780	-61938.4303	234	0.206
+4790	-61938.4303	234	0.206
+4800	-61938.4303	235	0.206
+4810	-61938.42635	236	0.157
+4820	-61938.42439	236	0.157
+4830	-61938.42439	237	0.157
+4840	-61938.42439	237	0.157
+4850	-61938.42439	238	0.157
+4860	-61938.42439	238	0.157
+4870	-61938.42439	238	0.157
+4880	-61938.42439	239	0.157
+4890	-61938.42439	239	0.157
+4900	-61938.42439	240	0.157
+4910	-61938.42439	240	0.157
+4920	-61938.42439	241	0.157
+4930	-61938.42439	241	0.157
+4940	-61938.39937	241	0.157
+4950	-61938.39937	242	0.157
+4960	-61938.39937	242	0.157
+4970	-61938.39347	243	0.157
+4980	-61938.39347	243	0.157
+4990	-61938.36126	243	0.157
+5000	-61938.36126	244	0.157
+5010	-61938.35696	244	0.157
+5020	-61938.35696	245	0.157
+5030	-61938.35696	245	0.157
+5040	-61938.35696	245	0.157
+5050	-61938.35696	246	0.157
+5060	-61938.35696	246	0.157
+5070	-61938.35696	247	0.157
+5080	-61938.35696	247	0.157
+5090	-61938.35696	248	0.157
+5100	-61938.35696	248	0.157
+5110	-61938.3504	248	0.157
+5120	-61938.34058	249	0.157
+5130	-61938.34058	249	0.157
+5140	-61938.32831	250	0.157
+5150	-61938.32831	250	0.157
+5160	-61938.32607	250	0.157
+5170	-61938.32607	251	0.157
+5180	-61938.32607	251	0.157
+5190	-61938.32573	252	0.157
+5200	-61938.32573	252	0.157
+5210	-61938.32316	253	0.157
+5220	-61938.32316	253	0.157
+5230	-61938.32316	253	0.157
+5240	-61938.32316	254	0.157
+5250	-61938.32316	254	0.157
+5260	-61938.32316	255	0.157
+5270	-61938.32316	255	0.157
+5280	-61938.32316	255	0.157
+5290	-61938.32316	256	0.157
+5300	-61938.32316	256	0.157
+5310	-61938.18049	257	0.108
+5320	-61938.18049	258	0.108
+5330	-61938.18049	258	0.108
+5340	-61938.18049	259	0.108
+5350	-61938.18049	259	0.108
+5360	-61938.18049	259	0.108
+5370	-61938.18049	260	0.108
+5380	-61938.18049	260	0.108
+5390	-61938.18049	261	0.108
+5400	-61938.18049	261	0.108
+5410	-61938.18049	262	0.108
+5420	-61938.18049	262	0.108
+5430	-61938.18049	262	0.108
+5440	-61938.18049	263	0.108
+5450	-61938.18049	263	0.108
+5460	-61938.16913	264	0.108
+5470	-61938.16913	264	0.108
+5480	-61938.16913	265	0.108
+5490	-61938.16913	265	0.108
+5500	-61938.16913	265	0.108
+5510	-61938.16913	266	0.108
+5520	-61938.16913	266	0.108
+5530	-61938.16913	267	0.108
+5540	-61938.16459	267	0.108
+5550	-61938.16459	268	0.108
+5560	-61938.16459	268	0.108
+5570	-61938.16204	269	0.108
+5580	-61938.16204	269	0.108
+5590	-61938.16204	269	0.108
+5600	-61938.16204	270	0.108
+5610	-61938.16204	270	0.108
+5620	-61938.16204	271	0.108
+5630	-61938.16204	271	0.108
+5640	-61938.16014	272	0.108
+5650	-61938.16014	272	0.108
+5660	-61938.16014	272	0.108
+5670	-61938.16014	273	0.108
+5680	-61938.16014	273	0.108
+5690	-61938.16014	274	0.108
+5700	-61938.16014	274	0.108
+5710	-61938.16014	275	0.108
+5720	-61938.15411	275	0.108
+5730	-61938.15411	276	0.108
+5740	-61938.15411	276	0.108
+5750	-61938.15411	276	0.108
+5760	-61938.15411	277	0.108
+5770	-61938.15411	277	0.108
+5780	-61938.15279	278	0.108
+5790	-61938.15279	278	0.108
+5800	-61938.15279	279	0.108
+5810	-61938.15148	280	0.059
+5820	-61938.15148	280	0.059
+5830	-61938.15148	281	0.059
+5840	-61938.15148	281	0.059
+5850	-61938.14086	282	0.059
+5860	-61938.14086	282	0.059
+5870	-61938.14086	283	0.059
+5880	-61938.14086	283	0.059
+5890	-61938.14086	284	0.059
+5900	-61938.14086	284	0.059
+5910	-61938.14086	284	0.059
+5920	-61938.14086	285	0.059
+5930	-61938.14086	285	0.059
+5940	-61938.14086	286	0.059
+5950	-61938.14086	286	0.059
+5960	-61938.14086	287	0.059
+5970	-61938.14086	287	0.059
+5980	-61938.14086	287	0.059
+5990	-61938.14086	288	0.059
+6000	-61938.14086	288	0.059
+6010	-61938.14086	289	0.059
+6020	-61938.14086	289	0.059
+6030	-61938.14086	290	0.059
+6040	-61938.14086	290	0.059
+6050	-61938.14086	290	0.059
+6060	-61938.14086	291	0.059
+6070	-61938.14086	291	0.059
+6080	-61938.14086	292	0.059
+6090	-61938.14086	292	0.059
+6100	-61938.14086	293	0.059
+6110	-61938.14086	293	0.059
+6120	-61938.13994	294	0.059
+6130	-61938.13994	294	0.059
+6140	-61938.13994	294	0.059
+6150	-61938.13994	295	0.059
+6160	-61938.13994	295	0.059
+6170	-61938.13994	296	0.059
+6180	-61938.13994	296	0.059
+6190	-61938.13994	296	0.059
+6200	-61938.13994	297	0.059
+6210	-61938.13994	297	0.059
+6220	-61938.13978	298	0.059
+6230	-61938.13978	298	0.059
+6240	-61938.13978	299	0.059
+6250	-61938.13978	299	0.059
+6260	-61938.13978	300	0.059
+6270	-61938.13978	300	0.059
+6280	-61938.13978	300	0.059
+6290	-61938.13978	301	0.059
+6300	-61938.13219	301	0.059
+6310	-61937.59167	303	0.01
+6320	-61937.59167	303	0.01
+6330	-61937.58559	304	0.01
+6340	-61937.58559	304	0.01
+6350	-61937.58559	305	0.01
+6360	-61937.58559	305	0.01
+6370	-61937.58559	306	0.01
+6380	-61937.58559	306	0.01
+6390	-61937.58559	307	0.01
+6400	-61937.58559	307	0.01
+6410	-61937.58559	307	0.01
+6420	-61937.58559	308	0.01
+6430	-61937.58559	308	0.01
+6440	-61937.58559	309	0.01
+6450	-61937.58559	309	0.01
+6460	-61937.58559	310	0.01
+6470	-61937.58559	310	0.01
+6480	-61937.58559	311	0.01
+6490	-61937.58559	311	0.01
+6500	-61937.58494	312	0.01
+6510	-61937.5768	312	0.01
+6520	-61937.5768	312	0.01
+6530	-61937.57584	313	0.01
+6540	-61937.57584	313	0.01
+6550	-61937.57584	314	0.01
+6560	-61937.57584	314	0.01
+6570	-61937.57557	315	0.01
+6580	-61937.57557	315	0.01
+6590	-61937.57557	316	0.01
+6600	-61937.57557	316	0.01
+6610	-61937.57557	317	0.01
+6620	-61937.57557	317	0.01
+6630	-61937.57557	318	0.01
+6640	-61937.57463	318	0.01
+6650	-61937.57463	318	0.01
+6660	-61937.57463	319	0.01
+6670	-61937.57463	319	0.01
+6680	-61937.57463	320	0.01
+6690	-61937.57463	320	0.01
+6700	-61937.57463	321	0.01
+6710	-61937.57463	321	0.01
+6720	-61937.57449	322	0.01
+6730	-61937.57449	322	0.01
+6740	-61937.57449	322	0.01
+6750	-61937.57449	323	0.01
+6760	-61937.57449	323	0.01
+6770	-61937.57449	324	0.01
+6780	-61937.57449	324	0.01
+6790	-61937.57449	325	0.01
+6800	-61937.5711	325	0.01
+6810	-61937.5711	326	0.01
+6820	-61937.5711	326	0.01
+6830	-61937.5711	327	0.01
+6840	-61937.5711	327	0.01
+6850	-61937.5711	328	0.01
+6860	-61937.5711	328	0.01
+6870	-61937.57021	328	0.01
+6880	-61937.56976	329	0.01
+6890	-61937.56976	329	0.01
+6900	-61937.56976	330	0.01
+6910	-61937.56976	330	0.01
+6920	-61937.56976	331	0.01
+6930	-61937.56976	331	0.01
+6940	-61937.56976	332	0.01
+6950	-61937.56976	332	0.01
+6960	-61937.56976	333	0.01
+6970	-61937.56976	333	0.01
+6980	-61937.56976	334	0.01
+6990	-61937.56976	334	0.01
+7000	-61937.56976	335	0.01
+7010	-61937.56976	335	0.01
+7020	-61937.56976	335	0.01
+7030	-61937.56976	336	0.01
+7040	-61937.56976	336	0.01
+7050	-61937.56976	337	0.01
+7060	-61937.56976	337	0.01
+7070	-61937.56976	338	0.01
+7080	-61937.56976	338	0.01
+7090	-61937.56976	339	0.01
+7100	-61937.56976	339	0.01
+7110	-61937.56976	340	0.01
+7120	-61937.56976	340	0.01
+7130	-61937.56976	341	0.01
+7140	-61937.56976	341	0.01
+7150	-61937.56976	342	0.01
+7160	-61937.56976	342	0.01
+7170	-61937.56976	342	0.01
+7180	-61937.56976	343	0.01
+7190	-61937.56976	343	0.01
+7200	-61937.56976	344	0.01
+7210	-61937.56976	344	0.01
+7220	-61937.56976	345	0.01
+7230	-61937.56754	345	0.01
+7240	-61937.56754	346	0.01
+7250	-61937.56754	346	0.01
+7260	-61937.56754	347	0.01
+7270	-61937.56754	347	0.01
+7280	-61937.56754	348	0.01
+7290	-61937.56754	348	0.01
+7300	-61937.56754	349	0.01
+7310	-61937.56754	349	0.01
+7320	-61937.56754	349	0.01
+7330	-61937.56754	350	0.01
+7340	-61937.56749	350	0.01
+7350	-61937.56749	351	0.01
+7360	-61937.56749	351	0.01
+7370	-61937.56749	352	0.01
+7380	-61937.56749	352	0.01
+7390	-61937.56689	353	0.01
+7400	-61937.56689	353	0.01
+7410	-61937.56689	354	0.01
+7420	-61937.56689	354	0.01
+7430	-61937.56689	355	0.01
+7440	-61937.56689	355	0.01
+7450	-61937.56689	355	0.01
+7460	-61937.56689	356	0.01
+7470	-61937.56689	356	0.01
+7480	-61937.56689	357	0.01
+7490	-61937.56689	357	0.01
+7500	-61937.56373	358	0.01
+7510	-61937.56373	358	0.01
+7520	-61937.56373	359	0.01
+7530	-61937.56373	359	0.01
+7540	-61937.56373	360	0.01
+7550	-61937.5637	360	0.01
+7560	-61937.5637	361	0.01
+7570	-61937.5637	361	0.01
+7580	-61937.5637	361	0.01
+7590	-61937.5637	362	0.01
+7600	-61937.5637	362	0.01
+7610	-61937.56026	363	0.01
+7620	-61937.56026	363	0.01
+7630	-61937.56026	364	0.01
+7640	-61937.56026	364	0.01
+7650	-61937.56026	365	0.01
+7660	-61937.56026	365	0.01
+7670	-61937.56026	366	0.01
+7680	-61937.56026	366	0.01
+7690	-61937.56026	367	0.01
+7700	-61937.56026	367	0.01
+7710	-61937.56026	367	0.01
+7720	-61937.56026	368	0.01
+7730	-61937.56026	368	0.01
+7740	-61937.56026	369	0.01
+7750	-61937.56026	369	0.01
+7760	-61937.56026	370	0.01
+7770	-61937.56026	370	0.01
+7780	-61937.56026	371	0.01
+7790	-61937.56026	371	0.01
+7800	-61937.56026	372	0.01
+7810	-61937.56026	372	0.01
+7820	-61937.56026	373	0.01
+7830	-61937.56026	373	0.01
+7840	-61937.56026	373	0.01
+7850	-61937.56026	374	0.01
+7860	-61937.55985	374	0.01
+7870	-61937.55985	375	0.01
+7880	-61937.55985	375	0.01
+7890	-61937.55985	376	0.01
+7900	-61937.55985	376	0.01
+7910	-61937.55985	377	0.01
+7920	-61937.55985	377	0.01
+7930	-61937.55985	378	0.01
+7940	-61937.55985	378	0.01
+7950	-61937.55985	378	0.01
+7960	-61937.55985	379	0.01
+7970	-61937.55985	379	0.01
+7980	-61937.55985	380	0.01
+7990	-61937.55985	380	0.01
+8000	-61937.55985	381	0.01
+8010	-61937.55985	381	0.01
+8020	-61937.55985	382	0.01
+8030	-61937.55985	382	0.01
+8040	-61937.55985	383	0.01
+8050	-61937.55985	383	0.01
+8060	-61937.55985	384	0.01
+8070	-61937.55953	384	0.01
+8080	-61937.55953	385	0.01
+8090	-61937.55953	385	0.01
+8100	-61937.55953	385	0.01
+8110	-61937.55953	386	0.01
+8120	-61937.55953	386	0.01
+8130	-61937.55953	387	0.01
+8140	-61937.55953	387	0.01
+8150	-61937.55953	388	0.01
+8160	-61937.55941	388	0.01
+8170	-61937.55941	389	0.01
+8180	-61937.55941	389	0.01
+8190	-61937.55941	390	0.01
+8200	-61937.55941	390	0.01
+8210	-61937.55941	391	0.01
+8220	-61937.55672	391	0.01
+8230	-61937.55672	392	0.01
+8240	-61937.55672	392	0.01
+8250	-61937.55672	392	0.01
+8260	-61937.55672	393	0.01
+8270	-61937.55672	393	0.01
+8280	-61937.55672	394	0.01
+8290	-61937.55672	394	0.01
+8300	-61937.55672	395	0.01
+8310	-61937.551	395	0.01
+8320	-61937.551	396	0.01
+8330	-61937.551	396	0.01
+8340	-61937.551	397	0.01
+8350	-61937.54953	397	0.01
+8360	-61937.54953	397	0.01
+8370	-61937.54953	398	0.01
+8380	-61937.54953	398	0.01
+8390	-61937.54953	399	0.01
+8400	-61937.54953	399	0.01
+8410	-61937.54953	400	0.01
+8420	-61937.54953	400	0.01
+8430	-61937.54953	401	0.01
+8440	-61937.54765	401	0.01
+8450	-61937.54765	402	0.01
+8460	-61937.54765	402	0.01
+8470	-61937.54765	403	0.01
+8480	-61937.54765	403	0.01
+8490	-61937.54765	404	0.01
+8500	-61937.54765	404	0.01
+8510	-61937.54765	405	0.01
+8520	-61937.54765	405	0.01
+8530	-61937.54765	406	0.01
+8540	-61937.54765	406	0.01
+8550	-61937.54765	406	0.01
+8560	-61937.54765	407	0.01
+8570	-61937.54765	407	0.01
+8580	-61937.54765	408	0.01
+8590	-61937.54574	408	0.01
+8600	-61937.54574	409	0.01
+8610	-61937.54574	409	0.01
+8620	-61937.54574	410	0.01
+8630	-61937.54574	410	0.01
+8640	-61937.54574	411	0.01
+8650	-61937.54574	411	0.01
+8660	-61937.54574	412	0.01
+8670	-61937.54574	412	0.01
+8680	-61937.54574	412	0.01
+8690	-61937.54574	413	0.01
+8700	-61937.54574	413	0.01
+8710	-61937.54574	414	0.01
+8720	-61937.54574	414	0.01
+8730	-61937.54574	415	0.01
+8740	-61937.54574	415	0.01
+8750	-61937.54574	416	0.01
+8760	-61937.53561	416	0.01
+8770	-61937.53561	417	0.01
+8780	-61937.53561	417	0.01
+8790	-61937.53561	418	0.01
+8800	-61937.53561	418	0.01
+8810	-61937.53561	418	0.01
+8820	-61937.53561	419	0.01
+8830	-61937.53561	419	0.01
+8840	-61937.53561	420	0.01
+8850	-61937.53561	420	0.01
+8860	-61937.53561	421	0.01
+8870	-61937.53561	421	0.01
+8880	-61937.53561	422	0.01
+8890	-61937.53561	422	0.01
+8900	-61937.53561	423	0.01
+8910	-61937.53561	423	0.01
+8920	-61937.53561	424	0.01
+8930	-61937.53561	424	0.01
+8940	-61937.53561	424	0.01
+8950	-61937.53111	425	0.01
+8960	-61937.53111	425	0.01
+8970	-61937.53111	426	0.01
+8980	-61937.53111	426	0.01
+8990	-61937.53111	427	0.01
+9000	-61937.5311	427	0.01
+9010	-61937.5311	428	0.01
+9020	-61937.5311	428	0.01
+9030	-61937.5311	429	0.01
+9040	-61937.5311	429	0.01
+9050	-61937.5311	430	0.01
+9060	-61937.5311	430	0.01
+9070	-61937.5311	431	0.01
+9080	-61937.5311	431	0.01
+9090	-61937.5311	432	0.01
+9100	-61937.5311	432	0.01
+9110	-61937.5311	433	0.01
+9120	-61937.5311	433	0.01
+9130	-61937.5311	434	0.01
+9140	-61937.5311	434	0.01
+9150	-61937.5311	435	0.01
+9160	-61937.5311	435	0.01
+9170	-61937.5311	436	0.01
+9180	-61937.5311	436	0.01
+9190	-61937.53099	437	0.01
+9200	-61937.53099	437	0.01
+9210	-61937.52608	438	0.01
+9220	-61937.52608	438	0.01
+9230	-61937.52601	439	0.01
+9240	-61937.52601	439	0.01
+9250	-61937.52601	440	0.01
+9260	-61937.52601	440	0.01
+9270	-61937.52601	441	0.01
+9280	-61937.52601	441	0.01
+9290	-61937.52601	442	0.01
+9300	-61937.52601	442	0.01
+9310	-61937.52601	443	0.01
+9320	-61937.52551	443	0.01
+9330	-61937.52551	444	0.01
+9340	-61937.52551	444	0.01
+9350	-61937.52551	445	0.01
+9360	-61937.52551	445	0.01
+9370	-61937.52551	446	0.01
+9380	-61937.52551	446	0.01
+9390	-61937.52551	447	0.01
+9400	-61937.52551	447	0.01
+9410	-61937.52551	448	0.01
+9420	-61937.52551	448	0.01
+9430	-61937.52551	448	0.01
+9440	-61937.52551	449	0.01
+9450	-61937.52551	449	0.01
+9460	-61937.52551	450	0.01
+9470	-61937.52551	450	0.01
+9480	-61937.52363	451	0.01
+9490	-61937.52363	451	0.01
+9500	-61937.52363	452	0.01
+9510	-61937.52363	452	0.01
+9520	-61937.52363	453	0.01
+9530	-61937.52363	453	0.01
+9540	-61937.52363	454	0.01
+9550	-61937.52363	454	0.01
+9560	-61937.52363	454	0.01
+9570	-61937.52276	455	0.01
+9580	-61937.52276	455	0.01
+9590	-61937.52276	456	0.01
+9600	-61937.52276	456	0.01
+9610	-61937.51673	457	0.01
+9620	-61937.51673	457	0.01
+9630	-61937.51673	458	0.01
+9640	-61937.51673	458	0.01
+9650	-61937.51673	459	0.01
+9660	-61937.51673	459	0.01
+9670	-61937.51673	460	0.01
+9680	-61937.51673	460	0.01
+9690	-61937.51673	461	0.01
+9700	-61937.51673	461	0.01
+9710	-61937.51673	462	0.01
+9720	-61937.51673	462	0.01
+9730	-61937.51566	463	0.01
+9740	-61937.51566	463	0.01
+9750	-61937.51566	464	0.01
+9760	-61937.51566	464	0.01
+9770	-61937.51566	465	0.01
+9780	-61937.51566	465	0.01
+9790	-61937.51566	466	0.01
+9800	-61937.51566	466	0.01
+9810	-61937.51566	467	0.01
+9820	-61937.51566	467	0.01
+9830	-61937.51566	468	0.01
+9840	-61937.51566	468	0.01
+9850	-61937.51566	468	0.01
+9860	-61937.51566	469	0.01
+9870	-61937.51566	469	0.01
+9880	-61937.51566	470	0.01
+9890	-61937.51566	470	0.01
+9900	-61937.51566	471	0.01
+9910	-61937.51566	471	0.01
+9920	-61937.51566	472	0.01
+9930	-61937.51566	472	0.01
+9940	-61937.51566	473	0.01
+9950	-61937.51566	473	0.01
+9960	-61937.51566	474	0.01
+9970	-61937.51566	474	0.01
+9980	-61937.51562	475	0.01
+9990	-61937.51562	475	0.01
+10000	-61937.51562	476	0.01
+10010	-61937.51562	476	0.01
+10020	-61937.51562	477	0.01
+10030	-61937.51562	477	0.01
+10040	-61937.51562	477	0.01
+10050	-61937.51562	478	0.01
+10060	-61937.51562	479	0.01
+10070	-61937.51562	479	0.01
+10080	-61937.51562	479	0.01
+10090	-61937.51557	480	0.01
+10100	-61937.51557	480	0.01
+10110	-61937.51557	481	0.01
+10120	-61937.51557	481	0.01
+10130	-61937.51557	482	0.01
+10140	-61937.51557	482	0.01
+10150	-61937.51557	483	0.01
+10160	-61937.51557	483	0.01
+10170	-61937.51557	484	0.01
+10180	-61937.51557	484	0.01
+10190	-61937.51516	485	0.01
+10200	-61937.51516	485	0.01
+10210	-61937.51516	485	0.01
+10220	-61937.51516	486	0.01
+10230	-61937.51516	486	0.01
+10240	-61937.51516	487	0.01
+10250	-61937.51516	487	0.01
+10260	-61937.51516	488	0.01
+10270	-61937.51516	488	0.01
+10280	-61937.51516	489	0.01
+10290	-61937.51516	489	0.01
+10300	-61937.51469	489	0.01
+10310	-61937.51469	490	0.01
+10320	-61937.51469	490	0.01
+10330	-61937.51469	491	0.01
+10340	-61937.51469	491	0.01
+10350	-61937.51469	492	0.01
+10360	-61937.51197	492	0.01
+10370	-61937.51197	493	0.01
+10380	-61937.51197	493	0.01
+10390	-61937.51197	494	0.01
+10400	-61937.51197	494	0.01
+10410	-61937.51197	495	0.01
+10420	-61937.51197	495	0.01
+10430	-61937.51197	496	0.01
+10440	-61937.51197	496	0.01
+10450	-61937.51197	496	0.01
+10460	-61937.51197	497	0.01
+10470	-61937.51197	497	0.01
+10480	-61937.51197	498	0.01
+10490	-61937.51197	498	0.01
+10500	-61937.51197	499	0.01
+10510	-61937.51197	499	0.01
+10520	-61937.51197	500	0.01
+10530	-61937.51197	500	0.01
+10540	-61937.51197	501	0.01
+10550	-61937.50706	501	0.01
+10560	-61937.50706	501	0.01
+10570	-61937.50706	502	0.01
+10580	-61937.50706	502	0.01
+10590	-61937.50706	503	0.01
+10600	-61937.50706	503	0.01
+10610	-61937.50706	504	0.01
+10620	-61937.50706	504	0.01
+10630	-61937.50706	505	0.01
+10640	-61937.50706	505	0.01
+10650	-61937.50706	506	0.01
+10660	-61937.50706	506	0.01
+10670	-61937.50706	507	0.01
+10680	-61937.50706	507	0.01
+10690	-61937.50706	508	0.01
+10700	-61937.50706	508	0.01
+10710	-61937.50706	509	0.01
+10720	-61937.50706	509	0.01
+10730	-61937.50706	509	0.01
+10740	-61937.50706	510	0.01
+10750	-61937.50706	510	0.01
+10760	-61937.50616	511	0.01
+10770	-61937.50616	511	0.01
+10780	-61937.50616	512	0.01
+10790	-61937.50616	512	0.01
+10800	-61937.50616	512	0.01
+10810	-61937.50616	513	0.01
+10820	-61937.50616	513	0.01
+10830	-61937.50616	514	0.01
+10840	-61937.50616	514	0.01
+10850	-61937.50616	515	0.01
+10860	-61937.50616	515	0.01
+10870	-61937.50616	516	0.01
+10880	-61937.50616	516	0.01
+10890	-61937.50616	517	0.01
+10900	-61937.50417	517	0.01
+10910	-61937.50417	518	0.01
+10920	-61937.50417	518	0.01
+10930	-61937.50417	519	0.01
+10940	-61937.50417	519	0.01
+10950	-61937.50417	520	0.01
+10960	-61937.50417	520	0.01
+10970	-61937.50417	520	0.01
+10980	-61937.50417	521	0.01
+10990	-61937.50417	521	0.01
+11000	-61937.50417	522	0.01
+11010	-61937.50417	522	0.01
+11020	-61937.50417	523	0.01
+11030	-61937.50417	523	0.01
+11040	-61937.50417	524	0.01
+11050	-61937.50417	524	0.01
+11060	-61937.50417	525	0.01
+11070	-61937.50417	525	0.01
+11080	-61937.50417	526	0.01
+11090	-61937.50417	526	0.01
+11100	-61937.50417	526	0.01
+11110	-61937.50245	527	0.01
+11120	-61937.50245	527	0.01
+11130	-61937.50245	528	0.01
+11140	-61937.50245	528	0.01
+11150	-61937.50245	529	0.01
+11160	-61937.50245	529	0.01
+11170	-61937.50245	530	0.01
+11180	-61937.50245	530	0.01
+11190	-61937.50245	531	0.01
+11200	-61937.50245	531	0.01
+11210	-61937.50245	531	0.01
+11220	-61937.50245	532	0.01
+11230	-61937.50245	532	0.01
+11240	-61937.50245	533	0.01
+11250	-61937.50245	533	0.01
+11260	-61937.50245	534	0.01
+11270	-61937.50245	534	0.01
+11280	-61937.50245	534	0.01
+11290	-61937.50245	535	0.01
+11300	-61937.50185	536	0.01
+11310	-61937.50185	536	0.01
+11320	-61937.50144	536	0.01
+11330	-61937.50144	537	0.01
+11340	-61937.50144	537	0.01
+11350	-61937.50144	538	0.01
+11360	-61937.50144	538	0.01
+11370	-61937.50144	539	0.01
+11380	-61937.50144	539	0.01
+11390	-61937.50045	540	0.01
+11400	-61937.50045	540	0.01
+11410	-61937.50045	541	0.01
+11420	-61937.50045	541	0.01
+11430	-61937.50045	542	0.01
+11440	-61937.50045	542	0.01
+11450	-61937.50045	542	0.01
+11460	-61937.50045	543	0.01
+11470	-61937.50045	543	0.01
+11480	-61937.50045	544	0.01
+11490	-61937.50045	544	0.01
+11500	-61937.50045	545	0.01
+11510	-61937.50045	545	0.01
+11520	-61937.50045	546	0.01
+11530	-61937.50045	546	0.01
+11540	-61937.50045	547	0.01
+11550	-61937.50045	547	0.01
+11560	-61937.50045	547	0.01
+11570	-61937.50045	548	0.01
+11580	-61937.50045	548	0.01
+11590	-61937.50045	549	0.01
+11600	-61937.50045	549	0.01
+11610	-61937.50045	550	0.01
+11620	-61937.50045	550	0.01
+11630	-61937.50027	551	0.01
+11640	-61937.50027	551	0.01
+11650	-61937.50027	552	0.01
+11660	-61937.50027	552	0.01
+11670	-61937.50027	552	0.01
+11680	-61937.49167	553	0.01
+11690	-61937.49167	553	0.01
+11700	-61937.48824	554	0.01
+11710	-61937.48824	554	0.01
+11720	-61937.48824	555	0.01
+11730	-61937.48824	555	0.01
+11740	-61937.48824	556	0.01
+11750	-61937.48824	556	0.01
+11760	-61937.48824	557	0.01
+11770	-61937.48824	557	0.01
+11780	-61937.48824	558	0.01
+11790	-61937.48824	558	0.01
+11800	-61937.48824	558	0.01
+11810	-61937.48634	559	0.01
+11820	-61937.48634	559	0.01
+11830	-61937.48634	560	0.01
+11840	-61937.48634	560	0.01
+11850	-61937.48634	561	0.01
+11860	-61937.48634	561	0.01
+11870	-61937.48634	562	0.01
+11880	-61937.48634	562	0.01
+11890	-61937.48634	562	0.01
+11900	-61937.48634	563	0.01
+11910	-61937.48634	563	0.01
+11920	-61937.48634	564	0.01
+11930	-61937.48634	564	0.01
+11940	-61937.48634	565	0.01
+11950	-61937.48634	565	0.01
+11960	-61937.48634	566	0.01
+11970	-61937.48634	566	0.01
+11980	-61937.48634	566	0.01
+11990	-61937.48634	567	0.01
+12000	-61937.48634	567	0.01
+12010	-61937.48634	568	0.01
+12020	-61937.48634	568	0.01
+12030	-61937.48634	569	0.01
+12040	-61937.48634	569	0.01
+12050	-61937.48634	570	0.01
+12060	-61937.48634	570	0.01
+12070	-61937.48634	571	0.01
+12080	-61937.48611	571	0.01
+12090	-61937.48611	572	0.01
+12100	-61937.48611	572	0.01
+12110	-61937.48611	573	0.01
+12120	-61937.48611	573	0.01
+12130	-61937.48611	574	0.01
+12140	-61937.48611	574	0.01
+12150	-61937.48611	575	0.01
+12160	-61937.48611	575	0.01
+12170	-61937.48611	576	0.01
+12180	-61937.48611	576	0.01
+12190	-61937.48611	577	0.01
+12200	-61937.48611	577	0.01
+12210	-61937.48611	578	0.01
+12220	-61937.48611	578	0.01
+12230	-61937.48611	578	0.01
+12240	-61937.48611	579	0.01
+12250	-61937.48611	579	0.01
+12260	-61937.48611	580	0.01
+12270	-61937.48611	580	0.01
+12280	-61937.48611	581	0.01
+12290	-61937.48611	581	0.01
+12300	-61937.48611	582	0.01
+12310	-61937.48611	582	0.01
+12320	-61937.48611	583	0.01
+12330	-61937.48611	583	0.01
+12340	-61937.48611	584	0.01
+12350	-61937.48611	584	0.01
+12360	-61937.48611	585	0.01
+12370	-61937.48611	585	0.01
+12380	-61937.48611	585	0.01
+12390	-61937.48611	586	0.01
+12400	-61937.48611	586	0.01
+12410	-61937.48611	587	0.01
+12420	-61937.48611	587	0.01
+12430	-61937.48611	588	0.01
+12440	-61937.48611	588	0.01
+12450	-61937.48611	588	0.01
+12460	-61937.48611	589	0.01
+12470	-61937.48611	589	0.01
+12480	-61937.48611	590	0.01
+12490	-61937.48611	590	0.01
+12500	-61937.48611	591	0.01
+12510	-61937.48611	591	0.01
+12520	-61937.48611	592	0.01
+12530	-61937.48611	592	0.01
+12540	-61937.48611	593	0.01
+12550	-61937.48611	593	0.01
+12560	-61937.48611	594	0.01
+12570	-61937.48611	594	0.01
+12580	-61937.48611	595	0.01
+12590	-61937.48611	595	0.01
+12600	-61937.48611	596	0.01
+12610	-61937.48611	596	0.01
+12620	-61937.48611	597	0.01
+12630	-61937.48611	597	0.01
+12640	-61937.48127	598	0.01
+12650	-61937.48127	598	0.01
+12660	-61937.48127	599	0.01
+12670	-61937.48127	599	0.01
+12680	-61937.48127	599	0.01
+12690	-61937.48127	600	0.01
+12700	-61937.47413	600	0.01
+12710	-61937.47099	601	0.01
+12720	-61937.47099	601	0.01
+12730	-61937.47099	602	0.01
+12740	-61937.47099	602	0.01
+12750	-61937.47099	603	0.01
+12760	-61937.47099	603	0.01
+12770	-61937.47099	604	0.01
+12780	-61937.47099	604	0.01
+12790	-61937.47099	605	0.01
+12800	-61937.47099	605	0.01
+12810	-61937.47099	606	0.01
+12820	-61937.47099	606	0.01
+12830	-61937.47099	607	0.01
+12840	-61937.47099	607	0.01
+12850	-61937.47099	608	0.01
+12860	-61937.47099	608	0.01
+12870	-61937.47099	609	0.01
+12880	-61937.47099	609	0.01
+12890	-61937.47099	609	0.01
+12900	-61937.47099	610	0.01
+12910	-61937.47099	610	0.01
+12920	-61937.47099	611	0.01
+12930	-61937.47099	611	0.01
+12940	-61937.47099	612	0.01
+12950	-61937.4706	612	0.01
+12960	-61937.4706	613	0.01
+12970	-61937.4706	613	0.01
+12980	-61937.4706	613	0.01
+12990	-61937.4706	614	0.01
+13000	-61937.4706	614	0.01
+13010	-61937.4706	615	0.01
+13020	-61937.4706	615	0.01
+13030	-61937.4706	616	0.01
+13040	-61937.46932	616	0.01
+13050	-61937.46932	617	0.01
+13060	-61937.46932	617	0.01
+13070	-61937.46932	618	0.01
+13080	-61937.46932	618	0.01
+13090	-61937.46932	619	0.01
+13100	-61937.46932	619	0.01
+13110	-61937.46932	619	0.01
+13120	-61937.46932	620	0.01
+13130	-61937.46932	620	0.01
+13140	-61937.46932	621	0.01
+13150	-61937.46932	621	0.01
+13160	-61937.46932	622	0.01
+13170	-61937.46932	622	0.01
+13180	-61937.46932	623	0.01
+13190	-61937.46932	623	0.01
+13200	-61937.46932	624	0.01
+13210	-61937.46932	624	0.01
+13220	-61937.46734	625	0.01
+13230	-61937.46734	625	0.01
+13240	-61937.46734	626	0.01
+13250	-61937.46734	626	0.01
+13260	-61937.46734	626	0.01
+13270	-61937.46734	627	0.01
+13280	-61937.46734	627	0.01
+13290	-61937.46734	628	0.01
+13300	-61937.46734	628	0.01
+13310	-61937.46734	629	0.01
+13320	-61937.46734	629	0.01
+13330	-61937.46734	630	0.01
+13340	-61937.46055	630	0.01
+13350	-61937.46055	631	0.01
+13360	-61937.46055	631	0.01
+13370	-61937.46055	632	0.01
+13380	-61937.46055	632	0.01
+13390	-61937.46055	632	0.01
+13400	-61937.46055	633	0.01
+13410	-61937.46055	633	0.01
+13420	-61937.46055	634	0.01
+13430	-61937.46041	634	0.01
+13440	-61937.46041	635	0.01
+13450	-61937.46041	635	0.01
+13460	-61937.46041	636	0.01
+13470	-61937.46041	636	0.01
+13480	-61937.46041	637	0.01
+13490	-61937.46041	637	0.01
+13500	-61937.46041	638	0.01
+13510	-61937.46041	638	0.01
+13520	-61937.45948	639	0.01
+13530	-61937.45948	639	0.01
+13540	-61937.45948	640	0.01
+13550	-61937.45948	640	0.01
+13560	-61937.45948	640	0.01
+13570	-61937.45948	641	0.01
+13580	-61937.45893	641	0.01
+13590	-61937.45893	642	0.01
+13600	-61937.45893	642	0.01
+13610	-61937.45893	643	0.01
+13620	-61937.45893	643	0.01
+13630	-61937.45893	644	0.01
+13640	-61937.45893	644	0.01
+13650	-61937.45893	645	0.01
+13660	-61937.45893	645	0.01
+13670	-61937.45893	646	0.01
+13680	-61937.45893	646	0.01
+13690	-61937.45893	646	0.01
+13700	-61937.45893	647	0.01
+13710	-61937.45893	647	0.01
+13720	-61937.45893	648	0.01
+13730	-61937.45893	648	0.01
+13740	-61937.45893	649	0.01
+13750	-61937.45893	649	0.01
+13760	-61937.45893	650	0.01
+13770	-61937.45893	650	0.01
+13780	-61937.45893	651	0.01
+13790	-61937.45893	651	0.01
+13800	-61937.45893	652	0.01
+13810	-61937.45893	652	0.01
+13820	-61937.45893	653	0.01
+13830	-61937.45893	653	0.01
+13840	-61937.45893	654	0.01
+13850	-61937.45893	654	0.01
+13860	-61937.45893	654	0.01
+13870	-61937.45893	655	0.01
+13880	-61937.45893	655	0.01
+13890	-61937.45893	656	0.01
+13900	-61937.45893	656	0.01
+13910	-61937.45893	657	0.01
+13920	-61937.45893	657	0.01
+13930	-61937.45893	658	0.01
+13940	-61937.45646	658	0.01
+13950	-61937.45646	659	0.01
+13960	-61937.45646	659	0.01
+13970	-61937.45646	660	0.01
+13980	-61937.45646	660	0.01
+13990	-61937.45646	660	0.01
+14000	-61937.45646	661	0.01
+14010	-61937.45646	661	0.01
+14020	-61937.45646	662	0.01
+14030	-61937.45646	662	0.01
+14040	-61937.45646	663	0.01
+14050	-61937.45646	663	0.01
+14060	-61937.45646	664	0.01
+14070	-61937.45646	664	0.01
+14080	-61937.45646	665	0.01
+14090	-61937.45646	665	0.01
+14100	-61937.45646	666	0.01
+14110	-61937.45646	666	0.01
+14120	-61937.45646	667	0.01
+14130	-61937.45646	667	0.01
+14140	-61937.45646	667	0.01
+14150	-61937.45646	668	0.01
+14160	-61937.45646	668	0.01
+14170	-61937.45646	669	0.01
+14180	-61937.45646	669	0.01
+14190	-61937.45646	670	0.01
+14200	-61937.45646	670	0.01
+14210	-61937.45646	671	0.01
+14220	-61937.45646	671	0.01
+14230	-61937.45646	672	0.01
+14240	-61937.45646	672	0.01
+14250	-61937.45646	673	0.01
+14260	-61937.45646	673	0.01
+14270	-61937.45646	673	0.01
+14280	-61937.45646	674	0.01
+14290	-61937.45645	674	0.01
+14300	-61937.45645	675	0.01
+14310	-61937.45645	675	0.01
+14320	-61937.45645	676	0.01
+14330	-61937.45252	676	0.01
+14340	-61937.45252	677	0.01
+14350	-61937.45252	677	0.01
+14360	-61937.45252	678	0.01
+14370	-61937.45252	678	0.01
+14380	-61937.45252	679	0.01
+14390	-61937.45252	679	0.01
+14400	-61937.45252	680	0.01
+14410	-61937.45252	680	0.01
+14420	-61937.45252	681	0.01
+14430	-61937.45252	681	0.01
+14440	-61937.45252	681	0.01
+14450	-61937.45064	682	0.01
+14460	-61937.45064	682	0.01
+14470	-61937.45064	683	0.01
+14480	-61937.45064	683	0.01
+14490	-61937.45064	684	0.01
+14500	-61937.45064	684	0.01
+14510	-61937.45064	685	0.01
+14520	-61937.45064	685	0.01
+14530	-61937.45064	686	0.01
+14540	-61937.45064	686	0.01
+14550	-61937.45064	687	0.01
+14560	-61937.45064	687	0.01
+14570	-61937.45061	687	0.01
+14580	-61937.45061	688	0.01
+14590	-61937.45061	688	0.01
+14600	-61937.44951	689	0.01
+14610	-61937.44211	689	0.01
+14620	-61937.44211	690	0.01
+14630	-61937.44211	690	0.01
+14640	-61937.44211	691	0.01
+14650	-61937.44211	691	0.01
+14660	-61937.44211	692	0.01
+14670	-61937.44211	692	0.01
+14680	-61937.44211	693	0.01
+14690	-61937.44211	693	0.01
+14700	-61937.44211	693	0.01
+14710	-61937.44211	694	0.01
+14720	-61937.44211	694	0.01
+14730	-61937.44211	695	0.01
+14740	-61937.44211	695	0.01
+14750	-61937.44211	696	0.01
+14760	-61937.44211	696	0.01
+14770	-61937.44211	697	0.01
+14780	-61937.44211	697	0.01
+14790	-61937.4401	698	0.01
+14800	-61937.4401	698	0.01
+14810	-61937.4401	699	0.01
+14820	-61937.4401	699	0.01
+14830	-61937.4401	699	0.01
+14840	-61937.4401	700	0.01
+14850	-61937.4401	700	0.01
+14860	-61937.4401	701	0.01
+14870	-61937.4401	701	0.01
+14880	-61937.4401	702	0.01
+14890	-61937.4401	702	0.01
+14900	-61937.4401	703	0.01
+14910	-61937.4401	703	0.01
+14920	-61937.4401	703	0.01
+14930	-61937.4401	704	0.01
+14940	-61937.4401	704	0.01
+14950	-61937.4401	705	0.01
+14960	-61937.43954	705	0.01
+14970	-61937.43954	706	0.01
+14980	-61937.43954	706	0.01
+14990	-61937.43954	707	0.01
+15000	-61937.43954	707	0.01
+15010	-61937.43916	709	0.01
+15020	-61937.43916	709	0.01
+15030	-61937.43916	710	0.01
+15040	-61937.43916	710	0.01
+15050	-61937.43916	711	0.01
+15060	-61937.43916	711	0.01
+15070	-61937.43916	712	0.01
+15080	-61937.43916	712	0.01
+15090	-61937.43916	713	0.01
+15100	-61937.43916	713	0.01
+15110	-61937.43916	714	0.01
+15120	-61937.43916	714	0.01
+15130	-61937.43916	714	0.01
+15140	-61937.43916	715	0.01
+15150	-61937.43916	715	0.01
+15160	-61937.43916	716	0.01
+15170	-61937.43916	716	0.01
+15180	-61937.43916	717	0.01
+15190	-61937.43916	717	0.01
+15200	-61937.43916	718	0.01
+15210	-61937.43831	718	0.01
+15220	-61937.43831	719	0.01
+15230	-61937.43831	719	0.01
+15240	-61937.43831	720	0.01
+15250	-61937.43831	720	0.01
+15260	-61937.43831	721	0.01
+15270	-61937.43831	721	0.01
+15280	-61937.43831	721	0.01
+15290	-61937.43831	722	0.01
+15300	-61937.43831	722	0.01
+15310	-61937.43831	723	0.01
+15320	-61937.43831	723	0.01
+15330	-61937.43831	724	0.01
+15340	-61937.43831	724	0.01
+15350	-61937.43831	725	0.01
+15360	-61937.43831	725	0.01
+15370	-61937.43831	726	0.01
+15380	-61937.43831	726	0.01
+15390	-61937.43831	727	0.01
+15400	-61937.43831	727	0.01
+15410	-61937.43831	727	0.01
+15420	-61937.43831	728	0.01
+15430	-61937.43831	728	0.01
+15440	-61937.43831	729	0.01
+15450	-61937.43831	729	0.01
+15460	-61937.43831	730	0.01
+15470	-61937.43831	730	0.01
+15480	-61937.43831	731	0.01
+15490	-61937.43831	731	0.01
+15500	-61937.43719	732	0.01
+15510	-61937.43719	732	0.01
+15520	-61937.43719	733	0.01
+15530	-61937.43719	733	0.01
+15540	-61937.43719	734	0.01
+15550	-61937.43719	734	0.01
+15560	-61937.43719	734	0.01
+15570	-61937.43719	735	0.01
+15580	-61937.43719	735	0.01
+15590	-61937.43719	736	0.01
+15600	-61937.43719	736	0.01
+15610	-61937.43719	737	0.01
+15620	-61937.4353	737	0.01
+15630	-61937.4353	738	0.01
+15640	-61937.4353	738	0.01
+15650	-61937.43494	739	0.01
+15660	-61937.43494	739	0.01
+15670	-61937.43494	740	0.01
+15680	-61937.43494	740	0.01
+15690	-61937.43494	741	0.01
+15700	-61937.43494	741	0.01
+15710	-61937.43494	742	0.01
+15720	-61937.43494	742	0.01
+15730	-61937.43494	742	0.01
+15740	-61937.43494	743	0.01
+15750	-61937.43403	743	0.01
+15760	-61937.43403	744	0.01
+15770	-61937.43403	744	0.01
+15780	-61937.43396	745	0.01
+15790	-61937.43396	745	0.01
+15800	-61937.43396	746	0.01
+15810	-61937.43396	746	0.01
+15820	-61937.43396	747	0.01
+15830	-61937.43396	747	0.01
+15840	-61937.43396	748	0.01
+15850	-61937.43396	748	0.01
+15860	-61937.43396	749	0.01
+15870	-61937.43396	749	0.01
+15880	-61937.43396	750	0.01
+15890	-61937.43396	750	0.01
+15900	-61937.43396	750	0.01
+15910	-61937.43392	751	0.01
+15920	-61937.43392	751	0.01
+15930	-61937.43392	752	0.01
+15940	-61937.43392	752	0.01
+15950	-61937.43392	753	0.01
+15960	-61937.43392	753	0.01
+15970	-61937.43392	754	0.01
+15980	-61937.43392	754	0.01
+15990	-61937.43392	755	0.01
+16000	-61937.43392	755	0.01
+16010	-61937.43334	756	0.01
+16020	-61937.43334	756	0.01
+16030	-61937.43334	757	0.01
+16040	-61937.43334	757	0.01
+16050	-61937.43334	758	0.01
+16060	-61937.43334	758	0.01
+16070	-61937.43334	758	0.01
+16080	-61937.43334	759	0.01
+16090	-61937.43334	759	0.01
+16100	-61937.43334	760	0.01
+16110	-61937.43334	760	0.01
+16120	-61937.43334	761	0.01
+16130	-61937.43334	761	0.01
+16140	-61937.43334	762	0.01
+16150	-61937.43334	762	0.01
+16160	-61937.43334	763	0.01
+16170	-61937.43325	763	0.01
+16180	-61937.43325	764	0.01
+16190	-61937.43325	764	0.01
+16200	-61937.43325	765	0.01
+16210	-61937.43325	765	0.01
+16220	-61937.43325	766	0.01
+16230	-61937.43325	766	0.01
+16240	-61937.43325	766	0.01
+16250	-61937.43325	767	0.01
+16260	-61937.43325	767	0.01
+16270	-61937.43325	768	0.01
+16280	-61937.43325	768	0.01
+16290	-61937.43325	769	0.01
+16300	-61937.43325	769	0.01
+16310	-61937.43325	770	0.01
+16320	-61937.43325	770	0.01
+16330	-61937.43325	771	0.01
+16340	-61937.43325	771	0.01
+16350	-61937.43325	772	0.01
+16360	-61937.43325	772	0.01
+16370	-61937.43325	772	0.01
+16380	-61937.43325	773	0.01
+16390	-61937.43325	773	0.01
+16400	-61937.43325	774	0.01
+Score after final optimization: -61937.27049
+Final	-61937.27049	795	0.01
+Search rep 2 (of 2)
+random seed = 1646090181
+gen	best_like	time	optPrecision
+0	-100067.2273	825	0.5
+10	-99336.89225	825	0.5
+20	-98602.16974	826	0.5
+30	-97983.90518	826	0.5
+40	-95545.02024	827	0.5
+50	-94714.33787	827	0.5
+60	-93743.155	828	0.5
+70	-92280.64303	828	0.5
+80	-90727.45166	829	0.5
+90	-90255.82646	829	0.5
+100	-89028.2502	830	0.5
+110	-87260.20349	831	0.5
+120	-84980.85096	831	0.5
+130	-83718.33069	832	0.5
+140	-82532.09729	832	0.5
+150	-81996.07267	833	0.5
+160	-81159.94313	833	0.5
+170	-80454.06965	834	0.5
+180	-80396.52652	834	0.5
+190	-80193.2345	835	0.5
+200	-78816.4419	835	0.5
+210	-78612.3718	836	0.5
+220	-76612.04307	836	0.5
+230	-75510.74805	837	0.5
+240	-75297.73314	837	0.5
+250	-74947.35006	838	0.5
+260	-74928.47341	838	0.5
+270	-74852.7831	839	0.5
+280	-74782.95905	839	0.5
+290	-74712.46694	840	0.5
+300	-74605.01145	840	0.5
+310	-74312.40503	840	0.5
+320	-73472.84544	841	0.5
+330	-73229.56189	841	0.5
+340	-72212.3519	842	0.5
+350	-72071.75436	843	0.5
+360	-71604.85542	843	0.5
+370	-70027.99509	844	0.5
+380	-69816.68995	844	0.5
+390	-69539.04152	845	0.5
+400	-69536.02833	845	0.5
+410	-69414.38775	846	0.5
+420	-69133.73539	846	0.5
+430	-68930.53882	847	0.5
+440	-68848.50793	847	0.5
+450	-68236.33467	848	0.5
+460	-67672.42604	848	0.5
+470	-67354.73429	849	0.5
+480	-66582.12989	849	0.5
+490	-66582.12989	850	0.5
+500	-66577.36427	850	0.5
+510	-66482.89302	851	0.5
+520	-66464.63804	851	0.5
+530	-66412.36081	851	0.5
+540	-66408.80266	852	0.5
+550	-66406.66212	852	0.5
+560	-66404.19124	853	0.5
+570	-66403.28578	853	0.5
+580	-65794.5938	854	0.5
+590	-65650.16531	854	0.5
+600	-65606.73303	855	0.5
+610	-65576.32098	855	0.5
+620	-65101.55865	855	0.5
+630	-65043.63626	856	0.5
+640	-64992.58155	856	0.5
+650	-64984.59578	857	0.5
+660	-64652.78166	857	0.5
+670	-64652.28361	858	0.5
+680	-64651.98024	858	0.5
+690	-64337.95091	859	0.5
+700	-64212.75251	859	0.5
+710	-64119.75446	860	0.5
+720	-63995.04538	860	0.5
+730	-63994.33635	860	0.5
+740	-63994.33635	861	0.5
+750	-63974.9484	861	0.5
+760	-63974.9484	862	0.5
+770	-63949.83059	862	0.5
+780	-63949.83059	863	0.5
+790	-63896.25333	863	0.5
+800	-63896.25121	863	0.5
+810	-63891.6549	864	0.5
+820	-63888.37982	864	0.5
+830	-63699.21953	865	0.5
+840	-63689.47476	865	0.5
+850	-63684.76921	866	0.5
+860	-63562.89259	866	0.5
+870	-63022.85534	867	0.5
+880	-63007.28876	867	0.5
+890	-63007.28876	867	0.5
+900	-63005.80582	868	0.5
+910	-62929.84111	868	0.5
+920	-62923.5999	869	0.5
+930	-62684.91529	869	0.5
+940	-62633.7885	870	0.5
+950	-62631.05172	870	0.5
+960	-62536.84051	871	0.5
+970	-62526.99842	871	0.5
+980	-62525.58908	871	0.5
+990	-62506.67505	872	0.5
+1000	-62503.74692	872	0.5
+1010	-62502.50684	873	0.5
+1020	-62501.41752	873	0.5
+1030	-62500.97719	873	0.5
+1040	-62499.76506	874	0.5
+1050	-62499.46681	874	0.5
+1060	-62481.04911	875	0.5
+1070	-62481.04911	875	0.5
+1080	-62420.32974	876	0.5
+1090	-62363.80196	876	0.5
+1100	-62075.52678	876	0.5
+1110	-62075.26954	877	0.5
+1120	-62075.08164	877	0.5
+1130	-62075.07934	878	0.5
+1140	-62069.71218	878	0.5
+1150	-62069.60972	878	0.5
+1160	-62069.60972	879	0.5
+1170	-62069.60972	879	0.5
+1180	-62069.60469	879	0.5
+1190	-62069.15895	880	0.5
+1200	-62069.15895	880	0.5
+1210	-62069.11056	881	0.5
+1220	-62068.97402	881	0.5
+1230	-62065.54877	881	0.5
+1240	-62044.15552	882	0.5
+1250	-62037.19158	882	0.5
+1260	-62037.19158	883	0.5
+1270	-62036.45376	883	0.5
+1280	-62036.45132	883	0.5
+1290	-62035.52552	884	0.5
+1300	-62032.32059	884	0.5
+1310	-62031.84695	885	0.5
+1320	-62031.72872	885	0.5
+1330	-62031.72625	886	0.5
+1340	-62031.72625	886	0.5
+1350	-62030.8536	886	0.5
+1360	-62030.20724	887	0.5
+1370	-62026.565	887	0.5
+1380	-62023.31095	888	0.5
+1390	-62023.12534	888	0.5
+1400	-62020.3538	888	0.5
+1410	-62020.09297	889	0.5
+1420	-62020.09297	889	0.5
+1430	-62019.66032	890	0.5
+1440	-62018.66685	890	0.5
+1450	-62018.66685	891	0.5
+1460	-62017.92088	891	0.5
+1470	-62017.81635	891	0.5
+1480	-62017.21904	892	0.5
+1490	-62017.21904	892	0.5
+1500	-62017.21483	893	0.5
+1510	-62017.21483	893	0.5
+1520	-62016.1228	893	0.5
+1530	-62015.93543	894	0.5
+1540	-62014.34016	894	0.5
+1550	-62014.32018	895	0.5
+1560	-62014.2108	895	0.5
+1570	-62014.05756	896	0.5
+1580	-62013.57178	896	0.5
+1590	-62013.50317	897	0.5
+1600	-62012.68987	897	0.5
+1610	-61996.40613	898	0.451
+1620	-61995.87578	899	0.451
+1630	-61995.71028	899	0.451
+1640	-61995.59621	900	0.451
+1650	-61995.59612	900	0.451
+1660	-61994.84946	901	0.451
+1670	-61984.7593	901	0.451
+1680	-61983.5335	902	0.451
+1690	-61983.34159	902	0.451
+1700	-61983.34159	903	0.451
+1710	-61983.10013	903	0.451
+1720	-61983.10013	904	0.451
+1730	-61973.56078	904	0.451
+1740	-61970.98164	904	0.451
+1750	-61970.8111	905	0.451
+1760	-61970.73611	905	0.451
+1770	-61970.17312	906	0.451
+1780	-61970.04787	906	0.451
+1790	-61970.02617	907	0.451
+1800	-61970.01068	907	0.451
+1810	-61969.29214	907	0.451
+1820	-61964.18255	908	0.451
+1830	-61962.59972	908	0.451
+1840	-61962.41446	908	0.451
+1850	-61962.35798	909	0.451
+1860	-61962.30134	909	0.451
+1870	-61960.45401	910	0.451
+1880	-61959.50276	910	0.451
+1890	-61956.56121	910	0.451
+1900	-61956.55013	911	0.451
+1910	-61956.30009	911	0.451
+1920	-61956.01384	911	0.451
+1930	-61955.75751	912	0.451
+1940	-61954.31782	912	0.451
+1950	-61953.59208	912	0.451
+1960	-61952.6122	913	0.451
+1970	-61952.45446	913	0.451
+1980	-61952.26641	914	0.451
+1990	-61952.04591	914	0.451
+2000	-61951.83969	914	0.451
+2010	-61951.35791	915	0.451
+2020	-61950.23197	915	0.451
+2030	-61949.95077	915	0.451
+2040	-61949.86778	916	0.451
+2050	-61949.55773	916	0.451
+2060	-61949.28871	916	0.451
+2070	-61949.26855	917	0.451
+2080	-61949.03936	917	0.451
+2090	-61949.02032	918	0.451
+2100	-61948.06067	918	0.451
+2110	-61947.83184	919	0.402
+2120	-61947.69213	919	0.402
+2130	-61947.412	920	0.402
+2140	-61946.98893	920	0.402
+2150	-61946.98893	921	0.402
+2160	-61946.65967	921	0.402
+2170	-61946.59793	921	0.402
+2180	-61946.41209	922	0.402
+2190	-61946.24597	922	0.402
+2200	-61946.2281	922	0.402
+2210	-61946.2281	923	0.402
+2220	-61945.87238	923	0.402
+2230	-61945.83167	923	0.402
+2240	-61945.76691	924	0.402
+2250	-61945.76691	924	0.402
+2260	-61945.70255	925	0.402
+2270	-61945.70255	925	0.402
+2280	-61945.6135	925	0.402
+2290	-61945.54879	926	0.402
+2300	-61945.4277	926	0.402
+2310	-61945.4277	926	0.402
+2320	-61945.4277	927	0.402
+2330	-61945.24912	927	0.402
+2340	-61945.20165	928	0.402
+2350	-61945.09761	928	0.402
+2360	-61945.06224	928	0.402
+2370	-61945.04784	929	0.402
+2380	-61945.01001	929	0.402
+2390	-61944.99101	929	0.402
+2400	-61944.98089	930	0.402
+2410	-61944.97232	930	0.402
+2420	-61944.88543	931	0.402
+2430	-61944.88543	931	0.402
+2440	-61944.79783	931	0.402
+2450	-61944.71851	932	0.402
+2460	-61944.69294	932	0.402
+2470	-61944.64056	933	0.402
+2480	-61944.63188	933	0.402
+2490	-61944.57812	933	0.402
+2500	-61944.47838	934	0.402
+2510	-61944.32102	934	0.402
+2520	-61944.12536	935	0.402
+2530	-61944.05846	935	0.402
+2540	-61943.96441	935	0.402
+2550	-61943.86038	936	0.402
+2560	-61943.73039	936	0.402
+2570	-61943.61351	936	0.402
+2580	-61943.43778	937	0.402
+2590	-61943.43778	937	0.402
+2600	-61943.43658	938	0.402
+2610	-61943.42133	939	0.353
+2620	-61943.30196	939	0.353
+2630	-61943.26218	939	0.353
+2640	-61943.18894	940	0.353
+2650	-61943.16925	940	0.353
+2660	-61943.16589	941	0.353
+2670	-61943.16589	941	0.353
+2680	-61943.15568	942	0.353
+2690	-61942.96184	942	0.353
+2700	-61942.96184	942	0.353
+2710	-61942.92435	943	0.353
+2720	-61942.89377	943	0.353
+2730	-61942.8893	944	0.353
+2740	-61942.8893	944	0.353
+2750	-61942.86707	945	0.353
+2760	-61942.83557	945	0.353
+2770	-61942.83557	946	0.353
+2780	-61942.83444	946	0.353
+2790	-61942.80726	946	0.353
+2800	-61942.80726	947	0.353
+2810	-61942.72643	947	0.353
+2820	-61942.72643	948	0.353
+2830	-61942.53411	948	0.353
+2840	-61942.52538	948	0.353
+2850	-61942.52404	949	0.353
+2860	-61942.51834	949	0.353
+2870	-61942.4957	950	0.353
+2880	-61942.48567	950	0.353
+2890	-61942.46723	950	0.353
+2900	-61942.46356	951	0.353
+2910	-61942.46356	951	0.353
+2920	-61942.39956	952	0.353
+2930	-61942.33493	952	0.353
+2940	-61942.29503	952	0.353
+2950	-61942.23632	953	0.353
+2960	-61942.11142	953	0.353
+2970	-61941.99497	954	0.353
+2980	-61941.86533	954	0.353
+2990	-61941.86533	954	0.353
+3000	-61941.8507	955	0.353
+3010	-61941.8507	955	0.353
+3020	-61941.8507	956	0.353
+3030	-61941.8507	956	0.353
+3040	-61941.8507	956	0.353
+3050	-61941.84291	957	0.353
+3060	-61941.84291	957	0.353
+3070	-61941.84291	957	0.353
+3080	-61941.82639	958	0.353
+3090	-61941.80822	958	0.353
+3100	-61941.78204	958	0.353
+3110	-61941.76868	960	0.304
+3120	-61941.75157	960	0.304
+3130	-61941.6822	960	0.304
+3140	-61941.66242	961	0.304
+3150	-61941.59537	961	0.304
+3160	-61941.56757	961	0.304
+3170	-61941.54586	962	0.304
+3180	-61941.54507	962	0.304
+3190	-61941.54507	963	0.304
+3200	-61941.54507	963	0.304
+3210	-61941.54507	963	0.304
+3220	-61941.54507	964	0.304
+3230	-61941.42056	964	0.304
+3240	-61941.42056	965	0.304
+3250	-61941.42056	965	0.304
+3260	-61941.42056	965	0.304
+3270	-61941.39773	966	0.304
+3280	-61941.39773	966	0.304
+3290	-61941.39773	967	0.304
+3300	-61941.39773	967	0.304
+3310	-61941.38631	967	0.304
+3320	-61941.38631	968	0.304
+3330	-61941.38631	968	0.304
+3340	-61941.38535	969	0.304
+3350	-61941.38535	969	0.304
+3360	-61941.3635	969	0.304
+3370	-61941.3357	970	0.304
+3380	-61941.3357	970	0.304
+3390	-61941.29425	971	0.304
+3400	-61941.29425	971	0.304
+3410	-61941.29425	972	0.304
+3420	-61941.29147	972	0.304
+3430	-61941.29147	972	0.304
+3440	-61941.29147	973	0.304
+3450	-61941.29147	973	0.304
+3460	-61941.29147	974	0.304
+3470	-61941.25831	974	0.304
+3480	-61941.25831	975	0.304
+3490	-61941.25149	975	0.304
+3500	-61941.25149	975	0.304
+3510	-61941.24656	976	0.304
+3520	-61941.22013	976	0.304
+3530	-61941.22013	977	0.304
+3540	-61941.19528	977	0.304
+3550	-61941.19516	977	0.304
+3560	-61941.19516	978	0.304
+3570	-61941.15154	978	0.304
+3580	-61941.15154	979	0.304
+3590	-61941.15154	979	0.304
+3600	-61941.14556	979	0.304
+3610	-61941.14194	981	0.255
+3620	-61941.11699	981	0.255
+3630	-61941.11699	981	0.255
+3640	-61941.11699	982	0.255
+3650	-61941.11412	982	0.255
+3660	-61941.11412	983	0.255
+3670	-61941.08587	983	0.255
+3680	-61941.08587	983	0.255
+3690	-61941.06589	984	0.255
+3700	-61941.06589	984	0.255
+3710	-61941.06589	985	0.255
+3720	-61941.06589	985	0.255
+3730	-61941.06172	985	0.255
+3740	-61941.05696	986	0.255
+3750	-61940.99645	986	0.255
+3760	-61940.99645	987	0.255
+3770	-61940.91045	987	0.255
+3780	-61940.91045	987	0.255
+3790	-61940.8923	988	0.255
+3800	-61940.83295	988	0.255
+3810	-61940.80818	989	0.255
+3820	-61940.75254	989	0.255
+3830	-61940.75254	989	0.255
+3840	-61940.64986	990	0.255
+3850	-61940.62788	990	0.255
+3860	-61940.62788	991	0.255
+3870	-61940.62788	991	0.255
+3880	-61940.5704	991	0.255
+3890	-61940.5704	992	0.255
+3900	-61940.5704	992	0.255
+3910	-61940.5704	993	0.255
+3920	-61940.49942	993	0.255
+3930	-61940.49942	994	0.255
+3940	-61940.49942	994	0.255
+3950	-61940.49466	995	0.255
+3960	-61940.49466	995	0.255
+3970	-61940.49466	995	0.255
+3980	-61940.49081	996	0.255
+3990	-61940.45145	996	0.255
+4000	-61940.45145	997	0.255
+4010	-61940.42201	997	0.255
+4020	-61940.36561	997	0.255
+4030	-61940.33179	998	0.255
+4040	-61940.33179	998	0.255
+4050	-61940.32206	999	0.255
+4060	-61940.30113	999	0.255
+4070	-61940.16275	999	0.255
+4080	-61940.14335	1000	0.255
+4090	-61940.13271	1000	0.255
+4100	-61940.13271	1001	0.255
+4110	-61939.82132	1002	0.206
+4120	-61939.78566	1002	0.206
+4130	-61939.78566	1003	0.206
+4140	-61939.78566	1003	0.206
+4150	-61939.77602	1004	0.206
+4160	-61939.77602	1004	0.206
+4170	-61939.77602	1005	0.206
+4180	-61939.77602	1005	0.206
+4190	-61939.77602	1005	0.206
+4200	-61939.77602	1006	0.206
+4210	-61939.77602	1006	0.206
+4220	-61939.77602	1007	0.206
+4230	-61939.7753	1007	0.206
+4240	-61939.75302	1008	0.206
+4250	-61939.73193	1008	0.206
+4260	-61939.73193	1008	0.206
+4270	-61939.7178	1009	0.206
+4280	-61939.7178	1009	0.206
+4290	-61939.71489	1010	0.206
+4300	-61939.71429	1010	0.206
+4310	-61939.71429	1011	0.206
+4320	-61939.70444	1011	0.206
+4330	-61939.67607	1011	0.206
+4340	-61939.67607	1012	0.206
+4350	-61939.67607	1012	0.206
+4360	-61939.67607	1012	0.206
+4370	-61939.67607	1013	0.206
+4380	-61939.66356	1013	0.206
+4390	-61939.62688	1014	0.206
+4400	-61939.62688	1014	0.206
+4410	-61939.61804	1015	0.206
+4420	-61939.61525	1015	0.206
+4430	-61939.61525	1015	0.206
+4440	-61939.61525	1016	0.206
+4450	-61939.61525	1016	0.206
+4460	-61939.5898	1017	0.206
+4470	-61939.5898	1017	0.206
+4480	-61939.5898	1018	0.206
+4490	-61939.58727	1018	0.206
+4500	-61939.58727	1018	0.206
+4510	-61939.58727	1019	0.206
+4520	-61939.58727	1019	0.206
+4530	-61939.51429	1020	0.206
+4540	-61939.51429	1020	0.206
+4550	-61939.51429	1021	0.206
+4560	-61939.51208	1021	0.206
+4570	-61939.49771	1021	0.206
+4580	-61939.49771	1022	0.206
+4590	-61939.49136	1022	0.206
+4600	-61939.49136	1023	0.206
+4610	-61939.3154	1024	0.157
+4620	-61939.3105	1024	0.157
+4630	-61939.29815	1025	0.157
+4640	-61939.29815	1025	0.157
+4650	-61939.25193	1025	0.157
+4660	-61939.25142	1026	0.157
+4670	-61939.25142	1026	0.157
+4680	-61939.24049	1027	0.157
+4690	-61939.24049	1027	0.157
+4700	-61939.24049	1027	0.157
+4710	-61939.24049	1028	0.157
+4720	-61939.24049	1028	0.157
+4730	-61939.24049	1029	0.157
+4740	-61939.24049	1029	0.157
+4750	-61939.24049	1030	0.157
+4760	-61939.1964	1030	0.157
+4770	-61939.14328	1030	0.157
+4780	-61939.14328	1031	0.157
+4790	-61939.13997	1031	0.157
+4800	-61939.13997	1032	0.157
+4810	-61939.13997	1032	0.157
+4820	-61939.13997	1032	0.157
+4830	-61939.13997	1033	0.157
+4840	-61939.13431	1033	0.157
+4850	-61939.12471	1034	0.157
+4860	-61939.12471	1034	0.157
+4870	-61939.12471	1034	0.157
+4880	-61939.12471	1035	0.157
+4890	-61939.12471	1035	0.157
+4900	-61939.11025	1036	0.157
+4910	-61939.07421	1036	0.157
+4920	-61939.06331	1036	0.157
+4930	-61939.06331	1037	0.157
+4940	-61939.03652	1037	0.157
+4950	-61939.03652	1038	0.157
+4960	-61939.03652	1038	0.157
+4970	-61939.03652	1039	0.157
+4980	-61939.03652	1039	0.157
+4990	-61939.03332	1039	0.157
+5000	-61939.03332	1040	0.157
+5010	-61939.03332	1040	0.157
+5020	-61939.03332	1041	0.157
+5030	-61939.02308	1041	0.157
+5040	-61939.01925	1041	0.157
+5050	-61939.01925	1042	0.157
+5060	-61939.01925	1042	0.157
+5070	-61939.01925	1043	0.157
+5080	-61939.01925	1043	0.157
+5090	-61939.01925	1043	0.157
+5100	-61939.01194	1044	0.157
+5110	-61938.72643	1045	0.108
+5120	-61938.72643	1046	0.108
+5130	-61938.72643	1046	0.108
+5140	-61938.71957	1046	0.108
+5150	-61938.71957	1047	0.108
+5160	-61938.71957	1047	0.108
+5170	-61938.71957	1048	0.108
+5180	-61938.71957	1048	0.108
+5190	-61938.71957	1048	0.108
+5200	-61938.71957	1049	0.108
+5210	-61938.71957	1049	0.108
+5220	-61938.71957	1050	0.108
+5230	-61938.71957	1050	0.108
+5240	-61938.71957	1051	0.108
+5250	-61938.71957	1051	0.108
+5260	-61938.71957	1052	0.108
+5270	-61938.71957	1052	0.108
+5280	-61938.71957	1052	0.108
+5290	-61938.71957	1053	0.108
+5300	-61938.71898	1053	0.108
+5310	-61938.71898	1054	0.108
+5320	-61938.68667	1054	0.108
+5330	-61938.68667	1054	0.108
+5340	-61938.68667	1055	0.108
+5350	-61938.6593	1055	0.108
+5360	-61938.6593	1056	0.108
+5370	-61938.6593	1056	0.108
+5380	-61938.64559	1056	0.108
+5390	-61938.63635	1057	0.108
+5400	-61938.63635	1057	0.108
+5410	-61938.62711	1058	0.108
+5420	-61938.62711	1058	0.108
+5430	-61938.62711	1059	0.108
+5440	-61938.62694	1059	0.108
+5450	-61938.62694	1059	0.108
+5460	-61938.62694	1060	0.108
+5470	-61938.62694	1060	0.108
+5480	-61938.62694	1061	0.108
+5490	-61938.62694	1061	0.108
+5500	-61938.62694	1062	0.108
+5510	-61938.62694	1062	0.108
+5520	-61938.62694	1063	0.108
+5530	-61938.62694	1063	0.108
+5540	-61938.58495	1063	0.108
+5550	-61938.58495	1064	0.108
+5560	-61938.58495	1064	0.108
+5570	-61938.58495	1065	0.108
+5580	-61938.58495	1065	0.108
+5590	-61938.5618	1066	0.108
+5600	-61938.5618	1066	0.108
+5610	-61938.39065	1067	0.059
+5620	-61938.39065	1068	0.059
+5630	-61938.3834	1068	0.059
+5640	-61938.3834	1069	0.059
+5650	-61938.3834	1069	0.059
+5660	-61938.37165	1069	0.059
+5670	-61938.3544	1070	0.059
+5680	-61938.33847	1070	0.059
+5690	-61938.33711	1071	0.059
+5700	-61938.33711	1071	0.059
+5710	-61938.33172	1072	0.059
+5720	-61938.329	1072	0.059
+5730	-61938.329	1072	0.059
+5740	-61938.329	1073	0.059
+5750	-61938.329	1073	0.059
+5760	-61938.30611	1074	0.059
+5770	-61938.2973	1074	0.059
+5780	-61938.2973	1075	0.059
+5790	-61938.2973	1075	0.059
+5800	-61938.2973	1075	0.059
+5810	-61938.29583	1076	0.059
+5820	-61938.29583	1076	0.059
+5830	-61938.29583	1077	0.059
+5840	-61938.29583	1077	0.059
+5850	-61938.28311	1078	0.059
+5860	-61938.28311	1078	0.059
+5870	-61938.28298	1079	0.059
+5880	-61938.28298	1079	0.059
+5890	-61938.28298	1080	0.059
+5900	-61938.25672	1080	0.059
+5910	-61938.23761	1080	0.059
+5920	-61938.23761	1081	0.059
+5930	-61938.23761	1081	0.059
+5940	-61938.23761	1082	0.059
+5950	-61938.2355	1082	0.059
+5960	-61938.20596	1083	0.059
+5970	-61938.20596	1083	0.059
+5980	-61938.20596	1084	0.059
+5990	-61938.19623	1084	0.059
+6000	-61938.19623	1084	0.059
+6010	-61938.19623	1085	0.059
+6020	-61938.17593	1085	0.059
+6030	-61938.17593	1086	0.059
+6040	-61938.17593	1086	0.059
+6050	-61938.1746	1087	0.059
+6060	-61938.1743	1087	0.059
+6070	-61938.17388	1087	0.059
+6080	-61938.17388	1088	0.059
+6090	-61938.17388	1088	0.059
+6100	-61938.17311	1089	0.059
+6110	-61937.53395	1090	0.01
+6120	-61937.53395	1091	0.01
+6130	-61937.53395	1091	0.01
+6140	-61937.53395	1092	0.01
+6150	-61937.53395	1092	0.01
+6160	-61937.53395	1093	0.01
+6170	-61937.53395	1093	0.01
+6180	-61937.53395	1093	0.01
+6190	-61937.53395	1094	0.01
+6200	-61937.53395	1094	0.01
+6210	-61937.5291	1095	0.01
+6220	-61937.5291	1095	0.01
+6230	-61937.5291	1096	0.01
+6240	-61937.5291	1096	0.01
+6250	-61937.5291	1096	0.01
+6260	-61937.5291	1097	0.01
+6270	-61937.5291	1097	0.01
+6280	-61937.5291	1098	0.01
+6290	-61937.5291	1098	0.01
+6300	-61937.5291	1099	0.01
+6310	-61937.5291	1099	0.01
+6320	-61937.52658	1100	0.01
+6330	-61937.52658	1100	0.01
+6340	-61937.52658	1100	0.01
+6350	-61937.52658	1101	0.01
+6360	-61937.52658	1101	0.01
+6370	-61937.52658	1102	0.01
+6380	-61937.51695	1102	0.01
+6390	-61937.51695	1103	0.01
+6400	-61937.51686	1103	0.01
+6410	-61937.51605	1103	0.01
+6420	-61937.51605	1104	0.01
+6430	-61937.51605	1104	0.01
+6440	-61937.51605	1105	0.01
+6450	-61937.51605	1105	0.01
+6460	-61937.51605	1106	0.01
+6470	-61937.51605	1106	0.01
+6480	-61937.51605	1106	0.01
+6490	-61937.51605	1107	0.01
+6500	-61937.51605	1107	0.01
+6510	-61937.51605	1108	0.01
+6520	-61937.51605	1108	0.01
+6530	-61937.51605	1108	0.01
+6540	-61937.51584	1109	0.01
+6550	-61937.51584	1109	0.01
+6560	-61937.51584	1110	0.01
+6570	-61937.51379	1110	0.01
+6580	-61937.51379	1111	0.01
+6590	-61937.51379	1111	0.01
+6600	-61937.51379	1111	0.01
+6610	-61937.51379	1112	0.01
+6620	-61937.51379	1112	0.01
+6630	-61937.51379	1113	0.01
+6640	-61937.51379	1113	0.01
+6650	-61937.51379	1114	0.01
+6660	-61937.51379	1114	0.01
+6670	-61937.51379	1115	0.01
+6680	-61937.51315	1115	0.01
+6690	-61937.51315	1116	0.01
+6700	-61937.51315	1116	0.01
+6710	-61937.51315	1116	0.01
+6720	-61937.51315	1117	0.01
+6730	-61937.51315	1117	0.01
+6740	-61937.51315	1118	0.01
+6750	-61937.51315	1118	0.01
+6760	-61937.5128	1119	0.01
+6770	-61937.5128	1119	0.01
+6780	-61937.5128	1120	0.01
+6790	-61937.5128	1121	0.01
+6800	-61937.5128	1121	0.01
+6810	-61937.5128	1122	0.01
+6820	-61937.5128	1122	0.01
+6830	-61937.5128	1123	0.01
+6840	-61937.5128	1124	0.01
+6850	-61937.51127	1124	0.01
+6860	-61937.51127	1125	0.01
+6870	-61937.51127	1125	0.01
+6880	-61937.51127	1126	0.01
+6890	-61937.51127	1126	0.01
+6900	-61937.51116	1127	0.01
+6910	-61937.51116	1127	0.01
+6920	-61937.51116	1128	0.01
+6930	-61937.51116	1128	0.01
+6940	-61937.51116	1129	0.01
+6950	-61937.51116	1129	0.01
+6960	-61937.51116	1129	0.01
+6970	-61937.51105	1130	0.01
+6980	-61937.51105	1130	0.01
+6990	-61937.50979	1131	0.01
+7000	-61937.50979	1131	0.01
+7010	-61937.50979	1132	0.01
+7020	-61937.50979	1132	0.01
+7030	-61937.50979	1133	0.01
+7040	-61937.50979	1133	0.01
+7050	-61937.50979	1134	0.01
+7060	-61937.50979	1134	0.01
+7070	-61937.50979	1135	0.01
+7080	-61937.50979	1135	0.01
+7090	-61937.50979	1136	0.01
+7100	-61937.50979	1136	0.01
+7110	-61937.50979	1136	0.01
+7120	-61937.50979	1137	0.01
+7130	-61937.50979	1137	0.01
+7140	-61937.50979	1138	0.01
+7150	-61937.50979	1138	0.01
+7160	-61937.50979	1139	0.01
+7170	-61937.50979	1139	0.01
+7180	-61937.50979	1140	0.01
+7190	-61937.50979	1140	0.01
+7200	-61937.50979	1141	0.01
+7210	-61937.50979	1141	0.01
+7220	-61937.50979	1142	0.01
+7230	-61937.50979	1142	0.01
+7240	-61937.50979	1143	0.01
+7250	-61937.50979	1143	0.01
+7260	-61937.50979	1144	0.01
+7270	-61937.50979	1144	0.01
+7280	-61937.50979	1145	0.01
+7290	-61937.50979	1145	0.01
+7300	-61937.50979	1145	0.01
+7310	-61937.50979	1146	0.01
+7320	-61937.50926	1147	0.01
+7330	-61937.50917	1147	0.01
+7340	-61937.50917	1147	0.01
+7350	-61937.50917	1148	0.01
+7360	-61937.50917	1148	0.01
+7370	-61937.50917	1149	0.01
+7380	-61937.50917	1149	0.01
+7390	-61937.50917	1150	0.01
+7400	-61937.50917	1150	0.01
+7410	-61937.50917	1151	0.01
+7420	-61937.50917	1151	0.01
+7430	-61937.50917	1152	0.01
+7440	-61937.50917	1152	0.01
+7450	-61937.50917	1153	0.01
+7460	-61937.50917	1153	0.01
+7470	-61937.50917	1154	0.01
+7480	-61937.50917	1154	0.01
+7490	-61937.50917	1155	0.01
+7500	-61937.50917	1155	0.01
+7510	-61937.50917	1156	0.01
+7520	-61937.50917	1156	0.01
+7530	-61937.50917	1157	0.01
+7540	-61937.50839	1157	0.01
+7550	-61937.50839	1158	0.01
+7560	-61937.50839	1158	0.01
+7570	-61937.50839	1159	0.01
+7580	-61937.50839	1159	0.01
+7590	-61937.50839	1160	0.01
+7600	-61937.50839	1160	0.01
+7610	-61937.50839	1161	0.01
+7620	-61937.50839	1161	0.01
+7630	-61937.50839	1161	0.01
+7640	-61937.50839	1162	0.01
+7650	-61937.50839	1162	0.01
+7660	-61937.50839	1163	0.01
+7670	-61937.50839	1163	0.01
+7680	-61937.50839	1164	0.01
+7690	-61937.50839	1164	0.01
+7700	-61937.50839	1165	0.01
+7710	-61937.50839	1165	0.01
+7720	-61937.50839	1166	0.01
+7730	-61937.50839	1166	0.01
+7740	-61937.50838	1167	0.01
+7750	-61937.50838	1167	0.01
+7760	-61937.50838	1168	0.01
+7770	-61937.50793	1168	0.01
+7780	-61937.50793	1169	0.01
+7790	-61937.50793	1169	0.01
+7800	-61937.50793	1170	0.01
+7810	-61937.50793	1170	0.01
+7820	-61937.50793	1171	0.01
+7830	-61937.50793	1171	0.01
+7840	-61937.50793	1171	0.01
+7850	-61937.50793	1172	0.01
+7860	-61937.50793	1172	0.01
+7870	-61937.50793	1173	0.01
+7880	-61937.50793	1173	0.01
+7890	-61937.50793	1174	0.01
+7900	-61937.50793	1174	0.01
+7910	-61937.50793	1175	0.01
+7920	-61937.50793	1175	0.01
+7930	-61937.50793	1176	0.01
+7940	-61937.50793	1176	0.01
+7950	-61937.50793	1177	0.01
+7960	-61937.50793	1177	0.01
+7970	-61937.50793	1178	0.01
+7980	-61937.50793	1178	0.01
+7990	-61937.50793	1179	0.01
+8000	-61937.50793	1179	0.01
+8010	-61937.50793	1180	0.01
+8020	-61937.50793	1180	0.01
+8030	-61937.50793	1181	0.01
+8040	-61937.50793	1181	0.01
+8050	-61937.50793	1182	0.01
+8060	-61937.50793	1182	0.01
+8070	-61937.50793	1182	0.01
+8080	-61937.50793	1183	0.01
+8090	-61937.50793	1183	0.01
+8100	-61937.50793	1184	0.01
+8110	-61937.50793	1184	0.01
+8120	-61937.50793	1185	0.01
+8130	-61937.50793	1185	0.01
+8140	-61937.50793	1186	0.01
+8150	-61937.50793	1186	0.01
+8160	-61937.50793	1187	0.01
+8170	-61937.50793	1187	0.01
+8180	-61937.50793	1187	0.01
+8190	-61937.50171	1188	0.01
+8200	-61937.50171	1188	0.01
+8210	-61937.50171	1189	0.01
+8220	-61937.50017	1189	0.01
+8230	-61937.50017	1190	0.01
+8240	-61937.50017	1190	0.01
+8250	-61937.50017	1191	0.01
+8260	-61937.50017	1191	0.01
+8270	-61937.50017	1192	0.01
+8280	-61937.50017	1192	0.01
+8290	-61937.50017	1192	0.01
+8300	-61937.50017	1193	0.01
+8310	-61937.50017	1194	0.01
+8320	-61937.50017	1194	0.01
+8330	-61937.50017	1194	0.01
+8340	-61937.50017	1195	0.01
+8350	-61937.4964	1195	0.01
+8360	-61937.4964	1196	0.01
+8370	-61937.4964	1196	0.01
+8380	-61937.4964	1197	0.01
+8390	-61937.4964	1197	0.01
+8400	-61937.4964	1198	0.01
+8410	-61937.4964	1198	0.01
+8420	-61937.4964	1199	0.01
+8430	-61937.4964	1199	0.01
+8440	-61937.4964	1200	0.01
+8450	-61937.4964	1200	0.01
+8460	-61937.4964	1201	0.01
+8470	-61937.4964	1201	0.01
+8480	-61937.4964	1201	0.01
+8490	-61937.49633	1202	0.01
+8500	-61937.49016	1202	0.01
+8510	-61937.49016	1203	0.01
+8520	-61937.4899	1203	0.01
+8530	-61937.4899	1204	0.01
+8540	-61937.4899	1204	0.01
+8550	-61937.4899	1205	0.01
+8560	-61937.4899	1205	0.01
+8570	-61937.4899	1206	0.01
+8580	-61937.4899	1206	0.01
+8590	-61937.4899	1207	0.01
+8600	-61937.4899	1207	0.01
+8610	-61937.4899	1208	0.01
+8620	-61937.4899	1208	0.01
+8630	-61937.4899	1209	0.01
+8640	-61937.4899	1209	0.01
+8650	-61937.4899	1210	0.01
+8660	-61937.4899	1210	0.01
+8670	-61937.4899	1211	0.01
+8680	-61937.4899	1211	0.01
+8690	-61937.4899	1212	0.01
+8700	-61937.48721	1212	0.01
+8710	-61937.48721	1212	0.01
+8720	-61937.48721	1213	0.01
+8730	-61937.48721	1213	0.01
+8740	-61937.48721	1214	0.01
+8750	-61937.48721	1214	0.01
+8760	-61937.48721	1215	0.01
+8770	-61937.48721	1215	0.01
+8780	-61937.48721	1216	0.01
+8790	-61937.48721	1216	0.01
+8800	-61937.48721	1217	0.01
+8810	-61937.48721	1217	0.01
+8820	-61937.48721	1218	0.01
+8830	-61937.48721	1218	0.01
+8840	-61937.48721	1219	0.01
+8850	-61937.48721	1219	0.01
+8860	-61937.48721	1219	0.01
+8870	-61937.48721	1220	0.01
+8880	-61937.48721	1220	0.01
+8890	-61937.48721	1221	0.01
+8900	-61937.48721	1221	0.01
+8910	-61937.48721	1222	0.01
+8920	-61937.48721	1222	0.01
+8930	-61937.48721	1223	0.01
+8940	-61937.48721	1223	0.01
+8950	-61937.48721	1224	0.01
+8960	-61937.48666	1224	0.01
+8970	-61937.48666	1225	0.01
+8980	-61937.48666	1225	0.01
+8990	-61937.48666	1226	0.01
+9000	-61937.48666	1226	0.01
+9010	-61937.48666	1227	0.01
+9020	-61937.48666	1227	0.01
+9030	-61937.48666	1227	0.01
+9040	-61937.48666	1228	0.01
+9050	-61937.48666	1228	0.01
+9060	-61937.48666	1229	0.01
+9070	-61937.48666	1229	0.01
+9080	-61937.48666	1230	0.01
+9090	-61937.48666	1230	0.01
+9100	-61937.48666	1231	0.01
+9110	-61937.48666	1231	0.01
+9120	-61937.48666	1232	0.01
+9130	-61937.48666	1232	0.01
+9140	-61937.48666	1233	0.01
+9150	-61937.48666	1233	0.01
+9160	-61937.48666	1234	0.01
+9170	-61937.48512	1234	0.01
+9180	-61937.48512	1235	0.01
+9190	-61937.48512	1235	0.01
+9200	-61937.48512	1236	0.01
+9210	-61937.48512	1236	0.01
+9220	-61937.48512	1237	0.01
+9230	-61937.48512	1237	0.01
+9240	-61937.48512	1238	0.01
+9250	-61937.48512	1238	0.01
+9260	-61937.48512	1239	0.01
+9270	-61937.48502	1239	0.01
+9280	-61937.48219	1240	0.01
+9290	-61937.48219	1240	0.01
+9300	-61937.48219	1241	0.01
+9310	-61937.4821	1241	0.01
+9320	-61937.4821	1241	0.01
+9330	-61937.4821	1242	0.01
+9340	-61937.4821	1243	0.01
+9350	-61937.4821	1243	0.01
+9360	-61937.4821	1243	0.01
+9370	-61937.4821	1244	0.01
+9380	-61937.4821	1244	0.01
+9390	-61937.4821	1245	0.01
+9400	-61937.4821	1245	0.01
+9410	-61937.4821	1246	0.01
+9420	-61937.4821	1246	0.01
+9430	-61937.4821	1247	0.01
+9440	-61937.4821	1247	0.01
+9450	-61937.4821	1248	0.01
+9460	-61937.4821	1248	0.01
+9470	-61937.4821	1249	0.01
+9480	-61937.4821	1249	0.01
+9490	-61937.4821	1249	0.01
+9500	-61937.4821	1250	0.01
+9510	-61937.4821	1250	0.01
+9520	-61937.4821	1251	0.01
+9530	-61937.4821	1251	0.01
+9540	-61937.4821	1252	0.01
+9550	-61937.4821	1252	0.01
+9560	-61937.47887	1253	0.01
+9570	-61937.47563	1253	0.01
+9580	-61937.47563	1254	0.01
+9590	-61937.47563	1254	0.01
+9600	-61937.47563	1255	0.01
+9610	-61937.47563	1255	0.01
+9620	-61937.47563	1256	0.01
+9630	-61937.47563	1256	0.01
+9640	-61937.4739	1257	0.01
+9650	-61937.4739	1257	0.01
+9660	-61937.4739	1258	0.01
+9670	-61937.47217	1258	0.01
+9680	-61937.47217	1259	0.01
+9690	-61937.47217	1259	0.01
+9700	-61937.47217	1259	0.01
+9710	-61937.47217	1260	0.01
+9720	-61937.47217	1260	0.01
+9730	-61937.47217	1261	0.01
+9740	-61937.47217	1261	0.01
+9750	-61937.47217	1262	0.01
+9760	-61937.47217	1262	0.01
+9770	-61937.47217	1263	0.01
+9780	-61937.47217	1263	0.01
+9790	-61937.47217	1264	0.01
+9800	-61937.47217	1264	0.01
+9810	-61937.47217	1265	0.01
+9820	-61937.47217	1265	0.01
+9830	-61937.47217	1266	0.01
+9840	-61937.47217	1266	0.01
+9850	-61937.47217	1267	0.01
+9860	-61937.47107	1267	0.01
+9870	-61937.47107	1267	0.01
+9880	-61937.47107	1268	0.01
+9890	-61937.47107	1268	0.01
+9900	-61937.47107	1269	0.01
+9910	-61937.47107	1269	0.01
+9920	-61937.47107	1270	0.01
+9930	-61937.47107	1270	0.01
+9940	-61937.47107	1271	0.01
+9950	-61937.47107	1271	0.01
+9960	-61937.47107	1272	0.01
+9970	-61937.47107	1272	0.01
+9980	-61937.47107	1273	0.01
+9990	-61937.47107	1273	0.01
+10000	-61937.47107	1274	0.01
+10010	-61937.47107	1274	0.01
+10020	-61937.47107	1274	0.01
+10030	-61937.47074	1275	0.01
+10040	-61937.47074	1275	0.01
+10050	-61937.47074	1276	0.01
+10060	-61937.47074	1276	0.01
+10070	-61937.47074	1277	0.01
+10080	-61937.47068	1277	0.01
+10090	-61937.47068	1278	0.01
+10100	-61937.47068	1278	0.01
+10110	-61937.47068	1279	0.01
+10120	-61937.47068	1279	0.01
+10130	-61937.47068	1280	0.01
+10140	-61937.46761	1280	0.01
+10150	-61937.46761	1281	0.01
+10160	-61937.46761	1281	0.01
+10170	-61937.46761	1282	0.01
+10180	-61937.46761	1282	0.01
+10190	-61937.46761	1282	0.01
+10200	-61937.46761	1283	0.01
+10210	-61937.46761	1283	0.01
+10220	-61937.46761	1284	0.01
+10230	-61937.46698	1284	0.01
+10240	-61937.46698	1285	0.01
+10250	-61937.46698	1285	0.01
+10260	-61937.46698	1286	0.01
+10270	-61937.46698	1286	0.01
+10280	-61937.46698	1287	0.01
+10290	-61937.46698	1287	0.01
+10300	-61937.466	1287	0.01
+10310	-61937.466	1288	0.01
+10320	-61937.466	1289	0.01
+10330	-61937.46276	1289	0.01
+10340	-61937.46249	1289	0.01
+10350	-61937.46249	1290	0.01
+10360	-61937.46249	1290	0.01
+10370	-61937.46249	1291	0.01
+10380	-61937.46249	1291	0.01
+10390	-61937.46249	1292	0.01
+10400	-61937.46249	1292	0.01
+10410	-61937.46249	1293	0.01
+10420	-61937.46249	1293	0.01
+10430	-61937.46249	1294	0.01
+10440	-61937.46246	1294	0.01
+10450	-61937.46246	1295	0.01
+10460	-61937.46246	1295	0.01
+10470	-61937.46246	1296	0.01
+10480	-61937.46246	1296	0.01
+10490	-61937.45816	1296	0.01
+10500	-61937.45816	1297	0.01
+10510	-61937.45816	1297	0.01
+10520	-61937.45816	1298	0.01
+10530	-61937.45816	1298	0.01
+10540	-61937.45816	1299	0.01
+10550	-61937.45816	1299	0.01
+10560	-61937.45816	1300	0.01
+10570	-61937.45816	1300	0.01
+10580	-61937.45816	1301	0.01
+10590	-61937.45816	1301	0.01
+10600	-61937.45816	1301	0.01
+10610	-61937.45816	1302	0.01
+10620	-61937.45816	1302	0.01
+10630	-61937.45555	1303	0.01
+10640	-61937.45555	1303	0.01
+10650	-61937.45555	1304	0.01
+10660	-61937.45555	1304	0.01
+10670	-61937.45555	1305	0.01
+10680	-61937.45555	1305	0.01
+10690	-61937.45555	1306	0.01
+10700	-61937.45555	1306	0.01
+10710	-61937.45555	1307	0.01
+10720	-61937.45555	1307	0.01
+10730	-61937.45555	1308	0.01
+10740	-61937.45555	1308	0.01
+10750	-61937.45555	1309	0.01
+10760	-61937.45555	1309	0.01
+10770	-61937.45555	1310	0.01
+10780	-61937.45555	1310	0.01
+10790	-61937.45555	1311	0.01
+10800	-61937.45555	1311	0.01
+10810	-61937.45555	1311	0.01
+10820	-61937.45555	1312	0.01
+10830	-61937.45555	1312	0.01
+10840	-61937.45555	1313	0.01
+10850	-61937.45555	1313	0.01
+10860	-61937.45555	1314	0.01
+10870	-61937.45555	1314	0.01
+10880	-61937.45555	1315	0.01
+10890	-61937.45555	1315	0.01
+10900	-61937.45555	1316	0.01
+10910	-61937.45555	1316	0.01
+10920	-61937.45555	1317	0.01
+10930	-61937.44984	1317	0.01
+10940	-61937.44984	1318	0.01
+10950	-61937.44984	1318	0.01
+10960	-61937.44975	1319	0.01
+10970	-61937.44975	1319	0.01
+10980	-61937.44975	1320	0.01
+10990	-61937.44975	1320	0.01
+11000	-61937.44975	1320	0.01
+11010	-61937.44975	1321	0.01
+11020	-61937.44975	1321	0.01
+11030	-61937.44975	1322	0.01
+11040	-61937.44975	1322	0.01
+11050	-61937.44975	1323	0.01
+11060	-61937.44975	1323	0.01
+11070	-61937.44975	1324	0.01
+11080	-61937.44975	1324	0.01
+11090	-61937.44282	1325	0.01
+11100	-61937.4428	1325	0.01
+11110	-61937.4428	1326	0.01
+11120	-61937.4428	1326	0.01
+11130	-61937.4428	1327	0.01
+11140	-61937.4428	1327	0.01
+11150	-61937.44276	1328	0.01
+11160	-61937.44276	1328	0.01
+11170	-61937.44276	1329	0.01
+11180	-61937.44276	1329	0.01
+11190	-61937.44276	1330	0.01
+11200	-61937.44276	1330	0.01
+11210	-61937.44276	1331	0.01
+11220	-61937.44276	1331	0.01
+11230	-61937.44275	1332	0.01
+11240	-61937.44275	1332	0.01
+11250	-61937.44275	1333	0.01
+11260	-61937.44275	1333	0.01
+11270	-61937.44117	1333	0.01
+11280	-61937.44117	1334	0.01
+11290	-61937.44117	1334	0.01
+11300	-61937.44117	1335	0.01
+11310	-61937.44117	1335	0.01
+11320	-61937.44117	1336	0.01
+11330	-61937.44117	1336	0.01
+11340	-61937.44117	1337	0.01
+11350	-61937.44117	1337	0.01
+11360	-61937.44117	1338	0.01
+11370	-61937.44117	1338	0.01
+11380	-61937.44117	1339	0.01
+11390	-61937.44117	1339	0.01
+11400	-61937.44117	1339	0.01
+11410	-61937.44117	1340	0.01
+11420	-61937.44117	1340	0.01
+11430	-61937.44117	1341	0.01
+11440	-61937.44117	1341	0.01
+11450	-61937.44117	1342	0.01
+11460	-61937.44117	1342	0.01
+11470	-61937.44117	1343	0.01
+11480	-61937.44117	1343	0.01
+11490	-61937.44117	1344	0.01
+11500	-61937.44117	1344	0.01
+11510	-61937.44117	1345	0.01
+11520	-61937.44117	1345	0.01
+11530	-61937.44117	1345	0.01
+11540	-61937.44117	1346	0.01
+11550	-61937.44115	1346	0.01
+11560	-61937.44115	1347	0.01
+11570	-61937.44115	1347	0.01
+11580	-61937.44115	1348	0.01
+11590	-61937.44115	1348	0.01
+11600	-61937.44115	1349	0.01
+11610	-61937.44115	1349	0.01
+11620	-61937.44115	1350	0.01
+11630	-61937.44115	1350	0.01
+11640	-61937.44115	1351	0.01
+11650	-61937.44115	1351	0.01
+11660	-61937.44115	1352	0.01
+11670	-61937.44115	1352	0.01
+11680	-61937.44115	1353	0.01
+11690	-61937.44115	1353	0.01
+11700	-61937.44115	1354	0.01
+11710	-61937.44115	1354	0.01
+11720	-61937.44115	1355	0.01
+11730	-61937.44115	1355	0.01
+11740	-61937.44109	1356	0.01
+11750	-61937.44109	1356	0.01
+11760	-61937.44109	1357	0.01
+11770	-61937.44109	1357	0.01
+11780	-61937.44109	1358	0.01
+11790	-61937.44109	1358	0.01
+11800	-61937.43987	1358	0.01
+11810	-61937.43987	1359	0.01
+11820	-61937.43967	1359	0.01
+11830	-61937.43967	1360	0.01
+11840	-61937.43967	1360	0.01
+11850	-61937.43967	1361	0.01
+11860	-61937.43967	1361	0.01
+11870	-61937.43967	1362	0.01
+11880	-61937.43526	1362	0.01
+11890	-61937.43526	1363	0.01
+11900	-61937.43523	1363	0.01
+11910	-61937.43523	1364	0.01
+11920	-61937.43523	1364	0.01
+11930	-61937.43502	1365	0.01
+11940	-61937.43466	1365	0.01
+11950	-61937.43466	1366	0.01
+11960	-61937.43466	1366	0.01
+11970	-61937.43457	1366	0.01
+11980	-61937.43457	1367	0.01
+11990	-61937.43457	1367	0.01
+12000	-61937.43457	1368	0.01
+12010	-61937.43457	1368	0.01
+12020	-61937.43457	1369	0.01
+12030	-61937.434	1369	0.01
+12040	-61937.434	1370	0.01
+12050	-61937.434	1370	0.01
+12060	-61937.43324	1371	0.01
+12070	-61937.43324	1371	0.01
+12080	-61937.43324	1372	0.01
+12090	-61937.43324	1372	0.01
+12100	-61937.43324	1372	0.01
+12110	-61937.43324	1373	0.01
+12120	-61937.43324	1373	0.01
+12130	-61937.43324	1374	0.01
+12140	-61937.43324	1374	0.01
+12150	-61937.43324	1375	0.01
+12160	-61937.43324	1375	0.01
+12170	-61937.43324	1376	0.01
+12180	-61937.43324	1376	0.01
+12190	-61937.43324	1377	0.01
+12200	-61937.43324	1377	0.01
+12210	-61937.43324	1378	0.01
+12220	-61937.43324	1378	0.01
+12230	-61937.43324	1379	0.01
+12240	-61937.43324	1379	0.01
+12250	-61937.43324	1380	0.01
+12260	-61937.43324	1380	0.01
+12270	-61937.43324	1381	0.01
+12280	-61937.43324	1381	0.01
+12290	-61937.43324	1382	0.01
+12300	-61937.43324	1382	0.01
+12310	-61937.43324	1382	0.01
+12320	-61937.43324	1383	0.01
+12330	-61937.43324	1383	0.01
+12340	-61937.43324	1384	0.01
+12350	-61937.43324	1384	0.01
+12360	-61937.43324	1385	0.01
+12370	-61937.43324	1385	0.01
+12380	-61937.43324	1386	0.01
+12390	-61937.43324	1386	0.01
+12400	-61937.43324	1387	0.01
+12410	-61937.43324	1387	0.01
+12420	-61937.43324	1388	0.01
+12430	-61937.43324	1388	0.01
+12440	-61937.43324	1389	0.01
+12450	-61937.43324	1389	0.01
+12460	-61937.43324	1390	0.01
+12470	-61937.43324	1390	0.01
+12480	-61937.43324	1390	0.01
+12490	-61937.43324	1391	0.01
+12500	-61937.43324	1391	0.01
+12510	-61937.43324	1392	0.01
+12520	-61937.43243	1392	0.01
+12530	-61937.43243	1393	0.01
+12540	-61937.43243	1393	0.01
+12550	-61937.43243	1394	0.01
+12560	-61937.43243	1394	0.01
+12570	-61937.43022	1395	0.01
+12580	-61937.43022	1395	0.01
+12590	-61937.43022	1396	0.01
+12600	-61937.43022	1396	0.01
+12610	-61937.43022	1396	0.01
+12620	-61937.43022	1397	0.01
+12630	-61937.42937	1397	0.01
+12640	-61937.42937	1398	0.01
+12650	-61937.42937	1398	0.01
+12660	-61937.42937	1399	0.01
+12670	-61937.42937	1399	0.01
+12680	-61937.42937	1400	0.01
+12690	-61937.42937	1400	0.01
+12700	-61937.42937	1400	0.01
+12710	-61937.42937	1401	0.01
+12720	-61937.42937	1401	0.01
+12730	-61937.42937	1402	0.01
+12740	-61937.42937	1402	0.01
+12750	-61937.42506	1403	0.01
+12760	-61937.42506	1403	0.01
+12770	-61937.42506	1404	0.01
+12780	-61937.42506	1404	0.01
+12790	-61937.42506	1405	0.01
+12800	-61937.42506	1405	0.01
+12810	-61937.42506	1406	0.01
+12820	-61937.42506	1406	0.01
+12830	-61937.42506	1407	0.01
+12840	-61937.42506	1407	0.01
+12850	-61937.42506	1407	0.01
+12860	-61937.42506	1408	0.01
+12870	-61937.42506	1408	0.01
+12880	-61937.42506	1409	0.01
+12890	-61937.42506	1409	0.01
+12900	-61937.42506	1410	0.01
+12910	-61937.42506	1410	0.01
+12920	-61937.42506	1411	0.01
+12930	-61937.42506	1411	0.01
+12940	-61937.425	1412	0.01
+12950	-61937.425	1412	0.01
+12960	-61937.425	1413	0.01
+12970	-61937.425	1413	0.01
+12980	-61937.425	1413	0.01
+12990	-61937.425	1414	0.01
+13000	-61937.425	1414	0.01
+13010	-61937.425	1415	0.01
+13020	-61937.425	1415	0.01
+13030	-61937.425	1416	0.01
+13040	-61937.425	1416	0.01
+13050	-61937.425	1417	0.01
+13060	-61937.425	1417	0.01
+13070	-61937.42301	1418	0.01
+13080	-61937.42301	1418	0.01
+13090	-61937.42301	1418	0.01
+13100	-61937.42301	1419	0.01
+13110	-61937.42301	1419	0.01
+13120	-61937.42301	1420	0.01
+13130	-61937.42301	1420	0.01
+13140	-61937.42301	1421	0.01
+13150	-61937.42301	1421	0.01
+13160	-61937.42301	1422	0.01
+13170	-61937.42301	1422	0.01
+13180	-61937.42293	1423	0.01
+13190	-61937.42293	1423	0.01
+13200	-61937.42293	1424	0.01
+13210	-61937.42293	1424	0.01
+13220	-61937.42293	1425	0.01
+13230	-61937.42293	1425	0.01
+13240	-61937.42293	1425	0.01
+13250	-61937.42293	1426	0.01
+13260	-61937.42293	1426	0.01
+13270	-61937.42293	1427	0.01
+13280	-61937.42293	1427	0.01
+13290	-61937.42293	1428	0.01
+13300	-61937.42293	1428	0.01
+13310	-61937.42293	1429	0.01
+13320	-61937.42293	1429	0.01
+13330	-61937.42293	1430	0.01
+13340	-61937.42293	1430	0.01
+13350	-61937.42293	1431	0.01
+13360	-61937.42293	1431	0.01
+13370	-61937.42293	1432	0.01
+13380	-61937.42293	1432	0.01
+13390	-61937.42293	1433	0.01
+13400	-61937.42293	1433	0.01
+13410	-61937.42293	1434	0.01
+13420	-61937.42293	1434	0.01
+13430	-61937.42293	1435	0.01
+13440	-61937.42293	1435	0.01
+13450	-61937.42262	1436	0.01
+13460	-61937.42262	1436	0.01
+13470	-61937.42262	1437	0.01
+13480	-61937.42262	1437	0.01
+13490	-61937.42262	1438	0.01
+13500	-61937.42262	1438	0.01
+13510	-61937.42262	1439	0.01
+13520	-61937.42262	1439	0.01
+13530	-61937.42262	1440	0.01
+13540	-61937.42262	1440	0.01
+13550	-61937.42262	1440	0.01
+13560	-61937.42262	1441	0.01
+13570	-61937.42262	1441	0.01
+13580	-61937.42262	1442	0.01
+13590	-61937.42262	1442	0.01
+13600	-61937.4222	1443	0.01
+13610	-61937.4222	1443	0.01
+13620	-61937.4222	1444	0.01
+13630	-61937.4222	1444	0.01
+13640	-61937.42046	1445	0.01
+13650	-61937.42046	1445	0.01
+13660	-61937.42046	1446	0.01
+13670	-61937.42046	1446	0.01
+13680	-61937.42046	1447	0.01
+13690	-61937.42046	1447	0.01
+13700	-61937.42046	1447	0.01
+13710	-61937.42046	1448	0.01
+13720	-61937.42046	1448	0.01
+13730	-61937.42046	1449	0.01
+13740	-61937.42046	1449	0.01
+13750	-61937.42046	1450	0.01
+13760	-61937.42046	1450	0.01
+13770	-61937.42046	1451	0.01
+13780	-61937.42046	1451	0.01
+13790	-61937.42046	1452	0.01
+13800	-61937.42046	1452	0.01
+13810	-61937.41675	1453	0.01
+13820	-61937.41675	1453	0.01
+13830	-61937.41675	1453	0.01
+13840	-61937.41675	1454	0.01
+13850	-61937.41675	1454	0.01
+13860	-61937.41675	1455	0.01
+13870	-61937.41675	1455	0.01
+13880	-61937.41675	1456	0.01
+13890	-61937.41675	1456	0.01
+13900	-61937.41675	1457	0.01
+13910	-61937.41675	1457	0.01
+13920	-61937.41675	1458	0.01
+13930	-61937.41675	1458	0.01
+13940	-61937.41675	1458	0.01
+13950	-61937.41675	1459	0.01
+13960	-61937.41675	1459	0.01
+13970	-61937.41675	1460	0.01
+13980	-61937.41675	1460	0.01
+13990	-61937.41675	1461	0.01
+14000	-61937.41675	1461	0.01
+14010	-61937.41675	1462	0.01
+14020	-61937.41675	1462	0.01
+14030	-61937.41675	1462	0.01
+14040	-61937.41675	1463	0.01
+14050	-61937.41675	1463	0.01
+14060	-61937.41675	1464	0.01
+14070	-61937.41675	1464	0.01
+14080	-61937.41675	1465	0.01
+14090	-61937.41675	1465	0.01
+14100	-61937.41675	1466	0.01
+14110	-61937.41675	1466	0.01
+14120	-61937.41675	1467	0.01
+14130	-61937.41675	1467	0.01
+14140	-61937.41675	1468	0.01
+14150	-61937.41675	1468	0.01
+14160	-61937.41675	1469	0.01
+14170	-61937.41675	1469	0.01
+14180	-61937.41675	1470	0.01
+14190	-61937.41675	1470	0.01
+14200	-61937.41675	1471	0.01
+14210	-61937.41675	1471	0.01
+14220	-61937.41675	1472	0.01
+14230	-61937.41675	1472	0.01
+14240	-61937.41675	1473	0.01
+14250	-61937.41674	1473	0.01
+14260	-61937.41674	1473	0.01
+14270	-61937.41674	1474	0.01
+14280	-61937.41674	1474	0.01
+14290	-61937.41674	1475	0.01
+14300	-61937.41652	1475	0.01
+14310	-61937.41652	1476	0.01
+14320	-61937.41652	1476	0.01
+14330	-61937.41642	1477	0.01
+14340	-61937.41642	1477	0.01
+14350	-61937.41642	1478	0.01
+14360	-61937.41642	1478	0.01
+14370	-61937.41642	1479	0.01
+14380	-61937.41642	1479	0.01
+14390	-61937.41642	1480	0.01
+14400	-61937.41642	1480	0.01
+14410	-61937.41642	1481	0.01
+14420	-61937.41642	1481	0.01
+14430	-61937.41642	1482	0.01
+14440	-61937.41642	1482	0.01
+14450	-61937.41642	1483	0.01
+14460	-61937.41642	1483	0.01
+14470	-61937.41642	1483	0.01
+14480	-61937.41642	1484	0.01
+14490	-61937.41642	1484	0.01
+14500	-61937.41607	1485	0.01
+14510	-61937.41607	1485	0.01
+14520	-61937.41607	1486	0.01
+14530	-61937.41282	1486	0.01
+14540	-61937.41282	1487	0.01
+14550	-61937.41282	1487	0.01
+14560	-61937.41282	1488	0.01
+14570	-61937.41282	1488	0.01
+14580	-61937.41282	1489	0.01
+14590	-61937.41282	1489	0.01
+14600	-61937.41282	1490	0.01
+14610	-61937.41282	1490	0.01
+14620	-61937.41282	1491	0.01
+14630	-61937.41282	1491	0.01
+14640	-61937.41282	1492	0.01
+14650	-61937.41282	1492	0.01
+14660	-61937.41282	1493	0.01
+14670	-61937.41282	1493	0.01
+14680	-61937.41282	1494	0.01
+14690	-61937.41282	1494	0.01
+14700	-61937.41282	1495	0.01
+14710	-61937.41282	1495	0.01
+14720	-61937.41282	1495	0.01
+14730	-61937.41282	1496	0.01
+14740	-61937.41282	1496	0.01
+14750	-61937.41282	1497	0.01
+14760	-61937.41282	1497	0.01
+14770	-61937.41282	1498	0.01
+14780	-61937.41282	1498	0.01
+14790	-61937.41282	1499	0.01
+14800	-61937.41282	1499	0.01
+14810	-61937.41282	1500	0.01
+14820	-61937.41282	1500	0.01
+14830	-61937.41282	1501	0.01
+14840	-61937.41282	1501	0.01
+14850	-61937.41282	1502	0.01
+14860	-61937.41282	1502	0.01
+14870	-61937.41282	1503	0.01
+14880	-61937.41282	1503	0.01
+14890	-61937.41282	1503	0.01
+14900	-61937.41282	1504	0.01
+14910	-61937.41282	1504	0.01
+14920	-61937.41282	1505	0.01
+14930	-61937.41282	1505	0.01
+14940	-61937.41282	1506	0.01
+14950	-61937.41282	1506	0.01
+14960	-61937.41282	1507	0.01
+14970	-61937.41282	1507	0.01
+14980	-61937.41282	1508	0.01
+14990	-61937.41282	1508	0.01
+15000	-61937.41282	1509	0.01
+15010	-61937.38849	1510	0.01
+15020	-61937.38849	1511	0.01
+15030	-61937.38849	1511	0.01
+15040	-61937.38849	1512	0.01
+15050	-61937.38831	1513	0.01
+15060	-61937.38831	1513	0.01
+15070	-61937.38831	1514	0.01
+15080	-61937.38831	1514	0.01
+15090	-61937.38831	1515	0.01
+15100	-61937.38831	1515	0.01
+15110	-61937.38831	1516	0.01
+15120	-61937.38831	1516	0.01
+15130	-61937.38831	1517	0.01
+15140	-61937.38831	1517	0.01
+15150	-61937.38831	1518	0.01
+15160	-61937.38831	1518	0.01
+15170	-61937.38831	1519	0.01
+15180	-61937.38831	1519	0.01
+15190	-61937.38831	1520	0.01
+15200	-61937.38831	1521	0.01
+15210	-61937.38831	1521	0.01
+15220	-61937.38831	1522	0.01
+15230	-61937.38831	1522	0.01
+15240	-61937.38831	1523	0.01
+15250	-61937.38831	1523	0.01
+15260	-61937.38831	1524	0.01
+15270	-61937.38831	1524	0.01
+15280	-61937.38831	1525	0.01
+15290	-61937.38831	1525	0.01
+15300	-61937.38831	1525	0.01
+15310	-61937.38831	1526	0.01
+15320	-61937.38831	1526	0.01
+15330	-61937.38831	1527	0.01
+15340	-61937.38831	1527	0.01
+15350	-61937.38831	1528	0.01
+15360	-61937.38831	1528	0.01
+15370	-61937.38831	1529	0.01
+15380	-61937.38829	1529	0.01
+15390	-61937.38829	1530	0.01
+15400	-61937.38829	1530	0.01
+15410	-61937.38829	1530	0.01
+15420	-61937.38829	1531	0.01
+15430	-61937.38829	1531	0.01
+15440	-61937.38829	1532	0.01
+15450	-61937.3867	1533	0.01
+15460	-61937.3867	1533	0.01
+15470	-61937.3867	1533	0.01
+15480	-61937.3867	1534	0.01
+15490	-61937.3867	1535	0.01
+15500	-61937.3867	1535	0.01
+15510	-61937.3867	1535	0.01
+15520	-61937.3867	1536	0.01
+15530	-61937.3867	1537	0.01
+15540	-61937.3867	1537	0.01
+15550	-61937.3867	1537	0.01
+15560	-61937.3867	1538	0.01
+15570	-61937.3867	1538	0.01
+15580	-61937.3867	1539	0.01
+15590	-61937.3867	1539	0.01
+15600	-61937.38545	1540	0.01
+15610	-61937.38545	1540	0.01
+15620	-61937.38545	1541	0.01
+15630	-61937.38545	1541	0.01
+15640	-61937.38545	1542	0.01
+15650	-61937.38545	1542	0.01
+15660	-61937.38545	1543	0.01
+15670	-61937.38545	1543	0.01
+15680	-61937.38545	1544	0.01
+15690	-61937.38545	1544	0.01
+15700	-61937.38545	1545	0.01
+15710	-61937.38545	1545	0.01
+15720	-61937.38545	1546	0.01
+15730	-61937.38545	1546	0.01
+15740	-61937.38545	1547	0.01
+15750	-61937.38545	1547	0.01
+15760	-61937.38545	1548	0.01
+15770	-61937.38545	1548	0.01
+15780	-61937.38545	1549	0.01
+15790	-61937.38545	1549	0.01
+15800	-61937.38545	1550	0.01
+15810	-61937.38545	1550	0.01
+15820	-61937.38091	1551	0.01
+15830	-61937.38091	1551	0.01
+15840	-61937.38091	1552	0.01
+15850	-61937.38091	1552	0.01
+15860	-61937.38067	1553	0.01
+15870	-61937.38034	1553	0.01
+15880	-61937.38034	1554	0.01
+15890	-61937.37839	1554	0.01
+15900	-61937.37839	1555	0.01
+15910	-61937.37839	1555	0.01
+15920	-61937.37839	1556	0.01
+15930	-61937.37839	1556	0.01
+15940	-61937.37839	1557	0.01
+15950	-61937.37821	1557	0.01
+15960	-61937.37821	1558	0.01
+15970	-61937.37821	1558	0.01
+15980	-61937.37821	1559	0.01
+15990	-61937.37821	1559	0.01
+16000	-61937.37821	1560	0.01
+16010	-61937.37821	1560	0.01
+16020	-61937.37821	1561	0.01
+16030	-61937.37821	1561	0.01
+16040	-61937.37821	1561	0.01
+16050	-61937.37821	1562	0.01
+16060	-61937.37821	1562	0.01
+16070	-61937.37821	1563	0.01
+16080	-61937.37821	1563	0.01
+16090	-61937.37821	1564	0.01
+16100	-61937.37821	1564	0.01
+16110	-61937.37821	1565	0.01
+16120	-61937.37821	1565	0.01
+16130	-61937.37821	1566	0.01
+16140	-61937.37821	1566	0.01
+16150	-61937.37821	1567	0.01
+16160	-61937.37821	1567	0.01
+16170	-61937.37821	1567	0.01
+16180	-61937.37821	1568	0.01
+16190	-61937.37821	1568	0.01
+16200	-61937.37821	1569	0.01
+16210	-61937.37821	1569	0.01
+16220	-61937.37821	1570	0.01
+16230	-61937.37821	1570	0.01
+16240	-61937.37821	1570	0.01
+16250	-61937.37821	1571	0.01
+16260	-61937.37821	1571	0.01
+16270	-61937.37821	1572	0.01
+16280	-61937.37821	1572	0.01
+16290	-61937.37821	1573	0.01
+16300	-61937.37821	1573	0.01
+16310	-61937.37821	1574	0.01
+16320	-61937.37821	1574	0.01
+16330	-61937.37821	1575	0.01
+16340	-61937.37821	1575	0.01
+16350	-61937.37821	1576	0.01
+16360	-61937.37821	1576	0.01
+16370	-61937.37821	1576	0.01
+16380	-61937.37821	1577	0.01
+16390	-61937.37821	1577	0.01
+16400	-61937.37821	1578	0.01
+Score after final optimization: -61937.27016
+Final	-61937.27016	1604	0.01
diff --git a/example/partition/exampleRuns/dna+Mkv/mixedDnaMkv.screen.log b/example/partition/exampleRuns/dna+Mkv/mixedDnaMkv.screen.log
new file mode 100644
index 0000000..d63bfde
--- /dev/null
+++ b/example/partition/exampleRuns/dna+Mkv/mixedDnaMkv.screen.log
@@ -0,0 +1,780 @@
+Running GARLI-PART Version 2.0.1008 (17 Mar 2011)
+->Single processor version<-
+
+##############################################################
+ This is GARLI 2.0, the first "official" release including 
+          partitioned models.  It is a merging of
+   official release 1.0 and beta version GARLI-PART 0.97
+  Briefly, it includes models for nucleotides, amino acids,
+ codons, and morphology-like characters, any of which can be 
+  mixed together and applied to different subsets of data.
+
+    General program usage is extensively documented here:
+            http://www.nescent.org/wg_garli/
+      see this page for details on partitioned usage:
+  http://www.nescent.org/wg_garli/Partition_testing_version
+   and this page for details on Mkv mophology model usage:
+    http://www.nescent.org/wg_garli/Mkv_morphology_model
+         PLEASE LET ME KNOW OF ANY PROBLEMS AT:
+                garli.support at gmail.com
+##############################################################
+This version has undergone much testing, but is still a BETA VERSION.
+   - Please check results carefully! -
+Compiled Mar 21 2011 13:13:18 using Intel icc compiler version 9.10
+Using NCL version 2.1.10
+
+#######################################################
+Reading config file garli.conf
+###################################################
+READING OF DATA
+Attempting to read data file in Nexus format (using NCL):
+	dnaPlusGapCoding.nex ...
+Reading TAXA block... successful
+Reading CHARACTERS block... found dna data... successful
+Reading CHARACTERS block... found standard data... successful
+
+###################################################
+PARTITIONING OF DATA AND MODELS
+
+CHECK: DIFFERENT MODEL TYPES AND MODEL PARAMETERS APPLY
+	TO EACH DATA SUBSET (no linkage)
+
+GARLI data subset 1
+	CHARACTERS block #1 ("Untitled DATA Block 1GapsAsMissing")
+	Data read as Nucleotide data,
+	modeled as Nucleotide data
+	Summary of data:
+	  64 sequences.
+	  2040 constant characters.
+	  1025 parsimony-informative characters.
+	  137 uninformative variable characters.
+	  9 characters were completely missing or ambiguous (removed).
+	  3202 total characters (3211 before removing empty columns).
+	  1989 unique patterns in compressed data matrix.
+	Pattern processing required < 1 second
+
+GARLI data subset 2
+	CHARACTERS block #2 ("Untitled DATA Block 1GapsAsBinary")
+	Data read as Standard k-state data, variable only,
+	modeled as Standard k-state data, variable only
+	NOTE: entirely missing characters removed from matrix:  736 792 1244 1644 1645 1993-1995 2195
+	Subset of data with 2 states:
+	  chars 1-735 737-791 793-1243 1245-1643 1646-1992 1996-2194 2196-2723
+	Summary of data:
+	  64 sequences.
+	  0 constant characters.
+	  1530 parsimony-informative characters.
+	  1184 uninformative variable characters.
+	  2714 total characters.
+	  768 unique patterns in compressed data matrix.
+	Pattern processing required 1 second(s)
+
+
+###################################################
+NOTE: Unlike many programs, the amount of system memory that Garli will
+use can be controlled by the user.
+(This comes from the availablememory setting in the configuration file.
+Availablememory should NOT be set to more than the actual amount of 
+physical memory that your computer has installed)
+
+For this dataset:
+ Mem level		availablememory setting
+  great			    >= 165 MB
+  good			approx 164 MB to 106 MB
+  low			approx 105 MB to 44 MB
+  very low		approx 43 MB to 34 MB
+the minimum required availablememory is 34 MB
+
+You specified that Garli should use at most 512.0 MB of memory.
+
+Garli will actually use approx. 246.5 MB of memory
+**Your memory level is: great (you don't need to change anything)**
+
+#######################################################
+Found outgroup specification:  1
+
+#######################################################
+STARTING RUN
+
+>>>Search rep 1 (of 2)<<<
+MODEL REPORT - Parameters are at their INITIAL values (not yet optimized)
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3406 0.2086 0.1521 0.2987 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    with an invariant (invariable) site category, proportion estimated
+      0.1593
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0000	0.1593
+      0.0334	0.2102
+      0.2519	0.2102
+      0.8203	0.2102
+      2.8944	0.2102
+
+Model 2
+  Number of states = 2 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.50, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Subset rate multipliers:
+    1.00  1.00
+Starting with seed=853654
+
+creating random starting tree...
+Initial ln Likelihood: -128174.5818
+optimizing: starting branch lengths, alpha shape, prop. invar, rel rates, eq freqs, subset rates...
+pass 1:+22928.633 (branch=20244.73 scale= 59.25 alpha=919.94 freqs=140.51 rel rates= 92.29 pinv=508.82 subset rates=963.09)
+pass 2:+ 2693.685 (branch=2114.86 scale=  2.80 alpha=211.33 freqs= 20.51 rel rates= 27.46 pinv=212.97 subset rates=103.76)
+pass 3:+  785.400 (branch= 283.03 scale= 17.67 alpha=289.84 freqs=  6.02 rel rates= 21.63 pinv= 81.62 subset rates= 85.59)
+pass 4:+  238.687 (branch= 129.63 scale= 13.69 alpha= 18.44 freqs=  2.42 rel rates=  6.25 pinv=  0.00 subset rates= 68.26)
+pass 5:+   96.971 (branch=  49.27 scale=  7.20 alpha=  0.01 freqs=  0.07 rel rates=  7.49 pinv=  0.00 subset rates= 32.94)
+pass 6:+   51.721 (branch=  15.02 scale= 16.85 alpha=  0.01 freqs=  0.16 rel rates=  1.87 pinv=  1.06 subset rates= 16.76)
+pass 7:+   43.183 (branch=  16.32 scale=  7.03 alpha=  0.02 freqs=  0.24 rel rates=  4.16 pinv=  1.70 subset rates= 13.72)
+pass 8:+   34.358 (branch=   6.09 scale= 11.96 alpha=  0.67 freqs=  0.19 rel rates=  2.77 pinv=  2.29 subset rates= 10.39)
+pass 9:+   26.268 (branch=   0.57 scale= 13.26 alpha=  0.01 freqs=  0.22 rel rates=  2.23 pinv=  1.50 subset rates=  8.49)
+pass10:+   23.507 (branch=   1.12 scale= 11.18 alpha=  0.01 freqs=  0.26 rel rates=  2.44 pinv=  1.23 subset rates=  7.28)
+pass11:+   18.732 (branch=   0.01 scale=  9.66 alpha=  0.01 freqs=  0.20 rel rates=  1.70 pinv=  0.88 subset rates=  6.26)
+pass12:+   16.213 (branch=   0.01 scale=  8.09 alpha=  0.01 freqs=  0.26 rel rates=  1.78 pinv=  0.69 subset rates=  5.37)
+pass13:+   12.915 (branch=   0.01 scale=  6.85 alpha=  0.01 freqs=  0.29 rel rates=  1.11 pinv=  0.06 subset rates=  4.57)
+pass14:+   10.495 (branch=   0.01 scale=  5.37 alpha=  0.01 freqs=  0.38 rel rates=  0.02 pinv=  0.99 subset rates=  3.71)
+pass15:+    9.366 (branch=   0.10 scale=  4.40 alpha=  0.02 freqs=  0.22 rel rates=  0.75 pinv=  0.63 subset rates=  3.25)
+pass16:+    8.907 (branch=   0.01 scale=  4.62 alpha=  0.02 freqs=  0.22 rel rates=  0.73 pinv=  0.03 subset rates=  3.28)
+pass17:+    7.469 (branch=   0.01 scale=  3.78 alpha=  0.03 freqs=  0.24 rel rates=  0.65 pinv=  0.04 subset rates=  2.71)
+pass18:+    8.518 (branch=   0.01 scale=  3.11 alpha=  0.56 freqs=  0.27 rel rates=  1.61 pinv=  0.62 subset rates=  2.34)
+pass19:+    6.269 (branch=   0.01 scale=  3.10 alpha=  0.00 freqs=  0.31 rel rates=  0.54 pinv=  0.03 subset rates=  2.28)
+pass20:+    4.812 (branch=   0.01 scale=  2.60 alpha=  0.01 freqs=  0.30 rel rates=  0.02 pinv=  0.04 subset rates=  1.83)
+pass21:+    4.453 (branch=   0.01 scale=  1.57 alpha=  0.01 freqs=  0.20 rel rates=  0.54 pinv=  0.84 subset rates=  1.29)
+pass22:+    4.078 (branch=   0.00 scale=  2.20 alpha=  0.02 freqs=  0.24 rel rates=  0.02 pinv=  0.01 subset rates=  1.58)
+pass23:+    4.356 (branch=   0.49 scale=  1.49 alpha=  0.02 freqs=  0.11 rel rates=  1.13 pinv=  0.04 subset rates=  1.08)
+pass24:+    5.268 (branch=   0.58 scale=  1.69 alpha=  0.03 freqs=  0.22 rel rates=  1.58 pinv=  0.03 subset rates=  1.14)
+pass25:+    4.941 (branch=   1.04 scale=  1.19 alpha=  0.03 freqs=  0.28 rel rates=  1.41 pinv=  0.04 subset rates=  0.95)
+pass26:+    3.345 (branch=   0.46 scale=  1.10 alpha=  0.64 freqs=  0.31 rel rates=  0.01 pinv=  0.05 subset rates=  0.77)
+pass27:+    2.213 (branch=   0.00 scale=  0.69 alpha=  0.00 freqs=  0.21 rel rates=  0.01 pinv=  0.74 subset rates=  0.55)
+pass28:+    2.547 (branch=   0.00 scale=  0.81 alpha=  0.00 freqs=  0.07 rel rates=  0.98 pinv=  0.03 subset rates=  0.66)
+pass29:+    1.942 (branch=   0.00 scale=  0.99 alpha=  0.01 freqs=  0.18 rel rates=  0.02 pinv=  0.02 subset rates=  0.72)
+pass30:+    1.351 (branch=   0.00 scale=  0.58 alpha=  0.01 freqs=  0.04 rel rates=  0.67 pinv=  0.04 subset rates=  0.00)
+pass31:+    0.855 (branch=   0.00 scale=  0.00 alpha=  0.02 freqs=  0.14 rel rates=  0.69 pinv=  0.00 subset rates=  0.00)
+pass32:+    0.092 (branch=   0.00 scale=  0.00 alpha=  0.01 freqs=  0.05 rel rates=  0.01 pinv=  0.02 subset rates=  0.00)
+lnL after optimization: -101113.0297
+gen      current_lnL    precision  last_tree_imp  
+0        -101113.0297     0.500           0 
+100      -90517.3537      0.500         100 
+200      -83291.8098      0.500         199 
+300      -78503.3448      0.500         298 
+400      -73032.9079      0.500         400 
+500      -69757.1888      0.500         499 
+600      -67518.7818      0.500         593 
+700      -66093.8913      0.500         697 
+800      -65360.8432      0.500         799 
+900      -64392.4094      0.500         898 
+1000     -63053.1325      0.500         992 
+1100     -62393.8347      0.500        1092 
+1200     -62063.3513      0.500        1157 
+1300     -62005.3529      0.500        1278 
+1400     -61997.1106      0.500        1278 
+1500     -61993.8298      0.500        1278 
+1600     -61988.1565      0.500        1278 
+1700     -61984.6113      0.500        1278 
+1800     -61976.3742      0.500        1278 
+Optimization precision reduced 
+   Optimizing parameters...    improved   10.998 lnL
+   Optimizing branchlengths... improved    3.264 lnL
+1900     -61951.6576      0.451        1278 
+2000     -61949.5978      0.451        1278 
+2100     -61947.1059      0.451        1278 
+2200     -61946.0770      0.451        1278 
+2300     -61944.0182      0.451        1278 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.032 lnL
+   Optimizing branchlengths... improved    0.571 lnL
+2400     -61942.7941      0.402        1278 
+2500     -61942.3538      0.402        1278 
+2600     -61942.0551      0.402        1278 
+2700     -61941.7881      0.402        1278 
+2800     -61941.5493      0.402        1278 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.017 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+2900     -61941.3428      0.353        1278 
+3000     -61940.8061      0.353        1278 
+3100     -61940.6832      0.353        1278 
+3200     -61940.4818      0.353        1278 
+3300     -61940.4333      0.353        1278 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.007 lnL
+   Optimizing branchlengths... improved    0.452 lnL
+3400     -61939.7576      0.304        1278 
+3500     -61939.6917      0.304        1278 
+3600     -61939.5526      0.304        1278 
+3700     -61939.3828      0.304        1278 
+3800     -61939.3664      0.304        1278 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.012 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+3900     -61939.2876      0.255        1278 
+4000     -61939.2292      0.255        1278 
+4100     -61939.1071      0.255        1278 
+4200     -61938.9824      0.255        1278 
+4300     -61938.9732      0.255        1278 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.004 lnL
+   Optimizing branchlengths... improved    0.328 lnL
+4400     -61938.6275      0.206        1278 
+4500     -61938.5428      0.206        1278 
+4600     -61938.5114      0.206        1278 
+4700     -61938.5110      0.206        1278 
+4800     -61938.4303      0.206        1278 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.004 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+4900     -61938.4244      0.157        1278 
+5000     -61938.3613      0.157        1278 
+5100     -61938.3570      0.157        1278 
+5200     -61938.3257      0.157        1278 
+5300     -61938.3232      0.157        1278 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.003 lnL
+   Optimizing branchlengths... improved    0.139 lnL
+5400     -61938.1805      0.108        1278 
+5500     -61938.1691      0.108        1278 
+5600     -61938.1620      0.108        1278 
+5700     -61938.1601      0.108        1278 
+5800     -61938.1528      0.108        1278 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.001 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+5900     -61938.1409      0.059        1278 
+6000     -61938.1409      0.059        1278 
+6100     -61938.1409      0.059        1278 
+6200     -61938.1399      0.059        1278 
+6300     -61938.1322      0.059        1278 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.001 lnL
+   Optimizing branchlengths... improved    0.540 lnL
+6400     -61937.5856      0.010        1278 
+6500     -61937.5849      0.010        1278 
+6600     -61937.5756      0.010        1278 
+6700     -61937.5746      0.010        1278 
+6800     -61937.5711      0.010        1278 
+6900     -61937.5698      0.010        1278 
+7000     -61937.5698      0.010        1278 
+7100     -61937.5698      0.010        1278 
+7200     -61937.5698      0.010        1278 
+7300     -61937.5675      0.010        1278 
+7400     -61937.5669      0.010        1278 
+7500     -61937.5637      0.010        1278 
+7600     -61937.5637      0.010        1278 
+7700     -61937.5603      0.010        1278 
+7800     -61937.5603      0.010        1278 
+7900     -61937.5599      0.010        1278 
+8000     -61937.5599      0.010        1278 
+8100     -61937.5595      0.010        1278 
+8200     -61937.5594      0.010        1278 
+8300     -61937.5567      0.010        1278 
+8400     -61937.5495      0.010        1278 
+8500     -61937.5477      0.010        1278 
+8600     -61937.5457      0.010        1278 
+8700     -61937.5457      0.010        1278 
+8800     -61937.5356      0.010        1278 
+8900     -61937.5356      0.010        1278 
+9000     -61937.5311      0.010        1278 
+9100     -61937.5311      0.010        1278 
+9200     -61937.5310      0.010        1278 
+9300     -61937.5260      0.010        1278 
+9400     -61937.5255      0.010        1278 
+9500     -61937.5236      0.010        1278 
+9600     -61937.5228      0.010        1278 
+9700     -61937.5167      0.010        1278 
+9800     -61937.5157      0.010        1278 
+9900     -61937.5157      0.010        1278 
+10000    -61937.5156      0.010        1278 
+10100    -61937.5156      0.010        1278 
+10200    -61937.5152      0.010        1278 
+10300    -61937.5147      0.010        1278 
+10400    -61937.5120      0.010        1278 
+10500    -61937.5120      0.010        1278 
+10600    -61937.5071      0.010        1278 
+10700    -61937.5071      0.010        1278 
+10800    -61937.5062      0.010        1278 
+10900    -61937.5042      0.010        1278 
+11000    -61937.5042      0.010        1278 
+11100    -61937.5042      0.010        1278 
+11200    -61937.5025      0.010        1278 
+11300    -61937.5019      0.010        1278 
+11400    -61937.5004      0.010        1278 
+11500    -61937.5004      0.010        1278 
+11600    -61937.5004      0.010        1278 
+11700    -61937.4882      0.010        1278 
+11800    -61937.4882      0.010        1278 
+11900    -61937.4863      0.010        1278 
+12000    -61937.4863      0.010        1278 
+12100    -61937.4861      0.010        1278 
+12200    -61937.4861      0.010        1278 
+12300    -61937.4861      0.010        1278 
+12400    -61937.4861      0.010        1278 
+12500    -61937.4861      0.010        1278 
+12600    -61937.4861      0.010        1278 
+12700    -61937.4741      0.010        1278 
+12800    -61937.4710      0.010        1278 
+12900    -61937.4710      0.010        1278 
+13000    -61937.4706      0.010        1278 
+13100    -61937.4693      0.010        1278 
+13200    -61937.4693      0.010        1278 
+13300    -61937.4673      0.010        1278 
+13400    -61937.4606      0.010        1278 
+13500    -61937.4604      0.010        1278 
+13600    -61937.4589      0.010        1278 
+13700    -61937.4589      0.010        1278 
+13800    -61937.4589      0.010        1278 
+13900    -61937.4589      0.010        1278 
+14000    -61937.4565      0.010        1278 
+14100    -61937.4565      0.010        1278 
+14200    -61937.4565      0.010        1278 
+14300    -61937.4564      0.010        1278 
+14400    -61937.4525      0.010        1278 
+14500    -61937.4506      0.010        1278 
+14600    -61937.4495      0.010        1278 
+14700    -61937.4421      0.010        1278 
+14800    -61937.4401      0.010        1278 
+14900    -61937.4401      0.010        1278 
+15000    -61937.4395      0.010        1278 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+15100    -61937.4392      0.010        1278 
+15200    -61937.4392      0.010        1278 
+15300    -61937.4383      0.010        1278 
+15400    -61937.4383      0.010        1278 
+15500    -61937.4372      0.010        1278 
+15600    -61937.4372      0.010        1278 
+15700    -61937.4349      0.010        1278 
+15800    -61937.4340      0.010        1278 
+15900    -61937.4340      0.010        1278 
+16000    -61937.4339      0.010        1278 
+16100    -61937.4333      0.010        1278 
+16200    -61937.4332      0.010        1278 
+16300    -61937.4332      0.010        1278 
+16400    -61937.4332      0.010        1278 
+Reached termination condition!
+last topological improvement at gen 1278
+Improvement over last 500 gen = 0.00072
+Current score = -61937.4332
+Performing final optimizations...
+pass 1 : -61937.3675   (branch= 0.0652  alpha= 0.0000  pinv= 0.0002  eq freqs= 0.0001  rel rates= 0.0002  subset rates= 0.0000)
+pass 2 : -61937.3404   (branch= 0.0271  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0001  subset rates= 0.0000)
+pass 3 : -61937.2994   (branch= 0.0408  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 4 : -61937.2857   (branch= 0.0137  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 5 : -61937.2775   (branch= 0.0082  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 6 : -61937.2740   (branch= 0.0035  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 7 : -61937.2719   (branch= 0.0021  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 8 : -61937.2714   (branch= 0.0006  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 9 : -61937.2709   (branch= 0.0005  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 10: -61937.2707   (branch= 0.0002  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 11: -61937.2706   (branch= 0.0001  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 12: -61937.2705   (branch= 0.0001  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 13: -61937.2705   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 14: -61937.2705   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 15: -61937.2705   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+Looking for minimum length branches...
+Final score = -61937.2705
+Time used so far = 0 hours, 13 minutes and 15 seconds
+
+MODEL REPORT - Parameter values are FINAL
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 2.029, AG = 7.730, AT = 2.082, CG = 0.818, CT = 13.872, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3361 0.2200 0.1423 0.3016 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.7748
+    with an invariant (invariable) site category, proportion estimated
+      0.4335
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0000	0.4335
+      0.0902	0.1416
+      0.3968	0.1416
+      0.9497	0.1416
+      2.5633	0.1416
+
+Model 2
+  Number of states = 2 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.50, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Subset rate multipliers:
+    1.75  0.12
+NOTE: Collapsing of minimum length branches was requested (collapsebranches = 1)
+    No branches were short enough to be collapsed.
+
+>>>Completed Search rep 1 (of 2)<<<
+
+>>>Search rep 2 (of 2)<<<
+MODEL REPORT - Parameters are at their INITIAL values (not yet optimized)
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3406 0.2086 0.1521 0.2987 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    with an invariant (invariable) site category, proportion estimated
+      0.1593
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0000	0.1593
+      0.0334	0.2102
+      0.2519	0.2102
+      0.8203	0.2102
+      2.8944	0.2102
+
+Model 2
+  Number of states = 2 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.50, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Subset rate multipliers:
+    1.00  1.00
+Starting with seed=1646090181
+
+creating random starting tree...
+Initial ln Likelihood: -128061.7427
+optimizing: starting branch lengths, alpha shape, prop. invar, rel rates, eq freqs, subset rates...
+pass 1:+23690.219 (branch=20808.93 scale= 99.25 alpha=972.18 freqs=122.54 rel rates=106.53 pinv=565.82 subset rates=1014.96)
+pass 2:+ 2933.758 (branch=2250.01 scale=  0.00 alpha=212.57 freqs=  5.19 rel rates= 20.80 pinv=316.40 subset rates=128.79)
+pass 3:+  724.336 (branch= 270.25 scale= 15.49 alpha=316.53 freqs=  8.90 rel rates= 17.79 pinv=  0.00 subset rates= 95.37)
+pass 4:+  207.720 (branch= 117.56 scale= 10.72 alpha=  7.55 freqs=  3.55 rel rates=  6.88 pinv=  0.00 subset rates= 61.47)
+pass 5:+  102.899 (branch=  57.65 scale=  8.44 alpha=  0.01 freqs=  0.16 rel rates=  6.68 pinv=  0.00 subset rates= 29.96)
+pass 6:+   73.722 (branch=  38.02 scale= 16.81 alpha=  0.00 freqs=  0.23 rel rates=  2.12 pinv=  2.74 subset rates= 13.80)
+pass 7:+   58.202 (branch=  26.89 scale= 15.27 alpha=  0.01 freqs=  0.80 rel rates=  1.32 pinv=  2.70 subset rates= 11.20)
+pass 8:+   30.447 (branch=   1.55 scale= 14.46 alpha=  0.02 freqs=  0.32 rel rates=  2.60 pinv=  2.39 subset rates=  9.13)
+pass 9:+   23.616 (branch=   0.00 scale= 12.60 alpha=  0.02 freqs=  0.73 rel rates=  0.60 pinv=  1.91 subset rates=  7.76)
+pass10:+   19.063 (branch=   0.00 scale= 10.99 alpha=  0.02 freqs=  0.19 rel rates=  0.04 pinv=  1.20 subset rates=  6.63)
+pass11:+   16.098 (branch=   0.00 scale=  7.87 alpha=  0.02 freqs=  0.06 rel rates=  1.31 pinv=  1.48 subset rates=  5.37)
+pass12:+   15.004 (branch=   0.00 scale=  8.25 alpha=  0.02 freqs=  0.09 rel rates=  1.28 pinv=  0.05 subset rates=  5.31)
+pass13:+   13.824 (branch=   0.00 scale=  6.36 alpha=  0.02 freqs=  0.20 rel rates=  2.01 pinv=  0.85 subset rates=  4.39)
+pass14:+   11.018 (branch=   0.00 scale=  5.78 alpha=  0.02 freqs=  0.25 rel rates=  0.94 pinv=  0.05 subset rates=  3.98)
+pass15:+   11.213 (branch=   0.00 scale=  4.74 alpha=  0.02 freqs=  0.33 rel rates=  2.05 pinv=  0.66 subset rates=  3.41)
+pass16:+    9.111 (branch=   0.00 scale=  4.33 alpha=  0.02 freqs=  0.35 rel rates=  1.29 pinv=  0.04 subset rates=  3.08)
+pass17:+    8.520 (branch=   0.00 scale=  3.60 alpha=  0.02 freqs=  0.19 rel rates=  2.05 pinv=  0.06 subset rates=  2.60)
+pass18:+    8.284 (branch=   0.00 scale=  2.92 alpha=  0.02 freqs=  0.83 rel rates=  1.56 pinv=  0.74 subset rates=  2.21)
+pass19:+    5.273 (branch=   0.00 scale=  2.92 alpha=  0.03 freqs=  0.23 rel rates=  0.02 pinv=  0.03 subset rates=  2.04)
+pass20:+    5.987 (branch=   0.97 scale=  2.15 alpha=  0.02 freqs=  0.13 rel rates=  0.57 pinv=  0.64 subset rates=  1.49)
+pass21:+    5.609 (branch=   0.00 scale=  2.34 alpha=  0.66 freqs=  0.13 rel rates=  0.69 pinv=  0.02 subset rates=  1.77)
+pass22:+    5.315 (branch=   0.00 scale=  2.08 alpha=  0.01 freqs=  0.14 rel rates=  1.51 pinv=  0.02 subset rates=  1.56)
+pass23:+    3.197 (branch=   0.00 scale=  1.70 alpha=  0.01 freqs=  0.20 rel rates=  0.02 pinv=  0.03 subset rates=  1.24)
+pass24:+    2.603 (branch=   0.00 scale=  1.09 alpha=  0.01 freqs=  0.10 rel rates=  0.02 pinv=  0.53 subset rates=  0.86)
+pass25:+    2.881 (branch=   0.00 scale=  1.06 alpha=  0.01 freqs=  0.01 rel rates=  0.91 pinv=  0.02 subset rates=  0.87)
+pass26:+    2.260 (branch=   0.00 scale=  1.19 alpha=  0.02 freqs=  0.12 rel rates=  0.02 pinv=  0.02 subset rates=  0.89)
+pass27:+    2.010 (branch=   0.00 scale=  0.77 alpha=  0.02 freqs=  0.01 rel rates=  0.54 pinv=  0.04 subset rates=  0.63)
+pass28:+    1.596 (branch=   0.00 scale=  0.82 alpha=  0.03 freqs=  0.07 rel rates=  0.02 pinv=  0.03 subset rates=  0.62)
+pass29:+    0.640 (branch=   0.00 scale=  0.54 alpha=  0.03 freqs=  0.01 rel rates=  0.02 pinv=  0.05 subset rates=  0.00)
+pass30:+    0.090 (branch=   0.00 scale=  0.00 alpha=  0.03 freqs=  0.00 rel rates=  0.02 pinv=  0.04 subset rates=  0.00)
+lnL after optimization: -100067.2273
+gen      current_lnL    precision  last_tree_imp  
+0        -100067.2273     0.500           0 
+100      -89028.2502      0.500          99 
+200      -78816.4419      0.500         200 
+300      -74605.0115      0.500         298 
+400      -69536.0283      0.500         399 
+500      -66577.3643      0.500         496 
+600      -65606.7330      0.500         599 
+700      -64212.7525      0.500         696 
+800      -63896.2512      0.500         785 
+900      -63005.8058      0.500         871 
+1000     -62503.7469      0.500         984 
+1100     -62075.5268      0.500        1094 
+1200     -62069.1589      0.500        1094 
+1300     -62032.3206      0.500        1094 
+1400     -62020.3538      0.500        1094 
+1500     -62017.2148      0.500        1094 
+1600     -62012.6899      0.500        1094 
+Optimization precision reduced 
+   Optimizing parameters...    improved   12.137 lnL
+   Optimizing branchlengths... improved    4.032 lnL
+1700     -61983.3416      0.451        1094 
+1800     -61970.0107      0.451        1094 
+1900     -61956.5501      0.451        1094 
+2000     -61951.8397      0.451        1094 
+2100     -61948.0607      0.451        1094 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.096 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+2200     -61946.2281      0.402        1094 
+2300     -61945.4277      0.402        1094 
+2400     -61944.9809      0.402        1094 
+2500     -61944.4784      0.402        1094 
+2600     -61943.4366      0.402        1094 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.015 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+2700     -61942.9618      0.353        1094 
+2800     -61942.8073      0.353        1094 
+2900     -61942.4636      0.353        1094 
+3000     -61941.8507      0.353        1094 
+3100     -61941.7820      0.353        1094 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.003 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+3200     -61941.5451      0.304        1094 
+3300     -61941.3977      0.304        1094 
+3400     -61941.2943      0.304        1094 
+3500     -61941.2515      0.304        1094 
+3600     -61941.1456      0.304        1094 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.004 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+3700     -61941.0659      0.255        1094 
+3800     -61940.8330      0.255        1094 
+3900     -61940.5704      0.255        1094 
+4000     -61940.4515      0.255        1094 
+4100     -61940.1327      0.255        1094 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.006 lnL
+   Optimizing branchlengths... improved    0.264 lnL
+4200     -61939.7760      0.206        1094 
+4300     -61939.7143      0.206        1094 
+4400     -61939.6269      0.206        1094 
+4500     -61939.5873      0.206        1094 
+4600     -61939.4914      0.206        1094 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.002 lnL
+   Optimizing branchlengths... improved    0.174 lnL
+4700     -61939.2405      0.157        1094 
+4800     -61939.1400      0.157        1094 
+4900     -61939.1103      0.157        1094 
+5000     -61939.0333      0.157        1094 
+5100     -61939.0119      0.157        1094 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.003 lnL
+   Optimizing branchlengths... improved    0.278 lnL
+5200     -61938.7196      0.108        1094 
+5300     -61938.7190      0.108        1094 
+5400     -61938.6364      0.108        1094 
+5500     -61938.6269      0.108        1094 
+5600     -61938.5618      0.108        1094 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.002 lnL
+   Optimizing branchlengths... improved    0.170 lnL
+5700     -61938.3371      0.059        1094 
+5800     -61938.2973      0.059        1094 
+5900     -61938.2567      0.059        1094 
+6000     -61938.1962      0.059        1094 
+6100     -61938.1731      0.059        1094 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.001 lnL
+   Optimizing branchlengths... improved    0.638 lnL
+6200     -61937.5340      0.010        1094 
+6300     -61937.5291      0.010        1094 
+6400     -61937.5169      0.010        1094 
+6500     -61937.5161      0.010        1094 
+6600     -61937.5138      0.010        1094 
+6700     -61937.5132      0.010        1094 
+6800     -61937.5128      0.010        1094 
+6900     -61937.5112      0.010        1094 
+7000     -61937.5098      0.010        1094 
+7100     -61937.5098      0.010        1094 
+7200     -61937.5098      0.010        1094 
+7300     -61937.5098      0.010        1094 
+7400     -61937.5092      0.010        1094 
+7500     -61937.5092      0.010        1094 
+7600     -61937.5084      0.010        1094 
+7700     -61937.5084      0.010        1094 
+7800     -61937.5079      0.010        1094 
+7900     -61937.5079      0.010        1094 
+8000     -61937.5079      0.010        1094 
+8100     -61937.5079      0.010        1094 
+8200     -61937.5017      0.010        1094 
+8300     -61937.5002      0.010        1094 
+8400     -61937.4964      0.010        1094 
+8500     -61937.4902      0.010        1094 
+8600     -61937.4899      0.010        1094 
+8700     -61937.4872      0.010        1094 
+8800     -61937.4872      0.010        1094 
+8900     -61937.4872      0.010        1094 
+9000     -61937.4867      0.010        1094 
+9100     -61937.4867      0.010        1094 
+9200     -61937.4851      0.010        1094 
+9300     -61937.4822      0.010        1094 
+9400     -61937.4821      0.010        1094 
+9500     -61937.4821      0.010        1094 
+9600     -61937.4756      0.010        1094 
+9700     -61937.4722      0.010        1094 
+9800     -61937.4722      0.010        1094 
+9900     -61937.4711      0.010        1094 
+10000    -61937.4711      0.010        1094 
+10100    -61937.4707      0.010        1094 
+10200    -61937.4676      0.010        1094 
+10300    -61937.4660      0.010        1094 
+10400    -61937.4625      0.010        1094 
+10500    -61937.4582      0.010        1094 
+10600    -61937.4582      0.010        1094 
+10700    -61937.4555      0.010        1094 
+10800    -61937.4555      0.010        1094 
+10900    -61937.4555      0.010        1094 
+11000    -61937.4498      0.010        1094 
+11100    -61937.4428      0.010        1094 
+11200    -61937.4428      0.010        1094 
+11300    -61937.4412      0.010        1094 
+11400    -61937.4412      0.010        1094 
+11500    -61937.4412      0.010        1094 
+11600    -61937.4411      0.010        1094 
+11700    -61937.4411      0.010        1094 
+11800    -61937.4399      0.010        1094 
+11900    -61937.4352      0.010        1094 
+12000    -61937.4346      0.010        1094 
+12100    -61937.4332      0.010        1094 
+12200    -61937.4332      0.010        1094 
+12300    -61937.4332      0.010        1094 
+12400    -61937.4332      0.010        1094 
+12500    -61937.4332      0.010        1094 
+12600    -61937.4302      0.010        1094 
+12700    -61937.4294      0.010        1094 
+12800    -61937.4251      0.010        1094 
+12900    -61937.4251      0.010        1094 
+13000    -61937.4250      0.010        1094 
+13100    -61937.4230      0.010        1094 
+13200    -61937.4229      0.010        1094 
+13300    -61937.4229      0.010        1094 
+13400    -61937.4229      0.010        1094 
+13500    -61937.4226      0.010        1094 
+13600    -61937.4222      0.010        1094 
+13700    -61937.4205      0.010        1094 
+13800    -61937.4205      0.010        1094 
+13900    -61937.4167      0.010        1094 
+14000    -61937.4167      0.010        1094 
+14100    -61937.4167      0.010        1094 
+14200    -61937.4167      0.010        1094 
+14300    -61937.4165      0.010        1094 
+14400    -61937.4164      0.010        1094 
+14500    -61937.4161      0.010        1094 
+14600    -61937.4128      0.010        1094 
+14700    -61937.4128      0.010        1094 
+14800    -61937.4128      0.010        1094 
+14900    -61937.4128      0.010        1094 
+15000    -61937.4128      0.010        1094 
+   Optimizing parameters...    improved    0.001 lnL
+   Optimizing branchlengths... improved    0.024 lnL
+15100    -61937.3883      0.010        1094 
+15200    -61937.3883      0.010        1094 
+15300    -61937.3883      0.010        1094 
+15400    -61937.3883      0.010        1094 
+15500    -61937.3867      0.010        1094 
+15600    -61937.3854      0.010        1094 
+15700    -61937.3854      0.010        1094 
+15800    -61937.3854      0.010        1094 
+15900    -61937.3784      0.010        1094 
+16000    -61937.3782      0.010        1094 
+16100    -61937.3782      0.010        1094 
+16200    -61937.3782      0.010        1094 
+16300    -61937.3782      0.010        1094 
+16400    -61937.3782      0.010        1094 
+Reached termination condition!
+last topological improvement at gen 1094
+Improvement over last 500 gen = 0.00018
+Current score = -61937.3782
+Performing final optimizations...
+pass 1 : -61937.3696   (branch= 0.0082  alpha= 0.0000  pinv= 0.0001  eq freqs= 0.0001  rel rates= 0.0002  subset rates= 0.0000)
+pass 2 : -61937.3177   (branch= 0.0518  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 3 : -61937.2981   (branch= 0.0195  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0001  rel rates= 0.0000  subset rates= 0.0000)
+pass 4 : -61937.2874   (branch= 0.0106  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 5 : -61937.2795   (branch= 0.0079  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 6 : -61937.2754   (branch= 0.0041  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 7 : -61937.2729   (branch= 0.0025  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 8 : -61937.2715   (branch= 0.0007  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0007)
+pass 9 : -61937.2712   (branch= 0.0003  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 10: -61937.2709   (branch= 0.0003  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 11: -61937.2706   (branch= 0.0003  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 12: -61937.2705   (branch= 0.0001  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 13: -61937.2703   (branch= 0.0001  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 14: -61937.2703   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 15: -61937.2702   (branch= 0.0001  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 16: -61937.2702   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 17: -61937.2702   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+pass 18: -61937.2702   (branch= 0.0000  alpha= 0.0000  pinv= 0.0000  eq freqs= 0.0000  rel rates= 0.0000  subset rates= 0.0000)
+Looking for minimum length branches...
+Final score = -61937.2702
+Time used = 0 hours, 26 minutes and 44 seconds
+
+MODEL REPORT - Parameter values are FINAL
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 2.028, AG = 7.726, AT = 2.080, CG = 0.817, CT = 13.866, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3361 0.2200 0.1423 0.3016 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.7748
+    with an invariant (invariable) site category, proportion estimated
+      0.4335
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0000	0.4335
+      0.0902	0.1416
+      0.3968	0.1416
+      0.9497	0.1416
+      2.5633	0.1416
+
+Model 2
+  Number of states = 2 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.50, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Subset rate multipliers:
+    1.75  0.12
+NOTE: Collapsing of minimum length branches was requested (collapsebranches = 1)
+    No branches were short enough to be collapsed.
+
+>>>Completed Search rep 2 (of 2)<<<
+
+#######################################################
+
+Completed 2 replicate search(es) (of 2).
+
+NOTE: Unless the following output indicates that search replicates found the
+	same topology, you should assume that they found different topologies.
+Results:
+Replicate 1 : -61937.2705       
+Replicate 2 : -61937.2702 (best) (same topology as 1)
+
+Parameter estimates across search replicates:
+
+Partition model subset 1:
+         r(AC)  r(AG)  r(AT)  r(CG)  r(CT)  r(GT) pi(A) pi(C) pi(G) pi(T) alpha  pinv
+rep 1:   2.029   7.73  2.082 0.8178  13.87      1 0.336 0.220 0.142 0.302 0.775 0.433
+rep 2:   2.028  7.726   2.08 0.8171  13.87      1 0.336 0.220 0.142 0.302 0.775 0.433
+
+Partition model subset 2:
+	 Model contains no estimated parameters
+
+Treelengths and subset rate multipliers:
+          TL   R(1)  R(2)
+rep 1:  6.388 1.748 0.118
+rep 2:  6.390 1.748 0.118
+
+Saving final trees from all search reps to mixedDnaMkv.best.all.tre
+
+Saving final tree from best search rep (#2) to mixedDnaMkv.best.tre
+#######################################################
diff --git a/example/partition/exampleRuns/mkv/Lewis2001.nex b/example/partition/exampleRuns/mkv/Lewis2001.nex
new file mode 100644
index 0000000..9e58f76
--- /dev/null
+++ b/example/partition/exampleRuns/mkv/Lewis2001.nex
@@ -0,0 +1,239 @@
+
+#NEXUS
+
+[
+Title: INCONGRUENCE BETWEEN MORPHOLOGICAL DATA SETS: AN EXAMPLE FROM THE
+EVOLUTION OF ENDOPARASITISM AMONG PARASITIC WASPS (HYMENOPTERA: BRACONIDAE)
+
+Authors: DONALD L. J. QUICKE AND ROBERT BELSHAW
+
+Journal: SYSTEMATIC BIOLOGY 48(3): 436-454
+
+Contents: THREE NEXUS FILES, IDENTICAL EXCEPT FOR DIFFERENT ALIGNMENTS OF
+ONE GENE 
+
+This represents:
+File 1: data file with 28S D2 2:1 gap to substitution cost alignment
+except all of the sequence data has been removed
+]
+
+BEGIN CHARACTERS;
+DIMENSIONS NEWTAXA NTAX=30 NCHAR=118;
+FORMAT labels MISSING=? SYMBOLS= "0 1 2 3 4 5";
+OPTIONS  MSTAXA=POLYMORPH [gap=newstate];
+[DJZ - removing eliminate command, adding assumptions block
+eliminate 1-45 74-82 85 86 105 108-112 114 116-.; [leaves female+larval character set]
+]
+CHARLABELS
+	[1]	antennsensilla	[2]	antBarlin	[3]	'm/f_ant='
+	[4]	Maxillary_palp	[5]	labial_palp
+	[6]	cyclostome	[7]	laciniaround	[8]
+	laciniashort	[9]	hypoclypset	[10]	occipital_carina
+	[11]	Prontal_dorsum	[12]	prepectal_carina	[13]
+	Notauli	[14]	scut_sulc	[15]	scutellum
+	[16]	propodeum	[17]	Central_areola	[18]
+	antenna_cleaner	[19]	tib	[20]	FWR
+	[21]	'2m-cu'	[22]	'1-SR+M'	[23]	R_to_margin
+	[24]	'FW1-SR'	[25]	'r-m'
+	[26]	'FW2-SR'	[27]	MCU	[28]	'FW_m-cu'
+	[29]	'FW2-M'	[30]	FWa
+	[31]	3CU1	[32]	'HW2-CU'	[33]	'HW_cu-a'
+	[34]	HW_submarginal	[35]	'HWm-cu'
+	[36]	secondary_hamuli	[37]	petiole	[38]	numspir
+	[39]	T2_spir	[40]	'T2-T3articulation'
+	[41]	'MT4-7_apodemes'	[42]	MT8sculpt	[43]	MS8
+	[44]	rectal_pads	[45] chromosomes
+	[46]	prongs	[47]	ovip_sheath	[48]	GAoverlap
+	[49]	ovip_dor_valve	[50]	ovip_shape
+	[51]	ovip_ridge	[52]	Ovip	[53]	sperone	[54]
+	DVsculp	[55]	rachies
+	[56]	egg_canal	[57]	ctenidia	[58]	ctenidia
+	[59]	valvillus	[60]	valvillus
+	[61]	valpos	[62]	lower_valve	[63]	lv_seal	[64]
+	no_serrations	[65]	spermatheca
+	[66]	venom_app	[67]	res_sculp	[68]	VGA
+	[69]	Res_Div	[70]	VGins
+	[71]	ven_gland	[72]	no_ins	[73]	ovarioles
+	[74]	cercifused	[75]	cerci_setae
+	[76]	articulated_cusp	[77]	basal_ring	[78]
+	aedeagus	[79]	vas_def	[80]	Testes
+	[81]	sperm	[82]	sperm_morphol	[83]	egg	[84]
+	synovigeny	[85]	yolky
+	[86]	teratocytes	[87]	teratocyte_origin	[88]
+	lar_processes	[89]	L1_mandib_shape	[90]	L1_A_spines
+	[91]	L1_T3_spines.2	[92]	l1spinsfused	[93]
+	l1spinesgroups	[94]	L1_sensilla	[95]	L1_labral_sensilla
+	[96]	lar_antenna	[97]	Larval_mandible	[98]	larmandib
+	[99]	Larv_spir	[100]	'l-spirac'
+	[101]	hypostspur	[102]	stipital	[103]	larEpist
+[104]	ringsclerite [105]	anal_vesicle
+	[106]	postvencomm	[107]	instars	[108]	Ovip_into_gang
+	[109]	idiobiont	[110]	ectopar
+	[111]	final_external_feeding	[112]	mummif	[113]	mum
+	[114]	pupate	[115]	emergence_hole
+	[116]	paralysis	[117]	host_feeding	[118]	hostaphid
+	;
+STATELABELS
+	1  scattered one_rank 2_ranks,
+	2  small_hole medium_hole entire,
+	3  unequal equal,
+	4  six five four three,
+	5  four three two one,
+	6  no yes,
+	7  one three,
+	8  one three,
+	9  no yes,
+	10  complete abs_dors completely_abs,
+	11  simple_or_two_lateral_pits dorsope_and_2_lt_pits,
+	12  present absent,
+	13  present absent,
+	14  crenulate_or_with_1_carina smooth,
+	15  with_posterior_cren_groove without_posterior_crenulated_gr,
+	16  areola_complete areola_incomplete,
+	17  large small,
+	19  pegs_absent present,
+	20  contig_with_parastigma lost,
+	21  pres absent,
+	22  present_complete present_but_incomplete totally_absent,
+	23  yes no,
+	24  present lost,
+	25  present absent,
+	26  present absent,
+	27  fully_sclerotized largely_absent,
+	28  present absent,
+	29  part_present absent,
+	30  present absent,
+	31  present absent,
+	32  present absent,
+	33  present absent,
+	34  present absent,
+	35  present absent,
+	36  on_spur_beyond_r on_spur_overlapping on_C+SC+R,
+	37  unfused fused,
+	38  seven six five,
+	39  in_notum in_laterotergite,
+	40  fixed flexible,
+	41  _ _ _ _ _ _ small 'long,_thin_processes',
+	42  smooth microsculpture,
+	43  pointed_anteriorly square_anteriorly,
+	44  six four two,
+	45  four five six seven eight more_than_8,
+	46  absent present,
+	47  pointed truncate,
+	48  not trans,
+	49  lumen_divided lumen_entire,
+	50  straightish strongly_curved,
+	51  dorsal_ridge_absent present,
+	52  simple nodus notch double_nodus,
+	53  absent present,
+	54  present_ctenid pres_setae abs,
+	55  not to_end,
+	56  closed_by_LVs closed_by_DV,
+	57  otherwise 'with_scale-like_combsctenidiact',
+	58  without_sock_seta with_sock_seta,
+	59  many two one none,
+	60  no_fringe fringe,
+	61  apical medial basal,
+	62  flaps_absent flaps_normal flaps_large,
+	63  fades_out scaly_and_detached,
+	64  <3 '=3' >3,
+	65  white black,
+	66  muscular not_so,
+	67  spiral not_spiral,
+	68  otherwise with_long_prim_duct_and_anterio,
+	69  undivided divided,
+	70  in_spiral_part not_in_spiral_part,
+	71  anterior medial posterior,
+	72  one two many,
+	73  one two 'three-seven' eight_or_more,
+	74  cerci_separate cerci_fused_fo_TIX,
+	75  _many five four three,
+	76  present fused,
+	77  wide_laterally unifomly_narrow produced_medially,
+	78  normal reduced,
+	79  posterior anterior,
+	80  fused_above_gut separate_or_fised_below,
+	81  long medium short,
+	82  normal abnormal_morphology,
+	83  ovoid 'lemon-shaped' with_long_process,
+	84  synovigenic proovigenic,
+	85  anhydropic hydropic,
+	87  from_polar_bodies from_delamination_of_serosa,
+	88  absent pair_below_tail,
+	89  sickle_and_narrow broad_base_with_hook_blade,
+	90  absent single_row multiple_rows,
+	91  present absent,
+	92  not_fused fused_and_branching,
+	93  not_grouped grouped,
+	94  without_group_of_3 with_group_of_3,
+	95  absent present,
+	96  papilliform disc absent,
+	97  toothed smooth,
+	98  cross_or_meet separate,
+	99  prothorax mesothorax,
+	100  divided undivided,
+	101  present absent,
+	102  simple paddle baloon,
+	103  present absent_or_v_reduced,
+	104  absent present,
+	105  absent present,
+	106  present absent,
+	107  five four three,
+	108  not yes,
+	109  idiobiont koinobiont,
+	110  ecto endo,
+	111  present absent,
+	112  no_mummy mummy,
+	113  pale always_black,
+	114  internal external,
+	115  A B,
+	116  permanent temporary none,
+	117  present absent,
+	118  not_aphid aphid,
+;
+                        [               11111111112   2   2  22222   2  23   3   3333333344444444445555555555666666666677777777778888888888   9  9999999999000000000  0111   1  1111 ]
+                        [ 123	4  5678901234567890   1   2  34567   8  90   1   2345678901234567890123456789012345678901234567890123456789   0  1234567890123456789  0123   4  5678 ]
+MATRIX                  [                                                                                                                                                            ]
+Aphidius_rhopalosiphi     120   2  1000001011101001   1   2  10011   0  01   1   1111210101012301?10121001103??0011000002101311011101111000   0  10101211?1111000101  1110   1  1211
+Aphidius_ervi             120   2  1000001011101001   1   2  10011   0  01   1   1111210101012101?10121001103??0011000002101311011101111000   0  101012111111100?101  1110   1  1211
+Diaeretiella_rapae        120 (23) 2000001011101001   1   2  10111   1  01   1   1111210101012201?10121?01?03??00?1000002101311011??11?1000   0  101012111111100?1?1  1110   1  1211
+Lysiplebus_confusus       120 (23) 300000101111?001   1   2  10111   1  01   1   1111210101012200?10121001?03??101100000??01311011??1111000   0  101011111111100?1?1  1110   1  1211
+Pauesia_unilachni         120   2  1000001011100001   1   2  10011   0  01   1   1111210100012200010?21?01?03???0110000?2?01311011??01?1?00   0  10100211?111100?1?1  1110   1  1211
+Pauesia_juniperorum       120   2  1000000001100001   1   2  10011   0  01 (01)  1111210100012201010??1?01?03???0110000???01311011??11?1?00   0  10100211?111100?1?1  1110   1  1211
+Binodoxys_acalephae       120   2  2000000011100001   1   2  10111   1  11   ?   1111210100112410?1100??01?0????0?10000?2?0111?0????11?1?01   0  00000211?102100?1?1  1110   1  0211
+Trioxys_pallidus          120   2  2000000011100001   1   2  10111   1  11   ?   1111210100112410111001001?03???00100000?101111011??11?1001   0  000002111102100?101  1110   1  0211
+Monoctonus_pseudoplatani  120   2  1000001011100001   1   2  10011   0  11   ?   1111210100112300110021?01?020200110100?2?001110????11?1?11   0  00000211?102100?111  1110   1  0111
+Praon_volucre             120   2  100000000111?001   1   1  10110 (01) 01 (01)  1101200100012000010021001003??20101100???10200111100111111   0  0101021?1110110?1?1  1110   0  ?211
+Praon_abjectum            120   2  100000000111?001   1 (12) 10110 (01) 01 (01)  1101200100012000010?21001003??20101100???10200111100111111   0  0101021?1110110?1?1  1110   0  ?211
+[
+Praon_dorsale             120   2  100000000111?001   1   1  10110 (01) 01   0   1101200100012000010021001003??20101100???10200111100111111   0  0101021?1110110?1?1  1110   0  ?211
+]
+Pseudopraon_mindariphagum 120   2  2000000001100001   1   2  10110   0  11   0   1101200100?1??00010?2?????0????0??1100????02001?????????1?   ?  ???????1????1?0???1  1110 (01) 0211
+Dyscritulus_planiceps     120   2  1000000001100001   1   2  10110   0  01   0   110120010001200001002???1?0???20?01000?00102001????01???11   0  010102111110110?1?1  1110   0  ?211
+Ephedrus_plagiator        121   2  2000001001100001   1   0  00000   0  01   0   1101200100012301010021001003??2020010002010111011?00111111   0  000102111110100?101  1111   1  0211
+Ephedrus_californicus     121   2  2000001001100001   1   0  00000   0  01   0   1101200100012301010021001003??20200100020101110111?0111111   0  000102101110100?101  1111   1  0211
+[
+Ephedrus_validus          121   2  2000001001100001   1   0  00000   0  01   0   1101200100012301010021001003??2020010002010111011??0111111   0  000102111110100?101  1111   1  0211
+Ephedrus_persicae         121   2  2000001001100001   1   0  00000   0  01 (01)  1101200100012301010021001003??2020010002010111011??0111111   0  000102101110100?101  1111   1  0211
+]
+Sathon_falcatus           211   1  101102011011?001   1   0  10100   0  00   0   1001001110001500011001201101121121110012010011011210111?00   2  1????20010001010101  100?   0  ?210
+Chelonus_sp.              010   1  001100000011?100   1   1  01000   0  00   0   1001102010001200010021201101111?11110012010011011210111100 (01) 0000?10010101010101  100?   0  ?210
+Cenocoelius_analis        010   0  0011000000101000   1   0  00000   0  00   0   1001100110011?000100212010001?11211100110300110112121???0?   ?  ?????100?01010????1  100?   0  ?2?0
+Eubazus_semirugosus       010   0  0011000000000000   1   0  01100   0  00   0   1001000110011?000100212010001?1101110012030011011210111?00   0  000??1001010101?101  100?   0  ?210
+Acampsis_alternipes       010   0  0011000000001100   1   0  00000   0  00   0   0001000110011?000100011010021011?111001?030011011??0110?00   2  100001001010101??11  100?   0  ?210
+Alysia_lucicola           100   0  0000020000100100   1   0  00000   0  01   0   10002001100115000000200?0012001010000102010012001000110?01 (12) 000??11100001000101  110?   1  ?110
+Aleiodes_coxalis          100   0  010000000011?001   1   0  00000   0  01   0   10010000100115000000000?0012101021000002010012000000000?01   2  1????1100000000?001  1111   1  ?110
+Heterospilus_prosopidis   100   0  0100100000100011   1   1  00000   0  01   0   1000200010001?00000030010012001020000112110012000000000?01   1  000??00000000001000  000?   0  ?000
+Hecabolus_sp.             100   0  010010000011?011   1   0  00000   0  01   0   1000200010001?00000030010012001020000112110012000000000?01   1  000??00000001001000  000?   0  ?0?0
+Bracon_sp.                100   1  010012010011?101   1   0  00000   0  01   0   1001200010011500000010010012001020000012210012000000000?01   2  1????00000000001000  000?   0  ?000
+Colastes_incertus         100   0  010000010011?001   1   0  00000   0  01   0   1000200010001?000000100100120010?000010?010012000000000?01   1  000??00000000001000  000?   0  ?000
+Rhyssalus_sp.             100   0  0100100000101000   1   0  00000   0  00   0   100020011000??000000100100110010?01110020100?100?000000?0?   ?  ?????0000000000??00  000?   0  ?000
+Histeromerus_mystacinus   110   0  010011011011?000 (01)  0  00000   0  00   0   1000100110002?00000000?1001101100011100201000000???0000?0?   ?  ?????0000000000??00  000?   0  ?010
+Xorides_praecatorius      010   1  0001000000000000   0   2  0???0   0  01   0   0001010000000?00000011000001001020000000020000010000000?0?   ?  ?????000?000000??00  000?   0  ?0?0
+Alomyia_debellator        010   1  000100001011?000   0   2  0???0   0  01   0   0001010000000?000100100000011010201100000?0000000000??0?0?   ?  ?????111001000????1  111?   1  ?2?0
+;
+END;
+
+begin assumptions;
+exset * larfem = 1-45 74-82 85 86 105 108-112 114 116-.;
+end;
diff --git a/example/partition/exampleRuns/mkv/garli.conf b/example/partition/exampleRuns/mkv/garli.conf
new file mode 100644
index 0000000..82cc747
--- /dev/null
+++ b/example/partition/exampleRuns/mkv/garli.conf
@@ -0,0 +1,67 @@
+[general]
+datafname = lewis2001.nex
+constraintfile = none
+streefname = random
+attachmentspertaxon = 100
+ofprefix = mkv
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 10000
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+outputsitelikelihoods = 0
+optimizeinputonly = 0
+collapsebranches = 1
+
+searchreps = 5
+bootstrapreps = 0
+linkmodels = 0
+subsetspecificrates = 0
+
+[model1]
+datatype = standardvariable
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
diff --git a/example/partition/exampleRuns/mkv/mkv.best.all.tre b/example/partition/exampleRuns/mkv/mkv.best.all.tre
new file mode 100644
index 0000000..d4143cf
--- /dev/null
+++ b/example/partition/exampleRuns/mkv/mkv.best.all.tre
@@ -0,0 +1,40 @@
+#NEXUS
+
+begin trees;
+translate
+  1  Aphidius_rhopalosiphi,
+  2  Aphidius_ervi,
+  3  Diaeretiella_rapae,
+  4  Lysiplebus_confusus,
+  5  Pauesia_unilachni,
+  6  Pauesia_juniperorum,
+  7  Binodoxys_acalephae,
+  8  Trioxys_pallidus,
+  9  Monoctonus_pseudoplatani,
+  10  Praon_volucre,
+  11  Praon_abjectum,
+  12  Pseudopraon_mindariphagum,
+  13  Dyscritulus_planiceps,
+  14  Ephedrus_plagiator,
+  15  Ephedrus_californicus,
+  16  Sathon_falcatus,
+  17  Chelonus_sp.,
+  18  Cenocoelius_analis,
+  19  Eubazus_semirugosus,
+  20  Acampsis_alternipes,
+  21  Alysia_lucicola,
+  22  Aleiodes_coxalis,
+  23  Heterospilus_prosopidis,
+  24  Hecabolus_sp.,
+  25  Bracon_sp.,
+  26  Colastes_incertus,
+  27  Rhyssalus_sp.,
+  28  Histeromerus_mystacinus,
+  29  Xorides_praecatorius,
+  30  Alomyia_debellator;
+tree rep1 = [&U][!GarliScore -472.39083][!GarliModel  M1 e  0.50000  0.50000   M2 e  0.33333  0.33333  0.33333   M3 e  0.25000  0.25000  0.25000  0.25000  ](24:0.02076503,23:0.00000001,(((((20:0.13910242,19:0.00000001,18:0.08202657):0.08612723,(16:0.20549705,17:0.00000001):0.02277555):0.35723526,((((((1:0.00000001,4:0.06853868,2:0.00000001,3:0.00000001):0.02387432,6:0.00000001):0.02003674,5:0.02834557):0.22046080,(7:0.00000001,8:0.00000001):0.11235003):0.03972373,9:0.03258248):0.29754135 [...]
+tree rep2 = [&U][!GarliScore -472.39058759][!GarliModel  M1 e  0.50000  0.50000   M2 e  0.33333  0.33333  0.33333   M3 e  0.25000  0.25000  0.25000  0.25000  ]((((9:0.03255822,((12:0.00000001,13:0.03086586,11:0.00000001,10:0.00000001):0.08991187,(((16:0.20511647,17:0.00000001):0.02288206,(20:0.13832030,(18:0.08210741,19:0.00000001):0.00109863):0.08546662):0.35740524,(((22:0.12959239,((28:0.06287536,27:0.00000001):0.09633755,(30:0.27628400,29:0.00944828):0.13464285):0.02629110,25:0.047770 [...]
+tree rep3BEST = [&U][!GarliScore -472.39057697][!GarliModel  M1 e  0.50000  0.50000   M2 e  0.33333  0.33333  0.33333   M3 e  0.25000  0.25000  0.25000  0.25000  ]((((7:0.00000001,8:0.00000001):0.11236048,(((12:0.00000001,10:0.00000001,11:0.00000001,13:0.03088157):0.08988849,(((20:0.13825439,(18:0.08204068,19:0.00000001):0.00123999):0.08527720,(16:0.20500271,17:0.00000001):0.02298487):0.35721979,(((((30:0.27621511,29:0.00946667):0.13454604,(28:0.06286195,27:0.00000001):0.09631244):0.0263 [...]
+tree rep4 = [&U][!GarliScore -473.59637940][!GarliModel  M1 e  0.50000  0.50000   M2 e  0.33333  0.33333  0.33333   M3 e  0.25000  0.25000  0.25000  0.25000  ](7:0.00000001,((5:0.02859651,(6:0.00000001,(2:0.00000001,4:0.06878983,3:0.00000001,1:0.00000001):0.02397891):0.01997552):0.22267001,(9:0.03307470,(((((17:0.02941573,16:0.16447154):0.02704881,(19:0.02950486,18:0.05584294,(20:0.00000001,(22:0.00000001,(25:0.04803852,(21:0.23899086,26:0.00000001,(24:0.02083388,23:0.00000001):0.0660243 [...]
+tree rep5 = [&U][!GarliScore -474.58596822][!GarliModel  M1 e  0.50000  0.50000   M2 e  0.33333  0.33333  0.33333   M3 e  0.25000  0.25000  0.25000  0.25000  ](((((6:0.00000001,(2:0.00000001,4:0.06842016,3:0.00000001,1:0.00000001):0.02382922):0.01998616,5:0.02840229):0.22120056,(7:0.00000001,8:0.00000001):0.11160898):0.03835873,9:0.03333404):0.33000315,(13:0.03028206,12:0.00000001,11:0.00000001,10:0.00000001):0.09023672,((15:0.00000001,(((19:0.03455914,20:0.11703538,18:0.05560975):0.0582 [...]
+end;
diff --git a/example/partition/exampleRuns/mkv/mkv.best.tre b/example/partition/exampleRuns/mkv/mkv.best.tre
new file mode 100644
index 0000000..80d1fc1
--- /dev/null
+++ b/example/partition/exampleRuns/mkv/mkv.best.tre
@@ -0,0 +1,36 @@
+#NEXUS
+
+begin trees;
+translate
+ 1 Aphidius_rhopalosiphi,
+ 2 Aphidius_ervi,
+ 3 Diaeretiella_rapae,
+ 4 Lysiplebus_confusus,
+ 5 Pauesia_unilachni,
+ 6 Pauesia_juniperorum,
+ 7 Binodoxys_acalephae,
+ 8 Trioxys_pallidus,
+ 9 Monoctonus_pseudoplatani,
+ 10 Praon_volucre,
+ 11 Praon_abjectum,
+ 12 Pseudopraon_mindariphagum,
+ 13 Dyscritulus_planiceps,
+ 14 Ephedrus_plagiator,
+ 15 Ephedrus_californicus,
+ 16 Sathon_falcatus,
+ 17 Chelonus_sp.,
+ 18 Cenocoelius_analis,
+ 19 Eubazus_semirugosus,
+ 20 Acampsis_alternipes,
+ 21 Alysia_lucicola,
+ 22 Aleiodes_coxalis,
+ 23 Heterospilus_prosopidis,
+ 24 Hecabolus_sp.,
+ 25 Bracon_sp.,
+ 26 Colastes_incertus,
+ 27 Rhyssalus_sp.,
+ 28 Histeromerus_mystacinus,
+ 29 Xorides_praecatorius,
+ 30 Alomyia_debellator;
+tree bestREP3 = [&U][!GarliScore -472.390577][!GarliModel  M1 e  0.50000  0.50000   M2 e  0.33333  0.33333  0.33333   M3 e  0.25000  0.25000  0.25000  0.25000  ]((((7:0.00000001,8:0.00000001):0.11236048,(((12:0.00000001,10:0.00000001,11:0.00000001,13:0.03088157):0.08988849,(((20:0.13825439,(18:0.08204068,19:0.00000001):0.00123999):0.08527720,(16:0.20500271,17:0.00000001):0.02298487):0.35721979,(((((30:0.27621511,29:0.00946667):0.13454604,(28:0.06286195,27:0.00000001):0.09631244):0.026300 [...]
+end;
diff --git a/example/partition/exampleRuns/mkv/mkv.log00.log b/example/partition/exampleRuns/mkv/mkv.log00.log
new file mode 100644
index 0000000..08c0a05
--- /dev/null
+++ b/example/partition/exampleRuns/mkv/mkv.log00.log
@@ -0,0 +1,8940 @@
+Search rep 1 (of 5)
+random seed = 113156
+gen	best_like	time	optPrecision
+0	-837.7144974	0	0.5
+10	-791.6582983	0	0.5
+20	-788.5939546	0	0.5
+30	-728.0455255	0	0.5
+40	-700.8589295	0	0.5
+50	-684.1875509	0	0.5
+60	-656.053475	0	0.5
+70	-646.6480566	0	0.5
+80	-617.5543937	0	0.5
+90	-593.6563126	0	0.5
+100	-592.1303299	0	0.5
+110	-580.9060046	0	0.5
+120	-580.7826629	0	0.5
+130	-580.7768646	0	0.5
+140	-580.1642304	0	0.5
+150	-580.0719047	0	0.5
+160	-568.3336942	0	0.5
+170	-568.2356884	0	0.5
+180	-565.584049	0	0.5
+190	-553.489975	0	0.5
+200	-550.9261357	0	0.5
+210	-546.6750075	0	0.5
+220	-543.805642	0	0.5
+230	-543.6681609	0	0.5
+240	-541.6612477	0	0.5
+250	-541.0826976	0	0.5
+260	-540.2029033	0	0.5
+270	-538.1727277	0	0.5
+280	-537.9648868	0	0.5
+290	-537.8103573	0	0.5
+300	-502.7223063	0	0.5
+310	-499.4549509	1	0.5
+320	-498.7955468	1	0.5
+330	-498.5456577	1	0.5
+340	-498.4386578	1	0.5
+350	-498.3220932	1	0.5
+360	-498.211985	1	0.5
+370	-497.4340217	1	0.5
+380	-496.2663349	1	0.5
+390	-496.2220897	1	0.5
+400	-496.2153387	1	0.5
+410	-485.8509913	1	0.5
+420	-483.867697	1	0.5
+430	-483.5487594	1	0.5
+440	-483.3767652	1	0.5
+450	-483.3212687	1	0.5
+460	-483.2930257	1	0.5
+470	-483.1821162	1	0.5
+480	-482.6826421	1	0.5
+490	-482.6225988	1	0.5
+500	-482.5724142	1	0.5
+510	-482.5038997	1	0.5
+520	-482.4021884	1	0.5
+530	-481.5523521	1	0.5
+540	-481.1860514	1	0.5
+550	-481.1164963	1	0.5
+560	-481.0453212	1	0.5
+570	-481.03956	1	0.5
+580	-480.543966	1	0.5
+590	-480.4624003	1	0.5
+600	-480.2204569	1	0.5
+610	-480.1418839	1	0.5
+620	-480.0352612	1	0.5
+630	-479.8552166	1	0.5
+640	-479.8136461	1	0.5
+650	-479.7600011	1	0.5
+660	-479.7432575	1	0.5
+670	-479.71597	1	0.5
+680	-479.6143496	1	0.5
+690	-479.5298891	1	0.5
+700	-479.5175821	1	0.5
+710	-479.3908236	1	0.5
+720	-479.3538857	1	0.5
+730	-479.3518035	1	0.5
+740	-479.1500315	1	0.5
+750	-479.1500315	1	0.5
+760	-479.1420152	1	0.5
+770	-479.0863859	1	0.5
+780	-479.0647858	1	0.5
+790	-479.0471871	1	0.5
+800	-479.0438303	1	0.5
+810	-479.0194435	2	0.5
+820	-478.9604586	2	0.5
+830	-478.9114993	2	0.5
+840	-478.8956001	2	0.5
+850	-478.7588453	2	0.5
+860	-478.7413206	2	0.5
+870	-478.7352527	2	0.5
+880	-478.7175979	2	0.5
+890	-478.6999553	2	0.5
+900	-478.6735155	2	0.5
+910	-478.6549961	2	0.5
+920	-478.6421259	2	0.5
+930	-478.6396956	2	0.5
+940	-478.6126241	2	0.5
+950	-478.5596244	2	0.5
+960	-478.5482065	2	0.5
+970	-478.5001446	2	0.5
+980	-478.3427258	2	0.5
+990	-478.3427246	2	0.5
+1000	-478.3271506	2	0.5
+1010	-478.3012042	2	0.5
+1020	-478.2427383	2	0.5
+1030	-478.2343125	2	0.5
+1040	-478.1727291	2	0.5
+1050	-478.1135566	2	0.5
+1060	-478.0925006	2	0.5
+1070	-478.051884	2	0.5
+1080	-477.9921349	2	0.5
+1090	-477.9221866	2	0.5
+1100	-477.8446607	2	0.5
+1110	-477.8016656	2	0.5
+1120	-477.7982012	2	0.5
+1130	-477.7564708	2	0.5
+1140	-477.7309658	2	0.5
+1150	-476.9066408	2	0.5
+1160	-476.6747283	2	0.5
+1170	-476.599305	2	0.5
+1180	-476.5966333	2	0.5
+1190	-476.5877518	2	0.5
+1200	-476.5509562	2	0.5
+1210	-476.442408	2	0.5
+1220	-476.4054952	2	0.5
+1230	-476.3757308	2	0.5
+1240	-476.3138875	2	0.5
+1250	-476.3015896	2	0.5
+1260	-476.2711478	2	0.5
+1270	-476.172468	2	0.5
+1280	-476.1423962	2	0.5
+1290	-476.0989647	2	0.5
+1300	-476.0617085	2	0.5
+1310	-476.0483133	2	0.5
+1320	-476.0452088	2	0.5
+1330	-476.0379163	3	0.5
+1340	-476.0313601	3	0.5
+1350	-475.9883792	3	0.5
+1360	-475.9417086	3	0.5
+1370	-475.9027716	3	0.5
+1380	-475.8630764	3	0.5
+1390	-475.8603859	3	0.5
+1400	-475.8285691	3	0.5
+1410	-475.8092286	3	0.5
+1420	-475.7716081	3	0.5
+1430	-475.7447593	3	0.5
+1440	-475.6647265	3	0.5
+1450	-475.6319333	3	0.5
+1460	-475.6284735	3	0.5
+1470	-475.6263159	3	0.5
+1480	-475.5927871	3	0.5
+1490	-475.5927816	3	0.5
+1500	-475.5767425	3	0.5
+1510	-475.5690082	3	0.5
+1520	-475.5571747	3	0.5
+1530	-475.5442818	3	0.5
+1540	-475.4884646	3	0.5
+1550	-475.4811278	3	0.5
+1560	-475.4777695	3	0.5
+1570	-475.4294735	3	0.5
+1580	-475.4289111	3	0.5
+1590	-475.4277059	3	0.5
+1600	-475.4252515	3	0.5
+1610	-475.40522	3	0.5
+1620	-475.3968628	3	0.5
+1630	-475.364993	3	0.5
+1640	-475.3555946	3	0.5
+1650	-475.3524741	3	0.5
+1660	-475.2922714	3	0.5
+1670	-475.286876	3	0.5
+1680	-475.2774021	3	0.5
+1690	-475.2773429	3	0.5
+1700	-475.2730209	3	0.5
+1710	-475.2395116	3	0.451
+1720	-475.2366846	3	0.451
+1730	-475.2349692	3	0.451
+1740	-475.233922	3	0.451
+1750	-475.233922	3	0.451
+1760	-475.2183185	3	0.451
+1770	-475.195703	3	0.451
+1780	-475.1946588	3	0.451
+1790	-475.1847258	3	0.451
+1800	-475.1728956	3	0.451
+1810	-475.1607003	3	0.451
+1820	-475.1557724	3	0.451
+1830	-475.1512744	3	0.451
+1840	-475.1468663	3	0.451
+1850	-475.1353005	3	0.451
+1860	-475.1353005	3	0.451
+1870	-475.1322794	4	0.451
+1880	-475.1232328	4	0.451
+1890	-475.1232328	4	0.451
+1900	-475.1232328	4	0.451
+1910	-475.1216659	4	0.451
+1920	-474.8792143	4	0.451
+1930	-474.8630266	4	0.451
+1940	-474.8597211	4	0.451
+1950	-474.8204012	4	0.451
+1960	-474.785191	4	0.451
+1970	-474.7653029	4	0.451
+1980	-474.7631713	4	0.451
+1990	-474.7475378	4	0.451
+2000	-474.7475378	4	0.451
+2010	-474.743556	4	0.451
+2020	-474.7400598	4	0.451
+2030	-474.7400598	4	0.451
+2040	-474.7257427	4	0.451
+2050	-474.7217883	4	0.451
+2060	-474.7210204	4	0.451
+2070	-474.7210204	4	0.451
+2080	-474.681139	4	0.451
+2090	-474.6612051	4	0.451
+2100	-474.6530302	4	0.451
+2110	-474.6468254	4	0.451
+2120	-474.6419788	4	0.451
+2130	-474.6323734	4	0.451
+2140	-474.6242666	4	0.451
+2150	-474.6033041	4	0.451
+2160	-474.5964619	4	0.451
+2170	-474.5904141	4	0.451
+2180	-474.5823404	4	0.451
+2190	-474.3573916	4	0.451
+2200	-474.3546676	4	0.451
+2210	-474.3546676	4	0.451
+2220	-474.3441222	4	0.451
+2230	-474.3436733	4	0.451
+2240	-474.3436733	4	0.451
+2250	-474.3263489	4	0.451
+2260	-474.3112162	4	0.451
+2270	-474.299819	4	0.451
+2280	-474.2941382	4	0.451
+2290	-474.2941382	4	0.451
+2300	-474.2896651	4	0.451
+2310	-474.2420968	4	0.451
+2320	-474.2135128	4	0.451
+2330	-474.2116735	4	0.451
+2340	-474.1997378	4	0.451
+2350	-474.198315	4	0.451
+2360	-474.198315	4	0.451
+2370	-474.1873436	4	0.451
+2380	-474.1772041	4	0.451
+2390	-474.1684647	4	0.451
+2400	-474.1635415	4	0.451
+2410	-474.1566699	4	0.451
+2420	-474.1507693	4	0.451
+2430	-474.1469411	5	0.451
+2440	-474.1375994	5	0.451
+2450	-474.1264512	5	0.451
+2460	-474.117712	5	0.451
+2470	-474.1137248	5	0.451
+2480	-474.1137248	5	0.451
+2490	-474.1137248	5	0.451
+2500	-474.1124278	5	0.451
+2510	-474.1119545	5	0.451
+2520	-474.1116006	5	0.451
+2530	-474.0998036	5	0.451
+2540	-474.0933687	5	0.451
+2550	-474.0803989	5	0.451
+2560	-474.0616715	5	0.451
+2570	-474.061257	5	0.451
+2580	-474.061257	5	0.451
+2590	-474.061257	5	0.451
+2600	-474.0612468	5	0.451
+2610	-474.0449906	5	0.451
+2620	-474.0449905	5	0.451
+2630	-474.0387199	5	0.451
+2640	-474.0386932	5	0.451
+2650	-474.0260942	5	0.451
+2660	-474.019531	5	0.451
+2670	-473.9992033	5	0.451
+2680	-473.9976605	5	0.451
+2690	-473.9963912	5	0.451
+2700	-473.9885216	5	0.451
+2710	-473.9824657	5	0.402
+2720	-473.9824015	5	0.402
+2730	-473.9794886	5	0.402
+2740	-473.9794591	5	0.402
+2750	-473.9330617	5	0.402
+2760	-473.9270926	5	0.402
+2770	-473.9142347	5	0.402
+2780	-473.9134024	5	0.402
+2790	-473.9090782	5	0.402
+2800	-473.905825	5	0.402
+2810	-473.9013489	5	0.402
+2820	-473.8978199	5	0.402
+2830	-473.8975022	5	0.402
+2840	-473.8835721	5	0.402
+2850	-473.776003	5	0.402
+2860	-473.775097	5	0.402
+2870	-473.7671921	5	0.402
+2880	-473.7669994	5	0.402
+2890	-473.7529871	5	0.402
+2900	-473.7521228	5	0.402
+2910	-473.7486864	5	0.402
+2920	-473.7461921	5	0.402
+2930	-473.7393441	5	0.402
+2940	-473.7393441	5	0.402
+2950	-473.7391747	5	0.402
+2960	-473.7384895	5	0.402
+2970	-473.7384895	5	0.402
+2980	-473.7381197	6	0.402
+2990	-473.7297788	6	0.402
+3000	-473.7250304	6	0.402
+3010	-473.7236623	6	0.402
+3020	-473.7224339	6	0.402
+3030	-473.720645	6	0.402
+3040	-473.7142282	6	0.402
+3050	-473.708597	6	0.402
+3060	-473.7046884	6	0.402
+3070	-473.7029608	6	0.402
+3080	-473.7029608	6	0.402
+3090	-473.6964829	6	0.402
+3100	-473.6862705	6	0.402
+3110	-473.6862705	6	0.402
+3120	-473.6857531	6	0.402
+3130	-473.6801792	6	0.402
+3140	-473.6796872	6	0.402
+3150	-473.6794086	6	0.402
+3160	-473.6791781	6	0.402
+3170	-473.6773675	6	0.402
+3180	-473.6773539	6	0.402
+3190	-473.6769942	6	0.402
+3200	-473.6766386	6	0.402
+3210	-473.6680767	6	0.402
+3220	-473.6674089	6	0.402
+3230	-473.6669532	6	0.402
+3240	-473.6628159	6	0.402
+3250	-473.6628159	6	0.402
+3260	-473.6628159	6	0.402
+3270	-473.6618943	6	0.402
+3280	-473.6600159	6	0.402
+3290	-473.6600159	6	0.402
+3300	-473.652229	6	0.402
+3310	-473.6512296	6	0.402
+3320	-473.6512296	6	0.402
+3330	-473.6506685	6	0.402
+3340	-473.6501272	6	0.402
+3350	-473.6472752	6	0.402
+3360	-473.6472752	6	0.402
+3370	-473.6472752	6	0.402
+3380	-473.6464185	6	0.402
+3390	-473.6456417	6	0.402
+3400	-473.6454694	6	0.402
+3410	-473.6392611	6	0.353
+3420	-473.6391185	6	0.353
+3430	-473.6389399	6	0.353
+3440	-473.6375622	6	0.353
+3450	-473.6364011	6	0.353
+3460	-473.6345765	6	0.353
+3470	-473.6338149	6	0.353
+3480	-473.6335233	6	0.353
+3490	-473.6273673	6	0.353
+3500	-473.6273673	6	0.353
+3510	-473.6273673	6	0.353
+3520	-473.6203584	6	0.353
+3530	-473.6202509	7	0.353
+3540	-473.6185179	7	0.353
+3550	-473.6182648	7	0.353
+3560	-473.6167749	7	0.353
+3570	-473.6145065	7	0.353
+3580	-473.5233332	7	0.353
+3590	-473.521574	7	0.353
+3600	-473.506141	7	0.353
+3610	-473.5051039	7	0.353
+3620	-473.5051039	7	0.353
+3630	-473.5050244	7	0.353
+3640	-473.5050244	7	0.353
+3650	-473.5050244	7	0.353
+3660	-473.500795	7	0.353
+3670	-473.4974187	7	0.353
+3680	-473.496405	7	0.353
+3690	-473.4920399	7	0.353
+3700	-473.4861972	7	0.353
+3710	-473.4861734	7	0.353
+3720	-473.485257	7	0.353
+3730	-473.4834987	7	0.353
+3740	-473.4826183	7	0.353
+3750	-473.4807402	7	0.353
+3760	-473.4807402	7	0.353
+3770	-473.4807402	7	0.353
+3780	-473.4807402	7	0.353
+3790	-473.4806509	7	0.353
+3800	-473.4790643	7	0.353
+3810	-473.4779548	7	0.353
+3820	-473.4779548	7	0.353
+3830	-473.4779548	7	0.353
+3840	-473.4779548	7	0.353
+3850	-473.4774501	7	0.353
+3860	-473.4773864	7	0.353
+3870	-473.4740363	7	0.353
+3880	-473.4656028	7	0.353
+3890	-473.4631573	7	0.353
+3900	-473.4631573	7	0.353
+3910	-473.4555453	7	0.353
+3920	-473.4532543	7	0.353
+3930	-473.4504836	7	0.353
+3940	-473.4490788	7	0.353
+3950	-473.4490788	7	0.353
+3960	-473.4485387	7	0.353
+3970	-473.4471265	7	0.353
+3980	-473.4453733	7	0.353
+3990	-473.4430621	7	0.353
+4000	-473.4430621	7	0.353
+4010	-473.4430621	7	0.353
+4020	-473.4430617	7	0.353
+4030	-473.4348569	7	0.353
+4040	-473.434102	7	0.353
+4050	-473.434102	7	0.353
+4060	-473.434102	7	0.353
+4070	-473.434102	7	0.353
+4080	-473.4330785	7	0.353
+4090	-473.4327912	7	0.353
+4100	-473.4327912	8	0.353
+4110	-473.4306863	8	0.304
+4120	-473.4306136	8	0.304
+4130	-473.4245143	8	0.304
+4140	-473.4219554	8	0.304
+4150	-473.4218908	8	0.304
+4160	-473.4218908	8	0.304
+4170	-473.4218908	8	0.304
+4180	-473.4218602	8	0.304
+4190	-473.4218602	8	0.304
+4200	-473.4217416	8	0.304
+4210	-473.4205928	8	0.304
+4220	-473.4103609	8	0.304
+4230	-473.4103609	8	0.304
+4240	-473.4102714	8	0.304
+4250	-473.4102714	8	0.304
+4260	-473.4101586	8	0.304
+4270	-473.4097474	8	0.304
+4280	-473.4094398	8	0.304
+4290	-473.4091794	8	0.304
+4300	-473.4091495	8	0.304
+4310	-473.4064871	8	0.304
+4320	-473.4014045	8	0.304
+4330	-473.4009577	8	0.304
+4340	-473.4009577	8	0.304
+4350	-473.3998432	8	0.304
+4360	-473.3998432	8	0.304
+4370	-473.3998432	8	0.304
+4380	-473.396648	8	0.304
+4390	-473.3964466	8	0.304
+4400	-473.3964466	8	0.304
+4410	-473.3942988	8	0.304
+4420	-473.3942985	8	0.304
+4430	-473.3937061	8	0.304
+4440	-473.3937061	8	0.304
+4450	-473.3935455	8	0.304
+4460	-473.3931862	8	0.304
+4470	-473.3921372	8	0.304
+4480	-473.3907847	8	0.304
+4490	-473.3901147	8	0.304
+4500	-473.3895514	8	0.304
+4510	-473.3889685	8	0.304
+4520	-473.3889584	8	0.304
+4530	-473.3887599	8	0.304
+4540	-473.3839565	8	0.304
+4550	-473.3831459	8	0.304
+4560	-473.3817255	8	0.304
+4570	-473.3817198	8	0.304
+4580	-473.3817198	8	0.304
+4590	-473.3705509	8	0.304
+4600	-473.3703657	8	0.304
+4610	-473.3702912	8	0.304
+4620	-473.3702912	8	0.304
+4630	-473.3702912	8	0.304
+4640	-473.3696329	9	0.304
+4650	-473.3695665	9	0.304
+4660	-473.369544	9	0.304
+4670	-473.369544	9	0.304
+4680	-473.3695024	9	0.304
+4690	-473.3686334	9	0.304
+4700	-473.3686334	9	0.304
+4710	-473.3686187	9	0.304
+4720	-473.3667151	9	0.304
+4730	-473.3632035	9	0.304
+4740	-473.3632035	9	0.304
+4750	-473.3631529	9	0.304
+4760	-473.362543	9	0.304
+4770	-473.362543	9	0.304
+4780	-473.3625245	9	0.304
+4790	-473.3595101	9	0.304
+4800	-473.3595101	9	0.304
+4810	-473.3595101	9	0.304
+4820	-473.359164	9	0.304
+4830	-473.3589716	9	0.304
+4840	-473.3589716	9	0.304
+4850	-473.3589716	9	0.304
+4860	-473.3589716	9	0.304
+4870	-473.3585892	9	0.304
+4880	-473.3553383	9	0.304
+4890	-473.354398	9	0.304
+4900	-473.354398	9	0.304
+4910	-473.3543958	9	0.304
+4920	-473.3543731	9	0.304
+4930	-473.3523169	9	0.304
+4940	-473.3523169	9	0.304
+4950	-473.3523169	9	0.304
+4960	-473.3520899	9	0.304
+4970	-473.3509796	9	0.304
+4980	-473.3465646	9	0.304
+4990	-473.3465646	9	0.304
+5000	-473.3465633	9	0.304
+5010	-473.3465633	9	0.304
+5020	-473.3465633	9	0.304
+5030	-473.3462127	9	0.304
+5040	-473.3443613	9	0.304
+5050	-473.3441289	9	0.304
+5060	-473.3436166	9	0.304
+5070	-473.3436166	9	0.304
+5080	-473.3428127	9	0.304
+5090	-473.3396888	9	0.304
+5100	-473.3396888	9	0.304
+5110	-473.339001	9	0.255
+5120	-473.3353342	9	0.255
+5130	-473.3353281	9	0.255
+5140	-473.3353281	9	0.255
+5150	-473.3350405	9	0.255
+5160	-473.3350405	9	0.255
+5170	-473.3350405	9	0.255
+5180	-473.3350405	10	0.255
+5190	-473.3342101	10	0.255
+5200	-473.3340627	10	0.255
+5210	-473.3289169	10	0.255
+5220	-473.3285579	10	0.255
+5230	-473.3285579	10	0.255
+5240	-473.3285579	10	0.255
+5250	-473.3267532	10	0.255
+5260	-473.3266254	10	0.255
+5270	-473.3255321	10	0.255
+5280	-473.3255321	10	0.255
+5290	-473.3252446	10	0.255
+5300	-473.3250668	10	0.255
+5310	-473.3250668	10	0.255
+5320	-473.3250662	10	0.255
+5330	-473.3250447	10	0.255
+5340	-473.3210702	10	0.255
+5350	-473.3210702	10	0.255
+5360	-473.3209781	10	0.255
+5370	-473.3208119	10	0.255
+5380	-473.3208119	10	0.255
+5390	-473.3208119	10	0.255
+5400	-473.3182991	10	0.255
+5410	-473.3182991	10	0.255
+5420	-473.317261	10	0.255
+5430	-473.3134093	10	0.255
+5440	-473.3134093	10	0.255
+5450	-473.3134093	10	0.255
+5460	-473.261093	10	0.255
+5470	-473.2609901	10	0.255
+5480	-473.257888	10	0.255
+5490	-473.257888	10	0.255
+5500	-473.2539831	10	0.255
+5510	-473.2502454	10	0.255
+5520	-473.2293269	10	0.255
+5530	-473.2013248	10	0.255
+5540	-473.2003504	10	0.255
+5550	-473.1759813	10	0.255
+5560	-473.1756591	10	0.255
+5570	-473.1756591	10	0.255
+5580	-473.1441481	10	0.255
+5590	-473.144075	10	0.255
+5600	-473.1385533	10	0.255
+5610	-473.111945	10	0.255
+5620	-473.111945	10	0.255
+5630	-473.111945	10	0.255
+5640	-473.1102434	10	0.255
+5650	-473.1078486	10	0.255
+5660	-473.0987638	10	0.255
+5670	-473.095891	10	0.255
+5680	-473.0952045	10	0.255
+5690	-473.0791704	10	0.255
+5700	-473.0786738	10	0.255
+5710	-473.0783833	10	0.255
+5720	-473.0761023	11	0.255
+5730	-473.0761023	11	0.255
+5740	-473.0757517	11	0.255
+5750	-473.0748128	11	0.255
+5760	-473.0657999	11	0.255
+5770	-473.0636554	11	0.255
+5780	-473.0634243	11	0.255
+5790	-473.0609468	11	0.255
+5800	-473.060105	11	0.255
+5810	-473.060105	11	0.255
+5820	-473.060105	11	0.255
+5830	-473.0600894	11	0.255
+5840	-473.0600894	11	0.255
+5850	-473.0600894	11	0.255
+5860	-473.0519375	11	0.255
+5870	-473.0484819	11	0.255
+5880	-473.0484458	11	0.255
+5890	-473.0483064	11	0.255
+5900	-473.0481209	11	0.255
+5910	-473.0468958	11	0.255
+5920	-473.0463598	11	0.255
+5930	-473.0463598	11	0.255
+5940	-473.0441935	11	0.255
+5950	-473.0441879	11	0.255
+5960	-473.0438645	11	0.255
+5970	-473.0387221	11	0.255
+5980	-473.0381532	11	0.255
+5990	-473.0377216	11	0.255
+6000	-472.945516	11	0.255
+6010	-472.9454842	11	0.255
+6020	-472.9444187	11	0.255
+6030	-472.9443964	11	0.255
+6040	-472.9433968	11	0.255
+6050	-472.9433968	11	0.255
+6060	-472.9433968	11	0.255
+6070	-472.9423447	11	0.255
+6080	-472.9423447	11	0.255
+6090	-472.9423447	11	0.255
+6100	-472.9400643	11	0.255
+6110	-472.9400328	11	0.255
+6120	-472.9392412	11	0.255
+6130	-472.9392412	11	0.255
+6140	-472.9389061	11	0.255
+6150	-472.9389061	11	0.255
+6160	-472.9388102	11	0.255
+6170	-472.9387284	11	0.255
+6180	-472.9378478	11	0.255
+6190	-472.9357906	11	0.255
+6200	-472.9357378	11	0.255
+6210	-472.935705	11	0.255
+6220	-472.9356856	11	0.255
+6230	-472.9356248	11	0.255
+6240	-472.9351517	11	0.255
+6250	-472.9351517	11	0.255
+6260	-472.9349809	12	0.255
+6270	-472.9349809	12	0.255
+6280	-472.9349805	12	0.255
+6290	-472.9349805	12	0.255
+6300	-472.9342951	12	0.255
+6310	-472.9342951	12	0.255
+6320	-472.9342819	12	0.255
+6330	-472.933868	12	0.255
+6340	-472.933868	12	0.255
+6350	-472.933868	12	0.255
+6360	-472.933868	12	0.255
+6370	-472.933868	12	0.255
+6380	-472.933868	12	0.255
+6390	-472.933868	12	0.255
+6400	-472.9338601	12	0.255
+6410	-472.9338599	12	0.255
+6420	-472.9280952	12	0.255
+6430	-472.9280952	12	0.255
+6440	-472.9280749	12	0.255
+6450	-472.9280454	12	0.255
+6460	-472.9280454	12	0.255
+6470	-472.9280441	12	0.255
+6480	-472.9280441	12	0.255
+6490	-472.9274176	12	0.255
+6500	-472.9274176	12	0.255
+6510	-472.927341	12	0.206
+6520	-472.927341	12	0.206
+6530	-472.9272862	12	0.206
+6540	-472.9272862	12	0.206
+6550	-472.9272862	12	0.206
+6560	-472.9272862	12	0.206
+6570	-472.9272862	12	0.206
+6580	-472.927268	12	0.206
+6590	-472.9270428	12	0.206
+6600	-472.9270428	12	0.206
+6610	-472.926924	12	0.206
+6620	-472.926924	12	0.206
+6630	-472.9231048	12	0.206
+6640	-472.9231048	12	0.206
+6650	-472.9231048	12	0.206
+6660	-472.9231046	12	0.206
+6670	-472.9227832	12	0.206
+6680	-472.9227832	12	0.206
+6690	-472.9227455	12	0.206
+6700	-472.9227455	12	0.206
+6710	-472.9226326	12	0.206
+6720	-472.9225992	12	0.206
+6730	-472.9225992	12	0.206
+6740	-472.9225992	12	0.206
+6750	-472.9225992	12	0.206
+6760	-472.9215632	12	0.206
+6770	-472.9215173	12	0.206
+6780	-472.920954	12	0.206
+6790	-472.9207743	12	0.206
+6800	-472.9207743	13	0.206
+6810	-472.9207732	13	0.206
+6820	-472.920773	13	0.206
+6830	-472.9206745	13	0.206
+6840	-472.9206745	13	0.206
+6850	-472.9206743	13	0.206
+6860	-472.9206743	13	0.206
+6870	-472.9206743	13	0.206
+6880	-472.9157973	13	0.206
+6890	-472.9157973	13	0.206
+6900	-472.9157953	13	0.206
+6910	-472.9157217	13	0.206
+6920	-472.9156595	13	0.206
+6930	-472.9156595	13	0.206
+6940	-472.9152361	13	0.206
+6950	-472.9152361	13	0.206
+6960	-472.9152361	13	0.206
+6970	-472.9152203	13	0.206
+6980	-472.9152203	13	0.206
+6990	-472.9152203	13	0.206
+7000	-472.9152203	13	0.206
+7010	-472.914642	13	0.157
+7020	-472.914642	13	0.157
+7030	-472.914642	13	0.157
+7040	-472.9138372	13	0.157
+7050	-472.9138372	13	0.157
+7060	-472.9138372	13	0.157
+7070	-472.9138372	13	0.157
+7080	-472.9136037	13	0.157
+7090	-472.9116912	13	0.157
+7100	-472.9116871	13	0.157
+7110	-472.9116871	13	0.157
+7120	-472.9116871	13	0.157
+7130	-472.9116871	13	0.157
+7140	-472.9011596	13	0.157
+7150	-472.901117	13	0.157
+7160	-472.8976995	13	0.157
+7170	-472.8976995	13	0.157
+7180	-472.8949313	13	0.157
+7190	-472.8881205	13	0.157
+7200	-472.8881205	13	0.157
+7210	-472.8881205	13	0.157
+7220	-472.888106	13	0.157
+7230	-472.8875664	13	0.157
+7240	-472.887375	13	0.157
+7250	-472.8873553	13	0.157
+7260	-472.8873538	13	0.157
+7270	-472.8872758	13	0.157
+7280	-472.8872758	13	0.157
+7290	-472.8872758	13	0.157
+7300	-472.8872758	13	0.157
+7310	-472.8872758	13	0.157
+7320	-472.8872758	14	0.157
+7330	-472.8869024	14	0.157
+7340	-472.8867787	14	0.157
+7350	-472.8867787	14	0.157
+7360	-472.8867742	14	0.157
+7370	-472.8863728	14	0.157
+7380	-472.8863728	14	0.157
+7390	-472.8863728	14	0.157
+7400	-472.8859766	14	0.157
+7410	-472.8859766	14	0.157
+7420	-472.8859423	14	0.157
+7430	-472.8856028	14	0.157
+7440	-472.8854903	14	0.157
+7450	-472.8854892	14	0.157
+7460	-472.8854892	14	0.157
+7470	-472.8854892	14	0.157
+7480	-472.8830651	14	0.157
+7490	-472.8830651	14	0.157
+7500	-472.8830109	14	0.157
+7510	-472.8825201	14	0.157
+7520	-472.8825201	14	0.157
+7530	-472.8825201	14	0.157
+7540	-472.8825201	14	0.157
+7550	-472.8825201	14	0.157
+7560	-472.8825201	14	0.157
+7570	-472.8825201	14	0.157
+7580	-472.8825199	14	0.157
+7590	-472.8825199	14	0.157
+7600	-472.8823605	14	0.157
+7610	-472.8823539	14	0.157
+7620	-472.8814431	14	0.157
+7630	-472.8812297	14	0.157
+7640	-472.8812297	14	0.157
+7650	-472.8812297	14	0.157
+7660	-472.8807482	14	0.157
+7670	-472.8807482	14	0.157
+7680	-472.8807482	14	0.157
+7690	-472.8807482	14	0.157
+7700	-472.8805117	14	0.157
+7710	-472.7079824	14	0.108
+7720	-472.7079824	14	0.108
+7730	-472.696352	14	0.108
+7740	-472.6962658	14	0.108
+7750	-472.6962658	14	0.108
+7760	-472.6962658	14	0.108
+7770	-472.6954683	14	0.108
+7780	-472.6953082	14	0.108
+7790	-472.6943166	14	0.108
+7800	-472.6943158	14	0.108
+7810	-472.6857664	14	0.108
+7820	-472.6814644	15	0.108
+7830	-472.6813165	15	0.108
+7840	-472.6792635	15	0.108
+7850	-472.6792635	15	0.108
+7860	-472.6714833	15	0.108
+7870	-472.6714833	15	0.108
+7880	-472.6637586	15	0.108
+7890	-472.6573988	15	0.108
+7900	-472.6572709	15	0.108
+7910	-472.65603	15	0.108
+7920	-472.6516116	15	0.108
+7930	-472.6516116	15	0.108
+7940	-472.651611	15	0.108
+7950	-472.6516093	15	0.108
+7960	-472.651107	15	0.108
+7970	-472.6503553	15	0.108
+7980	-472.6500688	15	0.108
+7990	-472.6488244	15	0.108
+8000	-472.6449105	15	0.108
+8010	-472.6445625	15	0.108
+8020	-472.6445625	15	0.108
+8030	-472.6445625	15	0.108
+8040	-472.64314	15	0.108
+8050	-472.642562	15	0.108
+8060	-472.642562	15	0.108
+8070	-472.642562	15	0.108
+8080	-472.6423308	15	0.108
+8090	-472.6325899	15	0.108
+8100	-472.6325899	15	0.108
+8110	-472.6319215	15	0.108
+8120	-472.6319215	15	0.108
+8130	-472.6319215	15	0.108
+8140	-472.631195	15	0.108
+8150	-472.6310423	15	0.108
+8160	-472.631041	15	0.108
+8170	-472.631041	15	0.108
+8180	-472.6291807	15	0.108
+8190	-472.6290543	15	0.108
+8200	-472.6289966	15	0.108
+8210	-472.6289966	15	0.059
+8220	-472.62852	15	0.059
+8230	-472.6281644	15	0.059
+8240	-472.6272116	15	0.059
+8250	-472.624532	15	0.059
+8260	-472.6220503	15	0.059
+8270	-472.6217938	15	0.059
+8280	-472.6216893	15	0.059
+8290	-472.6216893	15	0.059
+8300	-472.6197478	15	0.059
+8310	-472.6197478	16	0.059
+8320	-472.6176521	16	0.059
+8330	-472.6174779	16	0.059
+8340	-472.6161999	16	0.059
+8350	-472.6152325	16	0.059
+8360	-472.5535951	16	0.059
+8370	-472.5535951	16	0.059
+8380	-472.5535951	16	0.059
+8390	-472.5535951	16	0.059
+8400	-472.5535951	16	0.059
+8410	-472.5521854	16	0.059
+8420	-472.5481198	16	0.059
+8430	-472.5481198	16	0.059
+8440	-472.5477846	16	0.059
+8450	-472.5477689	16	0.059
+8460	-472.5471114	16	0.059
+8470	-472.5467381	16	0.059
+8480	-472.5409374	16	0.059
+8490	-472.5409236	16	0.059
+8500	-472.5409144	16	0.059
+8510	-472.5409144	16	0.059
+8520	-472.5409144	16	0.059
+8530	-472.5409144	16	0.059
+8540	-472.5377028	16	0.059
+8550	-472.5377024	16	0.059
+8560	-472.5377024	16	0.059
+8570	-472.5377024	16	0.059
+8580	-472.5377024	16	0.059
+8590	-472.5377024	16	0.059
+8600	-472.5363569	16	0.059
+8610	-472.5354954	16	0.059
+8620	-472.5354954	16	0.059
+8630	-472.5338056	16	0.059
+8640	-472.5338056	16	0.059
+8650	-472.533651	16	0.059
+8660	-472.5335392	16	0.059
+8670	-472.5323718	16	0.059
+8680	-472.5322737	16	0.059
+8690	-472.5316823	16	0.059
+8700	-472.5310319	16	0.059
+8710	-472.5310319	16	0.059
+8720	-472.5293342	16	0.059
+8730	-472.5293342	16	0.059
+8740	-472.5293342	16	0.059
+8750	-472.5293342	17	0.059
+8760	-472.5257513	17	0.059
+8770	-472.5256388	17	0.059
+8780	-472.5256388	17	0.059
+8790	-472.5256388	17	0.059
+8800	-472.5256388	17	0.059
+8810	-472.5256388	17	0.059
+8820	-472.5255391	17	0.059
+8830	-472.5255391	17	0.059
+8840	-472.5255391	17	0.059
+8850	-472.5255249	17	0.059
+8860	-472.5251914	17	0.059
+8870	-472.5251914	17	0.059
+8880	-472.5251914	17	0.059
+8890	-472.5249915	17	0.059
+8900	-472.5248792	17	0.059
+8910	-472.4587471	17	0.01
+8920	-472.458682	17	0.01
+8930	-472.458682	17	0.01
+8940	-472.458682	17	0.01
+8950	-472.4579404	17	0.01
+8960	-472.4574916	17	0.01
+8970	-472.4570363	17	0.01
+8980	-472.4570349	17	0.01
+8990	-472.4570349	17	0.01
+9000	-472.4570349	17	0.01
+9010	-472.4568643	17	0.01
+9020	-472.4561277	17	0.01
+9030	-472.4560523	17	0.01
+9040	-472.4558723	17	0.01
+9050	-472.4537733	17	0.01
+9060	-472.4532123	17	0.01
+9070	-472.4516758	17	0.01
+9080	-472.4516758	17	0.01
+9090	-472.4491416	17	0.01
+9100	-472.4491416	17	0.01
+9110	-472.4491416	18	0.01
+9120	-472.4461672	18	0.01
+9130	-472.4444881	18	0.01
+9140	-472.4444869	18	0.01
+9150	-472.443879	18	0.01
+9160	-472.4429877	18	0.01
+9170	-472.4429877	18	0.01
+9180	-472.4429877	18	0.01
+9190	-472.4423975	18	0.01
+9200	-472.4423975	18	0.01
+9210	-472.4423961	18	0.01
+9220	-472.4423961	18	0.01
+9230	-472.4423961	18	0.01
+9240	-472.4423957	18	0.01
+9250	-472.4423957	18	0.01
+9260	-472.4423957	18	0.01
+9270	-472.440564	18	0.01
+9280	-472.440564	18	0.01
+9290	-472.440564	18	0.01
+9300	-472.4398675	18	0.01
+9310	-472.4397682	18	0.01
+9320	-472.43975	18	0.01
+9330	-472.4392647	18	0.01
+9340	-472.4373286	18	0.01
+9350	-472.4366841	18	0.01
+9360	-472.4364268	18	0.01
+9370	-472.4344472	18	0.01
+9380	-472.4344472	18	0.01
+9390	-472.4344303	18	0.01
+9400	-472.4338173	18	0.01
+9410	-472.4332862	18	0.01
+9420	-472.4332862	18	0.01
+9430	-472.4332862	19	0.01
+9440	-472.4332554	19	0.01
+9450	-472.4332554	19	0.01
+9460	-472.433011	19	0.01
+9470	-472.433011	19	0.01
+9480	-472.433011	19	0.01
+9490	-472.433011	19	0.01
+9500	-472.4322398	19	0.01
+9510	-472.4322398	19	0.01
+9520	-472.4322398	19	0.01
+9530	-472.4322394	19	0.01
+9540	-472.4322394	19	0.01
+9550	-472.4321471	19	0.01
+9560	-472.4321466	19	0.01
+9570	-472.4320326	19	0.01
+9580	-472.4313407	19	0.01
+9590	-472.4292945	19	0.01
+9600	-472.4291046	19	0.01
+9610	-472.4291046	19	0.01
+9620	-472.4287694	19	0.01
+9630	-472.428149	19	0.01
+9640	-472.4276428	19	0.01
+9650	-472.4276428	19	0.01
+9660	-472.4276428	19	0.01
+9670	-472.4275321	19	0.01
+9680	-472.4275321	19	0.01
+9690	-472.4275321	19	0.01
+9700	-472.4275321	19	0.01
+9710	-472.427394	19	0.01
+9720	-472.4273923	19	0.01
+9730	-472.4273923	19	0.01
+9740	-472.4273923	20	0.01
+9750	-472.4273115	20	0.01
+9760	-472.4267393	20	0.01
+9770	-472.4266524	20	0.01
+9780	-472.4266524	20	0.01
+9790	-472.4258118	20	0.01
+9800	-472.4256386	20	0.01
+9810	-472.4256386	20	0.01
+9820	-472.4256386	20	0.01
+9830	-472.4248966	20	0.01
+9840	-472.4244866	20	0.01
+9850	-472.4244533	20	0.01
+9860	-472.4244533	20	0.01
+9870	-472.4242631	20	0.01
+9880	-472.42368	20	0.01
+9890	-472.42368	20	0.01
+9900	-472.4228867	20	0.01
+9910	-472.4228867	20	0.01
+9920	-472.4228409	20	0.01
+9930	-472.4228409	20	0.01
+9940	-472.4215519	20	0.01
+9950	-472.4215519	20	0.01
+9960	-472.4213118	20	0.01
+9970	-472.4211397	20	0.01
+9980	-472.4202968	20	0.01
+9990	-472.4202968	20	0.01
+10000	-472.4202957	20	0.01
+10010	-472.4202957	20	0.01
+10020	-472.4202804	21	0.01
+10030	-472.4202743	21	0.01
+10040	-472.4202743	21	0.01
+10050	-472.4202743	21	0.01
+10060	-472.4202743	21	0.01
+10070	-472.4202743	21	0.01
+10080	-472.4202743	21	0.01
+10090	-472.4202743	21	0.01
+10100	-472.4202743	21	0.01
+10110	-472.4202743	21	0.01
+10120	-472.4202437	21	0.01
+10130	-472.4202437	21	0.01
+10140	-472.4202437	21	0.01
+10150	-472.4202437	21	0.01
+10160	-472.4202437	21	0.01
+10170	-472.4201348	21	0.01
+10180	-472.4201348	21	0.01
+10190	-472.4200622	21	0.01
+10200	-472.4199549	21	0.01
+10210	-472.4199529	21	0.01
+10220	-472.4199529	21	0.01
+10230	-472.4199529	21	0.01
+10240	-472.4199529	21	0.01
+10250	-472.4199529	21	0.01
+10260	-472.4199529	21	0.01
+10270	-472.4199529	21	0.01
+10280	-472.4199529	21	0.01
+10290	-472.4199529	22	0.01
+10300	-472.4199529	22	0.01
+10310	-472.4199516	22	0.01
+10320	-472.4199516	22	0.01
+10330	-472.4198957	22	0.01
+10340	-472.4198957	22	0.01
+10350	-472.4197858	22	0.01
+10360	-472.4197858	22	0.01
+10370	-472.4197857	22	0.01
+10380	-472.4197449	22	0.01
+10390	-472.4197449	22	0.01
+10400	-472.4197449	22	0.01
+10410	-472.4197449	22	0.01
+10420	-472.4193837	22	0.01
+10430	-472.4193837	22	0.01
+10440	-472.4193837	22	0.01
+10450	-472.4191453	22	0.01
+10460	-472.4191453	22	0.01
+10470	-472.4191453	22	0.01
+10480	-472.4191453	22	0.01
+10490	-472.4191452	22	0.01
+10500	-472.41908	22	0.01
+10510	-472.41908	22	0.01
+10520	-472.4180649	22	0.01
+10530	-472.41806	23	0.01
+10540	-472.41806	23	0.01
+10550	-472.41806	23	0.01
+10560	-472.41806	23	0.01
+10570	-472.41806	23	0.01
+10580	-472.4179574	23	0.01
+10590	-472.4178656	23	0.01
+10600	-472.4178656	23	0.01
+10610	-472.4178656	23	0.01
+10620	-472.4178656	23	0.01
+10630	-472.4178656	23	0.01
+10640	-472.4177521	23	0.01
+10650	-472.4177521	23	0.01
+10660	-472.4177521	23	0.01
+10670	-472.4177145	23	0.01
+10680	-472.4175729	23	0.01
+10690	-472.4175729	23	0.01
+10700	-472.4175729	23	0.01
+10710	-472.4174707	23	0.01
+10720	-472.4174707	23	0.01
+10730	-472.4174285	23	0.01
+10740	-472.4173452	23	0.01
+10750	-472.4173452	23	0.01
+10760	-472.4173452	23	0.01
+10770	-472.4173452	23	0.01
+10780	-472.4173452	23	0.01
+10790	-472.4172303	23	0.01
+10800	-472.4172303	23	0.01
+10810	-472.4172302	23	0.01
+10820	-472.4172302	23	0.01
+10830	-472.4153449	23	0.01
+10840	-472.415341	23	0.01
+10850	-472.4152493	24	0.01
+10860	-472.4141571	24	0.01
+10870	-472.4141571	24	0.01
+10880	-472.4135864	24	0.01
+10890	-472.4135864	24	0.01
+10900	-472.4135864	24	0.01
+10910	-472.4135864	24	0.01
+10920	-472.4135864	24	0.01
+10930	-472.4135864	24	0.01
+10940	-472.4131467	24	0.01
+10950	-472.4130707	24	0.01
+10960	-472.4129831	24	0.01
+10970	-472.4128741	24	0.01
+10980	-472.4128741	24	0.01
+10990	-472.4124785	24	0.01
+11000	-472.411521	24	0.01
+11010	-472.411521	24	0.01
+11020	-472.411521	24	0.01
+11030	-472.4109603	24	0.01
+11040	-472.4104254	24	0.01
+11050	-472.4104254	24	0.01
+11060	-472.4104254	24	0.01
+11070	-472.4103686	24	0.01
+11080	-472.4103686	24	0.01
+11090	-472.4102403	24	0.01
+11100	-472.410231	24	0.01
+11110	-472.410231	24	0.01
+11120	-472.4102292	24	0.01
+11130	-472.4102292	24	0.01
+11140	-472.4102292	24	0.01
+11150	-472.4099504	24	0.01
+11160	-472.4099504	24	0.01
+11170	-472.4099504	25	0.01
+11180	-472.4099504	25	0.01
+11190	-472.4099504	25	0.01
+11200	-472.4099499	25	0.01
+11210	-472.4099499	25	0.01
+11220	-472.4096268	25	0.01
+11230	-472.4096268	25	0.01
+11240	-472.4096268	25	0.01
+11250	-472.4096268	25	0.01
+11260	-472.4096268	25	0.01
+11270	-472.4096268	25	0.01
+11280	-472.4096268	25	0.01
+11290	-472.4096268	25	0.01
+11300	-472.4096268	25	0.01
+11310	-472.4096253	25	0.01
+11320	-472.4095842	25	0.01
+11330	-472.4095353	25	0.01
+11340	-472.4095353	25	0.01
+11350	-472.4093391	25	0.01
+11360	-472.4093391	25	0.01
+11370	-472.4093206	25	0.01
+11380	-472.4093206	25	0.01
+11390	-472.4093154	25	0.01
+11400	-472.4092032	25	0.01
+11410	-472.4092028	25	0.01
+11420	-472.4092028	25	0.01
+11430	-472.4088345	25	0.01
+11440	-472.4087682	25	0.01
+11450	-472.4087682	25	0.01
+11460	-472.4087156	25	0.01
+11470	-472.4087156	25	0.01
+11480	-472.4087156	25	0.01
+11490	-472.4086567	26	0.01
+11500	-472.4086567	26	0.01
+11510	-472.4086549	26	0.01
+11520	-472.4086271	26	0.01
+11530	-472.4086271	26	0.01
+11540	-472.4086271	26	0.01
+11550	-472.4086271	26	0.01
+11560	-472.4086271	26	0.01
+11570	-472.4086271	26	0.01
+11580	-472.4086271	26	0.01
+11590	-472.4086271	26	0.01
+11600	-472.4086271	26	0.01
+11610	-472.4086271	26	0.01
+11620	-472.4086268	26	0.01
+11630	-472.4086268	26	0.01
+11640	-472.4086268	26	0.01
+11650	-472.4086268	26	0.01
+11660	-472.408525	26	0.01
+11670	-472.408372	26	0.01
+11680	-472.408372	26	0.01
+11690	-472.4083713	26	0.01
+11700	-472.4082277	26	0.01
+11710	-472.4082277	26	0.01
+11720	-472.4082277	26	0.01
+11730	-472.4082067	26	0.01
+11740	-472.4082067	26	0.01
+11750	-472.4082067	26	0.01
+11760	-472.4082067	26	0.01
+11770	-472.4079799	26	0.01
+11780	-472.4079799	26	0.01
+11790	-472.4079799	26	0.01
+11800	-472.4079799	26	0.01
+11810	-472.4079503	26	0.01
+11820	-472.4079502	27	0.01
+11830	-472.4079494	27	0.01
+11840	-472.4078826	27	0.01
+11850	-472.4078826	27	0.01
+11860	-472.4078826	27	0.01
+11870	-472.4078004	27	0.01
+11880	-472.4078004	27	0.01
+11890	-472.4078004	27	0.01
+11900	-472.4078004	27	0.01
+11910	-472.4078004	27	0.01
+11920	-472.4078004	27	0.01
+11930	-472.4078004	27	0.01
+11940	-472.4078004	27	0.01
+11950	-472.407785	27	0.01
+11960	-472.407785	27	0.01
+11970	-472.407785	27	0.01
+11980	-472.4074795	27	0.01
+11990	-472.407451	27	0.01
+12000	-472.407451	27	0.01
+12010	-472.4074507	27	0.01
+12020	-472.4074504	27	0.01
+12030	-472.4074504	27	0.01
+12040	-472.4074504	27	0.01
+12050	-472.4074504	27	0.01
+12060	-472.4074504	27	0.01
+12070	-472.4074314	27	0.01
+12080	-472.4074314	27	0.01
+12090	-472.4074314	27	0.01
+12100	-472.4074314	27	0.01
+12110	-472.4074314	27	0.01
+12120	-472.4074314	27	0.01
+12130	-472.4074314	27	0.01
+12140	-472.4074314	28	0.01
+12150	-472.4074314	28	0.01
+12160	-472.4074314	28	0.01
+12170	-472.4073088	28	0.01
+12180	-472.4073088	28	0.01
+12190	-472.4073088	28	0.01
+12200	-472.4073088	28	0.01
+12210	-472.4073088	28	0.01
+12220	-472.4072048	28	0.01
+12230	-472.407112	28	0.01
+12240	-472.406954	28	0.01
+12250	-472.406954	28	0.01
+12260	-472.4069537	28	0.01
+12270	-472.4069235	28	0.01
+12280	-472.4069235	28	0.01
+12290	-472.4069235	28	0.01
+12300	-472.4068079	28	0.01
+12310	-472.4068079	28	0.01
+12320	-472.4068079	28	0.01
+12330	-472.40661	28	0.01
+12340	-472.40661	28	0.01
+12350	-472.40661	28	0.01
+12360	-472.40661	28	0.01
+12370	-472.40661	28	0.01
+12380	-472.40661	28	0.01
+12390	-472.4066095	28	0.01
+12400	-472.4066095	28	0.01
+12410	-472.4065128	28	0.01
+12420	-472.4065128	28	0.01
+12430	-472.4065128	29	0.01
+12440	-472.4064751	29	0.01
+12450	-472.4064751	29	0.01
+12460	-472.4064742	29	0.01
+12470	-472.4064742	29	0.01
+12480	-472.4064742	29	0.01
+12490	-472.4064742	29	0.01
+12500	-472.4064737	29	0.01
+12510	-472.4064737	29	0.01
+12520	-472.406459	29	0.01
+12530	-472.406459	29	0.01
+12540	-472.406459	29	0.01
+12550	-472.406459	29	0.01
+12560	-472.406459	29	0.01
+12570	-472.4064399	29	0.01
+12580	-472.4064399	29	0.01
+12590	-472.4064399	29	0.01
+12600	-472.4064027	29	0.01
+12610	-472.4064027	29	0.01
+12620	-472.4064027	29	0.01
+12630	-472.4064027	30	0.01
+12640	-472.4063165	30	0.01
+12650	-472.4060667	30	0.01
+12660	-472.4060667	30	0.01
+12670	-472.4059736	30	0.01
+12680	-472.4059736	30	0.01
+12690	-472.4059736	30	0.01
+12700	-472.4059731	30	0.01
+12710	-472.4059731	30	0.01
+12720	-472.4059731	30	0.01
+12730	-472.4059731	30	0.01
+12740	-472.4059731	30	0.01
+12750	-472.4059664	30	0.01
+12760	-472.4059664	30	0.01
+12770	-472.4059664	30	0.01
+12780	-472.4059265	30	0.01
+12790	-472.4059265	30	0.01
+12800	-472.4059265	30	0.01
+12810	-472.4059265	30	0.01
+12820	-472.4059265	30	0.01
+12830	-472.4059265	30	0.01
+12840	-472.4059265	30	0.01
+12850	-472.4058475	30	0.01
+12860	-472.4058475	30	0.01
+12870	-472.4058403	30	0.01
+12880	-472.4058403	30	0.01
+12890	-472.4058403	30	0.01
+12900	-472.4058403	30	0.01
+12910	-472.4058394	31	0.01
+12920	-472.4057039	31	0.01
+12930	-472.4057039	31	0.01
+12940	-472.4057039	31	0.01
+12950	-472.4057039	31	0.01
+12960	-472.4057039	31	0.01
+12970	-472.4057039	31	0.01
+12980	-472.4057039	31	0.01
+12990	-472.4057039	31	0.01
+13000	-472.4057039	31	0.01
+13010	-472.4057039	31	0.01
+13020	-472.4057039	31	0.01
+13030	-472.4057039	31	0.01
+13040	-472.4057039	31	0.01
+13050	-472.4056999	31	0.01
+13060	-472.4056999	31	0.01
+13070	-472.4056999	31	0.01
+13080	-472.4056491	31	0.01
+13090	-472.4056491	31	0.01
+13100	-472.4056482	31	0.01
+13110	-472.4056482	31	0.01
+13120	-472.4056125	31	0.01
+13130	-472.4056125	31	0.01
+13140	-472.4056125	31	0.01
+13150	-472.4056125	31	0.01
+13160	-472.4056125	32	0.01
+13170	-472.4056125	32	0.01
+13180	-472.4056125	32	0.01
+13190	-472.4056125	32	0.01
+13200	-472.4056125	32	0.01
+13210	-472.4056125	32	0.01
+13220	-472.4056125	32	0.01
+13230	-472.4056125	32	0.01
+13240	-472.4056125	32	0.01
+13250	-472.4056125	32	0.01
+13260	-472.4056125	32	0.01
+13270	-472.4056125	32	0.01
+13280	-472.4056125	32	0.01
+13290	-472.4056125	32	0.01
+13300	-472.4056125	32	0.01
+13310	-472.4056125	32	0.01
+13320	-472.4056125	32	0.01
+13330	-472.4056086	32	0.01
+13340	-472.4056086	32	0.01
+13350	-472.4056086	32	0.01
+13360	-472.405554	32	0.01
+13370	-472.4055112	32	0.01
+13380	-472.4055112	32	0.01
+13390	-472.4054914	32	0.01
+13400	-472.4054914	32	0.01
+13410	-472.4054914	32	0.01
+13420	-472.4054322	32	0.01
+13430	-472.4054322	32	0.01
+13440	-472.4054321	32	0.01
+13450	-472.4054321	33	0.01
+13460	-472.4054043	33	0.01
+13470	-472.4054043	33	0.01
+13480	-472.4054043	33	0.01
+13490	-472.4054043	33	0.01
+13500	-472.4054043	33	0.01
+13510	-472.4054043	33	0.01
+13520	-472.4053949	33	0.01
+13530	-472.4053949	33	0.01
+13540	-472.4053949	33	0.01
+13550	-472.4053949	33	0.01
+13560	-472.4053949	33	0.01
+13570	-472.4053949	33	0.01
+13580	-472.4053949	33	0.01
+13590	-472.4053949	33	0.01
+13600	-472.4053949	33	0.01
+13610	-472.4053949	33	0.01
+13620	-472.4053949	33	0.01
+13630	-472.4053949	33	0.01
+13640	-472.4053949	33	0.01
+13650	-472.4053949	33	0.01
+13660	-472.4053949	33	0.01
+13670	-472.4053949	33	0.01
+13680	-472.4053949	33	0.01
+13690	-472.4053949	33	0.01
+13700	-472.4053949	33	0.01
+13710	-472.4053949	33	0.01
+13720	-472.405338	33	0.01
+13730	-472.405338	33	0.01
+13740	-472.405338	33	0.01
+13750	-472.405338	34	0.01
+13760	-472.405338	34	0.01
+13770	-472.405338	34	0.01
+13780	-472.405338	34	0.01
+13790	-472.405338	34	0.01
+13800	-472.405338	34	0.01
+13810	-472.405338	34	0.01
+13820	-472.4052941	34	0.01
+13830	-472.4052231	34	0.01
+13840	-472.4052231	34	0.01
+13850	-472.4052231	34	0.01
+13860	-472.4051892	34	0.01
+13870	-472.4051892	34	0.01
+13880	-472.4051892	34	0.01
+13890	-472.4051892	34	0.01
+13900	-472.4051892	34	0.01
+13910	-472.4051892	34	0.01
+13920	-472.4051892	34	0.01
+13930	-472.4051892	34	0.01
+13940	-472.4051892	34	0.01
+13950	-472.4051738	34	0.01
+13960	-472.4051738	34	0.01
+13970	-472.4051738	34	0.01
+13980	-472.4051738	34	0.01
+13990	-472.4051738	34	0.01
+14000	-472.4051738	34	0.01
+14010	-472.405146	34	0.01
+14020	-472.405146	34	0.01
+14030	-472.405146	35	0.01
+14040	-472.4050116	35	0.01
+14050	-472.4050116	35	0.01
+14060	-472.4048088	35	0.01
+14070	-472.4048088	35	0.01
+14080	-472.4048088	35	0.01
+14090	-472.4047793	35	0.01
+14100	-472.4047793	35	0.01
+14110	-472.4047793	35	0.01
+14120	-472.4047793	35	0.01
+14130	-472.4047653	35	0.01
+14140	-472.4047653	35	0.01
+14150	-472.4047653	35	0.01
+14160	-472.4047653	35	0.01
+14170	-472.4047653	35	0.01
+14180	-472.4047653	35	0.01
+14190	-472.4047653	35	0.01
+14200	-472.4047653	35	0.01
+14210	-472.4047653	35	0.01
+14220	-472.4047378	35	0.01
+14230	-472.4047378	35	0.01
+14240	-472.4046985	35	0.01
+14250	-472.4046985	35	0.01
+14260	-472.4046985	35	0.01
+14270	-472.4046985	35	0.01
+14280	-472.4046985	35	0.01
+14290	-472.4046985	35	0.01
+14300	-472.4046985	35	0.01
+14310	-472.4046985	35	0.01
+14320	-472.4046985	35	0.01
+14330	-472.4046491	35	0.01
+14340	-472.4046491	35	0.01
+14350	-472.4046418	36	0.01
+14360	-472.4046418	36	0.01
+14370	-472.4046418	36	0.01
+14380	-472.4045935	36	0.01
+14390	-472.404543	36	0.01
+14400	-472.404543	36	0.01
+14410	-472.404543	36	0.01
+14420	-472.404543	36	0.01
+14430	-472.404543	36	0.01
+14440	-472.404543	36	0.01
+14450	-472.404543	36	0.01
+14460	-472.404543	36	0.01
+14470	-472.4045265	36	0.01
+14480	-472.4045265	36	0.01
+14490	-472.4045265	36	0.01
+14500	-472.4045265	36	0.01
+14510	-472.4045265	36	0.01
+14520	-472.4045265	36	0.01
+14530	-472.4045265	36	0.01
+14540	-472.4045265	36	0.01
+14550	-472.4045265	36	0.01
+14560	-472.4045265	36	0.01
+14570	-472.4045192	36	0.01
+14580	-472.4045192	36	0.01
+14590	-472.4045192	36	0.01
+14600	-472.4045192	36	0.01
+14610	-472.4045192	36	0.01
+14620	-472.4045192	36	0.01
+14630	-472.4045192	36	0.01
+14640	-472.4045192	36	0.01
+14650	-472.4045192	36	0.01
+14660	-472.4045192	37	0.01
+14670	-472.4044954	37	0.01
+14680	-472.4044954	37	0.01
+14690	-472.4044954	37	0.01
+14700	-472.4044895	37	0.01
+14710	-472.4044895	37	0.01
+14720	-472.4044895	37	0.01
+14730	-472.4044894	37	0.01
+14740	-472.4044894	37	0.01
+14750	-472.4044894	37	0.01
+14760	-472.4044894	37	0.01
+14770	-472.4044894	37	0.01
+14780	-472.4044894	37	0.01
+14790	-472.4044894	37	0.01
+14800	-472.4044894	37	0.01
+14810	-472.4044894	37	0.01
+14820	-472.4044894	37	0.01
+14830	-472.4044894	37	0.01
+14840	-472.4044642	37	0.01
+14850	-472.4044642	37	0.01
+14860	-472.4044642	37	0.01
+14870	-472.4044642	37	0.01
+14880	-472.4044642	37	0.01
+14890	-472.4044642	37	0.01
+14900	-472.4044639	37	0.01
+14910	-472.4044639	37	0.01
+14920	-472.4044639	37	0.01
+14930	-472.4044639	37	0.01
+14940	-472.4044639	37	0.01
+14950	-472.4044448	37	0.01
+14960	-472.4044448	37	0.01
+14970	-472.4044448	37	0.01
+14980	-472.4044448	38	0.01
+14990	-472.4044448	38	0.01
+15000	-472.4044448	38	0.01
+15010	-472.4044447	38	0.01
+15020	-472.4044447	38	0.01
+15030	-472.4042777	38	0.01
+15040	-472.4042777	38	0.01
+15050	-472.4042777	38	0.01
+15060	-472.4042777	38	0.01
+15070	-472.4042777	38	0.01
+15080	-472.4042777	38	0.01
+15090	-472.4042777	38	0.01
+15100	-472.4042468	38	0.01
+15110	-472.4042468	38	0.01
+15120	-472.4042468	38	0.01
+15130	-472.4042468	38	0.01
+15140	-472.4042468	38	0.01
+15150	-472.4042457	38	0.01
+15160	-472.4042457	38	0.01
+15170	-472.4042457	38	0.01
+15180	-472.4042457	38	0.01
+15190	-472.4042457	38	0.01
+15200	-472.4042457	38	0.01
+15210	-472.4042457	38	0.01
+15220	-472.4041965	38	0.01
+15230	-472.4041952	38	0.01
+15240	-472.4041952	38	0.01
+15250	-472.4041952	38	0.01
+15260	-472.4041303	38	0.01
+15270	-472.4041303	38	0.01
+15280	-472.4041303	38	0.01
+15290	-472.4041303	38	0.01
+15300	-472.4041303	39	0.01
+15310	-472.4040929	39	0.01
+15320	-472.4040929	39	0.01
+15330	-472.4040828	39	0.01
+15340	-472.4040828	39	0.01
+15350	-472.4040828	39	0.01
+15360	-472.4040828	39	0.01
+15370	-472.4040828	39	0.01
+15380	-472.4040822	39	0.01
+15390	-472.4040822	39	0.01
+15400	-472.4040822	39	0.01
+15410	-472.4040822	39	0.01
+15420	-472.4040372	39	0.01
+15430	-472.4040372	39	0.01
+15440	-472.4040372	39	0.01
+15450	-472.4040372	39	0.01
+15460	-472.4039752	39	0.01
+15470	-472.4039752	39	0.01
+15480	-472.4039752	39	0.01
+15490	-472.4039075	39	0.01
+15500	-472.4039075	39	0.01
+15510	-472.4039075	39	0.01
+15520	-472.4039075	39	0.01
+15530	-472.4039075	39	0.01
+15540	-472.4039075	39	0.01
+15550	-472.4039075	39	0.01
+15560	-472.4039075	39	0.01
+15570	-472.4038592	39	0.01
+15580	-472.4038592	39	0.01
+15590	-472.4038592	39	0.01
+15600	-472.4038592	39	0.01
+15610	-472.4038381	39	0.01
+15620	-472.4038381	39	0.01
+15630	-472.4038381	40	0.01
+15640	-472.4038158	40	0.01
+15650	-472.4038053	40	0.01
+15660	-472.4037818	40	0.01
+15670	-472.4037818	40	0.01
+15680	-472.403688	40	0.01
+15690	-472.403688	40	0.01
+15700	-472.4036268	40	0.01
+15710	-472.4036268	40	0.01
+15720	-472.4036268	40	0.01
+15730	-472.4036262	40	0.01
+15740	-472.4036262	40	0.01
+15750	-472.4036262	40	0.01
+15760	-472.4036262	40	0.01
+15770	-472.4036262	40	0.01
+15780	-472.4036067	40	0.01
+15790	-472.4036067	40	0.01
+15800	-472.4036067	40	0.01
+15810	-472.4036067	40	0.01
+15820	-472.4036067	40	0.01
+15830	-472.4036067	40	0.01
+15840	-472.4036067	40	0.01
+15850	-472.4035069	40	0.01
+15860	-472.4035069	40	0.01
+15870	-472.4035003	40	0.01
+15880	-472.4035003	40	0.01
+15890	-472.4034415	40	0.01
+15900	-472.4034415	40	0.01
+15910	-472.4034415	40	0.01
+15920	-472.4034415	40	0.01
+15930	-472.4034265	40	0.01
+15940	-472.4034265	40	0.01
+15950	-472.4033727	41	0.01
+15960	-472.4033727	41	0.01
+15970	-472.4033727	41	0.01
+15980	-472.4033727	41	0.01
+15990	-472.4033727	41	0.01
+16000	-472.4033727	41	0.01
+16010	-472.4033727	41	0.01
+16020	-472.4033727	41	0.01
+16030	-472.4033727	41	0.01
+16040	-472.4033727	41	0.01
+16050	-472.4033727	41	0.01
+16060	-472.4033195	41	0.01
+16070	-472.4033018	41	0.01
+16080	-472.403241	41	0.01
+16090	-472.403241	41	0.01
+16100	-472.403241	41	0.01
+16110	-472.4031638	41	0.01
+16120	-472.4031638	41	0.01
+16130	-472.4031638	41	0.01
+16140	-472.4031638	41	0.01
+16150	-472.4031638	41	0.01
+16160	-472.4031638	41	0.01
+16170	-472.4031513	41	0.01
+16180	-472.4031513	41	0.01
+16190	-472.4030796	41	0.01
+16200	-472.4030796	41	0.01
+16210	-472.4030796	41	0.01
+16220	-472.4030796	41	0.01
+16230	-472.4030671	41	0.01
+16240	-472.403067	41	0.01
+16250	-472.403067	41	0.01
+16260	-472.403067	41	0.01
+16270	-472.403067	42	0.01
+16280	-472.403067	42	0.01
+16290	-472.403067	42	0.01
+16300	-472.403067	42	0.01
+16310	-472.403067	42	0.01
+16320	-472.403067	42	0.01
+16330	-472.403067	42	0.01
+16340	-472.403067	42	0.01
+16350	-472.403067	42	0.01
+16360	-472.403067	42	0.01
+16370	-472.403067	42	0.01
+16380	-472.403067	42	0.01
+16390	-472.403067	42	0.01
+16400	-472.4030518	42	0.01
+16410	-472.4030518	42	0.01
+16420	-472.4030518	42	0.01
+16430	-472.4030518	42	0.01
+16440	-472.4030144	42	0.01
+16450	-472.4029999	42	0.01
+16460	-472.4029935	42	0.01
+16470	-472.4029724	42	0.01
+16480	-472.4029724	42	0.01
+16490	-472.4029724	42	0.01
+16500	-472.4029724	42	0.01
+16510	-472.4029724	42	0.01
+16520	-472.4029724	42	0.01
+16530	-472.4029724	42	0.01
+16540	-472.4029407	42	0.01
+16550	-472.4029407	42	0.01
+16560	-472.4028079	42	0.01
+16570	-472.4028079	42	0.01
+16580	-472.4028079	42	0.01
+16590	-472.4028079	43	0.01
+16600	-472.4028079	43	0.01
+16610	-472.4028079	43	0.01
+16620	-472.4028065	43	0.01
+16630	-472.4028065	43	0.01
+16640	-472.4028065	43	0.01
+16650	-472.4028065	43	0.01
+16660	-472.4028065	43	0.01
+16670	-472.4028065	43	0.01
+16680	-472.4027997	43	0.01
+16690	-472.4027997	43	0.01
+16700	-472.4027903	43	0.01
+16710	-472.4027903	43	0.01
+16720	-472.4027903	43	0.01
+16730	-472.4027519	43	0.01
+16740	-472.4027519	43	0.01
+16750	-472.4027519	43	0.01
+16760	-472.4027519	43	0.01
+16770	-472.4027516	43	0.01
+16780	-472.4027516	43	0.01
+16790	-472.4027516	43	0.01
+16800	-472.4027429	43	0.01
+16810	-472.4027429	43	0.01
+16820	-472.4027429	43	0.01
+16830	-472.4027429	43	0.01
+16840	-472.4027429	43	0.01
+16850	-472.4027429	43	0.01
+16860	-472.4027429	43	0.01
+16870	-472.4027429	43	0.01
+16880	-472.4027429	43	0.01
+16890	-472.4027429	43	0.01
+16900	-472.4027429	44	0.01
+16910	-472.4027429	44	0.01
+16920	-472.4027429	44	0.01
+16930	-472.4027429	44	0.01
+16940	-472.4027383	44	0.01
+16950	-472.4027383	44	0.01
+16960	-472.4027383	44	0.01
+16970	-472.4026248	44	0.01
+16980	-472.4026248	44	0.01
+16990	-472.4026248	44	0.01
+17000	-472.4026248	44	0.01
+17010	-472.4026248	44	0.01
+17020	-472.4026248	44	0.01
+17030	-472.4026248	44	0.01
+17040	-472.4026248	44	0.01
+17050	-472.4026248	44	0.01
+17060	-472.4026248	44	0.01
+17070	-472.4026248	44	0.01
+17080	-472.4026248	44	0.01
+17090	-472.4026248	44	0.01
+17100	-472.4026248	44	0.01
+17110	-472.4025842	44	0.01
+17120	-472.4025718	44	0.01
+17130	-472.402529	44	0.01
+17140	-472.402529	44	0.01
+17150	-472.402529	44	0.01
+17160	-472.402529	44	0.01
+17170	-472.402529	44	0.01
+17180	-472.402529	44	0.01
+17190	-472.402529	44	0.01
+17200	-472.402529	44	0.01
+17210	-472.402529	44	0.01
+17220	-472.4024695	45	0.01
+17230	-472.4024695	45	0.01
+17240	-472.4024695	45	0.01
+17250	-472.4024695	45	0.01
+17260	-472.4024695	45	0.01
+17270	-472.4024695	45	0.01
+17280	-472.4024674	45	0.01
+17290	-472.4024674	45	0.01
+17300	-472.4024674	45	0.01
+17310	-472.4024674	45	0.01
+17320	-472.402461	45	0.01
+17330	-472.402461	45	0.01
+17340	-472.402461	45	0.01
+17350	-472.4024592	45	0.01
+17360	-472.4024592	45	0.01
+17370	-472.4024592	45	0.01
+17380	-472.4024592	45	0.01
+17390	-472.4024052	45	0.01
+17400	-472.4024052	45	0.01
+17410	-472.4023481	45	0.01
+17420	-472.4023481	45	0.01
+17430	-472.4023481	45	0.01
+17440	-472.4022453	45	0.01
+17450	-472.4022453	45	0.01
+17460	-472.4022432	45	0.01
+17470	-472.4022432	45	0.01
+17480	-472.4022432	45	0.01
+17490	-472.4022432	45	0.01
+17500	-472.4022432	45	0.01
+17510	-472.4022432	45	0.01
+17520	-472.4022432	45	0.01
+17530	-472.4022432	46	0.01
+17540	-472.4021922	46	0.01
+17550	-472.4021611	46	0.01
+17560	-472.4021509	46	0.01
+17570	-472.4021509	46	0.01
+17580	-472.4021509	46	0.01
+17590	-472.4021509	46	0.01
+17600	-472.4021509	46	0.01
+17610	-472.4021509	46	0.01
+17620	-472.4021509	46	0.01
+17630	-472.4021509	46	0.01
+17640	-472.4021509	46	0.01
+17650	-472.4021509	46	0.01
+17660	-472.4021509	46	0.01
+17670	-472.4021509	46	0.01
+17680	-472.4021509	46	0.01
+17690	-472.4021509	46	0.01
+17700	-472.4021509	46	0.01
+17710	-472.4021472	46	0.01
+17720	-472.4021472	46	0.01
+17730	-472.4021472	46	0.01
+17740	-472.4021167	46	0.01
+17750	-472.4021167	46	0.01
+17760	-472.4021167	46	0.01
+17770	-472.4021167	46	0.01
+17780	-472.4021167	46	0.01
+17790	-472.4021167	46	0.01
+17800	-472.4021167	46	0.01
+17810	-472.4020974	46	0.01
+17820	-472.4020974	46	0.01
+17830	-472.4020974	46	0.01
+17840	-472.4020974	46	0.01
+17850	-472.4020974	47	0.01
+17860	-472.4020974	47	0.01
+17870	-472.4020974	47	0.01
+17880	-472.4020974	47	0.01
+17890	-472.4020387	47	0.01
+17900	-472.4020387	47	0.01
+17910	-472.4020387	47	0.01
+17920	-472.4020387	47	0.01
+17930	-472.4020387	47	0.01
+17940	-472.4020387	47	0.01
+17950	-472.4020387	47	0.01
+17960	-472.4020387	47	0.01
+17970	-472.4020387	47	0.01
+17980	-472.4020387	47	0.01
+17990	-472.4020387	47	0.01
+18000	-472.4020387	47	0.01
+18010	-472.4020387	47	0.01
+18020	-472.4020387	47	0.01
+18030	-472.4020387	47	0.01
+18040	-472.4020387	47	0.01
+18050	-472.4020387	47	0.01
+18060	-472.4020385	47	0.01
+18070	-472.4020385	47	0.01
+18080	-472.4020385	47	0.01
+18090	-472.4020385	47	0.01
+18100	-472.4020385	47	0.01
+18110	-472.4020385	47	0.01
+18120	-472.4020385	47	0.01
+18130	-472.4020385	47	0.01
+18140	-472.4020385	47	0.01
+18150	-472.4020301	47	0.01
+18160	-472.4019859	47	0.01
+18170	-472.4019859	47	0.01
+18180	-472.4019859	48	0.01
+18190	-472.4019859	48	0.01
+18200	-472.4019859	48	0.01
+18210	-472.4019859	48	0.01
+18220	-472.4019859	48	0.01
+18230	-472.4019859	48	0.01
+18240	-472.4019859	48	0.01
+18250	-472.4019859	48	0.01
+18260	-472.4019859	48	0.01
+18270	-472.4019859	48	0.01
+18280	-472.401912	48	0.01
+18290	-472.401912	48	0.01
+18300	-472.401912	48	0.01
+18310	-472.401912	48	0.01
+18320	-472.4018378	48	0.01
+18330	-472.4018103	48	0.01
+18340	-472.4018103	48	0.01
+18350	-472.4018103	48	0.01
+18360	-472.4018103	48	0.01
+18370	-472.4018103	48	0.01
+18380	-472.4018103	48	0.01
+18390	-472.4018103	48	0.01
+18400	-472.4018103	48	0.01
+18410	-472.4018103	48	0.01
+18420	-472.4018103	48	0.01
+18430	-472.4018103	48	0.01
+18440	-472.4017804	48	0.01
+18450	-472.4017804	48	0.01
+18460	-472.4017804	48	0.01
+18470	-472.4017777	48	0.01
+18480	-472.4017777	48	0.01
+18490	-472.4017777	48	0.01
+18500	-472.4017777	48	0.01
+18510	-472.4017777	48	0.01
+18520	-472.4017777	49	0.01
+18530	-472.401651	49	0.01
+18540	-472.401651	49	0.01
+18550	-472.401651	49	0.01
+18560	-472.401651	49	0.01
+18570	-472.401651	49	0.01
+18580	-472.401651	49	0.01
+18590	-472.401651	49	0.01
+18600	-472.401651	49	0.01
+18610	-472.4015762	49	0.01
+18620	-472.4015762	49	0.01
+18630	-472.4015762	49	0.01
+18640	-472.4015762	49	0.01
+18650	-472.4015762	49	0.01
+18660	-472.4015683	49	0.01
+18670	-472.4015683	49	0.01
+18680	-472.4015683	49	0.01
+18690	-472.4015461	49	0.01
+18700	-472.4015461	49	0.01
+18710	-472.4015461	49	0.01
+18720	-472.4015461	49	0.01
+18730	-472.4015461	49	0.01
+18740	-472.4015461	49	0.01
+18750	-472.4014653	49	0.01
+18760	-472.4014653	49	0.01
+18770	-472.4014184	49	0.01
+18780	-472.4014184	49	0.01
+18790	-472.4014184	49	0.01
+18800	-472.4014184	49	0.01
+18810	-472.4014184	49	0.01
+18820	-472.4013897	49	0.01
+18830	-472.4013897	49	0.01
+18840	-472.4013897	49	0.01
+18850	-472.4013897	50	0.01
+18860	-472.4013897	50	0.01
+18870	-472.4013897	50	0.01
+18880	-472.4013897	50	0.01
+18890	-472.4013897	50	0.01
+18900	-472.4013839	50	0.01
+18910	-472.4013839	50	0.01
+18920	-472.4013839	50	0.01
+18930	-472.4013839	50	0.01
+18940	-472.4013839	50	0.01
+18950	-472.4013839	50	0.01
+18960	-472.4013839	50	0.01
+18970	-472.4013557	50	0.01
+18980	-472.4013557	50	0.01
+18990	-472.4013557	50	0.01
+19000	-472.4013557	50	0.01
+Score after final optimization: -472.3908263
+Final	-472.3908263	50	0.01
+Search rep 2 (of 5)
+random seed = 44926809
+gen	best_like	time	optPrecision
+0	-812.3165176	50	0.5
+10	-752.7876708	50	0.5
+20	-732.1712309	50	0.5
+30	-719.47031	50	0.5
+40	-650.7220574	50	0.5
+50	-647.1386064	50	0.5
+60	-642.7040966	50	0.5
+70	-641.3342579	50	0.5
+80	-641.0987753	50	0.5
+90	-632.6838352	50	0.5
+100	-631.8927326	50	0.5
+110	-601.4576286	50	0.5
+120	-586.9307359	50	0.5
+130	-569.5962007	50	0.5
+140	-543.8408718	50	0.5
+150	-543.4233961	50	0.5
+160	-537.0044651	50	0.5
+170	-534.5504701	50	0.5
+180	-516.0713395	50	0.5
+190	-515.5849294	50	0.5
+200	-515.576461	50	0.5
+210	-515.5206683	50	0.5
+220	-514.5980447	50	0.5
+230	-514.5960347	50	0.5
+240	-514.5079069	50	0.5
+250	-514.4338676	50	0.5
+260	-514.3449105	51	0.5
+270	-514.2672186	51	0.5
+280	-514.2279317	51	0.5
+290	-513.7759676	51	0.5
+300	-513.6661962	51	0.5
+310	-513.6399047	51	0.5
+320	-513.6212206	51	0.5
+330	-504.9912386	51	0.5
+340	-498.8593175	51	0.5
+350	-498.8361845	51	0.5
+360	-498.4374772	51	0.5
+370	-497.6166414	51	0.5
+380	-497.523889	51	0.5
+390	-495.7697284	51	0.5
+400	-495.7026283	51	0.5
+410	-493.4498918	51	0.5
+420	-492.951619	51	0.5
+430	-492.8176693	51	0.5
+440	-492.7841778	51	0.5
+450	-492.7065137	51	0.5
+460	-491.7991034	51	0.5
+470	-491.6128427	51	0.5
+480	-490.2846593	51	0.5
+490	-489.8579674	51	0.5
+500	-489.8559947	51	0.5
+510	-489.7982657	51	0.5
+520	-488.7784404	51	0.5
+530	-488.7784404	51	0.5
+540	-488.4085234	51	0.5
+550	-488.321838	51	0.5
+560	-488.239834	51	0.5
+570	-488.1627648	51	0.5
+580	-488.0752491	51	0.5
+590	-487.9876387	51	0.5
+600	-487.9820907	51	0.5
+610	-487.9820907	51	0.5
+620	-487.8836926	51	0.5
+630	-487.8836926	51	0.5
+640	-487.880637	51	0.5
+650	-487.7685552	51	0.5
+660	-487.6230292	51	0.5
+670	-487.5242788	51	0.5
+680	-487.5242788	51	0.5
+690	-487.4706816	51	0.5
+700	-487.2379074	51	0.5
+710	-482.7865556	51	0.5
+720	-482.716355	51	0.5
+730	-482.6478663	51	0.5
+740	-482.0639186	51	0.5
+750	-481.9831239	51	0.5
+760	-478.1267542	51	0.5
+770	-478.0425124	51	0.5
+780	-477.9984379	51	0.5
+790	-477.9337977	51	0.5
+800	-477.6722639	51	0.5
+810	-477.6618497	52	0.5
+820	-477.6124175	52	0.5
+830	-477.5596323	52	0.5
+840	-477.4566361	52	0.5
+850	-477.4147818	52	0.5
+860	-477.3994173	52	0.5
+870	-477.372252	52	0.5
+880	-477.3388557	52	0.5
+890	-477.2013869	52	0.5
+900	-477.1913569	52	0.5
+910	-477.1902967	52	0.5
+920	-477.1269832	52	0.5
+930	-477.0943334	52	0.5
+940	-477.0553871	52	0.5
+950	-477.0039216	52	0.5
+960	-477.0039216	52	0.5
+970	-476.9910195	52	0.5
+980	-476.9413373	52	0.5
+990	-476.6708333	52	0.5
+1000	-476.5205009	52	0.5
+1010	-476.4910688	52	0.5
+1020	-476.459322	52	0.5
+1030	-476.4081564	52	0.5
+1040	-476.291636	52	0.5
+1050	-475.888332	52	0.5
+1060	-475.8696376	52	0.5
+1070	-475.7548161	52	0.5
+1080	-475.7086494	52	0.5
+1090	-475.5559949	52	0.5
+1100	-475.5300788	52	0.5
+1110	-475.500073	52	0.5
+1120	-475.4765151	52	0.5
+1130	-475.463997	52	0.5
+1140	-475.4495804	52	0.5
+1150	-475.3633906	52	0.5
+1160	-475.3418176	52	0.5
+1170	-475.2900679	52	0.5
+1180	-475.2697144	52	0.5
+1190	-475.2430175	52	0.5
+1200	-475.2138665	52	0.5
+1210	-475.1636354	52	0.5
+1220	-475.1389639	52	0.5
+1230	-475.1099599	52	0.5
+1240	-475.0645556	52	0.5
+1250	-475.045771	52	0.5
+1260	-475.0351824	52	0.5
+1270	-474.9847364	52	0.5
+1280	-474.9847364	52	0.5
+1290	-474.9107913	52	0.5
+1300	-474.8837115	52	0.5
+1310	-474.8808313	52	0.5
+1320	-474.8275977	52	0.5
+1330	-474.8253746	52	0.5
+1340	-474.7998036	53	0.5
+1350	-474.7462896	53	0.5
+1360	-474.7240372	53	0.5
+1370	-474.7189923	53	0.5
+1380	-474.6986312	53	0.5
+1390	-474.6603943	53	0.5
+1400	-474.6603943	53	0.5
+1410	-474.6042325	53	0.5
+1420	-474.588888	53	0.5
+1430	-474.5608814	53	0.5
+1440	-474.5342498	53	0.5
+1450	-474.4739424	53	0.5
+1460	-474.4437502	53	0.5
+1470	-474.443428	53	0.5
+1480	-474.443428	53	0.5
+1490	-474.4207609	53	0.5
+1500	-474.381352	53	0.5
+1510	-474.3788409	53	0.5
+1520	-474.3665047	53	0.5
+1530	-474.3454001	53	0.5
+1540	-474.3449999	53	0.5
+1550	-474.2963513	53	0.5
+1560	-474.2963513	53	0.5
+1570	-474.2349593	53	0.5
+1580	-474.1848791	53	0.5
+1590	-474.1844164	53	0.5
+1600	-474.1657812	53	0.5
+1610	-474.0404578	53	0.451
+1620	-474.0257524	53	0.451
+1630	-474.0234386	53	0.451
+1640	-474.0146599	53	0.451
+1650	-473.9883932	53	0.451
+1660	-473.972953	53	0.451
+1670	-473.972953	53	0.451
+1680	-473.9503471	53	0.451
+1690	-473.9471636	53	0.451
+1700	-473.9456498	53	0.451
+1710	-473.8969626	53	0.451
+1720	-473.8846455	53	0.451
+1730	-473.8716561	53	0.451
+1740	-473.8643064	53	0.451
+1750	-473.8642085	53	0.451
+1760	-473.8566776	53	0.451
+1770	-473.8566662	53	0.451
+1780	-473.8174001	53	0.451
+1790	-473.8144021	53	0.451
+1800	-473.8144021	53	0.451
+1810	-473.8143644	53	0.451
+1820	-473.7923941	53	0.451
+1830	-473.7923941	53	0.451
+1840	-473.7670716	53	0.451
+1850	-473.7492231	53	0.451
+1860	-473.7364673	53	0.451
+1870	-473.7359645	53	0.451
+1880	-473.7298318	53	0.451
+1890	-473.6495226	53	0.451
+1900	-473.6241972	53	0.451
+1910	-473.5944715	54	0.451
+1920	-473.5905923	54	0.451
+1930	-473.5867983	54	0.451
+1940	-473.5867983	54	0.451
+1950	-473.5853992	54	0.451
+1960	-473.2794832	54	0.451
+1970	-473.2774465	54	0.451
+1980	-473.2742605	54	0.451
+1990	-473.2547139	54	0.451
+2000	-473.2477978	54	0.451
+2010	-473.2457343	54	0.451
+2020	-473.2415638	54	0.451
+2030	-473.2374267	54	0.451
+2040	-473.2109969	54	0.451
+2050	-473.1953693	54	0.451
+2060	-473.1686517	54	0.451
+2070	-473.145267	54	0.451
+2080	-473.1425279	54	0.451
+2090	-473.1354692	54	0.451
+2100	-473.1190089	54	0.451
+2110	-473.1190089	54	0.451
+2120	-473.1142546	54	0.451
+2130	-473.1110214	54	0.451
+2140	-473.1047331	54	0.451
+2150	-473.0969859	54	0.451
+2160	-473.0947816	54	0.451
+2170	-473.0867178	54	0.451
+2180	-473.0865252	54	0.451
+2190	-473.0817482	54	0.451
+2200	-473.078588	54	0.451
+2210	-473.0746421	54	0.451
+2220	-473.0687712	54	0.451
+2230	-473.0661378	54	0.451
+2240	-473.0661378	54	0.451
+2250	-473.0509592	54	0.451
+2260	-473.0340493	54	0.451
+2270	-473.0302799	54	0.451
+2280	-473.0219114	54	0.451
+2290	-473.0142612	54	0.451
+2300	-473.0142612	54	0.451
+2310	-473.003992	54	0.451
+2320	-473.003992	54	0.451
+2330	-473.0013534	54	0.451
+2340	-472.9931298	54	0.451
+2350	-472.9931298	54	0.451
+2360	-472.9931298	54	0.451
+2370	-472.9863563	54	0.451
+2380	-472.9855903	54	0.451
+2390	-472.983841	54	0.451
+2400	-472.973248	54	0.451
+2410	-472.9671034	54	0.402
+2420	-472.9670616	54	0.402
+2430	-472.9670616	54	0.402
+2440	-472.9516419	54	0.402
+2450	-472.9496449	54	0.402
+2460	-472.9496449	54	0.402
+2470	-472.9424663	54	0.402
+2480	-472.9361574	55	0.402
+2490	-472.9272047	55	0.402
+2500	-472.9234239	55	0.402
+2510	-472.9194872	55	0.402
+2520	-472.9193324	55	0.402
+2530	-472.9152991	55	0.402
+2540	-472.912924	55	0.402
+2550	-472.912924	55	0.402
+2560	-472.9124928	55	0.402
+2570	-472.9095818	55	0.402
+2580	-472.8987278	55	0.402
+2590	-472.8927029	55	0.402
+2600	-472.8917749	55	0.402
+2610	-472.8852467	55	0.402
+2620	-472.8846149	55	0.402
+2630	-472.8846149	55	0.402
+2640	-472.8846149	55	0.402
+2650	-472.8839569	55	0.402
+2660	-472.8793054	55	0.402
+2670	-472.8776477	55	0.402
+2680	-472.8776477	55	0.402
+2690	-472.8749897	55	0.402
+2700	-472.8749897	55	0.402
+2710	-472.8705428	55	0.402
+2720	-472.866596	55	0.402
+2730	-472.8647276	55	0.402
+2740	-472.8645845	55	0.402
+2750	-472.8471655	55	0.402
+2760	-472.8391282	55	0.402
+2770	-472.8337573	55	0.402
+2780	-472.8295643	55	0.402
+2790	-472.8239833	55	0.402
+2800	-472.8232066	55	0.402
+2810	-472.8203265	55	0.402
+2820	-472.8201332	55	0.402
+2830	-472.817463	55	0.402
+2840	-472.8155973	55	0.402
+2850	-472.8090815	55	0.402
+2860	-472.8054689	55	0.402
+2870	-472.8053329	55	0.402
+2880	-472.8052109	55	0.402
+2890	-472.8052109	55	0.402
+2900	-472.8045901	55	0.402
+2910	-472.7979015	55	0.353
+2920	-472.796546	55	0.353
+2930	-472.7956616	55	0.353
+2940	-472.7947087	55	0.353
+2950	-472.7947087	55	0.353
+2960	-472.7947087	55	0.353
+2970	-472.7939085	55	0.353
+2980	-472.7939085	55	0.353
+2990	-472.7939085	55	0.353
+3000	-472.7937405	55	0.353
+3010	-472.7894532	55	0.353
+3020	-472.7894456	55	0.353
+3030	-472.7860424	56	0.353
+3040	-472.7784694	56	0.353
+3050	-472.777762	56	0.353
+3060	-472.777762	56	0.353
+3070	-472.7764128	56	0.353
+3080	-472.7764128	56	0.353
+3090	-472.768794	56	0.353
+3100	-472.7610784	56	0.353
+3110	-472.7610784	56	0.353
+3120	-472.7610784	56	0.353
+3130	-472.7610784	56	0.353
+3140	-472.7473083	56	0.353
+3150	-472.7458023	56	0.353
+3160	-472.7458023	56	0.353
+3170	-472.7456769	56	0.353
+3180	-472.7400439	56	0.353
+3190	-472.7400439	56	0.353
+3200	-472.7355529	56	0.353
+3210	-472.7331126	56	0.353
+3220	-472.7330014	56	0.353
+3230	-472.7330014	56	0.353
+3240	-472.7323732	56	0.353
+3250	-472.7264277	56	0.353
+3260	-472.7216872	56	0.353
+3270	-472.7214146	56	0.353
+3280	-472.7197945	56	0.353
+3290	-472.7190942	56	0.353
+3300	-472.7169335	56	0.353
+3310	-472.7132727	56	0.353
+3320	-472.7116096	56	0.353
+3330	-472.7090115	56	0.353
+3340	-472.7090115	56	0.353
+3350	-472.7045594	56	0.353
+3360	-472.7045594	56	0.353
+3370	-472.7045506	56	0.353
+3380	-472.7039449	56	0.353
+3390	-472.7039449	56	0.353
+3400	-472.7028233	56	0.353
+3410	-472.7023268	56	0.304
+3420	-472.6984875	56	0.304
+3430	-472.6946804	56	0.304
+3440	-472.69383	56	0.304
+3450	-472.6844814	56	0.304
+3460	-472.6828697	56	0.304
+3470	-472.682015	56	0.304
+3480	-472.6788258	56	0.304
+3490	-472.6788258	56	0.304
+3500	-472.6781663	56	0.304
+3510	-472.6745733	56	0.304
+3520	-472.6697112	56	0.304
+3530	-472.6697112	56	0.304
+3540	-472.660426	56	0.304
+3550	-472.6604184	56	0.304
+3560	-472.6601371	56	0.304
+3570	-472.6597069	56	0.304
+3580	-472.6583502	57	0.304
+3590	-472.6582805	57	0.304
+3600	-472.6582805	57	0.304
+3610	-472.6582652	57	0.304
+3620	-472.6578632	57	0.304
+3630	-472.6577626	57	0.304
+3640	-472.6577626	57	0.304
+3650	-472.6577529	57	0.304
+3660	-472.6566766	57	0.304
+3670	-472.6566766	57	0.304
+3680	-472.6565251	57	0.304
+3690	-472.6565251	57	0.304
+3700	-472.6535413	57	0.304
+3710	-472.6535413	57	0.304
+3720	-472.6535413	57	0.304
+3730	-472.6535413	57	0.304
+3740	-472.6465146	57	0.304
+3750	-472.6463961	57	0.304
+3760	-472.6430908	57	0.304
+3770	-472.6394752	57	0.304
+3780	-472.636827	57	0.304
+3790	-472.6366536	57	0.304
+3800	-472.6365651	57	0.304
+3810	-472.6365651	57	0.304
+3820	-472.635778	57	0.304
+3830	-472.635778	57	0.304
+3840	-472.635778	57	0.304
+3850	-472.6357668	57	0.304
+3860	-472.6274531	57	0.304
+3870	-472.6268056	57	0.304
+3880	-472.6268056	57	0.304
+3890	-472.6268056	57	0.304
+3900	-472.6268056	57	0.304
+3910	-472.6267724	57	0.255
+3920	-472.626061	57	0.255
+3930	-472.626061	57	0.255
+3940	-472.6257714	57	0.255
+3950	-472.6227926	57	0.255
+3960	-472.6224333	57	0.255
+3970	-472.6224333	57	0.255
+3980	-472.6163949	57	0.255
+3990	-472.6162644	57	0.255
+4000	-472.6162644	57	0.255
+4010	-472.6162644	57	0.255
+4020	-472.6150328	57	0.255
+4030	-472.6150328	57	0.255
+4040	-472.6114641	57	0.255
+4050	-472.6066654	57	0.255
+4060	-472.6060837	57	0.255
+4070	-472.6053308	57	0.255
+4080	-472.6023137	57	0.255
+4090	-472.6023137	57	0.255
+4100	-472.596383	57	0.255
+4110	-472.5880311	58	0.255
+4120	-472.5880311	58	0.255
+4130	-472.5834584	58	0.255
+4140	-472.5818591	58	0.255
+4150	-472.5814197	58	0.255
+4160	-472.5814197	58	0.255
+4170	-472.5802997	58	0.255
+4180	-472.5802907	58	0.255
+4190	-472.5802456	58	0.255
+4200	-472.5787493	58	0.255
+4210	-472.5787493	58	0.255
+4220	-472.5755713	58	0.255
+4230	-472.5754442	58	0.255
+4240	-472.5746179	58	0.255
+4250	-472.5746159	58	0.255
+4260	-472.5707745	58	0.255
+4270	-472.5698398	58	0.255
+4280	-472.5698398	58	0.255
+4290	-472.5698398	58	0.255
+4300	-472.5698398	58	0.255
+4310	-472.5698398	58	0.255
+4320	-472.5659558	58	0.255
+4330	-472.5659558	58	0.255
+4340	-472.5658327	58	0.255
+4350	-472.559893	58	0.255
+4360	-472.5562896	58	0.255
+4370	-472.5539479	58	0.255
+4380	-472.551614	58	0.255
+4390	-472.54718	58	0.255
+4400	-472.54718	58	0.255
+4410	-472.5470547	58	0.206
+4420	-472.5470547	58	0.206
+4430	-472.5466861	58	0.206
+4440	-472.5466861	58	0.206
+4450	-472.5464233	58	0.206
+4460	-472.5464233	58	0.206
+4470	-472.5463429	58	0.206
+4480	-472.5463313	58	0.206
+4490	-472.5450103	58	0.206
+4500	-472.5449066	58	0.206
+4510	-472.5449066	58	0.206
+4520	-472.5449066	58	0.206
+4530	-472.5449066	58	0.206
+4540	-472.544165	58	0.206
+4550	-472.5408865	58	0.206
+4560	-472.5407635	58	0.206
+4570	-472.5389478	58	0.206
+4580	-472.5389478	58	0.206
+4590	-472.5389478	58	0.206
+4600	-472.5387687	58	0.206
+4610	-472.5387687	58	0.206
+4620	-472.5387687	58	0.206
+4630	-472.5376348	58	0.206
+4640	-472.5376342	58	0.206
+4650	-472.5359471	59	0.206
+4660	-472.5354068	59	0.206
+4670	-472.5354068	59	0.206
+4680	-472.5354068	59	0.206
+4690	-472.5333623	59	0.206
+4700	-472.5310987	59	0.206
+4710	-472.529048	59	0.206
+4720	-472.529048	59	0.206
+4730	-472.529048	59	0.206
+4740	-472.529048	59	0.206
+4750	-472.5288906	59	0.206
+4760	-472.5288906	59	0.206
+4770	-472.5288906	59	0.206
+4780	-472.5288906	59	0.206
+4790	-472.5288906	59	0.206
+4800	-472.5288906	59	0.206
+4810	-472.5287783	59	0.206
+4820	-472.5273548	59	0.206
+4830	-472.5273548	59	0.206
+4840	-472.5273548	59	0.206
+4850	-472.5273548	59	0.206
+4860	-472.5271066	59	0.206
+4870	-472.5270856	59	0.206
+4880	-472.5269054	59	0.206
+4890	-472.5267147	59	0.206
+4900	-472.5261656	59	0.206
+4910	-472.524604	59	0.157
+4920	-472.524604	59	0.157
+4930	-472.5243242	59	0.157
+4940	-472.5029382	59	0.157
+4950	-472.5022666	59	0.157
+4960	-472.5022666	59	0.157
+4970	-472.5022666	59	0.157
+4980	-472.5022666	59	0.157
+4990	-472.5022666	59	0.157
+5000	-472.5022546	59	0.157
+5010	-472.5012549	59	0.157
+5020	-472.5012549	59	0.157
+5030	-472.5012549	59	0.157
+5040	-472.500153	59	0.157
+5050	-472.4988693	59	0.157
+5060	-472.4982905	59	0.157
+5070	-472.4982668	59	0.157
+5080	-472.49639	59	0.157
+5090	-472.4963168	59	0.157
+5100	-472.4963168	59	0.157
+5110	-472.4963168	59	0.157
+5120	-472.4963168	59	0.157
+5130	-472.4962589	59	0.157
+5140	-472.4957439	59	0.157
+5150	-472.4957197	59	0.157
+5160	-472.4957186	59	0.157
+5170	-472.4957186	60	0.157
+5180	-472.4957156	60	0.157
+5190	-472.495322	60	0.157
+5200	-472.4951373	60	0.157
+5210	-472.4951373	60	0.157
+5220	-472.4950471	60	0.157
+5230	-472.4950471	60	0.157
+5240	-472.4936696	60	0.157
+5250	-472.4936696	60	0.157
+5260	-472.4936696	60	0.157
+5270	-472.4924122	60	0.157
+5280	-472.4922467	60	0.157
+5290	-472.4922467	60	0.157
+5300	-472.4922467	60	0.157
+5310	-472.4915713	60	0.157
+5320	-472.4915203	60	0.157
+5330	-472.4911216	60	0.157
+5340	-472.486375	60	0.157
+5350	-472.4863107	60	0.157
+5360	-472.4837152	60	0.157
+5370	-472.4826896	60	0.157
+5380	-472.4812214	60	0.157
+5390	-472.4812214	60	0.157
+5400	-472.4812209	60	0.157
+5410	-472.4792379	60	0.157
+5420	-472.4792379	60	0.157
+5430	-472.4792379	60	0.157
+5440	-472.4760483	60	0.157
+5450	-472.4744507	60	0.157
+5460	-472.4741473	60	0.157
+5470	-472.4741332	60	0.157
+5480	-472.4741332	60	0.157
+5490	-472.474082	60	0.157
+5500	-472.4718465	60	0.157
+5510	-472.471471	60	0.108
+5520	-472.4696375	60	0.108
+5530	-472.4693683	60	0.108
+5540	-472.4693683	60	0.108
+5550	-472.4688424	60	0.108
+5560	-472.4688424	60	0.108
+5570	-472.468676	60	0.108
+5580	-472.468676	60	0.108
+5590	-472.468676	60	0.108
+5600	-472.4684915	60	0.108
+5610	-472.4684915	60	0.108
+5620	-472.4684915	60	0.108
+5630	-472.4684915	60	0.108
+5640	-472.4683636	60	0.108
+5650	-472.4683636	60	0.108
+5660	-472.4683601	60	0.108
+5670	-472.4677973	60	0.108
+5680	-472.4673122	61	0.108
+5690	-472.4673122	61	0.108
+5700	-472.4673122	61	0.108
+5710	-472.4673066	61	0.108
+5720	-472.4673066	61	0.108
+5730	-472.4673066	61	0.108
+5740	-472.4672144	61	0.108
+5750	-472.4664626	61	0.108
+5760	-472.4664626	61	0.108
+5770	-472.4664299	61	0.108
+5780	-472.4662182	61	0.108
+5790	-472.4662182	61	0.108
+5800	-472.4662182	61	0.108
+5810	-472.466217	61	0.108
+5820	-472.4658847	61	0.108
+5830	-472.4658847	61	0.108
+5840	-472.4657084	61	0.108
+5850	-472.4652911	61	0.108
+5860	-472.4652911	61	0.108
+5870	-472.4652786	61	0.108
+5880	-472.4640346	61	0.108
+5890	-472.4640346	61	0.108
+5900	-472.4640346	61	0.108
+5910	-472.4638545	61	0.108
+5920	-472.4636742	61	0.108
+5930	-472.4636742	61	0.108
+5940	-472.4636742	61	0.108
+5950	-472.4636742	61	0.108
+5960	-472.4636735	61	0.108
+5970	-472.4633516	61	0.108
+5980	-472.4630898	61	0.108
+5990	-472.4629516	61	0.108
+6000	-472.4629516	61	0.108
+6010	-472.4629465	61	0.059
+6020	-472.4628014	61	0.059
+6030	-472.4627911	61	0.059
+6040	-472.4627911	61	0.059
+6050	-472.4627911	61	0.059
+6060	-472.4627911	61	0.059
+6070	-472.4627269	61	0.059
+6080	-472.4625302	61	0.059
+6090	-472.4624987	61	0.059
+6100	-472.4624987	61	0.059
+6110	-472.4624987	61	0.059
+6120	-472.4624022	61	0.059
+6130	-472.462221	61	0.059
+6140	-472.4620319	61	0.059
+6150	-472.4620319	61	0.059
+6160	-472.4617067	62	0.059
+6170	-472.461253	62	0.059
+6180	-472.461251	62	0.059
+6190	-472.461251	62	0.059
+6200	-472.4612339	62	0.059
+6210	-472.4610737	62	0.059
+6220	-472.4610726	62	0.059
+6230	-472.4610636	62	0.059
+6240	-472.4610206	62	0.059
+6250	-472.4610206	62	0.059
+6260	-472.4610206	62	0.059
+6270	-472.4598197	62	0.059
+6280	-472.4598197	62	0.059
+6290	-472.4563767	62	0.059
+6300	-472.4563376	62	0.059
+6310	-472.4563376	62	0.059
+6320	-472.4552437	62	0.059
+6330	-472.4552437	62	0.059
+6340	-472.4546778	62	0.059
+6350	-472.4546769	62	0.059
+6360	-472.4541724	62	0.059
+6370	-472.4541724	62	0.059
+6380	-472.4541231	62	0.059
+6390	-472.4541231	62	0.059
+6400	-472.4541231	62	0.059
+6410	-472.4541226	62	0.059
+6420	-472.4541226	62	0.059
+6430	-472.4540578	62	0.059
+6440	-472.4539801	62	0.059
+6450	-472.4539562	62	0.059
+6460	-472.4539562	62	0.059
+6470	-472.4539561	62	0.059
+6480	-472.4538393	62	0.059
+6490	-472.4538393	62	0.059
+6500	-472.4538393	62	0.059
+6510	-472.416034	62	0.01
+6520	-472.4159186	62	0.01
+6530	-472.4159186	62	0.01
+6540	-472.4159186	62	0.01
+6550	-472.4159149	62	0.01
+6560	-472.4159149	62	0.01
+6570	-472.4159149	62	0.01
+6580	-472.415906	63	0.01
+6590	-472.415906	63	0.01
+6600	-472.4158302	63	0.01
+6610	-472.4158302	63	0.01
+6620	-472.4158302	63	0.01
+6630	-472.4158302	63	0.01
+6640	-472.4158302	63	0.01
+6650	-472.4158302	63	0.01
+6660	-472.4158302	63	0.01
+6670	-472.4158268	63	0.01
+6680	-472.4158268	63	0.01
+6690	-472.4158268	63	0.01
+6700	-472.4158268	63	0.01
+6710	-472.4158268	63	0.01
+6720	-472.4157551	63	0.01
+6730	-472.4157551	63	0.01
+6740	-472.4157551	63	0.01
+6750	-472.4157551	63	0.01
+6760	-472.4157551	63	0.01
+6770	-472.4153939	63	0.01
+6780	-472.4153832	63	0.01
+6790	-472.4153832	63	0.01
+6800	-472.4153763	63	0.01
+6810	-472.4153757	63	0.01
+6820	-472.4153756	63	0.01
+6830	-472.4153756	63	0.01
+6840	-472.4153347	63	0.01
+6850	-472.4151511	63	0.01
+6860	-472.4151511	63	0.01
+6870	-472.4151511	63	0.01
+6880	-472.4151511	63	0.01
+6890	-472.4151417	63	0.01
+6900	-472.4151417	64	0.01
+6910	-472.4150129	64	0.01
+6920	-472.4150129	64	0.01
+6930	-472.4150129	64	0.01
+6940	-472.4150129	64	0.01
+6950	-472.4150129	64	0.01
+6960	-472.4149098	64	0.01
+6970	-472.4149098	64	0.01
+6980	-472.4149088	64	0.01
+6990	-472.4146558	64	0.01
+7000	-472.4146558	64	0.01
+7010	-472.4141563	64	0.01
+7020	-472.4141563	64	0.01
+7030	-472.4141563	64	0.01
+7040	-472.4141563	64	0.01
+7050	-472.4141563	64	0.01
+7060	-472.4141558	64	0.01
+7070	-472.4141558	64	0.01
+7080	-472.4141558	64	0.01
+7090	-472.4141558	64	0.01
+7100	-472.4138912	64	0.01
+7110	-472.4138912	64	0.01
+7120	-472.4138912	64	0.01
+7130	-472.4138912	64	0.01
+7140	-472.4138463	64	0.01
+7150	-472.4138202	64	0.01
+7160	-472.41382	64	0.01
+7170	-472.41382	64	0.01
+7180	-472.4136875	64	0.01
+7190	-472.4136865	64	0.01
+7200	-472.4136865	64	0.01
+7210	-472.4136865	64	0.01
+7220	-472.4136864	65	0.01
+7230	-472.413581	65	0.01
+7240	-472.4135795	65	0.01
+7250	-472.4135795	65	0.01
+7260	-472.4135107	65	0.01
+7270	-472.4135107	65	0.01
+7280	-472.4135107	65	0.01
+7290	-472.4131432	65	0.01
+7300	-472.4130297	65	0.01
+7310	-472.4130175	65	0.01
+7320	-472.4129987	65	0.01
+7330	-472.4129805	65	0.01
+7340	-472.4129805	65	0.01
+7350	-472.4129798	65	0.01
+7360	-472.4129798	65	0.01
+7370	-472.4129798	65	0.01
+7380	-472.4129793	65	0.01
+7390	-472.4129793	65	0.01
+7400	-472.4129793	65	0.01
+7410	-472.4129763	65	0.01
+7420	-472.4129763	65	0.01
+7430	-472.4129461	65	0.01
+7440	-472.4129461	65	0.01
+7450	-472.4129461	65	0.01
+7460	-472.4107878	65	0.01
+7470	-472.4107271	65	0.01
+7480	-472.4107271	65	0.01
+7490	-472.4106236	65	0.01
+7500	-472.4106236	65	0.01
+7510	-472.4106236	65	0.01
+7520	-472.4106236	65	0.01
+7530	-472.4106194	65	0.01
+7540	-472.4106194	65	0.01
+7550	-472.4106194	66	0.01
+7560	-472.4105417	66	0.01
+7570	-472.4105417	66	0.01
+7580	-472.4104708	66	0.01
+7590	-472.4104708	66	0.01
+7600	-472.4104708	66	0.01
+7610	-472.4104708	66	0.01
+7620	-472.4103975	66	0.01
+7630	-472.4103975	66	0.01
+7640	-472.4103975	66	0.01
+7650	-472.4103378	66	0.01
+7660	-472.4103378	66	0.01
+7670	-472.4103378	66	0.01
+7680	-472.4103378	66	0.01
+7690	-472.4102793	66	0.01
+7700	-472.4102793	66	0.01
+7710	-472.4102793	66	0.01
+7720	-472.4102725	66	0.01
+7730	-472.4102725	66	0.01
+7740	-472.4102725	66	0.01
+7750	-472.4102725	66	0.01
+7760	-472.4102157	66	0.01
+7770	-472.4101411	66	0.01
+7780	-472.4101411	66	0.01
+7790	-472.4101411	66	0.01
+7800	-472.4101411	66	0.01
+7810	-472.4101225	66	0.01
+7820	-472.4101224	66	0.01
+7830	-472.410121	66	0.01
+7840	-472.410121	66	0.01
+7850	-472.410121	66	0.01
+7860	-472.410121	66	0.01
+7870	-472.4099908	67	0.01
+7880	-472.4098332	67	0.01
+7890	-472.4098332	67	0.01
+7900	-472.4098332	67	0.01
+7910	-472.4098332	67	0.01
+7920	-472.4096815	67	0.01
+7930	-472.4096338	67	0.01
+7940	-472.4096338	67	0.01
+7950	-472.4096332	67	0.01
+7960	-472.4096332	67	0.01
+7970	-472.4096332	67	0.01
+7980	-472.4094548	67	0.01
+7990	-472.4094548	67	0.01
+8000	-472.4093795	67	0.01
+8010	-472.4093602	67	0.01
+8020	-472.4093602	67	0.01
+8030	-472.4093602	67	0.01
+8040	-472.4093602	67	0.01
+8050	-472.4093396	67	0.01
+8060	-472.4093396	67	0.01
+8070	-472.4093396	67	0.01
+8080	-472.4093396	67	0.01
+8090	-472.4093396	67	0.01
+8100	-472.4093396	67	0.01
+8110	-472.4093396	67	0.01
+8120	-472.4093395	67	0.01
+8130	-472.4093395	67	0.01
+8140	-472.4092509	67	0.01
+8150	-472.4092509	67	0.01
+8160	-472.4092509	67	0.01
+8170	-472.4092509	67	0.01
+8180	-472.4092509	67	0.01
+8190	-472.4092509	67	0.01
+8200	-472.4092509	68	0.01
+8210	-472.4092509	68	0.01
+8220	-472.4092021	68	0.01
+8230	-472.4092021	68	0.01
+8240	-472.4090146	68	0.01
+8250	-472.4090146	68	0.01
+8260	-472.4090146	68	0.01
+8270	-472.4090146	68	0.01
+8280	-472.4090146	68	0.01
+8290	-472.4090146	68	0.01
+8300	-472.4090146	68	0.01
+8310	-472.4090146	68	0.01
+8320	-472.408917	68	0.01
+8330	-472.4088548	68	0.01
+8340	-472.4088548	68	0.01
+8350	-472.4088548	68	0.01
+8360	-472.4088548	68	0.01
+8370	-472.4088502	68	0.01
+8380	-472.4088502	68	0.01
+8390	-472.4088501	68	0.01
+8400	-472.4088501	68	0.01
+8410	-472.4088494	68	0.01
+8420	-472.4086616	68	0.01
+8430	-472.4086616	68	0.01
+8440	-472.4086616	68	0.01
+8450	-472.4086616	68	0.01
+8460	-472.4086616	68	0.01
+8470	-472.4086616	68	0.01
+8480	-472.4086616	68	0.01
+8490	-472.4086616	68	0.01
+8500	-472.4086615	68	0.01
+8510	-472.4086615	68	0.01
+8520	-472.4086615	69	0.01
+8530	-472.4086615	69	0.01
+8540	-472.4086615	69	0.01
+8550	-472.4086615	69	0.01
+8560	-472.4085776	69	0.01
+8570	-472.4085764	69	0.01
+8580	-472.4085764	69	0.01
+8590	-472.4085764	69	0.01
+8600	-472.4085764	69	0.01
+8610	-472.4085763	69	0.01
+8620	-472.4085759	69	0.01
+8630	-472.4085759	69	0.01
+8640	-472.4085759	69	0.01
+8650	-472.4085549	69	0.01
+8660	-472.4085549	69	0.01
+8670	-472.4085107	69	0.01
+8680	-472.4085107	69	0.01
+8690	-472.4085107	69	0.01
+8700	-472.408477	69	0.01
+8710	-472.408477	69	0.01
+8720	-472.408477	69	0.01
+8730	-472.408477	69	0.01
+8740	-472.4084225	69	0.01
+8750	-472.4084225	69	0.01
+8760	-472.4084225	69	0.01
+8770	-472.4084225	69	0.01
+8780	-472.4084225	69	0.01
+8790	-472.4084225	69	0.01
+8800	-472.4084225	69	0.01
+8810	-472.4084225	69	0.01
+8820	-472.4084225	69	0.01
+8830	-472.4084225	69	0.01
+8840	-472.4084142	70	0.01
+8850	-472.4084142	70	0.01
+8860	-472.4084142	70	0.01
+8870	-472.4084142	70	0.01
+8880	-472.4083072	70	0.01
+8890	-472.4083072	70	0.01
+8900	-472.4083072	70	0.01
+8910	-472.4083072	70	0.01
+8920	-472.4083072	70	0.01
+8930	-472.4082611	70	0.01
+8940	-472.40826	70	0.01
+8950	-472.4081498	70	0.01
+8960	-472.4081498	70	0.01
+8970	-472.4081498	70	0.01
+8980	-472.4081498	70	0.01
+8990	-472.4081498	70	0.01
+9000	-472.4081498	70	0.01
+9010	-472.4081498	70	0.01
+9020	-472.4081498	70	0.01
+9030	-472.4081498	70	0.01
+9040	-472.4081498	70	0.01
+9050	-472.4081264	70	0.01
+9060	-472.4081264	70	0.01
+9070	-472.4081264	70	0.01
+9080	-472.4080474	70	0.01
+9090	-472.4080474	70	0.01
+9100	-472.4080474	70	0.01
+9110	-472.4080474	70	0.01
+9120	-472.4080474	70	0.01
+9130	-472.4080474	70	0.01
+9140	-472.4080474	70	0.01
+9150	-472.4080474	70	0.01
+9160	-472.4080474	70	0.01
+9170	-472.4080473	71	0.01
+9180	-472.4080473	71	0.01
+9190	-472.4080473	71	0.01
+9200	-472.4080473	71	0.01
+9210	-472.4080471	71	0.01
+9220	-472.4080471	71	0.01
+9230	-472.4080471	71	0.01
+9240	-472.4080471	71	0.01
+9250	-472.4080471	71	0.01
+9260	-472.4080471	71	0.01
+9270	-472.4080463	71	0.01
+9280	-472.4080458	71	0.01
+9290	-472.4078429	71	0.01
+9300	-472.4078429	71	0.01
+9310	-472.4078429	71	0.01
+9320	-472.4077429	71	0.01
+9330	-472.4077429	71	0.01
+9340	-472.4077429	71	0.01
+9350	-472.4077424	71	0.01
+9360	-472.4077424	71	0.01
+9370	-472.4077403	71	0.01
+9380	-472.4075744	71	0.01
+9390	-472.4075744	71	0.01
+9400	-472.4075744	71	0.01
+9410	-472.4075744	71	0.01
+9420	-472.4075744	71	0.01
+9430	-472.4075744	71	0.01
+9440	-472.4075365	71	0.01
+9450	-472.4075365	71	0.01
+9460	-472.4073854	71	0.01
+9470	-472.4072349	71	0.01
+9480	-472.4072349	71	0.01
+9490	-472.4072349	72	0.01
+9500	-472.4072348	72	0.01
+9510	-472.4072345	72	0.01
+9520	-472.4072345	72	0.01
+9530	-472.4072333	72	0.01
+9540	-472.4071593	72	0.01
+9550	-472.4071593	72	0.01
+9560	-472.4071593	72	0.01
+9570	-472.4071593	72	0.01
+9580	-472.4071469	72	0.01
+9590	-472.4071469	72	0.01
+9600	-472.4071218	72	0.01
+9610	-472.4071218	72	0.01
+9620	-472.4071218	72	0.01
+9630	-472.4070378	72	0.01
+9640	-472.4070378	72	0.01
+9650	-472.4069106	72	0.01
+9660	-472.4069106	72	0.01
+9670	-472.4069106	72	0.01
+9680	-472.4068003	72	0.01
+9690	-472.4067126	72	0.01
+9700	-472.4067126	72	0.01
+9710	-472.4067126	72	0.01
+9720	-472.4067108	72	0.01
+9730	-472.4067108	72	0.01
+9740	-472.4067055	72	0.01
+9750	-472.4067055	72	0.01
+9760	-472.4067055	72	0.01
+9770	-472.4067055	72	0.01
+9780	-472.4066866	72	0.01
+9790	-472.4066866	72	0.01
+9800	-472.4066866	73	0.01
+9810	-472.4066866	73	0.01
+9820	-472.4066866	73	0.01
+9830	-472.4066866	73	0.01
+9840	-472.4066866	73	0.01
+9850	-472.4066866	73	0.01
+9860	-472.4066866	73	0.01
+9870	-472.4066796	73	0.01
+9880	-472.4066796	73	0.01
+9890	-472.4066796	73	0.01
+9900	-472.4066796	73	0.01
+9910	-472.4066796	73	0.01
+9920	-472.4066796	73	0.01
+9930	-472.4066796	73	0.01
+9940	-472.4066796	73	0.01
+9950	-472.4066796	73	0.01
+9960	-472.4066796	73	0.01
+9970	-472.4066796	73	0.01
+9980	-472.4065975	73	0.01
+9990	-472.4065975	73	0.01
+10000	-472.4065975	73	0.01
+10010	-472.4065975	73	0.01
+10020	-472.4064164	73	0.01
+10030	-472.4064164	73	0.01
+10040	-472.4064164	73	0.01
+10050	-472.4064164	73	0.01
+10060	-472.4063061	73	0.01
+10070	-472.4063061	73	0.01
+10080	-472.4062981	73	0.01
+10090	-472.4062981	73	0.01
+10100	-472.4062981	73	0.01
+10110	-472.4062981	73	0.01
+10120	-472.4062981	74	0.01
+10130	-472.4062981	74	0.01
+10140	-472.4062981	74	0.01
+10150	-472.4062981	74	0.01
+10160	-472.4061674	74	0.01
+10170	-472.4061674	74	0.01
+10180	-472.4061638	74	0.01
+10190	-472.4060619	74	0.01
+10200	-472.4060619	74	0.01
+10210	-472.4060618	74	0.01
+10220	-472.4060618	74	0.01
+10230	-472.4060618	74	0.01
+10240	-472.4060618	74	0.01
+10250	-472.4060618	74	0.01
+10260	-472.4060618	74	0.01
+10270	-472.40604	74	0.01
+10280	-472.40604	74	0.01
+10290	-472.40604	74	0.01
+10300	-472.40604	74	0.01
+10310	-472.40604	74	0.01
+10320	-472.4060399	74	0.01
+10330	-472.4060399	74	0.01
+10340	-472.4060399	74	0.01
+10350	-472.4060399	74	0.01
+10360	-472.4060399	74	0.01
+10370	-472.4060399	74	0.01
+10380	-472.4060399	74	0.01
+10390	-472.4060399	74	0.01
+10400	-472.4060399	74	0.01
+10410	-472.4060399	74	0.01
+10420	-472.4060399	74	0.01
+10430	-472.4060399	74	0.01
+10440	-472.4060399	75	0.01
+10450	-472.4060399	75	0.01
+10460	-472.4060399	75	0.01
+10470	-472.4059999	75	0.01
+10480	-472.4059999	75	0.01
+10490	-472.4059999	75	0.01
+10500	-472.4059923	75	0.01
+10510	-472.4059923	75	0.01
+10520	-472.4059923	75	0.01
+10530	-472.4059923	75	0.01
+10540	-472.4059923	75	0.01
+10550	-472.4059923	75	0.01
+10560	-472.4059923	75	0.01
+10570	-472.4059923	75	0.01
+10580	-472.40595	75	0.01
+10590	-472.405831	75	0.01
+10600	-472.405831	75	0.01
+10610	-472.405831	75	0.01
+10620	-472.405831	75	0.01
+10630	-472.405831	75	0.01
+10640	-472.405831	75	0.01
+10650	-472.405831	75	0.01
+10660	-472.405831	75	0.01
+10670	-472.405831	75	0.01
+10680	-472.4057911	75	0.01
+10690	-472.4057911	75	0.01
+10700	-472.4057911	75	0.01
+10710	-472.4057573	75	0.01
+10720	-472.4057061	75	0.01
+10730	-472.4057061	75	0.01
+10740	-472.4056998	75	0.01
+10750	-472.4056998	75	0.01
+10760	-472.4056998	76	0.01
+10770	-472.4056998	76	0.01
+10780	-472.4056998	76	0.01
+10790	-472.4056986	76	0.01
+10800	-472.4055763	76	0.01
+10810	-472.4055763	76	0.01
+10820	-472.4055763	76	0.01
+10830	-472.4055763	76	0.01
+10840	-472.4055763	76	0.01
+10850	-472.4055763	76	0.01
+10860	-472.4055406	76	0.01
+10870	-472.40554	76	0.01
+10880	-472.40554	76	0.01
+10890	-472.40554	76	0.01
+10900	-472.40554	76	0.01
+10910	-472.40554	76	0.01
+10920	-472.40554	76	0.01
+10930	-472.405359	76	0.01
+10940	-472.405359	76	0.01
+10950	-472.405359	76	0.01
+10960	-472.405359	76	0.01
+10970	-472.405359	76	0.01
+10980	-472.405359	76	0.01
+10990	-472.405359	76	0.01
+11000	-472.405359	76	0.01
+11010	-472.4052669	76	0.01
+11020	-472.4052669	76	0.01
+11030	-472.4052669	76	0.01
+11040	-472.4052669	76	0.01
+11050	-472.4052669	76	0.01
+11060	-472.4052669	76	0.01
+11070	-472.4052436	76	0.01
+11080	-472.4052436	77	0.01
+11090	-472.4052436	77	0.01
+11100	-472.4052346	77	0.01
+11110	-472.4052346	77	0.01
+11120	-472.4052346	77	0.01
+11130	-472.4052346	77	0.01
+11140	-472.4052346	77	0.01
+11150	-472.4052346	77	0.01
+11160	-472.4052346	77	0.01
+11170	-472.4052346	77	0.01
+11180	-472.4052346	77	0.01
+11190	-472.4052346	77	0.01
+11200	-472.4052282	77	0.01
+11210	-472.4052175	77	0.01
+11220	-472.4052175	77	0.01
+11230	-472.4052175	77	0.01
+11240	-472.4052175	77	0.01
+11250	-472.4052175	77	0.01
+11260	-472.4051542	77	0.01
+11270	-472.4051542	77	0.01
+11280	-472.4051542	77	0.01
+11290	-472.4051542	77	0.01
+11300	-472.4051542	77	0.01
+11310	-472.4051519	77	0.01
+11320	-472.4051519	77	0.01
+11330	-472.4051519	77	0.01
+11340	-472.4051307	77	0.01
+11350	-472.4051307	77	0.01
+11360	-472.4051307	77	0.01
+11370	-472.4051307	77	0.01
+11380	-472.4051307	77	0.01
+11390	-472.4051307	77	0.01
+11400	-472.4051307	78	0.01
+11410	-472.4051307	78	0.01
+11420	-472.4051307	78	0.01
+11430	-472.4051307	78	0.01
+11440	-472.4051307	78	0.01
+11450	-472.4051307	78	0.01
+11460	-472.4050663	78	0.01
+11470	-472.4050663	78	0.01
+11480	-472.4050019	78	0.01
+11490	-472.4050019	78	0.01
+11500	-472.4050019	78	0.01
+11510	-472.4050019	78	0.01
+11520	-472.4050019	78	0.01
+11530	-472.4050019	78	0.01
+11540	-472.4050019	78	0.01
+11550	-472.4050019	78	0.01
+11560	-472.4050019	78	0.01
+11570	-472.4050019	78	0.01
+11580	-472.4050019	78	0.01
+11590	-472.4050019	78	0.01
+11600	-472.4050019	78	0.01
+11610	-472.4050019	78	0.01
+11620	-472.4050019	78	0.01
+11630	-472.4050007	78	0.01
+11640	-472.4050007	78	0.01
+11650	-472.4050001	78	0.01
+11660	-472.4050001	78	0.01
+11670	-472.4050001	78	0.01
+11680	-472.4049683	78	0.01
+11690	-472.4049683	78	0.01
+11700	-472.4049683	78	0.01
+11710	-472.4049683	78	0.01
+11720	-472.4049683	79	0.01
+11730	-472.4049683	79	0.01
+11740	-472.4049683	79	0.01
+11750	-472.4049683	79	0.01
+11760	-472.4049683	79	0.01
+11770	-472.4049683	79	0.01
+11780	-472.4049683	79	0.01
+11790	-472.4049683	79	0.01
+11800	-472.4049683	79	0.01
+11810	-472.4048648	79	0.01
+11820	-472.4046855	79	0.01
+11830	-472.4046855	79	0.01
+11840	-472.4046811	79	0.01
+11850	-472.4046811	79	0.01
+11860	-472.4046811	79	0.01
+11870	-472.4046811	79	0.01
+11880	-472.4046811	79	0.01
+11890	-472.4046386	79	0.01
+11900	-472.4046386	79	0.01
+11910	-472.4045776	79	0.01
+11920	-472.4045734	79	0.01
+11930	-472.4045734	79	0.01
+11940	-472.4045734	79	0.01
+11950	-472.4045176	79	0.01
+11960	-472.4045176	79	0.01
+11970	-472.4044686	79	0.01
+11980	-472.4044686	79	0.01
+11990	-472.4044686	79	0.01
+12000	-472.4044686	79	0.01
+12010	-472.4044686	79	0.01
+12020	-472.4044686	79	0.01
+12030	-472.4044686	80	0.01
+12040	-472.4044686	80	0.01
+12050	-472.4044565	80	0.01
+12060	-472.4044565	80	0.01
+12070	-472.4044565	80	0.01
+12080	-472.4044565	80	0.01
+12090	-472.4044565	80	0.01
+12100	-472.4044565	80	0.01
+12110	-472.4044565	80	0.01
+12120	-472.4044565	80	0.01
+12130	-472.4044565	80	0.01
+12140	-472.4044499	80	0.01
+12150	-472.4044499	80	0.01
+12160	-472.4044499	80	0.01
+12170	-472.404399	80	0.01
+12180	-472.404399	80	0.01
+12190	-472.4043954	80	0.01
+12200	-472.4043954	80	0.01
+12210	-472.4043954	80	0.01
+12220	-472.4043954	80	0.01
+12230	-472.4043954	80	0.01
+12240	-472.4043954	80	0.01
+12250	-472.4043954	80	0.01
+12260	-472.4043954	80	0.01
+12270	-472.4043954	80	0.01
+12280	-472.4043954	80	0.01
+12290	-472.4043954	80	0.01
+12300	-472.4043954	80	0.01
+12310	-472.4043954	80	0.01
+12320	-472.4043939	80	0.01
+12330	-472.4043918	80	0.01
+12340	-472.4043918	80	0.01
+12350	-472.4043918	81	0.01
+12360	-472.4043918	81	0.01
+12370	-472.4043363	81	0.01
+12380	-472.4043363	81	0.01
+12390	-472.4043363	81	0.01
+12400	-472.4043363	81	0.01
+12410	-472.4043363	81	0.01
+12420	-472.4043363	81	0.01
+12430	-472.4042861	81	0.01
+12440	-472.4042861	81	0.01
+12450	-472.4042861	81	0.01
+12460	-472.4042213	81	0.01
+12470	-472.4042213	81	0.01
+12480	-472.4042191	81	0.01
+12490	-472.4042191	81	0.01
+12500	-472.4039972	81	0.01
+12510	-472.4039972	81	0.01
+12520	-472.4039972	81	0.01
+12530	-472.4039972	81	0.01
+12540	-472.4039972	81	0.01
+12550	-472.4039972	81	0.01
+12560	-472.4039972	81	0.01
+12570	-472.4039972	81	0.01
+12580	-472.4039972	81	0.01
+12590	-472.4039972	81	0.01
+12600	-472.4039972	81	0.01
+12610	-472.4039972	81	0.01
+12620	-472.4039972	81	0.01
+12630	-472.4039972	81	0.01
+12640	-472.4039972	81	0.01
+12650	-472.4039972	81	0.01
+12660	-472.4039972	81	0.01
+12670	-472.4039972	81	0.01
+12680	-472.4039972	82	0.01
+12690	-472.4039972	82	0.01
+12700	-472.4039972	82	0.01
+12710	-472.4038995	82	0.01
+12720	-472.4038995	82	0.01
+12730	-472.4038995	82	0.01
+12740	-472.4038789	82	0.01
+12750	-472.4038789	82	0.01
+12760	-472.4038789	82	0.01
+12770	-472.4038096	82	0.01
+12780	-472.4038096	82	0.01
+12790	-472.4038096	82	0.01
+12800	-472.4038096	82	0.01
+12810	-472.4037888	82	0.01
+12820	-472.4037888	82	0.01
+12830	-472.4037888	82	0.01
+12840	-472.4037888	82	0.01
+12850	-472.4037888	82	0.01
+12860	-472.4037888	82	0.01
+12870	-472.4037888	82	0.01
+12880	-472.4037888	82	0.01
+12890	-472.4037888	82	0.01
+12900	-472.4037888	82	0.01
+12910	-472.4037888	82	0.01
+12920	-472.4037888	82	0.01
+12930	-472.4037888	82	0.01
+12940	-472.4037888	82	0.01
+12950	-472.4036794	82	0.01
+12960	-472.4036794	82	0.01
+12970	-472.4036794	82	0.01
+12980	-472.4036794	83	0.01
+12990	-472.4036794	83	0.01
+13000	-472.4036794	83	0.01
+13010	-472.4036244	83	0.01
+13020	-472.4036244	83	0.01
+13030	-472.4036244	83	0.01
+13040	-472.4036244	83	0.01
+13050	-472.4036103	83	0.01
+13060	-472.4036103	83	0.01
+13070	-472.4036103	83	0.01
+13080	-472.4035053	83	0.01
+13090	-472.4035053	83	0.01
+13100	-472.4035053	83	0.01
+13110	-472.403493	83	0.01
+13120	-472.403493	83	0.01
+13130	-472.403493	83	0.01
+13140	-472.4034312	83	0.01
+13150	-472.4034312	83	0.01
+13160	-472.4033657	83	0.01
+13170	-472.4033657	83	0.01
+13180	-472.4033657	83	0.01
+13190	-472.4033657	83	0.01
+13200	-472.4033313	83	0.01
+13210	-472.4033313	83	0.01
+13220	-472.4033313	83	0.01
+13230	-472.4033313	83	0.01
+13240	-472.4033313	83	0.01
+13250	-472.4033313	83	0.01
+13260	-472.4033313	83	0.01
+13270	-472.4033268	83	0.01
+13280	-472.4033268	83	0.01
+13290	-472.4032805	84	0.01
+13300	-472.4032805	84	0.01
+13310	-472.4032805	84	0.01
+13320	-472.4032802	84	0.01
+13330	-472.4032802	84	0.01
+13340	-472.4032802	84	0.01
+13350	-472.4032802	84	0.01
+13360	-472.4032802	84	0.01
+13370	-472.4032802	84	0.01
+13380	-472.4032802	84	0.01
+13390	-472.4032309	84	0.01
+13400	-472.4031512	84	0.01
+13410	-472.4031512	84	0.01
+13420	-472.403146	84	0.01
+13430	-472.403146	84	0.01
+13440	-472.403146	84	0.01
+13450	-472.403146	84	0.01
+13460	-472.403146	84	0.01
+13470	-472.4031194	84	0.01
+13480	-472.4031194	84	0.01
+13490	-472.4030945	84	0.01
+13500	-472.4030945	84	0.01
+13510	-472.4030945	84	0.01
+13520	-472.4030945	84	0.01
+13530	-472.4030945	84	0.01
+13540	-472.4030859	84	0.01
+13550	-472.4030859	84	0.01
+13560	-472.4030859	84	0.01
+13570	-472.4030859	84	0.01
+13580	-472.4030859	84	0.01
+13590	-472.4030859	85	0.01
+13600	-472.4030859	85	0.01
+13610	-472.4030859	85	0.01
+13620	-472.4030859	85	0.01
+13630	-472.4030859	85	0.01
+13640	-472.4030859	85	0.01
+13650	-472.4030859	85	0.01
+13660	-472.4030088	85	0.01
+13670	-472.4029083	85	0.01
+13680	-472.4029083	85	0.01
+13690	-472.4029083	85	0.01
+13700	-472.4029083	85	0.01
+13710	-472.4028966	85	0.01
+13720	-472.4028966	85	0.01
+13730	-472.4028966	85	0.01
+13740	-472.4028963	85	0.01
+13750	-472.4028963	85	0.01
+13760	-472.4028963	85	0.01
+13770	-472.4028806	85	0.01
+13780	-472.4028806	85	0.01
+13790	-472.4028806	85	0.01
+13800	-472.4028806	85	0.01
+13810	-472.4028774	85	0.01
+13820	-472.4028774	85	0.01
+13830	-472.4028774	85	0.01
+13840	-472.4028774	85	0.01
+13850	-472.4028774	85	0.01
+13860	-472.4028774	85	0.01
+13870	-472.4028774	85	0.01
+13880	-472.4028774	85	0.01
+13890	-472.4028774	85	0.01
+13900	-472.4028774	85	0.01
+13910	-472.4028774	86	0.01
+13920	-472.4028774	86	0.01
+13930	-472.402877	86	0.01
+13940	-472.402877	86	0.01
+13950	-472.402877	86	0.01
+13960	-472.402877	86	0.01
+13970	-472.4028505	86	0.01
+13980	-472.4028505	86	0.01
+13990	-472.4027849	86	0.01
+14000	-472.4027849	86	0.01
+14010	-472.4027849	86	0.01
+14020	-472.4027849	86	0.01
+14030	-472.4027849	86	0.01
+14040	-472.4027849	86	0.01
+14050	-472.4027849	86	0.01
+14060	-472.4027849	86	0.01
+14070	-472.4027467	86	0.01
+14080	-472.4027467	86	0.01
+14090	-472.4027467	86	0.01
+14100	-472.4026428	86	0.01
+14110	-472.4026428	86	0.01
+14120	-472.4026073	86	0.01
+14130	-472.4025883	86	0.01
+14140	-472.4025883	86	0.01
+14150	-472.4025883	86	0.01
+14160	-472.4025449	86	0.01
+14170	-472.402464	86	0.01
+14180	-472.402464	86	0.01
+14190	-472.402464	86	0.01
+14200	-472.4024085	86	0.01
+14210	-472.4024085	86	0.01
+14220	-472.4024085	87	0.01
+14230	-472.4024085	87	0.01
+14240	-472.4024085	87	0.01
+14250	-472.4024085	87	0.01
+14260	-472.4024085	87	0.01
+14270	-472.4024085	87	0.01
+14280	-472.4024085	87	0.01
+14290	-472.4024085	87	0.01
+14300	-472.4024085	87	0.01
+14310	-472.4024085	87	0.01
+14320	-472.4023641	87	0.01
+14330	-472.4023641	87	0.01
+14340	-472.4023641	87	0.01
+14350	-472.4023641	87	0.01
+14360	-472.4023641	87	0.01
+14370	-472.4023641	87	0.01
+14380	-472.4023641	87	0.01
+14390	-472.4023641	87	0.01
+14400	-472.4023641	87	0.01
+14410	-472.4023641	87	0.01
+14420	-472.402317	87	0.01
+14430	-472.402317	87	0.01
+14440	-472.402317	87	0.01
+14450	-472.402317	87	0.01
+14460	-472.402317	87	0.01
+14470	-472.402317	87	0.01
+14480	-472.402317	87	0.01
+14490	-472.402317	87	0.01
+14500	-472.402299	87	0.01
+14510	-472.402299	87	0.01
+14520	-472.402299	87	0.01
+14530	-472.402299	87	0.01
+14540	-472.402299	88	0.01
+14550	-472.402299	88	0.01
+14560	-472.402299	88	0.01
+14570	-472.402299	88	0.01
+14580	-472.402299	88	0.01
+14590	-472.402299	88	0.01
+14600	-472.402299	88	0.01
+14610	-472.402299	88	0.01
+14620	-472.4022688	88	0.01
+14630	-472.4022688	88	0.01
+14640	-472.4022687	88	0.01
+14650	-472.4022687	88	0.01
+14660	-472.4022687	88	0.01
+14670	-472.4022687	88	0.01
+14680	-472.4022687	88	0.01
+14690	-472.4022687	88	0.01
+14700	-472.4022687	88	0.01
+14710	-472.4022687	88	0.01
+14720	-472.4022687	88	0.01
+14730	-472.4022687	88	0.01
+14740	-472.4022549	88	0.01
+14750	-472.4022549	88	0.01
+14760	-472.4022549	88	0.01
+14770	-472.4022549	88	0.01
+14780	-472.4022549	88	0.01
+14790	-472.4022549	88	0.01
+14800	-472.4022549	88	0.01
+14810	-472.4022549	88	0.01
+14820	-472.4022549	88	0.01
+14830	-472.4022549	88	0.01
+14840	-472.4022549	88	0.01
+14850	-472.4022549	89	0.01
+14860	-472.4022549	89	0.01
+14870	-472.4020672	89	0.01
+14880	-472.4020672	89	0.01
+14890	-472.4020562	89	0.01
+14900	-472.4020562	89	0.01
+14910	-472.4020562	89	0.01
+14920	-472.4020562	89	0.01
+14930	-472.4020562	89	0.01
+14940	-472.4020562	89	0.01
+14950	-472.4020562	89	0.01
+14960	-472.4020562	89	0.01
+14970	-472.4020339	89	0.01
+14980	-472.4020339	89	0.01
+14990	-472.4020339	89	0.01
+15000	-472.4020339	89	0.01
+15010	-472.4020339	89	0.01
+15020	-472.4020339	89	0.01
+15030	-472.4020339	89	0.01
+15040	-472.4020339	89	0.01
+15050	-472.4020339	89	0.01
+15060	-472.4020339	89	0.01
+15070	-472.4020339	89	0.01
+15080	-472.4020339	89	0.01
+15090	-472.4020339	89	0.01
+15100	-472.4020339	89	0.01
+15110	-472.4020339	89	0.01
+15120	-472.4020339	89	0.01
+15130	-472.4020339	89	0.01
+15140	-472.4020339	89	0.01
+15150	-472.4020339	89	0.01
+15160	-472.4020339	89	0.01
+15170	-472.4020339	89	0.01
+15180	-472.4020278	90	0.01
+15190	-472.4020278	90	0.01
+15200	-472.4020278	90	0.01
+15210	-472.4020278	90	0.01
+15220	-472.4020278	90	0.01
+15230	-472.4020278	90	0.01
+15240	-472.4020278	90	0.01
+15250	-472.4020278	90	0.01
+15260	-472.4020278	90	0.01
+15270	-472.4020278	90	0.01
+15280	-472.4020278	90	0.01
+15290	-472.4020278	90	0.01
+15300	-472.4020278	90	0.01
+15310	-472.4020278	90	0.01
+15320	-472.4020175	90	0.01
+15330	-472.4020175	90	0.01
+15340	-472.4020175	90	0.01
+15350	-472.4020175	90	0.01
+15360	-472.4020175	90	0.01
+15370	-472.4020175	90	0.01
+15380	-472.4020175	90	0.01
+15390	-472.4020175	90	0.01
+15400	-472.4020175	90	0.01
+15410	-472.4020175	90	0.01
+15420	-472.4020175	90	0.01
+15430	-472.4020175	90	0.01
+15440	-472.4020175	90	0.01
+15450	-472.4020175	90	0.01
+15460	-472.4020175	90	0.01
+15470	-472.4019643	90	0.01
+15480	-472.4019643	90	0.01
+15490	-472.4019442	90	0.01
+15500	-472.4019442	91	0.01
+15510	-472.4019442	91	0.01
+15520	-472.4019442	91	0.01
+15530	-472.4019442	91	0.01
+15540	-472.4019442	91	0.01
+15550	-472.4019199	91	0.01
+15560	-472.4019199	91	0.01
+15570	-472.4019199	91	0.01
+15580	-472.4019199	91	0.01
+15590	-472.4019199	91	0.01
+15600	-472.4019199	91	0.01
+15610	-472.4019199	91	0.01
+15620	-472.4019199	91	0.01
+15630	-472.4019199	91	0.01
+15640	-472.4019199	91	0.01
+15650	-472.4019199	91	0.01
+15660	-472.4019199	91	0.01
+15670	-472.4019199	91	0.01
+15680	-472.4019199	91	0.01
+15690	-472.4019199	91	0.01
+15700	-472.4019199	91	0.01
+15710	-472.4019199	91	0.01
+15720	-472.4019199	91	0.01
+15730	-472.4019199	91	0.01
+15740	-472.4019199	91	0.01
+15750	-472.4019199	91	0.01
+15760	-472.401892	91	0.01
+15770	-472.401892	91	0.01
+15780	-472.401892	91	0.01
+15790	-472.4018787	91	0.01
+15800	-472.4018787	91	0.01
+15810	-472.4018787	92	0.01
+15820	-472.4018787	92	0.01
+15830	-472.4018787	92	0.01
+15840	-472.4018787	92	0.01
+15850	-472.4018787	92	0.01
+15860	-472.4018787	92	0.01
+15870	-472.4018674	92	0.01
+15880	-472.4018674	92	0.01
+15890	-472.4017423	92	0.01
+15900	-472.4017423	92	0.01
+15910	-472.4017423	92	0.01
+15920	-472.4017423	92	0.01
+15930	-472.4016964	92	0.01
+15940	-472.4016964	92	0.01
+15950	-472.4016964	92	0.01
+15960	-472.4016938	92	0.01
+15970	-472.4016938	92	0.01
+15980	-472.4016878	92	0.01
+15990	-472.4016878	92	0.01
+16000	-472.4016878	92	0.01
+16010	-472.4016878	92	0.01
+16020	-472.4016878	92	0.01
+16030	-472.4016878	92	0.01
+16040	-472.4016878	92	0.01
+16050	-472.4016878	92	0.01
+16060	-472.4016878	92	0.01
+16070	-472.4016878	92	0.01
+16080	-472.4016878	92	0.01
+16090	-472.4016207	92	0.01
+16100	-472.4016193	92	0.01
+16110	-472.4016193	92	0.01
+16120	-472.4016193	93	0.01
+16130	-472.4016193	93	0.01
+16140	-472.4016193	93	0.01
+16150	-472.4016193	93	0.01
+16160	-472.4016193	93	0.01
+16170	-472.4016193	93	0.01
+16180	-472.4015267	93	0.01
+16190	-472.4015267	93	0.01
+16200	-472.4015267	93	0.01
+16210	-472.4015267	93	0.01
+16220	-472.4015267	93	0.01
+16230	-472.4015267	93	0.01
+16240	-472.4015267	93	0.01
+16250	-472.4014402	93	0.01
+16260	-472.4014205	93	0.01
+16270	-472.4013623	93	0.01
+16280	-472.4013623	93	0.01
+16290	-472.4013096	93	0.01
+16300	-472.4012864	93	0.01
+16310	-472.4012864	93	0.01
+16320	-472.4012864	93	0.01
+16330	-472.4012864	93	0.01
+16340	-472.4012864	93	0.01
+16350	-472.4012864	93	0.01
+16360	-472.4012864	93	0.01
+16370	-472.4012864	93	0.01
+16380	-472.4012864	93	0.01
+16390	-472.4012864	93	0.01
+16400	-472.4012541	93	0.01
+16410	-472.4012541	93	0.01
+16420	-472.4012051	93	0.01
+16430	-472.4011801	93	0.01
+16440	-472.4011801	94	0.01
+16450	-472.4011801	94	0.01
+16460	-472.4011801	94	0.01
+16470	-472.4011801	94	0.01
+16480	-472.4011643	94	0.01
+16490	-472.4011643	94	0.01
+16500	-472.4011643	94	0.01
+16510	-472.4011643	94	0.01
+16520	-472.4011643	94	0.01
+16530	-472.4011643	94	0.01
+16540	-472.4011643	94	0.01
+16550	-472.4011643	94	0.01
+16560	-472.4011643	94	0.01
+16570	-472.4011643	94	0.01
+16580	-472.401157	94	0.01
+16590	-472.401157	94	0.01
+16600	-472.401157	94	0.01
+Score after final optimization: -472.3905876
+Final	-472.3905876	94	0.01
+Search rep 3 (of 5)
+random seed = 1129809455
+gen	best_like	time	optPrecision
+0	-827.3662893	94	0.5
+10	-801.2517936	94	0.5
+20	-771.7853457	94	0.5
+30	-734.5087105	94	0.5
+40	-686.1342973	94	0.5
+50	-657.093827	94	0.5
+60	-631.7444666	94	0.5
+70	-576.3257933	94	0.5
+80	-566.9701888	94	0.5
+90	-556.575123	94	0.5
+100	-554.0793725	94	0.5
+110	-551.9785188	94	0.5
+120	-547.4334241	94	0.5
+130	-534.895678	94	0.5
+140	-528.8359385	94	0.5
+150	-526.6572722	94	0.5
+160	-526.4517029	94	0.5
+170	-522.0118268	94	0.5
+180	-521.1292397	94	0.5
+190	-521.0818147	95	0.5
+200	-519.0428577	95	0.5
+210	-516.8055162	95	0.5
+220	-508.8474809	95	0.5
+230	-508.741092	95	0.5
+240	-508.7183866	95	0.5
+250	-502.1759577	95	0.5
+260	-499.6568739	95	0.5
+270	-499.6073644	95	0.5
+280	-499.3467157	95	0.5
+290	-498.0321506	95	0.5
+300	-495.8588274	95	0.5
+310	-495.7550109	95	0.5
+320	-495.1786842	95	0.5
+330	-495.1208999	95	0.5
+340	-494.8789498	95	0.5
+350	-494.4593761	95	0.5
+360	-493.5798272	95	0.5
+370	-493.5607384	95	0.5
+380	-493.5132316	95	0.5
+390	-491.6701733	95	0.5
+400	-491.6494228	95	0.5
+410	-491.5003528	95	0.5
+420	-491.3661756	95	0.5
+430	-491.3580744	95	0.5
+440	-491.1463476	95	0.5
+450	-491.1228808	95	0.5
+460	-490.3228332	95	0.5
+470	-490.1697054	95	0.5
+480	-490.1184219	95	0.5
+490	-489.9745079	95	0.5
+500	-489.6575289	95	0.5
+510	-489.6003535	95	0.5
+520	-489.2580527	95	0.5
+530	-489.2420637	95	0.5
+540	-488.94657	95	0.5
+550	-486.3222148	95	0.5
+560	-486.0331158	95	0.5
+570	-485.9735299	95	0.5
+580	-485.7216736	95	0.5
+590	-485.6652723	95	0.5
+600	-485.597748	95	0.5
+610	-485.5624975	95	0.5
+620	-485.5566389	95	0.5
+630	-485.3907203	95	0.5
+640	-485.3625496	95	0.5
+650	-485.0354712	95	0.5
+660	-484.964438	95	0.5
+670	-484.5716697	95	0.5
+680	-484.4691436	95	0.5
+690	-484.4643219	95	0.5
+700	-484.4369157	95	0.5
+710	-484.3967864	95	0.5
+720	-484.3755678	95	0.5
+730	-484.3532719	96	0.5
+740	-484.3445799	96	0.5
+750	-484.2934985	96	0.5
+760	-484.2934985	96	0.5
+770	-484.0378326	96	0.5
+780	-484.0000121	96	0.5
+790	-483.976345	96	0.5
+800	-483.6661734	96	0.5
+810	-483.6657971	96	0.5
+820	-483.6357874	96	0.5
+830	-483.5320846	96	0.5
+840	-483.5307013	96	0.5
+850	-483.5237276	96	0.5
+860	-483.296444	96	0.5
+870	-483.2690915	96	0.5
+880	-483.2542676	96	0.5
+890	-483.1756988	96	0.5
+900	-483.1040392	96	0.5
+910	-483.0637623	96	0.5
+920	-482.9982882	96	0.5
+930	-482.9749069	96	0.5
+940	-482.8800078	96	0.5
+950	-482.8401831	96	0.5
+960	-482.8248088	96	0.5
+970	-482.6893133	96	0.5
+980	-482.6842527	96	0.5
+990	-482.6251254	96	0.5
+1000	-482.5508093	96	0.5
+1010	-482.5456921	96	0.5
+1020	-482.5009646	96	0.5
+1030	-482.4927659	96	0.5
+1040	-482.4822065	96	0.5
+1050	-482.4039546	96	0.5
+1060	-481.6523351	96	0.5
+1070	-481.5786864	96	0.5
+1080	-481.5276337	96	0.5
+1090	-481.4177508	96	0.5
+1100	-481.4177508	96	0.5
+1110	-481.3827362	96	0.5
+1120	-481.2530843	96	0.5
+1130	-481.2530843	96	0.5
+1140	-481.2099895	96	0.5
+1150	-481.151258	96	0.5
+1160	-481.1065973	96	0.5
+1170	-481.0915585	96	0.5
+1180	-481.0871575	96	0.5
+1190	-481.0734648	96	0.5
+1200	-479.8624942	96	0.5
+1210	-479.8484855	96	0.5
+1220	-479.5010961	96	0.5
+1230	-479.4866092	96	0.5
+1240	-479.4634634	96	0.5
+1250	-479.3400136	96	0.5
+1260	-479.334787	96	0.5
+1270	-479.2970429	97	0.5
+1280	-479.0126965	97	0.5
+1290	-478.8523948	97	0.5
+1300	-478.736333	97	0.5
+1310	-478.5199781	97	0.5
+1320	-478.1521666	97	0.5
+1330	-478.1518977	97	0.5
+1340	-478.1409992	97	0.5
+1350	-478.0638011	97	0.5
+1360	-478.0179549	97	0.5
+1370	-477.9646429	97	0.5
+1380	-477.4609715	97	0.5
+1390	-477.4367209	97	0.5
+1400	-477.367458	97	0.5
+1410	-477.3571955	97	0.5
+1420	-477.303833	97	0.5
+1430	-477.2992191	97	0.5
+1440	-477.2788898	97	0.5
+1450	-477.2778015	97	0.5
+1460	-477.2175161	97	0.5
+1470	-476.727014	97	0.5
+1480	-476.639406	97	0.5
+1490	-476.6223159	97	0.5
+1500	-476.5981079	97	0.5
+1510	-476.571795	97	0.5
+1520	-476.4539208	97	0.5
+1530	-476.4375591	97	0.5
+1540	-476.3633049	97	0.5
+1550	-476.3244517	97	0.5
+1560	-476.3237003	97	0.5
+1570	-476.2742258	97	0.5
+1580	-476.266095	97	0.5
+1590	-476.2587562	97	0.5
+1600	-476.2200204	97	0.5
+1610	-476.1455009	97	0.5
+1620	-476.1295131	97	0.5
+1630	-476.1225432	97	0.5
+1640	-476.1112949	97	0.5
+1650	-476.0860366	97	0.5
+1660	-476.060915	97	0.5
+1670	-475.9736955	97	0.5
+1680	-475.9659468	97	0.5
+1690	-475.8673082	97	0.5
+1700	-475.8149361	97	0.5
+1710	-475.805885	97	0.5
+1720	-475.8058673	97	0.5
+1730	-475.7806145	97	0.5
+1740	-475.7458426	97	0.5
+1750	-475.7365414	97	0.5
+1760	-475.727313	97	0.5
+1770	-475.7266778	97	0.5
+1780	-475.6892723	97	0.5
+1790	-475.6866556	97	0.5
+1800	-475.6773236	97	0.5
+1810	-475.6773189	97	0.5
+1820	-475.6773189	98	0.5
+1830	-475.6518969	98	0.5
+1840	-475.647743	98	0.5
+1850	-475.6449289	98	0.5
+1860	-475.6405936	98	0.5
+1870	-475.6293494	98	0.5
+1880	-475.628543	98	0.5
+1890	-475.6247865	98	0.5
+1900	-475.5862446	98	0.5
+1910	-475.5476261	98	0.5
+1920	-475.4997994	98	0.5
+1930	-475.480331	98	0.5
+1940	-475.4501101	98	0.5
+1950	-475.3428311	98	0.5
+1960	-475.1763471	98	0.5
+1970	-475.1217772	98	0.5
+1980	-475.1138683	98	0.5
+1990	-475.0999448	98	0.5
+2000	-475.043533	98	0.5
+2010	-475.0434761	98	0.5
+2020	-474.9923433	98	0.5
+2030	-474.9726899	98	0.5
+2040	-474.8083693	98	0.5
+2050	-474.7102439	98	0.5
+2060	-474.7068634	98	0.5
+2070	-474.6781736	98	0.5
+2080	-474.6689833	98	0.5
+2090	-474.6464137	98	0.5
+2100	-474.6464137	98	0.5
+2110	-474.6130129	98	0.5
+2120	-474.6035653	98	0.5
+2130	-474.5781463	98	0.5
+2140	-474.5488312	98	0.5
+2150	-474.5418455	98	0.5
+2160	-474.5348394	98	0.5
+2170	-474.5276924	98	0.5
+2180	-474.5264871	98	0.5
+2190	-474.5251651	98	0.5
+2200	-474.5245011	98	0.5
+2210	-474.4918797	98	0.5
+2220	-474.469108	98	0.5
+2230	-474.4176369	98	0.5
+2240	-474.39879	98	0.5
+2250	-474.3943586	98	0.5
+2260	-474.3582281	98	0.5
+2270	-474.3498507	98	0.5
+2280	-474.3248932	98	0.5
+2290	-474.2990689	98	0.5
+2300	-474.2833641	98	0.5
+2310	-474.2830418	98	0.5
+2320	-474.2764873	98	0.5
+2330	-474.2693881	98	0.5
+2340	-474.2564526	98	0.5
+2350	-474.2392207	98	0.5
+2360	-474.2088485	98	0.5
+2370	-474.2082246	98	0.5
+2380	-474.1880853	98	0.5
+2390	-474.1846288	99	0.5
+2400	-474.1793499	99	0.5
+2410	-474.1775977	99	0.5
+2420	-474.1562277	99	0.5
+2430	-474.1483155	99	0.5
+2440	-474.1456279	99	0.5
+2450	-474.1405548	99	0.5
+2460	-474.1349212	99	0.5
+2470	-474.1288579	99	0.5
+2480	-474.1059457	99	0.5
+2490	-474.0848568	99	0.5
+2500	-474.0826804	99	0.5
+2510	-474.0745141	99	0.5
+2520	-474.0730982	99	0.5
+2530	-474.060765	99	0.5
+2540	-474.060765	99	0.5
+2550	-474.0563479	99	0.5
+2560	-474.0381134	99	0.5
+2570	-474.0381134	99	0.5
+2580	-474.0358927	99	0.5
+2590	-474.0282213	99	0.5
+2600	-474.0282151	99	0.5
+2610	-474.0252179	99	0.451
+2620	-474.0180195	99	0.451
+2630	-474.0109339	99	0.451
+2640	-473.9939899	99	0.451
+2650	-473.9057132	99	0.451
+2660	-473.9007412	99	0.451
+2670	-473.8839021	99	0.451
+2680	-473.8769373	99	0.451
+2690	-473.8767985	99	0.451
+2700	-473.8767668	99	0.451
+2710	-473.876726	99	0.451
+2720	-473.876726	99	0.451
+2730	-473.8550773	99	0.451
+2740	-473.8271526	99	0.451
+2750	-473.8185012	99	0.451
+2760	-473.815897	99	0.451
+2770	-473.8146205	99	0.451
+2780	-473.8142706	99	0.451
+2790	-473.8100027	99	0.451
+2800	-473.8100027	99	0.451
+2810	-473.8087322	99	0.451
+2820	-473.8087322	99	0.451
+2830	-473.8087322	99	0.451
+2840	-473.8087322	99	0.451
+2850	-473.8087267	99	0.451
+2860	-473.8029462	99	0.451
+2870	-473.8029462	99	0.451
+2880	-473.7973755	99	0.451
+2890	-473.7925302	99	0.451
+2900	-473.7925282	99	0.451
+2910	-473.7925282	99	0.451
+2920	-473.7921183	99	0.451
+2930	-473.7921183	99	0.451
+2940	-473.7920383	99	0.451
+2950	-473.7904145	100	0.451
+2960	-473.7904145	100	0.451
+2970	-473.7675989	100	0.451
+2980	-473.7528714	100	0.451
+2990	-473.7521842	100	0.451
+3000	-473.7515455	100	0.451
+3010	-473.7391662	100	0.451
+3020	-473.7314538	100	0.451
+3030	-473.7313672	100	0.451
+3040	-473.7313654	100	0.451
+3050	-473.7277228	100	0.451
+3060	-473.6928047	100	0.451
+3070	-473.6923573	100	0.451
+3080	-473.6881904	100	0.451
+3090	-473.6611527	100	0.451
+3100	-473.6539075	100	0.451
+3110	-473.6317703	100	0.451
+3120	-473.6243948	100	0.451
+3130	-473.6243948	100	0.451
+3140	-473.6233702	100	0.451
+3150	-473.6225448	100	0.451
+3160	-473.6171655	100	0.451
+3170	-473.6169947	100	0.451
+3180	-473.6148917	100	0.451
+3190	-473.6068758	100	0.451
+3200	-473.6068758	100	0.451
+3210	-473.5895087	100	0.451
+3220	-473.5845793	100	0.451
+3230	-473.5845793	100	0.451
+3240	-473.5780654	100	0.451
+3250	-473.5778405	100	0.451
+3260	-473.5728677	100	0.451
+3270	-473.5667719	100	0.451
+3280	-473.5666663	100	0.451
+3290	-473.5666582	100	0.451
+3300	-473.5545852	100	0.451
+3310	-473.5523976	100	0.451
+3320	-473.5280921	100	0.451
+3330	-473.520693	100	0.451
+3340	-473.5040434	100	0.451
+3350	-473.4954935	100	0.451
+3360	-473.488076	100	0.451
+3370	-473.4880188	100	0.451
+3380	-473.4855988	100	0.451
+3390	-473.4812762	100	0.451
+3400	-473.4800191	100	0.451
+3410	-473.4752285	100	0.451
+3420	-473.4752285	100	0.451
+3430	-473.469679	100	0.451
+3440	-473.4673244	100	0.451
+3450	-473.4578123	100	0.451
+3460	-473.4440385	100	0.451
+3470	-473.428006	100	0.451
+3480	-473.418631	100	0.451
+3490	-473.418162	100	0.451
+3500	-473.4099783	100	0.451
+3510	-473.3816435	100	0.402
+3520	-473.3803359	101	0.402
+3530	-473.3803359	101	0.402
+3540	-473.3707377	101	0.402
+3550	-473.3627606	101	0.402
+3560	-473.3627606	101	0.402
+3570	-473.346119	101	0.402
+3580	-473.3453492	101	0.402
+3590	-473.3253491	101	0.402
+3600	-473.3227183	101	0.402
+3610	-473.3215278	101	0.402
+3620	-473.3157529	101	0.402
+3630	-473.3157529	101	0.402
+3640	-473.310036	101	0.402
+3650	-473.3018958	101	0.402
+3660	-473.2942825	101	0.402
+3670	-473.2942825	101	0.402
+3680	-473.2942825	101	0.402
+3690	-473.2826169	101	0.402
+3700	-473.2813651	101	0.402
+3710	-473.2799331	101	0.402
+3720	-473.2799331	101	0.402
+3730	-473.2796326	101	0.402
+3740	-473.2670321	101	0.402
+3750	-473.2663725	101	0.402
+3760	-473.2663565	101	0.402
+3770	-473.2643738	101	0.402
+3780	-473.2643738	101	0.402
+3790	-473.2548144	101	0.402
+3800	-473.2520407	101	0.402
+3810	-473.2519981	101	0.402
+3820	-473.2486717	101	0.402
+3830	-473.2482404	101	0.402
+3840	-473.2471657	101	0.402
+3850	-473.2323208	101	0.402
+3860	-473.2306195	101	0.402
+3870	-473.2269789	101	0.402
+3880	-473.2258312	101	0.402
+3890	-473.2225596	101	0.402
+3900	-473.2170676	101	0.402
+3910	-473.2116327	101	0.402
+3920	-473.2107613	101	0.402
+3930	-473.2107613	101	0.402
+3940	-473.1983556	101	0.402
+3950	-473.1983556	101	0.402
+3960	-473.1983556	101	0.402
+3970	-473.1868212	101	0.402
+3980	-473.1822359	101	0.402
+3990	-473.1817753	101	0.402
+4000	-473.1817133	101	0.402
+4010	-473.1812659	101	0.353
+4020	-473.1812659	101	0.353
+4030	-473.1812659	101	0.353
+4040	-473.1807937	101	0.353
+4050	-473.1805818	101	0.353
+4060	-473.1805818	101	0.353
+4070	-473.1784236	101	0.353
+4080	-473.1771324	102	0.353
+4090	-473.1731683	102	0.353
+4100	-473.1731683	102	0.353
+4110	-473.1723286	102	0.353
+4120	-473.1613529	102	0.353
+4130	-473.1613529	102	0.353
+4140	-473.1555159	102	0.353
+4150	-473.1499906	102	0.353
+4160	-473.1495005	102	0.353
+4170	-473.1495005	102	0.353
+4180	-473.148831	102	0.353
+4190	-473.1488224	102	0.353
+4200	-473.148163	102	0.353
+4210	-473.1475999	102	0.353
+4220	-473.147398	102	0.353
+4230	-473.147398	102	0.353
+4240	-473.1461241	102	0.353
+4250	-473.1461241	102	0.353
+4260	-473.1448264	102	0.353
+4270	-473.1335559	102	0.353
+4280	-473.1333205	102	0.353
+4290	-473.1332305	102	0.353
+4300	-473.1308131	102	0.353
+4310	-473.1308095	102	0.353
+4320	-473.1308095	102	0.353
+4330	-473.1308095	102	0.353
+4340	-473.128673	102	0.353
+4350	-473.128673	102	0.353
+4360	-473.128673	102	0.353
+4370	-473.1238568	102	0.353
+4380	-473.1238568	102	0.353
+4390	-473.1235143	102	0.353
+4400	-473.1218595	102	0.353
+4410	-473.1218594	102	0.353
+4420	-473.1215072	102	0.353
+4430	-473.1207897	102	0.353
+4440	-473.1165647	102	0.353
+4450	-473.1157022	102	0.353
+4460	-473.1157022	102	0.353
+4470	-473.1157019	102	0.353
+4480	-473.1132217	102	0.353
+4490	-473.1117879	102	0.353
+4500	-473.1117879	102	0.353
+4510	-473.1117084	102	0.304
+4520	-473.1107563	102	0.304
+4530	-473.1104842	102	0.304
+4540	-473.1102151	102	0.304
+4550	-473.1085136	102	0.304
+4560	-473.108326	102	0.304
+4570	-473.108326	102	0.304
+4580	-473.1081911	102	0.304
+4590	-473.1050046	102	0.304
+4600	-473.1050046	102	0.304
+4610	-473.1040409	102	0.304
+4620	-473.1040409	102	0.304
+4630	-473.1023852	102	0.304
+4640	-473.1023852	103	0.304
+4650	-473.1016765	103	0.304
+4660	-473.1016765	103	0.304
+4670	-473.1016191	103	0.304
+4680	-473.1016157	103	0.304
+4690	-473.1016157	103	0.304
+4700	-473.1014882	103	0.304
+4710	-473.1014882	103	0.304
+4720	-473.1014857	103	0.304
+4730	-473.095801	103	0.304
+4740	-473.095801	103	0.304
+4750	-473.0954278	103	0.304
+4760	-473.0931908	103	0.304
+4770	-473.0928327	103	0.304
+4780	-473.0927642	103	0.304
+4790	-473.0916344	103	0.304
+4800	-473.0904657	103	0.304
+4810	-473.0893048	103	0.304
+4820	-473.0855788	103	0.304
+4830	-473.082446	103	0.304
+4840	-473.0689688	103	0.304
+4850	-473.0657845	103	0.304
+4860	-473.0657845	103	0.304
+4870	-473.0651169	103	0.304
+4880	-473.064318	103	0.304
+4890	-473.0630439	103	0.304
+4900	-473.0629825	103	0.304
+4910	-473.0624423	103	0.304
+4920	-473.0621997	103	0.304
+4930	-473.061912	103	0.304
+4940	-473.0616924	103	0.304
+4950	-473.0616203	103	0.304
+4960	-473.0612607	103	0.304
+4970	-473.0608467	103	0.304
+4980	-473.0608467	103	0.304
+4990	-473.060101	103	0.304
+5000	-473.0574406	103	0.304
+5010	-473.0541886	103	0.304
+5020	-473.0538072	103	0.304
+5030	-473.0518403	103	0.304
+5040	-473.0505341	103	0.304
+5050	-473.050231	103	0.304
+5060	-473.050231	103	0.304
+5070	-473.050231	103	0.304
+5080	-473.0461014	103	0.304
+5090	-473.045815	103	0.304
+5100	-473.0441182	103	0.304
+5110	-473.0437115	103	0.304
+5120	-473.0436643	103	0.304
+5130	-473.0434084	103	0.304
+5140	-473.0392138	103	0.304
+5150	-473.0386062	103	0.304
+5160	-473.0381353	103	0.304
+5170	-473.0351075	103	0.304
+5180	-473.0338802	103	0.304
+5190	-473.0305456	104	0.304
+5200	-473.0301814	104	0.304
+5210	-473.0298955	104	0.304
+5220	-473.0290203	104	0.304
+5230	-473.0289935	104	0.304
+5240	-473.0281638	104	0.304
+5250	-473.0281524	104	0.304
+5260	-473.0281524	104	0.304
+5270	-473.0281524	104	0.304
+5280	-473.027583	104	0.304
+5290	-473.0265421	104	0.304
+5300	-473.0259699	104	0.304
+5310	-473.0253042	104	0.304
+5320	-473.0252269	104	0.304
+5330	-473.024054	104	0.304
+5340	-473.024054	104	0.304
+5350	-473.024054	104	0.304
+5360	-473.0239896	104	0.304
+5370	-473.0234265	104	0.304
+5380	-473.0231772	104	0.304
+5390	-473.0229035	104	0.304
+5400	-473.0224684	104	0.304
+5410	-473.0185692	104	0.255
+5420	-473.0178593	104	0.255
+5430	-473.0178593	104	0.255
+5440	-473.0178593	104	0.255
+5450	-473.017072	104	0.255
+5460	-473.017072	104	0.255
+5470	-473.0169048	104	0.255
+5480	-473.0157767	104	0.255
+5490	-473.0122338	104	0.255
+5500	-473.0122338	104	0.255
+5510	-473.0119312	104	0.255
+5520	-473.0116511	104	0.255
+5530	-473.011454	104	0.255
+5540	-473.0111053	104	0.255
+5550	-473.0108034	104	0.255
+5560	-473.0102727	104	0.255
+5570	-473.0102727	104	0.255
+5580	-473.0088974	104	0.255
+5590	-473.0084575	104	0.255
+5600	-473.0073961	104	0.255
+5610	-473.0060489	104	0.255
+5620	-473.0050419	104	0.255
+5630	-473.0050419	104	0.255
+5640	-473.0050122	104	0.255
+5650	-473.0047167	104	0.255
+5660	-473.0047167	104	0.255
+5670	-473.0044353	104	0.255
+5680	-473.0044353	104	0.255
+5690	-473.0044353	104	0.255
+5700	-473.0044353	104	0.255
+5710	-473.0043448	104	0.255
+5720	-473.0043448	104	0.255
+5730	-473.0043448	104	0.255
+5740	-473.003948	105	0.255
+5750	-472.9923558	105	0.255
+5760	-472.9911793	105	0.255
+5770	-472.9910497	105	0.255
+5780	-472.9898073	105	0.255
+5790	-472.9881528	105	0.255
+5800	-472.9855461	105	0.255
+5810	-472.9839917	105	0.255
+5820	-472.9839917	105	0.255
+5830	-472.9839917	105	0.255
+5840	-472.9839917	105	0.255
+5850	-472.9803809	105	0.255
+5860	-472.9803643	105	0.255
+5870	-472.9802494	105	0.255
+5880	-472.9802493	105	0.255
+5890	-472.9802493	105	0.255
+5900	-472.9802234	105	0.255
+5910	-472.9797528	105	0.255
+5920	-472.9792454	105	0.255
+5930	-472.9790538	105	0.255
+5940	-472.9781347	105	0.255
+5950	-472.9781343	105	0.255
+5960	-472.9779757	105	0.255
+5970	-472.9770679	105	0.255
+5980	-472.9770679	105	0.255
+5990	-472.9769861	105	0.255
+6000	-472.9769861	105	0.255
+6010	-472.9765272	105	0.255
+6020	-472.9765272	105	0.255
+6030	-472.975569	105	0.255
+6040	-472.9744157	105	0.255
+6050	-472.9737079	105	0.255
+6060	-472.9703906	105	0.255
+6070	-472.9699105	105	0.255
+6080	-472.9698679	105	0.255
+6090	-472.969695	105	0.255
+6100	-472.969695	105	0.255
+6110	-472.969695	105	0.255
+6120	-472.969695	105	0.255
+6130	-472.969695	105	0.255
+6140	-472.9693967	105	0.255
+6150	-472.9693934	105	0.255
+6160	-472.9691667	105	0.255
+6170	-472.9691667	105	0.255
+6180	-472.9691667	105	0.255
+6190	-472.9691667	105	0.255
+6200	-472.9691339	105	0.255
+6210	-472.9691339	105	0.255
+6220	-472.968681	105	0.255
+6230	-472.9686809	105	0.255
+6240	-472.9686809	105	0.255
+6250	-472.9686809	105	0.255
+6260	-472.9685802	105	0.255
+6270	-472.9684752	106	0.255
+6280	-472.9684752	106	0.255
+6290	-472.9683799	106	0.255
+6300	-472.9683799	106	0.255
+6310	-472.9678209	106	0.206
+6320	-472.9678209	106	0.206
+6330	-472.9678209	106	0.206
+6340	-472.9678209	106	0.206
+6350	-472.9673939	106	0.206
+6360	-472.9673318	106	0.206
+6370	-472.9189203	106	0.206
+6380	-472.9173759	106	0.206
+6390	-472.9173568	106	0.206
+6400	-472.9102931	106	0.206
+6410	-472.8438541	106	0.206
+6420	-472.8347315	106	0.206
+6430	-472.8347315	106	0.206
+6440	-472.8345255	106	0.206
+6450	-472.8277869	106	0.206
+6460	-472.8206243	106	0.206
+6470	-472.8006986	106	0.206
+6480	-472.7930924	106	0.206
+6490	-472.7927044	106	0.206
+6500	-472.783091	106	0.206
+6510	-472.7769579	106	0.206
+6520	-472.7769579	106	0.206
+6530	-472.7743578	106	0.206
+6540	-472.7500294	106	0.206
+6550	-472.7405299	106	0.206
+6560	-472.7404	106	0.206
+6570	-472.7332266	106	0.206
+6580	-472.7151254	106	0.206
+6590	-472.7150363	106	0.206
+6600	-472.7121772	106	0.206
+6610	-472.7121772	106	0.206
+6620	-472.7115054	106	0.206
+6630	-472.7043973	106	0.206
+6640	-472.6980541	106	0.206
+6650	-472.6892106	106	0.206
+6660	-472.6856104	106	0.206
+6670	-472.6801752	106	0.206
+6680	-472.674831	106	0.206
+6690	-472.6703645	106	0.206
+6700	-472.6699401	106	0.206
+6710	-472.6699372	106	0.206
+6720	-472.6647142	106	0.206
+6730	-472.6634478	106	0.206
+6740	-472.6598676	106	0.206
+6750	-472.6598676	106	0.206
+6760	-472.6597749	106	0.206
+6770	-472.6596149	106	0.206
+6780	-472.6592882	107	0.206
+6790	-472.6544876	107	0.206
+6800	-472.6516808	107	0.206
+6810	-472.6512372	107	0.206
+6820	-472.6505865	107	0.206
+6830	-472.6504025	107	0.206
+6840	-472.6495739	107	0.206
+6850	-472.6474873	107	0.206
+6860	-472.6372767	107	0.206
+6870	-472.6372704	107	0.206
+6880	-472.6358257	107	0.206
+6890	-472.6354272	107	0.206
+6900	-472.6270055	107	0.206
+6910	-472.6232878	107	0.157
+6920	-472.6225497	107	0.157
+6930	-472.6202634	107	0.157
+6940	-472.6202499	107	0.157
+6950	-472.6196626	107	0.157
+6960	-472.6196626	107	0.157
+6970	-472.6171357	107	0.157
+6980	-472.6165091	107	0.157
+6990	-472.608552	107	0.157
+7000	-472.6085427	107	0.157
+7010	-472.6079877	107	0.157
+7020	-472.6077953	107	0.157
+7030	-472.6065893	107	0.157
+7040	-472.6055471	107	0.157
+7050	-472.6054698	107	0.157
+7060	-472.604724	107	0.157
+7070	-472.604724	107	0.157
+7080	-472.6044817	107	0.157
+7090	-472.6044817	107	0.157
+7100	-472.6019597	107	0.157
+7110	-472.5985579	107	0.157
+7120	-472.5985579	107	0.157
+7130	-472.5985559	107	0.157
+7140	-472.5974126	107	0.157
+7150	-472.5968176	107	0.157
+7160	-472.5968104	107	0.157
+7170	-472.5955769	107	0.157
+7180	-472.5928509	107	0.157
+7190	-472.5928509	107	0.157
+7200	-472.5926946	107	0.157
+7210	-472.5926946	107	0.157
+7220	-472.5926946	107	0.157
+7230	-472.5926811	107	0.157
+7240	-472.5923078	107	0.157
+7250	-472.591062	107	0.157
+7260	-472.5907009	107	0.157
+7270	-472.5907009	108	0.157
+7280	-472.5896421	108	0.157
+7290	-472.5865145	108	0.157
+7300	-472.5865145	108	0.157
+7310	-472.5780201	108	0.157
+7320	-472.5780193	108	0.157
+7330	-472.5755001	108	0.157
+7340	-472.5755001	108	0.157
+7350	-472.5751564	108	0.157
+7360	-472.5751498	108	0.157
+7370	-472.5743039	108	0.157
+7380	-472.5723323	108	0.157
+7390	-472.5676615	108	0.157
+7400	-472.5660243	108	0.157
+7410	-472.5486535	108	0.108
+7420	-472.5486535	108	0.108
+7430	-472.5486535	108	0.108
+7440	-472.5486535	108	0.108
+7450	-472.5486532	108	0.108
+7460	-472.5457544	108	0.108
+7470	-472.5456464	108	0.108
+7480	-472.5456464	108	0.108
+7490	-472.5456464	108	0.108
+7500	-472.5447735	108	0.108
+7510	-472.5440626	108	0.108
+7520	-472.5437989	108	0.108
+7530	-472.5424138	108	0.108
+7540	-472.5420499	108	0.108
+7550	-472.5420359	108	0.108
+7560	-472.5420311	108	0.108
+7570	-472.537083	108	0.108
+7580	-472.537083	108	0.108
+7590	-472.537083	108	0.108
+7600	-472.5350433	108	0.108
+7610	-472.5350433	108	0.108
+7620	-472.5350433	108	0.108
+7630	-472.5344284	108	0.108
+7640	-472.5309333	108	0.108
+7650	-472.5309291	108	0.108
+7660	-472.5298658	108	0.108
+7670	-472.529863	108	0.108
+7680	-472.5289453	108	0.108
+7690	-472.5283292	108	0.108
+7700	-472.5283292	108	0.108
+7710	-472.5283292	108	0.108
+7720	-472.5283292	108	0.108
+7730	-472.5280142	108	0.108
+7740	-472.5274958	108	0.108
+7750	-472.5274756	108	0.108
+7760	-472.5270948	109	0.108
+7770	-472.5270948	109	0.108
+7780	-472.5270948	109	0.108
+7790	-472.5270703	109	0.108
+7800	-472.5265165	109	0.108
+7810	-472.5265165	109	0.108
+7820	-472.5265165	109	0.108
+7830	-472.5265165	109	0.108
+7840	-472.5229852	109	0.108
+7850	-472.5229852	109	0.108
+7860	-472.5216491	109	0.108
+7870	-472.5216491	109	0.108
+7880	-472.5210937	109	0.108
+7890	-472.5210937	109	0.108
+7900	-472.5210937	109	0.108
+7910	-472.5210151	109	0.059
+7920	-472.5210144	109	0.059
+7930	-472.4798194	109	0.059
+7940	-472.4792141	109	0.059
+7950	-472.4792141	109	0.059
+7960	-472.4792141	109	0.059
+7970	-472.4778699	109	0.059
+7980	-472.4778699	109	0.059
+7990	-472.4754076	109	0.059
+8000	-472.4754076	109	0.059
+8010	-472.4701284	109	0.059
+8020	-472.4675186	109	0.059
+8030	-472.4664202	109	0.059
+8040	-472.4638585	109	0.059
+8050	-472.4630615	109	0.059
+8060	-472.4629577	109	0.059
+8070	-472.4629577	109	0.059
+8080	-472.4618711	109	0.059
+8090	-472.4618711	109	0.059
+8100	-472.4616556	109	0.059
+8110	-472.4616327	109	0.059
+8120	-472.4616327	109	0.059
+8130	-472.4613017	109	0.059
+8140	-472.4613017	109	0.059
+8150	-472.4600632	109	0.059
+8160	-472.4587843	109	0.059
+8170	-472.4587696	109	0.059
+8180	-472.4587696	109	0.059
+8190	-472.4585762	109	0.059
+8200	-472.4585762	109	0.059
+8210	-472.4583273	109	0.059
+8220	-472.457722	110	0.059
+8230	-472.457722	110	0.059
+8240	-472.4563557	110	0.059
+8250	-472.4559976	110	0.059
+8260	-472.4559976	110	0.059
+8270	-472.455384	110	0.059
+8280	-472.4553626	110	0.059
+8290	-472.4553626	110	0.059
+8300	-472.4551608	110	0.059
+8310	-472.4551608	110	0.059
+8320	-472.4551608	110	0.059
+8330	-472.4531186	110	0.059
+8340	-472.4523926	110	0.059
+8350	-472.4523926	110	0.059
+8360	-472.4523834	110	0.059
+8370	-472.4523834	110	0.059
+8380	-472.4523834	110	0.059
+8390	-472.4522731	110	0.059
+8400	-472.4520773	110	0.059
+8410	-472.4520773	110	0.059
+8420	-472.4520128	110	0.059
+8430	-472.4520128	110	0.059
+8440	-472.4503493	110	0.059
+8450	-472.4503493	110	0.059
+8460	-472.4500875	110	0.059
+8470	-472.4493584	110	0.059
+8480	-472.4491588	110	0.059
+8490	-472.4491588	110	0.059
+8500	-472.4491588	110	0.059
+8510	-472.4316338	110	0.01
+8520	-472.430968	110	0.01
+8530	-472.4302384	110	0.01
+8540	-472.4292456	110	0.01
+8550	-472.4292456	110	0.01
+8560	-472.4292456	110	0.01
+8570	-472.4292456	110	0.01
+8580	-472.4289521	110	0.01
+8590	-472.4287685	110	0.01
+8600	-472.4287685	110	0.01
+8610	-472.4287685	110	0.01
+8620	-472.4287685	110	0.01
+8630	-472.4284579	111	0.01
+8640	-472.4284579	111	0.01
+8650	-472.4284576	111	0.01
+8660	-472.4281707	111	0.01
+8670	-472.4281707	111	0.01
+8680	-472.4281707	111	0.01
+8690	-472.4265576	111	0.01
+8700	-472.4265572	111	0.01
+8710	-472.4265572	111	0.01
+8720	-472.4265424	111	0.01
+8730	-472.4265424	111	0.01
+8740	-472.4251126	111	0.01
+8750	-472.4233936	111	0.01
+8760	-472.4233936	111	0.01
+8770	-472.4233936	111	0.01
+8780	-472.4233936	111	0.01
+8790	-472.4229543	111	0.01
+8800	-472.4229543	111	0.01
+8810	-472.4229525	111	0.01
+8820	-472.4229525	111	0.01
+8830	-472.4227778	111	0.01
+8840	-472.4227778	111	0.01
+8850	-472.4227778	111	0.01
+8860	-472.4226068	111	0.01
+8870	-472.4226068	111	0.01
+8880	-472.4226068	111	0.01
+8890	-472.4226068	111	0.01
+8900	-472.4226068	111	0.01
+8910	-472.4226068	111	0.01
+8920	-472.4217701	111	0.01
+8930	-472.4217701	111	0.01
+8940	-472.421373	112	0.01
+8950	-472.421373	112	0.01
+8960	-472.421373	112	0.01
+8970	-472.421373	112	0.01
+8980	-472.421373	112	0.01
+8990	-472.421373	112	0.01
+9000	-472.421373	112	0.01
+9010	-472.421373	112	0.01
+9020	-472.4208645	112	0.01
+9030	-472.4206007	112	0.01
+9040	-472.4206003	112	0.01
+9050	-472.4206002	112	0.01
+9060	-472.4206002	112	0.01
+9070	-472.4206002	112	0.01
+9080	-472.420358	112	0.01
+9090	-472.4202566	112	0.01
+9100	-472.4198156	112	0.01
+9110	-472.4198156	112	0.01
+9120	-472.4191058	112	0.01
+9130	-472.4191058	112	0.01
+9140	-472.4190706	112	0.01
+9150	-472.4190706	112	0.01
+9160	-472.4190706	112	0.01
+9170	-472.4190706	112	0.01
+9180	-472.4185337	112	0.01
+9190	-472.4185337	112	0.01
+9200	-472.4185337	112	0.01
+9210	-472.4184075	112	0.01
+9220	-472.4184075	112	0.01
+9230	-472.4184075	112	0.01
+9240	-472.4183752	112	0.01
+9250	-472.4183752	112	0.01
+9260	-472.4181771	112	0.01
+9270	-472.418128	113	0.01
+9280	-472.418128	113	0.01
+9290	-472.418128	113	0.01
+9300	-472.418128	113	0.01
+9310	-472.4181174	113	0.01
+9320	-472.4181174	113	0.01
+9330	-472.4181164	113	0.01
+9340	-472.4181164	113	0.01
+9350	-472.4181164	113	0.01
+9360	-472.417827	113	0.01
+9370	-472.417827	113	0.01
+9380	-472.4176756	113	0.01
+9390	-472.4176756	113	0.01
+9400	-472.4176756	113	0.01
+9410	-472.4176756	113	0.01
+9420	-472.4176756	113	0.01
+9430	-472.4176731	113	0.01
+9440	-472.4175396	113	0.01
+9450	-472.4175396	113	0.01
+9460	-472.4175396	113	0.01
+9470	-472.4175396	113	0.01
+9480	-472.4175396	113	0.01
+9490	-472.4175374	113	0.01
+9500	-472.4175374	113	0.01
+9510	-472.4175374	113	0.01
+9520	-472.4175374	113	0.01
+9530	-472.4175374	113	0.01
+9540	-472.4175374	113	0.01
+9550	-472.4175374	113	0.01
+9560	-472.4175336	113	0.01
+9570	-472.4173855	113	0.01
+9580	-472.4173855	113	0.01
+9590	-472.4173838	114	0.01
+9600	-472.4173241	114	0.01
+9610	-472.4173241	114	0.01
+9620	-472.4173241	114	0.01
+9630	-472.4173241	114	0.01
+9640	-472.4173241	114	0.01
+9650	-472.4168638	114	0.01
+9660	-472.4168547	114	0.01
+9670	-472.4167491	114	0.01
+9680	-472.4159917	114	0.01
+9690	-472.4159917	114	0.01
+9700	-472.4159917	114	0.01
+9710	-472.4159917	114	0.01
+9720	-472.4159917	114	0.01
+9730	-472.4159917	114	0.01
+9740	-472.4159917	114	0.01
+9750	-472.4159917	114	0.01
+9760	-472.4159756	114	0.01
+9770	-472.4159756	114	0.01
+9780	-472.4159756	114	0.01
+9790	-472.4159684	114	0.01
+9800	-472.4159684	114	0.01
+9810	-472.4159684	114	0.01
+9820	-472.4159684	114	0.01
+9830	-472.4159684	114	0.01
+9840	-472.4159684	114	0.01
+9850	-472.4159684	114	0.01
+9860	-472.4159684	114	0.01
+9870	-472.4159684	114	0.01
+9880	-472.4159684	114	0.01
+9890	-472.4159527	114	0.01
+9900	-472.4159527	114	0.01
+9910	-472.4158668	114	0.01
+9920	-472.4158668	115	0.01
+9930	-472.4158532	115	0.01
+9940	-472.415604	115	0.01
+9950	-472.415604	115	0.01
+9960	-472.415604	115	0.01
+9970	-472.415604	115	0.01
+9980	-472.4155411	115	0.01
+9990	-472.4154874	115	0.01
+10000	-472.4154874	115	0.01
+10010	-472.4154874	115	0.01
+10020	-472.4154868	115	0.01
+10030	-472.415387	115	0.01
+10040	-472.415387	115	0.01
+10050	-472.415387	115	0.01
+10060	-472.415387	115	0.01
+10070	-472.415379	115	0.01
+10080	-472.4152482	115	0.01
+10090	-472.4152482	115	0.01
+10100	-472.4152482	115	0.01
+10110	-472.4151655	115	0.01
+10120	-472.4149733	115	0.01
+10130	-472.4149733	115	0.01
+10140	-472.414938	115	0.01
+10150	-472.414938	115	0.01
+10160	-472.414938	115	0.01
+10170	-472.414938	115	0.01
+10180	-472.4148153	115	0.01
+10190	-472.4148149	115	0.01
+10200	-472.4148149	115	0.01
+10210	-472.4148149	115	0.01
+10220	-472.4147203	115	0.01
+10230	-472.4147203	115	0.01
+10240	-472.4146766	115	0.01
+10250	-472.4146766	116	0.01
+10260	-472.4146766	116	0.01
+10270	-472.4145861	116	0.01
+10280	-472.41451	116	0.01
+10290	-472.41451	116	0.01
+10300	-472.41451	116	0.01
+10310	-472.4142203	116	0.01
+10320	-472.4141811	116	0.01
+10330	-472.4141805	116	0.01
+10340	-472.4141803	116	0.01
+10350	-472.4140453	116	0.01
+10360	-472.4140453	116	0.01
+10370	-472.4140453	116	0.01
+10380	-472.4140453	116	0.01
+10390	-472.4140453	116	0.01
+10400	-472.4140453	116	0.01
+10410	-472.4140453	116	0.01
+10420	-472.4140449	116	0.01
+10430	-472.4140351	116	0.01
+10440	-472.4140351	116	0.01
+10450	-472.4140351	116	0.01
+10460	-472.4140351	116	0.01
+10470	-472.4138444	116	0.01
+10480	-472.4138444	116	0.01
+10490	-472.4138423	116	0.01
+10500	-472.4138423	116	0.01
+10510	-472.4138423	116	0.01
+10520	-472.4138423	116	0.01
+10530	-472.4138423	116	0.01
+10540	-472.4138423	116	0.01
+10550	-472.4138423	116	0.01
+10560	-472.4138423	116	0.01
+10570	-472.4138416	117	0.01
+10580	-472.4138294	117	0.01
+10590	-472.4138286	117	0.01
+10600	-472.4138286	117	0.01
+10610	-472.4138286	117	0.01
+10620	-472.4138285	117	0.01
+10630	-472.4138284	117	0.01
+10640	-472.4138284	117	0.01
+10650	-472.4137254	117	0.01
+10660	-472.4137254	117	0.01
+10670	-472.4137254	117	0.01
+10680	-472.4137254	117	0.01
+10690	-472.4136648	117	0.01
+10700	-472.4136644	117	0.01
+10710	-472.4136644	117	0.01
+10720	-472.4136637	117	0.01
+10730	-472.4136418	117	0.01
+10740	-472.4136418	117	0.01
+10750	-472.4136418	117	0.01
+10760	-472.4136418	117	0.01
+10770	-472.4133108	117	0.01
+10780	-472.4133108	117	0.01
+10790	-472.4131949	117	0.01
+10800	-472.4131949	117	0.01
+10810	-472.4131949	117	0.01
+10820	-472.4131949	117	0.01
+10830	-472.4131949	117	0.01
+10840	-472.4131949	117	0.01
+10850	-472.4131949	117	0.01
+10860	-472.4131949	117	0.01
+10870	-472.4131949	117	0.01
+10880	-472.4131404	117	0.01
+10890	-472.4131075	117	0.01
+10900	-472.4129922	117	0.01
+10910	-472.4129922	118	0.01
+10920	-472.4129922	118	0.01
+10930	-472.4129849	118	0.01
+10940	-472.4129848	118	0.01
+10950	-472.412855	118	0.01
+10960	-472.4125281	118	0.01
+10970	-472.4125281	118	0.01
+10980	-472.4125281	118	0.01
+10990	-472.4125281	118	0.01
+11000	-472.4125281	118	0.01
+11010	-472.4125281	118	0.01
+11020	-472.4125281	118	0.01
+11030	-472.4125281	118	0.01
+11040	-472.4125281	118	0.01
+11050	-472.4125281	118	0.01
+11060	-472.4125281	118	0.01
+11070	-472.4125113	118	0.01
+11080	-472.4125113	118	0.01
+11090	-472.4125113	118	0.01
+11100	-472.4123704	118	0.01
+11110	-472.4123704	118	0.01
+11120	-472.4123704	118	0.01
+11130	-472.4123704	118	0.01
+11140	-472.4123704	118	0.01
+11150	-472.4123704	118	0.01
+11160	-472.4123704	118	0.01
+11170	-472.4123704	118	0.01
+11180	-472.4123704	118	0.01
+11190	-472.4122853	118	0.01
+11200	-472.4122853	118	0.01
+11210	-472.4122853	118	0.01
+11220	-472.4122853	118	0.01
+11230	-472.4122853	119	0.01
+11240	-472.4122853	119	0.01
+11250	-472.4122853	119	0.01
+11260	-472.4122853	119	0.01
+11270	-472.4122853	119	0.01
+11280	-472.4122853	119	0.01
+11290	-472.4121453	119	0.01
+11300	-472.4121453	119	0.01
+11310	-472.4121453	119	0.01
+11320	-472.4121401	119	0.01
+11330	-472.4121401	119	0.01
+11340	-472.4121401	119	0.01
+11350	-472.4121401	119	0.01
+11360	-472.4121401	119	0.01
+11370	-472.4121127	119	0.01
+11380	-472.4121055	119	0.01
+11390	-472.4121055	119	0.01
+11400	-472.4121055	119	0.01
+11410	-472.4119287	119	0.01
+11420	-472.4119287	119	0.01
+11430	-472.4119287	119	0.01
+11440	-472.4118433	119	0.01
+11450	-472.4118433	119	0.01
+11460	-472.4118432	119	0.01
+11470	-472.4118432	119	0.01
+11480	-472.4118103	119	0.01
+11490	-472.4118103	119	0.01
+11500	-472.4118103	119	0.01
+11510	-472.4118103	119	0.01
+11520	-472.4117294	119	0.01
+11530	-472.4117294	119	0.01
+11540	-472.4117294	120	0.01
+11550	-472.4117294	120	0.01
+11560	-472.4115297	120	0.01
+11570	-472.4115297	120	0.01
+11580	-472.4114561	120	0.01
+11590	-472.4114561	120	0.01
+11600	-472.4114561	120	0.01
+11610	-472.4114465	120	0.01
+11620	-472.4114232	120	0.01
+11630	-472.4114232	120	0.01
+11640	-472.4114232	120	0.01
+11650	-472.4114232	120	0.01
+11660	-472.4114232	120	0.01
+11670	-472.4114023	120	0.01
+11680	-472.4114023	120	0.01
+11690	-472.4114023	120	0.01
+11700	-472.4114023	120	0.01
+11710	-472.4114023	120	0.01
+11720	-472.4114023	120	0.01
+11730	-472.4114023	120	0.01
+11740	-472.4114023	120	0.01
+11750	-472.4114023	120	0.01
+11760	-472.4114023	120	0.01
+11770	-472.4114023	120	0.01
+11780	-472.4114023	120	0.01
+11790	-472.4114023	120	0.01
+11800	-472.4114023	120	0.01
+11810	-472.4114023	120	0.01
+11820	-472.4114023	120	0.01
+11830	-472.4114023	120	0.01
+11840	-472.4114023	120	0.01
+11850	-472.4114023	120	0.01
+11860	-472.4114023	121	0.01
+11870	-472.4114023	121	0.01
+11880	-472.4114023	121	0.01
+11890	-472.4114023	121	0.01
+11900	-472.4114023	121	0.01
+11910	-472.4114023	121	0.01
+11920	-472.4114023	121	0.01
+11930	-472.4114023	121	0.01
+11940	-472.4114023	121	0.01
+11950	-472.4114023	121	0.01
+11960	-472.4113477	121	0.01
+11970	-472.4113477	121	0.01
+11980	-472.4112873	121	0.01
+11990	-472.4112873	121	0.01
+12000	-472.411177	121	0.01
+12010	-472.4110415	121	0.01
+12020	-472.4110415	121	0.01
+12030	-472.4110063	121	0.01
+12040	-472.4110063	121	0.01
+12050	-472.4109739	121	0.01
+12060	-472.4109739	121	0.01
+12070	-472.4109739	121	0.01
+12080	-472.4109263	121	0.01
+12090	-472.4109263	121	0.01
+12100	-472.4107962	121	0.01
+12110	-472.4107962	121	0.01
+12120	-472.4107962	121	0.01
+12130	-472.4107962	121	0.01
+12140	-472.4106813	121	0.01
+12150	-472.4106278	121	0.01
+12160	-472.4106278	122	0.01
+12170	-472.4106278	122	0.01
+12180	-472.4106278	122	0.01
+12190	-472.4106278	122	0.01
+12200	-472.4106278	122	0.01
+12210	-472.4106278	122	0.01
+12220	-472.4106278	122	0.01
+12230	-472.4106278	122	0.01
+12240	-472.4106122	122	0.01
+12250	-472.4106122	122	0.01
+12260	-472.4106122	122	0.01
+12270	-472.4106122	122	0.01
+12280	-472.4106096	122	0.01
+12290	-472.4106096	122	0.01
+12300	-472.4106096	122	0.01
+12310	-472.4104509	122	0.01
+12320	-472.410267	122	0.01
+12330	-472.4102446	122	0.01
+12340	-472.4102446	122	0.01
+12350	-472.4102446	122	0.01
+12360	-472.4102446	122	0.01
+12370	-472.4102446	122	0.01
+12380	-472.4102446	122	0.01
+12390	-472.4102446	122	0.01
+12400	-472.4102446	122	0.01
+12410	-472.4102392	122	0.01
+12420	-472.4102392	122	0.01
+12430	-472.4102224	122	0.01
+12440	-472.4102224	122	0.01
+12450	-472.4102224	122	0.01
+12460	-472.4102224	122	0.01
+12470	-472.4102224	122	0.01
+12480	-472.4102224	122	0.01
+12490	-472.4102224	122	0.01
+12500	-472.4102224	123	0.01
+12510	-472.4102224	123	0.01
+12520	-472.4101918	123	0.01
+12530	-472.4101918	123	0.01
+12540	-472.4101918	123	0.01
+12550	-472.4100681	123	0.01
+12560	-472.4100681	123	0.01
+12570	-472.4100681	123	0.01
+12580	-472.4100681	123	0.01
+12590	-472.4100681	123	0.01
+12600	-472.4100681	123	0.01
+12610	-472.4100681	123	0.01
+12620	-472.4100681	123	0.01
+12630	-472.4100681	123	0.01
+12640	-472.4100681	123	0.01
+12650	-472.4100681	123	0.01
+12660	-472.4100681	123	0.01
+12670	-472.4100681	123	0.01
+12680	-472.4100141	123	0.01
+12690	-472.4100141	123	0.01
+12700	-472.4100141	123	0.01
+12710	-472.4100141	123	0.01
+12720	-472.4100141	123	0.01
+12730	-472.4100141	123	0.01
+12740	-472.4100141	123	0.01
+12750	-472.4100141	123	0.01
+12760	-472.4100141	123	0.01
+12770	-472.4100141	123	0.01
+12780	-472.4100141	123	0.01
+12790	-472.4100141	123	0.01
+12800	-472.4100141	123	0.01
+12810	-472.4100141	123	0.01
+12820	-472.4100141	124	0.01
+12830	-472.4100141	124	0.01
+12840	-472.4100141	124	0.01
+12850	-472.4100141	124	0.01
+12860	-472.4100141	124	0.01
+12870	-472.4100141	124	0.01
+12880	-472.4100141	124	0.01
+12890	-472.4099954	124	0.01
+12900	-472.4099954	124	0.01
+12910	-472.4099954	124	0.01
+12920	-472.4099954	124	0.01
+12930	-472.4099954	124	0.01
+12940	-472.4099954	124	0.01
+12950	-472.4099954	124	0.01
+12960	-472.4099954	124	0.01
+12970	-472.4099727	124	0.01
+12980	-472.4099727	124	0.01
+12990	-472.40993	124	0.01
+13000	-472.40993	124	0.01
+13010	-472.40993	124	0.01
+13020	-472.40993	124	0.01
+13030	-472.40993	124	0.01
+13040	-472.4098266	124	0.01
+13050	-472.4098266	124	0.01
+13060	-472.409613	124	0.01
+13070	-472.4095631	124	0.01
+13080	-472.4095631	124	0.01
+13090	-472.4095631	124	0.01
+13100	-472.4095631	124	0.01
+13110	-472.4095631	124	0.01
+13120	-472.409355	124	0.01
+13130	-472.409355	124	0.01
+13140	-472.409355	124	0.01
+13150	-472.409355	125	0.01
+13160	-472.409355	125	0.01
+13170	-472.409355	125	0.01
+13180	-472.409355	125	0.01
+13190	-472.409355	125	0.01
+13200	-472.409355	125	0.01
+13210	-472.409355	125	0.01
+13220	-472.409355	125	0.01
+13230	-472.409355	125	0.01
+13240	-472.409355	125	0.01
+13250	-472.409355	125	0.01
+13260	-472.409355	125	0.01
+13270	-472.409355	125	0.01
+13280	-472.409355	125	0.01
+13290	-472.409355	125	0.01
+13300	-472.409355	125	0.01
+13310	-472.409355	125	0.01
+13320	-472.4093378	125	0.01
+13330	-472.4093378	125	0.01
+13340	-472.4093378	125	0.01
+13350	-472.4093365	125	0.01
+13360	-472.4092804	125	0.01
+13370	-472.4092804	125	0.01
+13380	-472.4092804	125	0.01
+13390	-472.4092804	125	0.01
+13400	-472.4091632	125	0.01
+13410	-472.4091632	125	0.01
+13420	-472.4091632	125	0.01
+13430	-472.4091363	125	0.01
+13440	-472.4091363	125	0.01
+13450	-472.4091363	125	0.01
+13460	-472.4091363	125	0.01
+13470	-472.4091363	125	0.01
+13480	-472.4091362	126	0.01
+13490	-472.4091362	126	0.01
+13500	-472.4091362	126	0.01
+13510	-472.4091362	126	0.01
+13520	-472.4089698	126	0.01
+13530	-472.4089671	126	0.01
+13540	-472.4089671	126	0.01
+13550	-472.4089622	126	0.01
+13560	-472.4089622	126	0.01
+13570	-472.4089436	126	0.01
+13580	-472.4089436	126	0.01
+13590	-472.408765	126	0.01
+13600	-472.408765	126	0.01
+13610	-472.408765	126	0.01
+13620	-472.4086837	126	0.01
+13630	-472.4086837	126	0.01
+13640	-472.4086837	126	0.01
+13650	-472.4086837	126	0.01
+13660	-472.4086837	126	0.01
+13670	-472.4085869	126	0.01
+13680	-472.4085869	126	0.01
+13690	-472.4085869	126	0.01
+13700	-472.4085869	126	0.01
+13710	-472.4085869	126	0.01
+13720	-472.4085869	126	0.01
+13730	-472.4085869	126	0.01
+13740	-472.4085869	126	0.01
+13750	-472.4085869	126	0.01
+13760	-472.4085869	126	0.01
+13770	-472.4085869	126	0.01
+13780	-472.4085869	126	0.01
+13790	-472.4085869	126	0.01
+13800	-472.4085677	126	0.01
+13810	-472.4085677	127	0.01
+13820	-472.4085677	127	0.01
+13830	-472.4085677	127	0.01
+13840	-472.4085081	127	0.01
+13850	-472.4085081	127	0.01
+13860	-472.4085081	127	0.01
+13870	-472.4085081	127	0.01
+13880	-472.4085081	127	0.01
+13890	-472.4085081	127	0.01
+13900	-472.4084348	127	0.01
+13910	-472.4084348	127	0.01
+13920	-472.4084348	127	0.01
+13930	-472.4084348	127	0.01
+13940	-472.4084348	127	0.01
+13950	-472.4084348	127	0.01
+13960	-472.4084326	127	0.01
+13970	-472.4084326	127	0.01
+13980	-472.4084326	127	0.01
+13990	-472.4084326	127	0.01
+14000	-472.4084326	127	0.01
+14010	-472.4084326	127	0.01
+14020	-472.4084326	127	0.01
+14030	-472.4083786	127	0.01
+14040	-472.4083786	127	0.01
+14050	-472.4083786	127	0.01
+14060	-472.4083786	127	0.01
+14070	-472.4083786	127	0.01
+14080	-472.4083116	127	0.01
+14090	-472.4082533	127	0.01
+14100	-472.4082533	127	0.01
+14110	-472.4082533	127	0.01
+14120	-472.4081558	127	0.01
+14130	-472.4081558	128	0.01
+14140	-472.4081558	128	0.01
+14150	-472.4081558	128	0.01
+14160	-472.4081558	128	0.01
+14170	-472.4081558	128	0.01
+14180	-472.4081558	128	0.01
+14190	-472.4081425	128	0.01
+14200	-472.4080963	128	0.01
+14210	-472.4080963	128	0.01
+14220	-472.4080963	128	0.01
+14230	-472.4080916	128	0.01
+14240	-472.4080916	128	0.01
+14250	-472.4080916	128	0.01
+14260	-472.408059	128	0.01
+14270	-472.408059	128	0.01
+14280	-472.408059	128	0.01
+14290	-472.408059	128	0.01
+14300	-472.408059	128	0.01
+14310	-472.4078799	128	0.01
+14320	-472.4078799	128	0.01
+14330	-472.4078053	128	0.01
+14340	-472.407785	128	0.01
+14350	-472.407785	128	0.01
+14360	-472.4076851	128	0.01
+14370	-472.4076396	128	0.01
+14380	-472.4076396	128	0.01
+14390	-472.4076396	128	0.01
+14400	-472.4076188	128	0.01
+14410	-472.4076188	128	0.01
+14420	-472.4076188	128	0.01
+14430	-472.4076188	128	0.01
+14440	-472.4076188	128	0.01
+14450	-472.4076188	129	0.01
+14460	-472.4076188	129	0.01
+14470	-472.4075203	129	0.01
+14480	-472.4075203	129	0.01
+14490	-472.4074953	129	0.01
+14500	-472.4074953	129	0.01
+14510	-472.4073685	129	0.01
+14520	-472.4073685	129	0.01
+14530	-472.4073685	129	0.01
+14540	-472.4073685	129	0.01
+14550	-472.4073626	129	0.01
+14560	-472.4073626	129	0.01
+14570	-472.4073626	129	0.01
+14580	-472.4073626	129	0.01
+14590	-472.4073626	129	0.01
+14600	-472.4073626	129	0.01
+14610	-472.4073626	129	0.01
+14620	-472.4073352	129	0.01
+14630	-472.4073352	129	0.01
+14640	-472.4073352	129	0.01
+14650	-472.4073115	129	0.01
+14660	-472.4073115	129	0.01
+14670	-472.4073115	129	0.01
+14680	-472.4073115	129	0.01
+14690	-472.4073115	129	0.01
+14700	-472.4073097	129	0.01
+14710	-472.4073028	129	0.01
+14720	-472.4073028	129	0.01
+14730	-472.4073028	129	0.01
+14740	-472.4073028	129	0.01
+14750	-472.4073028	129	0.01
+14760	-472.4073028	129	0.01
+14770	-472.4073028	129	0.01
+14780	-472.4073028	130	0.01
+14790	-472.4073028	130	0.01
+14800	-472.4073028	130	0.01
+14810	-472.4073028	130	0.01
+14820	-472.4073028	130	0.01
+14830	-472.4073027	130	0.01
+14840	-472.4073027	130	0.01
+14850	-472.4073027	130	0.01
+14860	-472.4073027	130	0.01
+14870	-472.4073027	130	0.01
+14880	-472.4073027	130	0.01
+14890	-472.4073027	130	0.01
+14900	-472.4073027	130	0.01
+14910	-472.4073027	130	0.01
+14920	-472.4072111	130	0.01
+14930	-472.4071841	130	0.01
+14940	-472.4071841	130	0.01
+14950	-472.407184	130	0.01
+14960	-472.407184	130	0.01
+14970	-472.407184	130	0.01
+14980	-472.4071718	130	0.01
+14990	-472.4071708	130	0.01
+15000	-472.4071708	130	0.01
+15010	-472.4071708	130	0.01
+15020	-472.4071708	130	0.01
+15030	-472.4071708	130	0.01
+15040	-472.4071708	130	0.01
+15050	-472.4071708	130	0.01
+15060	-472.4071708	130	0.01
+15070	-472.4071708	130	0.01
+15080	-472.4071708	130	0.01
+15090	-472.4071708	130	0.01
+15100	-472.4071708	130	0.01
+15110	-472.4071708	131	0.01
+15120	-472.4071708	131	0.01
+15130	-472.4071708	131	0.01
+15140	-472.4070823	131	0.01
+15150	-472.4070823	131	0.01
+15160	-472.4070499	131	0.01
+15170	-472.4070499	131	0.01
+15180	-472.4070499	131	0.01
+15190	-472.4070499	131	0.01
+15200	-472.4070499	131	0.01
+15210	-472.4070499	131	0.01
+15220	-472.4070499	131	0.01
+15230	-472.4070499	131	0.01
+15240	-472.4070499	131	0.01
+15250	-472.4070499	131	0.01
+15260	-472.4070499	131	0.01
+15270	-472.4070499	131	0.01
+15280	-472.4070499	131	0.01
+15290	-472.4070499	131	0.01
+15300	-472.4070499	131	0.01
+15310	-472.4070499	131	0.01
+15320	-472.4069281	131	0.01
+15330	-472.4069082	131	0.01
+15340	-472.4069082	131	0.01
+15350	-472.4069082	131	0.01
+15360	-472.4069082	131	0.01
+15370	-472.4069082	131	0.01
+15380	-472.4069082	131	0.01
+15390	-472.4069082	131	0.01
+15400	-472.4069082	131	0.01
+15410	-472.406885	131	0.01
+15420	-472.406885	131	0.01
+15430	-472.406885	131	0.01
+15440	-472.4068242	132	0.01
+15450	-472.4068227	132	0.01
+15460	-472.4068227	132	0.01
+15470	-472.4068227	132	0.01
+15480	-472.4066805	132	0.01
+15490	-472.4066805	132	0.01
+15500	-472.4066805	132	0.01
+15510	-472.4066805	132	0.01
+15520	-472.4066061	132	0.01
+15530	-472.4066053	132	0.01
+15540	-472.4066053	132	0.01
+15550	-472.4066053	132	0.01
+15560	-472.4066053	132	0.01
+15570	-472.4066053	132	0.01
+15580	-472.4066053	132	0.01
+15590	-472.4066053	132	0.01
+15600	-472.4066053	132	0.01
+15610	-472.4065782	132	0.01
+15620	-472.4065782	132	0.01
+15630	-472.4065782	132	0.01
+15640	-472.4065782	132	0.01
+15650	-472.4065782	132	0.01
+15660	-472.4065782	132	0.01
+15670	-472.4065782	132	0.01
+15680	-472.4065782	132	0.01
+15690	-472.4065782	132	0.01
+15700	-472.4065758	132	0.01
+15710	-472.4065267	132	0.01
+15720	-472.4065267	132	0.01
+15730	-472.4065267	132	0.01
+15740	-472.4065267	132	0.01
+15750	-472.4065261	132	0.01
+15760	-472.4065261	132	0.01
+15770	-472.4065261	133	0.01
+15780	-472.4065261	133	0.01
+15790	-472.4065261	133	0.01
+15800	-472.4065261	133	0.01
+15810	-472.4065261	133	0.01
+15820	-472.4065257	133	0.01
+15830	-472.4065257	133	0.01
+15840	-472.4065257	133	0.01
+15850	-472.4065257	133	0.01
+15860	-472.4064676	133	0.01
+15870	-472.4064215	133	0.01
+15880	-472.4064215	133	0.01
+15890	-472.4064215	133	0.01
+15900	-472.4064215	133	0.01
+15910	-472.4064215	133	0.01
+15920	-472.4064168	133	0.01
+15930	-472.4064168	133	0.01
+15940	-472.4064168	133	0.01
+15950	-472.4064166	133	0.01
+15960	-472.4064166	133	0.01
+15970	-472.4064164	133	0.01
+15980	-472.4064164	133	0.01
+15990	-472.4064164	133	0.01
+16000	-472.4064164	133	0.01
+16010	-472.4064164	133	0.01
+16020	-472.4064164	133	0.01
+16030	-472.4063125	133	0.01
+16040	-472.4063125	133	0.01
+16050	-472.4063125	133	0.01
+16060	-472.4063125	133	0.01
+16070	-472.4063125	133	0.01
+16080	-472.4063125	133	0.01
+16090	-472.4063125	133	0.01
+16100	-472.4063125	134	0.01
+16110	-472.4063125	134	0.01
+16120	-472.4063018	134	0.01
+16130	-472.4063018	134	0.01
+16140	-472.4063018	134	0.01
+16150	-472.4063018	134	0.01
+16160	-472.4063018	134	0.01
+16170	-472.4063018	134	0.01
+16180	-472.4063018	134	0.01
+16190	-472.406294	134	0.01
+16200	-472.406294	134	0.01
+16210	-472.406294	134	0.01
+16220	-472.406294	134	0.01
+16230	-472.406294	134	0.01
+16240	-472.406294	134	0.01
+16250	-472.406294	134	0.01
+16260	-472.406294	134	0.01
+16270	-472.406294	134	0.01
+16280	-472.406294	134	0.01
+16290	-472.406294	134	0.01
+16300	-472.406294	134	0.01
+16310	-472.406294	134	0.01
+16320	-472.406294	134	0.01
+16330	-472.4061954	134	0.01
+16340	-472.4061954	134	0.01
+16350	-472.4061954	134	0.01
+16360	-472.4061954	134	0.01
+16370	-472.4061954	134	0.01
+16380	-472.40617	134	0.01
+16390	-472.40617	134	0.01
+16400	-472.4061643	134	0.01
+16410	-472.4061643	135	0.01
+16420	-472.4061643	135	0.01
+16430	-472.4061643	135	0.01
+16440	-472.4061643	135	0.01
+16450	-472.4061338	135	0.01
+16460	-472.4061338	135	0.01
+16470	-472.4061338	135	0.01
+16480	-472.4061338	135	0.01
+16490	-472.4061338	135	0.01
+16500	-472.4061338	135	0.01
+16510	-472.4061338	135	0.01
+16520	-472.4061338	135	0.01
+16530	-472.4061338	135	0.01
+16540	-472.4061338	135	0.01
+16550	-472.4061338	135	0.01
+16560	-472.4061338	135	0.01
+16570	-472.4061338	135	0.01
+16580	-472.4061338	135	0.01
+16590	-472.4061338	135	0.01
+16600	-472.4061338	135	0.01
+16610	-472.4061338	135	0.01
+16620	-472.4061338	135	0.01
+16630	-472.4061338	135	0.01
+16640	-472.4061338	135	0.01
+16650	-472.4061338	135	0.01
+16660	-472.4061338	135	0.01
+16670	-472.4061338	135	0.01
+16680	-472.4061338	135	0.01
+16690	-472.4061338	135	0.01
+16700	-472.4061338	135	0.01
+16710	-472.4061338	135	0.01
+16720	-472.4061338	136	0.01
+16730	-472.4061338	136	0.01
+16740	-472.4061338	136	0.01
+16750	-472.4061101	136	0.01
+16760	-472.4061101	136	0.01
+16770	-472.4061069	136	0.01
+16780	-472.4061069	136	0.01
+16790	-472.4061069	136	0.01
+16800	-472.4060979	136	0.01
+16810	-472.4060979	136	0.01
+16820	-472.4060979	136	0.01
+16830	-472.4060979	136	0.01
+16840	-472.4060979	136	0.01
+16850	-472.4060979	136	0.01
+16860	-472.4060979	136	0.01
+16870	-472.4060979	136	0.01
+16880	-472.4060979	136	0.01
+16890	-472.4060979	136	0.01
+16900	-472.4060979	136	0.01
+16910	-472.4060979	136	0.01
+16920	-472.4060979	136	0.01
+16930	-472.4060979	136	0.01
+16940	-472.4060979	136	0.01
+16950	-472.4060979	136	0.01
+16960	-472.4060484	136	0.01
+16970	-472.4060484	136	0.01
+16980	-472.4060484	136	0.01
+16990	-472.4060484	136	0.01
+17000	-472.4060484	136	0.01
+17010	-472.4060484	136	0.01
+17020	-472.4059128	136	0.01
+17030	-472.4059128	137	0.01
+17040	-472.4059128	137	0.01
+17050	-472.4059128	137	0.01
+17060	-472.4058436	137	0.01
+17070	-472.4058436	137	0.01
+17080	-472.4058436	137	0.01
+17090	-472.4058436	137	0.01
+17100	-472.4058436	137	0.01
+17110	-472.405798	137	0.01
+17120	-472.405798	137	0.01
+17130	-472.405798	137	0.01
+17140	-472.405798	137	0.01
+17150	-472.405798	137	0.01
+17160	-472.405798	137	0.01
+17170	-472.405798	137	0.01
+17180	-472.405798	137	0.01
+17190	-472.405798	137	0.01
+17200	-472.405798	137	0.01
+17210	-472.405798	137	0.01
+17220	-472.405798	137	0.01
+17230	-472.405798	137	0.01
+17240	-472.405798	137	0.01
+17250	-472.405798	137	0.01
+17260	-472.405798	137	0.01
+17270	-472.405798	137	0.01
+17280	-472.4057977	137	0.01
+17290	-472.4057977	137	0.01
+17300	-472.4057977	137	0.01
+17310	-472.4057977	137	0.01
+17320	-472.4057976	137	0.01
+17330	-472.4057976	137	0.01
+17340	-472.4057976	137	0.01
+17350	-472.4057976	138	0.01
+17360	-472.4057976	138	0.01
+17370	-472.4057976	138	0.01
+17380	-472.4057976	138	0.01
+17390	-472.4057976	138	0.01
+17400	-472.4057976	138	0.01
+17410	-472.4057976	138	0.01
+17420	-472.4057976	138	0.01
+17430	-472.4057918	138	0.01
+17440	-472.4057916	138	0.01
+17450	-472.4057916	138	0.01
+17460	-472.405774	138	0.01
+17470	-472.4056591	138	0.01
+17480	-472.4056591	138	0.01
+17490	-472.4056591	138	0.01
+17500	-472.4056591	138	0.01
+17510	-472.4056591	138	0.01
+17520	-472.4056591	138	0.01
+17530	-472.4056591	138	0.01
+17540	-472.4056574	138	0.01
+17550	-472.4056574	138	0.01
+17560	-472.4056574	138	0.01
+17570	-472.4056574	138	0.01
+17580	-472.4056574	138	0.01
+17590	-472.4056574	138	0.01
+17600	-472.4056574	138	0.01
+17610	-472.4056443	138	0.01
+17620	-472.4056443	138	0.01
+17630	-472.4056443	138	0.01
+17640	-472.4056339	138	0.01
+17650	-472.4056339	138	0.01
+17660	-472.4056339	139	0.01
+17670	-472.4056339	139	0.01
+17680	-472.4055382	139	0.01
+17690	-472.4055382	139	0.01
+17700	-472.4055382	139	0.01
+17710	-472.4055382	139	0.01
+17720	-472.4055382	139	0.01
+17730	-472.4055382	139	0.01
+17740	-472.4055376	139	0.01
+17750	-472.4054631	139	0.01
+17760	-472.4054631	139	0.01
+17770	-472.4054631	139	0.01
+17780	-472.4054631	139	0.01
+17790	-472.4054631	139	0.01
+17800	-472.4054631	139	0.01
+17810	-472.4054631	139	0.01
+17820	-472.4054631	139	0.01
+17830	-472.4053516	139	0.01
+17840	-472.4053516	139	0.01
+17850	-472.4053516	139	0.01
+17860	-472.4053516	139	0.01
+17870	-472.4053516	139	0.01
+17880	-472.4052487	139	0.01
+17890	-472.4052487	139	0.01
+17900	-472.4052487	139	0.01
+17910	-472.4052194	139	0.01
+17920	-472.4049781	139	0.01
+17930	-472.4049577	139	0.01
+17940	-472.4049577	139	0.01
+17950	-472.4048071	139	0.01
+17960	-472.4048071	139	0.01
+17970	-472.4048071	139	0.01
+17980	-472.4048071	140	0.01
+17990	-472.4048071	140	0.01
+18000	-472.4048071	140	0.01
+18010	-472.4048071	140	0.01
+18020	-472.4048071	140	0.01
+18030	-472.4048071	140	0.01
+18040	-472.4048071	140	0.01
+18050	-472.4048071	140	0.01
+18060	-472.4048071	140	0.01
+18070	-472.4048071	140	0.01
+18080	-472.4048071	140	0.01
+18090	-472.4048071	140	0.01
+18100	-472.4048071	140	0.01
+18110	-472.4048071	140	0.01
+18120	-472.4048071	140	0.01
+18130	-472.4048071	140	0.01
+18140	-472.4047703	140	0.01
+18150	-472.4047703	140	0.01
+18160	-472.4047703	140	0.01
+18170	-472.4047703	140	0.01
+18180	-472.4047703	140	0.01
+18190	-472.4047703	140	0.01
+18200	-472.4047703	140	0.01
+18210	-472.4047703	140	0.01
+18220	-472.4047389	140	0.01
+18230	-472.4047389	140	0.01
+18240	-472.4047389	140	0.01
+18250	-472.4047389	140	0.01
+18260	-472.4047389	140	0.01
+18270	-472.4047389	141	0.01
+18280	-472.4047389	141	0.01
+18290	-472.4047389	141	0.01
+18300	-472.4047389	141	0.01
+18310	-472.4047389	141	0.01
+18320	-472.4047389	141	0.01
+18330	-472.4047389	141	0.01
+18340	-472.4047389	141	0.01
+18350	-472.4047389	141	0.01
+18360	-472.4047389	141	0.01
+18370	-472.4047356	141	0.01
+18380	-472.4047356	141	0.01
+18390	-472.4047356	141	0.01
+18400	-472.4047356	141	0.01
+18410	-472.4047356	141	0.01
+18420	-472.4047356	141	0.01
+18430	-472.4047356	141	0.01
+18440	-472.4047356	141	0.01
+18450	-472.4047299	141	0.01
+18460	-472.4046193	141	0.01
+18470	-472.4046193	141	0.01
+18480	-472.4045782	141	0.01
+18490	-472.4045782	141	0.01
+18500	-472.4045782	141	0.01
+18510	-472.4045782	141	0.01
+18520	-472.4045782	141	0.01
+18530	-472.4045782	141	0.01
+18540	-472.4045782	141	0.01
+18550	-472.4045677	141	0.01
+18560	-472.4045677	141	0.01
+18570	-472.4045677	142	0.01
+18580	-472.4045677	142	0.01
+18590	-472.4045677	142	0.01
+18600	-472.4045677	142	0.01
+Score after final optimization: -472.390577
+Final	-472.390577	142	0.01
+Search rep 4 (of 5)
+random seed = 1786917786
+gen	best_like	time	optPrecision
+0	-807.0588932	142	0.5
+10	-747.0898441	142	0.5
+20	-740.5641103	142	0.5
+30	-732.1159328	142	0.5
+40	-706.6682537	142	0.5
+50	-689.6513111	142	0.5
+60	-665.2880023	142	0.5
+70	-625.9470847	142	0.5
+80	-619.8814975	142	0.5
+90	-619.3532348	142	0.5
+100	-601.5939411	142	0.5
+110	-601.5636424	142	0.5
+120	-597.1365307	142	0.5
+130	-574.7818296	142	0.5
+140	-571.6650054	142	0.5
+150	-570.5979178	142	0.5
+160	-570.3749379	142	0.5
+170	-546.7755646	142	0.5
+180	-545.4756589	142	0.5
+190	-542.4176906	142	0.5
+200	-526.361704	142	0.5
+210	-525.444763	142	0.5
+220	-524.6398226	142	0.5
+230	-522.7323979	142	0.5
+240	-521.6012133	142	0.5
+250	-517.7062494	142	0.5
+260	-517.7032926	142	0.5
+270	-516.6137718	142	0.5
+280	-512.5291976	142	0.5
+290	-512.4642291	142	0.5
+300	-512.4134519	142	0.5
+310	-512.4091066	142	0.5
+320	-512.3360165	142	0.5
+330	-510.2474859	142	0.5
+340	-501.138908	142	0.5
+350	-500.9932234	142	0.5
+360	-500.9932234	142	0.5
+370	-500.8392315	142	0.5
+380	-500.4898303	142	0.5
+390	-483.5238649	142	0.5
+400	-483.5238174	143	0.5
+410	-483.0581226	143	0.5
+420	-482.9963245	143	0.5
+430	-482.9807178	143	0.5
+440	-482.9098761	143	0.5
+450	-482.7449103	143	0.5
+460	-482.6460015	143	0.5
+470	-482.568791	143	0.5
+480	-481.7325178	143	0.5
+490	-481.5211476	143	0.5
+500	-481.4931113	143	0.5
+510	-481.478472	143	0.5
+520	-481.3811708	143	0.5
+530	-481.3232302	143	0.5
+540	-481.2844524	143	0.5
+550	-481.2158741	143	0.5
+560	-481.2019269	143	0.5
+570	-481.087531	143	0.5
+580	-481.0257669	143	0.5
+590	-481.0089727	143	0.5
+600	-481.0061032	143	0.5
+610	-480.9702841	143	0.5
+620	-480.9686871	143	0.5
+630	-480.9266705	143	0.5
+640	-480.7415656	143	0.5
+650	-480.7004284	143	0.5
+660	-480.7004284	143	0.5
+670	-480.5407143	143	0.5
+680	-480.4687018	143	0.5
+690	-480.0854655	143	0.5
+700	-480.0820552	143	0.5
+710	-480.0820529	143	0.5
+720	-478.8643318	143	0.5
+730	-478.1006921	143	0.5
+740	-478.0633895	143	0.5
+750	-477.999106	143	0.5
+760	-477.8883375	143	0.5
+770	-477.7403611	143	0.5
+780	-477.7186	143	0.5
+790	-477.5978888	143	0.5
+800	-477.5501662	143	0.5
+810	-477.540452	143	0.5
+820	-477.527865	143	0.5
+830	-477.427696	143	0.5
+840	-477.3777758	143	0.5
+850	-477.3675196	143	0.5
+860	-477.3430135	143	0.5
+870	-477.3423661	143	0.5
+880	-477.2745499	143	0.5
+890	-477.2219846	143	0.5
+900	-477.1061557	143	0.5
+910	-477.0967825	143	0.5
+920	-477.0531173	143	0.5
+930	-477.0143596	143	0.5
+940	-476.9359926	143	0.5
+950	-476.8966987	144	0.5
+960	-476.8703004	144	0.5
+970	-476.825049	144	0.5
+980	-476.747259	144	0.5
+990	-476.7193669	144	0.5
+1000	-476.7057851	144	0.5
+1010	-476.6288436	144	0.5
+1020	-476.6130947	144	0.5
+1030	-476.5065798	144	0.5
+1040	-476.4927828	144	0.5
+1050	-476.4682186	144	0.5
+1060	-476.3891241	144	0.5
+1070	-476.3496938	144	0.5
+1080	-476.3324637	144	0.5
+1090	-476.2768088	144	0.5
+1100	-476.2214137	144	0.5
+1110	-476.2183468	144	0.5
+1120	-476.2121566	144	0.5
+1130	-476.1746457	144	0.5
+1140	-476.1662232	144	0.5
+1150	-476.1316761	144	0.5
+1160	-476.0948803	144	0.5
+1170	-476.0712428	144	0.5
+1180	-476.0142453	144	0.5
+1190	-475.9485336	144	0.5
+1200	-475.8902635	144	0.5
+1210	-475.8536383	144	0.5
+1220	-475.8493003	144	0.5
+1230	-475.8096145	144	0.5
+1240	-475.8095107	144	0.5
+1250	-475.8075438	144	0.5
+1260	-475.7972198	144	0.5
+1270	-475.7730397	144	0.5
+1280	-475.7605684	144	0.5
+1290	-475.7083062	144	0.5
+1300	-475.6326207	144	0.5
+1310	-475.6129311	144	0.5
+1320	-475.6129311	144	0.5
+1330	-475.5836361	144	0.5
+1340	-475.5794036	144	0.5
+1350	-475.576884	144	0.5
+1360	-475.5414325	144	0.5
+1370	-475.534206	144	0.5
+1380	-475.5275586	144	0.5
+1390	-475.4959581	144	0.5
+1400	-475.4871009	144	0.5
+1410	-475.4779304	144	0.5
+1420	-475.4777501	144	0.5
+1430	-475.4627457	144	0.5
+1440	-475.4617997	144	0.5
+1450	-475.4370753	144	0.5
+1460	-475.4326027	144	0.5
+1470	-475.4281444	144	0.5
+1480	-475.4274153	144	0.5
+1490	-475.3968614	144	0.5
+1500	-475.388064	145	0.5
+1510	-475.388064	145	0.5
+1520	-475.3880298	145	0.5
+1530	-475.3747881	145	0.5
+1540	-475.3690096	145	0.5
+1550	-475.3676016	145	0.5
+1560	-475.2548784	145	0.5
+1570	-475.2498601	145	0.5
+1580	-475.23677	145	0.5
+1590	-475.2333162	145	0.5
+1600	-475.1881458	145	0.5
+1610	-475.1551371	145	0.5
+1620	-475.1367975	145	0.5
+1630	-475.0892017	145	0.5
+1640	-475.0418722	145	0.5
+1650	-474.9968801	145	0.5
+1660	-474.9956504	145	0.5
+1670	-474.9926866	145	0.5
+1680	-474.9653067	145	0.5
+1690	-474.9378328	145	0.5
+1700	-474.9284928	145	0.5
+1710	-474.9284928	145	0.5
+1720	-474.9266348	145	0.5
+1730	-474.9024987	145	0.5
+1740	-474.9024987	145	0.5
+1750	-474.8794885	145	0.5
+1760	-474.8417746	145	0.5
+1770	-474.8385016	145	0.5
+1780	-474.8385016	145	0.5
+1790	-474.7792754	145	0.5
+1800	-474.745277	145	0.5
+1810	-474.7376051	145	0.5
+1820	-474.7224675	145	0.5
+1830	-474.6841423	145	0.5
+1840	-474.6811105	145	0.5
+1850	-474.6809755	145	0.5
+1860	-474.6809755	145	0.5
+1870	-474.6485393	145	0.5
+1880	-474.6456332	145	0.5
+1890	-474.6132123	145	0.5
+1900	-474.6093863	145	0.5
+1910	-474.6039177	145	0.5
+1920	-474.6039177	145	0.5
+1930	-474.5881275	145	0.5
+1940	-474.5850388	145	0.5
+1950	-474.5507878	145	0.5
+1960	-474.539249	145	0.5
+1970	-474.5367463	145	0.5
+1980	-474.5367463	145	0.5
+1990	-474.5259791	145	0.5
+2000	-474.5233475	145	0.5
+2010	-474.5110023	145	0.5
+2020	-474.5055744	145	0.5
+2030	-474.505393	145	0.5
+2040	-474.5030755	146	0.5
+2050	-474.5015683	146	0.5
+2060	-474.5015683	146	0.5
+2070	-474.4901888	146	0.5
+2080	-474.4892626	146	0.5
+2090	-474.4753103	146	0.5
+2100	-474.4727969	146	0.5
+2110	-474.467213	146	0.5
+2120	-474.4665624	146	0.5
+2130	-474.4665624	146	0.5
+2140	-474.4486473	146	0.5
+2150	-474.4485962	146	0.5
+2160	-474.4324045	146	0.5
+2170	-474.4324045	146	0.5
+2180	-474.4277643	146	0.5
+2190	-474.4254192	146	0.5
+2200	-474.4252577	146	0.5
+2210	-474.397051	146	0.5
+2220	-474.3871831	146	0.5
+2230	-474.370861	146	0.5
+2240	-474.3579739	146	0.5
+2250	-474.3578725	146	0.5
+2260	-474.3510535	146	0.5
+2270	-474.3506431	146	0.5
+2280	-474.3437576	146	0.5
+2290	-474.3422416	146	0.5
+2300	-474.3405301	146	0.5
+2310	-474.3324122	146	0.5
+2320	-474.3324122	146	0.5
+2330	-474.3321186	146	0.5
+2340	-474.3173825	146	0.5
+2350	-474.3167172	146	0.5
+2360	-474.315382	146	0.5
+2370	-474.3129707	146	0.5
+2380	-474.3018652	146	0.5
+2390	-474.3018652	146	0.5
+2400	-474.2961597	146	0.5
+2410	-474.2927032	146	0.5
+2420	-474.2807973	146	0.5
+2430	-474.2713794	146	0.5
+2440	-474.2529958	146	0.5
+2450	-474.2529958	146	0.5
+2460	-474.2529958	146	0.5
+2470	-474.2529958	146	0.5
+2480	-474.2486573	147	0.5
+2490	-474.2441023	147	0.5
+2500	-474.2187193	147	0.5
+2510	-474.2181457	147	0.5
+2520	-474.2111448	147	0.5
+2530	-474.2031734	147	0.5
+2540	-474.1942545	147	0.5
+2550	-474.1912516	147	0.5
+2560	-474.1912307	147	0.5
+2570	-474.1912307	147	0.5
+2580	-474.1912307	147	0.5
+2590	-474.1912307	147	0.5
+2600	-474.1912079	147	0.5
+2610	-474.1903446	147	0.451
+2620	-474.1894449	147	0.451
+2630	-474.1861971	147	0.451
+2640	-474.1858238	147	0.451
+2650	-474.1858238	147	0.451
+2660	-474.1856513	147	0.451
+2670	-474.1836018	147	0.451
+2680	-474.1827638	147	0.451
+2690	-474.1824054	147	0.451
+2700	-474.1788355	147	0.451
+2710	-474.1786465	147	0.451
+2720	-474.1761484	147	0.451
+2730	-474.1761484	147	0.451
+2740	-474.1761484	147	0.451
+2750	-474.1761484	147	0.451
+2760	-474.172614	147	0.451
+2770	-474.172614	147	0.451
+2780	-474.1724034	147	0.451
+2790	-474.1718215	147	0.451
+2800	-474.1711692	147	0.451
+2810	-474.1656679	147	0.451
+2820	-474.1651057	147	0.451
+2830	-474.160719	147	0.451
+2840	-474.1593186	147	0.451
+2850	-474.158979	147	0.451
+2860	-474.1589297	147	0.451
+2870	-474.1576201	147	0.451
+2880	-474.1576201	147	0.451
+2890	-474.1576201	147	0.451
+2900	-474.153845	147	0.451
+2910	-474.1538059	147	0.451
+2920	-474.1538059	147	0.451
+2930	-474.1538059	148	0.451
+2940	-474.1511472	148	0.451
+2950	-474.151015	148	0.451
+2960	-474.1499474	148	0.451
+2970	-474.1489943	148	0.451
+2980	-474.1481749	148	0.451
+2990	-474.1458282	148	0.451
+3000	-474.1458282	148	0.451
+3010	-474.1457854	148	0.451
+3020	-474.1457854	148	0.451
+3030	-474.1442509	148	0.451
+3040	-474.1441508	148	0.451
+3050	-474.1441508	148	0.451
+3060	-474.1440371	148	0.451
+3070	-474.1382963	148	0.451
+3080	-474.1368914	148	0.451
+3090	-474.1343385	148	0.451
+3100	-474.1336045	148	0.451
+3110	-474.1330812	148	0.402
+3120	-474.1329047	148	0.402
+3130	-474.1325395	148	0.402
+3140	-474.1324203	148	0.402
+3150	-474.1323244	148	0.402
+3160	-474.1323244	148	0.402
+3170	-474.1323244	148	0.402
+3180	-474.132282	148	0.402
+3190	-474.1322785	148	0.402
+3200	-474.1318343	148	0.402
+3210	-474.1318343	148	0.402
+3220	-474.1302402	148	0.402
+3230	-474.1302402	148	0.402
+3240	-474.1302402	148	0.402
+3250	-474.1302402	148	0.402
+3260	-474.1302402	148	0.402
+3270	-474.1279421	148	0.402
+3280	-474.1273339	148	0.402
+3290	-474.1255173	148	0.402
+3300	-474.1251549	148	0.402
+3310	-474.1250783	148	0.402
+3320	-474.1250783	148	0.402
+3330	-474.1218089	148	0.402
+3340	-474.1202192	148	0.402
+3350	-474.1199737	148	0.402
+3360	-474.1199737	148	0.402
+3370	-474.1178917	148	0.402
+3380	-474.1155619	148	0.402
+3390	-474.1154174	148	0.402
+3400	-474.1153601	148	0.402
+3410	-474.1151702	148	0.402
+3420	-474.1150626	148	0.402
+3430	-474.1139459	148	0.402
+3440	-474.1115037	148	0.402
+3450	-474.1115037	149	0.402
+3460	-474.110476	149	0.402
+3470	-474.110476	149	0.402
+3480	-474.110476	149	0.402
+3490	-474.1049894	149	0.402
+3500	-474.1049592	149	0.402
+3510	-474.1000513	149	0.402
+3520	-474.0998472	149	0.402
+3530	-474.0945498	149	0.402
+3540	-474.0933195	149	0.402
+3550	-474.0933195	149	0.402
+3560	-474.0933188	149	0.402
+3570	-474.0933188	149	0.402
+3580	-474.0933188	149	0.402
+3590	-474.0922682	149	0.402
+3600	-474.0922682	149	0.402
+3610	-474.0901294	149	0.353
+3620	-474.0893814	149	0.353
+3630	-474.0893814	149	0.353
+3640	-474.0893814	149	0.353
+3650	-474.087985	149	0.353
+3660	-474.0869002	149	0.353
+3670	-474.0869002	149	0.353
+3680	-474.0860366	149	0.353
+3690	-474.0853319	149	0.353
+3700	-474.0853319	149	0.353
+3710	-474.0853319	149	0.353
+3720	-474.083732	149	0.353
+3730	-474.0811446	149	0.353
+3740	-474.0811446	149	0.353
+3750	-474.0811446	149	0.353
+3760	-474.0810589	149	0.353
+3770	-474.0810589	149	0.353
+3780	-474.0800581	149	0.353
+3790	-474.0796174	149	0.353
+3800	-474.0781486	149	0.353
+3810	-474.0779489	149	0.353
+3820	-474.0779489	149	0.353
+3830	-474.0775252	149	0.353
+3840	-474.0762419	149	0.353
+3850	-474.0762239	149	0.353
+3860	-474.0759265	149	0.353
+3870	-474.071962	149	0.353
+3880	-474.071962	149	0.353
+3890	-474.071962	149	0.353
+3900	-474.0709829	149	0.353
+3910	-474.0709829	149	0.353
+3920	-474.069777	149	0.353
+3930	-474.0686855	149	0.353
+3940	-474.0685042	149	0.353
+3950	-474.0683714	149	0.353
+3960	-474.0675583	149	0.353
+3970	-474.0675583	149	0.353
+3980	-474.0675556	149	0.353
+3990	-474.0675555	149	0.353
+4000	-474.0675555	149	0.353
+4010	-474.0675342	150	0.353
+4020	-474.0650267	150	0.353
+4030	-474.0648147	150	0.353
+4040	-474.0648147	150	0.353
+4050	-474.0648147	150	0.353
+4060	-474.0614331	150	0.353
+4070	-474.0614331	150	0.353
+4080	-474.0584945	150	0.353
+4090	-474.0556901	150	0.353
+4100	-474.0556876	150	0.353
+4110	-474.0544301	150	0.304
+4120	-474.0544301	150	0.304
+4130	-474.0538156	150	0.304
+4140	-474.0536709	150	0.304
+4150	-474.0536709	150	0.304
+4160	-474.0536709	150	0.304
+4170	-474.0535493	150	0.304
+4180	-474.0535493	150	0.304
+4190	-474.0535493	150	0.304
+4200	-474.0534115	150	0.304
+4210	-474.0530052	150	0.304
+4220	-474.0530052	150	0.304
+4230	-474.0530052	150	0.304
+4240	-474.0493459	150	0.304
+4250	-474.0493459	150	0.304
+4260	-474.0491769	150	0.304
+4270	-474.0489882	150	0.304
+4280	-474.0489882	150	0.304
+4290	-474.0489864	150	0.304
+4300	-474.0476673	150	0.304
+4310	-474.0476673	150	0.304
+4320	-474.0476673	150	0.304
+4330	-474.0475876	150	0.304
+4340	-474.0471543	150	0.304
+4350	-474.0469999	150	0.304
+4360	-474.0458917	150	0.304
+4370	-474.0454559	150	0.304
+4380	-474.0454379	150	0.304
+4390	-474.0433814	150	0.304
+4400	-474.0391319	150	0.304
+4410	-474.0386507	150	0.304
+4420	-474.0386507	150	0.304
+4430	-474.0386507	150	0.304
+4440	-474.0385409	150	0.304
+4450	-474.0385409	150	0.304
+4460	-474.0383356	150	0.304
+4470	-474.0375153	150	0.304
+4480	-474.035946	150	0.304
+4490	-474.035434	150	0.304
+4500	-474.0353492	150	0.304
+4510	-474.0353492	150	0.304
+4520	-474.0342368	150	0.304
+4530	-474.0342368	151	0.304
+4540	-474.034236	151	0.304
+4550	-474.0334596	151	0.304
+4560	-474.0333993	151	0.304
+4570	-474.0333993	151	0.304
+4580	-474.0333993	151	0.304
+4590	-474.0333993	151	0.304
+4600	-474.0333993	151	0.304
+4610	-474.0333993	151	0.255
+4620	-474.031652	151	0.255
+4630	-474.031652	151	0.255
+4640	-474.0315349	151	0.255
+4650	-474.0315349	151	0.255
+4660	-474.0315065	151	0.255
+4670	-474.0315065	151	0.255
+4680	-474.0315014	151	0.255
+4690	-474.0314255	151	0.255
+4700	-474.028345	151	0.255
+4710	-474.028345	151	0.255
+4720	-474.028345	151	0.255
+4730	-474.028345	151	0.255
+4740	-474.028345	151	0.255
+4750	-474.028345	151	0.255
+4760	-474.028345	151	0.255
+4770	-474.028345	151	0.255
+4780	-474.028345	151	0.255
+4790	-474.028345	151	0.255
+4800	-474.0282346	151	0.255
+4810	-474.0282346	151	0.255
+4820	-474.0271089	151	0.255
+4830	-474.0268841	151	0.255
+4840	-474.0268841	151	0.255
+4850	-474.0268841	151	0.255
+4860	-474.0268835	151	0.255
+4870	-474.0268685	151	0.255
+4880	-474.0263571	151	0.255
+4890	-474.0263571	151	0.255
+4900	-474.0261646	151	0.255
+4910	-474.0260628	151	0.255
+4920	-474.0260628	151	0.255
+4930	-474.0260628	151	0.255
+4940	-474.0260628	151	0.255
+4950	-474.0260628	151	0.255
+4960	-474.0238886	151	0.255
+4970	-474.0228282	151	0.255
+4980	-474.0228282	151	0.255
+4990	-474.0227605	151	0.255
+5000	-474.0227605	152	0.255
+5010	-474.022646	152	0.255
+5020	-474.022646	152	0.255
+5030	-474.022646	152	0.255
+5040	-474.0210341	152	0.255
+5050	-474.0210341	152	0.255
+5060	-474.0204252	152	0.255
+5070	-474.0201667	152	0.255
+5080	-474.0183132	152	0.255
+5090	-474.0183132	152	0.255
+5100	-474.0183132	152	0.255
+5110	-474.0179787	152	0.206
+5120	-474.0176429	152	0.206
+5130	-474.0171268	152	0.206
+5140	-474.0166771	152	0.206
+5150	-474.0161754	152	0.206
+5160	-474.0159772	152	0.206
+5170	-474.0159772	152	0.206
+5180	-474.0156038	152	0.206
+5190	-474.0156038	152	0.206
+5200	-474.0155368	152	0.206
+5210	-474.0154582	152	0.206
+5220	-474.0152319	152	0.206
+5230	-474.0152319	152	0.206
+5240	-474.015206	152	0.206
+5250	-474.0143484	152	0.206
+5260	-474.0143484	152	0.206
+5270	-474.0143484	152	0.206
+5280	-474.0143484	152	0.206
+5290	-474.0126231	152	0.206
+5300	-474.0118346	152	0.206
+5310	-474.0118346	152	0.206
+5320	-474.0118346	152	0.206
+5330	-474.0118346	152	0.206
+5340	-474.0110291	152	0.206
+5350	-474.0107928	152	0.206
+5360	-474.0107928	152	0.206
+5370	-474.0107466	152	0.206
+5380	-474.0106162	152	0.206
+5390	-474.0088852	152	0.206
+5400	-474.0088852	152	0.206
+5410	-474.0088852	152	0.206
+5420	-474.0088852	152	0.206
+5430	-474.0083239	152	0.206
+5440	-474.0081975	152	0.206
+5450	-474.0078669	152	0.206
+5460	-474.0078234	152	0.206
+5470	-474.0078234	152	0.206
+5480	-474.0077036	152	0.206
+5490	-474.0077035	152	0.206
+5500	-474.0077035	152	0.206
+5510	-474.0077035	153	0.206
+5520	-474.0077035	153	0.206
+5530	-474.0077035	153	0.206
+5540	-474.0074149	153	0.206
+5550	-474.0074149	153	0.206
+5560	-474.0074149	153	0.206
+5570	-474.0074149	153	0.206
+5580	-474.0066892	153	0.206
+5590	-474.005763	153	0.206
+5600	-474.0052878	153	0.206
+5610	-474.0052878	153	0.157
+5620	-474.0052805	153	0.157
+5630	-474.0050203	153	0.157
+5640	-474.0050203	153	0.157
+5650	-474.0050203	153	0.157
+5660	-474.0049377	153	0.157
+5670	-474.0049377	153	0.157
+5680	-474.0042572	153	0.157
+5690	-474.0042572	153	0.157
+5700	-474.0042572	153	0.157
+5710	-474.0042572	153	0.157
+5720	-474.0042572	153	0.157
+5730	-474.0042572	153	0.157
+5740	-474.0042572	153	0.157
+5750	-474.0039134	153	0.157
+5760	-474.0039134	153	0.157
+5770	-474.0023759	153	0.157
+5780	-474.0023759	153	0.157
+5790	-474.0023759	153	0.157
+5800	-474.0023759	153	0.157
+5810	-474.0023759	153	0.157
+5820	-474.0023759	153	0.157
+5830	-474.0022669	153	0.157
+5840	-474.0022669	153	0.157
+5850	-474.0019192	153	0.157
+5860	-474.0018707	153	0.157
+5870	-474.0018707	153	0.157
+5880	-474.0018707	153	0.157
+5890	-474.0010224	153	0.157
+5900	-474.0009417	153	0.157
+5910	-474.0002343	153	0.157
+5920	-474.0002343	153	0.157
+5930	-474.0002343	153	0.157
+5940	-474.0002343	153	0.157
+5950	-474.0002179	153	0.157
+5960	-474.0002179	153	0.157
+5970	-474.0002179	154	0.157
+5980	-474.0001781	154	0.157
+5990	-474.0001781	154	0.157
+6000	-474.0000523	154	0.157
+6010	-473.9994784	154	0.157
+6020	-473.9994784	154	0.157
+6030	-473.9992772	154	0.157
+6040	-473.9992728	154	0.157
+6050	-473.9992728	154	0.157
+6060	-473.9987649	154	0.157
+6070	-473.9987649	154	0.157
+6080	-473.9987074	154	0.157
+6090	-473.9987074	154	0.157
+6100	-473.9987074	154	0.157
+6110	-473.9987074	154	0.108
+6120	-473.9987074	154	0.108
+6130	-473.9986973	154	0.108
+6140	-473.9986973	154	0.108
+6150	-473.9986973	154	0.108
+6160	-473.9975753	154	0.108
+6170	-473.9968634	154	0.108
+6180	-473.9968634	154	0.108
+6190	-473.9968634	154	0.108
+6200	-473.9968634	154	0.108
+6210	-473.9966757	154	0.108
+6220	-473.9966738	154	0.108
+6230	-473.9966738	154	0.108
+6240	-473.9952186	154	0.108
+6250	-473.9945402	154	0.108
+6260	-473.9945402	154	0.108
+6270	-473.9945402	154	0.108
+6280	-473.9945402	154	0.108
+6290	-473.9937155	154	0.108
+6300	-473.9937155	154	0.108
+6310	-473.9936914	154	0.108
+6320	-473.9936914	154	0.108
+6330	-473.9936914	154	0.108
+6340	-473.9936914	154	0.108
+6350	-473.9936914	154	0.108
+6360	-473.9936914	154	0.108
+6370	-473.9930118	154	0.108
+6380	-473.9927308	154	0.108
+6390	-473.9926636	154	0.108
+6400	-473.9926636	154	0.108
+6410	-473.9926205	154	0.108
+6420	-473.9926205	154	0.108
+6430	-473.9926205	154	0.108
+6440	-473.9926129	155	0.108
+6450	-473.9926129	155	0.108
+6460	-473.9924879	155	0.108
+6470	-473.9923286	155	0.108
+6480	-473.9918222	155	0.108
+6490	-473.9915956	155	0.108
+6500	-473.9915956	155	0.108
+6510	-473.9913928	155	0.108
+6520	-473.9913928	155	0.108
+6530	-473.9913925	155	0.108
+6540	-473.9912315	155	0.108
+6550	-473.9908581	155	0.108
+6560	-473.9908265	155	0.108
+6570	-473.9908265	155	0.108
+6580	-473.9907599	155	0.108
+6590	-473.990759	155	0.108
+6600	-473.9905093	155	0.108
+6610	-473.9905093	155	0.059
+6620	-473.990361	155	0.059
+6630	-473.9903602	155	0.059
+6640	-473.9897702	155	0.059
+6650	-473.9897702	155	0.059
+6660	-473.9888031	155	0.059
+6670	-473.9888031	155	0.059
+6680	-473.9887563	155	0.059
+6690	-473.9881536	155	0.059
+6700	-473.9881536	155	0.059
+6710	-473.9881518	155	0.059
+6720	-473.9878664	155	0.059
+6730	-473.9878664	155	0.059
+6740	-473.9878664	155	0.059
+6750	-473.9878545	155	0.059
+6760	-473.9878545	155	0.059
+6770	-473.9874872	155	0.059
+6780	-473.98708	155	0.059
+6790	-473.9870696	155	0.059
+6800	-473.9870666	155	0.059
+6810	-473.9870056	155	0.059
+6820	-473.9869676	155	0.059
+6830	-473.9869676	155	0.059
+6840	-473.9868941	155	0.059
+6850	-473.9868941	155	0.059
+6860	-473.9863509	155	0.059
+6870	-473.9863474	155	0.059
+6880	-473.9863474	155	0.059
+6890	-473.9863474	155	0.059
+6900	-473.9863387	156	0.059
+6910	-473.9863359	156	0.059
+6920	-473.9863359	156	0.059
+6930	-473.9863359	156	0.059
+6940	-473.9863359	156	0.059
+6950	-473.9863359	156	0.059
+6960	-473.9863359	156	0.059
+6970	-473.9862907	156	0.059
+6980	-473.9859573	156	0.059
+6990	-473.9859486	156	0.059
+7000	-473.9858868	156	0.059
+7010	-473.9858868	156	0.059
+7020	-473.9858803	156	0.059
+7030	-473.9855206	156	0.059
+7040	-473.9848014	156	0.059
+7050	-473.9848014	156	0.059
+7060	-473.9848014	156	0.059
+7070	-473.9847853	156	0.059
+7080	-473.9847853	156	0.059
+7090	-473.9843201	156	0.059
+7100	-473.9842767	156	0.059
+7110	-473.942699	156	0.01
+7120	-473.942699	156	0.01
+7130	-473.942699	156	0.01
+7140	-473.942699	156	0.01
+7150	-473.942699	156	0.01
+7160	-473.942699	156	0.01
+7170	-473.9426966	156	0.01
+7180	-473.9426966	156	0.01
+7190	-473.9423665	156	0.01
+7200	-473.9423665	156	0.01
+7210	-473.9423269	156	0.01
+7220	-473.9423269	156	0.01
+7230	-473.9422863	156	0.01
+7240	-473.942265	156	0.01
+7250	-473.9419624	156	0.01
+7260	-473.9418626	156	0.01
+7270	-473.9418626	156	0.01
+7280	-473.9418626	156	0.01
+7290	-473.9418626	156	0.01
+7300	-473.9418626	157	0.01
+7310	-473.9418626	157	0.01
+7320	-473.9416718	157	0.01
+7330	-473.9416718	157	0.01
+7340	-473.9416718	157	0.01
+7350	-473.9416718	157	0.01
+7360	-473.9416718	157	0.01
+7370	-473.9416718	157	0.01
+7380	-473.9416718	157	0.01
+7390	-473.9416303	157	0.01
+7400	-473.9416303	157	0.01
+7410	-473.9416303	157	0.01
+7420	-473.9416303	157	0.01
+7430	-473.9416303	157	0.01
+7440	-473.9414434	157	0.01
+7450	-473.9414434	157	0.01
+7460	-473.9414434	157	0.01
+7470	-473.941439	157	0.01
+7480	-473.941439	157	0.01
+7490	-473.941439	157	0.01
+7500	-473.941439	157	0.01
+7510	-473.9414375	157	0.01
+7520	-473.9414375	157	0.01
+7530	-473.9412395	157	0.01
+7540	-473.9411851	157	0.01
+7550	-473.9411851	157	0.01
+7560	-473.9411173	157	0.01
+7570	-473.9411173	157	0.01
+7580	-473.9411173	157	0.01
+7590	-473.9411173	157	0.01
+7600	-473.9411173	157	0.01
+7610	-473.9409031	157	0.01
+7620	-473.9409031	157	0.01
+7630	-473.9409031	157	0.01
+7640	-473.9409031	157	0.01
+7650	-473.940902	158	0.01
+7660	-473.940902	158	0.01
+7670	-473.940902	158	0.01
+7680	-473.9398171	158	0.01
+7690	-473.9398171	158	0.01
+7700	-473.9397803	158	0.01
+7710	-473.9397803	158	0.01
+7720	-473.9397803	158	0.01
+7730	-473.9397789	158	0.01
+7740	-473.9397789	158	0.01
+7750	-473.9397789	158	0.01
+7760	-473.9397789	158	0.01
+7770	-473.9397789	158	0.01
+7780	-473.9397789	158	0.01
+7790	-473.9397789	158	0.01
+7800	-473.9392967	158	0.01
+7810	-473.9392967	158	0.01
+7820	-473.9384359	158	0.01
+7830	-473.9384359	158	0.01
+7840	-473.9384359	158	0.01
+7850	-473.9384258	158	0.01
+7860	-473.9384258	158	0.01
+7870	-473.9384258	158	0.01
+7880	-473.9384195	158	0.01
+7890	-473.9384195	158	0.01
+7900	-473.9384195	158	0.01
+7910	-473.9384195	158	0.01
+7920	-473.9383728	158	0.01
+7930	-473.9382304	158	0.01
+7940	-473.9380412	158	0.01
+7950	-473.9379449	158	0.01
+7960	-473.9379422	158	0.01
+7970	-473.9379206	158	0.01
+7980	-473.9379044	158	0.01
+7990	-473.9379044	159	0.01
+8000	-473.9377266	159	0.01
+8010	-473.9377266	159	0.01
+8020	-473.9377161	159	0.01
+8030	-473.9377161	159	0.01
+8040	-473.937648	159	0.01
+8050	-473.9376476	159	0.01
+8060	-473.9376476	159	0.01
+8070	-473.9376476	159	0.01
+8080	-473.9376476	159	0.01
+8090	-473.9376476	159	0.01
+8100	-473.9376476	159	0.01
+8110	-473.9375604	159	0.01
+8120	-473.9375604	159	0.01
+8130	-473.9375566	159	0.01
+8140	-473.9375553	159	0.01
+8150	-473.9375553	159	0.01
+8160	-473.9375553	159	0.01
+8170	-473.9356317	159	0.01
+8180	-473.9356302	159	0.01
+8190	-473.9356302	159	0.01
+8200	-473.9351765	159	0.01
+8210	-473.9351765	159	0.01
+8220	-473.9351765	159	0.01
+8230	-473.9347418	159	0.01
+8240	-473.9347418	159	0.01
+8250	-473.9344916	159	0.01
+8260	-473.9344916	159	0.01
+8270	-473.9336981	159	0.01
+8280	-473.9336981	159	0.01
+8290	-473.9336972	159	0.01
+8300	-473.933697	159	0.01
+8310	-473.933697	159	0.01
+8320	-473.933697	159	0.01
+8330	-473.933675	159	0.01
+8340	-473.933675	160	0.01
+8350	-473.9332651	160	0.01
+8360	-473.9332651	160	0.01
+8370	-473.9332651	160	0.01
+8380	-473.933135	160	0.01
+8390	-473.9330895	160	0.01
+8400	-473.9330895	160	0.01
+8410	-473.9330895	160	0.01
+8420	-473.9329505	160	0.01
+8430	-473.9329505	160	0.01
+8440	-473.9328053	160	0.01
+8450	-473.9328053	160	0.01
+8460	-473.9328052	160	0.01
+8470	-473.9328052	160	0.01
+8480	-473.9327137	160	0.01
+8490	-473.9326297	160	0.01
+8500	-473.9320909	160	0.01
+8510	-473.9308132	160	0.01
+8520	-473.9306013	160	0.01
+8530	-473.9306013	160	0.01
+8540	-473.9304674	160	0.01
+8550	-473.9304482	160	0.01
+8560	-473.930445	160	0.01
+8570	-473.9304414	160	0.01
+8580	-473.9304414	160	0.01
+8590	-473.9304414	160	0.01
+8600	-473.9303385	160	0.01
+8610	-473.9303385	160	0.01
+8620	-473.930334	160	0.01
+8630	-473.930334	160	0.01
+8640	-473.930292	160	0.01
+8650	-473.8670065	160	0.01
+8660	-473.8458891	161	0.01
+8670	-473.8439846	161	0.01
+8680	-473.8436421	161	0.01
+8690	-473.8292701	161	0.01
+8700	-473.8108611	161	0.01
+8710	-473.8016228	161	0.01
+8720	-473.7731256	161	0.01
+8730	-473.7731256	161	0.01
+8740	-473.7731256	161	0.01
+8750	-473.7620415	161	0.01
+8760	-473.761661	161	0.01
+8770	-473.761661	161	0.01
+8780	-473.7609024	161	0.01
+8790	-473.7609024	161	0.01
+8800	-473.7338194	161	0.01
+8810	-473.7251388	161	0.01
+8820	-473.6825366	161	0.01
+8830	-473.681302	161	0.01
+8840	-473.6779839	161	0.01
+8850	-473.6716883	161	0.01
+8860	-473.6703176	161	0.01
+8870	-473.6702467	161	0.01
+8880	-473.6702374	161	0.01
+8890	-473.6621021	161	0.01
+8900	-473.6619722	161	0.01
+8910	-473.6619722	161	0.01
+8920	-473.6604323	161	0.01
+8930	-473.6597931	161	0.01
+8940	-473.6597931	161	0.01
+8950	-473.6597931	161	0.01
+8960	-473.6597931	161	0.01
+8970	-473.6550089	161	0.01
+8980	-473.6534347	161	0.01
+8990	-473.6447125	161	0.01
+9000	-473.6447125	162	0.01
+9010	-473.6447125	162	0.01
+9020	-473.6447125	162	0.01
+9030	-473.6437617	162	0.01
+9040	-473.6435116	162	0.01
+9050	-473.6435116	162	0.01
+9060	-473.6408756	162	0.01
+9070	-473.6362827	162	0.01
+9080	-473.6362827	162	0.01
+9090	-473.6362827	162	0.01
+9100	-473.6359706	162	0.01
+9110	-473.6359403	162	0.01
+9120	-473.6356773	162	0.01
+9130	-473.634174	162	0.01
+9140	-473.634174	162	0.01
+9150	-473.6334636	162	0.01
+9160	-473.6334636	162	0.01
+9170	-473.6319333	162	0.01
+9180	-473.6298763	162	0.01
+9190	-473.6289275	162	0.01
+9200	-473.6289275	162	0.01
+9210	-473.6289275	162	0.01
+9220	-473.6288281	162	0.01
+9230	-473.6288281	162	0.01
+9240	-473.6288281	162	0.01
+9250	-473.6273722	162	0.01
+9260	-473.6273722	162	0.01
+9270	-473.6273722	162	0.01
+9280	-473.6273722	162	0.01
+9290	-473.6273722	162	0.01
+9300	-473.6273717	162	0.01
+9310	-473.6273717	162	0.01
+9320	-473.6251389	162	0.01
+9330	-473.6248591	163	0.01
+9340	-473.6248277	163	0.01
+9350	-473.6248277	163	0.01
+9360	-473.6248274	163	0.01
+9370	-473.6248125	163	0.01
+9380	-473.6246737	163	0.01
+9390	-473.6244021	163	0.01
+9400	-473.6244021	163	0.01
+9410	-473.6244015	163	0.01
+9420	-473.6214782	163	0.01
+9430	-473.6205934	163	0.01
+9440	-473.6205928	163	0.01
+9450	-473.6205928	163	0.01
+9460	-473.6204059	163	0.01
+9470	-473.619988	163	0.01
+9480	-473.6194179	163	0.01
+9490	-473.6190311	163	0.01
+9500	-473.6190311	163	0.01
+9510	-473.6190311	163	0.01
+9520	-473.6190311	163	0.01
+9530	-473.6190311	163	0.01
+9540	-473.6190311	163	0.01
+9550	-473.6190311	163	0.01
+9560	-473.6190311	163	0.01
+9570	-473.6190311	163	0.01
+9580	-473.6188157	163	0.01
+9590	-473.6188157	163	0.01
+9600	-473.618682	163	0.01
+9610	-473.6185757	163	0.01
+9620	-473.6185757	163	0.01
+9630	-473.6183024	163	0.01
+9640	-473.6182452	163	0.01
+9650	-473.6182452	163	0.01
+9660	-473.6182452	164	0.01
+9670	-473.6182452	164	0.01
+9680	-473.6171503	164	0.01
+9690	-473.6166782	164	0.01
+9700	-473.6164318	164	0.01
+9710	-473.6164318	164	0.01
+9720	-473.6164318	164	0.01
+9730	-473.6164219	164	0.01
+9740	-473.6161621	164	0.01
+9750	-473.6158851	164	0.01
+9760	-473.6157789	164	0.01
+9770	-473.6157789	164	0.01
+9780	-473.6157789	164	0.01
+9790	-473.6157789	164	0.01
+9800	-473.6157789	164	0.01
+9810	-473.6157789	164	0.01
+9820	-473.6155846	164	0.01
+9830	-473.6155846	164	0.01
+9840	-473.6155178	164	0.01
+9850	-473.6155164	164	0.01
+9860	-473.6155164	164	0.01
+9870	-473.6155164	164	0.01
+9880	-473.6155164	164	0.01
+9890	-473.6154045	164	0.01
+9900	-473.6154045	164	0.01
+9910	-473.6152559	164	0.01
+9920	-473.6152315	164	0.01
+9930	-473.6152315	164	0.01
+9940	-473.6152315	164	0.01
+9950	-473.6152127	164	0.01
+9960	-473.6150619	164	0.01
+9970	-473.6150542	164	0.01
+9980	-473.6150542	164	0.01
+9990	-473.6150542	164	0.01
+10000	-473.6148361	164	0.01
+10010	-473.6148361	165	0.01
+10020	-473.6148358	165	0.01
+10030	-473.6148086	165	0.01
+10040	-473.6148086	165	0.01
+10050	-473.6148085	165	0.01
+10060	-473.6148085	165	0.01
+10070	-473.6148084	165	0.01
+10080	-473.6148084	165	0.01
+10090	-473.6148084	165	0.01
+10100	-473.6148084	165	0.01
+10110	-473.6145792	165	0.01
+10120	-473.6145792	165	0.01
+10130	-473.6145792	165	0.01
+10140	-473.6145791	165	0.01
+10150	-473.6145791	165	0.01
+10160	-473.6145791	165	0.01
+10170	-473.6145791	165	0.01
+10180	-473.6145791	165	0.01
+10190	-473.6145791	165	0.01
+10200	-473.6145791	165	0.01
+10210	-473.6144255	165	0.01
+10220	-473.6144255	165	0.01
+10230	-473.6144255	165	0.01
+10240	-473.6144255	165	0.01
+10250	-473.614425	165	0.01
+10260	-473.6144246	165	0.01
+10270	-473.6144246	165	0.01
+10280	-473.6144245	165	0.01
+10290	-473.6142851	165	0.01
+10300	-473.6140686	165	0.01
+10310	-473.6140685	165	0.01
+10320	-473.6140685	165	0.01
+10330	-473.6140685	165	0.01
+10340	-473.6140685	165	0.01
+10350	-473.6140685	165	0.01
+10360	-473.6140685	166	0.01
+10370	-473.6140685	166	0.01
+10380	-473.6140685	166	0.01
+10390	-473.6140617	166	0.01
+10400	-473.6140617	166	0.01
+10410	-473.6140617	166	0.01
+10420	-473.6140617	166	0.01
+10430	-473.6140617	166	0.01
+10440	-473.6140617	166	0.01
+10450	-473.6140617	166	0.01
+10460	-473.6140563	166	0.01
+10470	-473.6140563	166	0.01
+10480	-473.6140239	166	0.01
+10490	-473.6139989	166	0.01
+10500	-473.6139428	166	0.01
+10510	-473.6139428	166	0.01
+10520	-473.6139428	166	0.01
+10530	-473.6139428	166	0.01
+10540	-473.6139428	166	0.01
+10550	-473.6139428	166	0.01
+10560	-473.613941	166	0.01
+10570	-473.613941	166	0.01
+10580	-473.613941	166	0.01
+10590	-473.613941	166	0.01
+10600	-473.6138173	166	0.01
+10610	-473.6138173	166	0.01
+10620	-473.6138173	166	0.01
+10630	-473.6136817	166	0.01
+10640	-473.6136196	166	0.01
+10650	-473.6136196	166	0.01
+10660	-473.6136196	166	0.01
+10670	-473.6135937	166	0.01
+10680	-473.6135937	166	0.01
+10690	-473.6135937	167	0.01
+10700	-473.6135937	167	0.01
+10710	-473.6135937	167	0.01
+10720	-473.6133716	167	0.01
+10730	-473.6133716	167	0.01
+10740	-473.6133716	167	0.01
+10750	-473.6133716	167	0.01
+10760	-473.6133715	167	0.01
+10770	-473.6133712	167	0.01
+10780	-473.6133712	167	0.01
+10790	-473.6133712	167	0.01
+10800	-473.6133712	167	0.01
+10810	-473.6133712	167	0.01
+10820	-473.6133711	167	0.01
+10830	-473.6133711	167	0.01
+10840	-473.6133711	167	0.01
+10850	-473.6133693	167	0.01
+10860	-473.6133693	167	0.01
+10870	-473.6133693	167	0.01
+10880	-473.6133632	167	0.01
+10890	-473.6133632	167	0.01
+10900	-473.6133632	167	0.01
+10910	-473.6133632	167	0.01
+10920	-473.6133606	167	0.01
+10930	-473.6132542	167	0.01
+10940	-473.6132542	167	0.01
+10950	-473.6132542	167	0.01
+10960	-473.6132542	167	0.01
+10970	-473.6132542	167	0.01
+10980	-473.6132542	167	0.01
+10990	-473.6132542	167	0.01
+11000	-473.6132244	167	0.01
+11010	-473.6132244	167	0.01
+11020	-473.6132244	167	0.01
+11030	-473.6132244	168	0.01
+11040	-473.6132244	168	0.01
+11050	-473.613211	168	0.01
+11060	-473.613211	168	0.01
+11070	-473.613211	168	0.01
+11080	-473.613211	168	0.01
+11090	-473.613211	168	0.01
+11100	-473.613211	168	0.01
+11110	-473.613211	168	0.01
+11120	-473.613211	168	0.01
+11130	-473.613211	168	0.01
+11140	-473.6131195	168	0.01
+11150	-473.6131195	168	0.01
+11160	-473.6131195	168	0.01
+11170	-473.6131195	168	0.01
+11180	-473.6130574	168	0.01
+11190	-473.6130574	168	0.01
+11200	-473.6129548	168	0.01
+11210	-473.6129548	168	0.01
+11220	-473.6129548	168	0.01
+11230	-473.61295	168	0.01
+11240	-473.61295	168	0.01
+11250	-473.61295	168	0.01
+11260	-473.612945	168	0.01
+11270	-473.612945	168	0.01
+11280	-473.6129449	168	0.01
+11290	-473.612944	168	0.01
+11300	-473.612944	168	0.01
+11310	-473.612944	168	0.01
+11320	-473.612944	168	0.01
+11330	-473.612944	168	0.01
+11340	-473.612944	168	0.01
+11350	-473.6129429	168	0.01
+11360	-473.6129429	169	0.01
+11370	-473.6129429	169	0.01
+11380	-473.6129429	169	0.01
+11390	-473.6129429	169	0.01
+11400	-473.6129429	169	0.01
+11410	-473.6129429	169	0.01
+11420	-473.6129429	169	0.01
+11430	-473.6129353	169	0.01
+11440	-473.6129353	169	0.01
+11450	-473.6128296	169	0.01
+11460	-473.6128296	169	0.01
+11470	-473.6128296	169	0.01
+11480	-473.6128296	169	0.01
+11490	-473.6127694	169	0.01
+11500	-473.6127551	169	0.01
+11510	-473.6127551	169	0.01
+11520	-473.6127551	169	0.01
+11530	-473.6127551	169	0.01
+11540	-473.6127551	169	0.01
+11550	-473.6127551	169	0.01
+11560	-473.6127551	169	0.01
+11570	-473.6127551	169	0.01
+11580	-473.6127551	169	0.01
+11590	-473.6127551	169	0.01
+11600	-473.6127551	169	0.01
+11610	-473.6127551	169	0.01
+11620	-473.6127551	169	0.01
+11630	-473.6127551	169	0.01
+11640	-473.6127551	169	0.01
+11650	-473.6127551	169	0.01
+11660	-473.6127551	169	0.01
+11670	-473.6127036	169	0.01
+11680	-473.6126093	170	0.01
+11690	-473.6126024	170	0.01
+11700	-473.6126024	170	0.01
+11710	-473.6125677	170	0.01
+11720	-473.6125677	170	0.01
+11730	-473.612482	170	0.01
+11740	-473.612482	170	0.01
+11750	-473.6124367	170	0.01
+11760	-473.6124367	170	0.01
+11770	-473.6124367	170	0.01
+11780	-473.6124367	170	0.01
+11790	-473.6124367	170	0.01
+11800	-473.6124367	170	0.01
+11810	-473.6124021	170	0.01
+11820	-473.6124021	170	0.01
+11830	-473.6124021	170	0.01
+11840	-473.61239	170	0.01
+11850	-473.61239	170	0.01
+11860	-473.61239	170	0.01
+11870	-473.61239	170	0.01
+11880	-473.6123897	170	0.01
+11890	-473.6123897	170	0.01
+11900	-473.6123897	170	0.01
+11910	-473.6123897	170	0.01
+11920	-473.6123897	170	0.01
+11930	-473.612342	170	0.01
+11940	-473.612342	170	0.01
+11950	-473.6123255	170	0.01
+11960	-473.6123255	170	0.01
+11970	-473.6123252	170	0.01
+11980	-473.6123252	170	0.01
+11990	-473.6122191	170	0.01
+12000	-473.6122191	170	0.01
+12010	-473.6122191	170	0.01
+12020	-473.6122191	171	0.01
+12030	-473.6122191	171	0.01
+12040	-473.6122191	171	0.01
+12050	-473.6122176	171	0.01
+12060	-473.6122176	171	0.01
+12070	-473.6122176	171	0.01
+12080	-473.6122176	171	0.01
+12090	-473.6122176	171	0.01
+12100	-473.6122176	171	0.01
+12110	-473.6122176	171	0.01
+12120	-473.6122176	171	0.01
+12130	-473.6122176	171	0.01
+12140	-473.6122174	171	0.01
+12150	-473.6122174	171	0.01
+12160	-473.6122174	171	0.01
+12170	-473.6122174	171	0.01
+12180	-473.6122174	171	0.01
+12190	-473.6122174	171	0.01
+12200	-473.612217	171	0.01
+12210	-473.612217	171	0.01
+12220	-473.6122168	171	0.01
+12230	-473.6122168	171	0.01
+12240	-473.6122167	171	0.01
+12250	-473.6122159	171	0.01
+12260	-473.6122159	171	0.01
+12270	-473.6122159	171	0.01
+12280	-473.6122159	171	0.01
+12290	-473.6122159	171	0.01
+12300	-473.6122159	171	0.01
+12310	-473.6122159	171	0.01
+12320	-473.6122159	171	0.01
+12330	-473.6122159	171	0.01
+12340	-473.6121931	171	0.01
+12350	-473.6120952	172	0.01
+12360	-473.6120952	172	0.01
+12370	-473.6120952	172	0.01
+12380	-473.6120952	172	0.01
+12390	-473.6120951	172	0.01
+12400	-473.6120951	172	0.01
+12410	-473.6120951	172	0.01
+12420	-473.6120951	172	0.01
+12430	-473.6120951	172	0.01
+12440	-473.6120951	172	0.01
+12450	-473.6120951	172	0.01
+12460	-473.6120951	172	0.01
+12470	-473.6120544	172	0.01
+12480	-473.6120544	172	0.01
+12490	-473.6120224	172	0.01
+12500	-473.6120224	172	0.01
+12510	-473.6120224	172	0.01
+12520	-473.6119641	172	0.01
+12530	-473.6119641	172	0.01
+12540	-473.6118876	172	0.01
+12550	-473.6118876	172	0.01
+12560	-473.6118876	172	0.01
+12570	-473.6118876	172	0.01
+12580	-473.6118876	172	0.01
+12590	-473.6118876	172	0.01
+12600	-473.6118876	172	0.01
+12610	-473.6118876	172	0.01
+12620	-473.6118876	172	0.01
+12630	-473.6118876	172	0.01
+12640	-473.6118876	172	0.01
+12650	-473.6118876	172	0.01
+12660	-473.6118876	172	0.01
+12670	-473.6118876	172	0.01
+12680	-473.6118876	172	0.01
+12690	-473.6118876	173	0.01
+12700	-473.6118876	173	0.01
+12710	-473.6118876	173	0.01
+12720	-473.6118876	173	0.01
+12730	-473.6118876	173	0.01
+12740	-473.6118876	173	0.01
+12750	-473.6118876	173	0.01
+12760	-473.6118876	173	0.01
+12770	-473.6118876	173	0.01
+12780	-473.6118876	173	0.01
+12790	-473.6118876	173	0.01
+12800	-473.6118876	173	0.01
+12810	-473.6118876	173	0.01
+12820	-473.6118876	173	0.01
+12830	-473.6118876	173	0.01
+12840	-473.6118876	173	0.01
+12850	-473.6118019	173	0.01
+12860	-473.6118019	173	0.01
+12870	-473.6118019	173	0.01
+12880	-473.6118019	173	0.01
+12890	-473.6118019	173	0.01
+12900	-473.6118019	173	0.01
+12910	-473.6118019	173	0.01
+12920	-473.6118019	173	0.01
+12930	-473.6118019	173	0.01
+12940	-473.6118019	173	0.01
+12950	-473.6118019	173	0.01
+12960	-473.6118019	173	0.01
+12970	-473.6118019	173	0.01
+12980	-473.6118019	173	0.01
+12990	-473.6118019	173	0.01
+13000	-473.6118019	173	0.01
+13010	-473.6118019	173	0.01
+13020	-473.6118007	174	0.01
+13030	-473.6118007	174	0.01
+13040	-473.6118007	174	0.01
+13050	-473.6118007	174	0.01
+13060	-473.6118007	174	0.01
+13070	-473.6118005	174	0.01
+13080	-473.6118005	174	0.01
+13090	-473.6118005	174	0.01
+13100	-473.6118005	174	0.01
+13110	-473.6118005	174	0.01
+13120	-473.6117875	174	0.01
+13130	-473.6117875	174	0.01
+13140	-473.6117447	174	0.01
+13150	-473.6117368	174	0.01
+13160	-473.6116614	174	0.01
+13170	-473.6116614	174	0.01
+13180	-473.6116614	174	0.01
+13190	-473.6116512	174	0.01
+13200	-473.6116512	174	0.01
+13210	-473.6116512	174	0.01
+13220	-473.6116512	174	0.01
+13230	-473.6116512	174	0.01
+13240	-473.6116512	174	0.01
+13250	-473.6116384	174	0.01
+13260	-473.6116374	174	0.01
+13270	-473.6116374	174	0.01
+13280	-473.6116374	174	0.01
+13290	-473.6116374	174	0.01
+13300	-473.6116374	174	0.01
+13310	-473.6116374	174	0.01
+13320	-473.6116374	174	0.01
+13330	-473.6116374	174	0.01
+13340	-473.6116374	174	0.01
+13350	-473.6116374	174	0.01
+13360	-473.6116064	175	0.01
+13370	-473.6116064	175	0.01
+13380	-473.6116064	175	0.01
+13390	-473.6116064	175	0.01
+13400	-473.6116064	175	0.01
+13410	-473.6116064	175	0.01
+13420	-473.6116055	175	0.01
+13430	-473.6116055	175	0.01
+13440	-473.6116055	175	0.01
+13450	-473.6116055	175	0.01
+13460	-473.6114671	175	0.01
+13470	-473.6114671	175	0.01
+13480	-473.6114671	175	0.01
+13490	-473.6114671	175	0.01
+13500	-473.6114671	175	0.01
+13510	-473.6114671	175	0.01
+13520	-473.6114671	175	0.01
+13530	-473.6114671	175	0.01
+13540	-473.6114671	175	0.01
+13550	-473.6114671	175	0.01
+13560	-473.6114671	175	0.01
+13570	-473.6114671	175	0.01
+13580	-473.6114658	175	0.01
+13590	-473.6113232	175	0.01
+13600	-473.6113232	175	0.01
+13610	-473.6113232	175	0.01
+13620	-473.6113199	175	0.01
+13630	-473.6113199	175	0.01
+13640	-473.6113199	175	0.01
+13650	-473.6113199	175	0.01
+13660	-473.6113023	175	0.01
+13670	-473.6112912	175	0.01
+13680	-473.6112543	176	0.01
+13690	-473.6112543	176	0.01
+13700	-473.6112543	176	0.01
+13710	-473.6112543	176	0.01
+13720	-473.6112543	176	0.01
+13730	-473.6112543	176	0.01
+13740	-473.6112543	176	0.01
+13750	-473.6112543	176	0.01
+13760	-473.6112543	176	0.01
+13770	-473.6112543	176	0.01
+13780	-473.6112543	176	0.01
+13790	-473.6112543	176	0.01
+13800	-473.6112543	176	0.01
+13810	-473.6112543	176	0.01
+13820	-473.6112259	176	0.01
+13830	-473.6112259	176	0.01
+13840	-473.6112259	176	0.01
+13850	-473.6112259	176	0.01
+13860	-473.6112259	176	0.01
+13870	-473.6112259	176	0.01
+13880	-473.6112259	176	0.01
+13890	-473.6112223	176	0.01
+13900	-473.6112223	176	0.01
+13910	-473.6111976	176	0.01
+13920	-473.6111976	176	0.01
+13930	-473.6111976	176	0.01
+13940	-473.6111976	176	0.01
+13950	-473.6111976	176	0.01
+13960	-473.6111976	176	0.01
+13970	-473.6111976	176	0.01
+13980	-473.6111976	176	0.01
+13990	-473.6111976	176	0.01
+14000	-473.6111976	176	0.01
+14010	-473.6111909	177	0.01
+14020	-473.6111909	177	0.01
+14030	-473.6111909	177	0.01
+14040	-473.6111909	177	0.01
+14050	-473.6111909	177	0.01
+14060	-473.6111909	177	0.01
+14070	-473.6111909	177	0.01
+14080	-473.6111909	177	0.01
+14090	-473.6111909	177	0.01
+14100	-473.6111909	177	0.01
+14110	-473.6111909	177	0.01
+14120	-473.6111909	177	0.01
+14130	-473.6111823	177	0.01
+14140	-473.6111721	177	0.01
+14150	-473.6111721	177	0.01
+14160	-473.6111721	177	0.01
+14170	-473.6111721	177	0.01
+14180	-473.6111721	177	0.01
+14190	-473.6111721	177	0.01
+14200	-473.6111721	177	0.01
+14210	-473.6111721	177	0.01
+14220	-473.6110008	177	0.01
+14230	-473.6110008	177	0.01
+14240	-473.6110008	177	0.01
+14250	-473.6110008	177	0.01
+14260	-473.6110008	177	0.01
+14270	-473.6110008	177	0.01
+14280	-473.6110008	177	0.01
+14290	-473.6110008	177	0.01
+14300	-473.610909	177	0.01
+14310	-473.610909	177	0.01
+14320	-473.610909	177	0.01
+14330	-473.610909	178	0.01
+14340	-473.610909	178	0.01
+14350	-473.610909	178	0.01
+14360	-473.610909	178	0.01
+14370	-473.610909	178	0.01
+14380	-473.610909	178	0.01
+14390	-473.6108169	178	0.01
+14400	-473.6108169	178	0.01
+14410	-473.6108169	178	0.01
+14420	-473.6108169	178	0.01
+14430	-473.6107847	178	0.01
+14440	-473.6107295	178	0.01
+14450	-473.6107295	178	0.01
+14460	-473.6107295	178	0.01
+14470	-473.6107295	178	0.01
+14480	-473.6107295	178	0.01
+14490	-473.6107083	178	0.01
+14500	-473.6107083	178	0.01
+14510	-473.6107083	178	0.01
+14520	-473.6107083	178	0.01
+14530	-473.6107083	178	0.01
+14540	-473.6106531	178	0.01
+14550	-473.6106531	178	0.01
+14560	-473.6106531	178	0.01
+14570	-473.6106531	178	0.01
+14580	-473.6106196	178	0.01
+14590	-473.6106196	178	0.01
+14600	-473.6106196	178	0.01
+14610	-473.6106196	178	0.01
+14620	-473.6106196	178	0.01
+14630	-473.6106196	178	0.01
+14640	-473.6106196	178	0.01
+14650	-473.6106196	178	0.01
+14660	-473.6106196	178	0.01
+14670	-473.6106196	179	0.01
+14680	-473.6106196	179	0.01
+14690	-473.6106107	179	0.01
+14700	-473.6106107	179	0.01
+14710	-473.6106107	179	0.01
+14720	-473.6106107	179	0.01
+14730	-473.6106107	179	0.01
+14740	-473.6106107	179	0.01
+14750	-473.6106107	179	0.01
+14760	-473.6106107	179	0.01
+14770	-473.6106107	179	0.01
+14780	-473.6106107	179	0.01
+14790	-473.6106107	179	0.01
+14800	-473.6106107	179	0.01
+14810	-473.6106107	179	0.01
+14820	-473.6106107	179	0.01
+14830	-473.6106107	179	0.01
+14840	-473.6106107	179	0.01
+14850	-473.6106107	179	0.01
+14860	-473.6106107	179	0.01
+14870	-473.6106107	179	0.01
+14880	-473.6105493	179	0.01
+14890	-473.6105493	179	0.01
+14900	-473.6105493	179	0.01
+14910	-473.6105493	179	0.01
+14920	-473.6105493	179	0.01
+14930	-473.6105178	179	0.01
+14940	-473.6105178	179	0.01
+14950	-473.6105178	179	0.01
+14960	-473.6105178	179	0.01
+14970	-473.6105178	179	0.01
+14980	-473.6105178	179	0.01
+14990	-473.6105178	180	0.01
+15000	-473.6104773	180	0.01
+15010	-473.6104773	180	0.01
+15020	-473.6104731	180	0.01
+15030	-473.6104731	180	0.01
+15040	-473.6104731	180	0.01
+15050	-473.6104731	180	0.01
+15060	-473.6104472	180	0.01
+15070	-473.6104472	180	0.01
+15080	-473.6104472	180	0.01
+15090	-473.6104287	180	0.01
+15100	-473.6104287	180	0.01
+15110	-473.6104287	180	0.01
+15120	-473.6104287	180	0.01
+15130	-473.6104194	180	0.01
+15140	-473.6104194	180	0.01
+15150	-473.6104194	180	0.01
+15160	-473.6104194	180	0.01
+15170	-473.6104194	180	0.01
+15180	-473.6104194	180	0.01
+15190	-473.6104194	180	0.01
+15200	-473.6104194	180	0.01
+15210	-473.6104194	180	0.01
+15220	-473.6104194	180	0.01
+15230	-473.6104194	180	0.01
+15240	-473.6104194	180	0.01
+15250	-473.6104194	180	0.01
+15260	-473.6104194	180	0.01
+15270	-473.6104194	180	0.01
+15280	-473.6101157	180	0.01
+15290	-473.6101157	180	0.01
+15300	-473.6101157	181	0.01
+15310	-473.6101157	181	0.01
+15320	-473.6101157	181	0.01
+15330	-473.6101157	181	0.01
+15340	-473.6101157	181	0.01
+15350	-473.6101157	181	0.01
+15360	-473.6101157	181	0.01
+15370	-473.6101157	181	0.01
+15380	-473.6101157	181	0.01
+15390	-473.6101157	181	0.01
+15400	-473.6101157	181	0.01
+15410	-473.6101157	181	0.01
+15420	-473.6101105	181	0.01
+15430	-473.6101105	181	0.01
+15440	-473.6101105	181	0.01
+15450	-473.6101105	181	0.01
+15460	-473.6101105	181	0.01
+15470	-473.6101105	181	0.01
+15480	-473.6101105	181	0.01
+15490	-473.6101105	181	0.01
+15500	-473.6100159	181	0.01
+15510	-473.6100159	181	0.01
+15520	-473.6100159	181	0.01
+15530	-473.6100159	181	0.01
+15540	-473.609997	181	0.01
+15550	-473.609997	181	0.01
+15560	-473.609997	181	0.01
+15570	-473.609997	181	0.01
+15580	-473.609997	181	0.01
+15590	-473.609997	181	0.01
+15600	-473.609997	181	0.01
+15610	-473.609997	181	0.01
+15620	-473.609997	181	0.01
+15630	-473.6099931	181	0.01
+15640	-473.6099931	182	0.01
+15650	-473.6099931	182	0.01
+15660	-473.6099299	182	0.01
+15670	-473.6099299	182	0.01
+15680	-473.6099299	182	0.01
+15690	-473.6099299	182	0.01
+15700	-473.6099299	182	0.01
+15710	-473.6099299	182	0.01
+15720	-473.6099299	182	0.01
+15730	-473.6099299	182	0.01
+15740	-473.6099299	182	0.01
+15750	-473.6099299	182	0.01
+15760	-473.6099299	182	0.01
+15770	-473.6099299	182	0.01
+15780	-473.6099299	182	0.01
+15790	-473.6098399	182	0.01
+15800	-473.6098398	182	0.01
+15810	-473.6098398	182	0.01
+15820	-473.6098398	182	0.01
+15830	-473.6098398	182	0.01
+15840	-473.6098398	182	0.01
+15850	-473.6098398	182	0.01
+15860	-473.6098398	182	0.01
+15870	-473.6098398	182	0.01
+15880	-473.6098398	182	0.01
+15890	-473.6098398	182	0.01
+15900	-473.6098398	182	0.01
+15910	-473.6098398	182	0.01
+15920	-473.6098394	182	0.01
+15930	-473.6098394	182	0.01
+15940	-473.6098394	182	0.01
+15950	-473.6098394	182	0.01
+15960	-473.6098394	182	0.01
+15970	-473.6098394	183	0.01
+15980	-473.6098394	183	0.01
+15990	-473.6098394	183	0.01
+16000	-473.6098394	183	0.01
+16010	-473.6098394	183	0.01
+16020	-473.6098394	183	0.01
+16030	-473.6098394	183	0.01
+16040	-473.6098394	183	0.01
+16050	-473.6098394	183	0.01
+16060	-473.609828	183	0.01
+16070	-473.6098241	183	0.01
+16080	-473.6098241	183	0.01
+16090	-473.6098241	183	0.01
+16100	-473.6098241	183	0.01
+16110	-473.6098241	183	0.01
+16120	-473.6098241	183	0.01
+16130	-473.6098241	183	0.01
+16140	-473.6098241	183	0.01
+16150	-473.6098241	183	0.01
+16160	-473.6098241	183	0.01
+16170	-473.6097931	183	0.01
+16180	-473.6097931	183	0.01
+16190	-473.6097931	183	0.01
+16200	-473.6097931	183	0.01
+16210	-473.6097931	183	0.01
+16220	-473.6097931	183	0.01
+16230	-473.6097931	183	0.01
+16240	-473.6097931	183	0.01
+16250	-473.6097931	183	0.01
+16260	-473.6097931	183	0.01
+16270	-473.6097848	183	0.01
+16280	-473.6097848	183	0.01
+16290	-473.6096881	183	0.01
+16300	-473.6096881	184	0.01
+16310	-473.6096881	184	0.01
+16320	-473.6096881	184	0.01
+16330	-473.6096881	184	0.01
+16340	-473.6096881	184	0.01
+16350	-473.6096881	184	0.01
+16360	-473.6096881	184	0.01
+16370	-473.6096881	184	0.01
+16380	-473.6096881	184	0.01
+16390	-473.6096881	184	0.01
+16400	-473.6096881	184	0.01
+16410	-473.6096881	184	0.01
+16420	-473.6096881	184	0.01
+16430	-473.6096881	184	0.01
+16440	-473.6096881	184	0.01
+16450	-473.6096682	184	0.01
+16460	-473.6096682	184	0.01
+16470	-473.6096682	184	0.01
+16480	-473.6096682	184	0.01
+16490	-473.6096682	184	0.01
+16500	-473.6096682	184	0.01
+16510	-473.6096682	184	0.01
+16520	-473.6096682	184	0.01
+16530	-473.6096682	184	0.01
+16540	-473.6096506	184	0.01
+16550	-473.6096506	184	0.01
+16560	-473.6096506	184	0.01
+16570	-473.609644	184	0.01
+16580	-473.6096106	184	0.01
+16590	-473.6096106	184	0.01
+16600	-473.6096106	184	0.01
+16610	-473.6096106	184	0.01
+16620	-473.6096106	184	0.01
+16630	-473.6096106	185	0.01
+16640	-473.6096106	185	0.01
+16650	-473.6096106	185	0.01
+16660	-473.6096106	185	0.01
+16670	-473.6096106	185	0.01
+16680	-473.6096106	185	0.01
+16690	-473.6096106	185	0.01
+16700	-473.6096106	185	0.01
+16710	-473.6096088	185	0.01
+16720	-473.6096088	185	0.01
+16730	-473.6096088	185	0.01
+16740	-473.6096088	185	0.01
+16750	-473.6094692	185	0.01
+16760	-473.6094692	185	0.01
+16770	-473.6094692	185	0.01
+16780	-473.6094692	185	0.01
+16790	-473.6094692	185	0.01
+16800	-473.6094692	185	0.01
+16810	-473.6094601	185	0.01
+16820	-473.6094601	185	0.01
+16830	-473.6094091	185	0.01
+16840	-473.6094091	185	0.01
+16850	-473.6094091	185	0.01
+16860	-473.6094081	185	0.01
+16870	-473.6094081	185	0.01
+16880	-473.6094081	185	0.01
+16890	-473.6094081	185	0.01
+16900	-473.6094081	185	0.01
+16910	-473.6094081	185	0.01
+16920	-473.6094081	185	0.01
+16930	-473.6094081	185	0.01
+16940	-473.6094081	185	0.01
+16950	-473.6094081	185	0.01
+16960	-473.6094081	186	0.01
+16970	-473.6094081	186	0.01
+16980	-473.6094081	186	0.01
+16990	-473.6093315	186	0.01
+17000	-473.6093313	186	0.01
+17010	-473.6093313	186	0.01
+17020	-473.6093313	186	0.01
+17030	-473.6093313	186	0.01
+17040	-473.6093313	186	0.01
+17050	-473.6093313	186	0.01
+17060	-473.6093313	186	0.01
+17070	-473.6092683	186	0.01
+17080	-473.6092683	186	0.01
+17090	-473.6092682	186	0.01
+17100	-473.6092682	186	0.01
+17110	-473.6092682	186	0.01
+17120	-473.6092682	186	0.01
+17130	-473.6092675	186	0.01
+17140	-473.6092675	186	0.01
+17150	-473.6092675	186	0.01
+17160	-473.6092675	186	0.01
+17170	-473.6092502	186	0.01
+17180	-473.6092151	186	0.01
+17190	-473.6092151	186	0.01
+17200	-473.6092062	186	0.01
+17210	-473.6092062	186	0.01
+17220	-473.6092062	186	0.01
+17230	-473.6091996	186	0.01
+17240	-473.6091996	186	0.01
+17250	-473.6091475	186	0.01
+17260	-473.6091475	186	0.01
+17270	-473.6091475	187	0.01
+17280	-473.6091475	187	0.01
+17290	-473.6091475	187	0.01
+17300	-473.6091475	187	0.01
+17310	-473.6091475	187	0.01
+17320	-473.6091475	187	0.01
+17330	-473.6090886	187	0.01
+17340	-473.6090886	187	0.01
+17350	-473.6090886	187	0.01
+17360	-473.6090886	187	0.01
+17370	-473.6090886	187	0.01
+17380	-473.6090886	187	0.01
+17390	-473.6090886	187	0.01
+17400	-473.6090886	187	0.01
+17410	-473.6090886	187	0.01
+17420	-473.6090886	187	0.01
+17430	-473.6090886	187	0.01
+17440	-473.6090886	187	0.01
+17450	-473.6090886	187	0.01
+17460	-473.609023	187	0.01
+17470	-473.609023	187	0.01
+17480	-473.609023	187	0.01
+17490	-473.609023	187	0.01
+17500	-473.609023	187	0.01
+17510	-473.609023	187	0.01
+17520	-473.609023	187	0.01
+17530	-473.609023	187	0.01
+17540	-473.609023	187	0.01
+17550	-473.609023	187	0.01
+17560	-473.609023	187	0.01
+17570	-473.609023	187	0.01
+17580	-473.609023	187	0.01
+17590	-473.6089219	188	0.01
+17600	-473.6089219	188	0.01
+17610	-473.6089219	188	0.01
+17620	-473.6089219	188	0.01
+17630	-473.6089219	188	0.01
+17640	-473.6089219	188	0.01
+17650	-473.6089219	188	0.01
+17660	-473.6089219	188	0.01
+17670	-473.6089219	188	0.01
+17680	-473.6089219	188	0.01
+17690	-473.6089219	188	0.01
+17700	-473.6089219	188	0.01
+17710	-473.6089219	188	0.01
+17720	-473.6088658	188	0.01
+17730	-473.6088504	188	0.01
+17740	-473.6088504	188	0.01
+17750	-473.6088504	188	0.01
+17760	-473.6088504	188	0.01
+17770	-473.6088504	188	0.01
+17780	-473.6088504	188	0.01
+17790	-473.6088504	188	0.01
+17800	-473.6088503	188	0.01
+17810	-473.6088503	188	0.01
+17820	-473.6088503	188	0.01
+17830	-473.6088463	188	0.01
+17840	-473.6088462	188	0.01
+17850	-473.6088462	188	0.01
+17860	-473.6088462	188	0.01
+17870	-473.6088462	188	0.01
+17880	-473.6088462	188	0.01
+17890	-473.6088316	188	0.01
+17900	-473.6088316	188	0.01
+17910	-473.6088316	189	0.01
+17920	-473.6088316	189	0.01
+17930	-473.6088316	189	0.01
+17940	-473.6088316	189	0.01
+17950	-473.6088316	189	0.01
+17960	-473.6088316	189	0.01
+17970	-473.6088286	189	0.01
+17980	-473.6088286	189	0.01
+17990	-473.6088286	189	0.01
+18000	-473.6088286	189	0.01
+18010	-473.6088286	189	0.01
+18020	-473.6088286	189	0.01
+18030	-473.6088286	189	0.01
+18040	-473.6088286	189	0.01
+18050	-473.6088286	189	0.01
+18060	-473.6088286	189	0.01
+18070	-473.6088286	189	0.01
+18080	-473.6088286	189	0.01
+18090	-473.6088286	189	0.01
+18100	-473.6088286	189	0.01
+18110	-473.6088286	189	0.01
+18120	-473.6087535	189	0.01
+18130	-473.6087535	189	0.01
+18140	-473.608751	189	0.01
+18150	-473.608751	189	0.01
+18160	-473.608751	189	0.01
+18170	-473.608751	189	0.01
+18180	-473.608751	189	0.01
+18190	-473.608751	189	0.01
+18200	-473.6087254	189	0.01
+18210	-473.6087254	189	0.01
+18220	-473.6087095	190	0.01
+18230	-473.6087095	190	0.01
+18240	-473.6087095	190	0.01
+18250	-473.6087095	190	0.01
+18260	-473.6087095	190	0.01
+18270	-473.6087095	190	0.01
+18280	-473.6087095	190	0.01
+18290	-473.6087095	190	0.01
+18300	-473.6086981	190	0.01
+18310	-473.6086981	190	0.01
+18320	-473.6086981	190	0.01
+18330	-473.6086981	190	0.01
+18340	-473.6086981	190	0.01
+18350	-473.6086961	190	0.01
+18360	-473.6086961	190	0.01
+18370	-473.6086156	190	0.01
+18380	-473.6086156	190	0.01
+18390	-473.6086156	190	0.01
+18400	-473.6086156	190	0.01
+18410	-473.6086156	190	0.01
+18420	-473.6086156	190	0.01
+18430	-473.6086156	190	0.01
+18440	-473.6086156	190	0.01
+18450	-473.6086156	190	0.01
+18460	-473.6086156	190	0.01
+18470	-473.6085686	190	0.01
+18480	-473.6085686	190	0.01
+18490	-473.6085686	190	0.01
+18500	-473.6085686	190	0.01
+18510	-473.6085686	190	0.01
+18520	-473.6085686	190	0.01
+18530	-473.6085686	191	0.01
+18540	-473.6085686	191	0.01
+18550	-473.6085686	191	0.01
+18560	-473.6085686	191	0.01
+18570	-473.6085017	191	0.01
+18580	-473.6083774	191	0.01
+18590	-473.6083774	191	0.01
+18600	-473.6083774	191	0.01
+18610	-473.6083774	191	0.01
+18620	-473.6083774	191	0.01
+18630	-473.6083774	191	0.01
+18640	-473.6083774	191	0.01
+18650	-473.6083757	191	0.01
+18660	-473.6083757	191	0.01
+18670	-473.6083757	191	0.01
+18680	-473.6083709	191	0.01
+18690	-473.6083709	191	0.01
+18700	-473.6083709	191	0.01
+18710	-473.6083709	191	0.01
+18720	-473.6083709	191	0.01
+18730	-473.6083709	191	0.01
+18740	-473.6083709	191	0.01
+18750	-473.6083709	191	0.01
+18760	-473.6083709	191	0.01
+18770	-473.6083709	191	0.01
+18780	-473.6083709	191	0.01
+18790	-473.6083709	191	0.01
+18800	-473.6083709	191	0.01
+Score after final optimization: -473.5963794
+Final	-473.5963794	191	0.01
+Search rep 5 (of 5)
+random seed = 1429655032
+gen	best_like	time	optPrecision
+0	-784.1159516	191	0.5
+10	-781.776802	191	0.5
+20	-753.5592626	191	0.5
+30	-737.0255164	191	0.5
+40	-731.8403082	191	0.5
+50	-695.1116273	192	0.5
+60	-694.547096	192	0.5
+70	-644.8926707	192	0.5
+80	-619.1296038	192	0.5
+90	-607.1641207	192	0.5
+100	-593.8019311	192	0.5
+110	-593.3648809	192	0.5
+120	-565.187485	192	0.5
+130	-555.2250921	192	0.5
+140	-554.6852711	192	0.5
+150	-550.6986674	192	0.5
+160	-544.4752886	192	0.5
+170	-543.3356001	192	0.5
+180	-534.5352031	192	0.5
+190	-534.5131069	192	0.5
+200	-533.4956834	192	0.5
+210	-533.4956834	192	0.5
+220	-532.6877971	192	0.5
+230	-527.5826743	192	0.5
+240	-527.4855583	192	0.5
+250	-516.7819494	192	0.5
+260	-516.7379276	192	0.5
+270	-516.6290869	192	0.5
+280	-516.5695211	192	0.5
+290	-516.5330504	192	0.5
+300	-516.5070925	192	0.5
+310	-516.356807	192	0.5
+320	-516.3566878	192	0.5
+330	-511.6799884	192	0.5
+340	-511.5405507	192	0.5
+350	-511.4708533	192	0.5
+360	-510.2490323	192	0.5
+370	-509.5001818	192	0.5
+380	-509.3965887	192	0.5
+390	-509.3635531	192	0.5
+400	-508.1399058	192	0.5
+410	-508.0161733	192	0.5
+420	-507.995806	192	0.5
+430	-505.1163187	192	0.5
+440	-503.8573211	192	0.5
+450	-492.4336165	192	0.5
+460	-492.2944015	192	0.5
+470	-490.1678519	192	0.5
+480	-490.0538215	192	0.5
+490	-489.9581099	192	0.5
+500	-489.8206146	192	0.5
+510	-489.738339	192	0.5
+520	-487.3182001	192	0.5
+530	-487.2829933	192	0.5
+540	-484.3387295	193	0.5
+550	-484.1431326	193	0.5
+560	-484.0593399	193	0.5
+570	-483.8624147	193	0.5
+580	-483.7988839	193	0.5
+590	-483.6557268	193	0.5
+600	-483.5814522	193	0.5
+610	-483.1414405	193	0.5
+620	-483.1387693	193	0.5
+630	-482.8527575	193	0.5
+640	-481.4815855	193	0.5
+650	-481.3639111	193	0.5
+660	-481.2205575	193	0.5
+670	-481.2067724	193	0.5
+680	-481.0633869	193	0.5
+690	-481.0024267	193	0.5
+700	-480.9719971	193	0.5
+710	-480.9564496	193	0.5
+720	-480.9433496	193	0.5
+730	-480.9433496	193	0.5
+740	-480.8450659	193	0.5
+750	-480.7031552	193	0.5
+760	-480.655631	193	0.5
+770	-480.5999708	193	0.5
+780	-480.2847621	193	0.5
+790	-480.2847562	193	0.5
+800	-480.2684287	193	0.5
+810	-480.1109326	193	0.5
+820	-480.0973455	193	0.5
+830	-480.0349572	193	0.5
+840	-479.9685263	193	0.5
+850	-479.8959986	193	0.5
+860	-479.8012377	193	0.5
+870	-479.76994	193	0.5
+880	-479.7223066	193	0.5
+890	-479.6098822	193	0.5
+900	-479.5094737	193	0.5
+910	-479.4626673	193	0.5
+920	-479.3447089	193	0.5
+930	-479.3304436	193	0.5
+940	-479.2949458	193	0.5
+950	-479.2914099	193	0.5
+960	-479.2840296	193	0.5
+970	-479.2273963	193	0.5
+980	-479.1631593	193	0.5
+990	-479.1219629	193	0.5
+1000	-479.1002389	193	0.5
+1010	-479.0837354	193	0.5
+1020	-479.0463119	193	0.5
+1030	-478.9843918	193	0.5
+1040	-478.9799321	193	0.5
+1050	-478.9370348	193	0.5
+1060	-478.8263572	193	0.5
+1070	-478.7726928	193	0.5
+1080	-478.7726928	194	0.5
+1090	-478.7378682	194	0.5
+1100	-478.7378682	194	0.5
+1110	-478.7186231	194	0.5
+1120	-478.7081063	194	0.5
+1130	-478.6747847	194	0.5
+1140	-478.6055293	194	0.5
+1150	-478.5589636	194	0.5
+1160	-478.5352473	194	0.5
+1170	-478.5013542	194	0.5
+1180	-478.4409444	194	0.5
+1190	-478.3779332	194	0.5
+1200	-478.359377	194	0.5
+1210	-478.2865276	194	0.5
+1220	-478.2251749	194	0.5
+1230	-478.1777321	194	0.5
+1240	-478.1412809	194	0.5
+1250	-478.0787801	194	0.5
+1260	-478.0603844	194	0.5
+1270	-478.0310601	194	0.5
+1280	-477.9914237	194	0.5
+1290	-477.9752161	194	0.5
+1300	-477.9319596	194	0.5
+1310	-477.6113825	194	0.451
+1320	-477.6100762	194	0.451
+1330	-477.5834745	194	0.451
+1340	-477.583107	194	0.451
+1350	-477.583107	194	0.451
+1360	-477.5296714	194	0.451
+1370	-477.483639	194	0.451
+1380	-477.4312199	194	0.451
+1390	-477.3703506	194	0.451
+1400	-477.3303188	194	0.451
+1410	-477.3273681	194	0.451
+1420	-477.3273681	194	0.451
+1430	-477.2804378	194	0.451
+1440	-477.2771726	194	0.451
+1450	-477.2681729	194	0.451
+1460	-477.2284214	194	0.451
+1470	-477.0515902	194	0.451
+1480	-477.0227708	194	0.451
+1490	-476.9785609	194	0.451
+1500	-476.9782159	194	0.451
+1510	-476.9588362	194	0.451
+1520	-476.8945682	194	0.451
+1530	-476.8864458	194	0.451
+1540	-476.8724869	194	0.451
+1550	-476.7405207	194	0.451
+1560	-476.7138064	194	0.451
+1570	-476.7108282	194	0.451
+1580	-476.6722655	194	0.451
+1590	-476.641852	194	0.451
+1600	-476.6121378	194	0.451
+1610	-476.5836322	194	0.451
+1620	-476.576347	194	0.451
+1630	-476.5540781	195	0.451
+1640	-476.5109584	195	0.451
+1650	-476.5044395	195	0.451
+1660	-476.5000217	195	0.451
+1670	-476.5000217	195	0.451
+1680	-476.5000217	195	0.451
+1690	-476.498482	195	0.451
+1700	-476.4869309	195	0.451
+1710	-476.4827933	195	0.451
+1720	-476.4823668	195	0.451
+1730	-476.4780746	195	0.451
+1740	-476.4676363	195	0.451
+1750	-476.4656829	195	0.451
+1760	-476.4390048	195	0.451
+1770	-476.4278991	195	0.451
+1780	-476.4195483	195	0.451
+1790	-476.4195483	195	0.451
+1800	-476.4165398	195	0.451
+1810	-476.4003562	195	0.451
+1820	-476.3934578	195	0.451
+1830	-476.3850481	195	0.451
+1840	-476.3567162	195	0.451
+1850	-476.35257	195	0.451
+1860	-476.2992043	195	0.451
+1870	-476.2624057	195	0.451
+1880	-476.2600086	195	0.451
+1890	-476.2380219	195	0.451
+1900	-476.2180833	195	0.451
+1910	-476.2035872	195	0.451
+1920	-476.1943455	195	0.451
+1930	-476.1889568	195	0.451
+1940	-476.1807409	195	0.451
+1950	-476.1671526	195	0.451
+1960	-476.1434484	195	0.451
+1970	-476.1434484	195	0.451
+1980	-476.1265778	195	0.451
+1990	-476.1136683	195	0.451
+2000	-476.1044336	195	0.451
+2010	-476.0874194	195	0.402
+2020	-476.0802071	195	0.402
+2030	-476.0802071	195	0.402
+2040	-476.0647232	195	0.402
+2050	-476.0549759	195	0.402
+2060	-475.9877501	195	0.402
+2070	-475.9845618	195	0.402
+2080	-475.8857085	195	0.402
+2090	-475.8185637	195	0.402
+2100	-475.8181811	195	0.402
+2110	-475.802516	195	0.402
+2120	-475.7949171	195	0.402
+2130	-475.7946703	195	0.402
+2140	-475.7935292	195	0.402
+2150	-475.7843575	195	0.402
+2160	-475.770026	195	0.402
+2170	-475.7480312	195	0.402
+2180	-475.7277426	196	0.402
+2190	-475.7110279	196	0.402
+2200	-475.6823126	196	0.402
+2210	-475.6338872	196	0.402
+2220	-475.6338872	196	0.402
+2230	-475.6222746	196	0.402
+2240	-475.6222746	196	0.402
+2250	-475.6164561	196	0.402
+2260	-475.6055062	196	0.402
+2270	-475.5856504	196	0.402
+2280	-475.5806076	196	0.402
+2290	-475.5709531	196	0.402
+2300	-475.5294626	196	0.402
+2310	-475.519391	196	0.402
+2320	-475.5100371	196	0.402
+2330	-475.4750976	196	0.402
+2340	-475.4697047	196	0.402
+2350	-475.4697047	196	0.402
+2360	-475.468069	196	0.402
+2370	-475.4671114	196	0.402
+2380	-475.4622361	196	0.402
+2390	-475.4437461	196	0.402
+2400	-475.4160011	196	0.402
+2410	-475.4125307	196	0.402
+2420	-475.4036449	196	0.402
+2430	-475.4035105	196	0.402
+2440	-475.4002917	196	0.402
+2450	-475.387211	196	0.402
+2460	-475.3772652	196	0.402
+2470	-475.371183	196	0.402
+2480	-475.365296	196	0.402
+2490	-475.3647143	196	0.402
+2500	-475.3456523	196	0.402
+2510	-475.3435217	196	0.353
+2520	-475.3412431	196	0.353
+2530	-475.3412431	196	0.353
+2540	-475.3401786	196	0.353
+2550	-475.3216817	196	0.353
+2560	-475.3193033	196	0.353
+2570	-475.3193033	196	0.353
+2580	-475.3193033	196	0.353
+2590	-475.3193033	196	0.353
+2600	-475.3138604	196	0.353
+2610	-475.3092277	196	0.353
+2620	-475.3033838	196	0.353
+2630	-475.3001601	196	0.353
+2640	-475.3001601	196	0.353
+2650	-475.30016	196	0.353
+2660	-475.30016	196	0.353
+2670	-475.2994568	196	0.353
+2680	-475.2951044	196	0.353
+2690	-475.2829941	196	0.353
+2700	-475.2751925	196	0.353
+2710	-475.273183	196	0.353
+2720	-475.2504823	197	0.353
+2730	-475.2504823	197	0.353
+2740	-475.2459473	197	0.353
+2750	-475.2459473	197	0.353
+2760	-475.2438018	197	0.353
+2770	-475.2409937	197	0.353
+2780	-475.2409937	197	0.353
+2790	-475.2403563	197	0.353
+2800	-475.2199026	197	0.353
+2810	-475.2143698	197	0.353
+2820	-475.2096385	197	0.353
+2830	-475.2074288	197	0.353
+2840	-475.2005245	197	0.353
+2850	-475.1914333	197	0.353
+2860	-475.1914333	197	0.353
+2870	-475.1889656	197	0.353
+2880	-475.18453	197	0.353
+2890	-475.18453	197	0.353
+2900	-475.1824714	197	0.353
+2910	-475.1824714	197	0.353
+2920	-475.1824714	197	0.353
+2930	-475.1824714	197	0.353
+2940	-475.1815704	197	0.353
+2950	-475.1774172	197	0.353
+2960	-475.1730513	197	0.353
+2970	-475.163599	197	0.353
+2980	-475.1631124	197	0.353
+2990	-475.1631124	197	0.353
+3000	-475.1627018	197	0.353
+3010	-475.1626096	197	0.304
+3020	-475.1626096	197	0.304
+3030	-475.1621937	197	0.304
+3040	-475.1599845	197	0.304
+3050	-475.1484538	197	0.304
+3060	-475.1427269	197	0.304
+3070	-475.1425166	197	0.304
+3080	-475.1425166	197	0.304
+3090	-475.1411743	197	0.304
+3100	-475.1411743	197	0.304
+3110	-475.1406634	197	0.304
+3120	-475.1355811	197	0.304
+3130	-475.1335753	197	0.304
+3140	-475.1291598	197	0.304
+3150	-475.1220626	197	0.304
+3160	-475.1220626	197	0.304
+3170	-475.1218745	197	0.304
+3180	-475.1203996	197	0.304
+3190	-475.1179306	197	0.304
+3200	-475.1168098	197	0.304
+3210	-475.1150307	197	0.304
+3220	-475.1150307	197	0.304
+3230	-475.1118651	197	0.304
+3240	-475.1113545	198	0.304
+3250	-475.1099616	198	0.304
+3260	-475.1035229	198	0.304
+3270	-475.1008531	198	0.304
+3280	-475.0961227	198	0.304
+3290	-475.0960991	198	0.304
+3300	-475.0960991	198	0.304
+3310	-475.0890896	198	0.304
+3320	-475.0890771	198	0.304
+3330	-475.0854487	198	0.304
+3340	-475.0851697	198	0.304
+3350	-475.0840837	198	0.304
+3360	-475.0840837	198	0.304
+3370	-475.0840837	198	0.304
+3380	-475.0840837	198	0.304
+3390	-475.0799205	198	0.304
+3400	-475.0781659	198	0.304
+3410	-475.0779775	198	0.304
+3420	-475.0779736	198	0.304
+3430	-475.0779593	198	0.304
+3440	-475.0779593	198	0.304
+3450	-475.0779586	198	0.304
+3460	-475.0770494	198	0.304
+3470	-475.0740913	198	0.304
+3480	-475.0735833	198	0.304
+3490	-475.0663152	198	0.304
+3500	-475.0663152	198	0.304
+3510	-475.0644311	198	0.255
+3520	-475.0631903	198	0.255
+3530	-475.0631903	198	0.255
+3540	-475.0631903	198	0.255
+3550	-475.0631903	198	0.255
+3560	-475.0629537	198	0.255
+3570	-475.0629537	198	0.255
+3580	-475.061576	198	0.255
+3590	-475.061576	198	0.255
+3600	-475.061576	198	0.255
+3610	-475.0597362	198	0.255
+3620	-475.0571359	198	0.255
+3630	-475.0564826	198	0.255
+3640	-475.0549111	198	0.255
+3650	-474.8247986	198	0.255
+3660	-474.8161095	198	0.255
+3670	-474.8161095	198	0.255
+3680	-474.8155495	198	0.255
+3690	-474.8116314	198	0.255
+3700	-474.8098263	198	0.255
+3710	-474.8025455	198	0.255
+3720	-474.8014651	198	0.255
+3730	-474.8014651	198	0.255
+3740	-474.7808963	198	0.255
+3750	-474.7748361	198	0.255
+3760	-474.774826	198	0.255
+3770	-474.7575069	198	0.255
+3780	-474.7549745	198	0.255
+3790	-474.7549745	198	0.255
+3800	-474.754973	199	0.255
+3810	-474.7549627	199	0.255
+3820	-474.7549624	199	0.255
+3830	-474.7549624	199	0.255
+3840	-474.7549624	199	0.255
+3850	-474.7549624	199	0.255
+3860	-474.7534775	199	0.255
+3870	-474.7534775	199	0.255
+3880	-474.7534775	199	0.255
+3890	-474.751034	199	0.255
+3900	-474.751034	199	0.255
+3910	-474.751034	199	0.255
+3920	-474.7499399	199	0.255
+3930	-474.7499399	199	0.255
+3940	-474.7498837	199	0.255
+3950	-474.7498837	199	0.255
+3960	-474.7498698	199	0.255
+3970	-474.749665	199	0.255
+3980	-474.7493357	199	0.255
+3990	-474.7493355	199	0.255
+4000	-474.7427309	199	0.255
+4010	-474.736736	199	0.206
+4020	-474.7333602	199	0.206
+4030	-474.7330614	199	0.206
+4040	-474.7330614	199	0.206
+4050	-474.7314929	199	0.206
+4060	-474.7311993	199	0.206
+4070	-474.7311869	199	0.206
+4080	-474.7311869	199	0.206
+4090	-474.7305002	199	0.206
+4100	-474.7305002	199	0.206
+4110	-474.7304793	199	0.206
+4120	-474.7302881	199	0.206
+4130	-474.7302881	199	0.206
+4140	-474.7302881	199	0.206
+4150	-474.7286204	199	0.206
+4160	-474.725405	199	0.206
+4170	-474.7228453	199	0.206
+4180	-474.7228453	199	0.206
+4190	-474.722519	199	0.206
+4200	-474.7217327	199	0.206
+4210	-474.7160728	199	0.206
+4220	-474.7145716	199	0.206
+4230	-474.7144006	199	0.206
+4240	-474.7143871	199	0.206
+4250	-474.7135875	199	0.206
+4260	-474.7135875	199	0.206
+4270	-474.7132562	199	0.206
+4280	-474.7129813	199	0.206
+4290	-474.7105084	200	0.206
+4300	-474.7104445	200	0.206
+4310	-474.7104445	200	0.206
+4320	-474.7101381	200	0.206
+4330	-474.7093802	200	0.206
+4340	-474.7076168	200	0.206
+4350	-474.7073064	200	0.206
+4360	-474.7073064	200	0.206
+4370	-474.7073064	200	0.206
+4380	-474.7059019	200	0.206
+4390	-474.7041364	200	0.206
+4400	-474.7037129	200	0.206
+4410	-474.7037129	200	0.206
+4420	-474.7037129	200	0.206
+4430	-474.7037129	200	0.206
+4440	-474.7037123	200	0.206
+4450	-474.7037122	200	0.206
+4460	-474.7037122	200	0.206
+4470	-474.7034342	200	0.206
+4480	-474.7033736	200	0.206
+4490	-474.7033736	200	0.206
+4500	-474.7028356	200	0.206
+4510	-474.7025941	200	0.157
+4520	-474.7025941	200	0.157
+4530	-474.7019997	200	0.157
+4540	-474.7019407	200	0.157
+4550	-474.7019407	200	0.157
+4560	-474.7019407	200	0.157
+4570	-474.7019407	200	0.157
+4580	-474.7019407	200	0.157
+4590	-474.7019407	200	0.157
+4600	-474.7019407	200	0.157
+4610	-474.7016769	200	0.157
+4620	-474.7016769	200	0.157
+4630	-474.7006877	200	0.157
+4640	-474.7001815	200	0.157
+4650	-474.6998779	200	0.157
+4660	-474.6986854	200	0.157
+4670	-474.6986854	200	0.157
+4680	-474.6986854	200	0.157
+4690	-474.6986854	200	0.157
+4700	-474.6962895	201	0.157
+4710	-474.6960036	201	0.157
+4720	-474.6949158	201	0.157
+4730	-474.6941615	201	0.157
+4740	-474.6935847	201	0.157
+4750	-474.6922183	201	0.157
+4760	-474.6922183	201	0.157
+4770	-474.6922183	201	0.157
+4780	-474.6920594	201	0.157
+4790	-474.6919096	201	0.157
+4800	-474.6919096	201	0.157
+4810	-474.6919096	201	0.157
+4820	-474.6919064	201	0.157
+4830	-474.6915572	201	0.157
+4840	-474.6915572	201	0.157
+4850	-474.691456	201	0.157
+4860	-474.6909493	201	0.157
+4870	-474.6909418	201	0.157
+4880	-474.6909418	201	0.157
+4890	-474.6908978	201	0.157
+4900	-474.6898953	201	0.157
+4910	-474.6887292	201	0.157
+4920	-474.6884222	201	0.157
+4930	-474.6884222	201	0.157
+4940	-474.6884184	201	0.157
+4950	-474.6884184	201	0.157
+4960	-474.688042	201	0.157
+4970	-474.688042	201	0.157
+4980	-474.688042	201	0.157
+4990	-474.6869882	201	0.157
+5000	-474.6869882	201	0.157
+5010	-474.6866794	201	0.108
+5020	-474.6866794	201	0.108
+5030	-474.6865378	201	0.108
+5040	-474.6865378	201	0.108
+5050	-474.6854285	201	0.108
+5060	-474.6854285	201	0.108
+5070	-474.6853725	201	0.108
+5080	-474.6853434	201	0.108
+5090	-474.6848772	201	0.108
+5100	-474.6848219	201	0.108
+5110	-474.6848219	201	0.108
+5120	-474.6846328	201	0.108
+5130	-474.6846328	201	0.108
+5140	-474.6842375	201	0.108
+5150	-474.6842375	201	0.108
+5160	-474.6825471	201	0.108
+5170	-474.6823814	201	0.108
+5180	-474.6823814	201	0.108
+5190	-474.682279	201	0.108
+5200	-474.682279	202	0.108
+5210	-474.6822035	202	0.108
+5220	-474.6820583	202	0.108
+5230	-474.6820583	202	0.108
+5240	-474.6820583	202	0.108
+5250	-474.6820583	202	0.108
+5260	-474.6820583	202	0.108
+5270	-474.6814697	202	0.108
+5280	-474.6806629	202	0.108
+5290	-474.6806525	202	0.108
+5300	-474.6806525	202	0.108
+5310	-474.6806525	202	0.108
+5320	-474.6806525	202	0.108
+5330	-474.6806525	202	0.108
+5340	-474.6806525	202	0.108
+5350	-474.6802147	202	0.108
+5360	-474.680072	202	0.108
+5370	-474.680072	202	0.108
+5380	-474.6785846	202	0.108
+5390	-474.6785846	202	0.108
+5400	-474.6785846	202	0.108
+5410	-474.6785846	202	0.108
+5420	-474.6785846	202	0.108
+5430	-474.6785846	202	0.108
+5440	-474.6785846	202	0.108
+5450	-474.6784574	202	0.108
+5460	-474.6783926	202	0.108
+5470	-474.6783926	202	0.108
+5480	-474.6783926	202	0.108
+5490	-474.6783926	202	0.108
+5500	-474.6774276	202	0.108
+5510	-474.6774276	202	0.059
+5520	-474.677358	202	0.059
+5530	-474.677358	202	0.059
+5540	-474.677358	202	0.059
+5550	-474.6770624	202	0.059
+5560	-474.6770624	202	0.059
+5570	-474.6761832	202	0.059
+5580	-474.6761832	202	0.059
+5590	-474.6761722	202	0.059
+5600	-474.6750201	202	0.059
+5610	-474.6750201	202	0.059
+5620	-474.6750201	202	0.059
+5630	-474.6741916	202	0.059
+5640	-474.6741916	202	0.059
+5650	-474.6741793	202	0.059
+5660	-474.6741227	202	0.059
+5670	-474.6741227	203	0.059
+5680	-474.6741227	203	0.059
+5690	-474.6741131	203	0.059
+5700	-474.6730591	203	0.059
+5710	-474.6729527	203	0.059
+5720	-474.672518	203	0.059
+5730	-474.6724805	203	0.059
+5740	-474.6724805	203	0.059
+5750	-474.6724741	203	0.059
+5760	-474.6724741	203	0.059
+5770	-474.6722893	203	0.059
+5780	-474.6722893	203	0.059
+5790	-474.6721702	203	0.059
+5800	-474.6718283	203	0.059
+5810	-474.6716454	203	0.059
+5820	-474.6716454	203	0.059
+5830	-474.6716454	203	0.059
+5840	-474.6703491	203	0.059
+5850	-474.6703491	203	0.059
+5860	-474.6703491	203	0.059
+5870	-474.6703491	203	0.059
+5880	-474.6698765	203	0.059
+5890	-474.6693972	203	0.059
+5900	-474.6693477	203	0.059
+5910	-474.669267	203	0.059
+5920	-474.6692643	203	0.059
+5930	-474.6690883	203	0.059
+5940	-474.6689973	203	0.059
+5950	-474.6677112	203	0.059
+5960	-474.6675151	203	0.059
+5970	-474.667515	203	0.059
+5980	-474.667515	203	0.059
+5990	-474.667515	203	0.059
+6000	-474.667515	203	0.059
+6010	-474.6249942	203	0.01
+6020	-474.6249942	203	0.01
+6030	-474.6249942	203	0.01
+6040	-474.624498	203	0.01
+6050	-474.624498	203	0.01
+6060	-474.624498	203	0.01
+6070	-474.624498	203	0.01
+6080	-474.623813	203	0.01
+6090	-474.623813	204	0.01
+6100	-474.623813	204	0.01
+6110	-474.6238017	204	0.01
+6120	-474.6228759	204	0.01
+6130	-474.6228759	204	0.01
+6140	-474.6228055	204	0.01
+6150	-474.6211405	204	0.01
+6160	-474.6200748	204	0.01
+6170	-474.6200748	204	0.01
+6180	-474.6200748	204	0.01
+6190	-474.619431	204	0.01
+6200	-474.619431	204	0.01
+6210	-474.6194278	204	0.01
+6220	-474.6193753	204	0.01
+6230	-474.6183243	204	0.01
+6240	-474.6183243	204	0.01
+6250	-474.6183243	204	0.01
+6260	-474.6183243	204	0.01
+6270	-474.6183243	204	0.01
+6280	-474.6183243	204	0.01
+6290	-474.6183243	204	0.01
+6300	-474.6183243	204	0.01
+6310	-474.6182986	204	0.01
+6320	-474.6182986	204	0.01
+6330	-474.6182983	204	0.01
+6340	-474.6182983	204	0.01
+6350	-474.6182983	204	0.01
+6360	-474.6182983	204	0.01
+6370	-474.6181822	204	0.01
+6380	-474.6181625	204	0.01
+6390	-474.6181625	204	0.01
+6400	-474.6181623	204	0.01
+6410	-474.6181204	204	0.01
+6420	-474.6181204	205	0.01
+6430	-474.6181204	205	0.01
+6440	-474.6179258	205	0.01
+6450	-474.6179258	205	0.01
+6460	-474.6179258	205	0.01
+6470	-474.6179258	205	0.01
+6480	-474.6178707	205	0.01
+6490	-474.6178707	205	0.01
+6500	-474.6178707	205	0.01
+6510	-474.6178707	205	0.01
+6520	-474.6178707	205	0.01
+6530	-474.6178707	205	0.01
+6540	-474.6178707	205	0.01
+6550	-474.617834	205	0.01
+6560	-474.617834	205	0.01
+6570	-474.6177394	205	0.01
+6580	-474.617686	205	0.01
+6590	-474.6176003	205	0.01
+6600	-474.6176003	205	0.01
+6610	-474.6176003	205	0.01
+6620	-474.6174523	205	0.01
+6630	-474.6174523	205	0.01
+6640	-474.6174523	205	0.01
+6650	-474.6174523	205	0.01
+6660	-474.6174523	205	0.01
+6670	-474.61741	205	0.01
+6680	-474.61741	205	0.01
+6690	-474.6174071	205	0.01
+6700	-474.6174071	205	0.01
+6710	-474.6174071	205	0.01
+6720	-474.6174071	205	0.01
+6730	-474.6174016	205	0.01
+6740	-474.6174016	205	0.01
+6750	-474.6174016	205	0.01
+6760	-474.6173814	205	0.01
+6770	-474.6172637	206	0.01
+6780	-474.6172624	206	0.01
+6790	-474.6172624	206	0.01
+6800	-474.6172592	206	0.01
+6810	-474.6172592	206	0.01
+6820	-474.6172592	206	0.01
+6830	-474.6172592	206	0.01
+6840	-474.6172464	206	0.01
+6850	-474.6172464	206	0.01
+6860	-474.6172453	206	0.01
+6870	-474.6172453	206	0.01
+6880	-474.6172123	206	0.01
+6890	-474.6172123	206	0.01
+6900	-474.6170117	206	0.01
+6910	-474.6170117	206	0.01
+6920	-474.6170117	206	0.01
+6930	-474.6170117	206	0.01
+6940	-474.6167702	206	0.01
+6950	-474.6167702	206	0.01
+6960	-474.6167699	206	0.01
+6970	-474.6167699	206	0.01
+6980	-474.6139205	206	0.01
+6990	-474.6139205	206	0.01
+7000	-474.6139205	206	0.01
+7010	-474.6138765	206	0.01
+7020	-474.6138765	206	0.01
+7030	-474.6138765	206	0.01
+7040	-474.6138765	206	0.01
+7050	-474.6138765	206	0.01
+7060	-474.6138765	206	0.01
+7070	-474.6138737	206	0.01
+7080	-474.6138737	206	0.01
+7090	-474.6138736	206	0.01
+7100	-474.6138736	206	0.01
+7110	-474.6138736	207	0.01
+7120	-474.6138736	207	0.01
+7130	-474.6138736	207	0.01
+7140	-474.6137545	207	0.01
+7150	-474.6137545	207	0.01
+7160	-474.6135887	207	0.01
+7170	-474.6135887	207	0.01
+7180	-474.6135887	207	0.01
+7190	-474.6135887	207	0.01
+7200	-474.6135887	207	0.01
+7210	-474.6134309	207	0.01
+7220	-474.6134309	207	0.01
+7230	-474.6134309	207	0.01
+7240	-474.6134309	207	0.01
+7250	-474.6133269	207	0.01
+7260	-474.6133269	207	0.01
+7270	-474.6133269	207	0.01
+7280	-474.6132439	207	0.01
+7290	-474.6130841	207	0.01
+7300	-474.6130841	207	0.01
+7310	-474.613004	207	0.01
+7320	-474.613004	207	0.01
+7330	-474.6129101	207	0.01
+7340	-474.6127933	207	0.01
+7350	-474.6127933	207	0.01
+7360	-474.6127933	207	0.01
+7370	-474.6126658	207	0.01
+7380	-474.6126658	207	0.01
+7390	-474.6125911	207	0.01
+7400	-474.6125911	207	0.01
+7410	-474.6125911	207	0.01
+7420	-474.6125911	207	0.01
+7430	-474.6125911	207	0.01
+7440	-474.6125911	207	0.01
+7450	-474.6125911	208	0.01
+7460	-474.6125911	208	0.01
+7470	-474.6125911	208	0.01
+7480	-474.6125911	208	0.01
+7490	-474.6122707	208	0.01
+7500	-474.6122707	208	0.01
+7510	-474.6122707	208	0.01
+7520	-474.6121402	208	0.01
+7530	-474.6121402	208	0.01
+7540	-474.6121402	208	0.01
+7550	-474.6121402	208	0.01
+7560	-474.6121402	208	0.01
+7570	-474.6120773	208	0.01
+7580	-474.612077	208	0.01
+7590	-474.6120217	208	0.01
+7600	-474.6120217	208	0.01
+7610	-474.6120217	208	0.01
+7620	-474.6120217	208	0.01
+7630	-474.6120217	208	0.01
+7640	-474.6120217	208	0.01
+7650	-474.6120217	208	0.01
+7660	-474.6120217	208	0.01
+7670	-474.6117668	208	0.01
+7680	-474.6116676	208	0.01
+7690	-474.6116676	208	0.01
+7700	-474.6116676	208	0.01
+7710	-474.6116676	208	0.01
+7720	-474.6116676	208	0.01
+7730	-474.6116676	208	0.01
+7740	-474.6116676	208	0.01
+7750	-474.6116676	208	0.01
+7760	-474.6116676	208	0.01
+7770	-474.6116676	208	0.01
+7780	-474.6116676	208	0.01
+7790	-474.6115958	208	0.01
+7800	-474.6115958	209	0.01
+7810	-474.6115958	209	0.01
+7820	-474.6115958	209	0.01
+7830	-474.6115958	209	0.01
+7840	-474.6115094	209	0.01
+7850	-474.6115094	209	0.01
+7860	-474.6115094	209	0.01
+7870	-474.6115094	209	0.01
+7880	-474.6115094	209	0.01
+7890	-474.6115066	209	0.01
+7900	-474.6115066	209	0.01
+7910	-474.611424	209	0.01
+7920	-474.611424	209	0.01
+7930	-474.611424	209	0.01
+7940	-474.6112793	209	0.01
+7950	-474.6112793	209	0.01
+7960	-474.6112569	209	0.01
+7970	-474.6112569	209	0.01
+7980	-474.6112566	209	0.01
+7990	-474.6112566	209	0.01
+8000	-474.6112566	209	0.01
+8010	-474.6112566	209	0.01
+8020	-474.6112566	209	0.01
+8030	-474.6112566	209	0.01
+8040	-474.6112566	209	0.01
+8050	-474.6112024	209	0.01
+8060	-474.6112024	209	0.01
+8070	-474.6111348	209	0.01
+8080	-474.6110696	209	0.01
+8090	-474.6110696	209	0.01
+8100	-474.6107662	209	0.01
+8110	-474.6107662	209	0.01
+8120	-474.6107356	209	0.01
+8130	-474.6107356	210	0.01
+8140	-474.6107356	210	0.01
+8150	-474.6107345	210	0.01
+8160	-474.6107345	210	0.01
+8170	-474.6107345	210	0.01
+8180	-474.6106634	210	0.01
+8190	-474.6106634	210	0.01
+8200	-474.6105469	210	0.01
+8210	-474.6102767	210	0.01
+8220	-474.6102767	210	0.01
+8230	-474.6102767	210	0.01
+8240	-474.6102767	210	0.01
+8250	-474.6102767	210	0.01
+8260	-474.6102767	210	0.01
+8270	-474.6102766	210	0.01
+8280	-474.609982	210	0.01
+8290	-474.609982	210	0.01
+8300	-474.609982	210	0.01
+8310	-474.609982	210	0.01
+8320	-474.609982	210	0.01
+8330	-474.609982	210	0.01
+8340	-474.609982	210	0.01
+8350	-474.609982	210	0.01
+8360	-474.609982	210	0.01
+8370	-474.609982	210	0.01
+8380	-474.609982	210	0.01
+8390	-474.6098967	210	0.01
+8400	-474.6098967	210	0.01
+8410	-474.6098967	210	0.01
+8420	-474.6098967	210	0.01
+8430	-474.6097893	210	0.01
+8440	-474.6097243	210	0.01
+8450	-474.609571	210	0.01
+8460	-474.6092204	210	0.01
+8470	-474.6092204	210	0.01
+8480	-474.6092204	211	0.01
+8490	-474.6092204	211	0.01
+8500	-474.6092204	211	0.01
+8510	-474.6092193	211	0.01
+8520	-474.6092193	211	0.01
+8530	-474.6090528	211	0.01
+8540	-474.6090528	211	0.01
+8550	-474.6090528	211	0.01
+8560	-474.6088261	211	0.01
+8570	-474.6088261	211	0.01
+8580	-474.6088261	211	0.01
+8590	-474.6088261	211	0.01
+8600	-474.6088261	211	0.01
+8610	-474.6088261	211	0.01
+8620	-474.6088261	211	0.01
+8630	-474.6088261	211	0.01
+8640	-474.6088261	211	0.01
+8650	-474.6088261	211	0.01
+8660	-474.6088261	211	0.01
+8670	-474.6087607	211	0.01
+8680	-474.6087607	211	0.01
+8690	-474.6087607	211	0.01
+8700	-474.6087607	211	0.01
+8710	-474.6087408	211	0.01
+8720	-474.6087408	211	0.01
+8730	-474.6087408	211	0.01
+8740	-474.6087408	211	0.01
+8750	-474.6087408	211	0.01
+8760	-474.608624	211	0.01
+8770	-474.608624	211	0.01
+8780	-474.608624	211	0.01
+8790	-474.608624	211	0.01
+8800	-474.608624	211	0.01
+8810	-474.6086239	212	0.01
+8820	-474.6086239	212	0.01
+8830	-474.6084125	212	0.01
+8840	-474.6083718	212	0.01
+8850	-474.6083718	212	0.01
+8860	-474.6083718	212	0.01
+8870	-474.6083718	212	0.01
+8880	-474.6083718	212	0.01
+8890	-474.6083643	212	0.01
+8900	-474.6083631	212	0.01
+8910	-474.6083622	212	0.01
+8920	-474.6083622	212	0.01
+8930	-474.6083622	212	0.01
+8940	-474.6082515	212	0.01
+8950	-474.6082514	212	0.01
+8960	-474.608251	212	0.01
+8970	-474.6081445	212	0.01
+8980	-474.6081445	212	0.01
+8990	-474.6081445	212	0.01
+9000	-474.6081445	212	0.01
+9010	-474.6081445	212	0.01
+9020	-474.6081444	212	0.01
+9030	-474.6079719	212	0.01
+9040	-474.6079719	212	0.01
+9050	-474.6079719	212	0.01
+9060	-474.6079712	212	0.01
+9070	-474.6079675	212	0.01
+9080	-474.6079675	212	0.01
+9090	-474.6079675	212	0.01
+9100	-474.6078526	212	0.01
+9110	-474.6078526	212	0.01
+9120	-474.6077166	213	0.01
+9130	-474.6076183	213	0.01
+9140	-474.6076183	213	0.01
+9150	-474.6076183	213	0.01
+9160	-474.6076183	213	0.01
+9170	-474.6076183	213	0.01
+9180	-474.6075775	213	0.01
+9190	-474.6075775	213	0.01
+9200	-474.6075775	213	0.01
+9210	-474.6075775	213	0.01
+9220	-474.6075775	213	0.01
+9230	-474.6075775	213	0.01
+9240	-474.6075775	213	0.01
+9250	-474.6075775	213	0.01
+9260	-474.6075775	213	0.01
+9270	-474.6075775	213	0.01
+9280	-474.6075775	213	0.01
+9290	-474.6075775	213	0.01
+9300	-474.6075674	213	0.01
+9310	-474.6075674	213	0.01
+9320	-474.6075674	213	0.01
+9330	-474.6075674	213	0.01
+9340	-474.6075674	213	0.01
+9350	-474.6075674	213	0.01
+9360	-474.6075674	213	0.01
+9370	-474.6075674	213	0.01
+9380	-474.6075673	213	0.01
+9390	-474.6075673	213	0.01
+9400	-474.6075673	213	0.01
+9410	-474.6075673	213	0.01
+9420	-474.607322	213	0.01
+9430	-474.607322	213	0.01
+9440	-474.607322	213	0.01
+9450	-474.607322	213	0.01
+9460	-474.607322	214	0.01
+9470	-474.607322	214	0.01
+9480	-474.607322	214	0.01
+9490	-474.607322	214	0.01
+9500	-474.6072152	214	0.01
+9510	-474.6071444	214	0.01
+9520	-474.6071444	214	0.01
+9530	-474.6071444	214	0.01
+9540	-474.6071444	214	0.01
+9550	-474.6070291	214	0.01
+9560	-474.6070291	214	0.01
+9570	-474.6070291	214	0.01
+9580	-474.6070291	214	0.01
+9590	-474.6070291	214	0.01
+9600	-474.6070291	214	0.01
+9610	-474.6070291	214	0.01
+9620	-474.6070291	214	0.01
+9630	-474.6068807	214	0.01
+9640	-474.6067308	214	0.01
+9650	-474.6067308	214	0.01
+9660	-474.6067308	214	0.01
+9670	-474.6067308	214	0.01
+9680	-474.6067308	214	0.01
+9690	-474.6067308	214	0.01
+9700	-474.6067308	214	0.01
+9710	-474.606669	214	0.01
+9720	-474.606669	214	0.01
+9730	-474.606663	214	0.01
+9740	-474.606663	214	0.01
+9750	-474.606663	214	0.01
+9760	-474.606663	214	0.01
+9770	-474.606663	214	0.01
+9780	-474.606663	214	0.01
+9790	-474.606663	215	0.01
+9800	-474.606663	215	0.01
+9810	-474.606663	215	0.01
+9820	-474.606663	215	0.01
+9830	-474.6065688	215	0.01
+9840	-474.6065688	215	0.01
+9850	-474.6065688	215	0.01
+9860	-474.6065688	215	0.01
+9870	-474.6065688	215	0.01
+9880	-474.6064875	215	0.01
+9890	-474.6064875	215	0.01
+9900	-474.6064875	215	0.01
+9910	-474.6064875	215	0.01
+9920	-474.606471	215	0.01
+9930	-474.6064689	215	0.01
+9940	-474.6064689	215	0.01
+9950	-474.6064689	215	0.01
+9960	-474.6064689	215	0.01
+9970	-474.6064689	215	0.01
+9980	-474.6064689	215	0.01
+9990	-474.6064689	215	0.01
+10000	-474.6063784	215	0.01
+10010	-474.6063784	215	0.01
+10020	-474.6063784	215	0.01
+10030	-474.6063784	215	0.01
+10040	-474.6063784	215	0.01
+10050	-474.6063784	215	0.01
+10060	-474.6063747	215	0.01
+10070	-474.6063747	215	0.01
+10080	-474.6063747	215	0.01
+10090	-474.6063747	215	0.01
+10100	-474.6063747	215	0.01
+10110	-474.6063747	216	0.01
+10120	-474.6063747	216	0.01
+10130	-474.6063747	216	0.01
+10140	-474.6063095	216	0.01
+10150	-474.6062206	216	0.01
+10160	-474.6062206	216	0.01
+10170	-474.6062206	216	0.01
+10180	-474.6062206	216	0.01
+10190	-474.6062206	216	0.01
+10200	-474.6061903	216	0.01
+10210	-474.6061903	216	0.01
+10220	-474.6061903	216	0.01
+10230	-474.6061903	216	0.01
+10240	-474.6061903	216	0.01
+10250	-474.6061903	216	0.01
+10260	-474.6061903	216	0.01
+10270	-474.6061903	216	0.01
+10280	-474.6061903	216	0.01
+10290	-474.6061903	216	0.01
+10300	-474.6061903	216	0.01
+10310	-474.6061903	216	0.01
+10320	-474.6061903	216	0.01
+10330	-474.6061903	216	0.01
+10340	-474.6061903	216	0.01
+10350	-474.6061903	216	0.01
+10360	-474.6061903	216	0.01
+10370	-474.6061559	216	0.01
+10380	-474.6061559	216	0.01
+10390	-474.6061559	216	0.01
+10400	-474.6061559	216	0.01
+10410	-474.6061559	216	0.01
+10420	-474.6061559	216	0.01
+10430	-474.6061559	217	0.01
+10440	-474.6061556	217	0.01
+10450	-474.6061556	217	0.01
+10460	-474.6061556	217	0.01
+10470	-474.6061556	217	0.01
+10480	-474.6061556	217	0.01
+10490	-474.6061556	217	0.01
+10500	-474.6061524	217	0.01
+10510	-474.6061524	217	0.01
+10520	-474.6061524	217	0.01
+10530	-474.6061524	217	0.01
+10540	-474.6061524	217	0.01
+10550	-474.6061505	217	0.01
+10560	-474.6060846	217	0.01
+10570	-474.6060846	217	0.01
+10580	-474.6060846	217	0.01
+10590	-474.6060846	217	0.01
+10600	-474.6060846	217	0.01
+10610	-474.6060846	217	0.01
+10620	-474.606072	217	0.01
+10630	-474.606072	217	0.01
+10640	-474.606072	217	0.01
+10650	-474.606072	217	0.01
+10660	-474.606072	217	0.01
+10670	-474.606072	217	0.01
+10680	-474.606072	217	0.01
+10690	-474.606072	217	0.01
+10700	-474.606072	217	0.01
+10710	-474.606072	217	0.01
+10720	-474.606072	217	0.01
+10730	-474.606072	217	0.01
+10740	-474.606072	217	0.01
+10750	-474.6060704	218	0.01
+10760	-474.606064	218	0.01
+10770	-474.606064	218	0.01
+10780	-474.606064	218	0.01
+10790	-474.606064	218	0.01
+10800	-474.606064	218	0.01
+10810	-474.606064	218	0.01
+10820	-474.606064	218	0.01
+10830	-474.606064	218	0.01
+10840	-474.606064	218	0.01
+10850	-474.606064	218	0.01
+10860	-474.606064	218	0.01
+10870	-474.6060437	218	0.01
+10880	-474.6060437	218	0.01
+10890	-474.6060437	218	0.01
+10900	-474.6060437	218	0.01
+10910	-474.6060437	218	0.01
+10920	-474.6060437	218	0.01
+10930	-474.6060437	218	0.01
+10940	-474.6060437	218	0.01
+10950	-474.6060437	218	0.01
+10960	-474.6060437	218	0.01
+10970	-474.6060437	218	0.01
+10980	-474.6060437	218	0.01
+10990	-474.6060437	218	0.01
+11000	-474.6060437	218	0.01
+11010	-474.6060237	218	0.01
+11020	-474.6060237	218	0.01
+11030	-474.6060237	218	0.01
+11040	-474.6060237	218	0.01
+11050	-474.6060237	218	0.01
+11060	-474.6060237	218	0.01
+11070	-474.6060237	218	0.01
+11080	-474.6060237	218	0.01
+11090	-474.606015	219	0.01
+11100	-474.606015	219	0.01
+11110	-474.606015	219	0.01
+11120	-474.6060052	219	0.01
+11130	-474.6060052	219	0.01
+11140	-474.6060052	219	0.01
+11150	-474.6060052	219	0.01
+11160	-474.6060052	219	0.01
+11170	-474.6060052	219	0.01
+11180	-474.6060052	219	0.01
+11190	-474.6060052	219	0.01
+11200	-474.6060052	219	0.01
+11210	-474.6060048	219	0.01
+11220	-474.6060048	219	0.01
+11230	-474.6060048	219	0.01
+11240	-474.6060048	219	0.01
+11250	-474.6060048	219	0.01
+11260	-474.6060048	219	0.01
+11270	-474.6060048	219	0.01
+11280	-474.6060048	219	0.01
+11290	-474.6060002	219	0.01
+11300	-474.6060002	219	0.01
+11310	-474.6060002	219	0.01
+11320	-474.6059807	219	0.01
+11330	-474.6059807	219	0.01
+11340	-474.6059807	219	0.01
+11350	-474.6059807	219	0.01
+11360	-474.6059807	219	0.01
+11370	-474.6059562	219	0.01
+11380	-474.6058879	219	0.01
+11390	-474.6058879	219	0.01
+11400	-474.6058879	219	0.01
+11410	-474.6058879	220	0.01
+11420	-474.6058879	220	0.01
+11430	-474.6058879	220	0.01
+11440	-474.6058879	220	0.01
+11450	-474.6058879	220	0.01
+11460	-474.6058426	220	0.01
+11470	-474.6058426	220	0.01
+11480	-474.6058426	220	0.01
+11490	-474.6058426	220	0.01
+11500	-474.6058426	220	0.01
+11510	-474.6057974	220	0.01
+11520	-474.605748	220	0.01
+11530	-474.605748	220	0.01
+11540	-474.605748	220	0.01
+11550	-474.605748	220	0.01
+11560	-474.605748	220	0.01
+11570	-474.605748	220	0.01
+11580	-474.605748	220	0.01
+11590	-474.605748	220	0.01
+11600	-474.605748	220	0.01
+11610	-474.605748	220	0.01
+11620	-474.605748	220	0.01
+11630	-474.6057405	220	0.01
+11640	-474.6057059	220	0.01
+11650	-474.6057059	220	0.01
+11660	-474.6057059	220	0.01
+11670	-474.6057059	220	0.01
+11680	-474.605683	220	0.01
+11690	-474.6056774	220	0.01
+11700	-474.6056774	220	0.01
+11710	-474.6056774	220	0.01
+11720	-474.6056774	220	0.01
+11730	-474.6056774	220	0.01
+11740	-474.6056774	220	0.01
+11750	-474.6056774	221	0.01
+11760	-474.6056774	221	0.01
+11770	-474.6056774	221	0.01
+11780	-474.6056774	221	0.01
+11790	-474.605657	221	0.01
+11800	-474.605657	221	0.01
+11810	-474.605657	221	0.01
+11820	-474.605657	221	0.01
+11830	-474.605657	221	0.01
+11840	-474.605657	221	0.01
+11850	-474.605657	221	0.01
+11860	-474.6056569	221	0.01
+11870	-474.6056569	221	0.01
+11880	-474.6056569	221	0.01
+11890	-474.6056569	221	0.01
+11900	-474.6056569	221	0.01
+11910	-474.6056569	221	0.01
+11920	-474.6056569	221	0.01
+11930	-474.6056569	221	0.01
+11940	-474.6056569	221	0.01
+11950	-474.6055952	221	0.01
+11960	-474.6055952	221	0.01
+11970	-474.6055952	221	0.01
+11980	-474.6055952	221	0.01
+11990	-474.6055952	221	0.01
+12000	-474.6055952	221	0.01
+12010	-474.6055952	221	0.01
+12020	-474.6055952	221	0.01
+12030	-474.6055539	221	0.01
+12040	-474.6055539	221	0.01
+12050	-474.6055539	221	0.01
+12060	-474.6055539	221	0.01
+12070	-474.6055515	221	0.01
+12080	-474.6055515	221	0.01
+12090	-474.6055515	222	0.01
+12100	-474.6055515	222	0.01
+12110	-474.6055515	222	0.01
+12120	-474.6055515	222	0.01
+12130	-474.6055515	222	0.01
+12140	-474.6055515	222	0.01
+12150	-474.6055515	222	0.01
+12160	-474.6055515	222	0.01
+12170	-474.6055515	222	0.01
+12180	-474.6055515	222	0.01
+12190	-474.6055515	222	0.01
+12200	-474.6055515	222	0.01
+12210	-474.6055515	222	0.01
+12220	-474.6055384	222	0.01
+12230	-474.6054585	222	0.01
+12240	-474.6054557	222	0.01
+12250	-474.6054557	222	0.01
+12260	-474.6054505	222	0.01
+12270	-474.6054505	222	0.01
+12280	-474.6054505	222	0.01
+12290	-474.6054505	222	0.01
+12300	-474.6054505	222	0.01
+12310	-474.6054505	222	0.01
+12320	-474.6054505	222	0.01
+12330	-474.6054505	222	0.01
+12340	-474.6054505	222	0.01
+12350	-474.6054505	222	0.01
+12360	-474.6054505	222	0.01
+12370	-474.6054505	222	0.01
+12380	-474.6054505	222	0.01
+12390	-474.6054505	222	0.01
+12400	-474.6054505	222	0.01
+12410	-474.6054505	222	0.01
+12420	-474.6054505	223	0.01
+12430	-474.6054505	223	0.01
+12440	-474.6054505	223	0.01
+12450	-474.6054504	223	0.01
+12460	-474.6054504	223	0.01
+12470	-474.6054504	223	0.01
+12480	-474.6054504	223	0.01
+12490	-474.6054504	223	0.01
+12500	-474.6054504	223	0.01
+12510	-474.6054504	223	0.01
+12520	-474.6054504	223	0.01
+12530	-474.6054504	223	0.01
+12540	-474.6054504	223	0.01
+12550	-474.6054504	223	0.01
+12560	-474.6054504	223	0.01
+12570	-474.6054504	223	0.01
+12580	-474.6054504	223	0.01
+12590	-474.6054504	223	0.01
+12600	-474.6054504	223	0.01
+12610	-474.6054504	223	0.01
+12620	-474.6054504	223	0.01
+12630	-474.6054504	223	0.01
+12640	-474.6054504	223	0.01
+12650	-474.6054504	223	0.01
+12660	-474.6054504	223	0.01
+12670	-474.6054504	223	0.01
+12680	-474.6054504	223	0.01
+12690	-474.6054504	223	0.01
+12700	-474.6054504	223	0.01
+12710	-474.6054504	223	0.01
+12720	-474.6054504	223	0.01
+12730	-474.6054504	223	0.01
+12740	-474.6054504	223	0.01
+12750	-474.6054504	224	0.01
+12760	-474.6054504	224	0.01
+12770	-474.6054504	224	0.01
+12780	-474.6054504	224	0.01
+12790	-474.6053997	224	0.01
+12800	-474.6053997	224	0.01
+12810	-474.6053997	224	0.01
+12820	-474.6053997	224	0.01
+12830	-474.6053859	224	0.01
+12840	-474.6053859	224	0.01
+12850	-474.6053859	224	0.01
+12860	-474.6053859	224	0.01
+12870	-474.6053859	224	0.01
+12880	-474.6053859	224	0.01
+12890	-474.6053859	224	0.01
+12900	-474.6053859	224	0.01
+12910	-474.6053859	224	0.01
+12920	-474.6053859	224	0.01
+12930	-474.6053859	224	0.01
+12940	-474.6053859	224	0.01
+12950	-474.6053859	224	0.01
+12960	-474.6053859	224	0.01
+12970	-474.6053409	224	0.01
+12980	-474.6053221	224	0.01
+12990	-474.6053221	224	0.01
+13000	-474.6052235	224	0.01
+13010	-474.6052138	224	0.01
+13020	-474.6052138	224	0.01
+13030	-474.6052138	224	0.01
+13040	-474.6051486	224	0.01
+13050	-474.6051486	224	0.01
+13060	-474.6051486	224	0.01
+13070	-474.6050182	224	0.01
+13080	-474.6050052	224	0.01
+13090	-474.6049901	225	0.01
+13100	-474.6049901	225	0.01
+13110	-474.6049901	225	0.01
+13120	-474.6049901	225	0.01
+13130	-474.6049901	225	0.01
+13140	-474.6049901	225	0.01
+13150	-474.6049901	225	0.01
+13160	-474.6049901	225	0.01
+13170	-474.6049901	225	0.01
+13180	-474.6049901	225	0.01
+13190	-474.6049901	225	0.01
+13200	-474.6049901	225	0.01
+13210	-474.6049901	225	0.01
+13220	-474.6049901	225	0.01
+13230	-474.6049901	225	0.01
+13240	-474.6049901	225	0.01
+13250	-474.6049897	225	0.01
+13260	-474.6049897	225	0.01
+13270	-474.6049897	225	0.01
+13280	-474.6049897	225	0.01
+13290	-474.6049897	225	0.01
+13300	-474.6048957	225	0.01
+13310	-474.6048957	225	0.01
+13320	-474.6048957	225	0.01
+13330	-474.6048957	225	0.01
+13340	-474.6048957	225	0.01
+13350	-474.6047897	225	0.01
+13360	-474.6047897	225	0.01
+13370	-474.6047897	225	0.01
+13380	-474.6047897	225	0.01
+13390	-474.6047897	225	0.01
+13400	-474.6047623	225	0.01
+13410	-474.6047623	225	0.01
+13420	-474.6047623	226	0.01
+13430	-474.6047623	226	0.01
+13440	-474.6047623	226	0.01
+13450	-474.6047623	226	0.01
+13460	-474.6047623	226	0.01
+13470	-474.6047623	226	0.01
+13480	-474.6047623	226	0.01
+13490	-474.6047623	226	0.01
+13500	-474.6047519	226	0.01
+13510	-474.6047519	226	0.01
+13520	-474.6047519	226	0.01
+13530	-474.6047519	226	0.01
+13540	-474.6047519	226	0.01
+13550	-474.6047519	226	0.01
+13560	-474.6047519	226	0.01
+13570	-474.6047519	226	0.01
+13580	-474.6046905	226	0.01
+13590	-474.6046905	226	0.01
+13600	-474.6046006	226	0.01
+13610	-474.6045157	226	0.01
+13620	-474.6044638	226	0.01
+13630	-474.6044638	226	0.01
+13640	-474.6044638	226	0.01
+13650	-474.6043362	226	0.01
+13660	-474.6043362	226	0.01
+13670	-474.6043362	226	0.01
+13680	-474.6043362	226	0.01
+13690	-474.6042458	226	0.01
+13700	-474.6042278	226	0.01
+13710	-474.6042278	226	0.01
+13720	-474.6042278	226	0.01
+13730	-474.6042278	226	0.01
+13740	-474.6041546	227	0.01
+13750	-474.6041546	227	0.01
+13760	-474.6041397	227	0.01
+13770	-474.6041397	227	0.01
+13780	-474.6041397	227	0.01
+13790	-474.6040299	227	0.01
+13800	-474.6040299	227	0.01
+13810	-474.6040185	227	0.01
+13820	-474.6040132	227	0.01
+13830	-474.6040132	227	0.01
+13840	-474.6040132	227	0.01
+13850	-474.6040132	227	0.01
+13860	-474.6040132	227	0.01
+13870	-474.6040132	227	0.01
+13880	-474.6040098	227	0.01
+13890	-474.6040098	227	0.01
+13900	-474.6040098	227	0.01
+13910	-474.603993	227	0.01
+13920	-474.603993	227	0.01
+13930	-474.603993	227	0.01
+13940	-474.603993	227	0.01
+13950	-474.603993	227	0.01
+13960	-474.603993	227	0.01
+13970	-474.603993	227	0.01
+13980	-474.6039488	227	0.01
+13990	-474.6039488	227	0.01
+14000	-474.6039488	227	0.01
+14010	-474.6038816	227	0.01
+14020	-474.6038816	227	0.01
+14030	-474.6038816	227	0.01
+14040	-474.6038816	227	0.01
+14050	-474.6038816	227	0.01
+14060	-474.6038747	228	0.01
+14070	-474.6038747	228	0.01
+14080	-474.6038747	228	0.01
+14090	-474.6038747	228	0.01
+14100	-474.6038747	228	0.01
+14110	-474.6038747	228	0.01
+14120	-474.6038747	228	0.01
+14130	-474.6038747	228	0.01
+14140	-474.6038747	228	0.01
+14150	-474.6038747	228	0.01
+14160	-474.6038747	228	0.01
+14170	-474.6038747	228	0.01
+14180	-474.6038747	228	0.01
+14190	-474.6038747	228	0.01
+14200	-474.6038747	228	0.01
+14210	-474.6038747	228	0.01
+14220	-474.6038747	228	0.01
+14230	-474.6037731	228	0.01
+14240	-474.6037731	228	0.01
+14250	-474.6037731	228	0.01
+14260	-474.6037731	228	0.01
+14270	-474.6037731	228	0.01
+14280	-474.6037731	228	0.01
+14290	-474.6037731	228	0.01
+14300	-474.6037731	228	0.01
+14310	-474.6037731	228	0.01
+14320	-474.6037731	228	0.01
+14330	-474.6037731	228	0.01
+14340	-474.6037731	228	0.01
+14350	-474.6037648	228	0.01
+14360	-474.6037648	228	0.01
+14370	-474.6037648	228	0.01
+14380	-474.6036187	229	0.01
+14390	-474.6035281	229	0.01
+14400	-474.6035281	229	0.01
+14410	-474.6035281	229	0.01
+14420	-474.6035281	229	0.01
+14430	-474.6035281	229	0.01
+14440	-474.6035281	229	0.01
+14450	-474.6035281	229	0.01
+14460	-474.6035281	229	0.01
+14470	-474.603402	229	0.01
+14480	-474.603402	229	0.01
+14490	-474.603402	229	0.01
+14500	-474.603402	229	0.01
+14510	-474.603402	229	0.01
+14520	-474.6033894	229	0.01
+14530	-474.6033894	229	0.01
+14540	-474.6033894	229	0.01
+14550	-474.6033602	229	0.01
+14560	-474.6033602	229	0.01
+14570	-474.6033602	229	0.01
+14580	-474.6033602	229	0.01
+14590	-474.6033383	229	0.01
+14600	-474.6033197	229	0.01
+14610	-474.6033197	229	0.01
+14620	-474.6033197	229	0.01
+14630	-474.6033197	229	0.01
+14640	-474.6033197	229	0.01
+14650	-474.6033197	229	0.01
+14660	-474.6033197	229	0.01
+14670	-474.6033197	229	0.01
+14680	-474.6033197	229	0.01
+14690	-474.6032736	229	0.01
+14700	-474.6032144	230	0.01
+14710	-474.6032124	230	0.01
+14720	-474.6032124	230	0.01
+14730	-474.6032124	230	0.01
+14740	-474.6032124	230	0.01
+14750	-474.6032124	230	0.01
+14760	-474.6032124	230	0.01
+14770	-474.6032124	230	0.01
+14780	-474.6032124	230	0.01
+14790	-474.603039	230	0.01
+14800	-474.603039	230	0.01
+14810	-474.603039	230	0.01
+14820	-474.6030264	230	0.01
+14830	-474.6030264	230	0.01
+14840	-474.6030264	230	0.01
+14850	-474.6030264	230	0.01
+14860	-474.6030264	230	0.01
+14870	-474.6030264	230	0.01
+14880	-474.6030264	230	0.01
+14890	-474.6030264	230	0.01
+14900	-474.6030264	230	0.01
+14910	-474.603023	230	0.01
+14920	-474.603023	230	0.01
+14930	-474.6028558	230	0.01
+14940	-474.6028558	230	0.01
+14950	-474.6028405	230	0.01
+14960	-474.6028405	230	0.01
+14970	-474.6028405	230	0.01
+14980	-474.6028405	230	0.01
+14990	-474.6028405	230	0.01
+15000	-474.6028405	230	0.01
+15010	-474.6028405	230	0.01
+15020	-474.6027767	231	0.01
+15030	-474.6027767	231	0.01
+15040	-474.6027767	231	0.01
+15050	-474.6027767	231	0.01
+15060	-474.6027767	231	0.01
+15070	-474.6027767	231	0.01
+15080	-474.6027767	231	0.01
+15090	-474.6027767	231	0.01
+15100	-474.6027767	231	0.01
+15110	-474.6027767	231	0.01
+15120	-474.6027767	231	0.01
+15130	-474.6027767	231	0.01
+15140	-474.6027767	231	0.01
+15150	-474.6027767	231	0.01
+15160	-474.6027761	231	0.01
+15170	-474.6027761	231	0.01
+15180	-474.6027761	231	0.01
+15190	-474.6027761	231	0.01
+15200	-474.6027707	231	0.01
+15210	-474.6027707	231	0.01
+15220	-474.6027707	231	0.01
+15230	-474.6027707	231	0.01
+15240	-474.6027707	231	0.01
+15250	-474.6027707	231	0.01
+15260	-474.6027707	231	0.01
+15270	-474.6027707	231	0.01
+15280	-474.6027083	231	0.01
+15290	-474.6027083	231	0.01
+15300	-474.602703	231	0.01
+15310	-474.6026993	231	0.01
+15320	-474.6026993	231	0.01
+15330	-474.6026993	231	0.01
+15340	-474.6026993	231	0.01
+15350	-474.6026993	232	0.01
+15360	-474.602668	232	0.01
+15370	-474.602668	232	0.01
+15380	-474.602668	232	0.01
+15390	-474.602668	232	0.01
+15400	-474.602668	232	0.01
+15410	-474.602668	232	0.01
+15420	-474.602668	232	0.01
+15430	-474.6026618	232	0.01
+15440	-474.6026618	232	0.01
+15450	-474.6026618	232	0.01
+15460	-474.6026618	232	0.01
+15470	-474.6026618	232	0.01
+15480	-474.6026618	232	0.01
+15490	-474.6026618	232	0.01
+15500	-474.6026618	232	0.01
+15510	-474.6026618	232	0.01
+15520	-474.6026618	232	0.01
+15530	-474.6026618	232	0.01
+15540	-474.6026618	232	0.01
+15550	-474.6026618	232	0.01
+15560	-474.6026618	232	0.01
+15570	-474.6026618	232	0.01
+15580	-474.6026126	232	0.01
+15590	-474.6026126	232	0.01
+15600	-474.6026126	232	0.01
+15610	-474.6026126	232	0.01
+15620	-474.6026126	232	0.01
+15630	-474.6026126	232	0.01
+15640	-474.6026126	232	0.01
+15650	-474.6026126	232	0.01
+15660	-474.6026126	232	0.01
+15670	-474.6025482	233	0.01
+15680	-474.6025374	233	0.01
+15690	-474.6025374	233	0.01
+15700	-474.6025374	233	0.01
+15710	-474.6025374	233	0.01
+15720	-474.6024505	233	0.01
+15730	-474.6024505	233	0.01
+15740	-474.6024302	233	0.01
+15750	-474.6024302	233	0.01
+15760	-474.6024302	233	0.01
+15770	-474.6024302	233	0.01
+15780	-474.6024302	233	0.01
+15790	-474.6024302	233	0.01
+15800	-474.6024302	233	0.01
+15810	-474.6024302	233	0.01
+15820	-474.6024302	233	0.01
+15830	-474.6024302	233	0.01
+15840	-474.6024302	233	0.01
+15850	-474.6024161	233	0.01
+15860	-474.6024067	233	0.01
+15870	-474.6024067	233	0.01
+15880	-474.6023965	233	0.01
+15890	-474.6023965	233	0.01
+15900	-474.6023965	233	0.01
+15910	-474.6023393	233	0.01
+15920	-474.6023393	233	0.01
+15930	-474.6023381	233	0.01
+15940	-474.6022832	233	0.01
+15950	-474.6022832	233	0.01
+15960	-474.6022832	233	0.01
+15970	-474.6022832	233	0.01
+15980	-474.6022832	233	0.01
+15990	-474.6022832	233	0.01
+16000	-474.6022832	234	0.01
+16010	-474.6022832	234	0.01
+16020	-474.6022832	234	0.01
+16030	-474.6022832	234	0.01
+16040	-474.6022832	234	0.01
+16050	-474.6022832	234	0.01
+16060	-474.6022832	234	0.01
+16070	-474.6022832	234	0.01
+16080	-474.6022832	234	0.01
+16090	-474.6022832	234	0.01
+16100	-474.6022055	234	0.01
+Score after final optimization: -474.5859682
+Final	-474.5859682	234	0.01
diff --git a/example/partition/exampleRuns/mkv/mkv.screen.log b/example/partition/exampleRuns/mkv/mkv.screen.log
new file mode 100644
index 0000000..596af51
--- /dev/null
+++ b/example/partition/exampleRuns/mkv/mkv.screen.log
@@ -0,0 +1,1651 @@
+Running GARLI-PART Version 2.0.1008 (17 Mar 2011)
+->Single processor version<-
+
+##############################################################
+ This is GARLI 2.0, the first "official" release including 
+          partitioned models.  It is a merging of
+   official release 1.0 and beta version GARLI-PART 0.97
+  Briefly, it includes models for nucleotides, amino acids,
+ codons, and morphology-like characters, any of which can be 
+  mixed together and applied to different subsets of data.
+
+    General program usage is extensively documented here:
+            http://www.nescent.org/wg_garli/
+      see this page for details on partitioned usage:
+  http://www.nescent.org/wg_garli/Partition_testing_version
+   and this page for details on Mkv mophology model usage:
+    http://www.nescent.org/wg_garli/Mkv_morphology_model
+         PLEASE LET ME KNOW OF ANY PROBLEMS AT:
+                garli.support at gmail.com
+##############################################################
+This version has undergone much testing, but is still a BETA VERSION.
+   - Please check results carefully! -
+Compiled Mar 21 2011 13:13:18 using Intel icc compiler version 9.10
+Using NCL version 2.1.10
+
+#######################################################
+Reading config file garli.conf
+###################################################
+READING OF DATA
+Attempting to read data file in Nexus format (using NCL):
+	lewis2001.nex ...
+Reading CHARACTERS block... found standard data... successful
+Reading ASSUMPTIONS block... successful
+
+###################################################
+PARTITIONING OF DATA AND MODELS
+GARLI data subset 1
+	CHARACTERS block #1 ("Untitled CHARACTERS Block 1")
+	Data read as Standard k-state data, variable only,
+	modeled as Standard k-state data, variable only
+	Subset of data with 2 states:
+	  chars 46-51 53 55-58 60 63 65-70 84 87-89 91-95 97-101 103 104 106 107 113 115
+	Summary of data:
+	  30 sequences.
+	  0 constant characters.
+	  39 parsimony-informative characters.
+	  0 uninformative variable characters.
+	  39 total characters.
+	  39 unique patterns in compressed data matrix.
+	Pattern processing required < 1 second
+
+	Part ambig. char's of taxon Chelonus_sp. converted to full ambiguity:
+	  char  90 
+	Part ambig. char's of taxon Alysia_lucicola converted to full ambiguity:
+	  char  90 
+	Subset of data with 3 states:
+	  chars 54 61 62 64 71 72 83 90-102 \ 6
+	Summary of data:
+	  30 sequences.
+	  0 constant characters.
+	  10 parsimony-informative characters.
+	  0 uninformative variable characters.
+	  10 total characters.
+	  10 unique patterns in compressed data matrix.
+	Pattern processing required < 1 second
+
+	Subset of data with 4 states:
+	  chars 52 59 73
+	Summary of data:
+	  30 sequences.
+	  0 constant characters.
+	  0 parsimony-informative characters.
+	  3 uninformative variable characters.
+	  3 total characters.
+	  3 unique patterns in compressed data matrix.
+	Pattern processing required < 1 second
+
+NOTE: No characters found with 5 observed states.
+NOTE: No characters found with 6 observed states.
+
+###################################################
+NOTE: Unlike many programs, the amount of system memory that Garli will
+use can be controlled by the user.
+(This comes from the availablememory setting in the configuration file.
+Availablememory should NOT be set to more than the actual amount of 
+physical memory that your computer has installed)
+
+For this dataset:
+ Mem level		availablememory setting
+  great			    >= 1 MB
+  good			approx 0 MB to 1 MB
+  low			approx 0 MB to 1 MB
+  very low		approx 0 MB to 1 MB
+the minimum required availablememory is 1 MB
+
+You specified that Garli should use at most 512.0 MB of memory.
+
+Garli will actually use approx. 0.6 MB of memory
+**Your memory level is: great (you don't need to change anything)**
+
+#######################################################
+STARTING RUN
+
+>>>Search rep 1 (of 5)<<<
+MODEL REPORT - Parameters are at their INITIAL values (not yet optimized)
+Model 1
+  Number of states = 2 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.50, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Model 2
+  Number of states = 3 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.33, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Model 3
+  Number of states = 4 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.25, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Starting with seed=113156
+
+creating random starting tree...
+NOTE: Model contains no mutable parameters!
+Setting model mutation weight to zero.
+
+Initial ln Likelihood: -1296.0557
+optimizing: starting branch lengths...
+pass 1:+  364.588 (branch= 364.59 scale=  0.00)
+pass 2:+   66.578 (branch=  63.37 scale=  3.21)
+pass 3:+   24.948 (branch=  23.25 scale=  1.69)
+pass 4:+    1.187 (branch=   0.53 scale=  0.66)
+pass 5:+    1.040 (branch=   1.04 scale=  0.00)
+pass 6:+    0.000 (branch=   0.00 scale=  0.00)
+lnL after optimization: -837.7145
+gen      current_lnL    precision  last_tree_imp  
+0        -837.7145        0.500           0 
+100      -592.1303        0.500          95 
+200      -550.9261        0.500         198 
+300      -502.7223        0.500         293 
+400      -496.2153        0.500         379 
+500      -482.5724        0.500         480 
+600      -480.2205        0.500         599 
+700      -479.5176        0.500         599 
+800      -479.0438        0.500         706 
+900      -478.6735        0.500         706 
+1000     -478.3272        0.500         706 
+1100     -477.8447        0.500        1006 
+1200     -476.5510        0.500        1153 
+1300     -476.0617        0.500        1153 
+1400     -475.8286        0.500        1153 
+1500     -475.5767        0.500        1153 
+1600     -475.4253        0.500        1153 
+1700     -475.2730        0.500        1153 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.002 lnL
+1800     -475.1729        0.451        1153 
+1900     -475.1232        0.451        1153 
+2000     -474.7475        0.451        1914 
+2100     -474.6530        0.451        1914 
+2200     -474.3547        0.451        2182 
+2300     -474.2897        0.451        2182 
+2400     -474.1635        0.451        2182 
+2500     -474.1124        0.451        2182 
+2600     -474.0612        0.451        2182 
+2700     -473.9885        0.451        2182 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+2800     -473.9058        0.402        2744 
+2900     -473.7521        0.402        2846 
+3000     -473.7250        0.402        2846 
+3100     -473.6863        0.402        2846 
+3200     -473.6766        0.402        2846 
+3300     -473.6522        0.402        2846 
+3400     -473.6455        0.402        2846 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+3500     -473.6274        0.353        2846 
+3600     -473.5061        0.353        3576 
+3700     -473.4862        0.353        3576 
+3800     -473.4791        0.353        3576 
+3900     -473.4632        0.353        3576 
+4000     -473.4431        0.353        3576 
+4100     -473.4328        0.353        3576 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+4200     -473.4217        0.304        3576 
+4300     -473.4091        0.304        3576 
+4400     -473.3964        0.304        3576 
+4500     -473.3896        0.304        3576 
+4600     -473.3704        0.304        4588 
+4700     -473.3686        0.304        4588 
+4800     -473.3595        0.304        4588 
+4900     -473.3544        0.304        4588 
+5000     -473.3466        0.304        4588 
+5100     -473.3397        0.304        4588 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+5200     -473.3341        0.255        4588 
+5300     -473.3251        0.255        4588 
+5400     -473.3183        0.255        4588 
+5500     -473.2540        0.255        5457 
+5600     -473.1386        0.255        5457 
+5700     -473.0787        0.255        5457 
+5800     -473.0601        0.255        5457 
+5900     -473.0481        0.255        5457 
+6000     -472.9455        0.255        5996 
+6100     -472.9401        0.255        5996 
+6200     -472.9357        0.255        5996 
+6300     -472.9343        0.255        5996 
+6400     -472.9339        0.255        5996 
+6500     -472.9274        0.255        5996 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+6600     -472.9270        0.206        5996 
+6700     -472.9227        0.206        5996 
+6800     -472.9208        0.206        5996 
+6900     -472.9158        0.206        5996 
+7000     -472.9152        0.206        5996 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+7100     -472.9117        0.157        5996 
+7200     -472.8881        0.157        7137 
+7300     -472.8873        0.157        7137 
+7400     -472.8860        0.157        7137 
+7500     -472.8830        0.157        7137 
+7600     -472.8824        0.157        7137 
+7700     -472.8805        0.157        7137 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.168 lnL
+7800     -472.6943        0.108        7137 
+7900     -472.6573        0.108        7137 
+8000     -472.6449        0.108        7137 
+8100     -472.6326        0.108        7137 
+8200     -472.6290        0.108        7137 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+8300     -472.6197        0.059        7137 
+8400     -472.5536        0.059        8357 
+8500     -472.5409        0.059        8357 
+8600     -472.5364        0.059        8357 
+8700     -472.5310        0.059        8357 
+8800     -472.5256        0.059        8357 
+8900     -472.5249        0.059        8357 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.066 lnL
+9000     -472.4570        0.010        8357 
+9100     -472.4491        0.010        8357 
+9200     -472.4424        0.010        8357 
+9300     -472.4399        0.010        8357 
+9400     -472.4338        0.010        8357 
+9500     -472.4322        0.010        8357 
+9600     -472.4291        0.010        8357 
+9700     -472.4275        0.010        8357 
+9800     -472.4256        0.010        8357 
+9900     -472.4229        0.010        8357 
+10000    -472.4203        0.010        8357 
+10100    -472.4203        0.010        8357 
+10200    -472.4200        0.010        8357 
+10300    -472.4200        0.010        8357 
+10400    -472.4197        0.010        8357 
+10500    -472.4191        0.010        8357 
+10600    -472.4179        0.010        8357 
+10700    -472.4176        0.010        8357 
+10800    -472.4172        0.010        8357 
+10900    -472.4136        0.010        8357 
+11000    -472.4115        0.010        8357 
+11100    -472.4102        0.010        8357 
+11200    -472.4099        0.010        8357 
+11300    -472.4096        0.010        8357 
+11400    -472.4092        0.010        8357 
+11500    -472.4087        0.010        8357 
+11600    -472.4086        0.010        8357 
+11700    -472.4082        0.010        8357 
+11800    -472.4080        0.010        8357 
+11900    -472.4078        0.010        8357 
+12000    -472.4075        0.010        8357 
+12100    -472.4074        0.010        8357 
+12200    -472.4073        0.010        8357 
+12300    -472.4068        0.010        8357 
+12400    -472.4066        0.010        8357 
+12500    -472.4065        0.010        8357 
+12600    -472.4064        0.010        8357 
+12700    -472.4060        0.010        8357 
+12800    -472.4059        0.010        8357 
+12900    -472.4058        0.010        8357 
+13000    -472.4057        0.010        8357 
+13100    -472.4056        0.010        8357 
+13200    -472.4056        0.010        8357 
+13300    -472.4056        0.010        8357 
+13400    -472.4055        0.010        8357 
+13500    -472.4054        0.010        8357 
+13600    -472.4054        0.010        8357 
+13700    -472.4054        0.010        8357 
+13800    -472.4053        0.010        8357 
+13900    -472.4052        0.010        8357 
+14000    -472.4052        0.010        8357 
+14100    -472.4048        0.010        8357 
+14200    -472.4048        0.010        8357 
+14300    -472.4047        0.010        8357 
+14400    -472.4045        0.010        8357 
+14500    -472.4045        0.010        8357 
+14600    -472.4045        0.010        8357 
+14700    -472.4045        0.010        8357 
+14800    -472.4045        0.010        8357 
+14900    -472.4045        0.010        8357 
+15000    -472.4044        0.010        8357 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+15100    -472.4042        0.010        8357 
+15200    -472.4042        0.010        8357 
+15300    -472.4041        0.010        8357 
+15400    -472.4041        0.010        8357 
+15500    -472.4039        0.010        8357 
+15600    -472.4039        0.010        8357 
+15700    -472.4036        0.010        8357 
+15800    -472.4036        0.010        8357 
+15900    -472.4034        0.010        8357 
+16000    -472.4034        0.010        8357 
+16100    -472.4032        0.010        8357 
+16200    -472.4031        0.010        8357 
+16300    -472.4031        0.010        8357 
+16400    -472.4031        0.010        8357 
+16500    -472.4030        0.010        8357 
+16600    -472.4028        0.010        8357 
+16700    -472.4028        0.010        8357 
+16800    -472.4027        0.010        8357 
+16900    -472.4027        0.010        8357 
+17000    -472.4026        0.010        8357 
+17100    -472.4026        0.010        8357 
+17200    -472.4025        0.010        8357 
+17300    -472.4025        0.010        8357 
+17400    -472.4024        0.010        8357 
+17500    -472.4022        0.010        8357 
+17600    -472.4022        0.010        8357 
+17700    -472.4022        0.010        8357 
+17800    -472.4021        0.010        8357 
+17900    -472.4020        0.010        8357 
+18000    -472.4020        0.010        8357 
+18100    -472.4020        0.010        8357 
+18200    -472.4020        0.010        8357 
+18300    -472.4019        0.010        8357 
+18400    -472.4018        0.010        8357 
+18500    -472.4018        0.010        8357 
+18600    -472.4017        0.010        8357 
+18700    -472.4015        0.010        8357 
+18800    -472.4014        0.010        8357 
+18900    -472.4014        0.010        8357 
+19000    -472.4014        0.010        8357 
+Reached termination condition!
+last topological improvement at gen 8357
+Improvement over last 500 gen = 0.00042
+Current score = -472.4014
+Performing final optimizations...
+pass 1 : -472.4014   (branch= 0.0000)
+pass 2 : -472.4014   (branch= 0.0000)
+pass 3 : -472.3948   (branch= 0.0066)
+pass 4 : -472.3919   (branch= 0.0029)
+pass 5 : -472.3915   (branch= 0.0004)
+pass 6 : -472.3915   (branch= 0.0000)
+pass 7 : -472.3915   (branch= 0.0000)
+pass 8 : -472.3912   (branch= 0.0003)
+pass 9 : -472.3910   (branch= 0.0002)
+pass 10: -472.3909   (branch= 0.0001)
+pass 11: -472.3908   (branch= 0.0000)
+pass 12: -472.3908   (branch= 0.0000)
+pass 13: -472.3908   (branch= 0.0000)
+Looking for minimum length branches...
+Final score = -472.3908
+Time used so far = 0 hours, 0 minutes and 50 seconds
+
+MODEL REPORT - Parameter values are FINAL
+Model 1
+  Number of states = 2 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.50, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Model 2
+  Number of states = 3 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.33, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Model 3
+  Number of states = 4 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.25, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+NOTE: Collapsing of minimum length branches was requested (collapsebranches = 1)
+    8 branches were collapsed.
+
+>>>Completed Search rep 1 (of 5)<<<
+
+>>>Search rep 2 (of 5)<<<
+MODEL REPORT - Parameters are at their INITIAL values (not yet optimized)
+Model 1
+  Number of states = 2 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.50, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Model 2
+  Number of states = 3 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.33, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Model 3
+  Number of states = 4 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.25, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Starting with seed=44926809
+
+creating random starting tree...
+Initial ln Likelihood: -1318.0450
+optimizing: starting branch lengths...
+pass 1:+  430.059 (branch= 430.06 scale=  0.00)
+pass 2:+   43.968 (branch=  37.57 scale=  6.40)
+pass 3:+   15.540 (branch=  12.62 scale=  2.92)
+pass 4:+   13.620 (branch=  10.43 scale=  3.19)
+pass 5:+    2.101 (branch=   1.37 scale=  0.73)
+pass 6:+    0.440 (branch=   0.44 scale=  0.00)
+lnL after optimization: -812.3165
+gen      current_lnL    precision  last_tree_imp  
+0        -812.3165        0.500           0 
+100      -631.8927        0.500          95 
+200      -515.5765        0.500         183 
+300      -513.6662        0.500         281 
+400      -495.7026        0.500         389 
+500      -489.8560        0.500         486 
+600      -487.9821        0.500         540 
+700      -487.2379        0.500         695 
+800      -477.6723        0.500         794 
+900      -477.1914        0.500         832 
+1000     -476.5205        0.500         982 
+1100     -475.5301        0.500        1044 
+1200     -475.2139        0.500        1044 
+1300     -474.8837        0.500        1044 
+1400     -474.6604        0.500        1044 
+1500     -474.3814        0.500        1044 
+1600     -474.1658        0.500        1044 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.079 lnL
+1700     -473.9456        0.451        1044 
+1800     -473.8144        0.451        1044 
+1900     -473.6242        0.451        1883 
+2000     -473.2478        0.451        1883 
+2100     -473.1190        0.451        1883 
+2200     -473.0786        0.451        1883 
+2300     -473.0143        0.451        1883 
+2400     -472.9732        0.451        1883 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+2500     -472.9234        0.402        1883 
+2600     -472.8918        0.402        1883 
+2700     -472.8750        0.402        1883 
+2800     -472.8232        0.402        1883 
+2900     -472.8046        0.402        1883 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+3000     -472.7937        0.353        1883 
+3100     -472.7611        0.353        1883 
+3200     -472.7356        0.353        1883 
+3300     -472.7169        0.353        1883 
+3400     -472.7028        0.353        1883 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+3500     -472.6782        0.304        1883 
+3600     -472.6583        0.304        1883 
+3700     -472.6535        0.304        1883 
+3800     -472.6366        0.304        1883 
+3900     -472.6268        0.304        1883 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+4000     -472.6163        0.255        1883 
+4100     -472.5964        0.255        1883 
+4200     -472.5787        0.255        1883 
+4300     -472.5698        0.255        1883 
+4400     -472.5472        0.255        1883 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+4500     -472.5449        0.206        1883 
+4600     -472.5388        0.206        1883 
+4700     -472.5311        0.206        1883 
+4800     -472.5289        0.206        1883 
+4900     -472.5262        0.206        1883 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+5000     -472.5023        0.157        4939 
+5100     -472.4963        0.157        4939 
+5200     -472.4951        0.157        4939 
+5300     -472.4922        0.157        4939 
+5400     -472.4812        0.157        4939 
+5500     -472.4718        0.157        4939 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+5600     -472.4685        0.108        4939 
+5700     -472.4673        0.108        4939 
+5800     -472.4662        0.108        4939 
+5900     -472.4640        0.108        4939 
+6000     -472.4630        0.108        4939 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+6100     -472.4625        0.059        4939 
+6200     -472.4612        0.059        4939 
+6300     -472.4563        0.059        4939 
+6400     -472.4541        0.059        4939 
+6500     -472.4538        0.059        4939 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.038 lnL
+6600     -472.4158        0.010        4939 
+6700     -472.4158        0.010        4939 
+6800     -472.4154        0.010        4939 
+6900     -472.4151        0.010        4939 
+7000     -472.4147        0.010        4939 
+7100     -472.4139        0.010        4939 
+7200     -472.4137        0.010        4939 
+7300     -472.4130        0.010        4939 
+7400     -472.4130        0.010        4939 
+7500     -472.4106        0.010        4939 
+7600     -472.4105        0.010        4939 
+7700     -472.4103        0.010        4939 
+7800     -472.4101        0.010        4939 
+7900     -472.4098        0.010        4939 
+8000     -472.4094        0.010        4939 
+8100     -472.4093        0.010        4939 
+8200     -472.4093        0.010        4939 
+8300     -472.4090        0.010        4939 
+8400     -472.4089        0.010        4939 
+8500     -472.4087        0.010        4939 
+8600     -472.4086        0.010        4939 
+8700     -472.4085        0.010        4939 
+8800     -472.4084        0.010        4939 
+8900     -472.4083        0.010        4939 
+9000     -472.4081        0.010        4939 
+9100     -472.4080        0.010        4939 
+9200     -472.4080        0.010        4939 
+9300     -472.4078        0.010        4939 
+9400     -472.4076        0.010        4939 
+9500     -472.4072        0.010        4939 
+9600     -472.4071        0.010        4939 
+9700     -472.4067        0.010        4939 
+9800     -472.4067        0.010        4939 
+9900     -472.4067        0.010        4939 
+10000    -472.4066        0.010        4939 
+10100    -472.4063        0.010        4939 
+10200    -472.4061        0.010        4939 
+10300    -472.4060        0.010        4939 
+10400    -472.4060        0.010        4939 
+10500    -472.4060        0.010        4939 
+10600    -472.4058        0.010        4939 
+10700    -472.4058        0.010        4939 
+10800    -472.4056        0.010        4939 
+10900    -472.4055        0.010        4939 
+11000    -472.4054        0.010        4939 
+11100    -472.4052        0.010        4939 
+11200    -472.4052        0.010        4939 
+11300    -472.4052        0.010        4939 
+11400    -472.4051        0.010        4939 
+11500    -472.4050        0.010        4939 
+11600    -472.4050        0.010        4939 
+11700    -472.4050        0.010        4939 
+11800    -472.4050        0.010        4939 
+11900    -472.4046        0.010        4939 
+12000    -472.4045        0.010        4939 
+12100    -472.4045        0.010        4939 
+12200    -472.4044        0.010        4939 
+12300    -472.4044        0.010        4939 
+12400    -472.4043        0.010        4939 
+12500    -472.4040        0.010        4939 
+12600    -472.4040        0.010        4939 
+12700    -472.4040        0.010        4939 
+12800    -472.4038        0.010        4939 
+12900    -472.4038        0.010        4939 
+13000    -472.4037        0.010        4939 
+13100    -472.4035        0.010        4939 
+13200    -472.4033        0.010        4939 
+13300    -472.4033        0.010        4939 
+13400    -472.4032        0.010        4939 
+13500    -472.4031        0.010        4939 
+13600    -472.4031        0.010        4939 
+13700    -472.4029        0.010        4939 
+13800    -472.4029        0.010        4939 
+13900    -472.4029        0.010        4939 
+14000    -472.4028        0.010        4939 
+14100    -472.4026        0.010        4939 
+14200    -472.4024        0.010        4939 
+14300    -472.4024        0.010        4939 
+14400    -472.4024        0.010        4939 
+14500    -472.4023        0.010        4939 
+14600    -472.4023        0.010        4939 
+14700    -472.4023        0.010        4939 
+14800    -472.4023        0.010        4939 
+14900    -472.4021        0.010        4939 
+15000    -472.4020        0.010        4939 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+15100    -472.4020        0.010        4939 
+15200    -472.4020        0.010        4939 
+15300    -472.4020        0.010        4939 
+15400    -472.4020        0.010        4939 
+15500    -472.4019        0.010        4939 
+15600    -472.4019        0.010        4939 
+15700    -472.4019        0.010        4939 
+15800    -472.4019        0.010        4939 
+15900    -472.4017        0.010        4939 
+16000    -472.4017        0.010        4939 
+16100    -472.4016        0.010        4939 
+16200    -472.4015        0.010        4939 
+16300    -472.4013        0.010        4939 
+16400    -472.4013        0.010        4939 
+16500    -472.4012        0.010        4939 
+16600    -472.4012        0.010        4939 
+Reached termination condition!
+last topological improvement at gen 4939
+Improvement over last 500 gen = 0.00046
+Current score = -472.4012
+Performing final optimizations...
+pass 1 : -472.4012   (branch= 0.0000)
+pass 2 : -472.4012   (branch= 0.0000)
+pass 3 : -472.3949   (branch= 0.0063)
+pass 4 : -472.3918   (branch= 0.0031)
+pass 5 : -472.3913   (branch= 0.0005)
+pass 6 : -472.3912   (branch= 0.0002)
+pass 7 : -472.3911   (branch= 0.0001)
+pass 8 : -472.3910   (branch= 0.0001)
+pass 9 : -472.3908   (branch= 0.0002)
+pass 10: -472.3907   (branch= 0.0001)
+pass 11: -472.3906   (branch= 0.0000)
+pass 12: -472.3906   (branch= 0.0000)
+pass 13: -472.3906   (branch= 0.0000)
+Looking for minimum length branches...
+Final score = -472.3906
+Time used so far = 0 hours, 1 minutes and 34 seconds
+
+MODEL REPORT - Parameter values are FINAL
+Model 1
+  Number of states = 2 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.50, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Model 2
+  Number of states = 3 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.33, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Model 3
+  Number of states = 4 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.25, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+NOTE: Collapsing of minimum length branches was requested (collapsebranches = 1)
+    7 branches were collapsed.
+
+>>>Completed Search rep 2 (of 5)<<<
+
+>>>Search rep 3 (of 5)<<<
+MODEL REPORT - Parameters are at their INITIAL values (not yet optimized)
+Model 1
+  Number of states = 2 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.50, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Model 2
+  Number of states = 3 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.33, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Model 3
+  Number of states = 4 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.25, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Starting with seed=1129809455
+
+creating random starting tree...
+Initial ln Likelihood: -1345.1873
+optimizing: starting branch lengths...
+pass 1:+  462.206 (branch= 460.91 scale=  1.29)
+pass 2:+   46.315 (branch=  41.48 scale=  4.84)
+pass 3:+    8.901 (branch=   7.46 scale=  1.45)
+pass 4:+    0.399 (branch=   0.40 scale=  0.00)
+lnL after optimization: -827.3663
+gen      current_lnL    precision  last_tree_imp  
+0        -827.3663        0.500           0 
+100      -554.0794        0.500          97 
+200      -519.0429        0.500         200 
+300      -495.8588        0.500         299 
+400      -491.6494        0.500         383 
+500      -489.6575        0.500         486 
+600      -485.5977        0.500         553 
+700      -484.4369        0.500         665 
+800      -483.6662        0.500         791 
+900      -483.1040        0.500         791 
+1000     -482.5508        0.500         947 
+1100     -481.4178        0.500        1088 
+1200     -479.8625        0.500        1193 
+1300     -478.7363        0.500        1277 
+1400     -477.3675        0.500        1379 
+1500     -476.5981        0.500        1469 
+1600     -476.2200        0.500        1469 
+1700     -475.8149        0.500        1469 
+1800     -475.6773        0.500        1469 
+1900     -475.5862        0.500        1892 
+2000     -475.0435        0.500        1953 
+2100     -474.6464        0.500        2047 
+2200     -474.5245        0.500        2047 
+2300     -474.2834        0.500        2047 
+2400     -474.1793        0.500        2047 
+2500     -474.0827        0.500        2047 
+2600     -474.0282        0.500        2047 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.003 lnL
+2700     -473.8768        0.451        2047 
+2800     -473.8100        0.451        2047 
+2900     -473.7925        0.451        2047 
+3000     -473.7515        0.451        2963 
+3100     -473.6539        0.451        2963 
+3200     -473.6069        0.451        2963 
+3300     -473.5546        0.451        2963 
+3400     -473.4800        0.451        2963 
+3500     -473.4100        0.451        2963 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.017 lnL
+3600     -473.3227        0.402        2963 
+3700     -473.2814        0.402        2963 
+3800     -473.2520        0.402        2963 
+3900     -473.2171        0.402        2963 
+4000     -473.1817        0.402        2963 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+4100     -473.1732        0.353        2963 
+4200     -473.1482        0.353        2963 
+4300     -473.1308        0.353        2963 
+4400     -473.1219        0.353        2963 
+4500     -473.1118        0.353        2963 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+4600     -473.1050        0.304        2963 
+4700     -473.1015        0.304        2963 
+4800     -473.0905        0.304        2963 
+4900     -473.0630        0.304        4831 
+5000     -473.0574        0.304        4831 
+5100     -473.0441        0.304        4831 
+5200     -473.0302        0.304        4831 
+5300     -473.0260        0.304        4831 
+5400     -473.0225        0.304        4831 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+5500     -473.0122        0.255        4831 
+5600     -473.0074        0.255        4831 
+5700     -473.0044        0.255        4831 
+5800     -472.9855        0.255        5743 
+5900     -472.9802        0.255        5743 
+6000     -472.9770        0.255        5743 
+6100     -472.9697        0.255        5743 
+6200     -472.9691        0.255        5743 
+6300     -472.9684        0.255        5743 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+6400     -472.9103        0.206        6363 
+6500     -472.7831        0.206        6363 
+6600     -472.7122        0.206        6363 
+6700     -472.6699        0.206        6363 
+6800     -472.6517        0.206        6363 
+6900     -472.6270        0.206        6363 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+7000     -472.6085        0.157        6363 
+7100     -472.6020        0.157        6363 
+7200     -472.5927        0.157        6363 
+7300     -472.5865        0.157        6363 
+7400     -472.5660        0.157        6363 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.017 lnL
+7500     -472.5448        0.108        6363 
+7600     -472.5350        0.108        6363 
+7700     -472.5283        0.108        6363 
+7800     -472.5265        0.108        6363 
+7900     -472.5211        0.108        6363 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+8000     -472.4754        0.059        7923 
+8100     -472.4617        0.059        7923 
+8200     -472.4586        0.059        7923 
+8300     -472.4552        0.059        7923 
+8400     -472.4521        0.059        7923 
+8500     -472.4492        0.059        7923 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.017 lnL
+8600     -472.4288        0.010        7923 
+8700     -472.4266        0.010        7923 
+8800     -472.4230        0.010        7923 
+8900     -472.4226        0.010        7923 
+9000     -472.4214        0.010        7923 
+9100     -472.4198        0.010        7923 
+9200     -472.4185        0.010        7923 
+9300     -472.4181        0.010        7923 
+9400     -472.4177        0.010        7923 
+9500     -472.4175        0.010        7923 
+9600     -472.4173        0.010        7923 
+9700     -472.4160        0.010        7923 
+9800     -472.4160        0.010        7923 
+9900     -472.4160        0.010        7923 
+10000    -472.4155        0.010        7923 
+10100    -472.4152        0.010        7923 
+10200    -472.4148        0.010        7923 
+10300    -472.4145        0.010        7923 
+10400    -472.4140        0.010        7923 
+10500    -472.4138        0.010        7923 
+10600    -472.4138        0.010        7923 
+10700    -472.4137        0.010        7923 
+10800    -472.4132        0.010        7923 
+10900    -472.4130        0.010        7923 
+11000    -472.4125        0.010        7923 
+11100    -472.4124        0.010        7923 
+11200    -472.4123        0.010        7923 
+11300    -472.4121        0.010        7923 
+11400    -472.4121        0.010        7923 
+11500    -472.4118        0.010        7923 
+11600    -472.4115        0.010        7923 
+11700    -472.4114        0.010        7923 
+11800    -472.4114        0.010        7923 
+11900    -472.4114        0.010        7923 
+12000    -472.4112        0.010        7923 
+12100    -472.4108        0.010        7923 
+12200    -472.4106        0.010        7923 
+12300    -472.4106        0.010        7923 
+12400    -472.4102        0.010        7923 
+12500    -472.4102        0.010        7923 
+12600    -472.4101        0.010        7923 
+12700    -472.4100        0.010        7923 
+12800    -472.4100        0.010        7923 
+12900    -472.4100        0.010        7923 
+13000    -472.4099        0.010        7923 
+13100    -472.4096        0.010        7923 
+13200    -472.4094        0.010        7923 
+13300    -472.4094        0.010        7923 
+13400    -472.4092        0.010        7923 
+13500    -472.4091        0.010        7923 
+13600    -472.4088        0.010        7923 
+13700    -472.4086        0.010        7923 
+13800    -472.4086        0.010        7923 
+13900    -472.4084        0.010        7923 
+14000    -472.4084        0.010        7923 
+14100    -472.4083        0.010        7923 
+14200    -472.4081        0.010        7923 
+14300    -472.4081        0.010        7923 
+14400    -472.4076        0.010        7923 
+14500    -472.4075        0.010        7923 
+14600    -472.4074        0.010        7923 
+14700    -472.4073        0.010        7923 
+14800    -472.4073        0.010        7923 
+14900    -472.4073        0.010        7923 
+15000    -472.4072        0.010        7923 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+15100    -472.4072        0.010        7923 
+15200    -472.4070        0.010        7923 
+15300    -472.4070        0.010        7923 
+15400    -472.4069        0.010        7923 
+15500    -472.4067        0.010        7923 
+15600    -472.4066        0.010        7923 
+15700    -472.4066        0.010        7923 
+15800    -472.4065        0.010        7923 
+15900    -472.4064        0.010        7923 
+16000    -472.4064        0.010        7923 
+16100    -472.4063        0.010        7923 
+16200    -472.4063        0.010        7923 
+16300    -472.4063        0.010        7923 
+16400    -472.4062        0.010        7923 
+16500    -472.4061        0.010        7923 
+16600    -472.4061        0.010        7923 
+16700    -472.4061        0.010        7923 
+16800    -472.4061        0.010        7923 
+16900    -472.4061        0.010        7923 
+17000    -472.4060        0.010        7923 
+17100    -472.4058        0.010        7923 
+17200    -472.4058        0.010        7923 
+17300    -472.4058        0.010        7923 
+17400    -472.4058        0.010        7923 
+17500    -472.4057        0.010        7923 
+17600    -472.4057        0.010        7923 
+17700    -472.4055        0.010        7923 
+17800    -472.4055        0.010        7923 
+17900    -472.4052        0.010        7923 
+18000    -472.4048        0.010        7923 
+18100    -472.4048        0.010        7923 
+18200    -472.4048        0.010        7923 
+18300    -472.4047        0.010        7923 
+18400    -472.4047        0.010        7923 
+18500    -472.4046        0.010        7923 
+18600    -472.4046        0.010        7923 
+Reached termination condition!
+last topological improvement at gen 7923
+Improvement over last 500 gen = 0.00024
+Current score = -472.4046
+Performing final optimizations...
+pass 1 : -472.4046   (branch= 0.0000)
+pass 2 : -472.4046   (branch= 0.0000)
+pass 3 : -472.3930   (branch= 0.0116)
+pass 4 : -472.3918   (branch= 0.0012)
+pass 5 : -472.3912   (branch= 0.0006)
+pass 6 : -472.3912   (branch= 0.0000)
+pass 7 : -472.3910   (branch= 0.0002)
+pass 8 : -472.3909   (branch= 0.0001)
+pass 9 : -472.3908   (branch= 0.0001)
+pass 10: -472.3907   (branch= 0.0001)
+pass 11: -472.3906   (branch= 0.0001)
+pass 12: -472.3906   (branch= 0.0000)
+pass 13: -472.3906   (branch= 0.0000)
+pass 14: -472.3906   (branch= 0.0000)
+Looking for minimum length branches...
+Final score = -472.3906
+Time used so far = 0 hours, 2 minutes and 22 seconds
+
+MODEL REPORT - Parameter values are FINAL
+Model 1
+  Number of states = 2 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.50, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Model 2
+  Number of states = 3 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.33, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Model 3
+  Number of states = 4 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.25, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+NOTE: Collapsing of minimum length branches was requested (collapsebranches = 1)
+    7 branches were collapsed.
+
+>>>Completed Search rep 3 (of 5)<<<
+
+>>>Search rep 4 (of 5)<<<
+MODEL REPORT - Parameters are at their INITIAL values (not yet optimized)
+Model 1
+  Number of states = 2 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.50, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Model 2
+  Number of states = 3 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.33, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Model 3
+  Number of states = 4 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.25, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Starting with seed=1786917786
+
+creating random starting tree...
+Initial ln Likelihood: -1259.6816
+optimizing: starting branch lengths...
+pass 1:+  411.545 (branch= 410.14 scale=  1.40)
+pass 2:+   34.424 (branch=  31.96 scale=  2.47)
+pass 3:+    4.884 (branch=   4.25 scale=  0.63)
+pass 4:+    1.721 (branch=   1.72 scale=  0.00)
+pass 5:+    0.047 (branch=   0.05 scale=  0.00)
+lnL after optimization: -807.0589
+gen      current_lnL    precision  last_tree_imp  
+0        -807.0589        0.500           0 
+100      -601.5939        0.500         100 
+200      -526.3617        0.500         196 
+300      -512.4135        0.500         278 
+400      -483.5238        0.500         390 
+500      -481.4931        0.500         471 
+600      -481.0061        0.500         471 
+700      -480.0821        0.500         683 
+800      -477.5502        0.500         729 
+900      -477.1062        0.500         729 
+1000     -476.7058        0.500         729 
+1100     -476.2214        0.500         729 
+1200     -475.8903        0.500         729 
+1300     -475.6326        0.500        1292 
+1400     -475.4871        0.500        1292 
+1500     -475.3881        0.500        1292 
+1600     -475.1881        0.500        1598 
+1700     -474.9285        0.500        1598 
+1800     -474.7453        0.500        1598 
+1900     -474.6094        0.500        1887 
+2000     -474.5233        0.500        1887 
+2100     -474.4728        0.500        2088 
+2200     -474.4253        0.500        2088 
+2300     -474.3405        0.500        2088 
+2400     -474.2962        0.500        2088 
+2500     -474.2187        0.500        2088 
+2600     -474.1912        0.500        2088 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.001 lnL
+2700     -474.1788        0.451        2088 
+2800     -474.1712        0.451        2088 
+2900     -474.1538        0.451        2088 
+3000     -474.1458        0.451        2088 
+3100     -474.1336        0.451        2088 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.001 lnL
+3200     -474.1318        0.402        2088 
+3300     -474.1252        0.402        2088 
+3400     -474.1154        0.402        2088 
+3500     -474.1050        0.402        2088 
+3600     -474.0923        0.402        2088 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+3700     -474.0853        0.353        2088 
+3800     -474.0781        0.353        2088 
+3900     -474.0710        0.353        2088 
+4000     -474.0676        0.353        2088 
+4100     -474.0557        0.353        2088 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+4200     -474.0534        0.304        2088 
+4300     -474.0477        0.304        2088 
+4400     -474.0391        0.304        2088 
+4500     -474.0353        0.304        2088 
+4600     -474.0334        0.304        2088 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+4700     -474.0283        0.255        2088 
+4800     -474.0282        0.255        2088 
+4900     -474.0262        0.255        2088 
+5000     -474.0228        0.255        2088 
+5100     -474.0183        0.255        2088 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+5200     -474.0155        0.206        2088 
+5300     -474.0118        0.206        2088 
+5400     -474.0089        0.206        2088 
+5500     -474.0077        0.206        2088 
+5600     -474.0053        0.206        2088 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+5700     -474.0043        0.157        2088 
+5800     -474.0024        0.157        2088 
+5900     -474.0009        0.157        2088 
+6000     -474.0001        0.157        2088 
+6100     -473.9987        0.157        2088 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+6200     -473.9969        0.108        2088 
+6300     -473.9937        0.108        2088 
+6400     -473.9927        0.108        2088 
+6500     -473.9916        0.108        2088 
+6600     -473.9905        0.108        2088 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+6700     -473.9882        0.059        2088 
+6800     -473.9871        0.059        2088 
+6900     -473.9863        0.059        2088 
+7000     -473.9859        0.059        2088 
+7100     -473.9843        0.059        2088 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.042 lnL
+7200     -473.9424        0.010        2088 
+7300     -473.9419        0.010        2088 
+7400     -473.9416        0.010        2088 
+7500     -473.9414        0.010        2088 
+7600     -473.9411        0.010        2088 
+7700     -473.9398        0.010        2088 
+7800     -473.9393        0.010        2088 
+7900     -473.9384        0.010        2088 
+8000     -473.9377        0.010        2088 
+8100     -473.9376        0.010        2088 
+8200     -473.9352        0.010        2088 
+8300     -473.9337        0.010        2088 
+8400     -473.9331        0.010        2088 
+8500     -473.9321        0.010        2088 
+8600     -473.9303        0.010        2088 
+8700     -473.8109        0.010        8647 
+8800     -473.7338        0.010        8717 
+8900     -473.6620        0.010        8717 
+9000     -473.6447        0.010        8717 
+9100     -473.6360        0.010        8717 
+9200     -473.6289        0.010        8717 
+9300     -473.6274        0.010        8717 
+9400     -473.6244        0.010        8717 
+9500     -473.6190        0.010        8717 
+9600     -473.6187        0.010        8717 
+9700     -473.6164        0.010        8717 
+9800     -473.6158        0.010        8717 
+9900     -473.6154        0.010        8717 
+10000    -473.6148        0.010        8717 
+10100    -473.6148        0.010        8717 
+10200    -473.6146        0.010        8717 
+10300    -473.6141        0.010        8717 
+10400    -473.6141        0.010        8717 
+10500    -473.6139        0.010        8717 
+10600    -473.6138        0.010        8717 
+10700    -473.6136        0.010        8717 
+10800    -473.6134        0.010        8717 
+10900    -473.6134        0.010        8717 
+11000    -473.6132        0.010        8717 
+11100    -473.6132        0.010        8717 
+11200    -473.6130        0.010        8717 
+11300    -473.6129        0.010        8717 
+11400    -473.6129        0.010        8717 
+11500    -473.6128        0.010        8717 
+11600    -473.6128        0.010        8717 
+11700    -473.6126        0.010        8717 
+11800    -473.6124        0.010        8717 
+11900    -473.6124        0.010        8717 
+12000    -473.6122        0.010        8717 
+12100    -473.6122        0.010        8717 
+12200    -473.6122        0.010        8717 
+12300    -473.6122        0.010        8717 
+12400    -473.6121        0.010        8717 
+12500    -473.6120        0.010        8717 
+12600    -473.6119        0.010        8717 
+12700    -473.6119        0.010        8717 
+12800    -473.6119        0.010        8717 
+12900    -473.6118        0.010        8717 
+13000    -473.6118        0.010        8717 
+13100    -473.6118        0.010        8717 
+13200    -473.6117        0.010        8717 
+13300    -473.6116        0.010        8717 
+13400    -473.6116        0.010        8717 
+13500    -473.6115        0.010        8717 
+13600    -473.6113        0.010        8717 
+13700    -473.6113        0.010        8717 
+13800    -473.6113        0.010        8717 
+13900    -473.6112        0.010        8717 
+14000    -473.6112        0.010        8717 
+14100    -473.6112        0.010        8717 
+14200    -473.6112        0.010        8717 
+14300    -473.6109        0.010        8717 
+14400    -473.6108        0.010        8717 
+14500    -473.6107        0.010        8717 
+14600    -473.6106        0.010        8717 
+14700    -473.6106        0.010        8717 
+14800    -473.6106        0.010        8717 
+14900    -473.6105        0.010        8717 
+15000    -473.6105        0.010        8717 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+15100    -473.6104        0.010        8717 
+15200    -473.6104        0.010        8717 
+15300    -473.6101        0.010        8717 
+15400    -473.6101        0.010        8717 
+15500    -473.6100        0.010        8717 
+15600    -473.6100        0.010        8717 
+15700    -473.6099        0.010        8717 
+15800    -473.6098        0.010        8717 
+15900    -473.6098        0.010        8717 
+16000    -473.6098        0.010        8717 
+16100    -473.6098        0.010        8717 
+16200    -473.6098        0.010        8717 
+16300    -473.6097        0.010        8717 
+16400    -473.6097        0.010        8717 
+16500    -473.6097        0.010        8717 
+16600    -473.6096        0.010        8717 
+16700    -473.6096        0.010        8717 
+16800    -473.6095        0.010        8717 
+16900    -473.6094        0.010        8717 
+17000    -473.6093        0.010        8717 
+17100    -473.6093        0.010        8717 
+17200    -473.6092        0.010        8717 
+17300    -473.6091        0.010        8717 
+17400    -473.6091        0.010        8717 
+17500    -473.6090        0.010        8717 
+17600    -473.6089        0.010        8717 
+17700    -473.6089        0.010        8717 
+17800    -473.6089        0.010        8717 
+17900    -473.6088        0.010        8717 
+18000    -473.6088        0.010        8717 
+18100    -473.6088        0.010        8717 
+18200    -473.6087        0.010        8717 
+18300    -473.6087        0.010        8717 
+18400    -473.6086        0.010        8717 
+18500    -473.6086        0.010        8717 
+18600    -473.6084        0.010        8717 
+18700    -473.6084        0.010        8717 
+18800    -473.6084        0.010        8717 
+Reached termination condition!
+last topological improvement at gen 8717
+Improvement over last 500 gen = 0.00033
+Current score = -473.6084
+Performing final optimizations...
+pass 1 : -473.6084   (branch= 0.0000)
+pass 2 : -473.6084   (branch= 0.0000)
+pass 3 : -473.5997   (branch= 0.0087)
+pass 4 : -473.5967   (branch= 0.0030)
+pass 5 : -473.5967   (branch= 0.0000)
+pass 6 : -473.5967   (branch= 0.0000)
+pass 7 : -473.5967   (branch= 0.0000)
+pass 8 : -473.5966   (branch= 0.0001)
+pass 9 : -473.5966   (branch= 0.0001)
+pass 10: -473.5964   (branch= 0.0001)
+pass 11: -473.5964   (branch= 0.0001)
+pass 12: -473.5964   (branch= 0.0000)
+Looking for minimum length branches...
+Final score = -473.5964
+Time used so far = 0 hours, 3 minutes and 11 seconds
+
+MODEL REPORT - Parameter values are FINAL
+Model 1
+  Number of states = 2 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.50, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Model 2
+  Number of states = 3 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.33, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Model 3
+  Number of states = 4 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.25, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+NOTE: Collapsing of minimum length branches was requested (collapsebranches = 1)
+    7 branches were collapsed.
+
+>>>Completed Search rep 4 (of 5)<<<
+
+>>>Search rep 5 (of 5)<<<
+MODEL REPORT - Parameters are at their INITIAL values (not yet optimized)
+Model 1
+  Number of states = 2 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.50, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Model 2
+  Number of states = 3 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.33, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Model 3
+  Number of states = 4 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.25, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Starting with seed=1429655032
+
+creating random starting tree...
+Initial ln Likelihood: -1219.3334
+optimizing: starting branch lengths...
+pass 1:+  350.904 (branch= 350.90 scale=  0.00)
+pass 2:+   56.702 (branch=  53.13 scale=  3.58)
+pass 3:+   20.452 (branch=  17.31 scale=  3.14)
+pass 4:+    3.274 (branch=   2.54 scale=  0.73)
+pass 5:+    2.093 (branch=   1.31 scale=  0.78)
+pass 6:+    1.698 (branch=   1.70 scale=  0.00)
+pass 7:+    0.095 (branch=   0.09 scale=  0.00)
+lnL after optimization: -784.1160
+gen      current_lnL    precision  last_tree_imp  
+0        -784.1160        0.500           0 
+100      -593.8019        0.500         100 
+200      -533.4957        0.500         192 
+300      -516.5071        0.500         287 
+400      -508.1399        0.500         397 
+500      -489.8206        0.500         499 
+600      -483.5815        0.500         564 
+700      -480.9720        0.500         670 
+800      -480.2684        0.500         773 
+900      -479.5095        0.500         773 
+1000     -479.1002        0.500         773 
+1100     -478.7379        0.500         773 
+1200     -478.3594        0.500         773 
+1300     -477.9320        0.500         773 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.244 lnL
+1400     -477.3303        0.451         773 
+1500     -476.9782        0.451        1469 
+1600     -476.6121        0.451        1469 
+1700     -476.4869        0.451        1469 
+1800     -476.4165        0.451        1469 
+1900     -476.2181        0.451        1469 
+2000     -476.1044        0.451        1469 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.001 lnL
+2100     -475.8182        0.402        1469 
+2200     -475.6823        0.402        1469 
+2300     -475.5295        0.402        1469 
+2400     -475.4160        0.402        1469 
+2500     -475.3457        0.402        1469 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.002 lnL
+2600     -475.3139        0.353        1469 
+2700     -475.2752        0.353        1469 
+2800     -475.2199        0.353        1469 
+2900     -475.1825        0.353        1469 
+3000     -475.1627        0.353        1469 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+3100     -475.1412        0.304        1469 
+3200     -475.1168        0.304        1469 
+3300     -475.0961        0.304        1469 
+3400     -475.0782        0.304        1469 
+3500     -475.0663        0.304        1469 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+3600     -475.0616        0.255        1469 
+3700     -474.8098        0.255        1469 
+3800     -474.7550        0.255        1469 
+3900     -474.7510        0.255        1469 
+4000     -474.7427        0.255        1469 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+4100     -474.7305        0.206        1469 
+4200     -474.7217        0.206        1469 
+4300     -474.7104        0.206        1469 
+4400     -474.7037        0.206        1469 
+4500     -474.7028        0.206        1469 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+4600     -474.7019        0.157        1469 
+4700     -474.6963        0.157        1469 
+4800     -474.6919        0.157        1469 
+4900     -474.6899        0.157        1469 
+5000     -474.6870        0.157        1469 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+5100     -474.6848        0.108        1469 
+5200     -474.6823        0.108        1469 
+5300     -474.6807        0.108        1469 
+5400     -474.6786        0.108        1469 
+5500     -474.6774        0.108        1469 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+5600     -474.6750        0.059        1469 
+5700     -474.6731        0.059        1469 
+5800     -474.6718        0.059        1469 
+5900     -474.6693        0.059        1469 
+6000     -474.6675        0.059        1469 
+Optimization precision reduced 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.043 lnL
+6100     -474.6238        0.010        1469 
+6200     -474.6194        0.010        1469 
+6300     -474.6183        0.010        1469 
+6400     -474.6182        0.010        1469 
+6500     -474.6179        0.010        1469 
+6600     -474.6176        0.010        1469 
+6700     -474.6174        0.010        1469 
+6800     -474.6173        0.010        1469 
+6900     -474.6170        0.010        1469 
+7000     -474.6139        0.010        1469 
+7100     -474.6139        0.010        1469 
+7200     -474.6136        0.010        1469 
+7300     -474.6131        0.010        1469 
+7400     -474.6126        0.010        1469 
+7500     -474.6123        0.010        1469 
+7600     -474.6120        0.010        1469 
+7700     -474.6117        0.010        1469 
+7800     -474.6116        0.010        1469 
+7900     -474.6115        0.010        1469 
+8000     -474.6113        0.010        1469 
+8100     -474.6108        0.010        1469 
+8200     -474.6105        0.010        1469 
+8300     -474.6100        0.010        1469 
+8400     -474.6099        0.010        1469 
+8500     -474.6092        0.010        1469 
+8600     -474.6088        0.010        1469 
+8700     -474.6088        0.010        1469 
+8800     -474.6086        0.010        1469 
+8900     -474.6084        0.010        1469 
+9000     -474.6081        0.010        1469 
+9100     -474.6079        0.010        1469 
+9200     -474.6076        0.010        1469 
+9300     -474.6076        0.010        1469 
+9400     -474.6076        0.010        1469 
+9500     -474.6072        0.010        1469 
+9600     -474.6070        0.010        1469 
+9700     -474.6067        0.010        1469 
+9800     -474.6067        0.010        1469 
+9900     -474.6065        0.010        1469 
+10000    -474.6064        0.010        1469 
+10100    -474.6064        0.010        1469 
+10200    -474.6062        0.010        1469 
+10300    -474.6062        0.010        1469 
+10400    -474.6062        0.010        1469 
+10500    -474.6062        0.010        1469 
+10600    -474.6061        0.010        1469 
+10700    -474.6061        0.010        1469 
+10800    -474.6061        0.010        1469 
+10900    -474.6060        0.010        1469 
+11000    -474.6060        0.010        1469 
+11100    -474.6060        0.010        1469 
+11200    -474.6060        0.010        1469 
+11300    -474.6060        0.010        1469 
+11400    -474.6059        0.010        1469 
+11500    -474.6058        0.010        1469 
+11600    -474.6057        0.010        1469 
+11700    -474.6057        0.010        1469 
+11800    -474.6057        0.010        1469 
+11900    -474.6057        0.010        1469 
+12000    -474.6056        0.010        1469 
+12100    -474.6056        0.010        1469 
+12200    -474.6056        0.010        1469 
+12300    -474.6055        0.010        1469 
+12400    -474.6055        0.010        1469 
+12500    -474.6055        0.010        1469 
+12600    -474.6055        0.010        1469 
+12700    -474.6055        0.010        1469 
+12800    -474.6054        0.010        1469 
+12900    -474.6054        0.010        1469 
+13000    -474.6052        0.010        1469 
+13100    -474.6050        0.010        1469 
+13200    -474.6050        0.010        1469 
+13300    -474.6049        0.010        1469 
+13400    -474.6048        0.010        1469 
+13500    -474.6048        0.010        1469 
+13600    -474.6046        0.010        1469 
+13700    -474.6042        0.010        1469 
+13800    -474.6040        0.010        1469 
+13900    -474.6040        0.010        1469 
+14000    -474.6039        0.010        1469 
+14100    -474.6039        0.010        1469 
+14200    -474.6039        0.010        1469 
+14300    -474.6038        0.010        1469 
+14400    -474.6035        0.010        1469 
+14500    -474.6034        0.010        1469 
+14600    -474.6033        0.010        1469 
+14700    -474.6032        0.010        1469 
+14800    -474.6030        0.010        1469 
+14900    -474.6030        0.010        1469 
+15000    -474.6028        0.010        1469 
+   Optimizing parameters...    improved    0.000 lnL
+   Optimizing branchlengths... improved    0.000 lnL
+15100    -474.6028        0.010        1469 
+15200    -474.6028        0.010        1469 
+15300    -474.6027        0.010        1469 
+15400    -474.6027        0.010        1469 
+15500    -474.6027        0.010        1469 
+15600    -474.6026        0.010        1469 
+15700    -474.6025        0.010        1469 
+15800    -474.6024        0.010        1469 
+15900    -474.6024        0.010        1469 
+16000    -474.6023        0.010        1469 
+16100    -474.6022        0.010        1469 
+Reached termination condition!
+last topological improvement at gen 1469
+Improvement over last 500 gen = 0.00041
+Current score = -474.6022
+Performing final optimizations...
+pass 1 : -474.6022   (branch= 0.0000)
+pass 2 : -474.5995   (branch= 0.0027)
+pass 3 : -474.5871   (branch= 0.0124)
+pass 4 : -474.5871   (branch= 0.0000)
+pass 5 : -474.5868   (branch= 0.0003)
+pass 6 : -474.5866   (branch= 0.0001)
+pass 7 : -474.5864   (branch= 0.0002)
+pass 8 : -474.5862   (branch= 0.0002)
+pass 9 : -474.5861   (branch= 0.0002)
+pass 10: -474.5860   (branch= 0.0000)
+pass 11: -474.5860   (branch= 0.0000)
+pass 12: -474.5860   (branch= 0.0000)
+pass 13: -474.5860   (branch= 0.0000)
+Looking for minimum length branches...
+Final score = -474.5860
+Time used = 0 hours, 3 minutes and 54 seconds
+
+MODEL REPORT - Parameter values are FINAL
+Model 1
+  Number of states = 2 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.50, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Model 2
+  Number of states = 3 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.33, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Model 3
+  Number of states = 4 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.25, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+NOTE: Collapsing of minimum length branches was requested (collapsebranches = 1)
+    7 branches were collapsed.
+
+>>>Completed Search rep 5 (of 5)<<<
+
+#######################################################
+
+Completed 5 replicate search(es) (of 5).
+
+NOTE: Unless the following output indicates that search replicates found the
+	same topology, you should assume that they found different topologies.
+Results:
+Replicate 1 : -472.3908       
+Replicate 2 : -472.3906       
+Replicate 3 : -472.3906 (best) (same topology as 2)
+Replicate 4 : -473.5964       
+Replicate 5 : -474.5860       
+
+Parameter estimates across search replicates:
+
+Partition model subset 1:
+	 Model contains no estimated parameters
+
+Partition model subset 2:
+	 Model contains no estimated parameters
+
+Partition model subset 3:
+	 Model contains no estimated parameters
+
+Treelengths:
+          TL 
+rep 1:  3.623
+rep 2:  3.622
+rep 3:  3.621
+rep 4:  3.807
+rep 5:  3.572
+
+Saving final trees from all search reps to mkv.best.all.tre
+
+Saving final tree from best search rep (#3) to mkv.best.tre
+#######################################################
diff --git a/example/partition/exampleRuns/partitionedDna+Mkv/dnaPlusGapCoding.nex b/example/partition/exampleRuns/partitionedDna+Mkv/dnaPlusGapCoding.nex
new file mode 100644
index 0000000..66ac5ad
--- /dev/null
+++ b/example/partition/exampleRuns/partitionedDna+Mkv/dnaPlusGapCoding.nex
@@ -0,0 +1,2882 @@
+#NEXUS
+BEGIN TAXA;
+    TITLE Untitled_TAXA_Block_1;
+    DIMENSIONS NTax = 64;
+    TAXLABELS temporariaDMH84R1 boyliiMVZ148929 luteiventris_MT_MVZ191016 luteiventris_WA_MVZ225749 muscosaMVZ149006 auroraMVZ13957 cascadaeMVZ148946 sylvaticaMVZ137426 sylvaticaDMH84R43 septentrionalesDCC3588 grylioMVZ175945 okaloosae clamitansJSF1118 heckscheriMVZ164908 catesbianaX12841 catesbianaDMH84R2 virgatipesMVZ175944 maculataKU195258 vibicariaMVZ11035 warszewitshiiJSF1127 palmipesVenAMNHA118801 palmipesEcuKU204425 Sp_1_ecuadorQCAZ13219 bwanaQCAZ13964 vaillantiKU195299 julianiTNH [...]
+END;
+BEGIN CHARACTERS;
+    TITLE Untitled_DATA_Block_1GapsAsMissing;
+    LINK TAXA = Untitled_TAXA_Block_1;
+    DIMENSIONS NChar=3211;
+    FORMAT Datatype=DNA;
+Matrix
+temporariaDMH84R1             ACA?CTTGT?A??AGTG?GC?T????????GACCTGTAG??TT???T?TT?AACAAACTA????GCG??????????GGTG?ACAAACAT??GGT?TTTAATCT??TG?TGTT?GA??TT???TT?A???????T?AC???????C?AA?????????CCAACT?ACAA??CCAGTAACGAC????G??CCCGAATATG??C?TA?AT?TAT?AT??CGG???AT?ACT?????????T??ACACTGTCGTTG?CTATCGTTAT???CTTGGTTGTA?TCT??????????A?CGATATA?ATGGAAT?CTGAGAT???AC????CTCC???TCAACTCGC??CT????????CTCTAAAT?????TG?T??C?AATG??TAGATACTA???????ATAAAACTTTC??C????????GCCATTAC??T??????????AAAAATTGACAGTA??TACA?AC [...]
+boyliiMVZ148929               ACT?CCCGC?A??AGTG?GC?T????????GACCTGTAG??T?????????AACCAACTA????GTG???????????GTG?ACAAACCC??GGT?TTTAATCT??CG?TAAT?GA??TTGA?TT?A???????C?AC???????G?AA?????????CCCATT?ACAG??CCAGTAACGAC????G??CTCGAATATA??C?TA?GT?TAT?AT??CGG???ATAACC?????????AG?ACACCG??GCTG?ATAGC????????TTTAGTTGTA?TCT??????????A?CGGTATACATGGAA??CTGAGG????AC????CTCC???TTTACTCGC??CT????????CTTTAAAT?????TG?T??C?AATG??TTGATACTA???????CTGATATTTTC??C????????GCCATTAC??A???????????AAAGTTGACAAAA??CACA?AC [...]
+luteiventris_MT_MVZ191016     ACC?CTCGT?A??AGTG?GC?T????????GACCTGTAG??T?????????AACAAACTA????GTG??????????GGTG?ACAAACCT??GGT?TTTGACCT??CG?TATT?GA??TTGA?TT?A???????C?AC???????T?AA?????????CCAATT?ACAA??CCCGTAACGAC????G??CTTGAATA?A??A?TA?AT?TAT?AT??CGG???ACAACC?????????AG?ACATCGTCGCTG?TCATC????????TTTAGTTGCA?T?T???????????????TATA?ATGGAAT?CTGAGGT???AC????CTCC???TTCACTCGC??CT????????CTCTAAAT?????TG?T??T?AATG??TTGATACTA???????ATGAGGCTTTC??C????????GCCATTAC??A??????????AGAAGTTGACAAAA??TACA?AC [...]
+luteiventris_WA_MVZ225749     ACC?CTCGT?A??AGTG?GC?T????????GACCTGTAG??T?????????AACAAACTA????GTG??????????GGTG?ACAAACCT??GGT?TTTGACCT??CG?TATT?GA??TTGA?TT?A???????C?AC???????T?AA?????????CCAATT?ACAA??CCCGTAACGAC????G??CTTGAATA?A??T?TA?AT?TAT?AT??CGG???ACAACC?????????AG?ACATCGTCGCTG?TTATC????????TTTAGTTGCA?T?T???????????????TATA?ATGGAAT?CTGAGGT???AC????CTCC???TTCACTCGC??CT????????CTCTAAAT?????TG?T??T?AATG??TTGATACTA???????ATGAGGCTTTC??C????????GCCATTAC??A??????????AGAAGTTGACAAAA??TACA?AC [...]
+muscosaMVZ149006              ACT?CCCGT?A??AGTG?GC?T????????GACCTGTAG??TT???T?TT?AACAAACTA????GTG??????????GGTG?ACAAACCT??GGC?TTTGACCT??CG?TCTT?GA??TTGA?TT?A???????C?AC??????????A?????????CCAATT?ACAA??TCCGTAACGAC????A??CTCGAATATA??C?TA?AT?TAT?AT??CGG???ATAACC?????????AG?ACACCGTCGCTG?TTATC????????TTTAGTTGTA?TCT??????????A?CGGTATA?ATGGAAT?CTGAGGT???AC????CTCC???TATACTCGC??CT????????CTTTAAAT?????TG?T??T?TATG??TAGATACTA???????CTAAAACTTTC??C????????GCCATTAC??A??????????AGAAGTTGACACAA????CG?AC [...]
+auroraMVZ13957                ?TC?CCCAT?A??AGTG?GC?T????????GACCTGTAG??TT???T?TT?AACAAACTA????GTG??????????GGTG?ACAAACTC??GGC?TTTTACCT??TG?TCAT?GA??TCGA?TT?A???????C?AT???????A?AA?????????CCAATT?ACAA??CCCGTAACGAC????A??CTCGTGTATA??T?TA?AT?TAT?AT??CGG???ATAACC?????????AG?ACACTGTCGCTG?TTATC????????TTTAGTTGTA?TCT??????????A?CGGTATA?ATGGAAT?CTGAGAT???AC????CACC???TTTACTCGC??CT????????TTCTAAAT?????TG?T??T?AATA??TTGATACTA???????ATAAAACTTTC??C????????GCCATTAC??A??????????AGAAGTTGACAAAA????CA?AC [...]
+cascadaeMVZ148946             ATC?CCCAC?A??AGTG?GC?T????????GACCTGTAG??TT???T?TT?AACGAACTA????GTG??????????GGTG?ACAAACTT??GGC?TTTAATCT??TG?TCAT?CA??TCGA?TT?A???????T?AT???????A?AA?????????CCCATT?ACAA??CCCGTAACGAC????A??CTCGAGTATA??T?TA?AT?TAT?AT??CGG???ATAACC?????????GG?ACACCGACGCTG?TCACC????????TTTTGTTGTA?TCT??????????A?CGATATA?ATGGAAT?CTGAGAT???AC????CTCC???T????TCGC??CT????????CTCTAAAT?????TG?T??C?TATA??TTGATACTA???????TTAAAACTTTC??C????????GCCATTAC??A??????????AGAAATTGACAAAA????CG?AC [...]
+sylvaticaMVZ137426            ACC?CCTGT?A??AGTG?GC?T????????GTCCTGTTG??TT???T?TT?AACTAA??A????GTG??????????GGTG?ACA????????GT?TTTGACCT???????????????TGA?TT?A???????C?AC???????A?AA?????????CCGATT?ACAA??CCCGTAATGTC????A????????TATA??C?TA??T?TAT?AT??CAG???ACAACCTTCAT??A?AG?ACAAAGTCGCTG?TTAAC????????CATAGTTGTTCTCT??????????A?CGCTATA?ATGGAAT?CTGAGGT???AC????CTCC???TCTACTCGC??CT????????CCCTAAAT?????TG?T??T?AATG??TAGATACTA???????ATGAAACTTTC??C????????GCCTTTAC??A??????????ACAAGTTGACACAA??TACG??C [...]
+sylvaticaDMH84R43             ACC?CCTGT?A??AGTG?GC?T????????GTCCTGTTG??TT???T?TT?AACTAA??A????GTG??????????GGTG?ACA????????GT?TTTGACCT???????????????TGA?TT?A???????C?AC???????A?AA?????????CCGATT?ACAA??CCCGTAATGTC????A????????TATA??C?TA??T?TAT?AT??CAG???ACGACCTTCAT??A?AG?ACAATGTCGCTG?TTAAC????????CATAGTTGTTCTCT??????????A?CGCTATA?ATGGAAT?CTGAGAT???AC????CTCC???TCTGCTCGC??CT????????CCCTAAAT?????TG?T??T?AATG??TAGATACTA???????ATGAAACTTTC??C????????GCCTTTAC??A??????????ACAAGTTGACACAA??TACG??C [...]
+septentrionalesDCC3588        ACTTCTC???AT?AGTG?GC?T????????GTCCTGTCG??TT???T?TT?AAGTAACTG????GTG??????????GGTG?ACA????????GT?TTTAATTT??TAGTATCAAAAGTTGA?TT?A???????C?AC???????C?AA?????????CCTATT?ATAG??CCCGTAATGAC????A????????TATA??T?TA?GT?TAT?????CAG???ATGACCTTCAC??A?CC?ACCGTGTCGCTG?CCATT????????TCTAGTTGTA?TCT??????????A?CGTTATA?ATGGAAT?CTGAGAT???AC????CTCC???TTTACTCGC??CT????????TTTTAAAT?????TG?T??T?GATG??TGGATACCA???????ATGAAACTTTC??C????????GCCATTAC??A??????????AAAAATTGACAGAA??CACA??C [...]
+grylioMVZ175945               ACTCCTC???AT?AGTG?AC?T????????GTCCTTTTG??TT???T?CT?AAGTAACTG????GTG??????????GGTG?ACA????????GT?TTTAACTT??TAGTATCACA??TTGA?CT?A???????C?AC???????A?AA?????????CCAATT?GCAA??CCCGTAATGACT???A????????TATA??C?TA?TT?TAT?????CAG???ATGACCTTCAT??A?CA?ACTGTGTCGTTG?CTAAC????????CTTAGTTGTC?TCT??????????A?CGCTATA?ATGGAAT?CTGAGAT???AC????CTCC???TTTACTCGC??CT????????ACTTAAAT?????TG?T??T?GATG??TCGATACCA???????ATGATACTTTC??T????????GCCATTAC??A??????????AAAAATTGTCAGGA??CACA??C [...]
+okaloosae                     ACTTCTT???AT?AGTG?GC?T????????GTCCTGTTG??CT???T?TT?AAGTAGCTA????ATG??????????GGTG?ACA????????GT?TTTAATTT??CAGTATCAAA??TTGA?TT?A???????C?AC???????A?AA?????????CCAATT?ACAA??CCCGTAATGAC????A????????TATA??C?TA?AT?TAT?????CAG???ATGACCTTCTT??A?TA?ACCGAGTCGCTG?CTAAC????????TATAGTTGCA?TCT??????????A?CGCTATA?ATGGAAT?CTGAGAT???AC????CTCC???TTTTCTCGC??CT????????AATTAAAT?????T?????C?GATG??TAGATACCA???????ATGAAACTTTC??C????????GCCGTTAC??A??????????ACAAATTGTCAGTA??CACA??C [...]
+clamitansJSF1118              ACTTCTC???AT?AGTG?GC?T????????GTCCTGTTG??TT???T?TT?AAGTAGCTG????ATG??????????GGTG?ACA????????GT?TTTAATTT??TAGTATCAAA??TTGA?TT?A???????C?AC???????A?AA?????????CCAATT?ACAA??CCTGTAATGAC????A????????TATA??C?TA?AT?TAT?????CAG???ATGACCTTCAT??A?TA?ACCGAGTCGCTG?CTAAC????????TATAGTTGCA?TCT??????????A?CGCTATA?ATGGAAT?CTGAGAT???AC????CTCC???TTTTCTCGC??CT????????AATTAAAT?????T?????T?GATG??TTGATACCA???????TTGAAACTTTC??C????????GCCGTTAC??A??????????ATAAATTGTCAGTA??CACA??C [...]
+heckscheriMVZ164908           ACTTCTC???AT?AGTG?GC?T????????GTCCTGTTG??TT???T?CT?AAGCAGCTG????GTT??????????GGTG?ACA????????GC?TTTAATTT??TAGTGTCAAA??TTGA?TT?A???????C?AC???????A?AA?????????CCAATT?ACAA??CCCGTAATGAC????A????????TATA??C?TA?AT?TAT?????CAG???ATGACCTTCAT??A?TA?ACCGGGTCGCTG?CCAAC????????TAGAGTTGCA?TCT??????????A?CGCTATA?ATGGAAT?C??AGAT???AC????CTCC???TCTGCTCGC??CT????????AATTAAAT?????T?????A?GATG??TAGATACCA???????GTAATACTTTC??T????????GCCGTTAC??A??????????ACAAATTGCCAATA??CACA??C [...]
+catesbianaX12841              ACTTCTC???AT?AGTG?GC?T????????GTCCTGTTG??TT???T?TT?AAGG?ACTG????GTG??????????GGTG?ACA????????GT?TTTAATTT??CAGTATCAAA??TTGA?TT?A???????C?AC???????A?AA?????????CCAATT?ACAA??CCCGTAACGAC????T????????TATA??A?TA?GT?TAT?????CAG???ATGACCTTCAT??A?TA?ACCAGGTCGCTG?CCAAC????????TACAGTTGTG?TCT??????????A?CGTTATA?ATGGAAT?CTGAGAT???AC????CTCC???TTTGCTCGC??CT????????AATTAAAT?????T?????C?GATG??TTGATACCA???????ATGATACTTTC??C????????GCCGTTAC??A??????????ATAAGTTGTCAATA??CACA??C [...]
+catesbianaDMH84R2             ACTTCTC???AT?AGTG?GC?T????????GTCCTGTTG??TT???T?TT?AAGG?ACTG????GTG??????????GGTG?ACA????????GT?TTTAATTT??CAGTATCAAA??TTGA?TT?A???????C?AC???????A?AA?????????CCAATT?ACAA??CCCGTAACGAC????T????????TATA??A?TA?GT?TAT?????CAG???ATGACCTTCAT??A?TA?ACCAGGTCGCTG?CCAAC????????TACAGTTGTG?TCT??????????A?CGTTATA?ATGGAAT?CTGAGAT???AC????CTCC???TTTGCTCGC??CT????????AACTAAAT?????T?????C?GATG??TTGATACCA???????ATGATACTTTC??C????????GCCGTTAC??A??????????ATAAGTTGTCAATA??CACA??C [...]
+virgatipesMVZ175944           ACCTCTTAT?AT?AGTG?GC?T????????GTCCTG?CG??TT???T?TT?GAGTAACTG????GTG??????????AGTG?ACA????????GC?TTTAATTT??CAGTAACAAA??TTGA?TT?A???????C?AC???????A?AA?????????CCAATT?ACAA??CCCGTAAAGAC????A????????TATA??C?TAAAT?TAT?????CAA???ATGACCTTCAT??A?AA?ACCAAGTCGCTG?CT??????????????AGTTGTG?TCT??????????A?CGCTATA?ATGGAAT?CTGAGGT???AC????CTCC???TTCACTCGC??CT????????ACTTAAAT?????TG?T??G?GATG??TAGATACCA???????ATTAAATTTTC??C????????GCCGTTAC??C??????????ATAAGTTGGCAGAA??CACA??C [...]
+maculataKU195258              ACC?CCCGT?A??AGTG?GC?T????????GTCCTGTCG??TT???T?CT?AACTAACTA????GTA???TA?AC??GGTG?ACAATCTT??GGT?TTT??CCT??TA?TATT?TA??TTAA?TT?A???????C?AC???????G?AA?????????CCAATT?ACAA??TCCGTAATGAC????AA???????TGTATAC?TA?AT???T?AT??CAT???ATGACTTTCAT??A?AG?ACATAGACGTTG?CCAAC????????TTTAGTTGTC?TCC??????????A?CGATTTA?ATGGAAT?CTGAGGTAT?AC????CTCC???TTTACTCGC??CT????????CCGTAAA??????TG?T??T?CATT??TCGATACTA???????ATGAAATTTTC??C????????GCCCTTAC??A??????????A??AGTTGGCACAAA?CACA??C [...]
+vibicariaMVZ11035             ACT?C?????????????GC?T????????GACCTGTGG??TT???T?TT?CATT????A????ATG???TA?GC??GGTG?ACAACCAA??GGT?TTT??TCTGACCGTAGC?CA??TTGA?TT?A???????CGAT???????G?GA?????????CCAA?????????????TAACGAC????G?T??????TATA??T?TA?TT???T?AT??CAG???ATAACCCTCAT??ACGT?ACAAAGGCGCTG?CTATC????????TTC?GTTGGT?TCT??????????A?CGTTCTA?ATGGAAT?CT?????????C????CTCC???TTCC?TCGC??CT????????CTCTAAA??????TG?T??T?CATG??TAGATACTA???????CTGAAACTTTC??C????????GCCATTAC??ATTTTTTAC??A??AGTTGACAAAA??CACCT?C [...]
+warszewitshiiJSF1127          ACA?CCTGT????AGTG?GC?T????????GT?CTGTGG??TT???T?CT?CAAA???TA????ATG???TA?G????GTG?AC?ATCGC??GGC?TTT??CCT??CAGCAAC?TA??TTAA?GT?A???????C?AC???????T?AA?????????TC???????????????????GAC????G?A??????CATA??T?TA?CT???T?AG??CAA???ATAAACCTCAC??ACGC?ACAAAGACGCTG?ACAAC?????GTCTTC?????TC?TCT??????????A?C?GTCTA?ATGGAAT?CTGA????????ACAGCTCC???TTT??????????????????CTGTAAA??????TG?T??T?CATG??TGGATACTACATTTCCCTAAACT?TTC??C????????GCCATTA???A??????????A??AGTTGACAAAA??CACA??C [...]
+palmipesVenAMNHA118801        TCT?CCCGG?A??AGTG?GC?T????????GCCCTATCG??TT???T?AT?AATAACCTA????GTGAGATAAAA??GGTG?ACAATCTT??GGC?TTTGATCT??TAGTGTT?TA??TTAG?TT?A???????C?AC???????T?AA?????????CCTATT?GCAA??CCTGTAACGAC????A????????CATA??G?TA?AT???T?AT??CAA???AATACCTTCAT??A?CT?ACAGGGACGTTG?TAATC????????TGGAGTTGTT?TCT??????????A?CG?TTTA?ATGGAAG?CTGAAAT???AC????CTCC????CTACTCGC???T????????CAATACAT?????TG?T??A?C??????CGATACTA???????TTAAAAATTTC??T????????GCCTTTAC???????????????????TGCCAAAA??CACA??C [...]
+palmipesEcuKU204425           ACT?CCCGG?A??AGCG?GC?T????????GCCCTGTTG??TT???T?TT?AATTACCTA????GTGAGTTACAT??GGTG?ACAATCCA??GGC?TTTGATCT??CAGTACT?TA??TTAG?TT?A???????C?AT???????A?AA?????????CCAATT?ACAA??CCCGTAACGAC????A????????TATA??G?TA?GT???T?AT??CAG???ATTAACTTCAT??A?AT?ACAGAGACGTTG?TTAAC????????TGGAGTTGTC?TCC??????????A?CG?TGTA?ATGGAAA?CTGAGCT???AC????CTCC????CTACTCGC??CT????????CCATACAT?????TG?T??C?C??????TGATACTA???????CTAAAAATTTC??T????????GCCATTAC??A??????????A??AGTTGACAAAA??CACA??C [...]
+Sp_1_ecuadorQCAZ13219         ACT?CTTGA?A??AGCG?GC?T????????GCCCTGTCG??TT???T?TT?AATAACCTA????GTG???TACAC??GGTG?ACAATCTA??GGT?TTTAATCT??TAGTACT?TA??TTAG?TT?A???????C?AT???????G?AA?????????CCAATT?ACAA??CCTGTAACGAC????A????????TATA??G?TA?CT???T?ATTTCAA???ATTACCTTCGT??A?AC?ACAAAGACGTTG?TAATC????????TAGAGTTGTT?TCC??????????A?CG?TGTA?ATGGAAT?CTGAGAT???AC????CTCC????CTACTCGC??CT????????TCATACAT?????TG?T??C?C??????CGATACTA???????CTAAAACTTTC??T????????GCCATTAC??A??????????A??AGTTGACAAAA??CACT??C [...]
+bwanaQCAZ13964                ACT?CCCGC?A??AGTG?GC?T????????GCCCTGTTG??TT???T?TT?AACTATCTA????GTG???TACAT??GGTG?ACA???????GGT?TTTGATCT??TAGTATC?TA??TTAG?TT?A???????C?AT???????A?AA?????????ACAATT?ACAA??CC??TAATGAC????T????????TATA??GCTA?AT???T?AT??CAG???ATAAACTACAT??A?AC?ACAAGGACGTTG?TGAAC????????TTGAGTTGTC?TCC??????????A?CG?TGTA?ATGGAAT?CTGAGAT???AC????CTCC????CCACTCGC??CT????????CTATACAT?????TG?T??C?C??????TGA???TA???????ATAA?ATTTTC??C????????GCCATTAC??A??????????A??AGTTGACAAAA??CACA??C [...]
+vaillantiKU195299             ????????C?A??AGTG?GC?T????????GCCCT?T?G??TT???T?TT?CACCACCTA????GTG???TA?AC??GGTG?GCAATCCA??GGC?TTTGATCT??TAGTTGC?T????TAG?CT?A???????C?AT???????ATAA?????????CCGATT?ACAA??CCCGTAACGAC????A????????AATA??G?TA?TT???T?AT??CAG???ATAACTTTCAT??A?AT?ACATAGACGTTG?TAACC????????CGTAGTTGTC?TC???????????A?CGCTGTA?ATGGAAT?CTGAGAT???AC????CTCC????TTACTCGC??CT????????CTATACAT?????TG?T??C?C??????CGATACTA???????TTAAAATTTTC???????????GCCATTAC??A??????????A??AGTTGACATAA??TACA??C [...]
+julianiTNHC60324              ????????T?A??AGTG?GC?T????????GCCCT?TCG??TT???T?AT?AATAACCTA????GTG???TA?AT??GGTG?ACAATCCA??GGC?TTTGATCT??TAGTCCC?A????TAG?TT?C???????C?AT???????G?AA?????????CCAATT???????CCCGTAACGGC????A????????TATA??G?TA?ATG??T?AT??C??????TAACCTTCGT??A?AC?ACAAA?GCGTTG????CC????????CTTAGTTGAT?TC???????????A?CGTTGTA?ATGGAAT?CTGAAAT???AC????CTCC????CTACTCGCAACT????????TAATACAT?????TG?T??C?C??????AGATACTA???????TTAATACTTTC??C????????GCCATTAC??A??????????A??AATTGACAAAA??CACC??C [...]
+sierramadrensisKU195181       ACA?CCAGT?A??AGTG?GC?T????????GTCCTGTCG??CT???T?CT?AACCAACTA????GCG??????????GGTG?TCAAACGT??GG??TTTGAACT??CAGCATC?AA??TTGATTT?A???????C?AT???????A?AA?????????TCGATT?ACAA??ACTGTAATGAC????C????????TATA??T?TA?TT???T?AT??CAG???ATAACCTTCAT??A?AG????ATGGCGATG?TGGGC????????TCTAGTTGTT?TCA??????????A?CGTTCTA?ATGGAAT?CTGAGTT???AC????CTCC???TCTGCTCGC??CT????????CCATAAAT?????AG?T??A?AATG??TAGATACTA???????ATAAAACTTTC??C????????GCCATTAC??A??????????A??AATTGACAAAA??CACG??C [...]
+psilonotaKU195119             ACC?CA??C??????CG?GC?T???????????CTGTAG??TT???TTTT?AACTACCTAA?TCGCG??????????GGTG?GCAATCCC???GT?TTTCA?CT??CAGCATC?CA??T?????TTAAC?????T?ATCCTCTT?T?AA?????????TCAATT?AT????CCTGTAACGAC?CCCG????????TATA??C?TA?AT???T?AT??CCG???ATGACTTTCAT??A?AG????TA??CGTTG?TAGAC????????TATAGTTGTA?TCC?????????????GCTTTA?ATGGAAT?CTGAACT???AC????CTCC???TCTACTCGC??CT????????CCCTAAAT?????TG?T??C?AATG??TCGATACCA???????TTAAAAATTT???T????????GCCCTTAC??A??????????A??AGTTGCCATAA??CACG??C [...]
+zweifeliJAC7514               ????CACGT?A??AGTG?GC?T????????GTCCTGTCG??TT???T?TT?AACCAACTAATGCGCG??????????GGTG?TCAATCCC??GGT?TTTGATCT??AAGCATC?CA??T?????T?AAA?????C?AT???????C?AA?????????TCAATT?AT????CCTGTAATGAC?CCCG????????TATA??C?TA?AT???T?AT??CAA???ATAACGTTCAT??A?AA????CGGACGTTG?TTGAC????????TTTAGTTGTT?TCC??????????A?CGCTTTA?A?GGAAT?CTGAAGT???AC????CTCC???TATACTCGC???T????????CCGTAAAT?????TG?T??C?AATA??TAGATACTA???????GTAAAATTTT???T????????GCCATTAC??A????????TAA??ACTTGTCATAA??CACA??C [...]
+tarahumaraeKU194596           A?C?CCC???A??AGTG?GC?T????????GTCCTGTTG??TTTTGT?CT?GACCAACTAATGTGCG??????????GGTG?ACAATCTT??GGC?TTTGATCT??CAGTGTC?AA??TTGA?CT?AAC?????C?AT???????C?AA?????????TCTATT?AT????CCTGTAAAGAC?CCCG????????TATA??C?TA?AT???T?AT??CAG???ACAACCTTCAT??A?AAG???TGGACGTTG?TTGAC????????TCCAGTTGTT?TCC??????????A?CGC?CTA?ATGGAAC?CTGACAT??TAC????CTCC???TTTACTCGC??CT????????CCTTAAAT?????TG?T??T?AATA??TAGATACCA???????GTAAAATTTTC??T????????GCCATTAC??G??????????A??AGTTGACAAAA??CACA??C [...]
+pustulosaJAC10555             AAT?CCCGA?A??AGTGTGC?T????????GTCCTGTAG??TTTTGT?CT?GACTACCTATTGTGCG??????????GGTG?ACAATCCC??GGC?TTTAACCT??GCGCAAC?AA??T?????T?CAT?????C?AT???????C?AA?????????TCAATT?AT????TCTGTAATGAC?CCCG????????TGTA??A?TA?AT???T?AT??CAA???ACAACGTTCGT??A?AA????TTGACGTTG?TAGTC????????TTCAGTTGAA?TCC??????????A?CGT?CTA?ATGGAAT?CTGAAAT???AC????CTCC???TTTCCTCGC??CT????????ACTCAAAT?????TG?T??C?AATA??TAGATACTA???????A??AAAATTTC??T????????GCCATTAC??A??????????A??AATTGACAAA?????????? [...]
+pipiensJSF1119                ACC?CCCGC?A??AGCG?GC?T????????GTCCTGTTG??CT???T?TT?CATAAACTA????GTG??????????GGTG?ACAAACTC??GGTTTTTAATCT??GGGTACC?TA??TTAG?AT?A???????C?AA???????G?TA?????????CCAATT?ACAAAACCTGTAATGCC????T????????GATA??C?TA?TT???T?AT??CAG???ATAACCTT??T??A?TT????TAGACGTTG?TTATC????????TACAGTTGCA???CCCTGTCCTACA?CGATCTA?ATGGAAC?CTGAGCT????C????CTCCCTATTCGCTCGC???C????????CTTTAAAT?????TG?T??A?AATG??TCGATACTA???????ATGAAAATTTC??T????????GCCATTAC??A??????????A??ATTTGACATAA?ACACT??? [...]
+pipiensY10945                 ACC?CCCGC?A??AGCG?GC?T????????GTCCTGTCG??CT???T?TT?CATAAACTA????GTG??????????GGTG?ACAAACTC??GGTTTTTAATCT??GGGTACC?TA??TTAG?AT?A???????C?AA???????G?TA?????????CCAATT?ACAAAACCTGTAATGCC????T????????GATA??C?TA?AT???T?AT??CAG???ATAACCTT??TACA?TT????TAGACGTTG?TTATC????????TACAGTTGCA???CCCTGTCCTACA?CGATCTA?ATGGAAC?CTGAGCT????C????CTCCCTATTCACTCGC???C????????CTTTAAAT?????TG?T??A?AATG??TCGATACT????????????GAATTTC??T????????GCCATTAC??A??????????A??ATTTGACATAA?ACACC??? [...]
+dunniJSF1017                  ACC?CCCGT?A??AGCG????T????????GTCCTGTTG??TT???T?TT?CACAAACTA????GTG??????????GGTG?GCAAACTT??GGTCTTTAATCT??TGGTACC?TA??TTAG?AT?A???????T?AA???????G?TA?????????TCAATT?ACAAAACCTGTAATGTC????C????????TATA??T?TA?AT?????AT??CAG???ATAACCTT??T??A?AT????TCGACGTTG?TT??????????????AGTTGCA???C??????????A?CGATCTA?ATGGAAC?CTGAGCT????C????CTCCCTATTTACTCGC???T????????CTTTAAAT?????TG?T??C?AATG??TCGATACTA???????ATCAAACTTTC??G????????GCCATTAC?????????????A??ACTTGACATAA??CACC??? [...]
+montezumaeJAC8836             ACC?CCAGT?A??AGCG????T????????GTCCTGTCG??TT???T?CT?CACCAACTA????GTG??????????GGTG?GCAAACTT??GGTCTTTAATCT??TGGTACC?TA??TTAG?AT?A???????T?AA???????G?TA?????????CCGATT?ATAAGACCTGTAATGCC????T????????TATA??T?TA?GT?????AT??AAG???ATAACCTT??T??A?AT????TCGACGTTG?TT??????????????AGT???A???C??????????A?CGATTTA?ATGGAAC?CTGAGCT????C????CTCCCTATATACTCGC???T????????CGTTAAAT?????TG?T??T?AATG??TCGATACTA???????TTCAAATTTTC??G????????GCCATTAC?????????????A??ATTTGACATAA??CACC??? [...]
+sp_2_mex_JSF1106              ACC?CTCGT?A??AGCG????T????????GTCCTGTTG??TT???T?TT?CATAAACTA????GTG??????????GGTG?GCAAACTT??GGTCTTTAACCT??CGGTACC?TA??TTAG?AT?A???????T?AA???????G?TA?????????CCAATT?ATAAGACCTGTAATGCC????T????????TATA??C?TA?GT???T?AT??CAG???ATAACCTT??T??A?AT????CCGACGCTG?TT??????????????AGTTGCA???C??????????A?CGATTTA?ATGGAAC?CTGAGTT????C????CTCCCTATTTACTCGC???C????????ACTTAAATGCATCTG?T??G?AATG??TCGATACTA???????ATCAAGTTTTC??C????????GCCATTACCT???????????A??ACTTGACATAA??CACT??? [...]
+chiricahuensisJSF1063         ACT?CTTGT?A??AGCG????T????????GTCCTGTTG??TT???T?CT?CAAAAACTA????GTG??????????GGTG?CCAAACCT??GGTCTTTAATCT??TGGTACC?TA??TTAG?AT?A???????T?AA???????G?TA?????????CCAATT?ATAAGACCTGTAATGCC????A????????TATA??C?TA?GT???T?AT??CAG???ATTACCTT??T??A?AT????CAGACGTTG?TT??????????????AGTTGTT???C??????????A?CGATTTA?ATGGAAC?CTGAGTT????C????CTCCCTATTTACTCGC???T????????CTTTAAAT?????TG?T??T?A?????TCGATACTA???????GTCAGATTTTC??C????????GCCATTAC?????????????A??ACTTGACATAA??CACT??? [...]
+subaquavocalis                ACC?CCAGT?A?AAGCG????T????????GCCCTGTTG??TT???T?CT?AATAAACTA????GTG??????????GGTG?GCAAACCT??GGTCTTTAACCT??CGGTACC?CA??TTAG?AT?A???????T?AA???????G?TA?????????CCGATT?ATAAGACCTGTAATGCC????A????????TATA??C?TA?GT???T?AT??CAG???ATAACCTT??T??A?AT????TAGACGTTG?TT??????????????AGTTGCG???C??????????A?CGATTTA?ATGGAAC?CTGAGTT????C????CTCCCTATTTACTCGC???T????????CCTTAAAT?????TG?T??G?AATG??TTGATACTA???????ATCAAATTTTC??C????????GCCATTAC?????????????A??ACTTGACATAA??CACC??? [...]
+chiricahuensisJSF1092         ACC?CCCGT?A??AGCG????T????????GTCCTGTTG??TT???T?T??AATAAACTA????GTG??????????GGTG?GCAAACTT??GGTCTTTAACCT??CGGTACC?AA??TTAG?AT?A???????T?AA???????G?TA?????????CCCATT?ATAAGACCTGTAATGCC????T????????TATA??C?TA?GT???T?AT??CAG???ATAACCTT??T??A?AT????TAGACGTTG?TT??????????????AGTTGCG???C??????????A?CGATTTA?ATGGAAC?CTGAGTT????C????CTCCCTATTTTCTCGC???T????????CCTTAAAT?????TG?T??G?AATG??TTGATACTA???????ACCAAATTTTC??C????????GCCATTAC?????????????A??ACTTGACATAA??CACC??? [...]
+palustrisJSF1110              ACT?CTCGC?A??AGCG?GC?T????????GTCCTGTAG??TT???T?TT?AATTAACTA????GTG??????????GGTG?GCAAACTT??GGCCTTTAAACT??AGGTATT?CA??TTAA?AT?A???????C?AC???????A?TA?????????CCGATT?ACAAAATCTGTAATGGC????T????????AATA??C?TA?AT???A?AT??CAG???ATGACCTT??T??A?CC????GGGACGATG?TCACC????????TTTAGTTGCA?TCC??????????A?CGGTTTA?ATGGAAC?CTGAGCT????C????CTCC???TTCACTCGC???TA???ATTACCTTAACT?????TG?T??A?AATGTGTAGATACTA???????ATGAAGCTTTC??C????????GCCATTAC??A??????????A??ATTTGTCACAA??CACT??? [...]
+areolataJSF1111               ACT?CTCGC?A??AGCG?GC?T????????GTCCTGTAG??TT???T?TT?AATTACCTA????GTG??????????G?TG?GCAAACTCGCGGCCTTTCAACT??AGGCATG?CA??TTAA?AT?A???????C?AC???????G?TA?????????CCAATT?ATAAAGCCTGTAATGTC????T????????AATA??C?TA?TT???T?AT??CAG???ATAACTTT??C??A?AC????GGGACGCTG?TCATC????????TTTAGTTGCA?TCC??????????A?CGATTTA?ATGGAAC?CTGAGCT????C????CTCC???TTCACTCGC???TA???ATTACCCTAAAT?????TG?T??A?AATGTATAGATACTA???????ATGAAG?????????????????CCATTAC??A??????????A??ATTTGCCACAA??CACT??? [...]
+sevosaUSC8236                 ACT?CTTGT?A??AGCG?GC?T????????GTCCTGTAG??TT???T?TT?AACCAACTA????GTG??????????GGTG?TCAAACTT??GGTCTTTTAACT??GGGTATC?CA??TTAA?AT?A???????C?AT???????A?TA?????????CCGATT?ACAAAGTCTGTAATGCC????T????????AATA??C?TA?CT???T?AT??CAG???ATAACTTT??T??A?AC????GGGACGTTG?TAACC????????TCTAGTTGCA?TCC??????????A?CGATTTA?ATGGAAC?CTGAGTT????C????CTCC???TTCACTCGC???TA???ATTACCTTAAAT?????TG?T??A?AATGTATAGATACTA???????ATGAAG?????????????????CCATTAC??A??????????A??ATTTGTCACAA??CACT??? [...]
+capitoSLU003                  ACC?CTTGC?A??AGCG?GC?T????????GTCCTGTA???TT???T?TT?AACCAACTA????GTG??????????GGTG?TCAAACTT??GGCCTTTTAACT??AGGTATC?CA??TTAA?AT?A???????C?AT???????A?TA?????????CCGATT?ACAAAGTCTGTAATGCC????T????????AATA??C?TA?CT???T?AT??CAG???ATAACTTT??T??A?AC????AGGACGTTG?TTACC????????TTTAGTTGCA?TCC??????????A?CGATTTA?ATGGAAC?CTGAGTT????C????CTCC????TCACTCGC???TA???ATTACCCTAAAT?????TG?T??A?AATGTATAGATACTA???????ATGAAG?????????????????CCATTAC??A????????????????TGTCACAA??CACT??? [...]
+spectabilisJAC8622            ATT?CCCGC?A??AGCG?GC?T????????G?CCTGTCG??TT???T?GT?AACAAACTA????ATG??????????GGTG?GCAAACTT??GGCCTTTGATCT??AGGTACC?TA??TTAA?TT?A???????C?AC???????C?TA?????????CCCATT?ACAAAGCCTGTAATGCC????C????????AATA??T?TA?AT???T?AT??CAG???ACAACCTT??T??A?AT????TAGACGTTG?ATACC????????TATAGTTGTA?TCC??????????A?CGATTTA?ATGGAAC?CTGAATT????C????CTCC???TTCACTCGC???TA???ACTGCTTTAAAT?????TG?T??T?AATGTATAGATACTA???????CTGAAACTTTCAAC????????GCCATTAC??A??????????A??ATTTGCCATAA??CACT??? [...]
+omiltemanaJAC7413             ATC?CTCGC?A??AGCG?GC?T????????GTCCTGACG??TT???T?AT?CACGATCTA????GCG??????????GGTG?GCA???????GGACTTTGATCT??AGGTACT?CA??TTAA?AT?A???????C?AC???????A?TA?????????CCCATT?ACAAAGCCTGTAATGTC????T????????GATA??T?TA?AT???T?AT??CAG???ATAACTTT??T??A?AT????TTGACGTTG?ATATC????????TCAAGTTGTT?TCC??????????A?CGATCTA?ATGGAAC?CTGAATT????C????CTCC???TTCACTCGC???TAAAGGCTATTCTAAAT?????TG?T??A?AATGTATAGATACTA???????GTGAAACTTTCTAT????????GCCATTAC??A??????????A??AATTGTCACAA??CACT??? [...]
+sp_3_MichoacanJSF955          ACA?CTCGC?A??AGCG?GC?T????????GTCCTGTCG??TT???T?GT?GACAAACTA????GTG???????????GTG?GCAAACTT??GGCCTTTGATCT??AGGTACC?TA??TTAA?AT?A???????C?AC???????G?TA?????????CCCATT?ACAAAGCCTGTAACGAC????T????????AATA??T?TA?AT???T?AT??CAG???ATAACTTT??T??A?AC????TAGACGTTG?ATACC????????TTTAGTTGTA?TCC??????????A?CGA?TTA?ATGGAAC?CTGAATT????C????CTCC???TTCGCTCGC???TA???GTTACTTTAAAT?????TG?T??T?AATGTATAGATACTA???????ATGAAATTCTCTAC????????GCCATTAC??A??????????A??AGTTGTCATAA??CACT??? [...]
+tlalociJSF1083                ACT?CTCGC?A??AGCG?GC?T????????GTCCTGTCG??TT???T?TT?AACG?ACTA????GTG??????????GGTG?GCAAACAC??GGCTTTTAAGCT??AGGTACC?CA??TTAA?CT?A???????C?AT???????A?TA?????????CCCATT?ACAAAGCCTGTAATGCC????T????????AATA??T?TA?AT???T????????????TAACTTT??C??A?AT????TTGACGTTG?ACACC????????CCTAGTTGTT?TCC??????????A?CGATTTA?ATGGAAC?CTG?ATT????C????CTCC???TCCC???GC???TA???GCTTTTTTAAAT?????TG?T??T?AATGTATTGATACTA???????CTGAAACTTTCTAT????????GCCTTTAC??A??????????A??AATTGTCACAA??TACC??? [...]
+neovolcanicaJSF960            ACT?CTTGC?A??AGCG?GC?T????????GTCCTGTCG??TT???T?TT?GACG?ACTA????GTG??????????GGTG?GCAAACAC??GGCTTTTAAGCT??AGGTACC?CA??TTAA?CT?A???????C?AT???????A?TA?????????CCCATT?ACAAAGCCTGTAATGCC????T????????AATA??T?TA?AT???T?AT??CAG???ATAACTTT??C??A?AT????TTGACGTTG?ACACC????????CCTAGTTGTT?TCC??????????A?CGATTTA?ATGGAAC?CTG?ACT????C????CTCC???TCCC???GC???TA???GCTTTTTTAAAT?????TG?T??T?AATGTATAGATACTA???????TTGAAACTTTCTAT????????GCCTTTAC??A??????????A??AATTGTCACAA??TACC??? [...]
+berlandieriJSF1136            ACT?CTTGC?A??AGCG?GC?T????????GTCCTGTCG??TT???T?GT?AACA?ACTA????GTG??????????GGTG?GCAAACAC??GGCCTTTAAGCT??AGGTACC?CA??TTAA?CT?A???????C?AT???????A?TA?????????CCCATT?ACAAAACCTGTAATGCC????T????????AATA??T?TA?AT???T?AT??CAG???ATAACTTT??C??A?AT????TTGACGTTG?ACACC????????CCTAGTTGTT?TCC??????????A?CGATTTA?ATGGAAC?CTG?ATT????C????CTCC???TCGC???GC???TA???GCTTTTTTAAAT?????TG?T??T?AATGTATAGATACTA???????ATGAAACTTTCTAT????????GCCTTTAC??A??????????A??AATTGTCACAA??TACC??? [...]
+blairiJSF830                  ACT?CTTGC?A??AGCG?GC?T????????GTCCTGTCG??TT???T?GT?AACA?ACTA????GTG??????????GGTG?GCAAACAC??GGCCTTTAATCT??AGGTACC?CA??TTAA?CT?A??CGATAC?AT???????A?TA?????????CCCATT?ACAAAGCCTGTAATGCC????T????????AATA??T?TA?AT???T?AT??CAG???ATAACTTT??C??A?AT????TTGACGTTG?ACACC????????CCTAGTTGTT?TCC??????????A?CGATTTA?ATGGAAC?CTG?ATT????C????CTCC???TTCC???GC???TA???GTTTCTTTAAAT?????TG?T??T?A?TGTATAGATACTA???????ATGAAACTTTCTAC????????GCCTTTAC??T??????????A??AATTGACACAA??TACC??? [...]
+sphenocephalaUSC7448          ACT?CTCGT?A??AGCG?GC?T????????GTCCTGTTG??TT???T?GT?AACC?ACTA????GTG??????????GGTG?GCAAACTT??GGCTTTTGACCT??TAGTGCC?AA??TTAA?AT?A???????C?AC???????G?TA?????????CCTATT?ACAAAGCCTGTAATGCC????T????????AATA??T?TA?AT???T?AT??CAG???ATAACTTT??C??A?AC????ACGACGTTG?ACAAC????????TCTAGTTGCA?TCT??????????A?CGGTTTA?ATGGAAC?CTGAATT????C????CTCC???TCCGCTCGC???TA???ATTACTTTAAAT?????TG?T??T?AATGTATAGATACTA???????TTGAAATTTTCTAC????????GCCTTTAC??A??????????A??AATTGTCACAA??TACT??? [...]
+utriculariaJSF845             ACT?CTTGC?A??AGCG?GC?T????????GTCCTGTTG??TT???T?GT?AACC?ACTA????GTG??????????GGTG?GCAAACTC??GGCTTTTGAACT??AAGTATC?CA??TTAA?AT?A???????C?AC???????G?TA?????????CCCATT?ACAAAGCCTGTAATGCC????T????????AATA??T?TA?AT???T?AT??CAG???ATAACTTT??C??A?AT????TCGACGTTG?ATAAC????????TCTAGTTGTA?TCC??????????A?CGGTTTA?ATGGAAC?CTGAATT????C????CTCC???TCCACTCGC???TA???GTTACTTTAAAT?????TG?T??T?AATGTATAGATACTA???????ATGAAATTTTCTAC????????GCCTTTAC??A??????????A??AATTGTCACAA??TACT??? [...]
+forreriJSF1065                AC???ACAT?A??AGCG?GC?T????????GTCCTGTAG??TT???T?CT?AATGAACTA????GCG??????????GGTG?GCAAACCT??GGCCTTTGACCT??AGGTACC?TA??TTAA?AT?A???????C?AC???????A?TA?????????CCCACT?ACAAAACCTGTAACGTC????T????????AATA??C?TA?TT???T?AT??CAG???ATAACCTT??T??A?AC????TAGACGCTG?ATATT????????TTAAGTTGTA?TCT??????????A?CGATTTA?ATGGAAACCTGAACT????C????CTCC???TTCACTCGC????????G?TGCTCTAAAT?????TG?TGAT?AATGTATAGATAC????????????AAACTTTCTAC????????GCCATTAC??A??????????A??ACTTGTCACAA??CACT??? [...]
+magnaocularisJSF1073          GCG?CTCGC????AGCG?GCAT????????GTCCTGTTG??TT???T?TT?CATGAGCTA????ACG????????GCGGTG?????ACCT??GGCTTTTAACCT??A?GTAAC?TA??TTAA?AT?T???????C?AC???????A?TA?????????CCTATT?ACAAAGCCTGTAACGTC????A????????AATA??T?TA?A?????CAT??CA???????ACTTT??C??A?CT????TAG????TG?ACATC????????CTATGTTGTG?TCC??????????A?CGGTCTA?ATGGAAC????AATT????C????CTCC???TCCACTCGC????????GTTACCCTAGAT?????TG????ATAATGTATCGATACTA???????GTAAAACTTTCTAC????????GCCGTTAC??A??????????A??ATTTGGCATAA??CACT??? [...]
+sp_7_JaliscoJSF1000           ACA?CTTGT?A??AGCG?GCATTAAAA???GTCCTGTTG??TT???T?CT?AATAAACTA????GCG??????????GGTG?TCAAAC???????CTTTGATCT??A?GTGCC?AA??TTAA?AT?A???????C?AT???????A?TA?????????CCAATT?ATAAAGCCTGTAATGCC????C????????AATA??T?TA?AT???CAAT??CAG???ATAACTTT??C??A?AT????TCG?????G?GCATC????????TTTAGTTGTA?TCC??????????A?CGATCTA?ATGGAAC?CTGAATT????C????CTCC???TCTCCTCGC????????GTTGCGTTAAAT?????TGCT??T?AATGTATTGATACTA???????ATAAAACTTTCTAC????????GCCGTTAC??A??????????A??ATTTGTCACAA??CACC??? [...]
+yavapaiensisJSF1085           ACA?CTCGC?A??AGCG?GC?T????????GTCCTGTCGTGTT???T?TT?AACGAACTA????GCG??????????GGTGTGCAAACTT??GGCCTTTCACCT??AGGTACC?TA??TTAA?AT?A???????C?AC???????A?TA?????????CCTATT?ACAAAACCTGTAATGCC????T????????AATA??T?TA?AT???TAAT??C??????TAACTTT??T??A?AT????CCGACGTTG?GCAAC????????AATA??TGTA?TCC??????????A?CGATTTA?A?GGAAT?CTGAATT????C????CTCC???TTCACTCGC????????GTTCCTCTAAAT?????TG?T??A?AATATATAGATACTA???????CTGA?ATTTTCTATCACCTTATGCCATTAC??A??????????A??ATTTGCCACAA??CACT??? [...]
+oncaLVT3542                   ACA?CTCGC?A??AGCG?GC?T????????GTCCTGTCGTGTT???T?TT?AACGAACTA????GCG??????????GGTG?GCAAACAT??GGCCTTTTACCT??AGGTATC?TA??TTAA?AT?A???????C?AC???????A?TA?????????CCCATT?ACAAACCCTGTAATGCC????T????????AATA??T?TA?AT???TAAT??C??????TAACTTT??T??A?AT????TCGACGTTG?GCAAC????????TATA??TGTG?TCC??????????A?CGATTTA?A?GGAAT?CTGAATT????C????CTCC???TTCACTCGC????????GTTCCTTTAAAT?????TG?T??A?AATGTATAGATACTA???????CTGA?ACTTTCTATCACCTTATGCCATTAC??A??????????A??ACTTGTCACAA??CACT??? [...]
+sp_8_PueblaJAC9467            ACA?CTTGC?A??AGTG?GC?T????????GTCCTGTAGTGTT???T?TTAAATCAACTA????GCG??????????GGTG?GCAAACTT??GGCCTTTAATCT??AGGAACT?CA??TTAA?TT?A???????C?AC???????G?TA?????????CCCATT?ACAAAACCTGTAATGCC????T????????AATA??C?TA?AT???TAAA??C??????TAACTTT??T??A?AC????CTG???TTG?GTACT????????TCTAGTTGTG?TCC??????????A?CGATTTA?ATGGAA??CTGAAAT????C????CTCC???TCCACTCGC????????ATTTCGTTAAAT?????TG?T??T?AATGTATTGATACCA???????GTAAAATTTTCTACCACCTCACGCCATTAC??A??????????A??ATTTGCCACAA??CACT??? [...]
+macroglossaJAC10472           ACC?CTCGC?A??AGCG?GC?T????????GTCCTGTTG??TT???T?TT?AA????CTA????GCG??????????GGTG?GCAAGCCT??GGCCTTTGACCT??AGGTACC?AA??TTAA?AT?A???????C?AC???????A?TA?????????CCTATTTACAAAACCTGTAATGTC????T????????A??A??T?TA?AT???TAAT??CAG???ATAACTTT??T??A?TC????TTGACGTTG?ACATC????????CATAGTTGTA?TCC??????????A?CGATTTA?ATGGAAC?CTGAACT????C????CTCC???TTCACTCGC????????GCTGCTCTAAAT?????TG?T??T?AATGTATGGATACTA???????CTGAAATTTTCTAC????????GCCATTAC??A??????????A??ATTTGCCACAA??CACA??? [...]
+macroglossaJSF7933            ACC?CTCGC?A??AGCG?GC?T????????GTCCTGTCG??TT???T?TT?AA????CTA????GCG??????????GGTG?GCAAACTT??GGCCTTTGATCT??AGGTACC?TA??TTAA?AT?A???????C?AC???????A?TA?????????CCTATTTACAAAGCCTGTAATGTC????T????????A??A??T?TA?AT???TAAT??CAA???ATAACTTT??T??A?TC????TAGACGTTG?ACATC????????CATAGTTGTA?TCC??????????A?CGATTTA?ATGGAAC?CTGAACT????C????CTCC???TTCGCTCGC????????GCTGCACTAAAT?????TG?T??T?AATGTATAGATACTA???????TTGAAATTTTCTAC????????GCCATTAC??A??????????A??ATTTGCCACAA??CACA??? [...]
+taylori286                    ATA?CTCGC?A??AGCG?GC?T?????TCAGTCCTGTCG??TT???T?TT?AACGAACTA????GCG??????????GGTG?GCAAACCT??GGCCTTTGACCT??AGGAAAC?TA??TCAA?AT?A???????C?AC???????A?TA?????????ACC?TTTACAAAGCCTGTAATGCC????T????????GATA??T?TA?GT???TAAT??CAG???ATAACCTT??T??A?AC????CCGACGTTG?ATATC????????CACAGTTGTA?TCC??????????A?CGTTTTA?ATGGAAC?CTGAACT????C????CTCC???TCCACTCGC????????GTTGCCCTAAAT?????TG?T??G?AATGTATAGATACTA???????ATAAGACTTTCTAC????????GCCATTAC??A??????????A??AGTTGTCACAA??CACA??? [...]
+sp_4_Panama                   ACC?CTCGC?A??AGCG?GC?T????????GTCCTATCG??TT???T?TT?AATGAACTA????GCG??????????GGTG?GCAAACTT??GGCTTTTGACCT??AGGTACC?TA??TTAA??T?A???????C?AC???????A?TA?????????CCCATT?ACAAAGCCTGTAATGTC????T????????AATA??T?TA?AT???CAAT??CCG???ATAACTTT??T??A?AC????TAGACGTTG?ACAAC????????TATAGTTGTA?TCC??????????A?CGATTTA?ATGGAAC?CTGAATT????C????CTCC???TCCACTCGC????????CTTACCCTAAAT?????TG?T??T?AATGTATAGATACTA???????ATGAAACTTTCTAC????????GCCATTAC??A??????????A??ATTTGCCACAA??CACT??? [...]
+sp_5_CostaRichDMH86_210       ACA?CTCGTTA??AGCG?GC?T????????GTCCTGTCG??TT???T?TT?AATAAACTA????GCG??????????GGTG?GCAAACCT??GGCCTTTG?TCT??AGGCACC?CA??TTAA?GT?A???????C?AC???????A?CA?????????CCTATT?AAAAAGCCTGTAACGCC????C????????AATA??T?TA?GT???CAAT??CAGTTTATAACTTT??T??A?AC????AAGACGTTG?ATAAC????????TATCGTTGTT?TCC??????????ATCGATTTA?ATGGAAC?CTGAACT????C????CTCC???TCCACTCGC????????GTTGTTTTAAAT?????TG?T??C?AATGTATAGATACTA???????ATGAGATTTTCTAC????????GCCATTAC??A??????????A??ATTTGCCACAA??CACT??? [...]
+sp_6_CostaRicaDMH86_225       AAC?CTCGC?A??AGCG?GC?T????????GTCCTGTAG??TT???T?TT?AATGAACTA????GCG??????????GGTG?GCAAACCC??GGCCTTTGATCT??AGGTATC?TA??TTAA?AT?T???????C?AC??????CA?TATAGTCGGAACCCATT?ACAAATCCTGTAATGCC????C????????AATA??T?TA?AT???TAAT??CAG???ATAACTTT??T??A?GC????TAGACGTTGAATAAC????????TGTAGTTGTA?TCC??????????A?CGATTTA?ATGGAAC?CTGAATT????C????CTCC???TTCACTCGC????????GCTGCTCTAAAT?????TG?T??T?GATATAT?GATACCA???????ATGAAACTTTCTAC????????GCCATTAC??A??????????A??ACTTGTCACAA??CACA??? [...]
+;
+END;
+
+BEGIN CHARACTERS;
+    TITLE Untitled_DATA_Block_1GapsAsBinary;
+    LINK TAXA = Untitled_TAXA_Block_1;
+    DIMENSIONS NChar=2723;
+ CharStateLabels 1 col_1,
+    2 col_2,
+    3 col_3,
+    4 col_4,
+    5 col_5,
+    6 col_6,
+    7 col_7,
+    8 col_8,
+    9 col_9,
+    10 col_10,
+    11 col_11,
+    12 col_12,
+    13 col_13,
+    14 col_14,
+    15 col_15,
+    16 col_16,
+    17 col_17,
+    18 col_18,
+    19 col_19,
+    20 col_20,
+    21 col_21,
+    22 col_23,
+    23 col_24,
+    24 col_25,
+    25 col_26,
+    26 col_27,
+    27 col_28,
+    28 col_29,
+    29 col_30,
+    30 col_31,
+    31 col_32,
+    32 col_33,
+    33 col_36,
+    34 col_37,
+    35 col_38,
+    36 col_39,
+    37 col_40,
+    38 col_41,
+    39 col_43,
+    40 col_44,
+    41 col_45,
+    42 col_46,
+    43 col_47,
+    44 col_48,
+    45 col_49,
+    46 col_50,
+    47 col_51,
+    48 col_54,
+    49 col_55,
+    50 col_56,
+    51 col_57,
+    52 col_58,
+    53 col_59,
+    54 col_61,
+    55 col_62,
+    56 col_63,
+    57 col_64,
+    58 col_68,
+    59 col_69,
+    60 col_70,
+    61 col_71,
+    62 col_72,
+    63 col_73,
+    64 col_74,
+    65 col_75,
+    66 col_76,
+    67 col_77,
+    68 col_78,
+    69 col_79,
+    70 col_82,
+    71 col_83,
+    72 col_84,
+    73 col_85,
+    74 col_86,
+    75 col_87,
+    76 col_88,
+    77 col_89,
+    78 col_90,
+    79 col_91,
+    80 col_92,
+    81 col_93,
+    82 col_94,
+    83 col_95,
+    84 col_96,
+    85 col_100,
+    86 col_101,
+    87 col_102,
+    88 col_105,
+    89 col_106,
+    90 col_107,
+    91 col_108,
+    92 col_109,
+    93 col_110,
+    94 col_111,
+    95 col_112,
+    96 col_113,
+    97 col_114,
+    98 col_115,
+    99 col_116,
+    100 col_117,
+    101 col_118,
+    102 col_119,
+    103 col_120,
+    104 col_121,
+    105 col_122,
+    106 col_123,
+    107 col_124,
+    108 col_126,
+    109 col_128,
+    110 col_129,
+    111 col_130,
+    112 col_131,
+    113 col_132,
+    114 col_133,
+    115 col_134,
+    116 col_136,
+    117 col_139,
+    118 col_140,
+    119 col_141,
+    120 col_142,
+    121 col_143,
+    122 col_144,
+    123 col_145,
+    124 col_146,
+    125 col_147,
+    126 col_148,
+    127 col_150,
+    128 col_151,
+    129 col_152,
+    130 col_153,
+    131 col_154,
+    132 col_155,
+    133 col_156,
+    134 col_157,
+    135 col_158,
+    136 col_161,
+    137 col_162,
+    138 col_163,
+    139 col_164,
+    140 col_165,
+    141 col_166,
+    142 col_167,
+    143 col_168,
+    144 col_169,
+    145 col_170,
+    146 col_171,
+    147 col_172,
+    148 col_173,
+    149 col_174,
+    150 col_175,
+    151 col_176,
+    152 col_177,
+    153 col_178,
+    154 col_179,
+    155 col_183,
+    156 col_184,
+    157 col_185,
+    158 col_186,
+    159 col_188,
+    160 col_189,
+    161 col_190,
+    162 col_191,
+    163 col_192,
+    164 col_193,
+    165 col_194,
+    166 col_195,
+    167 col_197,
+    168 col_198,
+    169 col_200,
+    170 col_201,
+    171 col_203,
+    172 col_206,
+    173 col_207,
+    174 col_208,
+    175 col_209,
+    176 col_210,
+    177 col_211,
+    178 col_212,
+    179 col_213,
+    180 col_214,
+    181 col_215,
+    182 col_216,
+    183 col_217,
+    184 col_218,
+    185 col_219,
+    186 col_220,
+    187 col_221,
+    188 col_222,
+    189 col_223,
+    190 col_224,
+    191 col_225,
+    192 col_226,
+    193 col_230,
+    194 col_231,
+    195 col_232,
+    196 col_233,
+    197 col_234,
+    198 col_235,
+    199 col_236,
+    200 col_237,
+    201 col_238,
+    202 col_240,
+    203 col_241,
+    204 col_242,
+    205 col_243,
+    206 col_244,
+    207 col_247,
+    208 col_248,
+    209 col_249,
+    210 col_250,
+    211 col_251,
+    212 col_252,
+    213 col_254,
+    214 col_255,
+    215 col_256,
+    216 col_257,
+    217 col_258,
+    218 col_259,
+    219 col_260,
+    220 col_261,
+    221 col_262,
+    222 col_263,
+    223 col_264,
+    224 col_265,
+    225 col_266,
+    226 col_267,
+    227 col_268,
+    228 col_269,
+    229 col_270,
+    230 col_271,
+    231 col_272,
+    232 col_273,
+    233 col_274,
+    234 col_275,
+    235 col_276,
+    236 col_278,
+    237 col_279,
+    238 col_280,
+    239 col_281,
+    240 col_282,
+    241 col_283,
+    242 col_284,
+    243 col_285,
+    244 col_286,
+    245 col_287,
+    246 col_288,
+    247 col_289,
+    248 col_290,
+    249 col_291,
+    250 col_292,
+    251 col_293,
+    252 col_294,
+    253 col_295,
+    254 col_296,
+    255 col_297,
+    256 col_301,
+    257 col_303,
+    258 col_308,
+    259 col_309,
+    260 col_310,
+    261 col_311,
+    262 col_312,
+    263 col_313,
+    264 col_314,
+    265 col_315,
+    266 col_316,
+    267 col_317,
+    268 col_318,
+    269 col_319,
+    270 col_320,
+    271 col_321,
+    272 col_322,
+    273 col_323,
+    274 col_324,
+    275 col_325,
+    276 col_330,
+    277 col_331,
+    278 col_332,
+    279 col_333,
+    280 col_334,
+    281 col_335,
+    282 col_336,
+    283 col_337,
+    284 col_338,
+    285 col_339,
+    286 col_340,
+    287 col_341,
+    288 col_342,
+    289 col_343,
+    290 col_344,
+    291 col_345,
+    292 col_346,
+    293 col_347,
+    294 col_348,
+    295 col_349,
+    296 col_350,
+    297 col_351,
+    298 col_352,
+    299 col_353,
+    300 col_361,
+    301 col_362,
+    302 col_363,
+    303 col_364,
+    304 col_365,
+    305 col_366,
+    306 col_368,
+    307 col_369,
+    308 col_370,
+    309 col_371,
+    310 col_372,
+    311 col_374,
+    312 col_376,
+    313 col_377,
+    314 col_378,
+    315 col_379,
+    316 col_380,
+    317 col_381,
+    318 col_382,
+    319 col_385,
+    320 col_386,
+    321 col_387,
+    322 col_388,
+    323 col_389,
+    324 col_390,
+    325 col_391,
+    326 col_392,
+    327 col_393,
+    328 col_394,
+    329 col_395,
+    330 col_396,
+    331 col_397,
+    332 col_398,
+    333 col_399,
+    334 col_400,
+    335 col_401,
+    336 col_403,
+    337 col_404,
+    338 col_405,
+    339 col_406,
+    340 col_407,
+    341 col_408,
+    342 col_409,
+    343 col_410,
+    344 col_411,
+    345 col_412,
+    346 col_413,
+    347 col_414,
+    348 col_415,
+    349 col_416,
+    350 col_417,
+    351 col_418,
+    352 col_419,
+    353 col_426,
+    354 col_427,
+    355 col_428,
+    356 col_429,
+    357 col_430,
+    358 col_431,
+    359 col_432,
+    360 col_433,
+    361 col_434,
+    362 col_435,
+    363 col_436,
+    364 col_437,
+    365 col_438,
+    366 col_439,
+    367 col_440,
+    368 col_441,
+    369 col_442,
+    370 col_443,
+    371 col_444,
+    372 col_445,
+    373 col_453,
+    374 col_454,
+    375 col_455,
+    376 col_456,
+    377 col_457,
+    378 col_458,
+    379 col_459,
+    380 col_460,
+    381 col_461,
+    382 col_462,
+    383 col_463,
+    384 col_464,
+    385 col_465,
+    386 col_466,
+    387 col_467,
+    388 col_468,
+    389 col_469,
+    390 col_470,
+    391 col_471,
+    392 col_472,
+    393 col_474,
+    394 col_475,
+    395 col_477,
+    396 col_478,
+    397 col_479,
+    398 col_480,
+    399 col_481,
+    400 col_482,
+    401 col_483,
+    402 col_484,
+    403 col_485,
+    404 col_486,
+    405 col_487,
+    406 col_488,
+    407 col_489,
+    408 col_490,
+    409 col_491,
+    410 col_492,
+    411 col_493,
+    412 col_494,
+    413 col_496,
+    414 col_497,
+    415 col_499,
+    416 col_501,
+    417 col_502,
+    418 col_504,
+    419 col_505,
+    420 col_506,
+    421 col_507,
+    422 col_508,
+    423 col_509,
+    424 col_510,
+    425 col_511,
+    426 col_514,
+    427 col_516,
+    428 col_517,
+    429 col_518,
+    430 col_519,
+    431 col_520,
+    432 col_521,
+    433 col_523,
+    434 col_524,
+    435 col_525,
+    436 col_526,
+    437 col_527,
+    438 col_528,
+    439 col_529,
+    440 col_530,
+    441 col_531,
+    442 col_532,
+    443 col_533,
+    444 col_534,
+    445 col_535,
+    446 col_536,
+    447 col_537,
+    448 col_538,
+    449 col_539,
+    450 col_540,
+    451 col_541,
+    452 col_542,
+    453 col_543,
+    454 col_544,
+    455 col_545,
+    456 col_546,
+    457 col_547,
+    458 col_548,
+    459 col_549,
+    460 col_550,
+    461 col_552,
+    462 col_553,
+    463 col_554,
+    464 col_555,
+    465 col_556,
+    466 col_557,
+    467 col_558,
+    468 col_559,
+    469 col_560,
+    470 col_561,
+    471 col_562,
+    472 col_563,
+    473 col_564,
+    474 col_565,
+    475 col_566,
+    476 col_567,
+    477 col_568,
+    478 col_569,
+    479 col_570,
+    480 col_571,
+    481 col_572,
+    482 col_573,
+    483 col_574,
+    484 col_575,
+    485 col_576,
+    486 col_577,
+    487 col_578,
+    488 col_579,
+    489 col_580,
+    490 col_581,
+    491 col_582,
+    492 col_583,
+    493 col_584,
+    494 col_585,
+    495 col_586,
+    496 col_587,
+    497 col_588,
+    498 col_590,
+    499 col_591,
+    500 col_593,
+    501 col_594,
+    502 col_595,
+    503 col_596,
+    504 col_597,
+    505 col_598,
+    506 col_599,
+    507 col_600,
+    508 col_601,
+    509 col_602,
+    510 col_603,
+    511 col_604,
+    512 col_607,
+    513 col_609,
+    514 col_612,
+    515 col_614,
+    516 col_617,
+    517 col_618,
+    518 col_619,
+    519 col_620,
+    520 col_621,
+    521 col_623,
+    522 col_624,
+    523 col_625,
+    524 col_626,
+    525 col_630,
+    526 col_632,
+    527 col_633,
+    528 col_634,
+    529 col_635,
+    530 col_636,
+    531 col_637,
+    532 col_638,
+    533 col_639,
+    534 col_640,
+    535 col_641,
+    536 col_642,
+    537 col_643,
+    538 col_644,
+    539 col_645,
+    540 col_646,
+    541 col_647,
+    542 col_648,
+    543 col_649,
+    544 col_650,
+    545 col_651,
+    546 col_653,
+    547 col_657,
+    548 col_658,
+    549 col_659,
+    550 col_660,
+    551 col_661,
+    552 col_662,
+    553 col_663,
+    554 col_664,
+    555 col_665,
+    556 col_666,
+    557 col_667,
+    558 col_668,
+    559 col_669,
+    560 col_670,
+    561 col_671,
+    562 col_672,
+    563 col_673,
+    564 col_674,
+    565 col_675,
+    566 col_676,
+    567 col_677,
+    568 col_678,
+    569 col_679,
+    570 col_680,
+    571 col_681,
+    572 col_682,
+    573 col_683,
+    574 col_684,
+    575 col_685,
+    576 col_687,
+    577 col_688,
+    578 col_689,
+    579 col_690,
+    580 col_691,
+    581 col_693,
+    582 col_694,
+    583 col_695,
+    584 col_696,
+    585 col_697,
+    586 col_698,
+    587 col_699,
+    588 col_700,
+    589 col_701,
+    590 col_702,
+    591 col_703,
+    592 col_704,
+    593 col_706,
+    594 col_707,
+    595 col_708,
+    596 col_712,
+    597 col_713,
+    598 col_714,
+    599 col_715,
+    600 col_716,
+    601 col_717,
+    602 col_718,
+    603 col_719,
+    604 col_720,
+    605 col_721,
+    606 col_722,
+    607 col_723,
+    608 col_724,
+    609 col_725,
+    610 col_726,
+    611 col_727,
+    612 col_728,
+    613 col_729,
+    614 col_730,
+    615 col_731,
+    616 col_732,
+    617 col_733,
+    618 col_736,
+    619 col_737,
+    620 col_738,
+    621 col_739,
+    622 col_740,
+    623 col_741,
+    624 col_742,
+    625 col_743,
+    626 col_744,
+    627 col_745,
+    628 col_746,
+    629 col_747,
+    630 col_748,
+    631 col_749,
+    632 col_750,
+    633 col_751,
+    634 col_752,
+    635 col_753,
+    636 col_754,
+    637 col_755,
+    638 col_756,
+    639 col_757,
+    640 col_758,
+    641 col_759,
+    642 col_760,
+    643 col_761,
+    644 col_762,
+    645 col_763,
+    646 col_764,
+    647 col_765,
+    648 col_766,
+    649 col_767,
+    650 col_768,
+    651 col_769,
+    652 col_770,
+    653 col_771,
+    654 col_772,
+    655 col_773,
+    656 col_774,
+    657 col_775,
+    658 col_776,
+    659 col_777,
+    660 col_778,
+    661 col_779,
+    662 col_780,
+    663 col_781,
+    664 col_782,
+    665 col_783,
+    666 col_784,
+    667 col_785,
+    668 col_786,
+    669 col_787,
+    670 col_788,
+    671 col_789,
+    672 col_790,
+    673 col_792,
+    674 col_793,
+    675 col_794,
+    676 col_795,
+    677 col_796,
+    678 col_801,
+    679 col_802,
+    680 col_803,
+    681 col_804,
+    682 col_807,
+    683 col_808,
+    684 col_811,
+    685 col_812,
+    686 col_813,
+    687 col_814,
+    688 col_815,
+    689 col_816,
+    690 col_817,
+    691 col_818,
+    692 col_819,
+    693 col_820,
+    694 col_821,
+    695 col_822,
+    696 col_823,
+    697 col_824,
+    698 col_825,
+    699 col_826,
+    700 col_827,
+    701 col_828,
+    702 col_830,
+    703 col_831,
+    704 col_832,
+    705 col_833,
+    706 col_834,
+    707 col_835,
+    708 col_836,
+    709 col_837,
+    710 col_838,
+    711 col_839,
+    712 col_840,
+    713 col_842,
+    714 col_843,
+    715 col_844,
+    716 col_845,
+    717 col_846,
+    718 col_847,
+    719 col_848,
+    720 col_849,
+    721 col_850,
+    722 col_851,
+    723 col_852,
+    724 col_853,
+    725 col_854,
+    726 col_855,
+    727 col_856,
+    728 col_857,
+    729 col_858,
+    730 col_859,
+    731 col_860,
+    732 col_861,
+    733 col_862,
+    734 col_863,
+    735 col_864,
+    736 col_865,
+    737 col_866,
+    738 col_867,
+    739 col_868,
+    740 col_869,
+    741 col_870,
+    742 col_871,
+    743 col_872,
+    744 col_873,
+    745 col_874,
+    746 col_875,
+    747 col_876,
+    748 col_877,
+    749 col_878,
+    750 col_879,
+    751 col_880,
+    752 col_881,
+    753 col_882,
+    754 col_883,
+    755 col_884,
+    756 col_885,
+    757 col_886,
+    758 col_887,
+    759 col_888,
+    760 col_890,
+    761 col_892,
+    762 col_893,
+    763 col_894,
+    764 col_895,
+    765 col_896,
+    766 col_897,
+    767 col_898,
+    768 col_899,
+    769 col_900,
+    770 col_901,
+    771 col_902,
+    772 col_903,
+    773 col_904,
+    774 col_905,
+    775 col_906,
+    776 col_907,
+    777 col_908,
+    778 col_912,
+    779 col_913,
+    780 col_914,
+    781 col_916,
+    782 col_919,
+    783 col_920,
+    784 col_921,
+    785 col_922,
+    786 col_923,
+    787 col_924,
+    788 col_925,
+    789 col_926,
+    790 col_927,
+    791 col_928,
+    792 col_929,
+    793 col_930,
+    794 col_931,
+    795 col_932,
+    796 col_933,
+    797 col_934,
+    798 col_935,
+    799 col_936,
+    800 col_937,
+    801 col_938,
+    802 col_939,
+    803 col_940,
+    804 col_941,
+    805 col_942,
+    806 col_943,
+    807 col_944,
+    808 col_945,
+    809 col_946,
+    810 col_947,
+    811 col_948,
+    812 col_949,
+    813 col_950,
+    814 col_951,
+    815 col_952,
+    816 col_953,
+    817 col_954,
+    818 col_955,
+    819 col_956,
+    820 col_957,
+    821 col_960,
+    822 col_961,
+    823 col_962,
+    824 col_963,
+    825 col_964,
+    826 col_965,
+    827 col_966,
+    828 col_967,
+    829 col_968,
+    830 col_969,
+    831 col_971,
+    832 col_972,
+    833 col_973,
+    834 col_974,
+    835 col_975,
+    836 col_976,
+    837 col_977,
+    838 col_978,
+    839 col_979,
+    840 col_980,
+    841 col_981,
+    842 col_982,
+    843 col_983,
+    844 col_984,
+    845 col_985,
+    846 col_986,
+    847 col_987,
+    848 col_988,
+    849 col_989,
+    850 col_990,
+    851 col_991,
+    852 col_994,
+    853 col_995,
+    854 col_996,
+    855 col_998,
+    856 col_999,
+    857 col_1008,
+    858 col_1009,
+    859 col_1010,
+    860 col_1012,
+    861 col_1013,
+    862 col_1014,
+    863 col_1015,
+    864 col_1016,
+    865 col_1017,
+    866 col_1018,
+    867 col_1019,
+    868 col_1020,
+    869 col_1021,
+    870 col_1022,
+    871 col_1023,
+    872 col_1024,
+    873 col_1025,
+    874 col_1026,
+    875 col_1027,
+    876 col_1028,
+    877 col_1029,
+    878 col_1030,
+    879 col_1031,
+    880 col_1032,
+    881 col_1033,
+    882 col_1034,
+    883 col_1035,
+    884 col_1036,
+    885 col_1037,
+    886 col_1038,
+    887 col_1039,
+    888 col_1040,
+    889 col_1041,
+    890 col_1042,
+    891 col_1043,
+    892 col_1044,
+    893 col_1045,
+    894 col_1047,
+    895 col_1052,
+    896 col_1056,
+    897 col_1057,
+    898 col_1058,
+    899 col_1059,
+    900 col_1060,
+    901 col_1062,
+    902 col_1067,
+    903 col_1068,
+    904 col_1069,
+    905 col_1070,
+    906 col_1071,
+    907 col_1072,
+    908 col_1073,
+    909 col_1074,
+    910 col_1075,
+    911 col_1076,
+    912 col_1077,
+    913 col_1078,
+    914 col_1079,
+    915 col_1080,
+    916 col_1081,
+    917 col_1082,
+    918 col_1083,
+    919 col_1084,
+    920 col_1085,
+    921 col_1086,
+    922 col_1089,
+    923 col_1090,
+    924 col_1091,
+    925 col_1092,
+    926 col_1096,
+    927 col_1097,
+    928 col_1098,
+    929 col_1099,
+    930 col_1100,
+    931 col_1101,
+    932 col_1102,
+    933 col_1103,
+    934 col_1104,
+    935 col_1105,
+    936 col_1106,
+    937 col_1107,
+    938 col_1108,
+    939 col_1109,
+    940 col_1111,
+    941 col_1112,
+    942 col_1114,
+    943 col_1115,
+    944 col_1116,
+    945 col_1117,
+    946 col_1118,
+    947 col_1119,
+    948 col_1120,
+    949 col_1121,
+    950 col_1123,
+    951 col_1124,
+    952 col_1125,
+    953 col_1126,
+    954 col_1127,
+    955 col_1128,
+    956 col_1129,
+    957 col_1130,
+    958 col_1131,
+    959 col_1132,
+    960 col_1134,
+    961 col_1135,
+    962 col_1136,
+    963 col_1137,
+    964 col_1138,
+    965 col_1139,
+    966 col_1141,
+    967 col_1142,
+    968 col_1143,
+    969 col_1144,
+    970 col_1146,
+    971 col_1147,
+    972 col_1148,
+    973 col_1150,
+    974 col_1153,
+    975 col_1154,
+    976 col_1157,
+    977 col_1158,
+    978 col_1159,
+    979 col_1161,
+    980 col_1163,
+    981 col_1164,
+    982 col_1167,
+    983 col_1168,
+    984 col_1171,
+    985 col_1172,
+    986 col_1173,
+    987 col_1174,
+    988 col_1175,
+    989 col_1176,
+    990 col_1177,
+    991 col_1178,
+    992 col_1179,
+    993 col_1182,
+    994 col_1183,
+    995 col_1184,
+    996 col_1185,
+    997 col_1186,
+    998 col_1187,
+    999 col_1188,
+    1000 col_1189,
+    1001 col_1190,
+    1002 col_1191,
+    1003 col_1192,
+    1004 col_1193,
+    1005 col_1194,
+    1006 col_1195,
+    1007 col_1196,
+    1008 col_1197,
+    1009 col_1198,
+    1010 col_1199,
+    1011 col_1200,
+    1012 col_1201,
+    1013 col_1202,
+    1014 col_1203,
+    1015 col_1204,
+    1016 col_1205,
+    1017 col_1208,
+    1018 col_1209,
+    1019 col_1211,
+    1020 col_1212,
+    1021 col_1213,
+    1022 col_1214,
+    1023 col_1215,
+    1024 col_1216,
+    1025 col_1217,
+    1026 col_1218,
+    1027 col_1219,
+    1028 col_1220,
+    1029 col_1221,
+    1030 col_1223,
+    1031 col_1224,
+    1032 col_1228,
+    1033 col_1229,
+    1034 col_1230,
+    1035 col_1231,
+    1036 col_1232,
+    1037 col_1233,
+    1038 col_1234,
+    1039 col_1235,
+    1040 col_1236,
+    1041 col_1237,
+    1042 col_1238,
+    1043 col_1239,
+    1044 col_1240,
+    1045 col_1241,
+    1046 col_1247,
+    1047 col_1248,
+    1048 col_1249,
+    1049 col_1250,
+    1050 col_1251,
+    1051 col_1252,
+    1052 col_1253,
+    1053 col_1254,
+    1054 col_1255,
+    1055 col_1256,
+    1056 col_1257,
+    1057 col_1258,
+    1058 col_1262,
+    1059 col_1267,
+    1060 col_1268,
+    1061 col_1269,
+    1062 col_1270,
+    1063 col_1271,
+    1064 col_1272,
+    1065 col_1273,
+    1066 col_1274,
+    1067 col_1275,
+    1068 col_1276,
+    1069 col_1277,
+    1070 col_1278,
+    1071 col_1279,
+    1072 col_1280,
+    1073 col_1281,
+    1074 col_1282,
+    1075 col_1283,
+    1076 col_1286,
+    1077 col_1288,
+    1078 col_1289,
+    1079 col_1290,
+    1080 col_1291,
+    1081 col_1292,
+    1082 col_1293,
+    1083 col_1294,
+    1084 col_1295,
+    1085 col_1296,
+    1086 col_1297,
+    1087 col_1298,
+    1088 col_1299,
+    1089 col_1300,
+    1090 col_1301,
+    1091 col_1302,
+    1092 col_1303,
+    1093 col_1304,
+    1094 col_1305,
+    1095 col_1306,
+    1096 col_1307,
+    1097 col_1308,
+    1098 col_1309,
+    1099 col_1310,
+    1100 col_1311,
+    1101 col_1312,
+    1102 col_1313,
+    1103 col_1314,
+    1104 col_1315,
+    1105 col_1316,
+    1106 col_1317,
+    1107 col_1318,
+    1108 col_1319,
+    1109 col_1320,
+    1110 col_1321,
+    1111 col_1322,
+    1112 col_1323,
+    1113 col_1324,
+    1114 col_1325,
+    1115 col_1326,
+    1116 col_1327,
+    1117 col_1328,
+    1118 col_1329,
+    1119 col_1330,
+    1120 col_1331,
+    1121 col_1332,
+    1122 col_1333,
+    1123 col_1334,
+    1124 col_1335,
+    1125 col_1336,
+    1126 col_1337,
+    1127 col_1338,
+    1128 col_1339,
+    1129 col_1340,
+    1130 col_1341,
+    1131 col_1342,
+    1132 col_1343,
+    1133 col_1344,
+    1134 col_1345,
+    1135 col_1346,
+    1136 col_1347,
+    1137 col_1348,
+    1138 col_1349,
+    1139 col_1350,
+    1140 col_1351,
+    1141 col_1352,
+    1142 col_1353,
+    1143 col_1354,
+    1144 col_1357,
+    1145 col_1358,
+    1146 col_1359,
+    1147 col_1360,
+    1148 col_1361,
+    1149 col_1362,
+    1150 col_1363,
+    1151 col_1367,
+    1152 col_1369,
+    1153 col_1370,
+    1154 col_1371,
+    1155 col_1372,
+    1156 col_1373,
+    1157 col_1374,
+    1158 col_1377,
+    1159 col_1378,
+    1160 col_1379,
+    1161 col_1380,
+    1162 col_1381,
+    1163 col_1382,
+    1164 col_1383,
+    1165 col_1384,
+    1166 col_1385,
+    1167 col_1386,
+    1168 col_1387,
+    1169 col_1388,
+    1170 col_1389,
+    1171 col_1390,
+    1172 col_1391,
+    1173 col_1392,
+    1174 col_1393,
+    1175 col_1394,
+    1176 col_1395,
+    1177 col_1396,
+    1178 col_1397,
+    1179 col_1399,
+    1180 col_1400,
+    1181 col_1401,
+    1182 col_1402,
+    1183 col_1403,
+    1184 col_1404,
+    1185 col_1405,
+    1186 col_1406,
+    1187 col_1407,
+    1188 col_1408,
+    1189 col_1411,
+    1190 col_1412,
+    1191 col_1413,
+    1192 col_1414,
+    1193 col_1415,
+    1194 col_1416,
+    1195 col_1417,
+    1196 col_1418,
+    1197 col_1419,
+    1198 col_1420,
+    1199 col_1421,
+    1200 col_1422,
+    1201 col_1423,
+    1202 col_1424,
+    1203 col_1425,
+    1204 col_1426,
+    1205 col_1432,
+    1206 col_1433,
+    1207 col_1434,
+    1208 col_1435,
+    1209 col_1436,
+    1210 col_1438,
+    1211 col_1440,
+    1212 col_1441,
+    1213 col_1442,
+    1214 col_1443,
+    1215 col_1444,
+    1216 col_1446,
+    1217 col_1447,
+    1218 col_1448,
+    1219 col_1449,
+    1220 col_1450,
+    1221 col_1451,
+    1222 col_1452,
+    1223 col_1453,
+    1224 col_1454,
+    1225 col_1455,
+    1226 col_1456,
+    1227 col_1457,
+    1228 col_1458,
+    1229 col_1459,
+    1230 col_1460,
+    1231 col_1461,
+    1232 col_1471,
+    1233 col_1472,
+    1234 col_1473,
+    1235 col_1474,
+    1236 col_1476,
+    1237 col_1477,
+    1238 col_1478,
+    1239 col_1479,
+    1240 col_1480,
+    1241 col_1482,
+    1242 col_1483,
+    1243 col_1484,
+    1244 col_1485,
+    1245 col_1486,
+    1246 col_1487,
+    1247 col_1488,
+    1248 col_1489,
+    1249 col_1490,
+    1250 col_1491,
+    1251 col_1492,
+    1252 col_1493,
+    1253 col_1494,
+    1254 col_1495,
+    1255 col_1496,
+    1256 col_1497,
+    1257 col_1498,
+    1258 col_1499,
+    1259 col_1500,
+    1260 col_1501,
+    1261 col_1502,
+    1262 col_1503,
+    1263 col_1504,
+    1264 col_1505,
+    1265 col_1506,
+    1266 col_1507,
+    1267 col_1508,
+    1268 col_1509,
+    1269 col_1510,
+    1270 col_1511,
+    1271 col_1512,
+    1272 col_1513,
+    1273 col_1514,
+    1274 col_1515,
+    1275 col_1516,
+    1276 col_1517,
+    1277 col_1518,
+    1278 col_1519,
+    1279 col_1520,
+    1280 col_1521,
+    1281 col_1522,
+    1282 col_1523,
+    1283 col_1524,
+    1284 col_1525,
+    1285 col_1526,
+    1286 col_1527,
+    1287 col_1528,
+    1288 col_1529,
+    1289 col_1531,
+    1290 col_1533,
+    1291 col_1534,
+    1292 col_1535,
+    1293 col_1536,
+    1294 col_1537,
+    1295 col_1538,
+    1296 col_1539,
+    1297 col_1540,
+    1298 col_1541,
+    1299 col_1542,
+    1300 col_1543,
+    1301 col_1544,
+    1302 col_1545,
+    1303 col_1546,
+    1304 col_1547,
+    1305 col_1548,
+    1306 col_1549,
+    1307 col_1550,
+    1308 col_1551,
+    1309 col_1552,
+    1310 col_1553,
+    1311 col_1554,
+    1312 col_1555,
+    1313 col_1556,
+    1314 col_1557,
+    1315 col_1559,
+    1316 col_1560,
+    1317 col_1561,
+    1318 col_1562,
+    1319 col_1563,
+    1320 col_1564,
+    1321 col_1565,
+    1322 col_1566,
+    1323 col_1567,
+    1324 col_1568,
+    1325 col_1569,
+    1326 col_1570,
+    1327 col_1571,
+    1328 col_1572,
+    1329 col_1573,
+    1330 col_1574,
+    1331 col_1576,
+    1332 col_1577,
+    1333 col_1578,
+    1334 col_1579,
+    1335 col_1582,
+    1336 col_1584,
+    1337 col_1589,
+    1338 col_1590,
+    1339 col_1591,
+    1340 col_1592,
+    1341 col_1593,
+    1342 col_1594,
+    1343 col_1595,
+    1344 col_1596,
+    1345 col_1597,
+    1346 col_1598,
+    1347 col_1599,
+    1348 col_1600,
+    1349 col_1601,
+    1350 col_1602,
+    1351 col_1603,
+    1352 col_1604,
+    1353 col_1605,
+    1354 col_1606,
+    1355 col_1607,
+    1356 col_1608,
+    1357 col_1609,
+    1358 col_1610,
+    1359 col_1611,
+    1360 col_1612,
+    1361 col_1613,
+    1362 col_1614,
+    1363 col_1615,
+    1364 col_1616,
+    1365 col_1617,
+    1366 col_1618,
+    1367 col_1619,
+    1368 col_1620,
+    1369 col_1621,
+    1370 col_1622,
+    1371 col_1623,
+    1372 col_1624,
+    1373 col_1625,
+    1374 col_1626,
+    1375 col_1627,
+    1376 col_1628,
+    1377 col_1629,
+    1378 col_1630,
+    1379 col_1632,
+    1380 col_1633,
+    1381 col_1634,
+    1382 col_1635,
+    1383 col_1636,
+    1384 col_1637,
+    1385 col_1638,
+    1386 col_1639,
+    1387 col_1640,
+    1388 col_1641,
+    1389 col_1642,
+    1390 col_1644,
+    1391 col_1646,
+    1392 col_1647,
+    1393 col_1648,
+    1394 col_1649,
+    1395 col_1657,
+    1396 col_1658,
+    1397 col_1659,
+    1398 col_1661,
+    1399 col_1664,
+    1400 col_1667,
+    1401 col_1668,
+    1402 col_1669,
+    1403 col_1671,
+    1404 col_1672,
+    1405 col_1675,
+    1406 col_1677,
+    1407 col_1678,
+    1408 col_1679,
+    1409 col_1680,
+    1410 col_1682,
+    1411 col_1683,
+    1412 col_1685,
+    1413 col_1689,
+    1414 col_1690,
+    1415 col_1691,
+    1416 col_1692,
+    1417 col_1693,
+    1418 col_1694,
+    1419 col_1695,
+    1420 col_1696,
+    1421 col_1697,
+    1422 col_1698,
+    1423 col_1699,
+    1424 col_1700,
+    1425 col_1701,
+    1426 col_1702,
+    1427 col_1703,
+    1428 col_1704,
+    1429 col_1705,
+    1430 col_1706,
+    1431 col_1707,
+    1432 col_1708,
+    1433 col_1709,
+    1434 col_1710,
+    1435 col_1711,
+    1436 col_1712,
+    1437 col_1713,
+    1438 col_1714,
+    1439 col_1715,
+    1440 col_1716,
+    1441 col_1717,
+    1442 col_1718,
+    1443 col_1719,
+    1444 col_1720,
+    1445 col_1721,
+    1446 col_1722,
+    1447 col_1723,
+    1448 col_1724,
+    1449 col_1725,
+    1450 col_1726,
+    1451 col_1728,
+    1452 col_1732,
+    1453 col_1733,
+    1454 col_1734,
+    1455 col_1735,
+    1456 col_1736,
+    1457 col_1737,
+    1458 col_1738,
+    1459 col_1739,
+    1460 col_1740,
+    1461 col_1741,
+    1462 col_1742,
+    1463 col_1743,
+    1464 col_1744,
+    1465 col_1745,
+    1466 col_1747,
+    1467 col_1748,
+    1468 col_1750,
+    1469 col_1751,
+    1470 col_1752,
+    1471 col_1753,
+    1472 col_1754,
+    1473 col_1755,
+    1474 col_1756,
+    1475 col_1757,
+    1476 col_1758,
+    1477 col_1759,
+    1478 col_1760,
+    1479 col_1761,
+    1480 col_1762,
+    1481 col_1763,
+    1482 col_1764,
+    1483 col_1765,
+    1484 col_1766,
+    1485 col_1767,
+    1486 col_1770,
+    1487 col_1771,
+    1488 col_1772,
+    1489 col_1773,
+    1490 col_1774,
+    1491 col_1775,
+    1492 col_1776,
+    1493 col_1777,
+    1494 col_1779,
+    1495 col_1780,
+    1496 col_1781,
+    1497 col_1782,
+    1498 col_1783,
+    1499 col_1784,
+    1500 col_1785,
+    1501 col_1786,
+    1502 col_1787,
+    1503 col_1788,
+    1504 col_1789,
+    1505 col_1790,
+    1506 col_1791,
+    1507 col_1792,
+    1508 col_1795,
+    1509 col_1796,
+    1510 col_1797,
+    1511 col_1798,
+    1512 col_1799,
+    1513 col_1800,
+    1514 col_1801,
+    1515 col_1802,
+    1516 col_1803,
+    1517 col_1804,
+    1518 col_1805,
+    1519 col_1806,
+    1520 col_1807,
+    1521 col_1808,
+    1522 col_1809,
+    1523 col_1810,
+    1524 col_1811,
+    1525 col_1812,
+    1526 col_1813,
+    1527 col_1819,
+    1528 col_1820,
+    1529 col_1821,
+    1530 col_1822,
+    1531 col_1824,
+    1532 col_1825,
+    1533 col_1827,
+    1534 col_1828,
+    1535 col_1829,
+    1536 col_1832,
+    1537 col_1833,
+    1538 col_1834,
+    1539 col_1835,
+    1540 col_1836,
+    1541 col_1837,
+    1542 col_1838,
+    1543 col_1839,
+    1544 col_1840,
+    1545 col_1841,
+    1546 col_1842,
+    1547 col_1843,
+    1548 col_1844,
+    1549 col_1846,
+    1550 col_1847,
+    1551 col_1848,
+    1552 col_1849,
+    1553 col_1851,
+    1554 col_1852,
+    1555 col_1853,
+    1556 col_1854,
+    1557 col_1855,
+    1558 col_1859,
+    1559 col_1860,
+    1560 col_1861,
+    1561 col_1862,
+    1562 col_1863,
+    1563 col_1864,
+    1564 col_1865,
+    1565 col_1866,
+    1566 col_1867,
+    1567 col_1869,
+    1568 col_1870,
+    1569 col_1872,
+    1570 col_1873,
+    1571 col_1874,
+    1572 col_1875,
+    1573 col_1876,
+    1574 col_1877,
+    1575 col_1878,
+    1576 col_1879,
+    1577 col_1880,
+    1578 col_1881,
+    1579 col_1882,
+    1580 col_1883,
+    1581 col_1884,
+    1582 col_1885,
+    1583 col_1886,
+    1584 col_1887,
+    1585 col_1888,
+    1586 col_1889,
+    1587 col_1890,
+    1588 col_1891,
+    1589 col_1892,
+    1590 col_1895,
+    1591 col_1896,
+    1592 col_1897,
+    1593 col_1898,
+    1594 col_1899,
+    1595 col_1900,
+    1596 col_1901,
+    1597 col_1904,
+    1598 col_1905,
+    1599 col_1906,
+    1600 col_1907,
+    1601 col_1908,
+    1602 col_1909,
+    1603 col_1910,
+    1604 col_1911,
+    1605 col_1912,
+    1606 col_1913,
+    1607 col_1914,
+    1608 col_1915,
+    1609 col_1919,
+    1610 col_1920,
+    1611 col_1921,
+    1612 col_1922,
+    1613 col_1923,
+    1614 col_1924,
+    1615 col_1925,
+    1616 col_1926,
+    1617 col_1927,
+    1618 col_1928,
+    1619 col_1929,
+    1620 col_1930,
+    1621 col_1931,
+    1622 col_1932,
+    1623 col_1933,
+    1624 col_1934,
+    1625 col_1935,
+    1626 col_1936,
+    1627 col_1937,
+    1628 col_1938,
+    1629 col_1939,
+    1630 col_1941,
+    1631 col_1942,
+    1632 col_1943,
+    1633 col_1944,
+    1634 col_1945,
+    1635 col_1946,
+    1636 col_1947,
+    1637 col_1948,
+    1638 col_1949,
+    1639 col_1950,
+    1640 col_1951,
+    1641 col_1952,
+    1642 col_1953,
+    1643 col_1954,
+    1644 col_1955,
+    1645 col_1956,
+    1646 col_1957,
+    1647 col_1961,
+    1648 col_1962,
+    1649 col_1963,
+    1650 col_1964,
+    1651 col_1965,
+    1652 col_1966,
+    1653 col_1967,
+    1654 col_1968,
+    1655 col_1969,
+    1656 col_1973,
+    1657 col_1974,
+    1658 col_1975,
+    1659 col_1976,
+    1660 col_1979,
+    1661 col_1984,
+    1662 col_1985,
+    1663 col_1986,
+    1664 col_1987,
+    1665 col_1990,
+    1666 col_1992,
+    1667 col_1994,
+    1668 col_1995,
+    1669 col_1997,
+    1670 col_1998,
+    1671 col_1999,
+    1672 col_2000,
+    1673 col_2001,
+    1674 col_2002,
+    1675 col_2003,
+    1676 col_2004,
+    1677 col_2005,
+    1678 col_2006,
+    1679 col_2007,
+    1680 col_2008,
+    1681 col_2009,
+    1682 col_2010,
+    1683 col_2011,
+    1684 col_2012,
+    1685 col_2013,
+    1686 col_2014,
+    1687 col_2015,
+    1688 col_2016,
+    1689 col_2017,
+    1690 col_2018,
+    1691 col_2019,
+    1692 col_2020,
+    1693 col_2021,
+    1694 col_2022,
+    1695 col_2023,
+    1696 col_2026,
+    1697 col_2027,
+    1698 col_2028,
+    1699 col_2029,
+    1700 col_2030,
+    1701 col_2031,
+    1702 col_2032,
+    1703 col_2033,
+    1704 col_2034,
+    1705 col_2035,
+    1706 col_2036,
+    1707 col_2038,
+    1708 col_2039,
+    1709 col_2040,
+    1710 col_2041,
+    1711 col_2042,
+    1712 col_2043,
+    1713 col_2044,
+    1714 col_2045,
+    1715 col_2046,
+    1716 col_2047,
+    1717 col_2048,
+    1718 col_2049,
+    1719 col_2050,
+    1720 col_2051,
+    1721 col_2052,
+    1722 col_2053,
+    1723 col_2054,
+    1724 col_2055,
+    1725 col_2056,
+    1726 col_2057,
+    1727 col_2058,
+    1728 col_2059,
+    1729 col_2060,
+    1730 col_2061,
+    1731 col_2062,
+    1732 col_2063,
+    1733 col_2064,
+    1734 col_2065,
+    1735 col_2066,
+    1736 col_2067,
+    1737 col_2068,
+    1738 col_2069,
+    1739 col_2070,
+    1740 col_2071,
+    1741 col_2072,
+    1742 col_2073,
+    1743 col_2074,
+    1744 col_2075,
+    1745 col_2076,
+    1746 col_2077,
+    1747 col_2078,
+    1748 col_2079,
+    1749 col_2082,
+    1750 col_2085,
+    1751 col_2086,
+    1752 col_2087,
+    1753 col_2088,
+    1754 col_2089,
+    1755 col_2091,
+    1756 col_2092,
+    1757 col_2093,
+    1758 col_2094,
+    1759 col_2095,
+    1760 col_2096,
+    1761 col_2097,
+    1762 col_2098,
+    1763 col_2099,
+    1764 col_2100,
+    1765 col_2101,
+    1766 col_2102,
+    1767 col_2103,
+    1768 col_2104,
+    1769 col_2105,
+    1770 col_2106,
+    1771 col_2108,
+    1772 col_2109,
+    1773 col_2116,
+    1774 col_2117,
+    1775 col_2118,
+    1776 col_2119,
+    1777 col_2120,
+    1778 col_2121,
+    1779 col_2122,
+    1780 col_2123,
+    1781 col_2124,
+    1782 col_2125,
+    1783 col_2126,
+    1784 col_2127,
+    1785 col_2128,
+    1786 col_2129,
+    1787 col_2130,
+    1788 col_2131,
+    1789 col_2132,
+    1790 col_2133,
+    1791 col_2134,
+    1792 col_2135,
+    1793 col_2136,
+    1794 col_2137,
+    1795 col_2138,
+    1796 col_2139,
+    1797 col_2140,
+    1798 col_2141,
+    1799 col_2142,
+    1800 col_2143,
+    1801 col_2144,
+    1802 col_2145,
+    1803 col_2146,
+    1804 col_2147,
+    1805 col_2148,
+    1806 col_2149,
+    1807 col_2150,
+    1808 col_2151,
+    1809 col_2152,
+    1810 col_2153,
+    1811 col_2154,
+    1812 col_2155,
+    1813 col_2157,
+    1814 col_2158,
+    1815 col_2159,
+    1816 col_2160,
+    1817 col_2161,
+    1818 col_2162,
+    1819 col_2163,
+    1820 col_2164,
+    1821 col_2165,
+    1822 col_2166,
+    1823 col_2167,
+    1824 col_2168,
+    1825 col_2169,
+    1826 col_2170,
+    1827 col_2173,
+    1828 col_2174,
+    1829 col_2175,
+    1830 col_2177,
+    1831 col_2178,
+    1832 col_2179,
+    1833 col_2181,
+    1834 col_2182,
+    1835 col_2183,
+    1836 col_2184,
+    1837 col_2187,
+    1838 col_2188,
+    1839 col_2189,
+    1840 col_2190,
+    1841 col_2191,
+    1842 col_2192,
+    1843 col_2193,
+    1844 col_2194,
+    1845 col_2195,
+    1846 col_2196,
+    1847 col_2197,
+    1848 col_2201,
+    1849 col_2202,
+    1850 col_2203,
+    1851 col_2206,
+    1852 col_2208,
+    1853 col_2210,
+    1854 col_2211,
+    1855 col_2212,
+    1856 col_2213,
+    1857 col_2216,
+    1858 col_2217,
+    1859 col_2218,
+    1860 col_2219,
+    1861 col_2220,
+    1862 col_2221,
+    1863 col_2222,
+    1864 col_2223,
+    1865 col_2224,
+    1866 col_2225,
+    1867 col_2226,
+    1868 col_2227,
+    1869 col_2228,
+    1870 col_2230,
+    1871 col_2231,
+    1872 col_2232,
+    1873 col_2233,
+    1874 col_2234,
+    1875 col_2237,
+    1876 col_2238,
+    1877 col_2239,
+    1878 col_2240,
+    1879 col_2241,
+    1880 col_2242,
+    1881 col_2243,
+    1882 col_2244,
+    1883 col_2245,
+    1884 col_2246,
+    1885 col_2247,
+    1886 col_2248,
+    1887 col_2249,
+    1888 col_2250,
+    1889 col_2251,
+    1890 col_2252,
+    1891 col_2256,
+    1892 col_2259,
+    1893 col_2260,
+    1894 col_2261,
+    1895 col_2262,
+    1896 col_2263,
+    1897 col_2264,
+    1898 col_2265,
+    1899 col_2266,
+    1900 col_2270,
+    1901 col_2271,
+    1902 col_2272,
+    1903 col_2274,
+    1904 col_2275,
+    1905 col_2276,
+    1906 col_2277,
+    1907 col_2278,
+    1908 col_2279,
+    1909 col_2280,
+    1910 col_2281,
+    1911 col_2282,
+    1912 col_2283,
+    1913 col_2284,
+    1914 col_2285,
+    1915 col_2287,
+    1916 col_2288,
+    1917 col_2289,
+    1918 col_2290,
+    1919 col_2291,
+    1920 col_2292,
+    1921 col_2293,
+    1922 col_2294,
+    1923 col_2296,
+    1924 col_2297,
+    1925 col_2298,
+    1926 col_2299,
+    1927 col_2300,
+    1928 col_2301,
+    1929 col_2302,
+    1930 col_2303,
+    1931 col_2304,
+    1932 col_2305,
+    1933 col_2306,
+    1934 col_2307,
+    1935 col_2308,
+    1936 col_2309,
+    1937 col_2310,
+    1938 col_2311,
+    1939 col_2312,
+    1940 col_2313,
+    1941 col_2314,
+    1942 col_2315,
+    1943 col_2316,
+    1944 col_2317,
+    1945 col_2318,
+    1946 col_2319,
+    1947 col_2320,
+    1948 col_2321,
+    1949 col_2322,
+    1950 col_2323,
+    1951 col_2324,
+    1952 col_2325,
+    1953 col_2326,
+    1954 col_2327,
+    1955 col_2328,
+    1956 col_2329,
+    1957 col_2330,
+    1958 col_2331,
+    1959 col_2332,
+    1960 col_2333,
+    1961 col_2334,
+    1962 col_2335,
+    1963 col_2336,
+    1964 col_2337,
+    1965 col_2338,
+    1966 col_2339,
+    1967 col_2340,
+    1968 col_2341,
+    1969 col_2342,
+    1970 col_2343,
+    1971 col_2344,
+    1972 col_2345,
+    1973 col_2346,
+    1974 col_2347,
+    1975 col_2348,
+    1976 col_2349,
+    1977 col_2350,
+    1978 col_2351,
+    1979 col_2352,
+    1980 col_2353,
+    1981 col_2354,
+    1982 col_2355,
+    1983 col_2356,
+    1984 col_2357,
+    1985 col_2358,
+    1986 col_2359,
+    1987 col_2360,
+    1988 col_2363,
+    1989 col_2364,
+    1990 col_2365,
+    1991 col_2366,
+    1992 col_2367,
+    1993 col_2368,
+    1994 col_2369,
+    1995 col_2370,
+    1996 col_2371,
+    1997 col_2372,
+    1998 col_2373,
+    1999 col_2374,
+    2000 col_2375,
+    2001 col_2376,
+    2002 col_2377,
+    2003 col_2378,
+    2004 col_2379,
+    2005 col_2380,
+    2006 col_2381,
+    2007 col_2382,
+    2008 col_2386,
+    2009 col_2387,
+    2010 col_2388,
+    2011 col_2389,
+    2012 col_2390,
+    2013 col_2391,
+    2014 col_2392,
+    2015 col_2394,
+    2016 col_2395,
+    2017 col_2396,
+    2018 col_2400,
+    2019 col_2402,
+    2020 col_2403,
+    2021 col_2405,
+    2022 col_2406,
+    2023 col_2408,
+    2024 col_2409,
+    2025 col_2410,
+    2026 col_2411,
+    2027 col_2412,
+    2028 col_2413,
+    2029 col_2414,
+    2030 col_2415,
+    2031 col_2416,
+    2032 col_2417,
+    2033 col_2418,
+    2034 col_2421,
+    2035 col_2422,
+    2036 col_2423,
+    2037 col_2424,
+    2038 col_2425,
+    2039 col_2426,
+    2040 col_2427,
+    2041 col_2429,
+    2042 col_2432,
+    2043 col_2435,
+    2044 col_2437,
+    2045 col_2438,
+    2046 col_2439,
+    2047 col_2440,
+    2048 col_2441,
+    2049 col_2442,
+    2050 col_2443,
+    2051 col_2444,
+    2052 col_2445,
+    2053 col_2447,
+    2054 col_2448,
+    2055 col_2450,
+    2056 col_2451,
+    2057 col_2452,
+    2058 col_2453,
+    2059 col_2454,
+    2060 col_2455,
+    2061 col_2456,
+    2062 col_2457,
+    2063 col_2462,
+    2064 col_2463,
+    2065 col_2464,
+    2066 col_2465,
+    2067 col_2466,
+    2068 col_2467,
+    2069 col_2468,
+    2070 col_2469,
+    2071 col_2470,
+    2072 col_2471,
+    2073 col_2472,
+    2074 col_2473,
+    2075 col_2474,
+    2076 col_2475,
+    2077 col_2476,
+    2078 col_2477,
+    2079 col_2478,
+    2080 col_2479,
+    2081 col_2480,
+    2082 col_2481,
+    2083 col_2482,
+    2084 col_2483,
+    2085 col_2484,
+    2086 col_2485,
+    2087 col_2486,
+    2088 col_2487,
+    2089 col_2489,
+    2090 col_2490,
+    2091 col_2491,
+    2092 col_2492,
+    2093 col_2493,
+    2094 col_2494,
+    2095 col_2495,
+    2096 col_2496,
+    2097 col_2497,
+    2098 col_2498,
+    2099 col_2499,
+    2100 col_2500,
+    2101 col_2501,
+    2102 col_2503,
+    2103 col_2504,
+    2104 col_2505,
+    2105 col_2506,
+    2106 col_2507,
+    2107 col_2508,
+    2108 col_2509,
+    2109 col_2510,
+    2110 col_2511,
+    2111 col_2512,
+    2112 col_2513,
+    2113 col_2514,
+    2114 col_2515,
+    2115 col_2517,
+    2116 col_2518,
+    2117 col_2519,
+    2118 col_2520,
+    2119 col_2522,
+    2120 col_2524,
+    2121 col_2526,
+    2122 col_2527,
+    2123 col_2530,
+    2124 col_2531,
+    2125 col_2532,
+    2126 col_2533,
+    2127 col_2534,
+    2128 col_2535,
+    2129 col_2536,
+    2130 col_2537,
+    2131 col_2539,
+    2132 col_2540,
+    2133 col_2541,
+    2134 col_2543,
+    2135 col_2544,
+    2136 col_2545,
+    2137 col_2546,
+    2138 col_2547,
+    2139 col_2548,
+    2140 col_2549,
+    2141 col_2550,
+    2142 col_2551,
+    2143 col_2552,
+    2144 col_2553,
+    2145 col_2554,
+    2146 col_2555,
+    2147 col_2556,
+    2148 col_2557,
+    2149 col_2558,
+    2150 col_2559,
+    2151 col_2560,
+    2152 col_2561,
+    2153 col_2562,
+    2154 col_2563,
+    2155 col_2564,
+    2156 col_2565,
+    2157 col_2566,
+    2158 col_2567,
+    2159 col_2568,
+    2160 col_2569,
+    2161 col_2570,
+    2162 col_2571,
+    2163 col_2572,
+    2164 col_2573,
+    2165 col_2574,
+    2166 col_2577,
+    2167 col_2578,
+    2168 col_2579,
+    2169 col_2580,
+    2170 col_2581,
+    2171 col_2582,
+    2172 col_2584,
+    2173 col_2585,
+    2174 col_2586,
+    2175 col_2587,
+    2176 col_2588,
+    2177 col_2589,
+    2178 col_2590,
+    2179 col_2591,
+    2180 col_2592,
+    2181 col_2593,
+    2182 col_2594,
+    2183 col_2595,
+    2184 col_2596,
+    2185 col_2597,
+    2186 col_2598,
+    2187 col_2599,
+    2188 col_2600,
+    2189 col_2601,
+    2190 col_2602,
+    2191 col_2603,
+    2192 col_2604,
+    2193 col_2605,
+    2194 col_2606,
+    2195 col_2607,
+    2196 col_2608,
+    2197 col_2610,
+    2198 col_2611,
+    2199 col_2612,
+    2200 col_2613,
+    2201 col_2614,
+    2202 col_2615,
+    2203 col_2616,
+    2204 col_2617,
+    2205 col_2618,
+    2206 col_2619,
+    2207 col_2620,
+    2208 col_2621,
+    2209 col_2623,
+    2210 col_2624,
+    2211 col_2625,
+    2212 col_2626,
+    2213 col_2627,
+    2214 col_2628,
+    2215 col_2629,
+    2216 col_2630,
+    2217 col_2632,
+    2218 col_2633,
+    2219 col_2634,
+    2220 col_2635,
+    2221 col_2636,
+    2222 col_2637,
+    2223 col_2638,
+    2224 col_2639,
+    2225 col_2640,
+    2226 col_2641,
+    2227 col_2642,
+    2228 col_2643,
+    2229 col_2644,
+    2230 col_2645,
+    2231 col_2646,
+    2232 col_2647,
+    2233 col_2648,
+    2234 col_2649,
+    2235 col_2650,
+    2236 col_2651,
+    2237 col_2652,
+    2238 col_2653,
+    2239 col_2654,
+    2240 col_2655,
+    2241 col_2656,
+    2242 col_2657,
+    2243 col_2658,
+    2244 col_2659,
+    2245 col_2660,
+    2246 col_2661,
+    2247 col_2662,
+    2248 col_2663,
+    2249 col_2664,
+    2250 col_2665,
+    2251 col_2666,
+    2252 col_2667,
+    2253 col_2668,
+    2254 col_2669,
+    2255 col_2670,
+    2256 col_2671,
+    2257 col_2672,
+    2258 col_2673,
+    2259 col_2674,
+    2260 col_2675,
+    2261 col_2676,
+    2262 col_2677,
+    2263 col_2678,
+    2264 col_2679,
+    2265 col_2680,
+    2266 col_2681,
+    2267 col_2682,
+    2268 col_2683,
+    2269 col_2684,
+    2270 col_2685,
+    2271 col_2686,
+    2272 col_2687,
+    2273 col_2688,
+    2274 col_2689,
+    2275 col_2690,
+    2276 col_2691,
+    2277 col_2692,
+    2278 col_2693,
+    2279 col_2694,
+    2280 col_2695,
+    2281 col_2696,
+    2282 col_2697,
+    2283 col_2698,
+    2284 col_2699,
+    2285 col_2700,
+    2286 col_2701,
+    2287 col_2702,
+    2288 col_2703,
+    2289 col_2704,
+    2290 col_2705,
+    2291 col_2706,
+    2292 col_2707,
+    2293 col_2708,
+    2294 col_2709,
+    2295 col_2710,
+    2296 col_2712,
+    2297 col_2713,
+    2298 col_2714,
+    2299 col_2715,
+    2300 col_2716,
+    2301 col_2717,
+    2302 col_2718,
+    2303 col_2719,
+    2304 col_2720,
+    2305 col_2721,
+    2306 col_2722,
+    2307 col_2723,
+    2308 col_2724,
+    2309 col_2725,
+    2310 col_2726,
+    2311 col_2727,
+    2312 col_2728,
+    2313 col_2729,
+    2314 col_2730,
+    2315 col_2731,
+    2316 col_2732,
+    2317 col_2735,
+    2318 col_2737,
+    2319 col_2738,
+    2320 col_2739,
+    2321 col_2740,
+    2322 col_2741,
+    2323 col_2742,
+    2324 col_2743,
+    2325 col_2744,
+    2326 col_2745,
+    2327 col_2746,
+    2328 col_2747,
+    2329 col_2748,
+    2330 col_2749,
+    2331 col_2750,
+    2332 col_2751,
+    2333 col_2752,
+    2334 col_2758,
+    2335 col_2759,
+    2336 col_2760,
+    2337 col_2761,
+    2338 col_2762,
+    2339 col_2763,
+    2340 col_2764,
+    2341 col_2765,
+    2342 col_2766,
+    2343 col_2767,
+    2344 col_2768,
+    2345 col_2769,
+    2346 col_2770,
+    2347 col_2771,
+    2348 col_2772,
+    2349 col_2773,
+    2350 col_2774,
+    2351 col_2775,
+    2352 col_2776,
+    2353 col_2777,
+    2354 col_2779,
+    2355 col_2780,
+    2356 col_2782,
+    2357 col_2783,
+    2358 col_2784,
+    2359 col_2785,
+    2360 col_2787,
+    2361 col_2788,
+    2362 col_2789,
+    2363 col_2790,
+    2364 col_2791,
+    2365 col_2792,
+    2366 col_2793,
+    2367 col_2794,
+    2368 col_2795,
+    2369 col_2796,
+    2370 col_2797,
+    2371 col_2798,
+    2372 col_2799,
+    2373 col_2800,
+    2374 col_2803,
+    2375 col_2804,
+    2376 col_2805,
+    2377 col_2806,
+    2378 col_2807,
+    2379 col_2808,
+    2380 col_2809,
+    2381 col_2810,
+    2382 col_2811,
+    2383 col_2812,
+    2384 col_2813,
+    2385 col_2814,
+    2386 col_2815,
+    2387 col_2816,
+    2388 col_2817,
+    2389 col_2818,
+    2390 col_2819,
+    2391 col_2820,
+    2392 col_2821,
+    2393 col_2822,
+    2394 col_2823,
+    2395 col_2824,
+    2396 col_2825,
+    2397 col_2826,
+    2398 col_2827,
+    2399 col_2828,
+    2400 col_2829,
+    2401 col_2830,
+    2402 col_2831,
+    2403 col_2832,
+    2404 col_2833,
+    2405 col_2834,
+    2406 col_2835,
+    2407 col_2836,
+    2408 col_2837,
+    2409 col_2838,
+    2410 col_2839,
+    2411 col_2840,
+    2412 col_2841,
+    2413 col_2842,
+    2414 col_2843,
+    2415 col_2844,
+    2416 col_2845,
+    2417 col_2846,
+    2418 col_2848,
+    2419 col_2849,
+    2420 col_2855,
+    2421 col_2856,
+    2422 col_2857,
+    2423 col_2859,
+    2424 col_2860,
+    2425 col_2861,
+    2426 col_2862,
+    2427 col_2863,
+    2428 col_2864,
+    2429 col_2865,
+    2430 col_2866,
+    2431 col_2867,
+    2432 col_2868,
+    2433 col_2869,
+    2434 col_2870,
+    2435 col_2871,
+    2436 col_2872,
+    2437 col_2873,
+    2438 col_2874,
+    2439 col_2875,
+    2440 col_2876,
+    2441 col_2877,
+    2442 col_2878,
+    2443 col_2879,
+    2444 col_2880,
+    2445 col_2881,
+    2446 col_2882,
+    2447 col_2883,
+    2448 col_2884,
+    2449 col_2885,
+    2450 col_2886,
+    2451 col_2887,
+    2452 col_2888,
+    2453 col_2889,
+    2454 col_2890,
+    2455 col_2891,
+    2456 col_2892,
+    2457 col_2893,
+    2458 col_2894,
+    2459 col_2895,
+    2460 col_2896,
+    2461 col_2897,
+    2462 col_2898,
+    2463 col_2899,
+    2464 col_2900,
+    2465 col_2901,
+    2466 col_2902,
+    2467 col_2903,
+    2468 col_2904,
+    2469 col_2905,
+    2470 col_2906,
+    2471 col_2908,
+    2472 col_2909,
+    2473 col_2913,
+    2474 col_2914,
+    2475 col_2915,
+    2476 col_2916,
+    2477 col_2920,
+    2478 col_2921,
+    2479 col_2922,
+    2480 col_2923,
+    2481 col_2924,
+    2482 col_2925,
+    2483 col_2926,
+    2484 col_2927,
+    2485 col_2928,
+    2486 col_2929,
+    2487 col_2930,
+    2488 col_2931,
+    2489 col_2932,
+    2490 col_2933,
+    2491 col_2934,
+    2492 col_2935,
+    2493 col_2936,
+    2494 col_2937,
+    2495 col_2938,
+    2496 col_2939,
+    2497 col_2940,
+    2498 col_2941,
+    2499 col_2942,
+    2500 col_2943,
+    2501 col_2944,
+    2502 col_2945,
+    2503 col_2946,
+    2504 col_2947,
+    2505 col_2948,
+    2506 col_2949,
+    2507 col_2950,
+    2508 col_2951,
+    2509 col_2952,
+    2510 col_2953,
+    2511 col_2954,
+    2512 col_2955,
+    2513 col_2956,
+    2514 col_2957,
+    2515 col_2958,
+    2516 col_2959,
+    2517 col_2960,
+    2518 col_2961,
+    2519 col_2962,
+    2520 col_2963,
+    2521 col_2964,
+    2522 col_2965,
+    2523 col_2966,
+    2524 col_2967,
+    2525 col_2968,
+    2526 col_2969,
+    2527 col_2970,
+    2528 col_2971,
+    2529 col_2972,
+    2530 col_2973,
+    2531 col_2974,
+    2532 col_2976,
+    2533 col_2979,
+    2534 col_2980,
+    2535 col_2982,
+    2536 col_2983,
+    2537 col_2986,
+    2538 col_2987,
+    2539 col_2988,
+    2540 col_2989,
+    2541 col_2990,
+    2542 col_2991,
+    2543 col_2992,
+    2544 col_2993,
+    2545 col_2994,
+    2546 col_2995,
+    2547 col_2996,
+    2548 col_2997,
+    2549 col_2998,
+    2550 col_2999,
+    2551 col_3000,
+    2552 col_3001,
+    2553 col_3002,
+    2554 col_3003,
+    2555 col_3004,
+    2556 col_3005,
+    2557 col_3006,
+    2558 col_3007,
+    2559 col_3008,
+    2560 col_3009,
+    2561 col_3010,
+    2562 col_3011,
+    2563 col_3013,
+    2564 col_3017,
+    2565 col_3018,
+    2566 col_3019,
+    2567 col_3020,
+    2568 col_3021,
+    2569 col_3022,
+    2570 col_3023,
+    2571 col_3024,
+    2572 col_3025,
+    2573 col_3026,
+    2574 col_3027,
+    2575 col_3028,
+    2576 col_3029,
+    2577 col_3030,
+    2578 col_3031,
+    2579 col_3032,
+    2580 col_3033,
+    2581 col_3034,
+    2582 col_3035,
+    2583 col_3036,
+    2584 col_3037,
+    2585 col_3038,
+    2586 col_3040,
+    2587 col_3041,
+    2588 col_3042,
+    2589 col_3043,
+    2590 col_3044,
+    2591 col_3045,
+    2592 col_3046,
+    2593 col_3047,
+    2594 col_3048,
+    2595 col_3049,
+    2596 col_3050,
+    2597 col_3051,
+    2598 col_3052,
+    2599 col_3053,
+    2600 col_3054,
+    2601 col_3055,
+    2602 col_3056,
+    2603 col_3057,
+    2604 col_3058,
+    2605 col_3059,
+    2606 col_3060,
+    2607 col_3061,
+    2608 col_3062,
+    2609 col_3063,
+    2610 col_3064,
+    2611 col_3065,
+    2612 col_3066,
+    2613 col_3069,
+    2614 col_3070,
+    2615 col_3071,
+    2616 col_3072,
+    2617 col_3073,
+    2618 col_3074,
+    2619 col_3075,
+    2620 col_3077,
+    2621 col_3078,
+    2622 col_3079,
+    2623 col_3080,
+    2624 col_3083,
+    2625 col_3084,
+    2626 col_3085,
+    2627 col_3086,
+    2628 col_3087,
+    2629 col_3088,
+    2630 col_3089,
+    2631 col_3090,
+    2632 col_3091,
+    2633 col_3092,
+    2634 col_3093,
+    2635 col_3094,
+    2636 col_3095,
+    2637 col_3096,
+    2638 col_3097,
+    2639 col_3098,
+    2640 col_3099,
+    2641 col_3100,
+    2642 col_3101,
+    2643 col_3103,
+    2644 col_3104,
+    2645 col_3105,
+    2646 col_3106,
+    2647 col_3108,
+    2648 col_3109,
+    2649 col_3113,
+    2650 col_3114,
+    2651 col_3115,
+    2652 col_3116,
+    2653 col_3117,
+    2654 col_3118,
+    2655 col_3119,
+    2656 col_3120,
+    2657 col_3121,
+    2658 col_3122,
+    2659 col_3123,
+    2660 col_3124,
+    2661 col_3125,
+    2662 col_3126,
+    2663 col_3127,
+    2664 col_3129,
+    2665 col_3130,
+    2666 col_3131,
+    2667 col_3134,
+    2668 col_3135,
+    2669 col_3136,
+    2670 col_3137,
+    2671 col_3138,
+    2672 col_3139,
+    2673 col_3140,
+    2674 col_3141,
+    2675 col_3142,
+    2676 col_3143,
+    2677 col_3144,
+    2678 col_3145,
+    2679 col_3146,
+    2680 col_3147,
+    2681 col_3148,
+    2682 col_3149,
+    2683 col_3150,
+    2684 col_3151,
+    2685 col_3152,
+    2686 col_3153,
+    2687 col_3154,
+    2688 col_3155,
+    2689 col_3156,
+    2690 col_3159,
+    2691 col_3160,
+    2692 col_3161,
+    2693 col_3162,
+    2694 col_3163,
+    2695 col_3164,
+    2696 col_3165,
+    2697 col_3166,
+    2698 col_3167,
+    2699 col_3168,
+    2700 col_3169,
+    2701 col_3170,
+    2702 col_3171,
+    2703 col_3172,
+    2704 col_3173,
+    2705 col_3174,
+    2706 col_3176,
+    2707 col_3177,
+    2708 col_3178,
+    2709 col_3179,
+    2710 col_3180,
+    2711 col_3184,
+    2712 col_3188,
+    2713 col_3191,
+    2714 col_3196,
+    2715 col_3197,
+    2716 col_3198,
+    2717 col_3199,
+    2718 col_3200,
+    2719 col_3201,
+    2720 col_3202,
+    2721 col_3205,
+    2722 col_3206,
+    2723 col_3208 ;
+Format Datatype = Standard Symbols="01" missing = '?' ;
+Matrix
+temporariaDMH84R1             111011111010011110110000000001111111001000101101111110000000000000011011111111001110111001101111011001100010000000000000000101000000000111101111001111111100000011111111000011011101100111000110000000000001111111110111111111100011111111101110000000000101111011011111110001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000111111100111101111111111010000000000000000000010111111101111110000011110111111110001001110111111 [...]
+boyliiMVZ148929               111011111010011110110000000001111111000000000001111110000000000000001011111111001110111001101111011001111010000000000000000101000000000111101111001111111100000011111111000011011101100111000111000000000101111001110111110000000011111111101110000000000101111110011111100001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000011111100111101111111111010000000000000000000010111101101111110000011110111111110001001110111111 [...]
+luteiventris_MT_MVZ191016     111011111010011110110000000001111111000000000001111110000000000000011011111111001110111001101111011001111010000000000000000101000000000111101111001111111100000011111110000011011101100111000111000000000101111111110111110000000011111111101010000000000000001011011111110001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000111111100111101111111111010000000000000000000010111111101111110000011110111111110001001110111111 [...]
+luteiventris_WA_MVZ225749     111011111010011110110000000001111111000000000001111110000000000000011011111111001110111001101111011001111010000000000000000101000000000111101111001111111100000011111110000011011101100111000111000000000101111111110111110000000011111111101010000000000000001011011111110001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000111111100111101111111111010000000000000000000010111111101111110000011110111111110001001110111111 [...]
+muscosaMVZ149006              111011111010011110110000000001111111001000101101111110000000000000011011111111001110111001101111011001111010000000000000000000000000000111101111001111111100000011111111000011011101100111000111000000000101111111110111110000000011111111101110000000000101111011011111110001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000111111100001101111111111010000000000000000000010111111101111110000011110111111110001001110000111 [...]
+auroraMVZ13957                011011111010011110110000000001111111001000101101111110000000000000011011111111001110111001101111011001111010000000000000000101000000000111101111001111111100000011111111000011011101100111000111000000000101111111110111110000000011111111101110000000000101111011011111110001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000111111100001101111111011010000000000000000000010111111101111110000011110111111110001001110000111 [...]
+cascadaeMVZ148946             111011111010011110110000000001111111001000101101111110000000000000011011111111001110111001101111011001111010000000000000000101000000000111101111001111111100000011111111000011011101100111000111000000000101111111110111110000000011111111101110000000000101111011011111110001100000001000011110011000000001000001010001110011111110000000111111111100100000000110010000000000111111100001101111111011010000000000000000000010111111101111110000011110111111110001001110000111 [...]
+sylvaticaMVZ137426            111011111010011110110000000001111111001000101101111000000000000000011011100000000110111000000000000000111010000000000000000101000000000111101111001111111100000000000011000001011101100111000111111110010101111111110111110000000011111111111110000000000101111011011111110001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000111111100111100111111111010011000000000010111010111000000000110000011110111111111011111110100111 [...]
+sylvaticaDMH84R43             111011111010011110110000000001111111001000101101111000000000000000011011100000000110111000000000000000111010000000000000000101000000000111101111001111111100000000000011000001011101100111000111111110010101111111110111110000000011111111111110000000000101111011011111110001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000111111100111100111111111010011000000000010111010111000000000110000011110111111111011111110100111 [...]
+septentrionalesDCC3588        111111100011011110110000000001111111001000101101111110000000000000011011100000000110111001111111111111111010000000000000000101000000000111101111001111111100000000000011000011011100000111000111111110010101111111110111110000000011111111101110000000000101111011011111110001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000111111100111100111111111010011000000000010111010111011101110110000111110111111111011001110111111 [...]
+grylioMVZ175945               111111100011011110110000000001111111001000101101111110000000000000011011100000000110111001111111111001111010000000000000000101000000000111101111001111111110000000000011000011011100000111000111111110010101111111110111110000000011111111101110000000000101111011011111110001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000111111100111100111111111010011000000000010111010111011101110110000011110111111111011001110111111 [...]
+okaloosae                     111111100011011110110000000001111111001000101101111110000000000000011011100000000110111001111111111001111010000000000000000101000000000111101111001111111100000000000011000011011100000111000111111110010101111111110111110000000011111111101110000000000101111011011111110001100000001111111110011000000001000000000001110011111110000000111111111100100000000110010000000000111111100111100111111111010011000000000010111010111011101110110000011110111111111011001110111111 [...]
+clamitansJSF1118              111111100011011110110000000001111111001000101101111110000000000000011011100000000110111001111111111001111010000000000000000101000000000111101111001111111100000000000011000011011100000111000111111110010101111111110111110000000011111111101110000000000101111011011111110001100000001111111110011000000001000000000001110011111110000000111111111100100000000110010000000000111111100111100111111111010011000000000010111010111011101110110000011110111111111011001110111111 [...]
+heckscheriMVZ164908           111111100011011110110000000001111111001000101101111110000000000000011011100000000110111001111111111001111010000000000000000101000000000111101111001111111100000000000011000011011100000111000111111110010101111111110111110000000011111111101110000000000101111011010011110001100000001111111110011000000001000000000001110011111110000000111111111100100000000110010000000000111111100111100111111111010011000000000010111010111011101110110000011110111111111011001110111111 [...]
+catesbianaX12841              111111100011011110110000000001111111001000101101101110000000000000011011100000000110111001111111111001111010000000000000000101000000000111101111001111111100000000000011000011011100000111000111111110010101111111110111110000000011111111101110000000000101111011011111110001100000001111111110011000000001000000000001110011111110000000111111111100100000000110010000000000111111100111100111111111010011000000000010111010111011101110110000011110111111111011001110111111 [...]
+catesbianaDMH84R2             111111100011011110110000000001111111001000101101101110000000000000011011100000000110111001111111111001111010000000000000000101000000000111101111001111111100000000000011000011011100000111000111111110010101111111110111110000000011111111101110000000000101111011011111110001100000001111111110011000000001000000000001110011111110000000111111111100100000000110010000000000111111100111100111111111010011000000000010111010111011101110110000011110111111111011001110111111 [...]
+virgatipesMVZ175944           111111111011011110110000000001111011001000101101111110000000000000011011100000000110111001111111111001111010000000000000000101000000000111101111001111111100000000000011000111011100000111000111111110010101111111110110000000000000011111101110000000000101111011011111110001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000111111100111100111111111010011000000000010111010111011101110110000011110111111111011001110111111 [...]
+maculataKU195258              111011111010011110110000000001111111001000101101111110000000110110011011111111001110001001101111011001111010000000000000000101000000000111101111001111111100001000000011110011000101100111000111111110010101111111110111110000000011111111101110000000000101111011011111111101100000001111111110011000000000000001010001110011111110000000111111111100100000000110010000000000100111110111100111110111010011000000000010111010111111101110110000011110111111111011001110111111 [...]
+vibicariaMVZ11035             111010000000000000110000000001111111001000101101100000000000110110011011111111001110001111111111011001111010000000010000000101000000000110000000000000111100000100000011000011000101100111000111111110011101111111110111110000000011101111101110000000000101111011011000000000100000001111011110011000000000000001010001110011111110000000111111111100100000000110011111111100100111100111110111111111010011000000000010111010111111101110110000011110100000000010001110111111 [...]
+warszewitshiiJSF1127          111011111000011110110000000001101111001000101101100010000000110100001011011111001110001001111111011001111010000000000000000101000000000000000000000000000000000100000011000011000101100111000111111110011101111111110111110000011111100000101110000000000101011011011110000000011110001110000000000000000000000001010001110011111111111111111111011100100000000100010000000000100111100111100111111111010011000000000010111010111111111110110000011110100000000011001110111111 [...]
+palmipesVenAMNHA118801        111011111010011110110000000001111111001000101101111110000111111110011011111111001110111001111111011001111010000000000000000101000000000111101111001111111100000000000011000011000101100111000111111110010101111111110111110000000011111111101110000000000101101011011111110001100000000111111110001000000001000001010000000001111110000000111111111100100000000110000000000000000000100111100111111111010011000000000010111010110111101110110000011110111111111011001110111111 [...]
+palmipesEcuKU204425           111011111010011110110000000001111111001000101101111110000111111110011011111111001110111001111111011001111010000000000000000101000000000111101111001111111100000000000011000011000101100111000111111110010101111111110111110000000011111111101110000000000101101011011111110001100000000111111110011000000001000001010000000001111110000000111111111100100000000110010000000000100111100111100111111111010011000000000010111010110111101110110000011110111111111011001110111111 [...]
+Sp_1_ecuadorQCAZ13219         111011111010011110110000000001111111001000101101111110000000111110011011111111001110111001111111011001111010000000000000000101000000000111101111001111111100000000000011000011000101111111000111111110010101111111110111110000000011111111101110000000000101101011011111110001100000000111111110011000000001000001010000000001111110000000111111111100100000000110010000000000100111100111100111111111010011000000000010111010111111101110110000011110111111110011001110111111 [...]
+bwanaQCAZ13964                111011111010011110110000000001111111001000101101111110000000111110011011100000001110111001111111011001111010000000000000000101000000000111101111001100111100000000000011001011000101100111000111111110010101111111110111110000000011111111101110000000000101101011011111110001100000000111111110011000000001000001010000000001000110000000111101111100100000000110010000000000100111100111100111111111010011000000000010111010111111101110110000011110111111111011001110111111 [...]
+vaillantiKU195299             000000001010011110110000000001110101001000101101111110000000110110011011111111001110111001111111010000111010000000000000000111000000000111101111001111111100000000000011000011000101100111000111111110010101111111110111110000000011111111101100000000000101111011011111110001100000000111111110011000000001000001010000000001111110000000111111111100000000000110010000000000100111100111100111111111010011000000000010111010111111101110110000000010111111111011001110111111 [...]
+julianiTNHC60324              000000001010011110110000000001110111001000101101111110000000110110011011111111001110111001111111010000111010000000000000000101000000000111100000001111111100000000000011000011100101100100000011111110010101110111110000110000000011111111101100000000000101111011011111110001100000000111111111111000000001000001010000000001111110000000111111111100100000000110010000000000100111100111100111111111010011000000000010111010111111101110110000000010111111111011001110111111 [...]
+sierramadrensisKU195181       111011111010011110110000000001111111001000101101111110000000000000011011111111001100111001111111011001111110000000000000000101000000000111101111001111111100000000000011000011000101100111000111111110010100001111110111110000000011111111101110000000000101111011011111110001100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000100111100111100111111111110011000000000010111011111111101110110000010000011111111010000000011100 [...]
+psilonotaKU195119             111011001000000110110000000000001111001000111101111111011000000000011011111111000110110001111111011001000001110000001111110101000000000111101100001111111101110000000011000011000101100111000111111110010100000011110111110000000011111111101110000000000000111011011111110001100000001111111110011000000001000001010001110011111110000000111111111000100000000110010000000000100111100111100111111111110011000000000010111010100111101110110000011110111111111010000000011111 [...]
+zweifeliJAC7514               000011111010011110110000000001111111001000101101111111111000000000011011111111001110111001111111011001000000110000000000000101000000000111101100001111111101110000000011000011000101100111000111111110010100001111110111110000000011111111101110000000000101111001011111110001100000001111111110001000000001000001010001110011111110000000111111111000100000000110010000000011100111100111100111111111110011000000000010111010100111101110110000011110111111111010000000011111 [...]
+tarahumaraeKU194596           101011100010011110110000000001111111001111101101111111111000000000011011111111001110111001111111011001111010110000000000000101000000000111101100001111111101110000000011000011000101100111000111111110010110001111110111110000000011111111101110000000000101110011011111110011100000001111111110011000000001000001010001110011111110000000111111111100100000000110010000000000100111100111100111111111110011000000000010111010100111101110110000011110111111111010000000011111 [...]
+pustulosaJAC10555             111011111010011111110000000001111111001111101101111111111000000000011011111111001110111001111111011001000000110000000000000101000000000111101100001111111101110000000011000011000101100111000111111110010100001111110111110000000011111111101110000000000101110011011111110001100000001111111110011000000001000001010001110011111110000000100111111100100000000110010000000000100111000000000000111111110011000000000010111010100111101110110000011110111111111110000000011111 [...]
+pipiensJSF1119                111011111010011110110000000001111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111100011111111111101111011011111110000100001111111111110001000000001000001010001110011111110000000111111111100100000000110010000000000100111101111100010011011010011111111111111111000111111101110110000011110111111111011001111111111 [...]
+pipiensY10945                 111011111010011110110000000001111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110011110100001111110111110000000011111111100011111111111101111011011111110000100001111111111110001000000001000001010001110011111100000000000011111100100000000110010000000000100111101111100011111011010011111111111111111000111111101110110000011110111111111011001111111111 [...]
+dunniJSF1017                  111011111010011110000000000001111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000001100111000111110010010100001111110110000000000000011111100010000000000101111011011111110000100001111111111110001000000001000001010001110011111110000000111111111100100000000110000000000000100111100111100011111011010011000000000011111000111111101110110000011110111111111011001111111111 [...]
+montezumaeJAC8836             111011111010011110000000000001111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000001100111000111110010010100001111110110000000000000011100000010000000000101111011011111110000100001111111111110001000000001000001010001110011111110000000111111111100100000000110000000000000100111100111100011111011010011000000000011111000111111101110110000011110111111111011001111111111 [...]
+sp_2_mex_JSF1106              111011111010011110000000000001111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110110000000000000011111100010000000000101111011011111110000100001111111111110001000000001111111010001110011111110000000111111111100100000000111100000000000100111100111100011111011010011000000000011111000111111101110110000011110111111111011001111111111 [...]
+chiricahuensisJSF1063         111011111010011110000000000001111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110110000000000000011111100010000000000101111011011111110000100001111111111110001000000001000001010000000011111110000000111111111100100000000110000000000000100111100111100011111011010011000000000011111100111111101110110000011110111111111011001111111111 [...]
+subaquavocalis                111011111010111110000000000001111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110110000000000000011111100010000000000101111011011111110000100001111111111110001000000001000001010001110011111110000000111111111100100000000110000000000000100111100111100011111011010011000000000011111000111111101110110000011110111111111011001111111111 [...]
+chiricahuensisJSF1092         111011111010011110000000000001111111001000101001111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110110000000000000011111100010000000000101111011011111110000100001111111111110001000000001000001010001110011111110000000111111111100100000000110000000000000100111100111100011111011010011000000000011111000111111101110110000011110111111111011001111111111 [...]
+palustrisJSF1110              111011111010011110110000000001111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000001111111110001100011111000001010001111111111110000000111111111100100000000110010000000000100111100111100011111011010011000000000011111000111111101110110000011100100001111011001110111111 [...]
+areolataJSF1111               111011111010011110110000000001111111001000101101111110000000000000010011111111111111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000001111111110001100011111000001010001111111111110000000111110000000000000000010010000000000100111100111100011111011010011000000000011111000111111101110000000011100100001111011001110111111 [...]
+sevosaUSC8236                 111011111010011110110000000001111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000001111111110001100011111000001010001111111111110000000111110000000000000000010010000000000100111100111100011111011010011000000000011111000111111101110111111011100100001111011001110111111 [...]
+capitoSLU003                  111011111010011110110000000001111110001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000000111111110001100011111000001010001111111111110000000111110000000000000000010010000000000000000100111100011111011010011000000000011111000111111101110111111011100100001111011001110111111 [...]
+spectabilisJAC8622            111011111010011110110000000001011111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000001111111110001100011111000001010001111111111110000000111111111111100000000110010000000000100111100111100011111011010011000000000011111000111111001110110000011111111111101011001110111111 [...]
+omiltemanaJAC7413             111011111010011110110000000001111111001000101101111110000000000000011011100000001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000001111111110001111111111000001010001111111111110000000111111111111100000000110010000000000100111100111100011111011010011000000000011111000111111100110110000011110111111101011001110111111 [...]
+sp_3_MichoacanJSF955          111011111010011110110000000001111111001000101101111110000000000000001011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101110011011111110000100000001111111110001100011111000001010001111111111110000000111111111111100000000110010000000000100111100111100011111011010011000000000011111000111111101110110000011110111111101011001110111111 [...]
+tlalociJSF1083                111011111010011110110000000001111111001000101101101110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000100000000000011110010010100001111110111110000000011111111101110000000000101111011011101110000100000001111000110001100011111000001010001111111111110000000111111111111100000000110010000000000100111100111100000000000010011000000000011111000111111101110110000011110111111101011001110111111 [...]
+neovolcanicaJSF960            111011111010011110110000000001111111001000101101101110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011011101110000100000001111000110001100011111000001010001111111111110000000111111111111100000000110010000000000100111100111100000000000010011000000000011111000111111101110110000011110111111101011001110111111 [...]
+berlandieriJSF1136            111011111010011110110000000001111111001000101101101110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011011101110000100000001111000110001100011111000001010001111111111110000000111111111111100000000110010000000000100111100111100000000000010011000000000011111000111111101110110000011110111111101011001110111111 [...]
+blairiJSF830                  111011111010011110110000000001111111001000101101101110000000000000011011111111001111111001111111011001111010001111100000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011011101110000100000001111000110001100011111000001010000111111111110000000111111111111100000000110010000000000100111100111100000000000010011000000000011111000111111101110110000011110111111101011001110111111 [...]
+sphenocephalaUSC7448          111011111010011110110000000001111111001000101101101110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000001111111110001100011111000001010001111111111110000000111111111111100000000110010000000000100111100111100011111001010011000000000011111000111111101110110000011110111111101011001110111111 [...]
+utriculariaJSF845             111011111010011110110000000001111111001000101101101110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000001111111110001100011111000001010001111111111110000000111111111111100000000110010000000000100111100111100011111001010011000000000011111000111111101110110000011110111111101011001110110111 [...]
+forreriJSF1065                110001111010011110110000000001111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000101100111000111110010010100001111110111110000000011111111101110000000000101111011111111110000100000001111111110000000010111000001011101111111111000000000000111111111100000000110010000000000100111100111100011111011010011000000000011111000111111101110110000011110111111101011001110111011 [...]
+magnaocularisJSF1073          111011111000011110111000000001111111001000101101111110000000000001111000001111001111111001011111011001111010000000000000000101000000000111101111111111111100000000000011000010000011100110000000110010010100001000010111110000000011111111101110000000000101111011000011110000100000001111111110000000011111000001000011111111111110000000111111111111100000000110010000000000100111100111100011111011001111000000000011111000111111101110110000011110111111101011001110111111 [...]
+sp_7_JaliscoJSF1000           111011111010011110111111110001111111001000101101111110000000000000011011111100000001111001011111011001111010000000000000000101000000000111101111111111111100000000000011000011000111100111000111110010010100001000000111110000000011111111101110000000000101111011011111110000100000001111111110000000011111000001110001111111111110000000111111111111100000000110010000000000100111100111100011111011011111000000000011111000011111101110110000011110111111101011001110111111 [...]
+yavapaiensisJSF1085           111011111010011110110000000001111111111000101101111110000000000000011111111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000111100100000011110010010100001111110111110000000011110011101110000000000101111001011111110000100000001111111110000000011111000001010001111111111110000000111101111111111111111110010000000000100111100111100011111011011111000000000011111000111111101110110000011110111111101011001110111111 [...]
+oncaLVT3542                   111011111010011110110000000001111111111000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000111100100000011110010010100001111110111110000000011110011101110000000000101111001011111110000100000001111111110000000011111000001010001111111111110000000111101111111111111111110010000000000100111100111100011111011011111000000000011111000111111101110110000011110111111101011001110111111 [...]
+sp_8_PueblaJAC9467            111011111010011110110000000001111111111000101111111110000000000000011011111111001111111001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000111100100000011110010010100001000110111110000000011111111101110000000000101111010011111110000100000001111111110000000011111000001010001111111111110000000111111111111111111111110010000000000100111100111100011000000001111000000000011111000111101101110110000011110111111101011001110111111 [...]
+macroglossaJAC10472           111011111010011110110000000001111111001000101100000110000000000000011011111111001111111001111111011001111010000000000000000101000000000111111111111111111100000000000000000011000111100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000001111111110000000011111000001010001111111111110000000111111111111100000000110010000000000100111100111100011111011010011000000000011111000111111101110110000011110111111101011001110111111 [...]
+macroglossaJSF7933            111011111010011110110000000001111111001000101100000110000000000000011011111111001111111001111111011001111010000000000000000101000000000111111111111111111100000000000000000011000111100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000001111111110000000011111000001010001111111111110000000111111111111100000000110010000000000100111100111100011111011010011000000000011111000111111101110110000011110111111101011001110111111 [...]
+taylori286                    111011111010011110110000001111111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000000101000000000101111111111111111100000000000011000011000111100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000001111111110000000011111000001010001111111111110000000111111111111100000000110010000000000100111100111100011111011010011000000000011111000111111101110110000011110100111101011001110111111 [...]
+sp_4_Panama                   111011111010011110110000000001111111001000101101111110000000000000011011111111001111111001111111011001111000000000000000000101000000000111101111111111111100000000000011000011000111100111000111110010010100001111110111110000000011111111101110000000000101111011011111110000100000001111111110000000011111000001010001111111111110000000111111111111100000000110010000000000100111100111100011111011010011000000000011111000111111101110110000011110111111101011001110111111 [...]
+sp_5_CostaRichDMH86_210       111011111110011110110000000001111111001000101101111110000000000000011011111111001111101001111111011001111010000000000000000101000000000111101111111111111100000000000011000011000111100111111111110010010100001111110111110000000011111111101110000000000111111011011111110000100000001111111110000000011111000001010001111111111110000000111111111111100000000110010000000000100111100111100011111011010011000000000011111000111111101110110000011110111111101011001110111111 [...]
+sp_6_CostaRicaDMH86_225       111011111010011110110000000001111111001000101101111110000000000000011011111111001111111001111111011001111010000000000000001101111111111111101111111111111100000000000011000011000111100111000111110010010100001111111111110000000011111111101110000000000101111011011111110000100000001111111110000000011111000001010001111110111110000000111111111111100000000110010000000000100111100111100011111011010011000000000011111000111111101110110000011110111111101001001110111111 [...]
+;
+END;
+
+begin sets;
+charset one (CHARACTERS = Untitled_DATA_Block_1GapsAsMissing)  =  1-.\3;
+charset two (CHARACTERS = Untitled_DATA_Block_1GapsAsMissing)  =  2-.\3;
+charset three (CHARACTERS = Untitled_DATA_Block_1GapsAsMissing)  =  3-.\3;
+charpartition byPos = 1:one, 2:two, 3:three;
+end;
+
diff --git a/example/partition/exampleRuns/partitionedDna+Mkv/garli.conf b/example/partition/exampleRuns/partitionedDna+Mkv/garli.conf
new file mode 100644
index 0000000..ed6f192
--- /dev/null
+++ b/example/partition/exampleRuns/partitionedDna+Mkv/garli.conf
@@ -0,0 +1,91 @@
+[general]
+datafname = dnaPlusGapCoding.nex
+constraintfile = none
+streefname = random
+attachmentspertaxon = 100
+ofprefix = mixedDnaMkv
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 10000
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+outputsitelikelihoods = 0
+optimizeinputonly = 0
+collapsebranches = 1
+
+searchreps = 2
+bootstrapreps = 0
+linkmodels = 0
+subsetspecificrates = 1
+
+[model1]
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[model2]
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[model3]
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[model4]
+datatype = standardvariable
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
diff --git a/example/partition/exampleRuns/partitionedDna+Mkv/mixedDnaMkv.best.all.tre b/example/partition/exampleRuns/partitionedDna+Mkv/mixedDnaMkv.best.all.tre
new file mode 100644
index 0000000..0fd698c
--- /dev/null
+++ b/example/partition/exampleRuns/partitionedDna+Mkv/mixedDnaMkv.best.all.tre
@@ -0,0 +1,79 @@
+#NEXUS
+
+begin trees;
+translate
+  1  temporariaDMH84R1,
+  2  boyliiMVZ148929,
+  3  luteiventris_MT_MVZ191016,
+  4  luteiventris_WA_MVZ225749,
+  5  muscosaMVZ149006,
+  6  auroraMVZ13957,
+  7  cascadaeMVZ148946,
+  8  sylvaticaMVZ137426,
+  9  sylvaticaDMH84R43,
+  10  septentrionalesDCC3588,
+  11  grylioMVZ175945,
+  12  okaloosae,
+  13  clamitansJSF1118,
+  14  heckscheriMVZ164908,
+  15  catesbianaX12841,
+  16  catesbianaDMH84R2,
+  17  virgatipesMVZ175944,
+  18  maculataKU195258,
+  19  vibicariaMVZ11035,
+  20  warszewitshiiJSF1127,
+  21  palmipesVenAMNHA118801,
+  22  palmipesEcuKU204425,
+  23  Sp_1_ecuadorQCAZ13219,
+  24  bwanaQCAZ13964,
+  25  vaillantiKU195299,
+  26  julianiTNHC60324,
+  27  sierramadrensisKU195181,
+  28  psilonotaKU195119,
+  29  zweifeliJAC7514,
+  30  tarahumaraeKU194596,
+  31  pustulosaJAC10555,
+  32  pipiensJSF1119,
+  33  pipiensY10945,
+  34  dunniJSF1017,
+  35  montezumaeJAC8836,
+  36  sp_2_mex_JSF1106,
+  37  chiricahuensisJSF1063,
+  38  subaquavocalis,
+  39  chiricahuensisJSF1092,
+  40  palustrisJSF1110,
+  41  areolataJSF1111,
+  42  sevosaUSC8236,
+  43  capitoSLU003,
+  44  spectabilisJAC8622,
+  45  omiltemanaJAC7413,
+  46  sp_3_MichoacanJSF955,
+  47  tlalociJSF1083,
+  48  neovolcanicaJSF960,
+  49  berlandieriJSF1136,
+  50  blairiJSF830,
+  51  sphenocephalaUSC7448,
+  52  utriculariaJSF845,
+  53  forreriJSF1065,
+  54  magnaocularisJSF1073,
+  55  sp_7_JaliscoJSF1000,
+  56  yavapaiensisJSF1085,
+  57  oncaLVT3542,
+  58  sp_8_PueblaJAC9467,
+  59  macroglossaJAC10472,
+  60  macroglossaJSF7933,
+  61  taylori286,
+  62  sp_4_Panama,
+  63  sp_5_CostaRichDMH86_210,
+  64  sp_6_CostaRicaDMH86_225;
+tree rep1 = [&U][!GarliScore -61937.27][!GarliModel  S  1.748119  0.117688  M1 r  2.02871 7.73017 2.08171 0.81780 13.87204 1.00000 e 0.33609 0.22000 0.14234 0.30157 a 0.77482 p 0.43349  M2 e  0.50000  0.50000  ](1:0.17941819,(((17:0.06825516,(10:0.06404833,(11:0.12781767,((13:0.01322966,12:0.01059399):0.01795642,((16:0.00288901,15:0.00000001):0.04973784,14:0.06608698):0.00515382):0.02250318):0.00259060):0.01306057):0.09016985,(9:0.00303898,8:0.01059628):0.12975904):0.04107838,(((((33:0.0 [...]
+tree rep2BEST = [&U][!GarliScore -61937.27015625][!GarliModel  S  1.748173  0.117625  M1 r  2.02754 7.72587 2.08045 0.81707 13.86626 1.00000 e 0.33610 0.22001 0.14233 0.30156 a 0.77477 p 0.43346  M2 e  0.50000  0.50000  ](1:0.17947672,((((18:0.11927940,(19:0.11831549,20:0.22356705):0.17422723):0.04169982,((24:0.06672385,(23:0.03338531,(22:0.00429782,21:0.17969580):0.04868685):0.01871139):0.03360464,(26:0.13218472,25:0.12648334):0.04379631):0.08669472):0.03258189,((((28:0.16422475,29:0.09 [...]
+end;
+[M1
+begin paup;
+clear;
+gett file=mixedDnaMkv.best.all.tre storebr;
+lset userbr nst=6 rmat=(2.02754326 7.72587188 2.08045394 0.81707243 13.86625709) base=(0.33609716 0.22000583 0.14233462) rates=gamma shape= 0.77476879 ncat=4 pinv= 0.43346220;
+end;
+
+]
diff --git a/example/partition/exampleRuns/partitionedDna+Mkv/mixedDnaMkv.best.tre b/example/partition/exampleRuns/partitionedDna+Mkv/mixedDnaMkv.best.tre
new file mode 100644
index 0000000..7049001
--- /dev/null
+++ b/example/partition/exampleRuns/partitionedDna+Mkv/mixedDnaMkv.best.tre
@@ -0,0 +1,73 @@
+#NEXUS
+
+begin trees;
+translate
+ 1 temporariaDMH84R1,
+ 2 boyliiMVZ148929,
+ 3 luteiventris_MT_MVZ191016,
+ 4 luteiventris_WA_MVZ225749,
+ 5 muscosaMVZ149006,
+ 6 auroraMVZ13957,
+ 7 cascadaeMVZ148946,
+ 8 sylvaticaMVZ137426,
+ 9 sylvaticaDMH84R43,
+ 10 septentrionalesDCC3588,
+ 11 grylioMVZ175945,
+ 12 okaloosae,
+ 13 clamitansJSF1118,
+ 14 heckscheriMVZ164908,
+ 15 catesbianaX12841,
+ 16 catesbianaDMH84R2,
+ 17 virgatipesMVZ175944,
+ 18 maculataKU195258,
+ 19 vibicariaMVZ11035,
+ 20 warszewitshiiJSF1127,
+ 21 palmipesVenAMNHA118801,
+ 22 palmipesEcuKU204425,
+ 23 Sp_1_ecuadorQCAZ13219,
+ 24 bwanaQCAZ13964,
+ 25 vaillantiKU195299,
+ 26 julianiTNHC60324,
+ 27 sierramadrensisKU195181,
+ 28 psilonotaKU195119,
+ 29 zweifeliJAC7514,
+ 30 tarahumaraeKU194596,
+ 31 pustulosaJAC10555,
+ 32 pipiensJSF1119,
+ 33 pipiensY10945,
+ 34 dunniJSF1017,
+ 35 montezumaeJAC8836,
+ 36 sp_2_mex_JSF1106,
+ 37 chiricahuensisJSF1063,
+ 38 subaquavocalis,
+ 39 chiricahuensisJSF1092,
+ 40 palustrisJSF1110,
+ 41 areolataJSF1111,
+ 42 sevosaUSC8236,
+ 43 capitoSLU003,
+ 44 spectabilisJAC8622,
+ 45 omiltemanaJAC7413,
+ 46 sp_3_MichoacanJSF955,
+ 47 tlalociJSF1083,
+ 48 neovolcanicaJSF960,
+ 49 berlandieriJSF1136,
+ 50 blairiJSF830,
+ 51 sphenocephalaUSC7448,
+ 52 utriculariaJSF845,
+ 53 forreriJSF1065,
+ 54 magnaocularisJSF1073,
+ 55 sp_7_JaliscoJSF1000,
+ 56 yavapaiensisJSF1085,
+ 57 oncaLVT3542,
+ 58 sp_8_PueblaJAC9467,
+ 59 macroglossaJAC10472,
+ 60 macroglossaJSF7933,
+ 61 taylori286,
+ 62 sp_4_Panama,
+ 63 sp_5_CostaRichDMH86_210,
+ 64 sp_6_CostaRicaDMH86_225;
+tree bestREP2 = [&U][!GarliScore -61937.270156][!GarliModel  S  1.748173  0.117625  M1 r  2.02754 7.72587 2.08045 0.81707 13.86626 1.00000 e 0.33610 0.22001 0.14233 0.30156 a 0.77477 p 0.43346  M2 e  0.50000  0.50000  ](1:0.17947672,((((18:0.11927940,(19:0.11831549,20:0.22356705):0.17422723):0.04169982,((24:0.06672385,(23:0.03338531,(22:0.00429782,21:0.17969580):0.04868685):0.01871139):0.03360464,(26:0.13218472,25:0.12648334):0.04379631):0.08669472):0.03258189,((((28:0.16422475,29:0.0979 [...]
+end;
+[
+ S  1.748173  0.117625  M1 r  2.02754 7.72587 2.08045 0.81707 13.86626 1.00000 e 0.33610 0.22001 0.14233 0.30156 a 0.77477 p 0.43346  M2 e  0.50000  0.50000  
+]
diff --git a/example/partition/exampleRuns/partitionedDna+Mkv/mixedDnaMkv.log00.log b/example/partition/exampleRuns/partitionedDna+Mkv/mixedDnaMkv.log00.log
new file mode 100644
index 0000000..08aea76
--- /dev/null
+++ b/example/partition/exampleRuns/partitionedDna+Mkv/mixedDnaMkv.log00.log
@@ -0,0 +1,3292 @@
+Search rep 1 (of 2)
+random seed = 853654
+gen	best_like	time	optPrecision
+0	-101113.0297	28	0.5
+10	-100820.8477	29	0.5
+20	-99463.88968	29	0.5
+30	-98493.98737	30	0.5
+40	-98312.10553	30	0.5
+50	-96647.35981	31	0.5
+60	-94451.32369	32	0.5
+70	-94064.80284	32	0.5
+80	-92886.97454	33	0.5
+90	-91512.29965	33	0.5
+100	-90517.35366	34	0.5
+110	-90300.81805	35	0.5
+120	-88132.16511	35	0.5
+130	-87799.9098	36	0.5
+140	-86355.32816	36	0.5
+150	-86125.06835	37	0.5
+160	-86024.54664	37	0.5
+170	-84979.84955	38	0.5
+180	-84043.90482	39	0.5
+190	-83362.52924	39	0.5
+200	-83291.80983	40	0.5
+210	-83244.34687	40	0.5
+220	-82563.02346	41	0.5
+230	-82522.44927	41	0.5
+240	-82244.84075	42	0.5
+250	-82198.90106	43	0.5
+260	-80830.67788	43	0.5
+270	-80297.86066	44	0.5
+280	-79288.43519	44	0.5
+290	-78557.51741	45	0.5
+300	-78503.34478	45	0.5
+310	-77614.54839	46	0.5
+320	-76538.03957	46	0.5
+330	-76464.59157	47	0.5
+340	-76374.06924	47	0.5
+350	-75778.65476	48	0.5
+360	-75766.14777	49	0.5
+370	-74619.89639	49	0.5
+380	-74463.70233	50	0.5
+390	-73808.87366	50	0.5
+400	-73032.90792	51	0.5
+410	-73006.33487	51	0.5
+420	-72906.56377	52	0.5
+430	-72490.89132	52	0.5
+440	-72402.7476	53	0.5
+450	-72367.59175	53	0.5
+460	-71459.52105	54	0.5
+470	-70690.6552	55	0.5
+480	-70688.32998	55	0.5
+490	-69774.10168	55	0.5
+500	-69757.18877	56	0.5
+510	-69755.54355	56	0.5
+520	-69108.13277	57	0.5
+530	-68939.8519	58	0.5
+540	-68894.61966	58	0.5
+550	-68894.61966	58	0.5
+560	-68796.96332	59	0.5
+570	-68790.00753	59	0.5
+580	-68444.31206	60	0.5
+590	-67838.85468	60	0.5
+600	-67518.7818	61	0.5
+610	-67517.0523	61	0.5
+620	-67487.23389	62	0.5
+630	-67414.65302	62	0.5
+640	-67035.16876	63	0.5
+650	-66784.98145	63	0.5
+660	-66750.10446	64	0.5
+670	-66597.70036	64	0.5
+680	-66220.31136	65	0.5
+690	-66136.73245	65	0.5
+700	-66093.89128	66	0.5
+710	-66092.51107	66	0.5
+720	-66058.36884	67	0.5
+730	-65768.39892	67	0.5
+740	-65695.74167	68	0.5
+750	-65692.96024	68	0.5
+760	-65691.6879	68	0.5
+770	-65619.21496	69	0.5
+780	-65619.21496	69	0.5
+790	-65611.13894	70	0.5
+800	-65360.84324	70	0.5
+810	-65360.84324	71	0.5
+820	-65356.86001	71	0.5
+830	-65356.86001	71	0.5
+840	-65312.82483	72	0.5
+850	-65250.44599	72	0.5
+860	-65249.0973	73	0.5
+870	-65249.0973	73	0.5
+880	-65040.69938	74	0.5
+890	-65040.69938	74	0.5
+900	-64392.40941	75	0.5
+910	-64358.59015	75	0.5
+920	-64121.05938	75	0.5
+930	-64117.93083	76	0.5
+940	-63332.10981	77	0.5
+950	-63151.38524	77	0.5
+960	-63130.04928	78	0.5
+970	-63105.35674	78	0.5
+980	-63058.76922	79	0.5
+990	-63057.42141	79	0.5
+1000	-63053.1325	80	0.5
+1010	-63049.23666	80	0.5
+1020	-63029.46305	80	0.5
+1030	-62910.53822	81	0.5
+1040	-62833.42267	81	0.5
+1050	-62763.86621	82	0.5
+1060	-62763.86621	82	0.5
+1070	-62642.16077	83	0.5
+1080	-62640.95474	83	0.5
+1090	-62525.13138	84	0.5
+1100	-62393.83472	84	0.5
+1110	-62393.83472	84	0.5
+1120	-62392.95523	85	0.5
+1130	-62392.80314	85	0.5
+1140	-62391.57903	86	0.5
+1150	-62378.72345	86	0.5
+1160	-62090.94144	87	0.5
+1170	-62088.69992	87	0.5
+1180	-62080.29532	88	0.5
+1190	-62069.99382	88	0.5
+1200	-62063.35127	89	0.5
+1210	-62063.23072	89	0.5
+1220	-62062.75001	90	0.5
+1230	-62062.68122	90	0.5
+1240	-62062.50621	90	0.5
+1250	-62062.50621	91	0.5
+1260	-62061.42679	91	0.5
+1270	-62055.81019	92	0.5
+1280	-62015.87516	92	0.5
+1290	-62012.65662	93	0.5
+1300	-62005.35291	93	0.5
+1310	-62001.09751	94	0.5
+1320	-61999.26547	94	0.5
+1330	-61999.26547	95	0.5
+1340	-61998.18558	95	0.5
+1350	-61997.93004	95	0.5
+1360	-61997.64034	96	0.5
+1370	-61997.44654	96	0.5
+1380	-61997.44654	97	0.5
+1390	-61997.44654	97	0.5
+1400	-61997.11065	98	0.5
+1410	-61997.00866	98	0.5
+1420	-61996.73605	99	0.5
+1430	-61996.30766	99	0.5
+1440	-61996.30766	99	0.5
+1450	-61994.66551	100	0.5
+1460	-61994.15738	100	0.5
+1470	-61994.15738	101	0.5
+1480	-61994.11382	101	0.5
+1490	-61994.08117	101	0.5
+1500	-61993.82985	102	0.5
+1510	-61993.40329	102	0.5
+1520	-61993.40329	103	0.5
+1530	-61993.31761	103	0.5
+1540	-61990.30492	103	0.5
+1550	-61989.41057	104	0.5
+1560	-61989.06789	104	0.5
+1570	-61988.92414	105	0.5
+1580	-61988.87258	105	0.5
+1590	-61988.23504	106	0.5
+1600	-61988.1565	106	0.5
+1610	-61988.1565	107	0.5
+1620	-61988.04424	107	0.5
+1630	-61988.04424	107	0.5
+1640	-61988.03059	108	0.5
+1650	-61984.7538	108	0.5
+1660	-61984.7538	108	0.5
+1670	-61984.7538	109	0.5
+1680	-61984.62581	109	0.5
+1690	-61984.61309	110	0.5
+1700	-61984.61134	110	0.5
+1710	-61983.96933	110	0.5
+1720	-61983.66791	111	0.5
+1730	-61982.69771	111	0.5
+1740	-61982.47128	112	0.5
+1750	-61981.3041	112	0.5
+1760	-61980.20534	112	0.5
+1770	-61979.03001	113	0.5
+1780	-61976.76125	113	0.5
+1790	-61976.42917	114	0.5
+1800	-61976.37419	114	0.5
+1810	-61961.56735	115	0.451
+1820	-61959.23752	115	0.451
+1830	-61956.71346	116	0.451
+1840	-61955.99748	116	0.451
+1850	-61955.48605	117	0.451
+1860	-61954.68549	117	0.451
+1870	-61954.40884	117	0.451
+1880	-61952.83534	118	0.451
+1890	-61952.37856	118	0.451
+1900	-61951.65761	118	0.451
+1910	-61951.65235	119	0.451
+1920	-61951.59713	119	0.451
+1930	-61951.17277	119	0.451
+1940	-61950.53516	120	0.451
+1950	-61950.53516	120	0.451
+1960	-61950.35345	121	0.451
+1970	-61950.05876	121	0.451
+1980	-61950.00055	121	0.451
+1990	-61949.63206	122	0.451
+2000	-61949.59783	122	0.451
+2010	-61949.38491	122	0.451
+2020	-61949.26204	123	0.451
+2030	-61948.93053	123	0.451
+2040	-61948.90858	123	0.451
+2050	-61948.43717	124	0.451
+2060	-61947.74497	124	0.451
+2070	-61947.7316	125	0.451
+2080	-61947.50315	125	0.451
+2090	-61947.38546	125	0.451
+2100	-61947.10593	126	0.451
+2110	-61947.10593	126	0.451
+2120	-61946.99735	127	0.451
+2130	-61946.99083	127	0.451
+2140	-61946.99083	127	0.451
+2150	-61946.81033	128	0.451
+2160	-61946.58654	128	0.451
+2170	-61946.33899	128	0.451
+2180	-61946.29242	129	0.451
+2190	-61946.26008	129	0.451
+2200	-61946.07696	130	0.451
+2210	-61945.35873	130	0.451
+2220	-61945.22316	131	0.451
+2230	-61945.01116	131	0.451
+2240	-61944.73236	131	0.451
+2250	-61944.6034	132	0.451
+2260	-61944.47679	132	0.451
+2270	-61944.30789	132	0.451
+2280	-61944.25421	133	0.451
+2290	-61944.08589	133	0.451
+2300	-61944.01816	134	0.451
+2310	-61943.38042	135	0.402
+2320	-61943.26118	135	0.402
+2330	-61943.26118	135	0.402
+2340	-61943.15644	136	0.402
+2350	-61943.0575	136	0.402
+2360	-61942.92033	137	0.402
+2370	-61942.91245	137	0.402
+2380	-61942.91204	137	0.402
+2390	-61942.85258	138	0.402
+2400	-61942.79415	138	0.402
+2410	-61942.75186	138	0.402
+2420	-61942.69282	139	0.402
+2430	-61942.57882	139	0.402
+2440	-61942.57882	140	0.402
+2450	-61942.57882	140	0.402
+2460	-61942.5157	140	0.402
+2470	-61942.5157	141	0.402
+2480	-61942.5157	141	0.402
+2490	-61942.5157	141	0.402
+2500	-61942.35378	142	0.402
+2510	-61942.35378	142	0.402
+2520	-61942.25998	143	0.402
+2530	-61942.25998	143	0.402
+2540	-61942.18145	143	0.402
+2550	-61942.18145	144	0.402
+2560	-61942.12635	144	0.402
+2570	-61942.12635	144	0.402
+2580	-61942.06024	145	0.402
+2590	-61942.06007	145	0.402
+2600	-61942.05506	146	0.402
+2610	-61942.04805	146	0.402
+2620	-61942.0168	146	0.402
+2630	-61941.98237	147	0.402
+2640	-61941.98237	147	0.402
+2650	-61941.94993	147	0.402
+2660	-61941.91322	148	0.402
+2670	-61941.91322	148	0.402
+2680	-61941.91322	148	0.402
+2690	-61941.82912	149	0.402
+2700	-61941.7881	149	0.402
+2710	-61941.68605	150	0.402
+2720	-61941.58352	150	0.402
+2730	-61941.55879	150	0.402
+2740	-61941.55879	151	0.402
+2750	-61941.55879	151	0.402
+2760	-61941.55879	152	0.402
+2770	-61941.55879	152	0.402
+2780	-61941.5493	152	0.402
+2790	-61941.5493	153	0.402
+2800	-61941.5493	153	0.402
+2810	-61941.5323	154	0.353
+2820	-61941.43144	154	0.353
+2830	-61941.43144	155	0.353
+2840	-61941.42789	155	0.353
+2850	-61941.35644	156	0.353
+2860	-61941.35474	156	0.353
+2870	-61941.35474	156	0.353
+2880	-61941.35474	157	0.353
+2890	-61941.34281	157	0.353
+2900	-61941.34281	157	0.353
+2910	-61941.25392	158	0.353
+2920	-61941.21509	158	0.353
+2930	-61941.21509	159	0.353
+2940	-61941.21509	159	0.353
+2950	-61941.20291	159	0.353
+2960	-61941.20291	160	0.353
+2970	-61941.11279	160	0.353
+2980	-61941.11279	161	0.353
+2990	-61940.83965	161	0.353
+3000	-61940.80614	161	0.353
+3010	-61940.80614	162	0.353
+3020	-61940.80614	162	0.353
+3030	-61940.77818	162	0.353
+3040	-61940.7028	163	0.353
+3050	-61940.6949	163	0.353
+3060	-61940.6949	164	0.353
+3070	-61940.6949	164	0.353
+3080	-61940.6949	164	0.353
+3090	-61940.6949	165	0.353
+3100	-61940.68316	165	0.353
+3110	-61940.68316	165	0.353
+3120	-61940.68316	166	0.353
+3130	-61940.5748	166	0.353
+3140	-61940.5748	166	0.353
+3150	-61940.54833	167	0.353
+3160	-61940.51229	167	0.353
+3170	-61940.51229	168	0.353
+3180	-61940.51229	168	0.353
+3190	-61940.48176	168	0.353
+3200	-61940.48176	169	0.353
+3210	-61940.48176	169	0.353
+3220	-61940.48176	170	0.353
+3230	-61940.48176	170	0.353
+3240	-61940.4817	170	0.353
+3250	-61940.4817	171	0.353
+3260	-61940.46987	171	0.353
+3270	-61940.46987	171	0.353
+3280	-61940.45548	172	0.353
+3290	-61940.43326	172	0.353
+3300	-61940.43326	173	0.353
+3310	-61939.97375	174	0.304
+3320	-61939.97	174	0.304
+3330	-61939.87403	174	0.304
+3340	-61939.8659	175	0.304
+3350	-61939.83332	175	0.304
+3360	-61939.83332	176	0.304
+3370	-61939.75762	176	0.304
+3380	-61939.75762	176	0.304
+3390	-61939.75762	177	0.304
+3400	-61939.75762	177	0.304
+3410	-61939.75762	178	0.304
+3420	-61939.74678	178	0.304
+3430	-61939.73744	178	0.304
+3440	-61939.73443	179	0.304
+3450	-61939.73443	179	0.304
+3460	-61939.71705	179	0.304
+3470	-61939.69166	180	0.304
+3480	-61939.69166	180	0.304
+3490	-61939.69166	181	0.304
+3500	-61939.69166	181	0.304
+3510	-61939.67519	181	0.304
+3520	-61939.67519	182	0.304
+3530	-61939.67519	182	0.304
+3540	-61939.67519	182	0.304
+3550	-61939.6222	183	0.304
+3560	-61939.59002	183	0.304
+3570	-61939.57998	184	0.304
+3580	-61939.55716	184	0.304
+3590	-61939.55265	184	0.304
+3600	-61939.55265	185	0.304
+3610	-61939.55265	185	0.304
+3620	-61939.55265	186	0.304
+3630	-61939.52605	186	0.304
+3640	-61939.49636	186	0.304
+3650	-61939.45737	187	0.304
+3660	-61939.45737	187	0.304
+3670	-61939.38636	188	0.304
+3680	-61939.38636	188	0.304
+3690	-61939.38636	188	0.304
+3700	-61939.38284	189	0.304
+3710	-61939.38283	189	0.304
+3720	-61939.38147	190	0.304
+3730	-61939.38147	190	0.304
+3740	-61939.38147	190	0.304
+3750	-61939.37762	191	0.304
+3760	-61939.37725	191	0.304
+3770	-61939.37725	191	0.304
+3780	-61939.37683	192	0.304
+3790	-61939.37683	192	0.304
+3800	-61939.36642	193	0.304
+3810	-61939.35423	194	0.255
+3820	-61939.35423	194	0.255
+3830	-61939.35423	195	0.255
+3840	-61939.35423	195	0.255
+3850	-61939.34593	195	0.255
+3860	-61939.31991	196	0.255
+3870	-61939.31991	196	0.255
+3880	-61939.31991	196	0.255
+3890	-61939.2903	197	0.255
+3900	-61939.28761	197	0.255
+3910	-61939.28696	198	0.255
+3920	-61939.28095	198	0.255
+3930	-61939.28095	199	0.255
+3940	-61939.28095	199	0.255
+3950	-61939.28066	199	0.255
+3960	-61939.28066	200	0.255
+3970	-61939.28066	200	0.255
+3980	-61939.22923	201	0.255
+3990	-61939.22923	201	0.255
+4000	-61939.22923	201	0.255
+4010	-61939.22923	202	0.255
+4020	-61939.22923	202	0.255
+4030	-61939.22817	203	0.255
+4040	-61939.15429	203	0.255
+4050	-61939.15429	203	0.255
+4060	-61939.10709	204	0.255
+4070	-61939.10709	204	0.255
+4080	-61939.10709	205	0.255
+4090	-61939.10709	205	0.255
+4100	-61939.10709	205	0.255
+4110	-61939.10709	206	0.255
+4120	-61939.10541	206	0.255
+4130	-61939.08723	207	0.255
+4140	-61939.08723	207	0.255
+4150	-61939.08723	207	0.255
+4160	-61939.08723	208	0.255
+4170	-61939.06628	208	0.255
+4180	-61939.033	209	0.255
+4190	-61938.98242	209	0.255
+4200	-61938.98242	209	0.255
+4210	-61938.98242	210	0.255
+4220	-61938.98242	210	0.255
+4230	-61938.98242	211	0.255
+4240	-61938.98242	211	0.255
+4250	-61938.98242	212	0.255
+4260	-61938.98242	212	0.255
+4270	-61938.98242	212	0.255
+4280	-61938.98242	213	0.255
+4290	-61938.98242	213	0.255
+4300	-61938.9732	214	0.255
+4310	-61938.64161	215	0.206
+4320	-61938.64161	215	0.206
+4330	-61938.62753	216	0.206
+4340	-61938.62753	216	0.206
+4350	-61938.62753	216	0.206
+4360	-61938.62753	217	0.206
+4370	-61938.62753	217	0.206
+4380	-61938.62753	218	0.206
+4390	-61938.62753	218	0.206
+4400	-61938.62753	218	0.206
+4410	-61938.62753	219	0.206
+4420	-61938.62753	219	0.206
+4430	-61938.62753	220	0.206
+4440	-61938.62753	220	0.206
+4450	-61938.62753	221	0.206
+4460	-61938.58885	221	0.206
+4470	-61938.58527	221	0.206
+4480	-61938.58527	222	0.206
+4490	-61938.58048	222	0.206
+4500	-61938.54276	223	0.206
+4510	-61938.54276	223	0.206
+4520	-61938.54276	223	0.206
+4530	-61938.54276	224	0.206
+4540	-61938.51489	224	0.206
+4550	-61938.51489	225	0.206
+4560	-61938.51489	225	0.206
+4570	-61938.51489	225	0.206
+4580	-61938.51139	226	0.206
+4590	-61938.51139	226	0.206
+4600	-61938.51139	227	0.206
+4610	-61938.51139	227	0.206
+4620	-61938.51139	227	0.206
+4630	-61938.51139	228	0.206
+4640	-61938.51139	228	0.206
+4650	-61938.51139	229	0.206
+4660	-61938.51103	229	0.206
+4670	-61938.51103	230	0.206
+4680	-61938.51103	230	0.206
+4690	-61938.51103	230	0.206
+4700	-61938.51103	231	0.206
+4710	-61938.46659	231	0.206
+4720	-61938.46659	231	0.206
+4730	-61938.46659	232	0.206
+4740	-61938.45889	232	0.206
+4750	-61938.44334	233	0.206
+4760	-61938.4303	233	0.206
+4770	-61938.4303	234	0.206
+4780	-61938.4303	234	0.206
+4790	-61938.4303	234	0.206
+4800	-61938.4303	235	0.206
+4810	-61938.42635	236	0.157
+4820	-61938.42439	236	0.157
+4830	-61938.42439	237	0.157
+4840	-61938.42439	237	0.157
+4850	-61938.42439	238	0.157
+4860	-61938.42439	238	0.157
+4870	-61938.42439	238	0.157
+4880	-61938.42439	239	0.157
+4890	-61938.42439	239	0.157
+4900	-61938.42439	240	0.157
+4910	-61938.42439	240	0.157
+4920	-61938.42439	241	0.157
+4930	-61938.42439	241	0.157
+4940	-61938.39937	241	0.157
+4950	-61938.39937	242	0.157
+4960	-61938.39937	242	0.157
+4970	-61938.39347	243	0.157
+4980	-61938.39347	243	0.157
+4990	-61938.36126	243	0.157
+5000	-61938.36126	244	0.157
+5010	-61938.35696	244	0.157
+5020	-61938.35696	245	0.157
+5030	-61938.35696	245	0.157
+5040	-61938.35696	245	0.157
+5050	-61938.35696	246	0.157
+5060	-61938.35696	246	0.157
+5070	-61938.35696	247	0.157
+5080	-61938.35696	247	0.157
+5090	-61938.35696	248	0.157
+5100	-61938.35696	248	0.157
+5110	-61938.3504	248	0.157
+5120	-61938.34058	249	0.157
+5130	-61938.34058	249	0.157
+5140	-61938.32831	250	0.157
+5150	-61938.32831	250	0.157
+5160	-61938.32607	250	0.157
+5170	-61938.32607	251	0.157
+5180	-61938.32607	251	0.157
+5190	-61938.32573	252	0.157
+5200	-61938.32573	252	0.157
+5210	-61938.32316	253	0.157
+5220	-61938.32316	253	0.157
+5230	-61938.32316	253	0.157
+5240	-61938.32316	254	0.157
+5250	-61938.32316	254	0.157
+5260	-61938.32316	255	0.157
+5270	-61938.32316	255	0.157
+5280	-61938.32316	255	0.157
+5290	-61938.32316	256	0.157
+5300	-61938.32316	256	0.157
+5310	-61938.18049	257	0.108
+5320	-61938.18049	258	0.108
+5330	-61938.18049	258	0.108
+5340	-61938.18049	259	0.108
+5350	-61938.18049	259	0.108
+5360	-61938.18049	259	0.108
+5370	-61938.18049	260	0.108
+5380	-61938.18049	260	0.108
+5390	-61938.18049	261	0.108
+5400	-61938.18049	261	0.108
+5410	-61938.18049	262	0.108
+5420	-61938.18049	262	0.108
+5430	-61938.18049	262	0.108
+5440	-61938.18049	263	0.108
+5450	-61938.18049	263	0.108
+5460	-61938.16913	264	0.108
+5470	-61938.16913	264	0.108
+5480	-61938.16913	265	0.108
+5490	-61938.16913	265	0.108
+5500	-61938.16913	265	0.108
+5510	-61938.16913	266	0.108
+5520	-61938.16913	266	0.108
+5530	-61938.16913	267	0.108
+5540	-61938.16459	267	0.108
+5550	-61938.16459	268	0.108
+5560	-61938.16459	268	0.108
+5570	-61938.16204	269	0.108
+5580	-61938.16204	269	0.108
+5590	-61938.16204	269	0.108
+5600	-61938.16204	270	0.108
+5610	-61938.16204	270	0.108
+5620	-61938.16204	271	0.108
+5630	-61938.16204	271	0.108
+5640	-61938.16014	272	0.108
+5650	-61938.16014	272	0.108
+5660	-61938.16014	272	0.108
+5670	-61938.16014	273	0.108
+5680	-61938.16014	273	0.108
+5690	-61938.16014	274	0.108
+5700	-61938.16014	274	0.108
+5710	-61938.16014	275	0.108
+5720	-61938.15411	275	0.108
+5730	-61938.15411	276	0.108
+5740	-61938.15411	276	0.108
+5750	-61938.15411	276	0.108
+5760	-61938.15411	277	0.108
+5770	-61938.15411	277	0.108
+5780	-61938.15279	278	0.108
+5790	-61938.15279	278	0.108
+5800	-61938.15279	279	0.108
+5810	-61938.15148	280	0.059
+5820	-61938.15148	280	0.059
+5830	-61938.15148	281	0.059
+5840	-61938.15148	281	0.059
+5850	-61938.14086	282	0.059
+5860	-61938.14086	282	0.059
+5870	-61938.14086	283	0.059
+5880	-61938.14086	283	0.059
+5890	-61938.14086	284	0.059
+5900	-61938.14086	284	0.059
+5910	-61938.14086	284	0.059
+5920	-61938.14086	285	0.059
+5930	-61938.14086	285	0.059
+5940	-61938.14086	286	0.059
+5950	-61938.14086	286	0.059
+5960	-61938.14086	287	0.059
+5970	-61938.14086	287	0.059
+5980	-61938.14086	287	0.059
+5990	-61938.14086	288	0.059
+6000	-61938.14086	288	0.059
+6010	-61938.14086	289	0.059
+6020	-61938.14086	289	0.059
+6030	-61938.14086	290	0.059
+6040	-61938.14086	290	0.059
+6050	-61938.14086	290	0.059
+6060	-61938.14086	291	0.059
+6070	-61938.14086	291	0.059
+6080	-61938.14086	292	0.059
+6090	-61938.14086	292	0.059
+6100	-61938.14086	293	0.059
+6110	-61938.14086	293	0.059
+6120	-61938.13994	294	0.059
+6130	-61938.13994	294	0.059
+6140	-61938.13994	294	0.059
+6150	-61938.13994	295	0.059
+6160	-61938.13994	295	0.059
+6170	-61938.13994	296	0.059
+6180	-61938.13994	296	0.059
+6190	-61938.13994	296	0.059
+6200	-61938.13994	297	0.059
+6210	-61938.13994	297	0.059
+6220	-61938.13978	298	0.059
+6230	-61938.13978	298	0.059
+6240	-61938.13978	299	0.059
+6250	-61938.13978	299	0.059
+6260	-61938.13978	300	0.059
+6270	-61938.13978	300	0.059
+6280	-61938.13978	300	0.059
+6290	-61938.13978	301	0.059
+6300	-61938.13219	301	0.059
+6310	-61937.59167	303	0.01
+6320	-61937.59167	303	0.01
+6330	-61937.58559	304	0.01
+6340	-61937.58559	304	0.01
+6350	-61937.58559	305	0.01
+6360	-61937.58559	305	0.01
+6370	-61937.58559	306	0.01
+6380	-61937.58559	306	0.01
+6390	-61937.58559	307	0.01
+6400	-61937.58559	307	0.01
+6410	-61937.58559	307	0.01
+6420	-61937.58559	308	0.01
+6430	-61937.58559	308	0.01
+6440	-61937.58559	309	0.01
+6450	-61937.58559	309	0.01
+6460	-61937.58559	310	0.01
+6470	-61937.58559	310	0.01
+6480	-61937.58559	311	0.01
+6490	-61937.58559	311	0.01
+6500	-61937.58494	312	0.01
+6510	-61937.5768	312	0.01
+6520	-61937.5768	312	0.01
+6530	-61937.57584	313	0.01
+6540	-61937.57584	313	0.01
+6550	-61937.57584	314	0.01
+6560	-61937.57584	314	0.01
+6570	-61937.57557	315	0.01
+6580	-61937.57557	315	0.01
+6590	-61937.57557	316	0.01
+6600	-61937.57557	316	0.01
+6610	-61937.57557	317	0.01
+6620	-61937.57557	317	0.01
+6630	-61937.57557	318	0.01
+6640	-61937.57463	318	0.01
+6650	-61937.57463	318	0.01
+6660	-61937.57463	319	0.01
+6670	-61937.57463	319	0.01
+6680	-61937.57463	320	0.01
+6690	-61937.57463	320	0.01
+6700	-61937.57463	321	0.01
+6710	-61937.57463	321	0.01
+6720	-61937.57449	322	0.01
+6730	-61937.57449	322	0.01
+6740	-61937.57449	322	0.01
+6750	-61937.57449	323	0.01
+6760	-61937.57449	323	0.01
+6770	-61937.57449	324	0.01
+6780	-61937.57449	324	0.01
+6790	-61937.57449	325	0.01
+6800	-61937.5711	325	0.01
+6810	-61937.5711	326	0.01
+6820	-61937.5711	326	0.01
+6830	-61937.5711	327	0.01
+6840	-61937.5711	327	0.01
+6850	-61937.5711	328	0.01
+6860	-61937.5711	328	0.01
+6870	-61937.57021	328	0.01
+6880	-61937.56976	329	0.01
+6890	-61937.56976	329	0.01
+6900	-61937.56976	330	0.01
+6910	-61937.56976	330	0.01
+6920	-61937.56976	331	0.01
+6930	-61937.56976	331	0.01
+6940	-61937.56976	332	0.01
+6950	-61937.56976	332	0.01
+6960	-61937.56976	333	0.01
+6970	-61937.56976	333	0.01
+6980	-61937.56976	334	0.01
+6990	-61937.56976	334	0.01
+7000	-61937.56976	335	0.01
+7010	-61937.56976	335	0.01
+7020	-61937.56976	335	0.01
+7030	-61937.56976	336	0.01
+7040	-61937.56976	336	0.01
+7050	-61937.56976	337	0.01
+7060	-61937.56976	337	0.01
+7070	-61937.56976	338	0.01
+7080	-61937.56976	338	0.01
+7090	-61937.56976	339	0.01
+7100	-61937.56976	339	0.01
+7110	-61937.56976	340	0.01
+7120	-61937.56976	340	0.01
+7130	-61937.56976	341	0.01
+7140	-61937.56976	341	0.01
+7150	-61937.56976	342	0.01
+7160	-61937.56976	342	0.01
+7170	-61937.56976	342	0.01
+7180	-61937.56976	343	0.01
+7190	-61937.56976	343	0.01
+7200	-61937.56976	344	0.01
+7210	-61937.56976	344	0.01
+7220	-61937.56976	345	0.01
+7230	-61937.56754	345	0.01
+7240	-61937.56754	346	0.01
+7250	-61937.56754	346	0.01
+7260	-61937.56754	347	0.01
+7270	-61937.56754	347	0.01
+7280	-61937.56754	348	0.01
+7290	-61937.56754	348	0.01
+7300	-61937.56754	349	0.01
+7310	-61937.56754	349	0.01
+7320	-61937.56754	349	0.01
+7330	-61937.56754	350	0.01
+7340	-61937.56749	350	0.01
+7350	-61937.56749	351	0.01
+7360	-61937.56749	351	0.01
+7370	-61937.56749	352	0.01
+7380	-61937.56749	352	0.01
+7390	-61937.56689	353	0.01
+7400	-61937.56689	353	0.01
+7410	-61937.56689	354	0.01
+7420	-61937.56689	354	0.01
+7430	-61937.56689	355	0.01
+7440	-61937.56689	355	0.01
+7450	-61937.56689	355	0.01
+7460	-61937.56689	356	0.01
+7470	-61937.56689	356	0.01
+7480	-61937.56689	357	0.01
+7490	-61937.56689	357	0.01
+7500	-61937.56373	358	0.01
+7510	-61937.56373	358	0.01
+7520	-61937.56373	359	0.01
+7530	-61937.56373	359	0.01
+7540	-61937.56373	360	0.01
+7550	-61937.5637	360	0.01
+7560	-61937.5637	361	0.01
+7570	-61937.5637	361	0.01
+7580	-61937.5637	361	0.01
+7590	-61937.5637	362	0.01
+7600	-61937.5637	362	0.01
+7610	-61937.56026	363	0.01
+7620	-61937.56026	363	0.01
+7630	-61937.56026	364	0.01
+7640	-61937.56026	364	0.01
+7650	-61937.56026	365	0.01
+7660	-61937.56026	365	0.01
+7670	-61937.56026	366	0.01
+7680	-61937.56026	366	0.01
+7690	-61937.56026	367	0.01
+7700	-61937.56026	367	0.01
+7710	-61937.56026	367	0.01
+7720	-61937.56026	368	0.01
+7730	-61937.56026	368	0.01
+7740	-61937.56026	369	0.01
+7750	-61937.56026	369	0.01
+7760	-61937.56026	370	0.01
+7770	-61937.56026	370	0.01
+7780	-61937.56026	371	0.01
+7790	-61937.56026	371	0.01
+7800	-61937.56026	372	0.01
+7810	-61937.56026	372	0.01
+7820	-61937.56026	373	0.01
+7830	-61937.56026	373	0.01
+7840	-61937.56026	373	0.01
+7850	-61937.56026	374	0.01
+7860	-61937.55985	374	0.01
+7870	-61937.55985	375	0.01
+7880	-61937.55985	375	0.01
+7890	-61937.55985	376	0.01
+7900	-61937.55985	376	0.01
+7910	-61937.55985	377	0.01
+7920	-61937.55985	377	0.01
+7930	-61937.55985	378	0.01
+7940	-61937.55985	378	0.01
+7950	-61937.55985	378	0.01
+7960	-61937.55985	379	0.01
+7970	-61937.55985	379	0.01
+7980	-61937.55985	380	0.01
+7990	-61937.55985	380	0.01
+8000	-61937.55985	381	0.01
+8010	-61937.55985	381	0.01
+8020	-61937.55985	382	0.01
+8030	-61937.55985	382	0.01
+8040	-61937.55985	383	0.01
+8050	-61937.55985	383	0.01
+8060	-61937.55985	384	0.01
+8070	-61937.55953	384	0.01
+8080	-61937.55953	385	0.01
+8090	-61937.55953	385	0.01
+8100	-61937.55953	385	0.01
+8110	-61937.55953	386	0.01
+8120	-61937.55953	386	0.01
+8130	-61937.55953	387	0.01
+8140	-61937.55953	387	0.01
+8150	-61937.55953	388	0.01
+8160	-61937.55941	388	0.01
+8170	-61937.55941	389	0.01
+8180	-61937.55941	389	0.01
+8190	-61937.55941	390	0.01
+8200	-61937.55941	390	0.01
+8210	-61937.55941	391	0.01
+8220	-61937.55672	391	0.01
+8230	-61937.55672	392	0.01
+8240	-61937.55672	392	0.01
+8250	-61937.55672	392	0.01
+8260	-61937.55672	393	0.01
+8270	-61937.55672	393	0.01
+8280	-61937.55672	394	0.01
+8290	-61937.55672	394	0.01
+8300	-61937.55672	395	0.01
+8310	-61937.551	395	0.01
+8320	-61937.551	396	0.01
+8330	-61937.551	396	0.01
+8340	-61937.551	397	0.01
+8350	-61937.54953	397	0.01
+8360	-61937.54953	397	0.01
+8370	-61937.54953	398	0.01
+8380	-61937.54953	398	0.01
+8390	-61937.54953	399	0.01
+8400	-61937.54953	399	0.01
+8410	-61937.54953	400	0.01
+8420	-61937.54953	400	0.01
+8430	-61937.54953	401	0.01
+8440	-61937.54765	401	0.01
+8450	-61937.54765	402	0.01
+8460	-61937.54765	402	0.01
+8470	-61937.54765	403	0.01
+8480	-61937.54765	403	0.01
+8490	-61937.54765	404	0.01
+8500	-61937.54765	404	0.01
+8510	-61937.54765	405	0.01
+8520	-61937.54765	405	0.01
+8530	-61937.54765	406	0.01
+8540	-61937.54765	406	0.01
+8550	-61937.54765	406	0.01
+8560	-61937.54765	407	0.01
+8570	-61937.54765	407	0.01
+8580	-61937.54765	408	0.01
+8590	-61937.54574	408	0.01
+8600	-61937.54574	409	0.01
+8610	-61937.54574	409	0.01
+8620	-61937.54574	410	0.01
+8630	-61937.54574	410	0.01
+8640	-61937.54574	411	0.01
+8650	-61937.54574	411	0.01
+8660	-61937.54574	412	0.01
+8670	-61937.54574	412	0.01
+8680	-61937.54574	412	0.01
+8690	-61937.54574	413	0.01
+8700	-61937.54574	413	0.01
+8710	-61937.54574	414	0.01
+8720	-61937.54574	414	0.01
+8730	-61937.54574	415	0.01
+8740	-61937.54574	415	0.01
+8750	-61937.54574	416	0.01
+8760	-61937.53561	416	0.01
+8770	-61937.53561	417	0.01
+8780	-61937.53561	417	0.01
+8790	-61937.53561	418	0.01
+8800	-61937.53561	418	0.01
+8810	-61937.53561	418	0.01
+8820	-61937.53561	419	0.01
+8830	-61937.53561	419	0.01
+8840	-61937.53561	420	0.01
+8850	-61937.53561	420	0.01
+8860	-61937.53561	421	0.01
+8870	-61937.53561	421	0.01
+8880	-61937.53561	422	0.01
+8890	-61937.53561	422	0.01
+8900	-61937.53561	423	0.01
+8910	-61937.53561	423	0.01
+8920	-61937.53561	424	0.01
+8930	-61937.53561	424	0.01
+8940	-61937.53561	424	0.01
+8950	-61937.53111	425	0.01
+8960	-61937.53111	425	0.01
+8970	-61937.53111	426	0.01
+8980	-61937.53111	426	0.01
+8990	-61937.53111	427	0.01
+9000	-61937.5311	427	0.01
+9010	-61937.5311	428	0.01
+9020	-61937.5311	428	0.01
+9030	-61937.5311	429	0.01
+9040	-61937.5311	429	0.01
+9050	-61937.5311	430	0.01
+9060	-61937.5311	430	0.01
+9070	-61937.5311	431	0.01
+9080	-61937.5311	431	0.01
+9090	-61937.5311	432	0.01
+9100	-61937.5311	432	0.01
+9110	-61937.5311	433	0.01
+9120	-61937.5311	433	0.01
+9130	-61937.5311	434	0.01
+9140	-61937.5311	434	0.01
+9150	-61937.5311	435	0.01
+9160	-61937.5311	435	0.01
+9170	-61937.5311	436	0.01
+9180	-61937.5311	436	0.01
+9190	-61937.53099	437	0.01
+9200	-61937.53099	437	0.01
+9210	-61937.52608	438	0.01
+9220	-61937.52608	438	0.01
+9230	-61937.52601	439	0.01
+9240	-61937.52601	439	0.01
+9250	-61937.52601	440	0.01
+9260	-61937.52601	440	0.01
+9270	-61937.52601	441	0.01
+9280	-61937.52601	441	0.01
+9290	-61937.52601	442	0.01
+9300	-61937.52601	442	0.01
+9310	-61937.52601	443	0.01
+9320	-61937.52551	443	0.01
+9330	-61937.52551	444	0.01
+9340	-61937.52551	444	0.01
+9350	-61937.52551	445	0.01
+9360	-61937.52551	445	0.01
+9370	-61937.52551	446	0.01
+9380	-61937.52551	446	0.01
+9390	-61937.52551	447	0.01
+9400	-61937.52551	447	0.01
+9410	-61937.52551	448	0.01
+9420	-61937.52551	448	0.01
+9430	-61937.52551	448	0.01
+9440	-61937.52551	449	0.01
+9450	-61937.52551	449	0.01
+9460	-61937.52551	450	0.01
+9470	-61937.52551	450	0.01
+9480	-61937.52363	451	0.01
+9490	-61937.52363	451	0.01
+9500	-61937.52363	452	0.01
+9510	-61937.52363	452	0.01
+9520	-61937.52363	453	0.01
+9530	-61937.52363	453	0.01
+9540	-61937.52363	454	0.01
+9550	-61937.52363	454	0.01
+9560	-61937.52363	454	0.01
+9570	-61937.52276	455	0.01
+9580	-61937.52276	455	0.01
+9590	-61937.52276	456	0.01
+9600	-61937.52276	456	0.01
+9610	-61937.51673	457	0.01
+9620	-61937.51673	457	0.01
+9630	-61937.51673	458	0.01
+9640	-61937.51673	458	0.01
+9650	-61937.51673	459	0.01
+9660	-61937.51673	459	0.01
+9670	-61937.51673	460	0.01
+9680	-61937.51673	460	0.01
+9690	-61937.51673	461	0.01
+9700	-61937.51673	461	0.01
+9710	-61937.51673	462	0.01
+9720	-61937.51673	462	0.01
+9730	-61937.51566	463	0.01
+9740	-61937.51566	463	0.01
+9750	-61937.51566	464	0.01
+9760	-61937.51566	464	0.01
+9770	-61937.51566	465	0.01
+9780	-61937.51566	465	0.01
+9790	-61937.51566	466	0.01
+9800	-61937.51566	466	0.01
+9810	-61937.51566	467	0.01
+9820	-61937.51566	467	0.01
+9830	-61937.51566	468	0.01
+9840	-61937.51566	468	0.01
+9850	-61937.51566	468	0.01
+9860	-61937.51566	469	0.01
+9870	-61937.51566	469	0.01
+9880	-61937.51566	470	0.01
+9890	-61937.51566	470	0.01
+9900	-61937.51566	471	0.01
+9910	-61937.51566	471	0.01
+9920	-61937.51566	472	0.01
+9930	-61937.51566	472	0.01
+9940	-61937.51566	473	0.01
+9950	-61937.51566	473	0.01
+9960	-61937.51566	474	0.01
+9970	-61937.51566	474	0.01
+9980	-61937.51562	475	0.01
+9990	-61937.51562	475	0.01
+10000	-61937.51562	476	0.01
+10010	-61937.51562	476	0.01
+10020	-61937.51562	477	0.01
+10030	-61937.51562	477	0.01
+10040	-61937.51562	477	0.01
+10050	-61937.51562	478	0.01
+10060	-61937.51562	479	0.01
+10070	-61937.51562	479	0.01
+10080	-61937.51562	479	0.01
+10090	-61937.51557	480	0.01
+10100	-61937.51557	480	0.01
+10110	-61937.51557	481	0.01
+10120	-61937.51557	481	0.01
+10130	-61937.51557	482	0.01
+10140	-61937.51557	482	0.01
+10150	-61937.51557	483	0.01
+10160	-61937.51557	483	0.01
+10170	-61937.51557	484	0.01
+10180	-61937.51557	484	0.01
+10190	-61937.51516	485	0.01
+10200	-61937.51516	485	0.01
+10210	-61937.51516	485	0.01
+10220	-61937.51516	486	0.01
+10230	-61937.51516	486	0.01
+10240	-61937.51516	487	0.01
+10250	-61937.51516	487	0.01
+10260	-61937.51516	488	0.01
+10270	-61937.51516	488	0.01
+10280	-61937.51516	489	0.01
+10290	-61937.51516	489	0.01
+10300	-61937.51469	489	0.01
+10310	-61937.51469	490	0.01
+10320	-61937.51469	490	0.01
+10330	-61937.51469	491	0.01
+10340	-61937.51469	491	0.01
+10350	-61937.51469	492	0.01
+10360	-61937.51197	492	0.01
+10370	-61937.51197	493	0.01
+10380	-61937.51197	493	0.01
+10390	-61937.51197	494	0.01
+10400	-61937.51197	494	0.01
+10410	-61937.51197	495	0.01
+10420	-61937.51197	495	0.01
+10430	-61937.51197	496	0.01
+10440	-61937.51197	496	0.01
+10450	-61937.51197	496	0.01
+10460	-61937.51197	497	0.01
+10470	-61937.51197	497	0.01
+10480	-61937.51197	498	0.01
+10490	-61937.51197	498	0.01
+10500	-61937.51197	499	0.01
+10510	-61937.51197	499	0.01
+10520	-61937.51197	500	0.01
+10530	-61937.51197	500	0.01
+10540	-61937.51197	501	0.01
+10550	-61937.50706	501	0.01
+10560	-61937.50706	501	0.01
+10570	-61937.50706	502	0.01
+10580	-61937.50706	502	0.01
+10590	-61937.50706	503	0.01
+10600	-61937.50706	503	0.01
+10610	-61937.50706	504	0.01
+10620	-61937.50706	504	0.01
+10630	-61937.50706	505	0.01
+10640	-61937.50706	505	0.01
+10650	-61937.50706	506	0.01
+10660	-61937.50706	506	0.01
+10670	-61937.50706	507	0.01
+10680	-61937.50706	507	0.01
+10690	-61937.50706	508	0.01
+10700	-61937.50706	508	0.01
+10710	-61937.50706	509	0.01
+10720	-61937.50706	509	0.01
+10730	-61937.50706	509	0.01
+10740	-61937.50706	510	0.01
+10750	-61937.50706	510	0.01
+10760	-61937.50616	511	0.01
+10770	-61937.50616	511	0.01
+10780	-61937.50616	512	0.01
+10790	-61937.50616	512	0.01
+10800	-61937.50616	512	0.01
+10810	-61937.50616	513	0.01
+10820	-61937.50616	513	0.01
+10830	-61937.50616	514	0.01
+10840	-61937.50616	514	0.01
+10850	-61937.50616	515	0.01
+10860	-61937.50616	515	0.01
+10870	-61937.50616	516	0.01
+10880	-61937.50616	516	0.01
+10890	-61937.50616	517	0.01
+10900	-61937.50417	517	0.01
+10910	-61937.50417	518	0.01
+10920	-61937.50417	518	0.01
+10930	-61937.50417	519	0.01
+10940	-61937.50417	519	0.01
+10950	-61937.50417	520	0.01
+10960	-61937.50417	520	0.01
+10970	-61937.50417	520	0.01
+10980	-61937.50417	521	0.01
+10990	-61937.50417	521	0.01
+11000	-61937.50417	522	0.01
+11010	-61937.50417	522	0.01
+11020	-61937.50417	523	0.01
+11030	-61937.50417	523	0.01
+11040	-61937.50417	524	0.01
+11050	-61937.50417	524	0.01
+11060	-61937.50417	525	0.01
+11070	-61937.50417	525	0.01
+11080	-61937.50417	526	0.01
+11090	-61937.50417	526	0.01
+11100	-61937.50417	526	0.01
+11110	-61937.50245	527	0.01
+11120	-61937.50245	527	0.01
+11130	-61937.50245	528	0.01
+11140	-61937.50245	528	0.01
+11150	-61937.50245	529	0.01
+11160	-61937.50245	529	0.01
+11170	-61937.50245	530	0.01
+11180	-61937.50245	530	0.01
+11190	-61937.50245	531	0.01
+11200	-61937.50245	531	0.01
+11210	-61937.50245	531	0.01
+11220	-61937.50245	532	0.01
+11230	-61937.50245	532	0.01
+11240	-61937.50245	533	0.01
+11250	-61937.50245	533	0.01
+11260	-61937.50245	534	0.01
+11270	-61937.50245	534	0.01
+11280	-61937.50245	534	0.01
+11290	-61937.50245	535	0.01
+11300	-61937.50185	536	0.01
+11310	-61937.50185	536	0.01
+11320	-61937.50144	536	0.01
+11330	-61937.50144	537	0.01
+11340	-61937.50144	537	0.01
+11350	-61937.50144	538	0.01
+11360	-61937.50144	538	0.01
+11370	-61937.50144	539	0.01
+11380	-61937.50144	539	0.01
+11390	-61937.50045	540	0.01
+11400	-61937.50045	540	0.01
+11410	-61937.50045	541	0.01
+11420	-61937.50045	541	0.01
+11430	-61937.50045	542	0.01
+11440	-61937.50045	542	0.01
+11450	-61937.50045	542	0.01
+11460	-61937.50045	543	0.01
+11470	-61937.50045	543	0.01
+11480	-61937.50045	544	0.01
+11490	-61937.50045	544	0.01
+11500	-61937.50045	545	0.01
+11510	-61937.50045	545	0.01
+11520	-61937.50045	546	0.01
+11530	-61937.50045	546	0.01
+11540	-61937.50045	547	0.01
+11550	-61937.50045	547	0.01
+11560	-61937.50045	547	0.01
+11570	-61937.50045	548	0.01
+11580	-61937.50045	548	0.01
+11590	-61937.50045	549	0.01
+11600	-61937.50045	549	0.01
+11610	-61937.50045	550	0.01
+11620	-61937.50045	550	0.01
+11630	-61937.50027	551	0.01
+11640	-61937.50027	551	0.01
+11650	-61937.50027	552	0.01
+11660	-61937.50027	552	0.01
+11670	-61937.50027	552	0.01
+11680	-61937.49167	553	0.01
+11690	-61937.49167	553	0.01
+11700	-61937.48824	554	0.01
+11710	-61937.48824	554	0.01
+11720	-61937.48824	555	0.01
+11730	-61937.48824	555	0.01
+11740	-61937.48824	556	0.01
+11750	-61937.48824	556	0.01
+11760	-61937.48824	557	0.01
+11770	-61937.48824	557	0.01
+11780	-61937.48824	558	0.01
+11790	-61937.48824	558	0.01
+11800	-61937.48824	558	0.01
+11810	-61937.48634	559	0.01
+11820	-61937.48634	559	0.01
+11830	-61937.48634	560	0.01
+11840	-61937.48634	560	0.01
+11850	-61937.48634	561	0.01
+11860	-61937.48634	561	0.01
+11870	-61937.48634	562	0.01
+11880	-61937.48634	562	0.01
+11890	-61937.48634	562	0.01
+11900	-61937.48634	563	0.01
+11910	-61937.48634	563	0.01
+11920	-61937.48634	564	0.01
+11930	-61937.48634	564	0.01
+11940	-61937.48634	565	0.01
+11950	-61937.48634	565	0.01
+11960	-61937.48634	566	0.01
+11970	-61937.48634	566	0.01
+11980	-61937.48634	566	0.01
+11990	-61937.48634	567	0.01
+12000	-61937.48634	567	0.01
+12010	-61937.48634	568	0.01
+12020	-61937.48634	568	0.01
+12030	-61937.48634	569	0.01
+12040	-61937.48634	569	0.01
+12050	-61937.48634	570	0.01
+12060	-61937.48634	570	0.01
+12070	-61937.48634	571	0.01
+12080	-61937.48611	571	0.01
+12090	-61937.48611	572	0.01
+12100	-61937.48611	572	0.01
+12110	-61937.48611	573	0.01
+12120	-61937.48611	573	0.01
+12130	-61937.48611	574	0.01
+12140	-61937.48611	574	0.01
+12150	-61937.48611	575	0.01
+12160	-61937.48611	575	0.01
+12170	-61937.48611	576	0.01
+12180	-61937.48611	576	0.01
+12190	-61937.48611	577	0.01
+12200	-61937.48611	577	0.01
+12210	-61937.48611	578	0.01
+12220	-61937.48611	578	0.01
+12230	-61937.48611	578	0.01
+12240	-61937.48611	579	0.01
+12250	-61937.48611	579	0.01
+12260	-61937.48611	580	0.01
+12270	-61937.48611	580	0.01
+12280	-61937.48611	581	0.01
+12290	-61937.48611	581	0.01
+12300	-61937.48611	582	0.01
+12310	-61937.48611	582	0.01
+12320	-61937.48611	583	0.01
+12330	-61937.48611	583	0.01
+12340	-61937.48611	584	0.01
+12350	-61937.48611	584	0.01
+12360	-61937.48611	585	0.01
+12370	-61937.48611	585	0.01
+12380	-61937.48611	585	0.01
+12390	-61937.48611	586	0.01
+12400	-61937.48611	586	0.01
+12410	-61937.48611	587	0.01
+12420	-61937.48611	587	0.01
+12430	-61937.48611	588	0.01
+12440	-61937.48611	588	0.01
+12450	-61937.48611	588	0.01
+12460	-61937.48611	589	0.01
+12470	-61937.48611	589	0.01
+12480	-61937.48611	590	0.01
+12490	-61937.48611	590	0.01
+12500	-61937.48611	591	0.01
+12510	-61937.48611	591	0.01
+12520	-61937.48611	592	0.01
+12530	-61937.48611	592	0.01
+12540	-61937.48611	593	0.01
+12550	-61937.48611	593	0.01
+12560	-61937.48611	594	0.01
+12570	-61937.48611	594	0.01
+12580	-61937.48611	595	0.01
+12590	-61937.48611	595	0.01
+12600	-61937.48611	596	0.01
+12610	-61937.48611	596	0.01
+12620	-61937.48611	597	0.01
+12630	-61937.48611	597	0.01
+12640	-61937.48127	598	0.01
+12650	-61937.48127	598	0.01
+12660	-61937.48127	599	0.01
+12670	-61937.48127	599	0.01
+12680	-61937.48127	599	0.01
+12690	-61937.48127	600	0.01
+12700	-61937.47413	600	0.01
+12710	-61937.47099	601	0.01
+12720	-61937.47099	601	0.01
+12730	-61937.47099	602	0.01
+12740	-61937.47099	602	0.01
+12750	-61937.47099	603	0.01
+12760	-61937.47099	603	0.01
+12770	-61937.47099	604	0.01
+12780	-61937.47099	604	0.01
+12790	-61937.47099	605	0.01
+12800	-61937.47099	605	0.01
+12810	-61937.47099	606	0.01
+12820	-61937.47099	606	0.01
+12830	-61937.47099	607	0.01
+12840	-61937.47099	607	0.01
+12850	-61937.47099	608	0.01
+12860	-61937.47099	608	0.01
+12870	-61937.47099	609	0.01
+12880	-61937.47099	609	0.01
+12890	-61937.47099	609	0.01
+12900	-61937.47099	610	0.01
+12910	-61937.47099	610	0.01
+12920	-61937.47099	611	0.01
+12930	-61937.47099	611	0.01
+12940	-61937.47099	612	0.01
+12950	-61937.4706	612	0.01
+12960	-61937.4706	613	0.01
+12970	-61937.4706	613	0.01
+12980	-61937.4706	613	0.01
+12990	-61937.4706	614	0.01
+13000	-61937.4706	614	0.01
+13010	-61937.4706	615	0.01
+13020	-61937.4706	615	0.01
+13030	-61937.4706	616	0.01
+13040	-61937.46932	616	0.01
+13050	-61937.46932	617	0.01
+13060	-61937.46932	617	0.01
+13070	-61937.46932	618	0.01
+13080	-61937.46932	618	0.01
+13090	-61937.46932	619	0.01
+13100	-61937.46932	619	0.01
+13110	-61937.46932	619	0.01
+13120	-61937.46932	620	0.01
+13130	-61937.46932	620	0.01
+13140	-61937.46932	621	0.01
+13150	-61937.46932	621	0.01
+13160	-61937.46932	622	0.01
+13170	-61937.46932	622	0.01
+13180	-61937.46932	623	0.01
+13190	-61937.46932	623	0.01
+13200	-61937.46932	624	0.01
+13210	-61937.46932	624	0.01
+13220	-61937.46734	625	0.01
+13230	-61937.46734	625	0.01
+13240	-61937.46734	626	0.01
+13250	-61937.46734	626	0.01
+13260	-61937.46734	626	0.01
+13270	-61937.46734	627	0.01
+13280	-61937.46734	627	0.01
+13290	-61937.46734	628	0.01
+13300	-61937.46734	628	0.01
+13310	-61937.46734	629	0.01
+13320	-61937.46734	629	0.01
+13330	-61937.46734	630	0.01
+13340	-61937.46055	630	0.01
+13350	-61937.46055	631	0.01
+13360	-61937.46055	631	0.01
+13370	-61937.46055	632	0.01
+13380	-61937.46055	632	0.01
+13390	-61937.46055	632	0.01
+13400	-61937.46055	633	0.01
+13410	-61937.46055	633	0.01
+13420	-61937.46055	634	0.01
+13430	-61937.46041	634	0.01
+13440	-61937.46041	635	0.01
+13450	-61937.46041	635	0.01
+13460	-61937.46041	636	0.01
+13470	-61937.46041	636	0.01
+13480	-61937.46041	637	0.01
+13490	-61937.46041	637	0.01
+13500	-61937.46041	638	0.01
+13510	-61937.46041	638	0.01
+13520	-61937.45948	639	0.01
+13530	-61937.45948	639	0.01
+13540	-61937.45948	640	0.01
+13550	-61937.45948	640	0.01
+13560	-61937.45948	640	0.01
+13570	-61937.45948	641	0.01
+13580	-61937.45893	641	0.01
+13590	-61937.45893	642	0.01
+13600	-61937.45893	642	0.01
+13610	-61937.45893	643	0.01
+13620	-61937.45893	643	0.01
+13630	-61937.45893	644	0.01
+13640	-61937.45893	644	0.01
+13650	-61937.45893	645	0.01
+13660	-61937.45893	645	0.01
+13670	-61937.45893	646	0.01
+13680	-61937.45893	646	0.01
+13690	-61937.45893	646	0.01
+13700	-61937.45893	647	0.01
+13710	-61937.45893	647	0.01
+13720	-61937.45893	648	0.01
+13730	-61937.45893	648	0.01
+13740	-61937.45893	649	0.01
+13750	-61937.45893	649	0.01
+13760	-61937.45893	650	0.01
+13770	-61937.45893	650	0.01
+13780	-61937.45893	651	0.01
+13790	-61937.45893	651	0.01
+13800	-61937.45893	652	0.01
+13810	-61937.45893	652	0.01
+13820	-61937.45893	653	0.01
+13830	-61937.45893	653	0.01
+13840	-61937.45893	654	0.01
+13850	-61937.45893	654	0.01
+13860	-61937.45893	654	0.01
+13870	-61937.45893	655	0.01
+13880	-61937.45893	655	0.01
+13890	-61937.45893	656	0.01
+13900	-61937.45893	656	0.01
+13910	-61937.45893	657	0.01
+13920	-61937.45893	657	0.01
+13930	-61937.45893	658	0.01
+13940	-61937.45646	658	0.01
+13950	-61937.45646	659	0.01
+13960	-61937.45646	659	0.01
+13970	-61937.45646	660	0.01
+13980	-61937.45646	660	0.01
+13990	-61937.45646	660	0.01
+14000	-61937.45646	661	0.01
+14010	-61937.45646	661	0.01
+14020	-61937.45646	662	0.01
+14030	-61937.45646	662	0.01
+14040	-61937.45646	663	0.01
+14050	-61937.45646	663	0.01
+14060	-61937.45646	664	0.01
+14070	-61937.45646	664	0.01
+14080	-61937.45646	665	0.01
+14090	-61937.45646	665	0.01
+14100	-61937.45646	666	0.01
+14110	-61937.45646	666	0.01
+14120	-61937.45646	667	0.01
+14130	-61937.45646	667	0.01
+14140	-61937.45646	667	0.01
+14150	-61937.45646	668	0.01
+14160	-61937.45646	668	0.01
+14170	-61937.45646	669	0.01
+14180	-61937.45646	669	0.01
+14190	-61937.45646	670	0.01
+14200	-61937.45646	670	0.01
+14210	-61937.45646	671	0.01
+14220	-61937.45646	671	0.01
+14230	-61937.45646	672	0.01
+14240	-61937.45646	672	0.01
+14250	-61937.45646	673	0.01
+14260	-61937.45646	673	0.01
+14270	-61937.45646	673	0.01
+14280	-61937.45646	674	0.01
+14290	-61937.45645	674	0.01
+14300	-61937.45645	675	0.01
+14310	-61937.45645	675	0.01
+14320	-61937.45645	676	0.01
+14330	-61937.45252	676	0.01
+14340	-61937.45252	677	0.01
+14350	-61937.45252	677	0.01
+14360	-61937.45252	678	0.01
+14370	-61937.45252	678	0.01
+14380	-61937.45252	679	0.01
+14390	-61937.45252	679	0.01
+14400	-61937.45252	680	0.01
+14410	-61937.45252	680	0.01
+14420	-61937.45252	681	0.01
+14430	-61937.45252	681	0.01
+14440	-61937.45252	681	0.01
+14450	-61937.45064	682	0.01
+14460	-61937.45064	682	0.01
+14470	-61937.45064	683	0.01
+14480	-61937.45064	683	0.01
+14490	-61937.45064	684	0.01
+14500	-61937.45064	684	0.01
+14510	-61937.45064	685	0.01
+14520	-61937.45064	685	0.01
+14530	-61937.45064	686	0.01
+14540	-61937.45064	686	0.01
+14550	-61937.45064	687	0.01
+14560	-61937.45064	687	0.01
+14570	-61937.45061	687	0.01
+14580	-61937.45061	688	0.01
+14590	-61937.45061	688	0.01
+14600	-61937.44951	689	0.01
+14610	-61937.44211	689	0.01
+14620	-61937.44211	690	0.01
+14630	-61937.44211	690	0.01
+14640	-61937.44211	691	0.01
+14650	-61937.44211	691	0.01
+14660	-61937.44211	692	0.01
+14670	-61937.44211	692	0.01
+14680	-61937.44211	693	0.01
+14690	-61937.44211	693	0.01
+14700	-61937.44211	693	0.01
+14710	-61937.44211	694	0.01
+14720	-61937.44211	694	0.01
+14730	-61937.44211	695	0.01
+14740	-61937.44211	695	0.01
+14750	-61937.44211	696	0.01
+14760	-61937.44211	696	0.01
+14770	-61937.44211	697	0.01
+14780	-61937.44211	697	0.01
+14790	-61937.4401	698	0.01
+14800	-61937.4401	698	0.01
+14810	-61937.4401	699	0.01
+14820	-61937.4401	699	0.01
+14830	-61937.4401	699	0.01
+14840	-61937.4401	700	0.01
+14850	-61937.4401	700	0.01
+14860	-61937.4401	701	0.01
+14870	-61937.4401	701	0.01
+14880	-61937.4401	702	0.01
+14890	-61937.4401	702	0.01
+14900	-61937.4401	703	0.01
+14910	-61937.4401	703	0.01
+14920	-61937.4401	703	0.01
+14930	-61937.4401	704	0.01
+14940	-61937.4401	704	0.01
+14950	-61937.4401	705	0.01
+14960	-61937.43954	705	0.01
+14970	-61937.43954	706	0.01
+14980	-61937.43954	706	0.01
+14990	-61937.43954	707	0.01
+15000	-61937.43954	707	0.01
+15010	-61937.43916	709	0.01
+15020	-61937.43916	709	0.01
+15030	-61937.43916	710	0.01
+15040	-61937.43916	710	0.01
+15050	-61937.43916	711	0.01
+15060	-61937.43916	711	0.01
+15070	-61937.43916	712	0.01
+15080	-61937.43916	712	0.01
+15090	-61937.43916	713	0.01
+15100	-61937.43916	713	0.01
+15110	-61937.43916	714	0.01
+15120	-61937.43916	714	0.01
+15130	-61937.43916	714	0.01
+15140	-61937.43916	715	0.01
+15150	-61937.43916	715	0.01
+15160	-61937.43916	716	0.01
+15170	-61937.43916	716	0.01
+15180	-61937.43916	717	0.01
+15190	-61937.43916	717	0.01
+15200	-61937.43916	718	0.01
+15210	-61937.43831	718	0.01
+15220	-61937.43831	719	0.01
+15230	-61937.43831	719	0.01
+15240	-61937.43831	720	0.01
+15250	-61937.43831	720	0.01
+15260	-61937.43831	721	0.01
+15270	-61937.43831	721	0.01
+15280	-61937.43831	721	0.01
+15290	-61937.43831	722	0.01
+15300	-61937.43831	722	0.01
+15310	-61937.43831	723	0.01
+15320	-61937.43831	723	0.01
+15330	-61937.43831	724	0.01
+15340	-61937.43831	724	0.01
+15350	-61937.43831	725	0.01
+15360	-61937.43831	725	0.01
+15370	-61937.43831	726	0.01
+15380	-61937.43831	726	0.01
+15390	-61937.43831	727	0.01
+15400	-61937.43831	727	0.01
+15410	-61937.43831	727	0.01
+15420	-61937.43831	728	0.01
+15430	-61937.43831	728	0.01
+15440	-61937.43831	729	0.01
+15450	-61937.43831	729	0.01
+15460	-61937.43831	730	0.01
+15470	-61937.43831	730	0.01
+15480	-61937.43831	731	0.01
+15490	-61937.43831	731	0.01
+15500	-61937.43719	732	0.01
+15510	-61937.43719	732	0.01
+15520	-61937.43719	733	0.01
+15530	-61937.43719	733	0.01
+15540	-61937.43719	734	0.01
+15550	-61937.43719	734	0.01
+15560	-61937.43719	734	0.01
+15570	-61937.43719	735	0.01
+15580	-61937.43719	735	0.01
+15590	-61937.43719	736	0.01
+15600	-61937.43719	736	0.01
+15610	-61937.43719	737	0.01
+15620	-61937.4353	737	0.01
+15630	-61937.4353	738	0.01
+15640	-61937.4353	738	0.01
+15650	-61937.43494	739	0.01
+15660	-61937.43494	739	0.01
+15670	-61937.43494	740	0.01
+15680	-61937.43494	740	0.01
+15690	-61937.43494	741	0.01
+15700	-61937.43494	741	0.01
+15710	-61937.43494	742	0.01
+15720	-61937.43494	742	0.01
+15730	-61937.43494	742	0.01
+15740	-61937.43494	743	0.01
+15750	-61937.43403	743	0.01
+15760	-61937.43403	744	0.01
+15770	-61937.43403	744	0.01
+15780	-61937.43396	745	0.01
+15790	-61937.43396	745	0.01
+15800	-61937.43396	746	0.01
+15810	-61937.43396	746	0.01
+15820	-61937.43396	747	0.01
+15830	-61937.43396	747	0.01
+15840	-61937.43396	748	0.01
+15850	-61937.43396	748	0.01
+15860	-61937.43396	749	0.01
+15870	-61937.43396	749	0.01
+15880	-61937.43396	750	0.01
+15890	-61937.43396	750	0.01
+15900	-61937.43396	750	0.01
+15910	-61937.43392	751	0.01
+15920	-61937.43392	751	0.01
+15930	-61937.43392	752	0.01
+15940	-61937.43392	752	0.01
+15950	-61937.43392	753	0.01
+15960	-61937.43392	753	0.01
+15970	-61937.43392	754	0.01
+15980	-61937.43392	754	0.01
+15990	-61937.43392	755	0.01
+16000	-61937.43392	755	0.01
+16010	-61937.43334	756	0.01
+16020	-61937.43334	756	0.01
+16030	-61937.43334	757	0.01
+16040	-61937.43334	757	0.01
+16050	-61937.43334	758	0.01
+16060	-61937.43334	758	0.01
+16070	-61937.43334	758	0.01
+16080	-61937.43334	759	0.01
+16090	-61937.43334	759	0.01
+16100	-61937.43334	760	0.01
+16110	-61937.43334	760	0.01
+16120	-61937.43334	761	0.01
+16130	-61937.43334	761	0.01
+16140	-61937.43334	762	0.01
+16150	-61937.43334	762	0.01
+16160	-61937.43334	763	0.01
+16170	-61937.43325	763	0.01
+16180	-61937.43325	764	0.01
+16190	-61937.43325	764	0.01
+16200	-61937.43325	765	0.01
+16210	-61937.43325	765	0.01
+16220	-61937.43325	766	0.01
+16230	-61937.43325	766	0.01
+16240	-61937.43325	766	0.01
+16250	-61937.43325	767	0.01
+16260	-61937.43325	767	0.01
+16270	-61937.43325	768	0.01
+16280	-61937.43325	768	0.01
+16290	-61937.43325	769	0.01
+16300	-61937.43325	769	0.01
+16310	-61937.43325	770	0.01
+16320	-61937.43325	770	0.01
+16330	-61937.43325	771	0.01
+16340	-61937.43325	771	0.01
+16350	-61937.43325	772	0.01
+16360	-61937.43325	772	0.01
+16370	-61937.43325	772	0.01
+16380	-61937.43325	773	0.01
+16390	-61937.43325	773	0.01
+16400	-61937.43325	774	0.01
+Score after final optimization: -61937.27049
+Final	-61937.27049	795	0.01
+Search rep 2 (of 2)
+random seed = 1646090181
+gen	best_like	time	optPrecision
+0	-100067.2273	825	0.5
+10	-99336.89225	825	0.5
+20	-98602.16974	826	0.5
+30	-97983.90518	826	0.5
+40	-95545.02024	827	0.5
+50	-94714.33787	827	0.5
+60	-93743.155	828	0.5
+70	-92280.64303	828	0.5
+80	-90727.45166	829	0.5
+90	-90255.82646	829	0.5
+100	-89028.2502	830	0.5
+110	-87260.20349	831	0.5
+120	-84980.85096	831	0.5
+130	-83718.33069	832	0.5
+140	-82532.09729	832	0.5
+150	-81996.07267	833	0.5
+160	-81159.94313	833	0.5
+170	-80454.06965	834	0.5
+180	-80396.52652	834	0.5
+190	-80193.2345	835	0.5
+200	-78816.4419	835	0.5
+210	-78612.3718	836	0.5
+220	-76612.04307	836	0.5
+230	-75510.74805	837	0.5
+240	-75297.73314	837	0.5
+250	-74947.35006	838	0.5
+260	-74928.47341	838	0.5
+270	-74852.7831	839	0.5
+280	-74782.95905	839	0.5
+290	-74712.46694	840	0.5
+300	-74605.01145	840	0.5
+310	-74312.40503	840	0.5
+320	-73472.84544	841	0.5
+330	-73229.56189	841	0.5
+340	-72212.3519	842	0.5
+350	-72071.75436	843	0.5
+360	-71604.85542	843	0.5
+370	-70027.99509	844	0.5
+380	-69816.68995	844	0.5
+390	-69539.04152	845	0.5
+400	-69536.02833	845	0.5
+410	-69414.38775	846	0.5
+420	-69133.73539	846	0.5
+430	-68930.53882	847	0.5
+440	-68848.50793	847	0.5
+450	-68236.33467	848	0.5
+460	-67672.42604	848	0.5
+470	-67354.73429	849	0.5
+480	-66582.12989	849	0.5
+490	-66582.12989	850	0.5
+500	-66577.36427	850	0.5
+510	-66482.89302	851	0.5
+520	-66464.63804	851	0.5
+530	-66412.36081	851	0.5
+540	-66408.80266	852	0.5
+550	-66406.66212	852	0.5
+560	-66404.19124	853	0.5
+570	-66403.28578	853	0.5
+580	-65794.5938	854	0.5
+590	-65650.16531	854	0.5
+600	-65606.73303	855	0.5
+610	-65576.32098	855	0.5
+620	-65101.55865	855	0.5
+630	-65043.63626	856	0.5
+640	-64992.58155	856	0.5
+650	-64984.59578	857	0.5
+660	-64652.78166	857	0.5
+670	-64652.28361	858	0.5
+680	-64651.98024	858	0.5
+690	-64337.95091	859	0.5
+700	-64212.75251	859	0.5
+710	-64119.75446	860	0.5
+720	-63995.04538	860	0.5
+730	-63994.33635	860	0.5
+740	-63994.33635	861	0.5
+750	-63974.9484	861	0.5
+760	-63974.9484	862	0.5
+770	-63949.83059	862	0.5
+780	-63949.83059	863	0.5
+790	-63896.25333	863	0.5
+800	-63896.25121	863	0.5
+810	-63891.6549	864	0.5
+820	-63888.37982	864	0.5
+830	-63699.21953	865	0.5
+840	-63689.47476	865	0.5
+850	-63684.76921	866	0.5
+860	-63562.89259	866	0.5
+870	-63022.85534	867	0.5
+880	-63007.28876	867	0.5
+890	-63007.28876	867	0.5
+900	-63005.80582	868	0.5
+910	-62929.84111	868	0.5
+920	-62923.5999	869	0.5
+930	-62684.91529	869	0.5
+940	-62633.7885	870	0.5
+950	-62631.05172	870	0.5
+960	-62536.84051	871	0.5
+970	-62526.99842	871	0.5
+980	-62525.58908	871	0.5
+990	-62506.67505	872	0.5
+1000	-62503.74692	872	0.5
+1010	-62502.50684	873	0.5
+1020	-62501.41752	873	0.5
+1030	-62500.97719	873	0.5
+1040	-62499.76506	874	0.5
+1050	-62499.46681	874	0.5
+1060	-62481.04911	875	0.5
+1070	-62481.04911	875	0.5
+1080	-62420.32974	876	0.5
+1090	-62363.80196	876	0.5
+1100	-62075.52678	876	0.5
+1110	-62075.26954	877	0.5
+1120	-62075.08164	877	0.5
+1130	-62075.07934	878	0.5
+1140	-62069.71218	878	0.5
+1150	-62069.60972	878	0.5
+1160	-62069.60972	879	0.5
+1170	-62069.60972	879	0.5
+1180	-62069.60469	879	0.5
+1190	-62069.15895	880	0.5
+1200	-62069.15895	880	0.5
+1210	-62069.11056	881	0.5
+1220	-62068.97402	881	0.5
+1230	-62065.54877	881	0.5
+1240	-62044.15552	882	0.5
+1250	-62037.19158	882	0.5
+1260	-62037.19158	883	0.5
+1270	-62036.45376	883	0.5
+1280	-62036.45132	883	0.5
+1290	-62035.52552	884	0.5
+1300	-62032.32059	884	0.5
+1310	-62031.84695	885	0.5
+1320	-62031.72872	885	0.5
+1330	-62031.72625	886	0.5
+1340	-62031.72625	886	0.5
+1350	-62030.8536	886	0.5
+1360	-62030.20724	887	0.5
+1370	-62026.565	887	0.5
+1380	-62023.31095	888	0.5
+1390	-62023.12534	888	0.5
+1400	-62020.3538	888	0.5
+1410	-62020.09297	889	0.5
+1420	-62020.09297	889	0.5
+1430	-62019.66032	890	0.5
+1440	-62018.66685	890	0.5
+1450	-62018.66685	891	0.5
+1460	-62017.92088	891	0.5
+1470	-62017.81635	891	0.5
+1480	-62017.21904	892	0.5
+1490	-62017.21904	892	0.5
+1500	-62017.21483	893	0.5
+1510	-62017.21483	893	0.5
+1520	-62016.1228	893	0.5
+1530	-62015.93543	894	0.5
+1540	-62014.34016	894	0.5
+1550	-62014.32018	895	0.5
+1560	-62014.2108	895	0.5
+1570	-62014.05756	896	0.5
+1580	-62013.57178	896	0.5
+1590	-62013.50317	897	0.5
+1600	-62012.68987	897	0.5
+1610	-61996.40613	898	0.451
+1620	-61995.87578	899	0.451
+1630	-61995.71028	899	0.451
+1640	-61995.59621	900	0.451
+1650	-61995.59612	900	0.451
+1660	-61994.84946	901	0.451
+1670	-61984.7593	901	0.451
+1680	-61983.5335	902	0.451
+1690	-61983.34159	902	0.451
+1700	-61983.34159	903	0.451
+1710	-61983.10013	903	0.451
+1720	-61983.10013	904	0.451
+1730	-61973.56078	904	0.451
+1740	-61970.98164	904	0.451
+1750	-61970.8111	905	0.451
+1760	-61970.73611	905	0.451
+1770	-61970.17312	906	0.451
+1780	-61970.04787	906	0.451
+1790	-61970.02617	907	0.451
+1800	-61970.01068	907	0.451
+1810	-61969.29214	907	0.451
+1820	-61964.18255	908	0.451
+1830	-61962.59972	908	0.451
+1840	-61962.41446	908	0.451
+1850	-61962.35798	909	0.451
+1860	-61962.30134	909	0.451
+1870	-61960.45401	910	0.451
+1880	-61959.50276	910	0.451
+1890	-61956.56121	910	0.451
+1900	-61956.55013	911	0.451
+1910	-61956.30009	911	0.451
+1920	-61956.01384	911	0.451
+1930	-61955.75751	912	0.451
+1940	-61954.31782	912	0.451
+1950	-61953.59208	912	0.451
+1960	-61952.6122	913	0.451
+1970	-61952.45446	913	0.451
+1980	-61952.26641	914	0.451
+1990	-61952.04591	914	0.451
+2000	-61951.83969	914	0.451
+2010	-61951.35791	915	0.451
+2020	-61950.23197	915	0.451
+2030	-61949.95077	915	0.451
+2040	-61949.86778	916	0.451
+2050	-61949.55773	916	0.451
+2060	-61949.28871	916	0.451
+2070	-61949.26855	917	0.451
+2080	-61949.03936	917	0.451
+2090	-61949.02032	918	0.451
+2100	-61948.06067	918	0.451
+2110	-61947.83184	919	0.402
+2120	-61947.69213	919	0.402
+2130	-61947.412	920	0.402
+2140	-61946.98893	920	0.402
+2150	-61946.98893	921	0.402
+2160	-61946.65967	921	0.402
+2170	-61946.59793	921	0.402
+2180	-61946.41209	922	0.402
+2190	-61946.24597	922	0.402
+2200	-61946.2281	922	0.402
+2210	-61946.2281	923	0.402
+2220	-61945.87238	923	0.402
+2230	-61945.83167	923	0.402
+2240	-61945.76691	924	0.402
+2250	-61945.76691	924	0.402
+2260	-61945.70255	925	0.402
+2270	-61945.70255	925	0.402
+2280	-61945.6135	925	0.402
+2290	-61945.54879	926	0.402
+2300	-61945.4277	926	0.402
+2310	-61945.4277	926	0.402
+2320	-61945.4277	927	0.402
+2330	-61945.24912	927	0.402
+2340	-61945.20165	928	0.402
+2350	-61945.09761	928	0.402
+2360	-61945.06224	928	0.402
+2370	-61945.04784	929	0.402
+2380	-61945.01001	929	0.402
+2390	-61944.99101	929	0.402
+2400	-61944.98089	930	0.402
+2410	-61944.97232	930	0.402
+2420	-61944.88543	931	0.402
+2430	-61944.88543	931	0.402
+2440	-61944.79783	931	0.402
+2450	-61944.71851	932	0.402
+2460	-61944.69294	932	0.402
+2470	-61944.64056	933	0.402
+2480	-61944.63188	933	0.402
+2490	-61944.57812	933	0.402
+2500	-61944.47838	934	0.402
+2510	-61944.32102	934	0.402
+2520	-61944.12536	935	0.402
+2530	-61944.05846	935	0.402
+2540	-61943.96441	935	0.402
+2550	-61943.86038	936	0.402
+2560	-61943.73039	936	0.402
+2570	-61943.61351	936	0.402
+2580	-61943.43778	937	0.402
+2590	-61943.43778	937	0.402
+2600	-61943.43658	938	0.402
+2610	-61943.42133	939	0.353
+2620	-61943.30196	939	0.353
+2630	-61943.26218	939	0.353
+2640	-61943.18894	940	0.353
+2650	-61943.16925	940	0.353
+2660	-61943.16589	941	0.353
+2670	-61943.16589	941	0.353
+2680	-61943.15568	942	0.353
+2690	-61942.96184	942	0.353
+2700	-61942.96184	942	0.353
+2710	-61942.92435	943	0.353
+2720	-61942.89377	943	0.353
+2730	-61942.8893	944	0.353
+2740	-61942.8893	944	0.353
+2750	-61942.86707	945	0.353
+2760	-61942.83557	945	0.353
+2770	-61942.83557	946	0.353
+2780	-61942.83444	946	0.353
+2790	-61942.80726	946	0.353
+2800	-61942.80726	947	0.353
+2810	-61942.72643	947	0.353
+2820	-61942.72643	948	0.353
+2830	-61942.53411	948	0.353
+2840	-61942.52538	948	0.353
+2850	-61942.52404	949	0.353
+2860	-61942.51834	949	0.353
+2870	-61942.4957	950	0.353
+2880	-61942.48567	950	0.353
+2890	-61942.46723	950	0.353
+2900	-61942.46356	951	0.353
+2910	-61942.46356	951	0.353
+2920	-61942.39956	952	0.353
+2930	-61942.33493	952	0.353
+2940	-61942.29503	952	0.353
+2950	-61942.23632	953	0.353
+2960	-61942.11142	953	0.353
+2970	-61941.99497	954	0.353
+2980	-61941.86533	954	0.353
+2990	-61941.86533	954	0.353
+3000	-61941.8507	955	0.353
+3010	-61941.8507	955	0.353
+3020	-61941.8507	956	0.353
+3030	-61941.8507	956	0.353
+3040	-61941.8507	956	0.353
+3050	-61941.84291	957	0.353
+3060	-61941.84291	957	0.353
+3070	-61941.84291	957	0.353
+3080	-61941.82639	958	0.353
+3090	-61941.80822	958	0.353
+3100	-61941.78204	958	0.353
+3110	-61941.76868	960	0.304
+3120	-61941.75157	960	0.304
+3130	-61941.6822	960	0.304
+3140	-61941.66242	961	0.304
+3150	-61941.59537	961	0.304
+3160	-61941.56757	961	0.304
+3170	-61941.54586	962	0.304
+3180	-61941.54507	962	0.304
+3190	-61941.54507	963	0.304
+3200	-61941.54507	963	0.304
+3210	-61941.54507	963	0.304
+3220	-61941.54507	964	0.304
+3230	-61941.42056	964	0.304
+3240	-61941.42056	965	0.304
+3250	-61941.42056	965	0.304
+3260	-61941.42056	965	0.304
+3270	-61941.39773	966	0.304
+3280	-61941.39773	966	0.304
+3290	-61941.39773	967	0.304
+3300	-61941.39773	967	0.304
+3310	-61941.38631	967	0.304
+3320	-61941.38631	968	0.304
+3330	-61941.38631	968	0.304
+3340	-61941.38535	969	0.304
+3350	-61941.38535	969	0.304
+3360	-61941.3635	969	0.304
+3370	-61941.3357	970	0.304
+3380	-61941.3357	970	0.304
+3390	-61941.29425	971	0.304
+3400	-61941.29425	971	0.304
+3410	-61941.29425	972	0.304
+3420	-61941.29147	972	0.304
+3430	-61941.29147	972	0.304
+3440	-61941.29147	973	0.304
+3450	-61941.29147	973	0.304
+3460	-61941.29147	974	0.304
+3470	-61941.25831	974	0.304
+3480	-61941.25831	975	0.304
+3490	-61941.25149	975	0.304
+3500	-61941.25149	975	0.304
+3510	-61941.24656	976	0.304
+3520	-61941.22013	976	0.304
+3530	-61941.22013	977	0.304
+3540	-61941.19528	977	0.304
+3550	-61941.19516	977	0.304
+3560	-61941.19516	978	0.304
+3570	-61941.15154	978	0.304
+3580	-61941.15154	979	0.304
+3590	-61941.15154	979	0.304
+3600	-61941.14556	979	0.304
+3610	-61941.14194	981	0.255
+3620	-61941.11699	981	0.255
+3630	-61941.11699	981	0.255
+3640	-61941.11699	982	0.255
+3650	-61941.11412	982	0.255
+3660	-61941.11412	983	0.255
+3670	-61941.08587	983	0.255
+3680	-61941.08587	983	0.255
+3690	-61941.06589	984	0.255
+3700	-61941.06589	984	0.255
+3710	-61941.06589	985	0.255
+3720	-61941.06589	985	0.255
+3730	-61941.06172	985	0.255
+3740	-61941.05696	986	0.255
+3750	-61940.99645	986	0.255
+3760	-61940.99645	987	0.255
+3770	-61940.91045	987	0.255
+3780	-61940.91045	987	0.255
+3790	-61940.8923	988	0.255
+3800	-61940.83295	988	0.255
+3810	-61940.80818	989	0.255
+3820	-61940.75254	989	0.255
+3830	-61940.75254	989	0.255
+3840	-61940.64986	990	0.255
+3850	-61940.62788	990	0.255
+3860	-61940.62788	991	0.255
+3870	-61940.62788	991	0.255
+3880	-61940.5704	991	0.255
+3890	-61940.5704	992	0.255
+3900	-61940.5704	992	0.255
+3910	-61940.5704	993	0.255
+3920	-61940.49942	993	0.255
+3930	-61940.49942	994	0.255
+3940	-61940.49942	994	0.255
+3950	-61940.49466	995	0.255
+3960	-61940.49466	995	0.255
+3970	-61940.49466	995	0.255
+3980	-61940.49081	996	0.255
+3990	-61940.45145	996	0.255
+4000	-61940.45145	997	0.255
+4010	-61940.42201	997	0.255
+4020	-61940.36561	997	0.255
+4030	-61940.33179	998	0.255
+4040	-61940.33179	998	0.255
+4050	-61940.32206	999	0.255
+4060	-61940.30113	999	0.255
+4070	-61940.16275	999	0.255
+4080	-61940.14335	1000	0.255
+4090	-61940.13271	1000	0.255
+4100	-61940.13271	1001	0.255
+4110	-61939.82132	1002	0.206
+4120	-61939.78566	1002	0.206
+4130	-61939.78566	1003	0.206
+4140	-61939.78566	1003	0.206
+4150	-61939.77602	1004	0.206
+4160	-61939.77602	1004	0.206
+4170	-61939.77602	1005	0.206
+4180	-61939.77602	1005	0.206
+4190	-61939.77602	1005	0.206
+4200	-61939.77602	1006	0.206
+4210	-61939.77602	1006	0.206
+4220	-61939.77602	1007	0.206
+4230	-61939.7753	1007	0.206
+4240	-61939.75302	1008	0.206
+4250	-61939.73193	1008	0.206
+4260	-61939.73193	1008	0.206
+4270	-61939.7178	1009	0.206
+4280	-61939.7178	1009	0.206
+4290	-61939.71489	1010	0.206
+4300	-61939.71429	1010	0.206
+4310	-61939.71429	1011	0.206
+4320	-61939.70444	1011	0.206
+4330	-61939.67607	1011	0.206
+4340	-61939.67607	1012	0.206
+4350	-61939.67607	1012	0.206
+4360	-61939.67607	1012	0.206
+4370	-61939.67607	1013	0.206
+4380	-61939.66356	1013	0.206
+4390	-61939.62688	1014	0.206
+4400	-61939.62688	1014	0.206
+4410	-61939.61804	1015	0.206
+4420	-61939.61525	1015	0.206
+4430	-61939.61525	1015	0.206
+4440	-61939.61525	1016	0.206
+4450	-61939.61525	1016	0.206
+4460	-61939.5898	1017	0.206
+4470	-61939.5898	1017	0.206
+4480	-61939.5898	1018	0.206
+4490	-61939.58727	1018	0.206
+4500	-61939.58727	1018	0.206
+4510	-61939.58727	1019	0.206
+4520	-61939.58727	1019	0.206
+4530	-61939.51429	1020	0.206
+4540	-61939.51429	1020	0.206
+4550	-61939.51429	1021	0.206
+4560	-61939.51208	1021	0.206
+4570	-61939.49771	1021	0.206
+4580	-61939.49771	1022	0.206
+4590	-61939.49136	1022	0.206
+4600	-61939.49136	1023	0.206
+4610	-61939.3154	1024	0.157
+4620	-61939.3105	1024	0.157
+4630	-61939.29815	1025	0.157
+4640	-61939.29815	1025	0.157
+4650	-61939.25193	1025	0.157
+4660	-61939.25142	1026	0.157
+4670	-61939.25142	1026	0.157
+4680	-61939.24049	1027	0.157
+4690	-61939.24049	1027	0.157
+4700	-61939.24049	1027	0.157
+4710	-61939.24049	1028	0.157
+4720	-61939.24049	1028	0.157
+4730	-61939.24049	1029	0.157
+4740	-61939.24049	1029	0.157
+4750	-61939.24049	1030	0.157
+4760	-61939.1964	1030	0.157
+4770	-61939.14328	1030	0.157
+4780	-61939.14328	1031	0.157
+4790	-61939.13997	1031	0.157
+4800	-61939.13997	1032	0.157
+4810	-61939.13997	1032	0.157
+4820	-61939.13997	1032	0.157
+4830	-61939.13997	1033	0.157
+4840	-61939.13431	1033	0.157
+4850	-61939.12471	1034	0.157
+4860	-61939.12471	1034	0.157
+4870	-61939.12471	1034	0.157
+4880	-61939.12471	1035	0.157
+4890	-61939.12471	1035	0.157
+4900	-61939.11025	1036	0.157
+4910	-61939.07421	1036	0.157
+4920	-61939.06331	1036	0.157
+4930	-61939.06331	1037	0.157
+4940	-61939.03652	1037	0.157
+4950	-61939.03652	1038	0.157
+4960	-61939.03652	1038	0.157
+4970	-61939.03652	1039	0.157
+4980	-61939.03652	1039	0.157
+4990	-61939.03332	1039	0.157
+5000	-61939.03332	1040	0.157
+5010	-61939.03332	1040	0.157
+5020	-61939.03332	1041	0.157
+5030	-61939.02308	1041	0.157
+5040	-61939.01925	1041	0.157
+5050	-61939.01925	1042	0.157
+5060	-61939.01925	1042	0.157
+5070	-61939.01925	1043	0.157
+5080	-61939.01925	1043	0.157
+5090	-61939.01925	1043	0.157
+5100	-61939.01194	1044	0.157
+5110	-61938.72643	1045	0.108
+5120	-61938.72643	1046	0.108
+5130	-61938.72643	1046	0.108
+5140	-61938.71957	1046	0.108
+5150	-61938.71957	1047	0.108
+5160	-61938.71957	1047	0.108
+5170	-61938.71957	1048	0.108
+5180	-61938.71957	1048	0.108
+5190	-61938.71957	1048	0.108
+5200	-61938.71957	1049	0.108
+5210	-61938.71957	1049	0.108
+5220	-61938.71957	1050	0.108
+5230	-61938.71957	1050	0.108
+5240	-61938.71957	1051	0.108
+5250	-61938.71957	1051	0.108
+5260	-61938.71957	1052	0.108
+5270	-61938.71957	1052	0.108
+5280	-61938.71957	1052	0.108
+5290	-61938.71957	1053	0.108
+5300	-61938.71898	1053	0.108
+5310	-61938.71898	1054	0.108
+5320	-61938.68667	1054	0.108
+5330	-61938.68667	1054	0.108
+5340	-61938.68667	1055	0.108
+5350	-61938.6593	1055	0.108
+5360	-61938.6593	1056	0.108
+5370	-61938.6593	1056	0.108
+5380	-61938.64559	1056	0.108
+5390	-61938.63635	1057	0.108
+5400	-61938.63635	1057	0.108
+5410	-61938.62711	1058	0.108
+5420	-61938.62711	1058	0.108
+5430	-61938.62711	1059	0.108
+5440	-61938.62694	1059	0.108
+5450	-61938.62694	1059	0.108
+5460	-61938.62694	1060	0.108
+5470	-61938.62694	1060	0.108
+5480	-61938.62694	1061	0.108
+5490	-61938.62694	1061	0.108
+5500	-61938.62694	1062	0.108
+5510	-61938.62694	1062	0.108
+5520	-61938.62694	1063	0.108
+5530	-61938.62694	1063	0.108
+5540	-61938.58495	1063	0.108
+5550	-61938.58495	1064	0.108
+5560	-61938.58495	1064	0.108
+5570	-61938.58495	1065	0.108
+5580	-61938.58495	1065	0.108
+5590	-61938.5618	1066	0.108
+5600	-61938.5618	1066	0.108
+5610	-61938.39065	1067	0.059
+5620	-61938.39065	1068	0.059
+5630	-61938.3834	1068	0.059
+5640	-61938.3834	1069	0.059
+5650	-61938.3834	1069	0.059
+5660	-61938.37165	1069	0.059
+5670	-61938.3544	1070	0.059
+5680	-61938.33847	1070	0.059
+5690	-61938.33711	1071	0.059
+5700	-61938.33711	1071	0.059
+5710	-61938.33172	1072	0.059
+5720	-61938.329	1072	0.059
+5730	-61938.329	1072	0.059
+5740	-61938.329	1073	0.059
+5750	-61938.329	1073	0.059
+5760	-61938.30611	1074	0.059
+5770	-61938.2973	1074	0.059
+5780	-61938.2973	1075	0.059
+5790	-61938.2973	1075	0.059
+5800	-61938.2973	1075	0.059
+5810	-61938.29583	1076	0.059
+5820	-61938.29583	1076	0.059
+5830	-61938.29583	1077	0.059
+5840	-61938.29583	1077	0.059
+5850	-61938.28311	1078	0.059
+5860	-61938.28311	1078	0.059
+5870	-61938.28298	1079	0.059
+5880	-61938.28298	1079	0.059
+5890	-61938.28298	1080	0.059
+5900	-61938.25672	1080	0.059
+5910	-61938.23761	1080	0.059
+5920	-61938.23761	1081	0.059
+5930	-61938.23761	1081	0.059
+5940	-61938.23761	1082	0.059
+5950	-61938.2355	1082	0.059
+5960	-61938.20596	1083	0.059
+5970	-61938.20596	1083	0.059
+5980	-61938.20596	1084	0.059
+5990	-61938.19623	1084	0.059
+6000	-61938.19623	1084	0.059
+6010	-61938.19623	1085	0.059
+6020	-61938.17593	1085	0.059
+6030	-61938.17593	1086	0.059
+6040	-61938.17593	1086	0.059
+6050	-61938.1746	1087	0.059
+6060	-61938.1743	1087	0.059
+6070	-61938.17388	1087	0.059
+6080	-61938.17388	1088	0.059
+6090	-61938.17388	1088	0.059
+6100	-61938.17311	1089	0.059
+6110	-61937.53395	1090	0.01
+6120	-61937.53395	1091	0.01
+6130	-61937.53395	1091	0.01
+6140	-61937.53395	1092	0.01
+6150	-61937.53395	1092	0.01
+6160	-61937.53395	1093	0.01
+6170	-61937.53395	1093	0.01
+6180	-61937.53395	1093	0.01
+6190	-61937.53395	1094	0.01
+6200	-61937.53395	1094	0.01
+6210	-61937.5291	1095	0.01
+6220	-61937.5291	1095	0.01
+6230	-61937.5291	1096	0.01
+6240	-61937.5291	1096	0.01
+6250	-61937.5291	1096	0.01
+6260	-61937.5291	1097	0.01
+6270	-61937.5291	1097	0.01
+6280	-61937.5291	1098	0.01
+6290	-61937.5291	1098	0.01
+6300	-61937.5291	1099	0.01
+6310	-61937.5291	1099	0.01
+6320	-61937.52658	1100	0.01
+6330	-61937.52658	1100	0.01
+6340	-61937.52658	1100	0.01
+6350	-61937.52658	1101	0.01
+6360	-61937.52658	1101	0.01
+6370	-61937.52658	1102	0.01
+6380	-61937.51695	1102	0.01
+6390	-61937.51695	1103	0.01
+6400	-61937.51686	1103	0.01
+6410	-61937.51605	1103	0.01
+6420	-61937.51605	1104	0.01
+6430	-61937.51605	1104	0.01
+6440	-61937.51605	1105	0.01
+6450	-61937.51605	1105	0.01
+6460	-61937.51605	1106	0.01
+6470	-61937.51605	1106	0.01
+6480	-61937.51605	1106	0.01
+6490	-61937.51605	1107	0.01
+6500	-61937.51605	1107	0.01
+6510	-61937.51605	1108	0.01
+6520	-61937.51605	1108	0.01
+6530	-61937.51605	1108	0.01
+6540	-61937.51584	1109	0.01
+6550	-61937.51584	1109	0.01
+6560	-61937.51584	1110	0.01
+6570	-61937.51379	1110	0.01
+6580	-61937.51379	1111	0.01
+6590	-61937.51379	1111	0.01
+6600	-61937.51379	1111	0.01
+6610	-61937.51379	1112	0.01
+6620	-61937.51379	1112	0.01
+6630	-61937.51379	1113	0.01
+6640	-61937.51379	1113	0.01
+6650	-61937.51379	1114	0.01
+6660	-61937.51379	1114	0.01
+6670	-61937.51379	1115	0.01
+6680	-61937.51315	1115	0.01
+6690	-61937.51315	1116	0.01
+6700	-61937.51315	1116	0.01
+6710	-61937.51315	1116	0.01
+6720	-61937.51315	1117	0.01
+6730	-61937.51315	1117	0.01
+6740	-61937.51315	1118	0.01
+6750	-61937.51315	1118	0.01
+6760	-61937.5128	1119	0.01
+6770	-61937.5128	1119	0.01
+6780	-61937.5128	1120	0.01
+6790	-61937.5128	1121	0.01
+6800	-61937.5128	1121	0.01
+6810	-61937.5128	1122	0.01
+6820	-61937.5128	1122	0.01
+6830	-61937.5128	1123	0.01
+6840	-61937.5128	1124	0.01
+6850	-61937.51127	1124	0.01
+6860	-61937.51127	1125	0.01
+6870	-61937.51127	1125	0.01
+6880	-61937.51127	1126	0.01
+6890	-61937.51127	1126	0.01
+6900	-61937.51116	1127	0.01
+6910	-61937.51116	1127	0.01
+6920	-61937.51116	1128	0.01
+6930	-61937.51116	1128	0.01
+6940	-61937.51116	1129	0.01
+6950	-61937.51116	1129	0.01
+6960	-61937.51116	1129	0.01
+6970	-61937.51105	1130	0.01
+6980	-61937.51105	1130	0.01
+6990	-61937.50979	1131	0.01
+7000	-61937.50979	1131	0.01
+7010	-61937.50979	1132	0.01
+7020	-61937.50979	1132	0.01
+7030	-61937.50979	1133	0.01
+7040	-61937.50979	1133	0.01
+7050	-61937.50979	1134	0.01
+7060	-61937.50979	1134	0.01
+7070	-61937.50979	1135	0.01
+7080	-61937.50979	1135	0.01
+7090	-61937.50979	1136	0.01
+7100	-61937.50979	1136	0.01
+7110	-61937.50979	1136	0.01
+7120	-61937.50979	1137	0.01
+7130	-61937.50979	1137	0.01
+7140	-61937.50979	1138	0.01
+7150	-61937.50979	1138	0.01
+7160	-61937.50979	1139	0.01
+7170	-61937.50979	1139	0.01
+7180	-61937.50979	1140	0.01
+7190	-61937.50979	1140	0.01
+7200	-61937.50979	1141	0.01
+7210	-61937.50979	1141	0.01
+7220	-61937.50979	1142	0.01
+7230	-61937.50979	1142	0.01
+7240	-61937.50979	1143	0.01
+7250	-61937.50979	1143	0.01
+7260	-61937.50979	1144	0.01
+7270	-61937.50979	1144	0.01
+7280	-61937.50979	1145	0.01
+7290	-61937.50979	1145	0.01
+7300	-61937.50979	1145	0.01
+7310	-61937.50979	1146	0.01
+7320	-61937.50926	1147	0.01
+7330	-61937.50917	1147	0.01
+7340	-61937.50917	1147	0.01
+7350	-61937.50917	1148	0.01
+7360	-61937.50917	1148	0.01
+7370	-61937.50917	1149	0.01
+7380	-61937.50917	1149	0.01
+7390	-61937.50917	1150	0.01
+7400	-61937.50917	1150	0.01
+7410	-61937.50917	1151	0.01
+7420	-61937.50917	1151	0.01
+7430	-61937.50917	1152	0.01
+7440	-61937.50917	1152	0.01
+7450	-61937.50917	1153	0.01
+7460	-61937.50917	1153	0.01
+7470	-61937.50917	1154	0.01
+7480	-61937.50917	1154	0.01
+7490	-61937.50917	1155	0.01
+7500	-61937.50917	1155	0.01
+7510	-61937.50917	1156	0.01
+7520	-61937.50917	1156	0.01
+7530	-61937.50917	1157	0.01
+7540	-61937.50839	1157	0.01
+7550	-61937.50839	1158	0.01
+7560	-61937.50839	1158	0.01
+7570	-61937.50839	1159	0.01
+7580	-61937.50839	1159	0.01
+7590	-61937.50839	1160	0.01
+7600	-61937.50839	1160	0.01
+7610	-61937.50839	1161	0.01
+7620	-61937.50839	1161	0.01
+7630	-61937.50839	1161	0.01
+7640	-61937.50839	1162	0.01
+7650	-61937.50839	1162	0.01
+7660	-61937.50839	1163	0.01
+7670	-61937.50839	1163	0.01
+7680	-61937.50839	1164	0.01
+7690	-61937.50839	1164	0.01
+7700	-61937.50839	1165	0.01
+7710	-61937.50839	1165	0.01
+7720	-61937.50839	1166	0.01
+7730	-61937.50839	1166	0.01
+7740	-61937.50838	1167	0.01
+7750	-61937.50838	1167	0.01
+7760	-61937.50838	1168	0.01
+7770	-61937.50793	1168	0.01
+7780	-61937.50793	1169	0.01
+7790	-61937.50793	1169	0.01
+7800	-61937.50793	1170	0.01
+7810	-61937.50793	1170	0.01
+7820	-61937.50793	1171	0.01
+7830	-61937.50793	1171	0.01
+7840	-61937.50793	1171	0.01
+7850	-61937.50793	1172	0.01
+7860	-61937.50793	1172	0.01
+7870	-61937.50793	1173	0.01
+7880	-61937.50793	1173	0.01
+7890	-61937.50793	1174	0.01
+7900	-61937.50793	1174	0.01
+7910	-61937.50793	1175	0.01
+7920	-61937.50793	1175	0.01
+7930	-61937.50793	1176	0.01
+7940	-61937.50793	1176	0.01
+7950	-61937.50793	1177	0.01
+7960	-61937.50793	1177	0.01
+7970	-61937.50793	1178	0.01
+7980	-61937.50793	1178	0.01
+7990	-61937.50793	1179	0.01
+8000	-61937.50793	1179	0.01
+8010	-61937.50793	1180	0.01
+8020	-61937.50793	1180	0.01
+8030	-61937.50793	1181	0.01
+8040	-61937.50793	1181	0.01
+8050	-61937.50793	1182	0.01
+8060	-61937.50793	1182	0.01
+8070	-61937.50793	1182	0.01
+8080	-61937.50793	1183	0.01
+8090	-61937.50793	1183	0.01
+8100	-61937.50793	1184	0.01
+8110	-61937.50793	1184	0.01
+8120	-61937.50793	1185	0.01
+8130	-61937.50793	1185	0.01
+8140	-61937.50793	1186	0.01
+8150	-61937.50793	1186	0.01
+8160	-61937.50793	1187	0.01
+8170	-61937.50793	1187	0.01
+8180	-61937.50793	1187	0.01
+8190	-61937.50171	1188	0.01
+8200	-61937.50171	1188	0.01
+8210	-61937.50171	1189	0.01
+8220	-61937.50017	1189	0.01
+8230	-61937.50017	1190	0.01
+8240	-61937.50017	1190	0.01
+8250	-61937.50017	1191	0.01
+8260	-61937.50017	1191	0.01
+8270	-61937.50017	1192	0.01
+8280	-61937.50017	1192	0.01
+8290	-61937.50017	1192	0.01
+8300	-61937.50017	1193	0.01
+8310	-61937.50017	1194	0.01
+8320	-61937.50017	1194	0.01
+8330	-61937.50017	1194	0.01
+8340	-61937.50017	1195	0.01
+8350	-61937.4964	1195	0.01
+8360	-61937.4964	1196	0.01
+8370	-61937.4964	1196	0.01
+8380	-61937.4964	1197	0.01
+8390	-61937.4964	1197	0.01
+8400	-61937.4964	1198	0.01
+8410	-61937.4964	1198	0.01
+8420	-61937.4964	1199	0.01
+8430	-61937.4964	1199	0.01
+8440	-61937.4964	1200	0.01
+8450	-61937.4964	1200	0.01
+8460	-61937.4964	1201	0.01
+8470	-61937.4964	1201	0.01
+8480	-61937.4964	1201	0.01
+8490	-61937.49633	1202	0.01
+8500	-61937.49016	1202	0.01
+8510	-61937.49016	1203	0.01
+8520	-61937.4899	1203	0.01
+8530	-61937.4899	1204	0.01
+8540	-61937.4899	1204	0.01
+8550	-61937.4899	1205	0.01
+8560	-61937.4899	1205	0.01
+8570	-61937.4899	1206	0.01
+8580	-61937.4899	1206	0.01
+8590	-61937.4899	1207	0.01
+8600	-61937.4899	1207	0.01
+8610	-61937.4899	1208	0.01
+8620	-61937.4899	1208	0.01
+8630	-61937.4899	1209	0.01
+8640	-61937.4899	1209	0.01
+8650	-61937.4899	1210	0.01
+8660	-61937.4899	1210	0.01
+8670	-61937.4899	1211	0.01
+8680	-61937.4899	1211	0.01
+8690	-61937.4899	1212	0.01
+8700	-61937.48721	1212	0.01
+8710	-61937.48721	1212	0.01
+8720	-61937.48721	1213	0.01
+8730	-61937.48721	1213	0.01
+8740	-61937.48721	1214	0.01
+8750	-61937.48721	1214	0.01
+8760	-61937.48721	1215	0.01
+8770	-61937.48721	1215	0.01
+8780	-61937.48721	1216	0.01
+8790	-61937.48721	1216	0.01
+8800	-61937.48721	1217	0.01
+8810	-61937.48721	1217	0.01
+8820	-61937.48721	1218	0.01
+8830	-61937.48721	1218	0.01
+8840	-61937.48721	1219	0.01
+8850	-61937.48721	1219	0.01
+8860	-61937.48721	1219	0.01
+8870	-61937.48721	1220	0.01
+8880	-61937.48721	1220	0.01
+8890	-61937.48721	1221	0.01
+8900	-61937.48721	1221	0.01
+8910	-61937.48721	1222	0.01
+8920	-61937.48721	1222	0.01
+8930	-61937.48721	1223	0.01
+8940	-61937.48721	1223	0.01
+8950	-61937.48721	1224	0.01
+8960	-61937.48666	1224	0.01
+8970	-61937.48666	1225	0.01
+8980	-61937.48666	1225	0.01
+8990	-61937.48666	1226	0.01
+9000	-61937.48666	1226	0.01
+9010	-61937.48666	1227	0.01
+9020	-61937.48666	1227	0.01
+9030	-61937.48666	1227	0.01
+9040	-61937.48666	1228	0.01
+9050	-61937.48666	1228	0.01
+9060	-61937.48666	1229	0.01
+9070	-61937.48666	1229	0.01
+9080	-61937.48666	1230	0.01
+9090	-61937.48666	1230	0.01
+9100	-61937.48666	1231	0.01
+9110	-61937.48666	1231	0.01
+9120	-61937.48666	1232	0.01
+9130	-61937.48666	1232	0.01
+9140	-61937.48666	1233	0.01
+9150	-61937.48666	1233	0.01
+9160	-61937.48666	1234	0.01
+9170	-61937.48512	1234	0.01
+9180	-61937.48512	1235	0.01
+9190	-61937.48512	1235	0.01
+9200	-61937.48512	1236	0.01
+9210	-61937.48512	1236	0.01
+9220	-61937.48512	1237	0.01
+9230	-61937.48512	1237	0.01
+9240	-61937.48512	1238	0.01
+9250	-61937.48512	1238	0.01
+9260	-61937.48512	1239	0.01
+9270	-61937.48502	1239	0.01
+9280	-61937.48219	1240	0.01
+9290	-61937.48219	1240	0.01
+9300	-61937.48219	1241	0.01
+9310	-61937.4821	1241	0.01
+9320	-61937.4821	1241	0.01
+9330	-61937.4821	1242	0.01
+9340	-61937.4821	1243	0.01
+9350	-61937.4821	1243	0.01
+9360	-61937.4821	1243	0.01
+9370	-61937.4821	1244	0.01
+9380	-61937.4821	1244	0.01
+9390	-61937.4821	1245	0.01
+9400	-61937.4821	1245	0.01
+9410	-61937.4821	1246	0.01
+9420	-61937.4821	1246	0.01
+9430	-61937.4821	1247	0.01
+9440	-61937.4821	1247	0.01
+9450	-61937.4821	1248	0.01
+9460	-61937.4821	1248	0.01
+9470	-61937.4821	1249	0.01
+9480	-61937.4821	1249	0.01
+9490	-61937.4821	1249	0.01
+9500	-61937.4821	1250	0.01
+9510	-61937.4821	1250	0.01
+9520	-61937.4821	1251	0.01
+9530	-61937.4821	1251	0.01
+9540	-61937.4821	1252	0.01
+9550	-61937.4821	1252	0.01
+9560	-61937.47887	1253	0.01
+9570	-61937.47563	1253	0.01
+9580	-61937.47563	1254	0.01
+9590	-61937.47563	1254	0.01
+9600	-61937.47563	1255	0.01
+9610	-61937.47563	1255	0.01
+9620	-61937.47563	1256	0.01
+9630	-61937.47563	1256	0.01
+9640	-61937.4739	1257	0.01
+9650	-61937.4739	1257	0.01
+9660	-61937.4739	1258	0.01
+9670	-61937.47217	1258	0.01
+9680	-61937.47217	1259	0.01
+9690	-61937.47217	1259	0.01
+9700	-61937.47217	1259	0.01
+9710	-61937.47217	1260	0.01
+9720	-61937.47217	1260	0.01
+9730	-61937.47217	1261	0.01
+9740	-61937.47217	1261	0.01
+9750	-61937.47217	1262	0.01
+9760	-61937.47217	1262	0.01
+9770	-61937.47217	1263	0.01
+9780	-61937.47217	1263	0.01
+9790	-61937.47217	1264	0.01
+9800	-61937.47217	1264	0.01
+9810	-61937.47217	1265	0.01
+9820	-61937.47217	1265	0.01
+9830	-61937.47217	1266	0.01
+9840	-61937.47217	1266	0.01
+9850	-61937.47217	1267	0.01
+9860	-61937.47107	1267	0.01
+9870	-61937.47107	1267	0.01
+9880	-61937.47107	1268	0.01
+9890	-61937.47107	1268	0.01
+9900	-61937.47107	1269	0.01
+9910	-61937.47107	1269	0.01
+9920	-61937.47107	1270	0.01
+9930	-61937.47107	1270	0.01
+9940	-61937.47107	1271	0.01
+9950	-61937.47107	1271	0.01
+9960	-61937.47107	1272	0.01
+9970	-61937.47107	1272	0.01
+9980	-61937.47107	1273	0.01
+9990	-61937.47107	1273	0.01
+10000	-61937.47107	1274	0.01
+10010	-61937.47107	1274	0.01
+10020	-61937.47107	1274	0.01
+10030	-61937.47074	1275	0.01
+10040	-61937.47074	1275	0.01
+10050	-61937.47074	1276	0.01
+10060	-61937.47074	1276	0.01
+10070	-61937.47074	1277	0.01
+10080	-61937.47068	1277	0.01
+10090	-61937.47068	1278	0.01
+10100	-61937.47068	1278	0.01
+10110	-61937.47068	1279	0.01
+10120	-61937.47068	1279	0.01
+10130	-61937.47068	1280	0.01
+10140	-61937.46761	1280	0.01
+10150	-61937.46761	1281	0.01
+10160	-61937.46761	1281	0.01
+10170	-61937.46761	1282	0.01
+10180	-61937.46761	1282	0.01
+10190	-61937.46761	1282	0.01
+10200	-61937.46761	1283	0.01
+10210	-61937.46761	1283	0.01
+10220	-61937.46761	1284	0.01
+10230	-61937.46698	1284	0.01
+10240	-61937.46698	1285	0.01
+10250	-61937.46698	1285	0.01
+10260	-61937.46698	1286	0.01
+10270	-61937.46698	1286	0.01
+10280	-61937.46698	1287	0.01
+10290	-61937.46698	1287	0.01
+10300	-61937.466	1287	0.01
+10310	-61937.466	1288	0.01
+10320	-61937.466	1289	0.01
+10330	-61937.46276	1289	0.01
+10340	-61937.46249	1289	0.01
+10350	-61937.46249	1290	0.01
+10360	-61937.46249	1290	0.01
+10370	-61937.46249	1291	0.01
+10380	-61937.46249	1291	0.01
+10390	-61937.46249	1292	0.01
+10400	-61937.46249	1292	0.01
+10410	-61937.46249	1293	0.01
+10420	-61937.46249	1293	0.01
+10430	-61937.46249	1294	0.01
+10440	-61937.46246	1294	0.01
+10450	-61937.46246	1295	0.01
+10460	-61937.46246	1295	0.01
+10470	-61937.46246	1296	0.01
+10480	-61937.46246	1296	0.01
+10490	-61937.45816	1296	0.01
+10500	-61937.45816	1297	0.01
+10510	-61937.45816	1297	0.01
+10520	-61937.45816	1298	0.01
+10530	-61937.45816	1298	0.01
+10540	-61937.45816	1299	0.01
+10550	-61937.45816	1299	0.01
+10560	-61937.45816	1300	0.01
+10570	-61937.45816	1300	0.01
+10580	-61937.45816	1301	0.01
+10590	-61937.45816	1301	0.01
+10600	-61937.45816	1301	0.01
+10610	-61937.45816	1302	0.01
+10620	-61937.45816	1302	0.01
+10630	-61937.45555	1303	0.01
+10640	-61937.45555	1303	0.01
+10650	-61937.45555	1304	0.01
+10660	-61937.45555	1304	0.01
+10670	-61937.45555	1305	0.01
+10680	-61937.45555	1305	0.01
+10690	-61937.45555	1306	0.01
+10700	-61937.45555	1306	0.01
+10710	-61937.45555	1307	0.01
+10720	-61937.45555	1307	0.01
+10730	-61937.45555	1308	0.01
+10740	-61937.45555	1308	0.01
+10750	-61937.45555	1309	0.01
+10760	-61937.45555	1309	0.01
+10770	-61937.45555	1310	0.01
+10780	-61937.45555	1310	0.01
+10790	-61937.45555	1311	0.01
+10800	-61937.45555	1311	0.01
+10810	-61937.45555	1311	0.01
+10820	-61937.45555	1312	0.01
+10830	-61937.45555	1312	0.01
+10840	-61937.45555	1313	0.01
+10850	-61937.45555	1313	0.01
+10860	-61937.45555	1314	0.01
+10870	-61937.45555	1314	0.01
+10880	-61937.45555	1315	0.01
+10890	-61937.45555	1315	0.01
+10900	-61937.45555	1316	0.01
+10910	-61937.45555	1316	0.01
+10920	-61937.45555	1317	0.01
+10930	-61937.44984	1317	0.01
+10940	-61937.44984	1318	0.01
+10950	-61937.44984	1318	0.01
+10960	-61937.44975	1319	0.01
+10970	-61937.44975	1319	0.01
+10980	-61937.44975	1320	0.01
+10990	-61937.44975	1320	0.01
+11000	-61937.44975	1320	0.01
+11010	-61937.44975	1321	0.01
+11020	-61937.44975	1321	0.01
+11030	-61937.44975	1322	0.01
+11040	-61937.44975	1322	0.01
+11050	-61937.44975	1323	0.01
+11060	-61937.44975	1323	0.01
+11070	-61937.44975	1324	0.01
+11080	-61937.44975	1324	0.01
+11090	-61937.44282	1325	0.01
+11100	-61937.4428	1325	0.01
+11110	-61937.4428	1326	0.01
+11120	-61937.4428	1326	0.01
+11130	-61937.4428	1327	0.01
+11140	-61937.4428	1327	0.01
+11150	-61937.44276	1328	0.01
+11160	-61937.44276	1328	0.01
+11170	-61937.44276	1329	0.01
+11180	-61937.44276	1329	0.01
+11190	-61937.44276	1330	0.01
+11200	-61937.44276	1330	0.01
+11210	-61937.44276	1331	0.01
+11220	-61937.44276	1331	0.01
+11230	-61937.44275	1332	0.01
+11240	-61937.44275	1332	0.01
+11250	-61937.44275	1333	0.01
+11260	-61937.44275	1333	0.01
+11270	-61937.44117	1333	0.01
+11280	-61937.44117	1334	0.01
+11290	-61937.44117	1334	0.01
+11300	-61937.44117	1335	0.01
+11310	-61937.44117	1335	0.01
+11320	-61937.44117	1336	0.01
+11330	-61937.44117	1336	0.01
+11340	-61937.44117	1337	0.01
+11350	-61937.44117	1337	0.01
+11360	-61937.44117	1338	0.01
+11370	-61937.44117	1338	0.01
+11380	-61937.44117	1339	0.01
+11390	-61937.44117	1339	0.01
+11400	-61937.44117	1339	0.01
+11410	-61937.44117	1340	0.01
+11420	-61937.44117	1340	0.01
+11430	-61937.44117	1341	0.01
+11440	-61937.44117	1341	0.01
+11450	-61937.44117	1342	0.01
+11460	-61937.44117	1342	0.01
+11470	-61937.44117	1343	0.01
+11480	-61937.44117	1343	0.01
+11490	-61937.44117	1344	0.01
+11500	-61937.44117	1344	0.01
+11510	-61937.44117	1345	0.01
+11520	-61937.44117	1345	0.01
+11530	-61937.44117	1345	0.01
+11540	-61937.44117	1346	0.01
+11550	-61937.44115	1346	0.01
+11560	-61937.44115	1347	0.01
+11570	-61937.44115	1347	0.01
+11580	-61937.44115	1348	0.01
+11590	-61937.44115	1348	0.01
+11600	-61937.44115	1349	0.01
+11610	-61937.44115	1349	0.01
+11620	-61937.44115	1350	0.01
+11630	-61937.44115	1350	0.01
+11640	-61937.44115	1351	0.01
+11650	-61937.44115	1351	0.01
+11660	-61937.44115	1352	0.01
+11670	-61937.44115	1352	0.01
+11680	-61937.44115	1353	0.01
+11690	-61937.44115	1353	0.01
+11700	-61937.44115	1354	0.01
+11710	-61937.44115	1354	0.01
+11720	-61937.44115	1355	0.01
+11730	-61937.44115	1355	0.01
+11740	-61937.44109	1356	0.01
+11750	-61937.44109	1356	0.01
+11760	-61937.44109	1357	0.01
+11770	-61937.44109	1357	0.01
+11780	-61937.44109	1358	0.01
+11790	-61937.44109	1358	0.01
+11800	-61937.43987	1358	0.01
+11810	-61937.43987	1359	0.01
+11820	-61937.43967	1359	0.01
+11830	-61937.43967	1360	0.01
+11840	-61937.43967	1360	0.01
+11850	-61937.43967	1361	0.01
+11860	-61937.43967	1361	0.01
+11870	-61937.43967	1362	0.01
+11880	-61937.43526	1362	0.01
+11890	-61937.43526	1363	0.01
+11900	-61937.43523	1363	0.01
+11910	-61937.43523	1364	0.01
+11920	-61937.43523	1364	0.01
+11930	-61937.43502	1365	0.01
+11940	-61937.43466	1365	0.01
+11950	-61937.43466	1366	0.01
+11960	-61937.43466	1366	0.01
+11970	-61937.43457	1366	0.01
+11980	-61937.43457	1367	0.01
+11990	-61937.43457	1367	0.01
+12000	-61937.43457	1368	0.01
+12010	-61937.43457	1368	0.01
+12020	-61937.43457	1369	0.01
+12030	-61937.434	1369	0.01
+12040	-61937.434	1370	0.01
+12050	-61937.434	1370	0.01
+12060	-61937.43324	1371	0.01
+12070	-61937.43324	1371	0.01
+12080	-61937.43324	1372	0.01
+12090	-61937.43324	1372	0.01
+12100	-61937.43324	1372	0.01
+12110	-61937.43324	1373	0.01
+12120	-61937.43324	1373	0.01
+12130	-61937.43324	1374	0.01
+12140	-61937.43324	1374	0.01
+12150	-61937.43324	1375	0.01
+12160	-61937.43324	1375	0.01
+12170	-61937.43324	1376	0.01
+12180	-61937.43324	1376	0.01
+12190	-61937.43324	1377	0.01
+12200	-61937.43324	1377	0.01
+12210	-61937.43324	1378	0.01
+12220	-61937.43324	1378	0.01
+12230	-61937.43324	1379	0.01
+12240	-61937.43324	1379	0.01
+12250	-61937.43324	1380	0.01
+12260	-61937.43324	1380	0.01
+12270	-61937.43324	1381	0.01
+12280	-61937.43324	1381	0.01
+12290	-61937.43324	1382	0.01
+12300	-61937.43324	1382	0.01
+12310	-61937.43324	1382	0.01
+12320	-61937.43324	1383	0.01
+12330	-61937.43324	1383	0.01
+12340	-61937.43324	1384	0.01
+12350	-61937.43324	1384	0.01
+12360	-61937.43324	1385	0.01
+12370	-61937.43324	1385	0.01
+12380	-61937.43324	1386	0.01
+12390	-61937.43324	1386	0.01
+12400	-61937.43324	1387	0.01
+12410	-61937.43324	1387	0.01
+12420	-61937.43324	1388	0.01
+12430	-61937.43324	1388	0.01
+12440	-61937.43324	1389	0.01
+12450	-61937.43324	1389	0.01
+12460	-61937.43324	1390	0.01
+12470	-61937.43324	1390	0.01
+12480	-61937.43324	1390	0.01
+12490	-61937.43324	1391	0.01
+12500	-61937.43324	1391	0.01
+12510	-61937.43324	1392	0.01
+12520	-61937.43243	1392	0.01
+12530	-61937.43243	1393	0.01
+12540	-61937.43243	1393	0.01
+12550	-61937.43243	1394	0.01
+12560	-61937.43243	1394	0.01
+12570	-61937.43022	1395	0.01
+12580	-61937.43022	1395	0.01
+12590	-61937.43022	1396	0.01
+12600	-61937.43022	1396	0.01
+12610	-61937.43022	1396	0.01
+12620	-61937.43022	1397	0.01
+12630	-61937.42937	1397	0.01
+12640	-61937.42937	1398	0.01
+12650	-61937.42937	1398	0.01
+12660	-61937.42937	1399	0.01
+12670	-61937.42937	1399	0.01
+12680	-61937.42937	1400	0.01
+12690	-61937.42937	1400	0.01
+12700	-61937.42937	1400	0.01
+12710	-61937.42937	1401	0.01
+12720	-61937.42937	1401	0.01
+12730	-61937.42937	1402	0.01
+12740	-61937.42937	1402	0.01
+12750	-61937.42506	1403	0.01
+12760	-61937.42506	1403	0.01
+12770	-61937.42506	1404	0.01
+12780	-61937.42506	1404	0.01
+12790	-61937.42506	1405	0.01
+12800	-61937.42506	1405	0.01
+12810	-61937.42506	1406	0.01
+12820	-61937.42506	1406	0.01
+12830	-61937.42506	1407	0.01
+12840	-61937.42506	1407	0.01
+12850	-61937.42506	1407	0.01
+12860	-61937.42506	1408	0.01
+12870	-61937.42506	1408	0.01
+12880	-61937.42506	1409	0.01
+12890	-61937.42506	1409	0.01
+12900	-61937.42506	1410	0.01
+12910	-61937.42506	1410	0.01
+12920	-61937.42506	1411	0.01
+12930	-61937.42506	1411	0.01
+12940	-61937.425	1412	0.01
+12950	-61937.425	1412	0.01
+12960	-61937.425	1413	0.01
+12970	-61937.425	1413	0.01
+12980	-61937.425	1413	0.01
+12990	-61937.425	1414	0.01
+13000	-61937.425	1414	0.01
+13010	-61937.425	1415	0.01
+13020	-61937.425	1415	0.01
+13030	-61937.425	1416	0.01
+13040	-61937.425	1416	0.01
+13050	-61937.425	1417	0.01
+13060	-61937.425	1417	0.01
+13070	-61937.42301	1418	0.01
+13080	-61937.42301	1418	0.01
+13090	-61937.42301	1418	0.01
+13100	-61937.42301	1419	0.01
+13110	-61937.42301	1419	0.01
+13120	-61937.42301	1420	0.01
+13130	-61937.42301	1420	0.01
+13140	-61937.42301	1421	0.01
+13150	-61937.42301	1421	0.01
+13160	-61937.42301	1422	0.01
+13170	-61937.42301	1422	0.01
+13180	-61937.42293	1423	0.01
+13190	-61937.42293	1423	0.01
+13200	-61937.42293	1424	0.01
+13210	-61937.42293	1424	0.01
+13220	-61937.42293	1425	0.01
+13230	-61937.42293	1425	0.01
+13240	-61937.42293	1425	0.01
+13250	-61937.42293	1426	0.01
+13260	-61937.42293	1426	0.01
+13270	-61937.42293	1427	0.01
+13280	-61937.42293	1427	0.01
+13290	-61937.42293	1428	0.01
+13300	-61937.42293	1428	0.01
+13310	-61937.42293	1429	0.01
+13320	-61937.42293	1429	0.01
+13330	-61937.42293	1430	0.01
+13340	-61937.42293	1430	0.01
+13350	-61937.42293	1431	0.01
+13360	-61937.42293	1431	0.01
+13370	-61937.42293	1432	0.01
+13380	-61937.42293	1432	0.01
+13390	-61937.42293	1433	0.01
+13400	-61937.42293	1433	0.01
+13410	-61937.42293	1434	0.01
+13420	-61937.42293	1434	0.01
+13430	-61937.42293	1435	0.01
+13440	-61937.42293	1435	0.01
+13450	-61937.42262	1436	0.01
+13460	-61937.42262	1436	0.01
+13470	-61937.42262	1437	0.01
+13480	-61937.42262	1437	0.01
+13490	-61937.42262	1438	0.01
+13500	-61937.42262	1438	0.01
+13510	-61937.42262	1439	0.01
+13520	-61937.42262	1439	0.01
+13530	-61937.42262	1440	0.01
+13540	-61937.42262	1440	0.01
+13550	-61937.42262	1440	0.01
+13560	-61937.42262	1441	0.01
+13570	-61937.42262	1441	0.01
+13580	-61937.42262	1442	0.01
+13590	-61937.42262	1442	0.01
+13600	-61937.4222	1443	0.01
+13610	-61937.4222	1443	0.01
+13620	-61937.4222	1444	0.01
+13630	-61937.4222	1444	0.01
+13640	-61937.42046	1445	0.01
+13650	-61937.42046	1445	0.01
+13660	-61937.42046	1446	0.01
+13670	-61937.42046	1446	0.01
+13680	-61937.42046	1447	0.01
+13690	-61937.42046	1447	0.01
+13700	-61937.42046	1447	0.01
+13710	-61937.42046	1448	0.01
+13720	-61937.42046	1448	0.01
+13730	-61937.42046	1449	0.01
+13740	-61937.42046	1449	0.01
+13750	-61937.42046	1450	0.01
+13760	-61937.42046	1450	0.01
+13770	-61937.42046	1451	0.01
+13780	-61937.42046	1451	0.01
+13790	-61937.42046	1452	0.01
+13800	-61937.42046	1452	0.01
+13810	-61937.41675	1453	0.01
+13820	-61937.41675	1453	0.01
+13830	-61937.41675	1453	0.01
+13840	-61937.41675	1454	0.01
+13850	-61937.41675	1454	0.01
+13860	-61937.41675	1455	0.01
+13870	-61937.41675	1455	0.01
+13880	-61937.41675	1456	0.01
+13890	-61937.41675	1456	0.01
+13900	-61937.41675	1457	0.01
+13910	-61937.41675	1457	0.01
+13920	-61937.41675	1458	0.01
+13930	-61937.41675	1458	0.01
+13940	-61937.41675	1458	0.01
+13950	-61937.41675	1459	0.01
+13960	-61937.41675	1459	0.01
+13970	-61937.41675	1460	0.01
+13980	-61937.41675	1460	0.01
+13990	-61937.41675	1461	0.01
+14000	-61937.41675	1461	0.01
+14010	-61937.41675	1462	0.01
+14020	-61937.41675	1462	0.01
+14030	-61937.41675	1462	0.01
+14040	-61937.41675	1463	0.01
+14050	-61937.41675	1463	0.01
+14060	-61937.41675	1464	0.01
+14070	-61937.41675	1464	0.01
+14080	-61937.41675	1465	0.01
+14090	-61937.41675	1465	0.01
+14100	-61937.41675	1466	0.01
+14110	-61937.41675	1466	0.01
+14120	-61937.41675	1467	0.01
+14130	-61937.41675	1467	0.01
+14140	-61937.41675	1468	0.01
+14150	-61937.41675	1468	0.01
+14160	-61937.41675	1469	0.01
+14170	-61937.41675	1469	0.01
+14180	-61937.41675	1470	0.01
+14190	-61937.41675	1470	0.01
+14200	-61937.41675	1471	0.01
+14210	-61937.41675	1471	0.01
+14220	-61937.41675	1472	0.01
+14230	-61937.41675	1472	0.01
+14240	-61937.41675	1473	0.01
+14250	-61937.41674	1473	0.01
+14260	-61937.41674	1473	0.01
+14270	-61937.41674	1474	0.01
+14280	-61937.41674	1474	0.01
+14290	-61937.41674	1475	0.01
+14300	-61937.41652	1475	0.01
+14310	-61937.41652	1476	0.01
+14320	-61937.41652	1476	0.01
+14330	-61937.41642	1477	0.01
+14340	-61937.41642	1477	0.01
+14350	-61937.41642	1478	0.01
+14360	-61937.41642	1478	0.01
+14370	-61937.41642	1479	0.01
+14380	-61937.41642	1479	0.01
+14390	-61937.41642	1480	0.01
+14400	-61937.41642	1480	0.01
+14410	-61937.41642	1481	0.01
+14420	-61937.41642	1481	0.01
+14430	-61937.41642	1482	0.01
+14440	-61937.41642	1482	0.01
+14450	-61937.41642	1483	0.01
+14460	-61937.41642	1483	0.01
+14470	-61937.41642	1483	0.01
+14480	-61937.41642	1484	0.01
+14490	-61937.41642	1484	0.01
+14500	-61937.41607	1485	0.01
+14510	-61937.41607	1485	0.01
+14520	-61937.41607	1486	0.01
+14530	-61937.41282	1486	0.01
+14540	-61937.41282	1487	0.01
+14550	-61937.41282	1487	0.01
+14560	-61937.41282	1488	0.01
+14570	-61937.41282	1488	0.01
+14580	-61937.41282	1489	0.01
+14590	-61937.41282	1489	0.01
+14600	-61937.41282	1490	0.01
+14610	-61937.41282	1490	0.01
+14620	-61937.41282	1491	0.01
+14630	-61937.41282	1491	0.01
+14640	-61937.41282	1492	0.01
+14650	-61937.41282	1492	0.01
+14660	-61937.41282	1493	0.01
+14670	-61937.41282	1493	0.01
+14680	-61937.41282	1494	0.01
+14690	-61937.41282	1494	0.01
+14700	-61937.41282	1495	0.01
+14710	-61937.41282	1495	0.01
+14720	-61937.41282	1495	0.01
+14730	-61937.41282	1496	0.01
+14740	-61937.41282	1496	0.01
+14750	-61937.41282	1497	0.01
+14760	-61937.41282	1497	0.01
+14770	-61937.41282	1498	0.01
+14780	-61937.41282	1498	0.01
+14790	-61937.41282	1499	0.01
+14800	-61937.41282	1499	0.01
+14810	-61937.41282	1500	0.01
+14820	-61937.41282	1500	0.01
+14830	-61937.41282	1501	0.01
+14840	-61937.41282	1501	0.01
+14850	-61937.41282	1502	0.01
+14860	-61937.41282	1502	0.01
+14870	-61937.41282	1503	0.01
+14880	-61937.41282	1503	0.01
+14890	-61937.41282	1503	0.01
+14900	-61937.41282	1504	0.01
+14910	-61937.41282	1504	0.01
+14920	-61937.41282	1505	0.01
+14930	-61937.41282	1505	0.01
+14940	-61937.41282	1506	0.01
+14950	-61937.41282	1506	0.01
+14960	-61937.41282	1507	0.01
+14970	-61937.41282	1507	0.01
+14980	-61937.41282	1508	0.01
+14990	-61937.41282	1508	0.01
+15000	-61937.41282	1509	0.01
+15010	-61937.38849	1510	0.01
+15020	-61937.38849	1511	0.01
+15030	-61937.38849	1511	0.01
+15040	-61937.38849	1512	0.01
+15050	-61937.38831	1513	0.01
+15060	-61937.38831	1513	0.01
+15070	-61937.38831	1514	0.01
+15080	-61937.38831	1514	0.01
+15090	-61937.38831	1515	0.01
+15100	-61937.38831	1515	0.01
+15110	-61937.38831	1516	0.01
+15120	-61937.38831	1516	0.01
+15130	-61937.38831	1517	0.01
+15140	-61937.38831	1517	0.01
+15150	-61937.38831	1518	0.01
+15160	-61937.38831	1518	0.01
+15170	-61937.38831	1519	0.01
+15180	-61937.38831	1519	0.01
+15190	-61937.38831	1520	0.01
+15200	-61937.38831	1521	0.01
+15210	-61937.38831	1521	0.01
+15220	-61937.38831	1522	0.01
+15230	-61937.38831	1522	0.01
+15240	-61937.38831	1523	0.01
+15250	-61937.38831	1523	0.01
+15260	-61937.38831	1524	0.01
+15270	-61937.38831	1524	0.01
+15280	-61937.38831	1525	0.01
+15290	-61937.38831	1525	0.01
+15300	-61937.38831	1525	0.01
+15310	-61937.38831	1526	0.01
+15320	-61937.38831	1526	0.01
+15330	-61937.38831	1527	0.01
+15340	-61937.38831	1527	0.01
+15350	-61937.38831	1528	0.01
+15360	-61937.38831	1528	0.01
+15370	-61937.38831	1529	0.01
+15380	-61937.38829	1529	0.01
+15390	-61937.38829	1530	0.01
+15400	-61937.38829	1530	0.01
+15410	-61937.38829	1530	0.01
+15420	-61937.38829	1531	0.01
+15430	-61937.38829	1531	0.01
+15440	-61937.38829	1532	0.01
+15450	-61937.3867	1533	0.01
+15460	-61937.3867	1533	0.01
+15470	-61937.3867	1533	0.01
+15480	-61937.3867	1534	0.01
+15490	-61937.3867	1535	0.01
+15500	-61937.3867	1535	0.01
+15510	-61937.3867	1535	0.01
+15520	-61937.3867	1536	0.01
+15530	-61937.3867	1537	0.01
+15540	-61937.3867	1537	0.01
+15550	-61937.3867	1537	0.01
+15560	-61937.3867	1538	0.01
+15570	-61937.3867	1538	0.01
+15580	-61937.3867	1539	0.01
+15590	-61937.3867	1539	0.01
+15600	-61937.38545	1540	0.01
+15610	-61937.38545	1540	0.01
+15620	-61937.38545	1541	0.01
+15630	-61937.38545	1541	0.01
+15640	-61937.38545	1542	0.01
+15650	-61937.38545	1542	0.01
+15660	-61937.38545	1543	0.01
+15670	-61937.38545	1543	0.01
+15680	-61937.38545	1544	0.01
+15690	-61937.38545	1544	0.01
+15700	-61937.38545	1545	0.01
+15710	-61937.38545	1545	0.01
+15720	-61937.38545	1546	0.01
+15730	-61937.38545	1546	0.01
+15740	-61937.38545	1547	0.01
+15750	-61937.38545	1547	0.01
+15760	-61937.38545	1548	0.01
+15770	-61937.38545	1548	0.01
+15780	-61937.38545	1549	0.01
+15790	-61937.38545	1549	0.01
+15800	-61937.38545	1550	0.01
+15810	-61937.38545	1550	0.01
+15820	-61937.38091	1551	0.01
+15830	-61937.38091	1551	0.01
+15840	-61937.38091	1552	0.01
+15850	-61937.38091	1552	0.01
+15860	-61937.38067	1553	0.01
+15870	-61937.38034	1553	0.01
+15880	-61937.38034	1554	0.01
+15890	-61937.37839	1554	0.01
+15900	-61937.37839	1555	0.01
+15910	-61937.37839	1555	0.01
+15920	-61937.37839	1556	0.01
+15930	-61937.37839	1556	0.01
+15940	-61937.37839	1557	0.01
+15950	-61937.37821	1557	0.01
+15960	-61937.37821	1558	0.01
+15970	-61937.37821	1558	0.01
+15980	-61937.37821	1559	0.01
+15990	-61937.37821	1559	0.01
+16000	-61937.37821	1560	0.01
+16010	-61937.37821	1560	0.01
+16020	-61937.37821	1561	0.01
+16030	-61937.37821	1561	0.01
+16040	-61937.37821	1561	0.01
+16050	-61937.37821	1562	0.01
+16060	-61937.37821	1562	0.01
+16070	-61937.37821	1563	0.01
+16080	-61937.37821	1563	0.01
+16090	-61937.37821	1564	0.01
+16100	-61937.37821	1564	0.01
+16110	-61937.37821	1565	0.01
+16120	-61937.37821	1565	0.01
+16130	-61937.37821	1566	0.01
+16140	-61937.37821	1566	0.01
+16150	-61937.37821	1567	0.01
+16160	-61937.37821	1567	0.01
+16170	-61937.37821	1567	0.01
+16180	-61937.37821	1568	0.01
+16190	-61937.37821	1568	0.01
+16200	-61937.37821	1569	0.01
+16210	-61937.37821	1569	0.01
+16220	-61937.37821	1570	0.01
+16230	-61937.37821	1570	0.01
+16240	-61937.37821	1570	0.01
+16250	-61937.37821	1571	0.01
+16260	-61937.37821	1571	0.01
+16270	-61937.37821	1572	0.01
+16280	-61937.37821	1572	0.01
+16290	-61937.37821	1573	0.01
+16300	-61937.37821	1573	0.01
+16310	-61937.37821	1574	0.01
+16320	-61937.37821	1574	0.01
+16330	-61937.37821	1575	0.01
+16340	-61937.37821	1575	0.01
+16350	-61937.37821	1576	0.01
+16360	-61937.37821	1576	0.01
+16370	-61937.37821	1576	0.01
+16380	-61937.37821	1577	0.01
+16390	-61937.37821	1577	0.01
+16400	-61937.37821	1578	0.01
+Score after final optimization: -61937.27016
+Final	-61937.27016	1604	0.01
diff --git a/example/partition/exampleRuns/partitionedDna+Mkv/mixedDnaMkv.screen.log b/example/partition/exampleRuns/partitionedDna+Mkv/mixedDnaMkv.screen.log
new file mode 100644
index 0000000..a6e4996
--- /dev/null
+++ b/example/partition/exampleRuns/partitionedDna+Mkv/mixedDnaMkv.screen.log
@@ -0,0 +1,205 @@
+Running GARLI Version 2.01.1067 (18 May 2012)
+->Single processor version for 64-bit OS<-
+##############################################################
+ This is GARLI 2.0, the first "official" release including 
+          partitioned models.  It is a merging of
+   official release 1.0 and beta version GARLI-PART 0.97
+  Briefly, it includes models for nucleotides, amino acids,
+ codons, and morphology-like characters, any of which can be 
+  mixed together and applied to different subsets of data.
+
+    General program usage is extensively documented here:
+            http://www.nescent.org/wg/garli/
+      see this page for details on partitioned usage:
+  http://www.nescent.org/wg/garli/Partition_testing_version
+   and this page for details on Mkv mophology model usage:
+    http://www.nescent.org/wg/garli/Mkv_morphology_model
+         PLEASE LET ME KNOW OF ANY PROBLEMS AT:
+                garli.support at gmail.com
+##############################################################
+Compiled Jul  2 2012 15:52:18 using GNU gcc compiler version 4.2.1
+Using NCL version 2.1.17
+
+#######################################################
+Reading config file garli.conf
+###################################################
+READING OF DATA
+Attempting to read data file in Nexus format (using NCL):
+	dnaPlusGapCoding.nex ...
+Reading TAXA block... successful
+Reading CHARACTERS block... found dna data... successful
+Reading CHARACTERS block... found standard data... successful
+Reading SETS block... successful
+
+###################################################
+PARTITIONING OF DATA AND MODELS
+
+CHECK: DIFFERENT MODEL TYPES AND MODEL PARAMETERS APPLY
+	TO EACH DATA SUBSET (no linkage)
+
+GARLI data subset 1
+	CHARACTERS block #1 ("Untitled DATA Block 1GapsAsMissing")
+	CHARPARTITION subset #1 ("1")
+	Data read as Nucleotide data,
+	modeled as Nucleotide data
+	Summary of data:
+	  64 sequences.
+	  687 constant characters.
+	  338 parsimony-informative characters.
+	  44 uninformative variable characters.
+	  2 characters were completely missing or ambiguous (removed).
+	  1069 total characters (1071 before removing empty columns).
+	  787 unique patterns in compressed data matrix.
+	Pattern processing required < 1 second
+
+GARLI data subset 2
+	CHARACTERS block #1 ("Untitled DATA Block 1GapsAsMissing")
+	CHARPARTITION subset #2 ("2")
+	Data read as Nucleotide data,
+	modeled as Nucleotide data
+	Summary of data:
+	  64 sequences.
+	  687 constant characters.
+	  341 parsimony-informative characters.
+	  39 uninformative variable characters.
+	  3 characters were completely missing or ambiguous (removed).
+	  1067 total characters (1070 before removing empty columns).
+	  800 unique patterns in compressed data matrix.
+	Pattern processing required < 1 second
+
+GARLI data subset 3
+	CHARACTERS block #1 ("Untitled DATA Block 1GapsAsMissing")
+	CHARPARTITION subset #3 ("3")
+	Data read as Nucleotide data,
+	modeled as Nucleotide data
+	Summary of data:
+	  64 sequences.
+	  666 constant characters.
+	  346 parsimony-informative characters.
+	  54 uninformative variable characters.
+	  4 characters were completely missing or ambiguous (removed).
+	  1066 total characters (1070 before removing empty columns).
+	  799 unique patterns in compressed data matrix.
+	Pattern processing required < 1 second
+
+GARLI data subset 4
+	CHARACTERS block #2 ("Untitled DATA Block 1GapsAsBinary")
+	Data read as Standard k-state data, variable only,
+	modeled as Standard k-state data, variable only
+	NOTE: entirely missing characters removed from matrix:  736 792 1244 1644 1645 1993-1995 2195
+	Subset of data with 2 states:
+	  chars 1-735 737-791 793-1243 1245-1643 1646-1992 1996-2194 2196-2723
+	Summary of data:
+	  64 sequences.
+	  0 constant characters.
+	  1530 parsimony-informative characters.
+	  1184 uninformative variable characters.
+	  2714 total characters.
+	  768 unique patterns in compressed data matrix.
+	Pattern processing required < 1 second
+
+
+###################################################
+NOTE: Unlike many programs, the amount of system memory that Garli will
+use can be controlled by the user.
+(This comes from the availablememory setting in the configuration file.
+Availablememory should NOT be set to more than the actual amount of 
+physical memory that your computer has installed)
+
+For this dataset:
+ Mem level		availablememory setting
+  great			    >= 196 MB
+  good			approx 195 MB to 126 MB
+  low			approx 125 MB to 52 MB
+  very low		approx 52 MB to 40 MB
+the minimum required availablememory is 40 MB
+
+You specified that Garli should use at most 512.0 MB of memory.
+
+Garli will actually use approx. 293.0 MB of memory
+**Your memory level is: great (you don't need to change anything)**
+
+#######################################################
+Found outgroup specification:  1
+
+#######################################################
+STARTING RUN
+
+>>>Search rep 1 (of 2)<<<
+MODEL REPORT - Parameters are at their INITIAL values (not yet optimized)
+Model 1
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3211 0.2053 0.1693 0.3043 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    with an invariant (invariable) site category, proportion estimated
+      0.1607
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0000	0.1607
+      0.0334	0.2098
+      0.2519	0.2098
+      0.8203	0.2098
+      2.8944	0.2098
+
+Model 2
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3490 0.2203 0.1345 0.2962 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    with an invariant (invariable) site category, proportion estimated
+      0.1610
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0000	0.1610
+      0.0334	0.2098
+      0.2519	0.2098
+      0.8203	0.2098
+      2.8944	0.2098
+
+Model 3
+  Number of states = 4 (nucleotide data)
+  Nucleotide Relative Rate Matrix:     6 rates 
+    AC = 1.000, AG = 4.000, AT = 1.000, CG = 1.000, CT = 4.000, GT = 1.000
+  Equilibrium State Frequencies: estimated
+    (ACGT) 0.3516 0.2003 0.1525 0.2956 
+  Rate Heterogeneity Model:
+    4 discrete gamma distributed rate categories, alpha param estimated
+      0.5000
+    with an invariant (invariable) site category, proportion estimated
+      0.1562
+    Substitution rate categories under this model:
+      rate	proportion
+      0.0000	0.1562
+      0.0334	0.2110
+      0.2519	0.2110
+      0.8203	0.2110
+      2.8944	0.2110
+
+Model 4
+  Number of states = 2 (standard data)
+  Character change matrix:
+    One rate (symmetric one rate Mkv model)
+  Equilibrium State Frequencies: equal (0.50, fixed)
+  Rate Heterogeneity Model:
+    no rate heterogeneity
+
+Subset rate multipliers:
+    1.00  1.00  1.00  1.00
+Starting with seed=558821
+
+creating random starting tree...
+Initial ln Likelihood: -130238.3436
+optimizing: starting branch lengths, alpha shape, prop. invar, rel rates, eq freqs, subset rates...
+pass 1:+23019.697 (branch=20315.82 scale=171.66 alpha=920.61 freqs=166.50 rel rates=112.55 pinv=545.55 subset rates=787.00)
+pass 2:+ 3142.907 (branch=2540.85 scale=  1.40 alpha=173.03 freqs= 16.15 rel rates= 15.76 pinv=257.52 subset rates=138.20)
+pass 3:+  835.620 (branch= 380.39 scale=  8.60 alpha=272.65 freqs=  5.15 rel rates= 18.80 pinv= 82.85 subset rates= 67.19)
+pass 4:+  340.762 (branch= 189.10 scale= 12.96 alpha= 33.80 freqs=  6.94 rel rates= 10.24 pinv=  0.00 subset rates= 87.73)
diff --git a/example/partition/templateConfigs/garli.3diffModels.bigData.conf b/example/partition/templateConfigs/garli.3diffModels.bigData.conf
new file mode 100644
index 0000000..1f682d0
--- /dev/null
+++ b/example/partition/templateConfigs/garli.3diffModels.bigData.conf
@@ -0,0 +1,83 @@
+[general]
+datafname = YOURDATAFILE.nex
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 100
+ofprefix = 3diffModels
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 10000
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+outputsitelikelihoods = 0
+optimizeinputonly = 0
+collapsebranches = 1
+
+searchreps = 5
+bootstrapreps = 0
+linkmodels = 0
+subsetspecificrates = 1
+
+[model1]
+datatype = nucleotide
+ratematrix = ( 0 1 2 2 3 4 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = none
+
+[model2]
+datatype = nucleotide
+ratematrix = ( 0 1 2 1 0 3 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = none
+
+[model3]
+datatype = nucleotide
+ratematrix = ( 0 1 2 3 1 0 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
diff --git a/example/partition/templateConfigs/garli.3diffModels.smallData.conf b/example/partition/templateConfigs/garli.3diffModels.smallData.conf
new file mode 100644
index 0000000..a3368b2
--- /dev/null
+++ b/example/partition/templateConfigs/garli.3diffModels.smallData.conf
@@ -0,0 +1,83 @@
+[general]
+datafname = YOURDATAFILE.nex
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = 3diffModels
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 5000
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+outputsitelikelihoods = 0
+optimizeinputonly = 0
+collapsebranches = 1
+
+searchreps = 5
+bootstrapreps = 0
+linkmodels = 0
+subsetspecificrates = 1
+
+[model1]
+datatype = nucleotide
+ratematrix = ( 0 1 2 2 3 4 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = none
+
+[model2]
+datatype = nucleotide
+ratematrix = ( 0 1 2 1 0 3 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = none
+
+[model3]
+datatype = nucleotide
+ratematrix = ( 0 1 2 3 1 0 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 5
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
diff --git a/example/partition/templateConfigs/garli.mixedDnaMkv.conf b/example/partition/templateConfigs/garli.mixedDnaMkv.conf
new file mode 100644
index 0000000..3cc3b2b
--- /dev/null
+++ b/example/partition/templateConfigs/garli.mixedDnaMkv.conf
@@ -0,0 +1,75 @@
+[general]
+datafname = YOURDATAFILE.nex
+constraintfile = none
+streefname = random
+attachmentspertaxon = 100
+ofprefix = mixedDnaMkv
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 10000
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+outputsitelikelihoods = 0
+optimizeinputonly = 0
+collapsebranches = 1
+
+searchreps = 5
+bootstrapreps = 0
+linkmodels = 0
+subsetspecificrates = 1
+
+[model1]
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[model2]
+datatype = standardvariable
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
diff --git a/example/partition/templateConfigs/garli.mkv.conf b/example/partition/templateConfigs/garli.mkv.conf
new file mode 100644
index 0000000..8a2b9de
--- /dev/null
+++ b/example/partition/templateConfigs/garli.mkv.conf
@@ -0,0 +1,67 @@
+[general]
+datafname = YOURDATAFILE.nex
+constraintfile = none
+streefname = random
+attachmentspertaxon = 100
+ofprefix = mkv
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 10000
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+outputsitelikelihoods = 0
+optimizeinputonly = 0
+collapsebranches = 1
+
+searchreps = 5
+bootstrapreps = 0
+linkmodels = 0
+subsetspecificrates = 0
+
+[model1]
+datatype = standardvariable
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
diff --git a/example/partition/templateConfigs/garli.oneModelType.bigData.conf b/example/partition/templateConfigs/garli.oneModelType.bigData.conf
new file mode 100644
index 0000000..7772bf1
--- /dev/null
+++ b/example/partition/templateConfigs/garli.oneModelType.bigData.conf
@@ -0,0 +1,67 @@
+[general]
+datafname = YOURDATAFILE.nex
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 100
+ofprefix = oneModelType
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 10000
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+outputsitelikelihoods = 0
+optimizeinputonly = 0
+collapsebranches = 1
+
+searchreps = 5
+bootstrapreps = 0
+linkmodels = 0
+subsetspecificrates = 1
+
+[model1]
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
diff --git a/example/partition/templateConfigs/garli.oneModelType.smallData.conf b/example/partition/templateConfigs/garli.oneModelType.smallData.conf
new file mode 100644
index 0000000..f4d7341
--- /dev/null
+++ b/example/partition/templateConfigs/garli.oneModelType.smallData.conf
@@ -0,0 +1,67 @@
+[general]
+datafname = YOURDATAFILE.nex
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = oneModelType
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 5000
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+outputsitelikelihoods = 0
+optimizeinputonly = 0
+collapsebranches = 1
+
+searchreps = 5
+bootstrapreps = 0
+linkmodels = 0
+subsetspecificrates = 1
+
+[model1]
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 5
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
diff --git a/project/standardGarliVC/BOINCGarli.sln b/project/standardGarliVC/BOINCGarli.sln
new file mode 100644
index 0000000..e48adae
--- /dev/null
+++ b/project/standardGarliVC/BOINCGarli.sln
@@ -0,0 +1,91 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libboinc", "..\..\..\boinc_samples\win_build\libboinc.vcproj", "{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libboincapi", "..\..\..\boinc_samples\win_build\libboincapi.vcproj", "{0BC1DB36-030A-4321-B387-1CEE2611E329}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BOINCGarli", "BOINCGarli.vcproj", "{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}"
+	ProjectSection(ProjectDependencies) = postProject
+		{B88D3B05-C6E0-4094-9B11-7AA14A9A824B} = {B88D3B05-C6E0-4094-9B11-7AA14A9A824B}
+		{0BC1DB36-030A-4321-B387-1CEE2611E329} = {0BC1DB36-030A-4321-B387-1CEE2611E329}
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8} = {E8F6BD7E-461A-4733-B7D8-37B09A099ED8}
+	EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{4E038CCC-3A90-41E6-B2E6-A553BBDB1BCE}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libncl", "..\..\..\ncl-2.0\VC6\libncl\libncl.vcproj", "{B88D3B05-C6E0-4094-9B11-7AA14A9A824B}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		BOINC_Debug|Win32 = BOINC_Debug|Win32
+		BOINC_Debug|x64 = BOINC_Debug|x64
+		BOINC_Release|Win32 = BOINC_Release|Win32
+		BOINC_Release|x64 = BOINC_Release|x64
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.BOINC_Debug|Win32.ActiveCfg = Debug|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.BOINC_Debug|Win32.Build.0 = Debug|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.BOINC_Debug|x64.ActiveCfg = Debug|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.BOINC_Debug|x64.Build.0 = Debug|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.BOINC_Release|Win32.ActiveCfg = Release|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.BOINC_Release|Win32.Build.0 = Release|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.BOINC_Release|x64.ActiveCfg = BOINC_Release|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.BOINC_Release|x64.Build.0 = BOINC_Release|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|Win32.Build.0 = Debug|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|x64.ActiveCfg = Debug|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Debug|x64.Build.0 = Debug|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|Win32.ActiveCfg = Release|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|Win32.Build.0 = Release|Win32
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|x64.ActiveCfg = Release|x64
+		{E8F6BD7E-461A-4733-B7D8-37B09A099ED8}.Release|x64.Build.0 = Release|x64
+		{0BC1DB36-030A-4321-B387-1CEE2611E329}.BOINC_Debug|Win32.ActiveCfg = Debug|Win32
+		{0BC1DB36-030A-4321-B387-1CEE2611E329}.BOINC_Debug|Win32.Build.0 = Debug|Win32
+		{0BC1DB36-030A-4321-B387-1CEE2611E329}.BOINC_Debug|x64.ActiveCfg = Debug|x64
+		{0BC1DB36-030A-4321-B387-1CEE2611E329}.BOINC_Debug|x64.Build.0 = Debug|x64
+		{0BC1DB36-030A-4321-B387-1CEE2611E329}.BOINC_Release|Win32.ActiveCfg = Release|Win32
+		{0BC1DB36-030A-4321-B387-1CEE2611E329}.BOINC_Release|Win32.Build.0 = Release|Win32
+		{0BC1DB36-030A-4321-B387-1CEE2611E329}.BOINC_Release|x64.ActiveCfg = BOINC_Release|x64
+		{0BC1DB36-030A-4321-B387-1CEE2611E329}.BOINC_Release|x64.Build.0 = BOINC_Release|x64
+		{0BC1DB36-030A-4321-B387-1CEE2611E329}.Debug|Win32.ActiveCfg = Debug|Win32
+		{0BC1DB36-030A-4321-B387-1CEE2611E329}.Debug|Win32.Build.0 = Debug|Win32
+		{0BC1DB36-030A-4321-B387-1CEE2611E329}.Debug|x64.ActiveCfg = Debug|x64
+		{0BC1DB36-030A-4321-B387-1CEE2611E329}.Debug|x64.Build.0 = Debug|x64
+		{0BC1DB36-030A-4321-B387-1CEE2611E329}.Release|Win32.ActiveCfg = Release|Win32
+		{0BC1DB36-030A-4321-B387-1CEE2611E329}.Release|Win32.Build.0 = Release|Win32
+		{0BC1DB36-030A-4321-B387-1CEE2611E329}.Release|x64.ActiveCfg = Release|x64
+		{0BC1DB36-030A-4321-B387-1CEE2611E329}.Release|x64.Build.0 = Release|x64
+		{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}.BOINC_Debug|Win32.ActiveCfg = BOINC_Debug|Win32
+		{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}.BOINC_Debug|Win32.Build.0 = BOINC_Debug|Win32
+		{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}.BOINC_Debug|x64.ActiveCfg = BOINC_Debug|Win32
+		{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}.BOINC_Release|Win32.ActiveCfg = BOINC_Release|Win32
+		{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}.BOINC_Release|Win32.Build.0 = BOINC_Release|Win32
+		{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}.BOINC_Release|x64.ActiveCfg = BOINC_Release|Win32
+		{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}.Debug|Win32.Build.0 = Debug|Win32
+		{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}.Debug|x64.ActiveCfg = Debug|Win32
+		{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}.Release|Win32.ActiveCfg = Release|Win32
+		{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}.Release|Win32.Build.0 = Release|Win32
+		{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}.Release|x64.ActiveCfg = Release|Win32
+		{B88D3B05-C6E0-4094-9B11-7AA14A9A824B}.BOINC_Debug|Win32.ActiveCfg = Debug|Win32
+		{B88D3B05-C6E0-4094-9B11-7AA14A9A824B}.BOINC_Debug|Win32.Build.0 = Debug|Win32
+		{B88D3B05-C6E0-4094-9B11-7AA14A9A824B}.BOINC_Debug|x64.ActiveCfg = Debug|Win32
+		{B88D3B05-C6E0-4094-9B11-7AA14A9A824B}.BOINC_Release|Win32.ActiveCfg = Release|Win32
+		{B88D3B05-C6E0-4094-9B11-7AA14A9A824B}.BOINC_Release|Win32.Build.0 = Release|Win32
+		{B88D3B05-C6E0-4094-9B11-7AA14A9A824B}.BOINC_Release|x64.ActiveCfg = Release|Win32
+		{B88D3B05-C6E0-4094-9B11-7AA14A9A824B}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B88D3B05-C6E0-4094-9B11-7AA14A9A824B}.Debug|Win32.Build.0 = Debug|Win32
+		{B88D3B05-C6E0-4094-9B11-7AA14A9A824B}.Debug|x64.ActiveCfg = Debug|Win32
+		{B88D3B05-C6E0-4094-9B11-7AA14A9A824B}.Release|Win32.ActiveCfg = Release|Win32
+		{B88D3B05-C6E0-4094-9B11-7AA14A9A824B}.Release|Win32.Build.0 = Release|Win32
+		{B88D3B05-C6E0-4094-9B11-7AA14A9A824B}.Release|x64.ActiveCfg = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/project/standardGarliVC/BOINCGarli.vcproj b/project/standardGarliVC/BOINCGarli.vcproj
new file mode 100644
index 0000000..2aa1861
--- /dev/null
+++ b/project/standardGarliVC/BOINCGarli.vcproj
@@ -0,0 +1,1027 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="BOINCGarli"
+	ProjectGUID="{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}"
+	RootNamespace="standardGarli"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+		<Platform
+			Name="x64"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="$(NCL_INCL);$(NCL_INCL2)"
+				PreprocessorDefinitions="NCL_CONST_FUNCS;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+				ForcedIncludeFiles="defs.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="2"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|x64"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="$(NCL_INCL);$(NCL_INCL2)"
+				PreprocessorDefinitions="NCL_CONST_FUNCS;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				ForcedIncludeFiles="defs.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="2"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			UseOfMFC="1"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				EnableIntrinsicFunctions="false"
+				OmitFramePointers="false"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				EnableEnhancedInstructionSet="0"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				ForcedIncludeFiles="defs.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="1"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|x64"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			UseOfMFC="1"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				EnableIntrinsicFunctions="false"
+				OmitFramePointers="false"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				EnableEnhancedInstructionSet="0"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				ForcedIncludeFiles="defs.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="1"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="BOINC_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\..\..\ncl\branches\v2.1\ncl;..\..\..\..\..\BOINC\boinc\api;..\..\..\..\..\BOINC\boinc\lib;..\..\..\..\..\ncl\branches\v2.1"
+				PreprocessorDefinitions="NCL_CONST_FUNCS;BOINC;WIN32;_DEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib opengl32.lib glu32.lib glaux.lib ole32.lib delayimp.lib"
+				LinkIncremental="2"
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="BOINC_Debug|x64"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="2"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\..\..\..\ncl\branches\v2.1\ncl;..\..\..\..\..\BOINC\boinc\api;..\..\..\..\..\BOINC\boinc\lib;..\..\..\..\..\ncl\branches\v2.1"
+				PreprocessorDefinitions="NCL_CONST_FUNCS;BOINC;WIN32;_DEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="libcmtd.lib libcpmtd.lib kernel32.lib user32.lib gdi32.lib opengl32.lib glu32.lib ole32.lib delayimp.lib"
+				LinkIncremental="2"
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="BOINC_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			UseOfMFC="1"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				EnableIntrinsicFunctions="false"
+				FavorSizeOrSpeed="1"
+				OmitFramePointers="false"
+				AdditionalIncludeDirectories="..\..\..\..\..\ncl\branches\v2.1\ncl;..\..\..\..\..\BOINC\boinc\api;..\..\..\..\..\BOINC\boinc\lib;..\..\..\..\..\ncl\branches\v2.1"
+				PreprocessorDefinitions="NCL_CONST_FUNCS;BOINC;WIN32;NDEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				EnableEnhancedInstructionSet="0"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="kernel32.lib user32.lib gdi32.lib opengl32.lib glu32.lib glaux.lib odbc32.lib odbccp32.lib libcmt.lib libcpmt.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
+				LinkIncremental="1"
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="BOINC_Release|x64"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			UseOfMFC="1"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				EnableIntrinsicFunctions="false"
+				FavorSizeOrSpeed="1"
+				OmitFramePointers="false"
+				AdditionalIncludeDirectories="..\..\..\..\..\ncl\branches\v2.1\ncl;..\..\..\..\..\BOINC\boinc\api;..\..\..\..\..\BOINC\boinc\lib;..\..\..\..\..\ncl\branches\v2.1"
+				PreprocessorDefinitions="NCL_CONST_FUNCS;BOINC;WIN32;NDEBUG;_MT;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				EnableEnhancedInstructionSet="0"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="kernel32.lib user32.lib gdi32.lib opengl32.lib glu32.lib odbc32.lib odbccp32.lib libcmt.lib libcpmt.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
+				LinkIncremental="1"
+				IgnoreAllDefaultLibraries="true"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="OpenMP_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				OpenMP="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+				ForcedIncludeFiles="defs.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="2"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="OpenMP_Debug|x64"
+			OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+			IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="3"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				OpenMP="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				ForcedIncludeFiles="defs.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="2"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+				TargetMachine="17"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\..\src\adaptation.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\bipartition.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\condlike.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\configoptions.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\configreader.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\datamatr.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\funcs.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\garlimain.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\garlireader.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\individual.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\linalg.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\model.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\optimization.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\population.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\rng.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\sequencedata.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\set.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\translatetable.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\tree.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\treenode.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\..\src\adaptation.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\bipartition.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\clamanager.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\condlike.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\configoptions.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\configreader.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\datamatr.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\defs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\errorexception.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\funcs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\individual.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\linalg.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\memchk.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\model.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\mpifuncs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\optimizationinfo.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\outputman.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\population.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\reconnode.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\rng.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\sequencedata.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\set.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\stopwatch.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\stricl.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\threaddcls.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\translatetable.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\tree.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\treenode.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\utility.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/project/standardGarliVC/standardGarli.sln b/project/standardGarliVC/standardGarli.sln
new file mode 100644
index 0000000..017110f
--- /dev/null
+++ b/project/standardGarliVC/standardGarli.sln
@@ -0,0 +1,39 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "standardGarli", "standardGarli.vcproj", "{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}"
+	ProjectSection(ProjectDependencies) = postProject
+		{B88D3B05-C6E0-4094-9B11-7AA14A9A824B} = {B88D3B05-C6E0-4094-9B11-7AA14A9A824B}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libncl", "..\..\..\ncl-2.0\VC6\libncl\libncl.vcproj", "{B88D3B05-C6E0-4094-9B11-7AA14A9A824B}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		OMP_Debug|Win32 = OMP_Debug|Win32
+		OMP_Release|Win32 = OMP_Release|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}.Debug|Win32.Build.0 = Debug|Win32
+		{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}.OMP_Debug|Win32.ActiveCfg = OMP_Debug|Win32
+		{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}.OMP_Debug|Win32.Build.0 = OMP_Debug|Win32
+		{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}.OMP_Release|Win32.ActiveCfg = OMP_Release|Win32
+		{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}.OMP_Release|Win32.Build.0 = OMP_Release|Win32
+		{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}.Release|Win32.ActiveCfg = Release|Win32
+		{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}.Release|Win32.Build.0 = Release|Win32
+		{B88D3B05-C6E0-4094-9B11-7AA14A9A824B}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B88D3B05-C6E0-4094-9B11-7AA14A9A824B}.Debug|Win32.Build.0 = Debug|Win32
+		{B88D3B05-C6E0-4094-9B11-7AA14A9A824B}.OMP_Debug|Win32.ActiveCfg = Debug|Win32
+		{B88D3B05-C6E0-4094-9B11-7AA14A9A824B}.OMP_Debug|Win32.Build.0 = Debug|Win32
+		{B88D3B05-C6E0-4094-9B11-7AA14A9A824B}.OMP_Release|Win32.ActiveCfg = Release|Win32
+		{B88D3B05-C6E0-4094-9B11-7AA14A9A824B}.OMP_Release|Win32.Build.0 = Release|Win32
+		{B88D3B05-C6E0-4094-9B11-7AA14A9A824B}.Release|Win32.ActiveCfg = Release|Win32
+		{B88D3B05-C6E0-4094-9B11-7AA14A9A824B}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/project/standardGarliVC/standardGarli.vcproj b/project/standardGarliVC/standardGarli.vcproj
new file mode 100644
index 0000000..e3aa193
--- /dev/null
+++ b/project/standardGarliVC/standardGarli.vcproj
@@ -0,0 +1,651 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="standardGarli"
+	ProjectGUID="{E40AF4AF-9D7C-4CA5-A6F3-758C7364EB7F}"
+	RootNamespace="standardGarli"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="$(NCL_INCL);$(NCL_INCL2)"
+				PreprocessorDefinitions="NCL_CONST_FUNCS;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="2"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			UseOfMFC="1"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				EnableIntrinsicFunctions="false"
+				FavorSizeOrSpeed="1"
+				OmitFramePointers="false"
+				WholeProgramOptimization="true"
+				AdditionalIncludeDirectories="$(NCL_INCL);$(NCL_INCL2)"
+				PreprocessorDefinitions="NCL_CONST_FUNCS;NDEBUG;WIN32;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				EnableEnhancedInstructionSet="0"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="1"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="OMP_Release|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			UseOfMFC="1"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+				CommandLine=""
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				EnableIntrinsicFunctions="false"
+				FavorSizeOrSpeed="1"
+				OmitFramePointers="false"
+				WholeProgramOptimization="true"
+				AdditionalIncludeDirectories="$(NCL_INCL);$(NCL_INCL2)"
+				PreprocessorDefinitions="NCL_CONST_FUNCS;WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				EnableEnhancedInstructionSet="0"
+				OpenMP="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="3"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="1"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="OMP_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="$(NCL_INCL);$(NCL_INCL2)"
+				PreprocessorDefinitions="NCL_CONST_FUNCS;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				OpenMP="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+				ForcedIncludeFiles=""
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="2"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Alt_Debug|Win32"
+			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../../../ncl-2.0/src"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
+				MinimalRebuild="true"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="1"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="true"
+				DebugInformationFormat="4"
+				ForcedIncludeFiles="defs_debug.h"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkIncremental="2"
+				GenerateDebugInformation="true"
+				SubSystem="1"
+				TargetMachine="1"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\..\src\adaptation.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\bipartition.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\condlike.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\configoptions.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\configreader.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\datamatr.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\funcs.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\garlimain.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\garlireader.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\individual.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\linalg.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\model.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\mpifuncs.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\mpitrick.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\optimization.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\population.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\rng.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\sequencedata.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\set.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\threadfunc.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\translatetable.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\tree.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\treenode.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\..\src\adaptation.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\bipartition.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\clamanager.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\condlike.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\configoptions.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\configreader.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\datamatr.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\defs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\errorexception.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\funcs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\individual.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\linalg.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\memchk.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\model.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\mpifuncs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\optimizationinfo.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\outputman.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\population.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\reconnode.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\rng.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\sequencedata.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\set.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\stopwatch.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\threaddcls.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\translatetable.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\tree.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\treenode.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\utility.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..89cc793
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,70 @@
+AM_CPPFLAGS = @CPPFLAGS@
+AM_LDFLAGS  = @LDFLAGS@
+ 
+bin_PROGRAMS = Garli
+
+EXTRA_DIST = threadfunc.cpp \
+	mpifuncs.cpp 
+
+noinst_HEADERS = \
+	adaptation.h \
+	bipartition.h \
+	clamanager.h \
+	condlike.h \
+	configoptions.h \
+	configreader.h \
+	datamatr.h \
+	defs.h \
+	errorexception.h \
+	funcs.h \
+	garlireader.h \
+	individual.h \
+	linalg.h \
+	memchk.h \
+	model.h \
+	mpifuncs.h \
+	optimizationinfo.h \
+	outputman.h \
+	population.h \
+	reconnode.h \
+	rng.h \
+	sequencedata.h \
+	set.h \
+	stopwatch.h \
+	threaddcls.h \
+	translatetable.h \
+	tree.h \
+	treenode.h \
+	utility.h 
+
+Garli_SOURCES = \
+	adaptation.cpp \
+	bipartition.cpp \
+	condlike.cpp \
+	configoptions.cpp \
+	configreader.cpp \
+	datamatr.cpp \
+	funcs.cpp \
+	garlimain.cpp \
+	garlireader.cpp \
+	individual.cpp \
+	linalg.cpp \
+	model.cpp \
+	optimization.cpp \
+	population.cpp \
+	rng.cpp \
+	sequencedata.cpp \
+	set.cpp \
+	translatetable.cpp \
+	tree.cpp \
+	treenode.cpp \
+	mpitrick.cpp
+
+
+Garli_LDADD =  $(LDADD) @GARLI_LIBS@
+
+install-exec-hook:
+	cd $(DESTDIR)$(bindir) && \
+	  mv -f Garli$(EXEEXT) Garli-$(VERSION)$(EXEEXT) && \
+	  $(LN_S) Garli-$(VERSION)$(EXEEXT) Garli$(EXEEXT)
+
diff --git a/src/Makefile.ser b/src/Makefile.ser
new file mode 100644
index 0000000..61291b3
--- /dev/null
+++ b/src/Makefile.ser
@@ -0,0 +1,118 @@
+#NOTE THIS IS AN OLD AND CRAPPY MAKEFILE  
+#SEE THE INSTALL FILE FOR COMPILATION INSTRUCTIONS AND DO NOT USE
+#THIS UNLESS YOU HAVE TO
+
+#GARLI version 0.97 makefile
+
+#NOTE - this is from the poor make system of version 0.951 and earlier.  The configure
+#	script mechanism should now be used instead if possible
+
+#to use, follow steps 1, 2 and optionally 3
+
+#(1) choose one of these compile types
+#options are:
+#gcc_any		gnu compiler gcc, any architecture
+#gcc_osx_universal	gcc on OSX to make a universal binary
+#xlc_ppc970		ibm compiler for Power PC 970 architecture
+#icc_any		Intel compiler icc (commercial). \
+			icc code is much faster on intel hardware
+
+COMPILE_TYPE = gcc_any
+
+
+#(2) these need to be adjusted to the correct path to a compiled
+#copy of Paul Lewis's Nexus Class Library
+#(NCL is available here: http://hydrodictyon.eeb.uconn.edu/ncl)
+#See the NCL documentation for details on compiling it.
+#Note that you may be able to safely ignore some errors during
+#NCL compilation (Garli only needs the static library libncl.a)
+NCL_INCLUDES = ../../ncl-2.0/src
+LIB_NCL = ../../ncl-2.0/src/libncl.a
+
+
+#(3)set this to yes to compile a version that uses MPI to fork
+#multiple serial runs across processors (using the same config)
+#This is an advanced option and should generally be = no unless
+#you know what you are doing
+MPI_RUN_SPLITTER = no
+
+#gcc: gnu compiler 
+	#linux or OSX binary that will work on the machine type that it is compiled on
+ifeq ($(COMPILE_TYPE),gcc_any)
+	CC = g++
+	CC_FLAGS = -O3 -fstrict-aliasing -fomit-frame-pointer -funroll-loops \
+		 -fsigned-char -DNDEBUG -DUNIX  -I$(NCL_INCLUDES)
+
+endif
+
+#gcc: gnu compiler 
+	#OSX universal binary (may only compile on intel machines)
+ifeq ($(COMPILE_TYPE),gcc_osx_universal)
+	CC = g++
+	CC_FLAGS = -O3 -fstrict-aliasing -arch i386 -arch ppc -fomit-frame-pointer \
+		 -funroll-loops -DUNIX -DNDEBUG -include defs.h -I$(NCL_INCLUDES)
+endif
+
+#icc: intel compiler, any machine type
+ifeq ($(COMPILE_TYPE),icc_any)
+	CC = icpc
+	CC_FLAGS =  -O2 -ip -fno-alias -DUNIX -DNDEBUG -I$(NCL_INCLUDES)
+endif
+
+#xlc: IBM compiler, PowerPC 970 processor
+ifeq ($(COMPILE_TYPE),xlc_ppc970)
+	CC = xlC
+	CC_FLAGS = -qsourcetype=c++ -qarch=ppc970 -qtune=ppc970 -qenablevmx \
+		-qaltivec -q64 -O3 -qalias=ansi -qunroll=yes -qchars=signed \
+		-qinclude=defs.h -I$(NCL_INCLUDES) -DUNIX -DNDEBUG
+endif
+
+ifeq ($(MPI_RUN_SPLITTER), yes)
+	CC = mpicxx
+	CC_FLAGS += -DSUBROUTINE_GARLI
+endif
+
+
+EXEC     = Garli-Part-0.97
+
+OBJECT_LIST =	condlike.o datamatr.o individual.o\
+		population.o rng.o set.o\
+		garlireader.o translatetable.o tree.o treenode.o\
+		funcs.o	configreader.o configoptions.o\
+		bipartition.o model.o linalg.o adaptation.o sequencedata.o\
+		optimization.o
+
+ifeq ($(MPI_RUN_SPLITTER), yes)
+	OBJECT_LIST += mpitrick.o
+endif
+
+Garli-Part-0.97 : $(OBJECT_LIST) garlimain.o
+	$(CC) $(CC_FLAGS) -v -o $(EXEC) $(OBJECT_LIST) $(LIB_NCL) garlimain.o
+
+#this forces garlimain.cpp to always be recompiled, which ensures that the
+#"compiled on XXX" message will be current
+garlimain.o::
+	$(CC) $(CC_FLAGS) -c -I. garlimain.cpp
+.cpp.o: 
+	$(CC) -c $(CC_FLAGS)  -I.  $*.cpp
+
+condlike.o:      condlike.h defs.h
+configreader.o:  configreader.h defs.h
+configoptions.o: configoptions.h defs.h
+tree.o:          tree.h funcs.h defs.h clamanager.h
+optimization.o:	 tree.h funcs.h defs.h
+population.o:    population.h clamanager.h defs.h
+individual.o:    individual.h clamanager.h defs.h
+datamatr.o:      datamatr.h defs.h
+model.o:         model.h defs.h
+funcs.o:         funcs.h defs.h
+linalg.o:        linalg.h defs.h
+treenode.o:      treenode.h defs.h
+bipartition.o:   bipartition.h defs.h
+translatetable.o:translatetable.h defs.h
+set.o:           set.h defs.h
+rng.o:           rng.h defs.h
+adaptation.o:	 	 adaptation.h defs.h
+sequencedata.o:		 sequencedata.h defs.h
+garlireader.o:	garlireader.h defs.h
+
diff --git a/src/adaptation.cpp b/src/adaptation.cpp
new file mode 100644
index 0000000..a6c27cf
--- /dev/null
+++ b/src/adaptation.cpp
@@ -0,0 +1,520 @@
+// GARLI version 2.0 source code
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <iostream>
+#include <fstream>
+#include <cstdio>
+
+using namespace std;
+
+#include "defs.h"
+#include "funcs.h"
+#include "adaptation.h"
+#include "math.h"
+#include "configoptions.h"
+#include "individual.h"
+
+/* The next 3 lovely lines are used to cause the build to fail.  This is useful for making 
+   	sure that our automated build system is finding build errors
+*/
+#if defined(CAUSE_A_BUILD_ERROR) && CAUSE_A_BUILD_ERROR
+#	error "CAUSE_A_BUILD_ERROR is defined"
+#endif
+
+Adaptation::Adaptation(const GeneralGamlConfig *gc){
+
+	intervalsToStore=gc->intervalsToStore;
+	intervalLength=gc->intervalLength;
+
+	startOptPrecision = branchOptPrecision = gc->startOptPrec;
+	minOptPrecision = gc->minOptPrec;
+
+	numPrecReductions=gc->numPrecReductions;
+	if(gc->numPrecReductions > 0)//changing prec reduction to linear rather than geometric
+		//precReductionFactor = pow((minOptPrecision/startOptPrecision), 1.0/numPrecReductions);
+		precReductionFactor = (startOptPrecision - minOptPrecision)/FLOAT_TYPE(numPrecReductions);
+	else
+		precReductionFactor = gc->precReductionFactor;
+
+	reset=false;
+
+	topoWeight = gc->topoWeight;
+	modWeight = gc->modWeight;
+	brlenWeight = gc->brlenWeight;
+	
+	origRandNNIweight = randNNIweight = gc->randNNIweight;
+	randSPRweight = gc->randSPRweight;
+	limSPRweight = gc->limSPRweight;
+	limSPRrange = gc->limSPRrange;
+#ifdef GANESH
+	randPECRweight = gc->randPECRweight;
+#endif
+
+	FLOAT_TYPE tot = topoWeight+modWeight+brlenWeight;
+	topoMutateProb = topoWeight / tot;
+	modelMutateProb = modWeight / tot; 	
+
+#ifdef GANESH
+	tot = randNNIweight + randSPRweight + limSPRweight + randPECRweight;
+	randNNIprob = randNNIweight / tot;
+	randSPRprob = randSPRweight / tot;
+	limSPRprob = limSPRweight / tot;
+	randPECRprob = randPECRweight / tot;
+#else
+	tot = randNNIweight + randSPRweight + limSPRweight;
+	randNNIprob = randNNIweight / tot;
+	randSPRprob = randSPRweight / tot;
+	limSPRprob = limSPRweight / tot;
+#endif
+
+	exNNIprob = 0.0;
+	exlimSPRprob = 0.0;
+
+	lastgenscore = 0.0;
+	laststepscore=0.0;
+	improveOverStoredIntervals=0.0;
+	recTopImproveSize = 1.0;
+
+	randNNI = new FLOAT_TYPE[intervalsToStore]; randNNInum = new int[intervalsToStore];
+	exNNI = new FLOAT_TYPE[intervalsToStore]; exNNInum = new int[intervalsToStore];
+	randSPR = new FLOAT_TYPE[intervalsToStore]; randSPRnum = new int[intervalsToStore];
+#ifdef GANESH
+	randPECR = new FLOAT_TYPE[intervalsToStore]; randPECRnum = new int[intervalsToStore];
+#endif
+	limSPR = new FLOAT_TYPE[intervalsToStore]; limSPRnum = new int[intervalsToStore];
+	exlimSPR = new FLOAT_TYPE[intervalsToStore]; exlimSPRnum = new int[intervalsToStore];
+	randRecom = new FLOAT_TYPE[intervalsToStore];	 randRecomnum = new int[intervalsToStore];
+	bipartRecom = new FLOAT_TYPE[intervalsToStore];	 bipartRecomnum = new int[intervalsToStore];
+	onlyBrlen = new FLOAT_TYPE[intervalsToStore]; onlyBrlennum = new int[intervalsToStore];
+	improvetotal = new FLOAT_TYPE[intervalsToStore];
+	anyModel = new FLOAT_TYPE[intervalsToStore]; anyModelnum = new int[intervalsToStore];
+
+#ifdef MPI_VERSION
+	bestFromRemote=new FLOAT_TYPE[intervalsToStore];bestFromRemoteNum=new int[intervalsToStore];
+#endif
+	for(unsigned i=0;i<intervalsToStore;i++){
+	randNNI[i] = 0.0; randNNInum[i] = 0;
+	exNNI[i] = 0.0; exNNInum[i] = 0;
+	randSPR[i] = 0.0; randSPRnum[i] = 0;
+#ifdef GANESH
+	randPECR[i] = 0.0; randPECRnum[i] = 0;
+#endif
+	limSPR[i] = 0.0; limSPRnum[i] = 0;
+	exlimSPR[i] = 0.0; exlimSPRnum[i] = 0;
+	randRecom[i] = 0.0;	 randRecomnum[i] = 0;
+	bipartRecom[i]= 0.0;	 bipartRecomnum[i]= 0;
+	onlyBrlen[i] = 0.0; onlyBrlennum[i] = 0;
+	improvetotal[i] = 0.0;
+	anyModel[i] = 0.0; anyModelnum[i] = 0;
+#ifdef MPI_VERSION
+	bestFromRemote[i]=0.0;	bestFromRemoteNum[i]=0;
+#endif
+
+	}
+}
+
+Adaptation::~Adaptation(){
+	delete []randNNI; delete []randNNInum;
+	delete []exNNI; delete []exNNInum;
+	delete []randSPR; delete []randSPRnum ;
+#ifdef GANESH
+	delete []randPECR ; delete []randPECRnum ;
+#endif
+	delete []limSPR ; delete []limSPRnum ;
+	delete []exlimSPR ; delete []exlimSPRnum ;
+	delete []randRecom ;	 delete []randRecomnum ;
+	delete []bipartRecom ;	 delete []bipartRecomnum ;
+	delete []onlyBrlen ; delete []onlyBrlennum ;
+	delete []improvetotal ;
+	delete []anyModel ; delete []anyModelnum ;
+	}
+
+void Adaptation::SetChangeableVariablesFromConfAfterReadingCheckpoint(const GeneralGamlConfig *gc){
+	//this just sets a few adaptation members to their values in the conf file
+	//potentially overriding some values read from a checkpoint.  This would
+	//be useful if multiple runs with different settings were to be restarted from
+	//a single checkpoint
+	minOptPrecision = gc->minOptPrec;
+
+	numPrecReductions=gc->numPrecReductions;
+	if(gc->numPrecReductions > 0)
+		precReductionFactor = (gc->startOptPrec- minOptPrecision)/FLOAT_TYPE(numPrecReductions);
+	else
+		precReductionFactor = gc->precReductionFactor;
+
+	topoWeight = gc->topoWeight;
+	modWeight = gc->modWeight;
+	brlenWeight = gc->brlenWeight;
+	
+	origRandNNIweight = randNNIweight = gc->randNNIweight;
+	randSPRweight = gc->randSPRweight;
+	limSPRweight = gc->limSPRweight;
+	limSPRrange = gc->limSPRrange;
+	}
+
+
+void Adaptation::WriteToCheckpoint(OUTPUT_CLASS &out) const{
+	//this function assumes that it has been passed an MFILE that is already open for 
+	//binary writing
+
+	//7/13/07 changing this to calculate the actual size of the chunk of scalars
+	//(the number of bytes between the start of the object and the first nonscalar
+	//data member) rather than counting the number of each type and adding it up 
+	//manually.  This should make it work irrespective of things like memory padding
+	//for data member alignment, which could vary between platforms and compilers
+	intptr_t scalarSize = (intptr_t) &improvetotal - (intptr_t) this;
+	out.WRITE_TO_FILE(this, scalarSize, 1);
+
+	//now the arrays, which should be of length intervalsToStore
+	out.WRITE_TO_FILE(improvetotal, sizeof(FLOAT_TYPE), intervalsToStore);
+
+	out.WRITE_TO_FILE(randNNI, sizeof(FLOAT_TYPE), intervalsToStore);
+	out.WRITE_TO_FILE(randNNInum, sizeof(int), intervalsToStore);
+	
+	out.WRITE_TO_FILE(exNNI, sizeof(FLOAT_TYPE), intervalsToStore);
+	out.WRITE_TO_FILE(exNNInum, sizeof(int), intervalsToStore);
+
+	out.WRITE_TO_FILE(randSPR, sizeof(FLOAT_TYPE), intervalsToStore);
+	out.WRITE_TO_FILE(randSPRnum, sizeof(int), intervalsToStore);
+	
+	out.WRITE_TO_FILE(limSPR, sizeof(FLOAT_TYPE), intervalsToStore);
+	out.WRITE_TO_FILE(limSPRnum, sizeof(int), intervalsToStore);
+
+	out.WRITE_TO_FILE(exlimSPR, sizeof(FLOAT_TYPE), intervalsToStore);
+	out.WRITE_TO_FILE(exlimSPRnum, sizeof(int), intervalsToStore);
+
+	out.WRITE_TO_FILE(randRecom, sizeof(FLOAT_TYPE), intervalsToStore);
+	out.WRITE_TO_FILE(randRecomnum, sizeof(int), intervalsToStore);
+	
+	out.WRITE_TO_FILE(bipartRecom, sizeof(FLOAT_TYPE), intervalsToStore);
+	out.WRITE_TO_FILE(bipartRecomnum, sizeof(int), intervalsToStore);
+
+	out.WRITE_TO_FILE(onlyBrlen, sizeof(FLOAT_TYPE), intervalsToStore);
+	out.WRITE_TO_FILE(onlyBrlennum, sizeof(int), intervalsToStore);
+
+	out.WRITE_TO_FILE(anyModel, sizeof(FLOAT_TYPE), intervalsToStore);
+	out.WRITE_TO_FILE(anyModelnum, sizeof(int), intervalsToStore);
+	}
+
+/*
+void Adaptation::WriteToCheckpoint(ofstream &out) const{
+	//this function assumes that it has been passed a stream that is already open for 
+	//binary writing
+	assert(out.good());
+
+	//7/13/07 changing this to calculate the actual size of the chunk of scalars
+	//(the number of bytes between the start of the object and the first nonscalar
+	//data member) rather than counting the number of each type and adding it up 
+	//manually.  This should make it work irrespective of things like memory padding
+	//for data member alignment, which could vary between platforms and compilers
+	intptr_t scalarSize = (intptr_t) &improvetotal - (intptr_t) this;
+
+	out.write((char *) this, (streamsize) scalarSize);
+
+	//now the arrays, which should be of length intervalsToStore
+	out.write((char *) improvetotal, sizeof(FLOAT_TYPE)*intervalsToStore);
+
+	out.write((char *) randNNI, sizeof(FLOAT_TYPE)*intervalsToStore);
+	out.write((char *) randNNInum, sizeof(int)*intervalsToStore);
+	
+	out.write((char *) exNNI, sizeof(FLOAT_TYPE)*intervalsToStore);
+	out.write((char *) exNNInum, sizeof(int)*intervalsToStore);
+
+	out.write((char *) randSPR, sizeof(FLOAT_TYPE)*intervalsToStore);
+	out.write((char *) randSPRnum, sizeof(int)*intervalsToStore);
+	
+	out.write((char *) limSPR, sizeof(FLOAT_TYPE)*intervalsToStore);
+	out.write((char *) limSPRnum, sizeof(int)*intervalsToStore);
+
+	out.write((char *) exlimSPR, sizeof(FLOAT_TYPE)*intervalsToStore);
+	out.write((char *) exlimSPRnum, sizeof(int)*intervalsToStore);
+
+	out.write((char *) randRecom, sizeof(FLOAT_TYPE)*intervalsToStore);
+	out.write((char *) randRecomnum, sizeof(int)*intervalsToStore);
+	
+	out.write((char *) bipartRecom, sizeof(FLOAT_TYPE)*intervalsToStore);
+	out.write((char *) bipartRecomnum, sizeof(int)*intervalsToStore);
+
+	out.write((char *) onlyBrlen, sizeof(FLOAT_TYPE)*intervalsToStore);
+	out.write((char *) onlyBrlennum, sizeof(int)*intervalsToStore);
+
+	out.write((char *) anyModel, sizeof(FLOAT_TYPE)*intervalsToStore);
+	out.write((char *) anyModelnum, sizeof(int)*intervalsToStore);
+	}
+*/
+
+void Adaptation::ReadFromCheckpoint(FILE *in){
+	//this function assumes that it has been passed a FILE* that is already open for 
+	//binary reading
+
+	//7/13/07 changing this to calculate the actual size of the chunk of scalars
+	//(the number of bytes between the start of the object and the first nonscalar
+	//data member) rather than counting the number of each type and adding it up 
+	//manually.  This should make it work irrespective of things like memory padding
+	//for data member alignment, which could vary between platforms and compilers
+	intptr_t scalarSize = (intptr_t) &improvetotal - (intptr_t) this;
+
+	fread((char *) this, 1, scalarSize, in);
+	if(ferror(in) || feof(in)){//this mainly checks for a zero-byte file
+		throw ErrorException("Error reading checkpoint file <ofprefix>.adap.check.\n\tA problem may have occured writing the file to disk, or the file may have been overwritten or truncated.\n\tUnfortunately you'll need to start the run again from scratch.");
+
+		}
+
+	//now the arrays, which should be of length intervalsToStore
+	fread((char *) improvetotal, sizeof(FLOAT_TYPE), intervalsToStore, in);
+
+	fread((char *) randNNI, sizeof(FLOAT_TYPE), intervalsToStore, in);
+	fread((char *) randNNInum, sizeof(int), intervalsToStore, in);
+	
+	fread((char *) exNNI, sizeof(FLOAT_TYPE), intervalsToStore, in);
+	fread((char *) exNNInum, sizeof(int), intervalsToStore, in);
+
+	fread((char *) randSPR, sizeof(FLOAT_TYPE), intervalsToStore, in);
+	fread((char *) randSPRnum, sizeof(int), intervalsToStore, in);
+	
+	fread((char *) limSPR, sizeof(FLOAT_TYPE), intervalsToStore, in);
+	fread((char *) limSPRnum, sizeof(int), intervalsToStore, in);
+
+	fread((char *) exlimSPR, sizeof(FLOAT_TYPE), intervalsToStore, in);
+	fread((char *) exlimSPRnum, sizeof(int), intervalsToStore, in);
+
+	fread((char *) randRecom, sizeof(FLOAT_TYPE), intervalsToStore, in);
+	fread((char *) randRecomnum, sizeof(int), intervalsToStore, in);
+	
+	fread((char *) bipartRecom, sizeof(FLOAT_TYPE), intervalsToStore, in);
+	fread((char *) bipartRecomnum, sizeof(int), intervalsToStore, in);
+
+	fread((char *) onlyBrlen, sizeof(FLOAT_TYPE), intervalsToStore, in);
+	fread((char *) onlyBrlennum, sizeof(int), intervalsToStore, in);
+
+	fread((char *) anyModel, sizeof(FLOAT_TYPE), intervalsToStore, in);
+	fread((char *) anyModelnum, sizeof(int), intervalsToStore, in);
+	}
+
+
+void Adaptation::PrepareForNextInterval(){
+ //if we're on the first generation of a new recording period, shift everything over
+	for(int i=intervalsToStore-1; i>0; i--){
+		improvetotal[i] = improvetotal[i-1];
+		randNNI[i] = randNNI[i-1];randNNInum[i] = randNNInum[i-1];
+		exNNI[i] = exNNI[i-1]; exNNInum[i] = exNNInum[i-1];
+		 
+		randSPR[i] = randSPR[i-1];randSPRnum[i] = randSPRnum[i-1];
+		limSPR[i] = limSPR[i-1]; limSPRnum[i] = limSPRnum[i-1];
+		exlimSPR[i] = exlimSPR[i-1]; exlimSPRnum[i] = exlimSPRnum[i-1];
+#ifdef GANESH
+		randPECR[i] = randPECR[i-1]; randPECRnum[i] = randPECRnum[i-1];			
+#endif			
+//		taxonSwap[i] = taxonSwap[i-1];taxonSwapnum[i] = taxonSwapnum[i-1];
+		randRecom[i] = randRecom[i-1];randRecomnum[i] = randRecomnum[i-1];
+		bipartRecom[i]=bipartRecom[i-1];bipartRecomnum[i] = bipartRecomnum[i-1];
+
+		onlyBrlen[i] = onlyBrlen[i-1];onlyBrlennum[i] = onlyBrlennum[i-1];
+		anyModel[i] = anyModel[i-1]; anyModelnum[i] = anyModelnum[i-1];
+//		slopes[i] = slopes[i-1];
+#ifdef MPI_VERSION
+		bestFromRemote[i] = bestFromRemote[i-1];
+		bestFromRemoteNum[i] = bestFromRemoteNum[i-1];
+#endif
+//		fromRemoteSubtree[i] = fromRemoteSubtree[i-1];
+//		fromRemoteNonSubtree[i] = fromRemoteNonSubtree[i-1];
+		}// end of for loop
+
+	// clean up for next entry
+	improvetotal[0] = 0.0;
+	randNNI[0] = 0.0;randNNInum[0] = 0;
+	exNNI[0] = 0.0;exNNInum[0] = 0;
+		 
+	randSPR[0] = 0.0;randSPRnum[0] = 0;
+	limSPR[0] = 0.0;limSPRnum[0] = 0;
+	exlimSPR[0] = 0.0;exlimSPRnum[0] = 0;
+#ifdef GANESH
+	randPECR[0] = 0.0;randPECRnum[0] = 0; 
+#endif
+//	taxonSwap[0] = 0.0;taxonSwapnum[0] = 0;
+	randRecom[0] = 0.0;randRecomnum[0] = 0;
+	bipartRecom[0]=0.0;bipartRecomnum[0]=0;
+
+	onlyBrlen[0] = 0.0;onlyBrlennum[0] = 0;
+	anyModel[0] = 0.0;anyModelnum[0] = 0;
+#ifdef MPI_VERSION
+	bestFromRemote[0]=0.0;bestFromRemoteNum[0]=0;
+#endif
+//	fromRemoteSubtree[0] = 0.0;
+//	fromRemoteNonSubtree[0] = 0.0;
+	}
+
+void Adaptation::BeginProbLog(ofstream &plog, int gen){
+	plog << "gen\tmod\ttopo\tbrlen\tNNI\trandSPR\tlimSPR\n";
+	//gen could be non-zero if we restarted
+	OutputProbs(plog, gen);
+	}
+
+void Adaptation::OutputProbs(ofstream &plog, int gen){
+	plog << gen << "\t" << modelMutateProb << "\t" << topoMutateProb << "\t" << (1.0-modelMutateProb-topoMutateProb) << "\t";
+	plog << randNNIprob << "\t" << randSPRprob << "\t" << limSPRprob << endl;
+	}
+
+void Adaptation::UpdateProbs(){
+	FLOAT_TYPE topoTot=0.0, modTot=0.0, onlyBrlenTot=0.0;
+	int numTopos=0, numMod=0, numOnlyBrlen=0;
+	
+	FLOAT_TYPE totRandNNI=0.0, totLimSPR=0.0, totRandSPR=0.0;
+	int totNumRandNNI=0, totNumLimSPR=0, totNumRandSPR=0;
+	FLOAT_TYPE totBipartRecom=0.0;
+	int totNumBipartRecom=0;
+
+#ifdef MPI_VERSION
+	FLOAT_TYPE totalFromRemote;
+#endif
+
+
+#ifdef GANESH
+	FLOAT_TYPE totRandPECR=0.0;
+	int totNumRandPECR=0;
+#endif
+	
+	for(unsigned i=0;i<intervalsToStore;i++){
+#ifdef GANESH
+		topoTot += randNNI[i] + randSPR[i] + limSPR[i] + randPECR[i];
+		numTopos += randNNInum[i] + randSPRnum[i] + limSPRnum[i] +
+		randPECRnum[i];
+#else
+		topoTot += randNNI[i] + randSPR[i] + limSPR[i];
+		numTopos += randNNInum[i] + randSPRnum[i] + limSPRnum[i];
+#endif
+		modTot += anyModel[i];
+		numMod += anyModelnum[i];
+		onlyBrlenTot += onlyBrlen[i];
+		numOnlyBrlen += onlyBrlennum[i];
+		
+		totRandNNI += randNNI[i];
+		totNumRandNNI += randNNInum[i];
+		totLimSPR += limSPR[i];
+		totNumLimSPR += limSPRnum[i];
+		totRandSPR += randSPR[i];
+		
+		totBipartRecom += bipartRecom[i];
+		totNumBipartRecom += bipartRecomnum[i];
+		
+#ifdef GANESH
+		totRandPECR += randPECR[i];
+		totNumRandPECR += randPECRnum[i];
+#endif
+		totNumRandSPR += randSPRnum[i];	
+
+#ifdef	MPI_VERSION
+	totalFromRemote += bestFromRemote[i];
+#endif
+		}
+	
+	FLOAT_TYPE perTopo, perModel, perBrlen;
+	if(numTopos!=0) perTopo=(topoTot/numTopos);
+	else perTopo=0.0;
+	if(numMod!=0) perModel=(modTot/numMod);
+	else perModel=0.0;
+	if(numOnlyBrlen>0) perBrlen=(onlyBrlenTot/numOnlyBrlen);
+	else perBrlen= 0.0;
+	FLOAT_TYPE perBipartRecom;
+	if(totNumBipartRecom > 0) perBipartRecom=(totBipartRecom/totNumBipartRecom);
+	else perBipartRecom=0.0;
+	
+	//version 0.95b3 - The reduction of precision that used to appear here has been
+	//moved to Adaptation::ReducePrecision, which is called from Run, MasterMaster and
+	//RemoteSubtreeWorker when lastTopoImprove is > that #int * intLength generations ago
+	
+	perTopo += topoWeight;
+	perModel += modWeight;
+	perBrlen += brlenWeight;
+	
+	FLOAT_TYPE tot=perTopo+perModel+perBrlen;
+
+	FLOAT_TYPE brlenOnlyMut;
+
+	//only update these probs if model mutations are turned off completely
+	//or if some model mutations have been done (ie not in subtree mode)
+	if(anyModelnum[0]!=0 || FloatingPointEquals(modWeight, 0.0, 1e-10)){
+		brlenOnlyMut=perBrlen/tot;
+		modelMutateProb = perModel/tot;
+		topoMutateProb = perTopo/tot;
+		}
+
+	//enforce a minimum probability
+	if(modWeight != 0.0 && topoWeight != 0.0){
+		FLOAT_TYPE minProb= (FLOAT_TYPE) 0.02;	
+		if(topoMutateProb < minProb){
+			modelMutateProb -= minProb - topoMutateProb;
+			topoMutateProb=minProb;
+			}
+		if(modelMutateProb < minProb){
+			topoMutateProb -= minProb - modelMutateProb;
+			modelMutateProb=minProb;
+			}
+		if(1.0 - (modelMutateProb + topoMutateProb) < minProb){
+			FLOAT_TYPE diff=minProb - (FLOAT_TYPE)(1.0 - (modelMutateProb + topoMutateProb));
+			if(modelMutateProb - diff/2.0 > .02 && topoMutateProb - diff/2.0 > .02){
+				modelMutateProb -= diff/(FLOAT_TYPE)2.0;
+				topoMutateProb -= diff/(FLOAT_TYPE)2.0;
+				}
+			else{
+				if(modelMutateProb - diff/2.0 < .02){
+					topoMutateProb -= diff;
+					}
+				else modelMutateProb -= diff;
+				}		
+
+			brlenOnlyMut=minProb;
+			}
+		}
+		
+//		brlenOnlyMut = 1.0 - topoMutateProb - modelMutateProb;
+//		}
+/*	else{
+		scaler=(1-brlenOnlyMut) / (topoMutateProb + modelMutateProb);
+		modelMutateProb *= scaler;
+		topoMutateProb *= scaler;
+		}
+*/
+	if(totNumRandNNI==0) totNumRandNNI=1;
+	if(totNumLimSPR==0) totNumLimSPR=1;
+	if(totNumRandSPR==0) totNumRandSPR=1;
+#ifdef GANESH
+	if(totNumRandPECR==0) totNumRandPECR=1;
+#endif
+	//Because NNI's chosen by an SPR mutator are marked as NNI's, this needs to be done to keep from 
+	//giving NNI's some prob even when the weight was 0.0
+	FLOAT_TYPE perRandNNI= (randNNIweight == ZERO_POINT_ZERO ? ZERO_POINT_ZERO : totRandNNI/totNumRandNNI + randNNIweight);
+	FLOAT_TYPE perLimSPR=  (limSPRweight  == ZERO_POINT_ZERO ? ZERO_POINT_ZERO : totLimSPR/totNumLimSPR + limSPRweight);
+	FLOAT_TYPE perRandSPR= (limSPRweight  == ZERO_POINT_ZERO ? ZERO_POINT_ZERO : totRandSPR/totNumRandSPR + randSPRweight);
+	
+#ifdef GANESH
+	FLOAT_TYPE perRandPECR=totRandPECR/totNumRandPECR + randPECRweight;
+	tot=perRandNNI+perLimSPR+perRandSPR+perRandPECR;
+	randNNIprob=perRandNNI/tot;
+	randSPRprob=perRandSPR/tot;
+	limSPRprob=perLimSPR/tot;
+	randPECRprob=perRandPECR/tot;
+#else
+
+	tot=perRandNNI+perLimSPR+perRandSPR;
+	if(tot > ZERO_POINT_ZERO){
+		randNNIprob=perRandNNI/tot;
+		randSPRprob=perRandSPR/tot;
+		limSPRprob=perLimSPR/tot;
+		}
+#endif
+	}
diff --git a/src/adaptation.h b/src/adaptation.h
new file mode 100644
index 0000000..6f02942
--- /dev/null
+++ b/src/adaptation.h
@@ -0,0 +1,133 @@
+// GARLI version 2.0 source code
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+#ifndef ADAPTION_H
+#define ADAPTION_H
+
+#include <fstream>
+
+using namespace std;
+
+#include "configoptions.h"
+
+class MFILE;
+
+class Adaptation{
+	public:
+	//here are all of the scalars:
+	//4 ints, 1 bool, 23 FLOAT_TYPEs
+	unsigned intervalLength; 
+	unsigned intervalsToStore;
+	FLOAT_TYPE lastgenscore;
+	FLOAT_TYPE laststepscore;
+
+	FLOAT_TYPE improveOverStoredIntervals;
+	
+	bool reset;
+
+	FLOAT_TYPE startOptPrecision;
+	FLOAT_TYPE branchOptPrecision;
+	FLOAT_TYPE minOptPrecision;
+	FLOAT_TYPE precReductionFactor;
+	int numPrecReductions;
+	
+	FLOAT_TYPE topoWeight;
+	FLOAT_TYPE modWeight;
+	FLOAT_TYPE brlenWeight;
+	
+	FLOAT_TYPE randNNIweight;
+	FLOAT_TYPE origRandNNIweight;
+	FLOAT_TYPE randSPRweight;
+	FLOAT_TYPE limSPRweight;
+	
+	FLOAT_TYPE recTopImproveSize;
+	FLOAT_TYPE exNNIprob;
+	FLOAT_TYPE exlimSPRprob;
+
+	FLOAT_TYPE topoMutateProb;
+	FLOAT_TYPE randNNIprob;
+	FLOAT_TYPE randSPRprob;
+	FLOAT_TYPE limSPRprob;
+	
+	FLOAT_TYPE modelMutateProb;
+
+	unsigned limSPRrange;
+
+	//the arrays. All will be of length intervalsToStore
+	FLOAT_TYPE *improvetotal;
+
+	FLOAT_TYPE *randNNI;
+	int *randNNInum;
+	
+	FLOAT_TYPE *exNNI;
+	int *exNNInum;
+
+	FLOAT_TYPE *randSPR;
+	int *randSPRnum;
+	
+	FLOAT_TYPE *limSPR;
+	int *limSPRnum;
+
+	FLOAT_TYPE *exlimSPR;
+	int *exlimSPRnum;
+
+	FLOAT_TYPE *randRecom;
+	int *randRecomnum;
+	
+	FLOAT_TYPE *bipartRecom;
+	int *bipartRecomnum;
+
+	FLOAT_TYPE *onlyBrlen;
+	int *onlyBrlennum;
+
+	FLOAT_TYPE *anyModel;
+	int *anyModelnum;
+	
+#ifdef MPI_VERSION
+	FLOAT_TYPE *fromRemoteSubtree;
+	FLOAT_TYPE *fromRemoteNonSubtree;
+	int *bestFromRemoteNum;
+	FLOAT_TYPE *bestFromRemote;
+#endif
+
+	Adaptation(const GeneralGamlConfig *gc);
+	~Adaptation();
+	public:
+	void SetChangeableVariablesFromConfAfterReadingCheckpoint(const GeneralGamlConfig *gc);
+	void PrepareForNextInterval();
+	void UpdateProbs();
+	void OutputProbs(ofstream &plog, int gen);
+	void BeginProbLog(ofstream &plot, int gen);
+	bool ReducePrecision(){
+		if(FloatingPointEquals(branchOptPrecision, minOptPrecision, 1e-10) || numPrecReductions == 0) return false;
+		if(topoMutateProb > .01 || FloatingPointEquals(topoWeight, 0.0, 1e-10)){
+			//changing this to a linear reduction in prec.  Geometric was too fast
+			//branchOptPrecision*=precReductionFactor;
+			branchOptPrecision -= precReductionFactor;
+			if((branchOptPrecision < minOptPrecision) || (branchOptPrecision - minOptPrecision) < (precReductionFactor / 2.0)) branchOptPrecision=minOptPrecision;
+			return true;
+			}
+		else return false;
+		}
+
+	void WriteToCheckpoint(OUTPUT_CLASS &) const;
+	void ReadFromCheckpoint(FILE *);
+
+};
+
+#endif
diff --git a/src/bipartition.cpp b/src/bipartition.cpp
new file mode 100644
index 0000000..b0b76ec
--- /dev/null
+++ b/src/bipartition.cpp
@@ -0,0 +1,377 @@
+// GARLI version 2.0 source code
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "defs.h"
+#include "bipartition.h"
+#include "reconnode.h"
+
+int Bipartition::nBlocks;
+int Bipartition:: blockBits;
+int Bipartition::ntax;
+unsigned int Bipartition::largestBlockDigit;
+unsigned int Bipartition::allBitsOn;
+char * Bipartition::str;
+unsigned int Bipartition::partialBlockMask;
+
+bool Constraint::allBackbone;
+bool Constraint::anyBackbone;
+bool Constraint::sharedMask;
+
+//note that this is "less than" for sorting purposes, not in a subset sense
+bool BipartitionLessThan(const Bipartition &lhs, const Bipartition &rhs){
+	int i;
+	for(i=0;i<Bipartition::nBlocks-1;i++){
+		if(lhs.rep[i] > rhs.rep[i]) return false;
+		else if(lhs.rep[i] < rhs.rep[i]) return true;
+		}
+		
+	if(((lhs.rep[i]) & lhs.partialBlockMask) > ((rhs.rep[i]) & lhs.partialBlockMask)) return false;
+	else return true;
+	}
+
+void Constraint::SetConstraintStatics(bool allBack, bool anyBack, bool oneMask){
+	Constraint::allBackbone = allBack;
+	Constraint::anyBackbone = anyBack;
+	Constraint::sharedMask = oneMask;
+	}
+
+void Bipartition::SetBipartitionStatics(int nt){
+	Bipartition::blockBits=sizeof(int)*8;
+	Bipartition::ntax=nt;
+	Bipartition::nBlocks=(int)ceil((FLOAT_TYPE)nt/(FLOAT_TYPE)Bipartition::blockBits);
+	Bipartition::largestBlockDigit=1<<(Bipartition::blockBits-1);
+	Bipartition::allBitsOn=(unsigned int)(pow(2.0, Bipartition::blockBits)-1);
+	Bipartition::str=new char[nt+1];
+	Bipartition::str[nt] = '\0';
+	Bipartition::SetPartialBlockMask();	
+	}
+
+void Bipartition::SetPartialBlockMask(){
+		partialBlockMask=0;
+		unsigned int bit=largestBlockDigit;
+		for(int b=0;b<ntax%blockBits;b++){
+			partialBlockMask += bit;
+			bit = bit >> 1;
+			}
+		if(ntax%blockBits == 0) partialBlockMask=allBitsOn;
+		}
+
+//this function does 2 things
+//1. Fills this bipartition with the bitwise intersection of a backbone mask and a mask
+//representing a subset of taxa in a growing tree.  Note that it is safe to call this when the
+//constraint is not a backbone and/or when the partialMask is NULL.  In that case it will fill
+//the bipartition with one or the other, or with all bits on if their if neither 
+//2. Checks if there is a meaningful intersection between the created joint mask and 
+//the constraint.  That means at least 2 bits are "on" on each site of the constrained bipartition
+bool Bipartition::MakeJointMask(const Constraint &constr, const Bipartition *partialMask){
+	if(constr.IsBackbone()){
+		//this just uses Bipartition::Operator=()
+		*this = *(constr.GetBackboneMask());
+		if(partialMask != NULL)//in this case we'll need to test for meaningful intersection below
+			this->AndEquals(*partialMask);
+		else//here we don't need to check, since a backbone constraint and its own mask must be meaningful
+			return true;
+		}
+	else if(partialMask != NULL){
+		//in this case we'll need to test for meaningful intersection below
+		*this = *(partialMask);
+		}
+	else{
+		FillAllBits();
+		return true;
+		}
+
+	Bipartition temp;
+	temp = constr.GetBipartition();
+	temp.AndEquals(*this);
+	if(temp.MoreThanOneBitSet() == false)
+		return false;
+
+	temp = constr.GetBipartition();
+	temp.Complement();
+	temp.AndEquals(*this);
+	if(temp.MoreThanOneBitSet() == false)
+		return false;
+
+	return true;
+	}
+	
+bool Bipartition::IsCompatibleWithBipartition(const Bipartition &constr) const{
+	//using buneman's 4 point condition.  At least one of the four intersections must be empty
+	//A & B
+	if(HasIntersection(constr, NULL) == false)
+		return true;
+	//A & ~B
+	if(HasIntersectionWithComplement(constr, NULL) == false)
+		return true;
+	//~A & B
+	if(ComplementHasIntersection(constr, NULL) == false)
+		return true;
+	//~A & ~B
+	if(ComplementHasIntersectionWithComplement(constr, NULL) == false)
+		return true;
+	return false;
+	}
+
+
+bool Bipartition::OldIsCompatibleWithBipartition(const Bipartition &constr) const{
+	//using buneman's 4 point condition.  At least one of the four intersections must be empty
+	bool compat=true;
+	int i;
+	//A & B
+	for(i=0;i<nBlocks-1;i++){
+		if((rep[i] & constr.rep[i]) == 0) continue;
+		else{
+			compat=false;
+			break;
+			}
+		}
+	if(compat==true && (((rep[i] & constr.rep[i]) & partialBlockMask) == 0)) return true;
+	//A & ~B
+	compat=true;
+	for(i=0;i<nBlocks-1;i++){
+		if((rep[i] & ~(constr.rep[i])) == 0) continue;
+		else{
+			compat=false;
+			break;
+			}
+		}
+	if(compat==true && (((rep[i] & ~(constr.rep[i])) & partialBlockMask) == 0)) return true;
+	//~A & B
+	compat=true;
+	for(i=0;i<nBlocks-1;i++){
+		if((~rep[i] & constr.rep[i]) == 0) continue;
+		else{
+			compat=false;
+			break;
+			}
+		}
+	if(compat==true && (((~rep[i] & constr.rep[i]) & partialBlockMask) == 0)) return true;
+	//~A & ~B
+	compat=true;
+	for(i=0;i<nBlocks-1;i++){
+		if((~rep[i] & ~(constr.rep[i])) == 0) continue;
+		else{
+			compat=false;
+			break;
+			}
+		}
+	if(compat==true && (((~rep[i] & ~(constr.rep[i])) & partialBlockMask) == 0)) return true;
+	return false;
+	}
+
+bool Bipartition::IsCompatibleWithBipartitionWithMask(const Bipartition &constr, const Bipartition &mask) const{
+	//using buneman's 4 point condition.  At least one of the four intersections must be empty
+	//A & B
+	if(HasIntersection(constr, &mask) == false)
+		return true;
+	//A & ~B
+	if(HasIntersectionWithComplement(constr, &mask) == false)
+		return true;
+	//~A & B
+	if(ComplementHasIntersection(constr, &mask) == false)
+		return true;
+	//~A & ~B
+	if(ComplementHasIntersectionWithComplement(constr, &mask) == false)
+		return true;
+	return false;
+	}
+
+bool Bipartition::OldIsCompatibleWithBipartitionWithMask(const Bipartition &bip, const Bipartition &mask) const{
+	//using buneman's 4 point condition.  At least one of the four intersections must be empty
+	//typically this will be called with 'this' as a POSITIVE constraint
+	bool compat=true;
+	int i;
+
+	//A & B
+	for(i=0;i<nBlocks-1;i++){
+		if(((rep[i] & bip.rep[i]) & mask.rep[i]) == 0) 
+			continue;
+		else{
+			compat=false;
+			break;
+			}
+		}
+	if(compat==true && ((((rep[i] & bip.rep[i]) & mask.rep[i]) & partialBlockMask) == 0)) 
+		return true;
+	//A & ~B
+	compat=true;
+	for(i=0;i<nBlocks-1;i++){
+		if(((rep[i] & ~bip.rep[i]) & mask.rep[i]) == 0) 
+			continue;
+		else{
+			compat=false;
+			break;
+			}
+		}
+	if(compat==true && ((((rep[i] & ~bip.rep[i]) & mask.rep[i]) & partialBlockMask) == 0)) 
+		return true;
+	//~A & B
+	compat=true;
+	for(i=0;i<nBlocks-1;i++){
+		if(((~rep[i] & bip.rep[i]) & mask.rep[i]) == 0) 
+			continue;
+		else{
+			compat=false;
+			break;
+			}
+		}
+	if(compat==true && ((((~rep[i] & bip.rep[i]) & mask.rep[i]) & partialBlockMask) == 0)) 
+		return true;
+	//~A & ~B
+	compat=true;
+	for(i=0;i<nBlocks-1;i++){
+		if(((~rep[i] & ~bip.rep[i]) & mask.rep[i]) == 0) 
+			continue;
+		else{
+			compat=false;
+			break;
+			}
+		}
+	if(compat==true && ((((~rep[i] & ~bip.rep[i]) & mask.rep[i]) & partialBlockMask) == 0)) 
+		return true;
+	return false;
+	}
+
+//This isn't used currently and may not be working
+bool Bipartition::IsIncompatibleWithBipartitionWithMask(const Bipartition &bip, const Bipartition &mask) const{
+	//using buneman's 4 point condition.  At none of the four intersections must be empty
+	//typically this will be called with 'this' as a NEGATIVE constraint
+	//2/28/08 - I think that I had the true/falses backwards here.  As soon as an
+	//empty intersection is found the bipartition IS compatable with the constraint
+	//so it should return FALSE.  If there are 4 intersections, it is INcompatable, so return TRUE
+
+	bool compat=true;
+	int i;
+
+	//first check if there is no intersection between the mask and the constraint
+	//or the complement of the constraint. If not, the question of incompatability
+	//is moot (but it is consistent with incompatability, so return true)
+	bool intersect=false;
+	for(i=0;i<nBlocks-1;i++){
+		if((rep[i] & mask.rep[i]) == 0) continue;
+		else{
+			intersect=true;
+			break;
+			}
+		}
+	if(intersect==false && ((((rep[i] & mask.rep[i]) & partialBlockMask) == 0))) return true;
+
+	intersect=false;
+	for(i=0;i<nBlocks-1;i++){
+		if((~rep[i] & mask.rep[i]) == 0) continue;
+		else{
+			intersect=true;
+			break;
+			}
+		}
+	if(intersect==false && ((((~rep[i] & mask.rep[i]) & partialBlockMask) == 0))) return true;
+
+	//A & B
+	for(i=0;i<nBlocks-1;i++){
+		if(((rep[i] & mask.rep[i]) & (bip.rep[i] & mask.rep[i])) == 0) continue;
+		else{
+			compat=false;
+			break;
+			}
+		}
+	if(compat==true && ((((rep[i] & mask.rep[i]) & (bip.rep[i] & mask.rep[i])) & partialBlockMask) == 0)) return false;
+	//A & ~B
+	compat=true;
+	for(i=0;i<nBlocks-1;i++){
+		if(((rep[i] & mask.rep[i]) & (~bip.rep[i] & mask.rep[i])) == 0) continue;
+		else{
+			compat=false;
+			break;
+			}
+		}
+	if(compat==true && ((((rep[i] & mask.rep[i]) & (~bip.rep[i]& mask.rep[i])) & partialBlockMask) == 0)) return false;
+	//~A & B
+	compat=true;
+	for(i=0;i<nBlocks-1;i++){
+		if(((~rep[i] & mask.rep[i]) & (bip.rep[i] & mask.rep[i])) == 0) continue;
+		else{
+			compat=false;
+			break;
+			}
+		}
+	if(compat==true && ((((~rep[i] & mask.rep[i]) & (bip.rep[i] & mask.rep[i])) & partialBlockMask) == 0)) return false;
+	//~A & ~B
+	compat=true;
+	for(i=0;i<nBlocks-1;i++){
+		if(((~rep[i] & mask.rep[i]) & (~bip.rep[i] & mask.rep[i])) == 0) continue;
+		else{
+			compat=false;
+			break;
+			}
+		}
+	if(compat==true && ((((~rep[i] & mask.rep[i]) & (~bip.rep[i] & mask.rep[i])) & partialBlockMask) == 0)) return false;
+	return true;
+	}
+
+
+void Bipartition::NumericalOutput(string &out, const Bipartition *mask){
+	string left = "(";
+	string right = "(";
+	char temp[100];
+	if(mask != NULL){
+		for(int i=0;i<nBlocks;i++){
+			unsigned int t=rep[i];
+			unsigned int m=mask->rep[i];
+			unsigned int bit = largestBlockDigit;
+			for(int j=0;j<blockBits;j++){
+				if(i*blockBits+j >= ntax) break;
+				if(bit & m){
+					if(bit & t){
+						if(strcmp(left.c_str(), "(")) left += ',';
+						sprintf(temp, "%d", (i*blockBits + j + 1));
+						left += temp;
+						}
+					else{
+						if(strcmp(right.c_str(), "(")) right += ',';
+						sprintf(temp, "%d", (i*blockBits + j + 1));
+						right += temp;
+						}
+					}
+				bit = bit >> 1;	
+				}
+			}
+		}
+	else{
+		for(int i=0;i<nBlocks;i++){
+			unsigned int t=rep[i];
+			unsigned int bit = largestBlockDigit;
+			for(int j=0;j<blockBits;j++){
+				if(i*blockBits+j >= ntax) break;
+				if(bit & t){
+					if(strcmp(left.c_str(), "(")) left += ',';
+					sprintf(temp, "%d", (i*blockBits + j + 1));
+					left += temp;
+					}
+				else{
+					if(strcmp(right.c_str(), "(")) right += ',';
+					sprintf(temp, "%d", (i*blockBits + j + 1));
+					right += temp;
+					}
+				bit = bit >> 1;	 
+				}
+			}
+		}
+	left += ')';
+	right += ')';
+	out = left + " | " + right;
+	}
diff --git a/src/bipartition.h b/src/bipartition.h
new file mode 100644
index 0000000..8fe5cc3
--- /dev/null
+++ b/src/bipartition.h
@@ -0,0 +1,680 @@
+// GARLI version 2.0 source code
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+#ifndef BIPARTITION
+#define BIPARTITION
+
+#include <cmath>
+#include <string>
+#include <cstring>
+#include <vector>
+#include <cassert>
+#include <set>
+
+using namespace std;
+
+#include "errorexception.h"
+
+class Constraint;
+
+class Bipartition{
+	public:	
+	unsigned int *rep;
+	static int nBlocks;
+	static int blockBits;
+	static int ntax;
+	static unsigned int largestBlockDigit;
+	static unsigned int allBitsOn;
+	static char* str;
+	static unsigned int partialBlockMask;//this can be used to mask out the bits that
+										// aren't used in the last block.  This becomes
+										//important if we start doing complements. Bits
+										//that represent actual taxa are ON
+
+	Bipartition(){
+		rep=new unsigned int[nBlocks];
+		ClearBipartition();
+		}
+	Bipartition(const Bipartition &b){//copy constructor
+		rep=new unsigned int[nBlocks];
+		memcpy(rep, b.rep, nBlocks*sizeof(int));
+		//for(int i=0;i<nBlocks;i++) rep[i] = b.rep[i];
+		}
+
+	Bipartition(const char *c){//construct from a ***.... string
+		rep=new unsigned int[nBlocks];
+		ClearBipartition();
+		size_t len=strlen(c);
+		assert(len == ntax);
+		Bipartition tmp;
+		for(unsigned i=0;i<len;i++){
+			if(c[i] == '*') *this += tmp.TerminalBipart(i+1);
+			}
+		Standardize();
+		}
+
+	~Bipartition(){
+		if(rep!=NULL) delete []rep;
+		rep=NULL;
+		}	
+
+	bool IsCompatibleWithBipartition(const Bipartition &constr) const;
+	bool OldIsCompatibleWithBipartition(const Bipartition &constr) const;
+	
+	bool IsCompatibleWithBipartitionWithMask(const Bipartition &constr, const Bipartition &mask) const;
+	bool OldIsCompatibleWithBipartitionWithMask(const Bipartition &bip, const Bipartition &mask) const;
+
+	//this is not being used
+	bool IsIncompatibleWithBipartitionWithMask(const Bipartition &bip, const Bipartition &mask) const;
+
+	bool MakeJointMask(const Constraint &constr, const Bipartition *partialMask);
+	void NumericalOutput(string &out, const Bipartition *mask);
+	static void SetBipartitionStatics(int);
+	static void SetPartialBlockMask();
+	
+	void ClearBipartition(){
+		memset(rep, 0L, sizeof(int) * nBlocks);
+		}
+	
+	void operator+=(const Bipartition *rhs){
+		for(int i=0;i<nBlocks;i++){
+			rep[i] |= rhs->rep[i];
+			}
+		}
+
+	void operator-=(const Bipartition *rhs){
+		//note that this assumes that rhs is a subset of this or vice versa!!!
+		if(rhs->IsASubsetOf(*this)){
+			for(int i=0;i<nBlocks;i++){
+				rep[i] ^= rhs->rep[i];
+				}
+			}
+		else{
+			for(int i=0;i<nBlocks;i++){
+				rep[i] |= ~rhs->rep[i];
+				}
+			}
+		}
+
+	void operator=(const Bipartition *rhs){
+		memcpy(rep, rhs->rep, nBlocks*sizeof(int));
+		}
+
+	void operator=(const Bipartition &rhs){
+		memcpy(rep, rhs.rep, nBlocks*sizeof(int));
+		}
+
+	int CountOnBits() const{
+		int num=0;
+		for(int i=1;i<=ntax;i++)
+			if(ContainsTaxon(i)) num++;
+		return num;
+		}
+
+	bool MoreThanOneBitSet() const{
+		int num = 0;
+		int i = 0;
+		for(i=0;i<nBlocks-1;i++){
+			//check if there is more than one bit set in this block
+			if(rep[i] & (rep[i] - 1))
+				return true;
+			//keep track of how many bits we've seen on
+			if(rep[i])
+				num++;
+			if(num > 1)
+				return true;
+			}
+		if((rep[i] & partialBlockMask) & ((rep[i] & partialBlockMask) - 1))
+			return true;
+		if(rep[i] & partialBlockMask)
+			num++;
+		if(num > 1)
+			return true;
+		return false;
+		}
+
+	void FlipBits(const Bipartition &flip){
+		//this just flips the bits in the passed in bipartition
+		EqualsXORComplement(flip);
+		}
+
+	void FillAllBits(){
+		//the argument here is what to fill each _byte_ of the ints with
+		memset(rep, 0xFF, sizeof(int) * nBlocks);
+		}
+
+	bool EqualsEquals(const Bipartition &rhs) const{
+		//assert(this->ContainsTaxon(1));
+		//assert(rhs.ContainsTaxon(1));
+		int i;
+		for(i=0;i<nBlocks-1;i++){
+			if(rep[i] != rhs.rep[i]) 
+				return false;
+			}
+		if((rep[i]&partialBlockMask)!=((rhs.rep[i])&partialBlockMask)) 
+			return false;
+		return true;
+		}
+
+	bool MaskedEqualsEquals(const Bipartition &rhs, const Bipartition &mask) const{
+		//assert(this->ContainsTaxon(1));
+		//assert(rhs.ContainsTaxon(1));
+		int i;
+		for(i=0;i<nBlocks-1;i++){
+			if((rep[i] & mask.rep[i]) != (rhs.rep[i] & mask.rep[i])) 
+				return false;
+			}
+		if((rep[i] & partialBlockMask & mask.rep[i]) != ((rhs.rep[i]) & partialBlockMask & mask.rep[i])) 
+			return false;
+		return true;
+		}
+
+	//this flips bits in the unused portion of the last block, but since it is
+	//always masked it doesn't matter
+	void Complement(){
+		for(int i=0;i<nBlocks;i++){
+			rep[i] = ~rep[i];
+			}
+		}
+
+	bool ComplementEqualsEquals(const Bipartition &rhs) const{
+		int i;
+		for(i=0;i<nBlocks-1;i++){
+			if(~rep[i]!=rhs.rep[i]) 
+				return false;
+			}
+			
+		if(((~rep[i])&partialBlockMask)!=(rhs.rep[i]&partialBlockMask)) 
+			return false;
+		
+		return true;
+		}
+	
+	bool MaskedComplementEqualsEquals(const Bipartition &rhs, const Bipartition &mask) const{
+		//assert(this->ContainsTaxon(1));
+		//assert(rhs.ContainsTaxon(1));
+		int i;
+		for(i=0;i<nBlocks-1;i++){
+			if((~rep[i] & mask.rep[i]) != (rhs.rep[i] & mask.rep[i])) 
+				return false;
+			}
+		if((~rep[i] & partialBlockMask & mask.rep[i]) != ((rhs.rep[i]) & partialBlockMask & mask.rep[i])) 
+			return false;
+		return true;
+		}
+
+	void Standardize(){
+		if(ContainsFirstTaxon())
+			return;
+		else
+			Complement();
+		}
+	
+	int FirstPresentTaxon() const{
+		int blk=0;
+		unsigned int tmp=rep[blk];
+		while(tmp == 0) 
+			tmp=rep[++blk];
+		
+		int t=blockBits*blk+1;
+		while( ! (tmp & largestBlockDigit)){
+			tmp = tmp << 1;
+			t++;
+			}
+		return t;
+		}
+
+	int FirstNonPresentTaxon() const{
+		int blk=0;
+		unsigned int tmp=rep[blk];
+		while(tmp==allBitsOn) 
+			tmp=rep[++blk];
+		
+		int t=blockBits*blk+1;
+		while((tmp & largestBlockDigit)){
+			tmp = tmp << 1;
+			t++;
+			}
+		return t;
+		}
+
+	bool ContainsTaxon(int t) const{
+		unsigned int tmp=rep[(t-1)/blockBits];
+		if(tmp & largestBlockDigit>>((t-1)%blockBits)) 
+			return true;
+		return false;
+		}
+
+	//if you know the taxon is in the first block, it is unnecessary and very slow to do 
+	//the divisions in ContainsTaxon
+	inline bool ContainsFirstTaxon() const{
+		if(rep[0] & largestBlockDigit) 
+			return true;
+		return false;
+		}
+
+	void FillWithXORComplement(const Bipartition &lhs, const Bipartition &rhs){
+		for(int i=0;i<nBlocks;i++){
+			rep[i] = lhs.rep[i] ^ (~rhs.rep[i]);
+			}
+		}
+
+	void EqualsXORComplement(const Bipartition &rhs){
+		for(int i=0;i<nBlocks;i++){
+			rep[i] = rep[i] ^ (~rhs.rep[i]);
+			}
+		}
+
+	void AndEquals(const Bipartition &rhs){
+		//sets the calling bipart to be the bitwise AND of it and the argument
+		for(int i=0;i<nBlocks;i++){
+			rep[i] = rep[i] & rhs.rep[i];
+			}
+		}
+
+//NOTE that the _BETTER_BIPART sections here are usually (much) slower unless intersections are rare.
+//They don't have the branch within the loop, but they do have an extra bitwise operation and don't
+//allow breaking out early.  With branch prediction the branch cost is only paid upon early return
+//(I think).  So, when the number of taxa is small and the loop executes few times it might be more
+//helpful.  For nine blocks (329 taxa) with a mask it is much slower.  The story might be different
+//without the mask, when the per loop cost is lower but the misprediction cost is the same.
+bool HasIntersection(const Bipartition &rhs, const Bipartition *mask) const
+	{
+		int i;
+		if(!mask){
+			for(i=0;i<nBlocks-1;i++){
+				if(rep[i] & rhs.rep[i]){
+					return true;
+					}
+				}
+			if(((rep[i] & rhs.rep[i]) & partialBlockMask))
+				return true;
+			}
+#ifdef _BETTER_BIPART
+		else{
+			unsigned sum = 0;
+			for(i=0;i<nBlocks-1;i++){
+				sum |= ((rep[i] & rhs.rep[i]) & mask->rep[i]);
+				}
+			if(sum)
+				return true;
+			if((rep[i] & rhs.rep[i]) & (mask->rep[i] & partialBlockMask))
+				return true;
+
+			}
+#else
+		else{
+			for(i=0;i<nBlocks-1;i++){
+				if((rep[i] & rhs.rep[i]) & mask->rep[i]){
+					return true;
+					}
+				}
+			if(((rep[i] & rhs.rep[i]) & (mask->rep[i] & partialBlockMask)))
+				return true;
+			}
+#endif
+		return false;
+		}
+
+	bool HasIntersectionWithComplement(const Bipartition &rhs, const Bipartition *mask) const{
+		int i;
+		if(!mask){
+			for(i=0;i<nBlocks-1;i++){
+				if(rep[i] & ~rhs.rep[i]){
+					return true;
+					}
+				}
+			if(((rep[i] & ~rhs.rep[i]) & partialBlockMask))
+				return true;
+			}
+#ifdef _BETTER_BIPART
+		else{
+			unsigned sum = 0;
+			for(i=0;i<nBlocks-1;i++){
+				sum |= ((rep[i] & ~rhs.rep[i]) & mask->rep[i]); 
+				}
+			if(sum)
+				return true;
+			if((rep[i] & ~rhs.rep[i]) & (mask->rep[i] & partialBlockMask))
+				return true;
+			}
+#else
+		else{
+			for(i=0;i<nBlocks-1;i++){
+				if((rep[i] & ~rhs.rep[i]) & mask->rep[i]){
+					return true;
+					}
+				}
+			if(((rep[i] & ~rhs.rep[i]) & (mask->rep[i] & partialBlockMask)))
+				return true;
+			}
+#endif
+		return false;
+		}
+
+	bool ComplementHasIntersection(const Bipartition &rhs, const Bipartition *mask) const{
+		int i;
+		if(!mask){
+			for(i=0;i<nBlocks-1;i++){
+				if(~rep[i] & rhs.rep[i]){
+					return true;
+					}
+				}
+			if(((~rep[i] & rhs.rep[i]) & partialBlockMask))
+				return true;
+			}
+#ifdef _BETTER_BIPART
+		else{
+			unsigned sum = 0;
+			for(i=0;i<nBlocks-1;i++){
+				sum |= ((~rep[i] & rhs.rep[i]) & mask->rep[i]); 
+				}
+			if(sum)
+				return true;
+			if((~rep[i] & rhs.rep[i]) & (mask->rep[i] & partialBlockMask))
+				return true;
+			}
+#else
+		else{
+			for(i=0;i<nBlocks-1;i++){
+				if((~rep[i] & rhs.rep[i]) & mask->rep[i]){
+					return true;
+					}
+				}
+			if(((~rep[i] & rhs.rep[i]) & (mask->rep[i] & partialBlockMask)))
+				return true;
+			}
+#endif
+		return false;
+		}
+
+	bool ComplementHasIntersectionWithComplement(const Bipartition &rhs, const Bipartition *mask) const{
+		int i;
+		if(!mask){
+			for(i=0;i<nBlocks-1;i++){
+				if(~rep[i] & ~rhs.rep[i]){
+					return true;
+					}
+				}
+			if(((~rep[i] & ~rhs.rep[i]) & partialBlockMask))
+				return true;
+			}
+#ifdef _BETTER_BIPART
+		else{
+			unsigned sum = 0;
+			for(i=0;i<nBlocks-1;i++){
+				sum |= ((~rep[i] & ~rhs.rep[i]) & mask->rep[i]); 
+				}
+			if(sum)
+				return true;
+			if((~rep[i] & ~rhs.rep[i]) & (mask->rep[i] & partialBlockMask))
+				return true;
+			}
+#else
+		else{
+			for(i=0;i<nBlocks-1;i++){
+				if((~rep[i] & ~rhs.rep[i]) & mask->rep[i]){
+					return true;
+					}
+				}
+			if(((~rep[i] & ~rhs.rep[i]) & (mask->rep[i] & partialBlockMask)))
+				return true;
+			}
+#endif
+		return false;
+		}
+
+	bool IsCompatibleWithNegativeBipartition(const Bipartition &bip) const{
+		//To be consistent with a negative bipartition (constraint) neither the bipartition
+		//or its complement can BE the constraint bipartition
+		if(this->EqualsEquals(bip)==false && this->ComplementEqualsEquals(bip)==false) return true;
+		else return false;
+		}
+
+	bool IsCompatibleWithNegativeBipartitionWithMask(const Bipartition &bip, const Bipartition &mask) const{
+		//To be consistent with a negative bipartition (constraint) neither the masked bipartition
+		//or its masked complement can BE the constraint bipartition
+		if(this->MaskedEqualsEquals(bip, mask)==false && this->MaskedComplementEqualsEquals(bip, mask)==false) return true;
+		else return false;
+		}
+
+	bool IsASubsetOf(const Bipartition &target) const{
+		//returns true if this is a subset of target
+		int i;
+		for(i=0;i<nBlocks-1;i++){
+			if((target.rep[i] | rep[i]) != target.rep[i]) return false;
+			}
+		if(((target.rep[i] | rep[i]) & partialBlockMask) != (target.rep[i] & partialBlockMask)) return false;
+		return true;
+		}
+
+	bool MaskedIsASubsetOf(const Bipartition &target, const Bipartition &mask) const{
+		//returns true if this is a subset of target
+		int i;
+		for(i=0;i<nBlocks-1;i++){
+			if(((target.rep[i] | rep[i]) & mask.rep[i]) != (target.rep[i] & mask.rep[i])) return false;
+			}
+		if(((target.rep[i] | rep[i]) & partialBlockMask & mask.rep[i]) != (target.rep[i] & partialBlockMask & mask.rep[i])) return false;
+		return true;
+		}
+
+	bool ComplementIsASubsetOf(const Bipartition &target) const{
+		//returns true if this is NOT a subset of target's complement
+		int i;
+		for(i=0;i<nBlocks-1;i++){
+			if((target.rep[i] | ~rep[i]) != ~rep[i]) return true;
+			}
+		if(((target.rep[i] | ~rep[i]) & partialBlockMask) != (~rep[i] & partialBlockMask)) return false;
+		return true;
+		}
+
+	Bipartition *TerminalBipart(int taxNum){
+		assert(taxNum > 0 && taxNum <= ntax);
+		ClearBipartition();
+		//8-19-05 fixed this bit of stupidity
+		//rep[(taxNum)/blockBits]|=(largestBlockDigit>>((taxNum-1)%blockBits));
+		rep[(taxNum-1)/blockBits]|=(largestBlockDigit>>((taxNum-1)%blockBits));
+		return this;
+		}
+	char * Output(){
+		for(int i=0;i<nBlocks;i++){
+			unsigned int t=rep[i];
+			for(int j=0;j<blockBits;j++){
+				if(i*blockBits+j >= ntax) break;
+				if(t&largestBlockDigit) str[i*blockBits+j]='*';
+				else str[i*blockBits+j]='-';
+				t=t<<1;
+				}
+			}
+		return str;
+		}
+	
+/*
+	void BinaryOutput(ofstream &out){
+		int size = nBlocks * sizeof(unsigned int);
+		out.write((char*) rep, size);
+		}
+*/
+	void BinaryOutput(OUTPUT_CLASS &out){
+		out.WRITE_TO_FILE(rep, sizeof(unsigned int), nBlocks);
+		}
+
+	void BinaryInput(FILE* &in){
+		fread((char*) rep, sizeof(unsigned int), nBlocks, in);
+		}
+
+	vector<int> NodenumsFromBipart(){
+		vector<int> nodes;
+		for(int i=1;i<=ntax;i++) if(ContainsTaxon(i)) nodes.push_back(i);
+		return nodes; 
+		}
+	
+	void BipartFromNodenums(const vector<int> & nodes){
+		ClearBipartition();
+		Bipartition temp;
+		for(vector<int>::const_iterator it = nodes.begin();it != nodes.end();it++)
+			*this += temp.TerminalBipart(*it);
+		}
+
+	void BipartFromNodenums(const std::set<unsigned> & nodes){
+		ClearBipartition();
+		Bipartition temp;
+		for(set<unsigned>::const_iterator it = nodes.begin();it != nodes.end();it++)
+			*this += temp.TerminalBipart(*it);
+		}
+	};
+
+bool BipartitionLessThan(const Bipartition &lhs, const Bipartition &rhs);
+
+class Constraint{
+	//a very simple class that just contains a bipartition and whether
+	//it is a negative or positive constraint
+	Bipartition con;
+	bool positive;
+
+	//now adding the potential for a backbone constraint
+	//BACKBONE
+	bool backbone;
+	Bipartition backboneMask;
+
+	//an outgroup is a special type of positive constraint
+	bool outgroup;
+public:
+	//if these are true (and they almost always will be), it makes checking constraint validity much easier
+	static bool allBackbone;
+	static bool anyBackbone;
+	static bool sharedMask;
+
+	Constraint() {
+		backbone=false;
+		};
+	Constraint(const Bipartition *b, bool pos){
+		positive=pos;
+		con=b;
+		backbone=false;
+		}
+
+	Constraint(const Bipartition *b, const Bipartition *m, bool pos){
+		positive=pos;
+		con=b;
+		backbone=true;
+		backboneMask = m;
+		}
+
+	static void SetConstraintStatics(bool allBack, bool anyBack, bool oneMask);
+
+	bool IsPositive() const {return positive;}
+
+	bool IsBackbone() const {return backbone;}
+
+	bool IsOutgroup() const {return outgroup;}
+
+	const Bipartition *GetBipartition() const {return &con;}
+
+	const Bipartition *GetBackboneMask() const {return &backboneMask;}
+
+	void SetAsOutgroup() {outgroup = true;}
+
+	void Standardize() {con.Standardize();}
+
+	void ReadDotStarConstraint(const char *c){
+		Bipartition b;
+		size_t len=strlen(c);
+		con.ClearBipartition();
+		if(c[0] == '+') positive=true;
+		else if(c[0] == '-') positive=false;
+		else throw ErrorException("constraint string must start with \'+\' (positive constraint) or \'-\' (negative constraint)");
+		for(unsigned i=1;i<len;i++){
+			if(c[i] == '*') con += b.TerminalBipart(i);
+			}
+		con.Standardize();
+		}
+	bool ConstraintIsCompatibleWithConstraint(const Constraint &other) const{
+		//this version takes a constraint and checks if the two are compatible with one another
+		if(positive==true && other.IsPositive() == true){
+			return con.IsCompatibleWithBipartition(*(other.GetBipartition()));		
+			}
+		return true;
+		//need to figure out how to verify compatibility when at least one of the constraints is negative
+		assert(0);
+		return false;
+		}
+
+	//Checks whether a single bipartition is compatible with the constraint.  The mask passed in should already
+	//contain the and'ing of a backbone mask and/or a mask representing taxa present in a growing tree
+	bool BipartitionIsCompatibleWithConstraint(const Bipartition &other, const Bipartition *mask) const{
+		if(positive){//positive constraint - determine bipartition compatibility with 4-point condition
+			//DEBUG
+			if(mask != NULL)
+				return con.IsCompatibleWithBipartitionWithMask(other, *mask);
+			else 
+				return con.IsCompatibleWithBipartition(other);
+
+/*			if(backbone){
+				if(mask != NULL){
+					Bipartition jointMask = *mask;
+					jointMask.AndEquals(backboneMask);
+					if(jointMask.CountOnBits() < 4) return true;
+					return con.IsCompatibleWithBipartitionWithMask(other, jointMask);
+					}
+				else 
+					return con.IsCompatibleWithBipartitionWithMask(other, backboneMask);
+				}
+			else{
+				if(mask != NULL)
+					return con.IsCompatibleWithBipartitionWithMask(other, *mask);
+				else 
+					return con.IsCompatibleWithBipartition(other);
+				}
+*/			}
+		else{//negative constraints - for the bipartition to be incompatible with the negative
+			//constraint it needs to acutally BE the constrained bipartition (potentially with a mask)
+			if(mask != NULL) 
+				return con.IsCompatibleWithNegativeBipartitionWithMask(other, *mask);
+			else 
+				return con.IsCompatibleWithNegativeBipartition(other);
+
+/*			if(backbone){
+				if(mask != NULL){
+					Bipartition jointMask = *mask;
+					jointMask.AndEquals(backboneMask);
+					if(jointMask.CountOnBits() < 4) return true;
+					return con.IsCompatibleWithNegativeBipartitionWithMask(other, jointMask);
+					}
+				else
+					return con.IsCompatibleWithNegativeBipartitionWithMask(other, backboneMask);
+				}
+			else{
+				if(mask != NULL)
+					return con.IsCompatibleWithNegativeBipartitionWithMask(other, *mask);
+				else
+					return con.IsCompatibleWithNegativeBipartition(other);
+				}
+*/			}
+		}
+
+	void NumericalOutput(string &out){
+		if(IsBackbone()) 
+			con.NumericalOutput(out, &backboneMask);
+		else 
+			con.NumericalOutput(out, NULL);
+		}
+	};
+
+#endif
+
diff --git a/src/clamanager.h b/src/clamanager.h
new file mode 100644
index 0000000..dd7455b
--- /dev/null
+++ b/src/clamanager.h
@@ -0,0 +1,381 @@
+// GARLI version 2.0 source code
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef CLA_MANAGER
+#define CLA_MANAGER
+
+#include <vector>
+#include <algorithm>
+#include <cassert>
+#include "condlike.h"
+#include "model.h"
+using namespace std;
+
+extern int memLevel;
+
+#ifdef UNIX
+	#include <sys/mman.h>
+#endif
+
+#undef CLA_DEBUG
+
+class ClaSpecifier{
+	public:
+	int claIndex; //this is just the number of the corresponding cla - there is a 1 to 1 correspondence
+	int modelIndex;
+	int dataIndex;
+	ClaSpecifier(int c, int m, int d):claIndex(c), modelIndex(m), dataIndex(d){};
+	};
+
+extern vector<ClaSpecifier> claSpecs;
+
+class ClaManager{
+	int numNodes;//the number of nodes in each tree
+	int numRates;
+	int numClas;
+	int numHolders;
+	int maxUsed;
+	CondLikeArraySet **allClas; //these are the actual sets of arrays to be used in calculations, but will assigned to 
+							 //nodes via a CondLikeArrayHolder.  There may be a limited number						 
+
+	CondLikeArrayHolder *holders; //there will be enough of these such that every node and direction could
+								  //have a unique one, although many will generally be shared
+								  
+	vector<CondLikeArraySet *> claStack;
+	vector<int> holderStack;
+	
+	public:	
+	//PARTITION	
+	//ClaManager(int nnod, int nClas, int nHolders, int nchar, int nrates) : numNodes(nnod), numClas(nClas), numHolders(nHolders), numRates(nrates){
+/*	ClaManager(int nnod, int numClas, int nHolders, const ModelPartition *mods, const DataPartition *data) : numNodes(nnod), numHolders(nHolders){
+		maxUsed=0;
+		allClas=new CondLikeArraySet*[numClas];
+		claStack.reserve(numClas);
+		for(int i=numClas-1;i>=0;i--){
+			allClas[i]=new CondLikeArraySet;
+			//for(vector<Model *>::iterator modit = mods->models.begin();modit != mods->models.end();modit++){
+			for(int m = 0;m < mods->NumModels();m++){
+				const Model *thisMod = mods->GetModel(m);
+				CondLikeArray *thisCLA = new CondLikeArray(data->GetSubset(thisMod->dataIndex)->NChar(), thisMod->NStates(), thisMod->NRateCats(), thisMod->dataIndex);
+				allClas[i]->AddCLA(thisCLA);
+				allClas[i]->Allocate();
+				}
+			claStack.push_back(allClas[i]);
+			}
+		holders = new CondLikeArrayHolder[numHolders];
+		holderStack.reserve(numHolders);
+		for(int i=numHolders-1;i>=0;i--)
+			holderStack.push_back(i);
+		}
+*/
+	ClaManager(int nnod, int nClas, int nHolders, const ModelPartition *mods, const DataPartition *data) : numNodes(nnod), numClas(nClas), numHolders(nHolders){
+		maxUsed=0;
+		allClas=new CondLikeArraySet*[numClas];
+		claStack.reserve(numClas);
+		for(int i=numClas-1;i>=0;i--){
+				allClas[i]=new CondLikeArraySet;
+				//for(vector<Model *>::iterator modit = mods->models.begin();modit != mods->models.end();modit++){
+				//for(int m = 0;m < mods->NumModels();m++){
+				for(vector<ClaSpecifier>::iterator specs = claSpecs.begin();specs != claSpecs.end();specs++){
+					const Model *thisMod = mods->GetModel((*specs).modelIndex);
+					CondLikeArray *thisCLA = new CondLikeArray(data->GetSubset((*specs).dataIndex)->NChar(), (thisMod->IsOrientedGap() ? 3: thisMod->NStates()), thisMod->NRateCats());
+					allClas[i]->AddCLA(thisCLA);
+					}
+			allClas[i]->Allocate();
+			claStack.push_back(allClas[i]);
+			}
+		holders = new CondLikeArrayHolder[numHolders];
+		holderStack.reserve(numHolders);
+		for(int i=numHolders-1;i>=0;i--)
+			holderStack.push_back(i);
+		}
+
+	~ClaManager(){
+		if(allClas!=NULL){
+			for(int i=0;i<numClas;i++){
+				delete allClas[i];
+				}
+			delete []allClas;
+			}
+		delete []holders;
+		}
+	
+	int NumClas() {return numClas;}
+	int MaxUsedClas() {return maxUsed;}
+	int NumFreeClas() {return (int) claStack.size();}
+	int NumFreeHolders() {return (int) holderStack.size();}
+
+
+	int AssignClaHolder();
+	CondLikeArraySet* AssignFreeCla();
+	void FillHolder(int index, int dir); //sorry Mark
+
+	int GetReclaimLevel(int index);
+	void SetReclaimLevel(int index, int lvl);
+	int GetNumAssigned(int index) {return holders[index].numAssigned;}
+	void ReserveCla(int index, bool temp=true);
+	void ClearTempReservation(int index) {holders[index].tempReserved=false;}
+	void UnreserveCla(int index);
+	bool IsClaReserved(int index) {return holders[index].reserved;}
+	bool IsClaTempReserved(int index) {return holders[index].tempReserved;};
+	void ReclaimSingleCla(int index);
+	void CountClaTotals(int &clean, int &tempres, int &res, int &assigned);
+	void RecycleClas();
+	int GetClaNumber(int index);
+	int CountClasInUse(int recLevel);
+	CondLikeArraySet *GetCla(int index);	
+	const CondLikeArrayHolder *GetHolder(int index);	
+	bool IsDirty(int index);
+	int SetDirty(int index);
+	void IncrementCla(int index);
+	void DecrementCla(int index);
+	void CheckClaHolders();
+	void MakeAllHoldersDirty();
+	};
+	
+	inline int ClaManager::AssignClaHolder(){
+		assert(holderStack.size() > 0);
+		int index=holderStack[holderStack.size()-1];
+		IncrementCla(index);
+		holderStack.pop_back();
+		return index;
+		}
+	
+	inline void ClaManager::FillHolder(int index, int dir){
+		holders[index].theSet = AssignFreeCla();
+		holders[index].reclaimLevel=dir;
+		}
+
+	inline int ClaManager::GetReclaimLevel(int index){
+		if(holders[index].theSet == NULL) return -1;
+		return holders[index].GetReclaimLevel();
+		}
+
+	inline void ClaManager::SetReclaimLevel(int index, int lvl){
+		assert(index > -1);
+		if(holders[index].theSet == NULL) 
+			assert(0);
+			//return;
+		holders[index].SetReclaimLevel(lvl);
+		}
+
+	inline void ClaManager::ReserveCla(int index, bool temp/*=true*/){
+		if(temp==true) holders[index].tempReserved=true;
+		else holders[index].reserved=true;
+		}
+
+	inline void ClaManager::UnreserveCla(int index){
+//		holders[index].tempReserved=false;
+		holders[index].reserved=false;
+		if(memLevel>1)
+			holders[index].SetReclaimLevel(1);
+		}
+
+	inline void ClaManager::ReclaimSingleCla(int index){
+		//this simply removes the cla from a holder.  It is equivalent to just
+		//dirtying it if only a single tree shares the holder
+		if(holders[index].theSet==NULL) return;
+		claStack.push_back(holders[index].theSet);
+		holders[index].SetReclaimLevel(0);
+		holders[index].theSet=NULL;				
+		}
+
+	inline void ClaManager::CountClaTotals(int &clean, int &tempres, int &res, int &assigned){
+		for(int i=0;i<numHolders;i++){
+			if(holders[i].theSet != NULL) clean++;
+			if(holders[i].tempReserved ==true) tempres++;
+			if(holders[i].reserved==true) res++;
+			}		
+		assigned = numHolders - (int) holderStack.size();
+		}
+	
+	inline int ClaManager::GetClaNumber(int index){
+		//this is ugly, but should only be called for debugging
+		if(holders[index].theSet == NULL) return -1;
+		for(int i=0;i<numClas;i++)
+			if(holders[index].theSet == allClas[i]) return i;
+		assert(0);
+		return -1;
+		}
+
+	inline int ClaManager::CountClasInUse(int recLevel){
+		int num=0;
+		for(int i=0;i<numHolders;i++){
+			if(holders[i].theSet != NULL)
+				if(holders[i].GetReclaimLevel() == recLevel) num++;
+			}
+		return num;
+		}
+
+	inline CondLikeArraySet *ClaManager::GetCla(int index){
+		assert(holders[index].theSet != NULL);
+		return holders[index].theSet;
+		}
+	
+	inline const CondLikeArrayHolder *ClaManager::GetHolder(int index){
+		return &holders[index];
+		}
+	
+	inline bool ClaManager::IsDirty(int index){
+		//dirtyness is now synonymous with a null cla pointer in the holder
+		assert(index > -1);
+		return (holders[index].theSet == NULL);	
+		}
+
+	inline int ClaManager::SetDirty(int index){
+		//there are only two options here:
+		//1. Cla is being made dirty, and only node node points to it 
+		//	->null the holder's cla pointer and return the same index
+		//2. Cla is being made dirty, and multiple nodes point to it
+		//	->remove this node from the holder (decrement) and assign a new one	
+	
+		assert(index != -1);
+
+		if(holders[index].numAssigned==1){
+			if(holders[index].theSet != NULL){
+				holders[index].SetReclaimLevel(0);
+				claStack.push_back(holders[index].theSet);
+				holders[index].theSet=NULL;
+				}
+			}
+		else{
+			DecrementCla(index);
+			index=holderStack[holderStack.size()-1];
+			holderStack.pop_back();
+			IncrementCla(index);
+			}
+		return index;
+		}
+
+	inline void ClaManager::IncrementCla(int index){
+		holders[index].numAssigned++;
+		}
+
+	inline void ClaManager::DecrementCla(int index){
+		assert(index != -1);
+		if(holders[index].numAssigned==1){
+			holderStack.push_back(index);
+			if(holders[index].theSet != NULL){
+				assert(find(claStack.begin(), claStack.end(), holders[index].theSet) == claStack.end());
+				//assert(holders[index].theSet->NStates()==4);
+				claStack.push_back(holders[index].theSet);
+				}
+			holders[index].Reset();
+			}
+		else{
+			holders[index].numAssigned--; 
+			//this is important!
+			holders[index].tempReserved=false;
+			}
+		}
+
+	inline void ClaManager::CheckClaHolders(){
+		int used=0;
+		int reclaim2=0;
+		for(int i=0;i<numHolders;i++){
+			if(holders[i].theSet != NULL){
+				used++;
+				if(holders[i].GetReclaimLevel() == 2) reclaim2++;
+				}
+			}
+		assert(used == numClas - claStack.size());
+		}
+	
+	inline void ClaManager::MakeAllHoldersDirty(){
+		
+		for(int i=0;i<numHolders;i++){
+			if(holders[i].theSet != NULL){
+				claStack.push_back(holders[i].theSet);
+				holders[i].theSet=NULL;
+				}
+			}
+		}
+
+/*
+	void MarkReclaimable(int index, int val, bool observeCounts=true){
+		assert(0);
+		#ifdef CLA_DEBUG
+		ofstream deb("cladebug.log", ios::app);
+		deb << index << "\tmarked reclaimed\n";
+		#endif
+//		if(holders[index].theArray != NULL && (observeCounts==false || holders[index].nodes.size()==1)){
+//		if(holders[index].theArray != NULL && (observeCounts==false || holders[index].numAssigned==1)){
+//		if(holders[index].theArray != NULL && holders[index].reserved==false){
+//			holders[index].SetReclaimLevel(val);
+
+//		if(holders[index].theArray != NULL){
+//			if(holders[index].reserved==false) holders[index].SetReclaimLevel(val);
+			holders[index].tempReserved = false;
+//			}
+		}
+*/	
+
+/*		
+	void CheckClaManager(int checktot){
+		int tot=0;
+		//verify that the total number of clas assigned for any particular node is less than the number of trees
+		for(int i=1;i<size;i++){
+			tot+=assignedClaArray[i];
+			}
+		}
+*/
+/*	
+	void CheckAssignedNumber(int chk, int node, int index){
+		assert(chk==assignedClaArray[node*numCopies+index]);
+		}
+*/		
+//	int NumCopies(){ return numCopies;}
+//	int NumNodes(){return numNodes;}
+/*	
+	void OutputAssignedClaArray(){
+		static int count = 0;
+		//ofstream out("claindeces.txt", ios::app);
+		ofstream out("claindeces.txt");
+		out << "\ncount " << count++ << endl;
+		for(int i=0;i<numNodes;i++){
+			for(int j=0;j<numCopies;j++){
+				out << i << "\t" << j << "\t" << assignedClaArray[i*numCopies+j] << endl;
+				}
+			}
+		out << endl;
+		}
+	void ClearAllClas(){
+		for(int i=0;i<numNodes*numCopies;i++){
+			allClas[i]->SetDirty(true);
+			assignedClaArray[i]=0;
+			}
+		}
+*/	
+/*	void OutputClaReport(){
+		ofstream cla("clareport.log");
+		for(int i=1;i<numClas;i++){
+			cla << i << "\t" << assignedClaArray[i] << "\t" << allClas[i]->nodeNum << "\t" << allClas[i]->IsDirty() << "\n";
+			}
+		}
+*/
+/*
+	int NumAssigned(int index){
+		return assignedClaArray[index];
+		}	
+*/
+/*
+	void OutputClaInfo(ostream &str, int index, int nd){
+		str << nd << "\t" << index << "\t" << allClas[index]->nodeNum << "\t" << allClas[index]->IsDirty(nd) << "\t" << assignedClaArray[index] << "\t" << allClas[index]->GetReclaimLevel() << "\n";
+		}
+*/
+
+#endif
diff --git a/src/condlike.cpp b/src/condlike.cpp
new file mode 100644
index 0000000..5f8f164
--- /dev/null
+++ b/src/condlike.cpp
@@ -0,0 +1,154 @@
+// GARLI version 2.0 source code
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+//	NOTE: Portions of this source adapted from GAML source, written by Paul O. Lewis
+
+#include "defs.h"
+#include "condlike.h"
+#include "clamanager.h"
+#include "utility.h"
+
+#undef ALIGN_CLAS
+#define CLA_ALIGNMENT 32
+
+CondLikeArray::~CondLikeArray(){
+	//with partitioning, the entire allocation is managed and deleted by the
+	//condlikearrayset, so don't delete anything here
+	arr = NULL;
+	underflow_mult = NULL;
+/*	if( arr ){
+#ifndef ALIGN_CLAS
+		delete []arr;
+#else
+		DeleteAlignedArray(arr);
+#endif
+		arr=NULL;
+		 }
+	if(underflow_mult!=NULL) delete []underflow_mult;
+*/
+}
+
+void CondLikeArray::Allocate( int nk, int ns, int nr /* = 1 */ ){
+	if( arr ){
+#ifndef ALIGN_CLAS
+		delete []arr;
+#else
+		DeleteAlignedArray(arr);
+#endif
+		arr=NULL;
+		}
+	nrates = nr;
+	nsites = ns;
+	nstates = nk;
+#ifndef ALIGN_CLAS
+	arr=new FLOAT_TYPE[nk*nr*ns];
+#else
+	arr = NewAlignedArray<FLOAT_TYPE>(nk*nr*ns, CLA_ALIGNMENT);
+#endif
+	if(arr==NULL){
+		throw ErrorException("GARLI had a problem allocating memory!  Try reducing the availablememory setting.");
+		}
+	//DJZ 1-5-05 - the underflow mult used to be ns*nr in length,
+	//but only needs to be ns
+	underflow_mult=new int[ns];
+	if(underflow_mult==NULL){
+		throw ErrorException("GARLI had a problem allocating memory!  Try reducing the availablememory setting.");
+		}
+	}
+
+
+CondLikeArraySet* ClaManager::AssignFreeCla(){
+	#ifdef CLA_DEBUG
+	ofstream deb("cladebug.log", ios::app);
+	#endif
+
+	if(claStack.empty() == true) RecycleClas();
+	
+	CondLikeArraySet *arr=claStack[claStack.size()-1];
+	
+	assert(arr != NULL);
+	claStack.pop_back();
+	if(numClas - (int)claStack.size() > maxUsed) maxUsed=numClas - (int)claStack.size();
+	
+	return arr;
+	}
+
+void ClaManager::RecycleClas(){
+	int numReclaimed=0;
+	for(int i=0;i<numHolders;i++){
+		if(holders[i].theSet != NULL){
+			if(holders[i].GetReclaimLevel() == 2 && holders[i].tempReserved == false && holders[i].reserved == false){
+				claStack.push_back(holders[i].theSet);
+				holders[i].SetReclaimLevel(0);
+				holders[i].theSet=NULL;
+				numReclaimed++;
+				}
+			}
+		if(memLevel < 2) 
+			if(numReclaimed > 50) 
+				return;
+		}
+	if(numReclaimed > 10) 
+		return;
+	for(int i=0;i<numHolders;i++){
+		if(holders[i].theSet != NULL){
+			if((holders[i].GetReclaimLevel() == 1 && holders[i].tempReserved == false && holders[i].reserved == false)){
+				claStack.push_back(holders[i].theSet);
+				holders[i].SetReclaimLevel(0);
+				holders[i].theSet=NULL;
+				numReclaimed++;
+				}
+			}
+		if(numReclaimed == 20) 
+			return;
+		}
+	if(numReclaimed==0){
+		//I changed this for some reason in r1030 (April 7, 2011, which means that it was in the 2.0 release) to the ErrorException, 
+		//which I should not have.  Throwing 2 will dirty the entire tree, which needs to happen in some cases when there are too many
+		//CLAs in use during blen opt and certain memlevels are in effect. The error throw was causing it to bail when it shouldn't have.  
+		//Reverting this June 15, 2011
+		throw(2);
+		//throw ErrorException("Ran out of conditional likelihood arrays. This should not really happen, but try increasing availablememory setting");
+		}
+	assert(numReclaimed > 0);
+	}
+
+void CondLikeArraySet::Allocate() {
+	unsigned size = 0, usize = 0;
+	for(vector<CondLikeArray *>::iterator cit = theSets.begin();cit != theSets.end();cit++){
+		size += (*cit)->RequiredSize();
+		usize += (*cit)->NChar();
+		}
+	try{
+		rawAllocation = new FLOAT_TYPE[size];
+		}
+	catch(std::bad_alloc){
+		throw ErrorException("Problem allocating cond. likelihood array (len = %d). Out of mem?\n\tNote: to use > 4GB of memory, you will need a 64-bit version of GARLI.", size);
+		}
+	try{
+		rawUnder = new int[usize];
+		}
+	catch(std::bad_alloc){
+		throw ErrorException("Problem allocating underflow multiplier array (len = %d). Out of mem?", usize);
+		}
+	unsigned offset = 0, uoffset = 0;
+	for(vector<CondLikeArray *>::iterator cit = theSets.begin();cit != theSets.end();cit++){
+		(*cit)->Assign(&rawAllocation[offset], &rawUnder[uoffset]);
+		offset += (*cit)->RequiredSize();
+		uoffset += (*cit)->NChar();
+		}
+	}
diff --git a/src/condlike.h b/src/condlike.h
new file mode 100644
index 0000000..4213f6a
--- /dev/null
+++ b/src/condlike.h
@@ -0,0 +1,122 @@
+// GARLI version 2.0 source code
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+//	NOTE: Portions of this source adapted from GAML source, written by Paul O. Lewis
+
+// --------
+// Example showing how the array is laid out:
+//	------------------------------------------
+//	4 bases, 3 sites, 5 rate categories
+//
+//	          11111111112222222222333333333344444444445555555555
+//	012345678901234567890123456789012345678901234567890123456789
+//	------------------------------------------------------------
+//	012301230123012301230123012301230123012301230123012301230123 <== base b
+//	000011112222333344440000111122223333444400001111222233334444 <== rate r
+//	000000000000000000001111111111111111111122222222222222222222 <== site s
+//	indexing:             ^ this is s*4*5 + r*4 + b = 22
+//
+// If there is only one rate category...
+//	4 bases, 3 sites
+//
+//	          11
+//	012345678901
+//	------------
+//	012301230123 <== base b
+//	000000000000 <== rate r
+//	000011112222 <== site s
+//	indexing: ^ this is s*4*1 + b = 10
+//
+
+#ifndef __CONDLIKE_H
+#define __CONDLIKE_H
+
+#include <vector>
+#include <stddef.h>
+using namespace std;
+
+#include "defs.h"
+
+//******************************************************************************
+//  CondLikeArray
+//
+class CondLikeArray{
+	//this is a CLA for a single model
+	friend class CondLikeArrayIterator;
+
+	unsigned nsites, nrates, nstates;
+	public:
+		FLOAT_TYPE* arr;
+		int* underflow_mult;
+		unsigned rescaleRank;
+		CondLikeArray(int nsit, int nsta, int nrat)
+			: nsites(nsit), nrates(nrat), nstates(nsta), arr(NULL), underflow_mult(NULL), rescaleRank(1){}
+		CondLikeArray()
+			: nsites(0), nrates(0), nstates(0), arr(0), underflow_mult(0), rescaleRank(1){}
+		~CondLikeArray();
+		int NStates() const {
+			return nstates;
+			}
+		int NChar() const {return nsites;}
+		int NRateCats() const {return nrates;}
+		int RequiredSize() const {return nsites * nstates * nrates;}
+		void Assign(FLOAT_TYPE *alloc, int * under) {arr = alloc; underflow_mult = under;}
+
+		void Allocate( int nk, int ns, int nr = 1 );
+	};
+
+class CondLikeArraySet{
+	//this is a set of CLAs, one for each model
+public:
+		vector<CondLikeArray *> theSets;
+		FLOAT_TYPE *rawAllocation;
+		int *rawUnder;
+
+		CondLikeArraySet() : rawAllocation(NULL), rawUnder(NULL){};
+		~CondLikeArraySet() {
+			for(int i = 0;i < theSets.size();i++)
+				delete theSets[i];
+			theSets.clear();
+			delete []rawAllocation;
+			delete []rawUnder;
+			}
+
+		void Allocate();
+		void AddCLA(CondLikeArray *cla ){
+			theSets.push_back(cla);
+			}
+		CondLikeArray *GetCLA(int index){
+			return theSets[index];
+			}
+	};
+
+class CondLikeArrayHolder{
+	public:
+	short numAssigned;
+	short reclaimLevel;
+	bool tempReserved;
+	bool reserved;
+	//CondLikeArray *theArray;
+	CondLikeArraySet *theSet;
+	CondLikeArrayHolder() : theSet(NULL), numAssigned(0), reclaimLevel(0), reserved(false) , tempReserved(false){}
+	~CondLikeArrayHolder() {theSet = NULL;}
+	int GetReclaimLevel() {return reclaimLevel;}
+	void SetReclaimLevel(int lvl) {reclaimLevel = lvl;}
+	void Reset(){reclaimLevel=0;numAssigned=0,tempReserved=false;reserved=false;theSet=NULL;}
+	};
+#endif
+
diff --git a/src/configoptions.cpp b/src/configoptions.cpp
new file mode 100644
index 0000000..52e318b
--- /dev/null
+++ b/src/configoptions.cpp
@@ -0,0 +1,789 @@
+// GARLI version 2.1 source code
+// Copyright 2005-2014 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <string.h>
+#include <cassert>
+#include <iostream>
+#include <vector>
+#include <climits>
+
+using namespace std;
+
+#include "defs.h"
+#include "configoptions.h"
+#include "configreader.h"
+#include "errorexception.h"
+
+/////////////////////////////////////////////////////////////////////////
+// GamlConfig::General methods //////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////
+
+GeneralGamlConfig::GeneralGamlConfig(){
+	//Default values for everything
+
+	//output related
+	ofprefix = "ofprefix";
+	logevery = 10;
+	saveevery = 100;
+	outputTreelog = false;
+	outputMostlyUselessFiles = false;
+	outputPhylipTree = false;
+	outputCurrentBestTopology = false;
+	collapseBranches = false;
+	outputSitelikelihoods = 0;
+	reportRunProgress = 0;
+
+	//starting the run
+	randseed = -1;
+	bootstrapSeed = -1;
+	streefname = "random";
+	refineStart = true;
+	refineEnd = true;
+
+	//general run details
+	datafname = "datafname";
+	constraintfile = "\0";
+	availableMemory = -1; 
+	megsClaMemory = 512;
+	restart = false;
+	checkpoint = false;
+	significantTopoChange = (FLOAT_TYPE)0.01;
+	searchReps = 1;
+	//this isn't for general consumption, but lets me easily enable hacked in features
+	runmode = 0;
+	scoreOnly = false;
+	
+	ignoreStopCodons = false;
+
+	workPhaseDivision = false;
+
+	attachmentsPerTaxon = 50;
+
+	siteWindowLength = 0;
+	siteWindowStride = 0;
+
+	combineAdjacentIdenticalGapPatterns = false;
+
+	usePatternManager = true;
+	rootAtBranchMidpoint = false;
+	useOptBoundedForBlen = false;
+	optimizeInputOnly = false;
+	//this should really not be necessary, but for some reason not explicitly initializing it was causing problems with icc
+	parameterValueString = "";
+
+	//finishing the run
+	enforceTermConditions = true;
+	lastTopoImproveThresh = 10000;
+	improveOverStoredIntervalsThresh = (FLOAT_TYPE)0.05;
+	stopgen = UINT_MAX;
+	stoptime = UINT_MAX;
+	swapTermThreshold = 0;
+
+	linkModels = false;
+	subsetSpecificRates = true;
+
+	//general population stuff
+	nindivs = 4;
+	holdover = 1;
+	selectionIntensity = 0.5;
+	holdoverPenalty = 0.0;
+
+	startOptPrec = 0.5;
+	minOptPrec = (FLOAT_TYPE)0.01;
+	numPrecReductions = 20;
+	precReductionFactor = (FLOAT_TYPE)0.9;
+	treeRejectionThreshold = 50.0;
+
+	//parameters affecting proportion of mutations
+	topoWeight = 1.0;
+		randNNIweight = (FLOAT_TYPE)0.1;
+		randSPRweight = (FLOAT_TYPE)0.3;
+		limSPRweight = (FLOAT_TYPE)0.6;
+	modWeight = (FLOAT_TYPE)0.05;
+	brlenWeight = (FLOAT_TYPE)0.2;
+
+	intervalLength = 100;
+	intervalsToStore = 5;
+
+	//parameters affecting other details of mutations	
+	meanBrlenMuts = 5.0;
+	gammaShapeBrlen = 1000;
+	gammaShapeModel = 1000;
+	limSPRrange = 6;
+	uniqueSwapBias = (FLOAT_TYPE)0.1;
+	distanceSwapBias = 1.0;
+	
+	//optional analyses
+	inferInternalStateProbs = false;
+	bootstrapReps = 0;
+	resampleProportion = 1.0;
+
+	sendInterval = 60.0;
+
+	//these macros are all defined in the defs.h file
+	//but could be overriden in the config
+	minBrlen = DEF_MIN_BRLEN;
+	maxBrlen = DEF_MAX_BRLEN;
+	startingBrlen = DEF_STARTING_BRLEN;
+	}
+
+int GeneralGamlConfig::Read(const char* fname, bool isMaster /*=false*/)	{
+
+	ConfigReader cr;	
+	if (cr.Load(fname) != 0)	{
+		printf("ERROR: GamlConfig::General::Read(%s) failed.\n", fname);
+		return -1;
+	}
+	
+	cr.MakeAllSection();
+
+	int errors = 0;
+	errors += cr.SetSection("general");
+	if(errors < 0) throw ErrorException("Didn't find [general] section in config file\n     (this section heading is required)");
+	errors += cr.GetUnsignedOption("logevery", logevery);
+	errors += cr.GetUnsignedOption("saveevery", saveevery);
+	int found=cr.GetPositiveNonZeroDoubleOption("megsclamemory", megsClaMemory, true);
+	found += cr.GetPositiveNonZeroDoubleOption("availablememory", availableMemory, true);
+	if(found == -2) throw ErrorException("Either \"megsclamemory\" or \"availablememory\" must be specified in conf!");
+	
+	errors += cr.GetStringOption("datafname", datafname);
+	errors += cr.GetStringOption("ofprefix", ofprefix);
+	errors += cr.GetStringOption("streefname", streefname);
+	cr.GetStringOption("constraintfile", constraintfile, true);
+	errors += cr.GetIntNonZeroOption("randseed", randseed);
+	cr.GetIntNonZeroOption("bootstrapseed", bootstrapSeed, true);
+	errors += cr.GetBoolOption("refinestart", refineStart);
+	cr.GetBoolOption("refineend", refineEnd, true);
+	errors += cr.GetBoolOption("outputeachbettertopology", outputTreelog);
+	errors += cr.GetBoolOption("enforcetermconditions", enforceTermConditions);
+	errors += cr.GetUnsignedNonZeroOption("genthreshfortopoterm", lastTopoImproveThresh);
+	errors += cr.GetPositiveNonZeroDoubleOption("scorethreshforterm", improveOverStoredIntervalsThresh);
+	cr.GetPositiveNonZeroDoubleOption("significanttopochange", significantTopoChange, true);
+	cr.GetUnsignedNonZeroOption("attachmentspertaxon", attachmentsPerTaxon, true);
+	cr.GetUnsignedOption("outputsitelikelihoods", outputSitelikelihoods, true);
+	cr.GetBoolOption("reportrunprogress", reportRunProgress, true);
+	cr.GetBoolOption("optimizeinputonly", optimizeInputOnly, true);
+
+	cr.GetBoolOption("ignorestopcodons", ignoreStopCodons, true);
+
+	cr.GetBoolOption("outputmostlyuselessfiles", outputMostlyUselessFiles, true);
+	cr.GetBoolOption("outputphyliptree", outputPhylipTree, true);
+	cr.GetBoolOption("collapsebranches", collapseBranches, true);
+	cr.GetIntOption("genthreshforswapterm", swapTermThreshold, true);
+
+	cr.GetStringOption("arbitrarystring", arbitraryString, true);
+	cr.GetUnsignedOption("windowlength", siteWindowLength, true);
+	cr.GetUnsignedOption("windowstride", siteWindowStride, true);
+	cr.GetBoolOption("usepatternmanager", usePatternManager, true);
+	cr.GetStringOption("parametervaluestring", parameterValueString, true);
+	cr.GetBoolOption("combineadjacentidenticalgappatterns", combineAdjacentIdenticalGapPatterns, true);
+
+	cr.GetBoolOption("rootatbranchmidpoint", rootAtBranchMidpoint, true);
+	cr.GetBoolOption("useoptboundedforblen", useOptBoundedForBlen, true);
+
+	//changed the wording of this from besttree to besttopology, to match outputeachbettertopology
+	//still allow besttree, since that is what I told Maddison, and I think has already been incorporated
+	//into Mesquite
+	int ret = cr.GetBoolOption("outputcurrentbesttopology", outputCurrentBestTopology, true);
+	if(ret < 0)
+		cr.GetBoolOption("outputcurrentbesttree", outputCurrentBestTopology, true);
+
+	cr.GetBoolOption("restart", restart, true);
+	cr.GetBoolOption("writecheckpoints", checkpoint, true);
+
+	cr.GetUnsignedNonZeroOption("searchreps", searchReps, true);
+	cr.GetUnsignedOption("runmode", runmode, true);
+	cr.GetBoolOption("scoreonly", scoreOnly, true);
+
+	//These three used to be in the [master] section, for no apparent reason. Now allowed in [general] 
+	//as well.  If in both, will be overridden by master
+	cr.GetUnsignedOption("bootstrapreps", bootstrapReps, true);
+	cr.GetPositiveNonZeroDoubleOption("resampleproportion", resampleProportion, true);
+	cr.GetBoolOption("inferinternalstateprobs", inferInternalStateProbs, true);
+
+	cr.GetBoolOption("workphasedivision", workPhaseDivision, true);
+
+	bool multipleModelsFound = ReadPossibleModelPartition(cr);
+
+	if(!multipleModelsFound){//if we didn't find multiple models in separate model sections, look for them in 
+		ConfigModelSettings configModSet;
+		int settingsFound = 0;
+		settingsFound += cr.GetStringOption("ratehetmodel", configModSet.rateHetModel, true);
+		settingsFound += cr.GetUnsignedOption("numratecats", configModSet.numRateCats, true);	
+		settingsFound += cr.GetStringOption("statefrequencies", configModSet.stateFrequencies, true);
+		settingsFound += cr.GetStringOption("ratematrix", configModSet.rateMatrix, true);
+		settingsFound += cr.GetStringOption("invariantsites", configModSet.proportionInvariant, true);
+		settingsFound += cr.GetStringOption("datatype", configModSet.datatype, true);
+		settingsFound += cr.GetStringOption("geneticcode", configModSet.geneticCode, true);
+		if(settingsFound == -7)
+			throw ErrorException("No model descriptions found in config file.  Proper setup is either:\n\t1. Model settings found somewhere under [general] heading,\n\t   applying to all data subsets\n\t2. Separate model settings for each partition subset\n\t   found under different headings [model1], [model2]. etc");
+		configModelSets.push_back(configModSet);
+		}
+
+	cr.GetBoolOption("linkmodels", linkModels, true);
+	cr.GetBoolOption("subsetspecificrates", subsetSpecificRates, true);
+
+	cr.GetStringOption("outgroup", outgroupString, true);
+
+	if(isMaster){
+		errors += cr.SetSection("master");
+		if(errors < 0) throw ErrorException("Didn't find [master] section in config file\n     (this section heading is required)");
+		}
+	else{
+		errors += cr.SetSection("remote");
+		if(errors < 0) throw ErrorException("Didn't find [remote] section in config file\n     (this section heading is required)");
+		}
+	
+	errors += cr.GetUnsignedNonZeroOption("nindivs", nindivs);
+	errors += cr.GetUnsignedOption("holdover", holdover);
+	errors += cr.GetPositiveNonZeroDoubleOption("selectionintensity", selectionIntensity);
+	errors += cr.GetDoubleOption("holdoverpenalty", holdoverPenalty);
+	errors += cr.GetUnsignedNonZeroOption("stopgen", stopgen);
+	errors += cr.GetUnsignedNonZeroOption("stoptime", stoptime);
+	errors += cr.GetPositiveNonZeroDoubleOption("startoptprec", startOptPrec);
+	errors += cr.GetPositiveNonZeroDoubleOption("minoptprec", minOptPrec);
+	//changing this to specify either the number of reductions in the precision or the 
+	//multiplier as before.  Prefer the number, since it should be easier to specify.  
+	//
+	found=0;
+	found=cr.GetIntOption("numberofprecreductions", numPrecReductions, true);
+	found += cr.GetPositiveNonZeroDoubleOption("precreductionfactor", precReductionFactor, true);
+	if(found == -2) throw ErrorException("Error: either \"numberofprecreductions\" (preferably) or \"precreductionfactor\" must be specified in conf!");
+	
+	errors += cr.GetPositiveDoubleOption("topoweight", topoWeight);
+	errors += cr.GetPositiveDoubleOption("modweight", modWeight);	
+	errors += cr.GetPositiveDoubleOption("brlenweight", brlenWeight);	
+	errors += cr.GetPositiveDoubleOption("randnniweight", randNNIweight);
+	errors += cr.GetPositiveDoubleOption("randsprweight", randSPRweight);	
+	errors += cr.GetPositiveDoubleOption("limsprweight", limSPRweight);
+	
+	cr.GetPositiveNonZeroDoubleOption("uniqueswapbias", uniqueSwapBias, true);
+	cr.GetPositiveNonZeroDoubleOption("distanceswapbias", distanceSwapBias, true);
+
+	cr.GetDoubleOption("treerejectionthreshold", treeRejectionThreshold, true);
+
+	cr.GetUnsignedOption("bootstrapreps", bootstrapReps, true);
+	cr.GetPositiveNonZeroDoubleOption("resampleproportion", resampleProportion, true);
+	cr.GetBoolOption("inferinternalstateprobs", inferInternalStateProbs, true);
+#ifdef MPI_VERSION
+	if(bootstrapReps != 0) throw ErrorException("Sorry, Bootstrap not yet implemented in parallel GARLI!");
+#endif
+
+#ifdef MPI_VERSION
+	if(isMaster==false) errors += cr.GetDoubleOption("sendinterval", sendInterval);
+#endif
+	
+
+#ifdef GANESH
+	errors += cr.GetDoubleOption("randpecrweight", randPECRweight);
+#endif
+//	errors += cr.GetUnsignedOption("gammashapebrlen", gammaShapeBrlen);	
+//	errors += cr.GetUnsignedOption("gammashapemodel", gammaShapeModel);
+	errors += cr.GetPositiveNonZeroDoubleOption("gammashapebrlen", gammaShapeBrlen);	
+	errors += cr.GetPositiveNonZeroDoubleOption("gammashapemodel", gammaShapeModel);
+
+
+	errors += cr.GetUnsignedNonZeroOption("limsprrange", limSPRrange);
+	errors += cr.GetUnsignedNonZeroOption("intervallength", intervalLength);
+	errors += cr.GetUnsignedNonZeroOption("intervalstostore", intervalsToStore);
+	errors += cr.GetPositiveNonZeroDoubleOption("meanbrlenmuts", meanBrlenMuts);
+
+	cr.GetPositiveNonZeroDoubleOption("minbrlen", minBrlen, true);
+	cr.GetPositiveNonZeroDoubleOption("maxbrlen", maxBrlen, true);
+	cr.GetPositiveNonZeroDoubleOption("startingbrlen", startingBrlen, true);
+
+#ifdef INCLUDE_PERTURBATION
+	errors += cr.SetSection("perturbation");
+
+	errors += cr.GetIntOption("perttype", pertType);
+	errors += cr.GetDoubleOption("pertthresh", pertThresh);
+	errors += cr.GetIntOption("minpertinterval", minPertInterval);
+	errors += cr.GetIntOption("maxpertsnoimprove", maxPertsNoImprove);
+	errors += cr.GetBoolOption("restartafterabandon", restartAfterAbandon);
+	errors += cr.GetIntOption("gensbeforerestart", gensBeforeRestart);
+	
+	errors += cr.GetDoubleOption("ratchetproportion", ratchetProportion);
+	errors += cr.GetDoubleOption("ratchetoffthresh", ratchetOffThresh);
+	errors += cr.GetIntOption("ratchetmaxgen", ratchetMaxGen);
+	
+	errors += cr.GetIntOption("nnitargetaccepts", nniTargetAccepts);
+	errors += cr.GetIntOption("nnimaxattempts", nniMaxAttempts);
+	
+	errors += cr.GetIntOption("numsprcycles", numSprCycles);
+	errors += cr.GetIntOption("sprpertrange", sprPertRange);
+#endif
+	return errors;
+}
+
+bool GeneralGamlConfig::ReadPossibleModelPartition(ConfigReader &cr){
+	string origSection = cr.GetCurrentSection();
+	bool foundAnyModels = false;
+	for(int modelNum = 0; ;modelNum++){
+		char modName[10];
+		sprintf(modName, "model%d", modelNum);
+		int found = cr.SetSection(modName);
+		//models need to appear consecuatively, but can start at 0 (old) or 1 (new)
+		if(modelNum == 0 && found < 0){
+			continue;
+			}
+		else if(found < 0){
+			cr.SetSection(origSection.c_str());
+			return foundAnyModels;
+			}
+		else{
+			foundAnyModels = true;
+			ConfigModelSettings configModSet;
+			cr.GetStringOption("ratehetmodel", configModSet.rateHetModel, true);
+			cr.GetUnsignedOption("numratecats", configModSet.numRateCats, true);	
+			cr.GetStringOption("statefrequencies", configModSet.stateFrequencies, true);
+			cr.GetStringOption("ratematrix", configModSet.rateMatrix, true);
+			cr.GetStringOption("invariantsites", configModSet.proportionInvariant, true);
+			cr.GetStringOption("datatype", configModSet.datatype, true);
+			cr.GetStringOption("geneticcode", configModSet.geneticCode, true);
+			configModelSets.push_back(configModSet);
+			}
+		}
+	//we shouldn't be getting to here
+	return false;
+	}
+
+int GeneralGamlConfig::Serialize(char** buf_, int* size_) const	{
+	int& size = *size_;
+	char*& buf = *buf_;
+	
+	// calculate the size first
+	size = 0;
+	size += sizeof(logevery);
+	size += sizeof(saveevery);
+	size += sizeof(megsClaMemory);
+	
+	size += (int)datafname.length() + 1;
+	size += (int)ofprefix.length() + 1;
+	size += (int)streefname.length() + 1;
+	
+	// allocate the buffer
+	buf = new char[size];
+	
+	// populate the buffer
+	char* p = buf;
+	
+	for(int i=0;i<size;i++){
+		p[i]=0;
+		}
+	
+	memcpy(p, &logevery, sizeof(logevery));
+	p += sizeof(logevery);
+	
+	memcpy(p, &saveevery, sizeof(saveevery));
+	p += sizeof(saveevery);
+	
+	memcpy(p, &megsClaMemory, sizeof(megsClaMemory));
+	p += sizeof(megsClaMemory);
+	
+	memcpy(p, datafname.c_str(), datafname.length()+1);
+	p += datafname.length()+1;
+	
+	memcpy(p, ofprefix.c_str(), ofprefix.length()+1);
+	p += ofprefix.length()+1;
+
+	memcpy(p, streefname.c_str(), streefname.length()+1);
+	p += streefname.length()+1;
+	
+	// sanity checks
+	assert(p-buf == size);
+	
+	return size;
+}
+
+int GeneralGamlConfig::Deserialize(char* buf, int size)	{
+
+	char* p = buf;
+	
+	memcpy(&logevery, p, sizeof(logevery));
+	p += sizeof(logevery);
+	
+	memcpy(&saveevery, p, sizeof(saveevery));
+	p += sizeof(saveevery);
+	
+	memcpy(&megsClaMemory, p, sizeof(megsClaMemory));
+	p += sizeof(megsClaMemory);	
+
+	datafname = p;
+	p += strlen(p)+1;
+	
+	ofprefix = p;
+	p += strlen(p)+1;
+	
+	streefname = p;
+	p += strlen(p)+1;
+	
+	// sanity checks
+	assert(buf+size == p);
+	
+	return 0;
+}
+
+bool GeneralGamlConfig::operator==(const GeneralGamlConfig& rhs) const	{
+	if (	logevery != rhs.logevery			||
+			saveevery != rhs.saveevery			||
+			datafname != rhs.datafname			||
+			ofprefix != rhs.ofprefix	)
+		return false;
+	return true;
+}
+
+MasterGamlConfig::MasterGamlConfig() : GeneralGamlConfig() {
+	
+	
+	}
+
+int MasterGamlConfig::Read(const char* fname, bool isMaster){
+	ConfigReader cr;	
+	if (cr.Load(fname) != 0)	{
+		printf("ERROR: GamlConfig::General::Read(%s) failed.\n", fname);
+		return -1;
+	}
+
+	int errors = 0;
+
+	errors += GeneralGamlConfig::Read(fname, true);
+
+#ifdef MPI_VERSION
+	
+	errors += cr.SetSection("master");
+
+	errors += cr.GetDoubleOption("startupdatethresh", startUpdateThresh);
+	errors += cr.GetDoubleOption("minupdatethresh", minUpdateThresh);
+//	errors += cr.GetDoubleOption("updatereductionfactor", updateReductionFactor);
+				
+//	errors += cr.GetIntOption("parallelinterval", subtreeInterval);
+#ifdef SUBTREE_VERSION
+	errors += cr.GetDoubleOption("subtreestartthresh", subtreeStartThresh);
+	errors += cr.GetIntOption("minsubtreesize", minSubtreeSize);
+	errors += cr.GetIntOption("targetsubtreesize", targetSubtreeSize);
+	errors += cr.GetDoubleOption("orphanfactor", orphanFactor);
+#else 
+	subtreeStartThresh = 0.0;
+	minSubtreeSize = -1;
+	targetSubtreeSize = -1;
+	orphanFactor = -1.0;
+#endif
+
+	errors += cr.GetIntOption("maxrecomindivs", maxRecomIndivs);
+#endif
+	return errors;
+	}
+
+/*
+int GamlConfig::Master::Read(const char* fname)	{
+
+	ConfigReader cr;	
+	if (cr.Load(fname) != 0)	{
+		printf("ERROR: GamlConfig::Master::Read(%s) failed.\n", fname);
+		return -1;
+	}
+	
+	int errors = 0;
+	errors += cr.SetSection("master");
+//	errors += cr.GetIntOption("crunchgens", crunchgens);
+	errors += cr.GetIntOption("gammashape", gammashape);
+	errors += cr.GetIntOption("holdover", holdover);
+	errors += cr.GetIntRangeOption("nindivs", min_nindivs, max_nindivs);
+//	errors += cr.GetIntOption("memory", memory);
+//	errors += cr.GetIntOption("interval", interval);
+//	errors += cr.GetIntOption("recvcount", recvcount);
+	errors += cr.GetIntOption("stopgen", stopgen);
+	errors += cr.GetDoubleRangeOption("meanbrlenmuts", min_brlen_muts, max_brlen_muts);
+	
+	errors += cr.GetDoubleOption("initialupdatethresh", initialUpdateThresh);
+	errors += cr.GetDoubleOption("nonsubtreeupdatethresh", nonsubtreeUpdateThresh);
+				
+	errors += cr.GetIntOption("subtreeinterval", subtreeInterval);
+	errors += cr.GetDoubleOption("subtreestartthresh", subtreeStartThresh);
+	errors += cr.GetDoubleOption("subtreerecalcthresh", subtreeRecalcThresh);
+	errors += cr.GetDoubleOption("subtreeupdatethresh", subtreeUpdateThresh);
+	
+	errors += cr.GetIntOption("perttype", pertType);
+	errors += cr.GetDoubleOption("pertthresh", pertThresh);
+	errors += cr.GetDoubleOption("pertamount", pertAmount);
+	
+	errors += cr.GetDoubleOption("selectionintensity", selectionIntensity);
+
+	errors += cr.GetDoubleOption("startoptprec", startOptPrec);
+	errors += cr.GetDoubleOption("minoptprec", minOptPrec);
+	errors += cr.GetDoubleOption("topoweight", topoWeight);
+	errors += cr.GetDoubleOption("modweight", modWeight);	
+	errors += cr.GetDoubleOption("brlenweight", brlenWeight);	
+	
+	errors += cr.GetDoubleOption("randnniweight", randNNIweight);
+	errors += cr.GetDoubleOption("randsprweight", randSPRweight);	
+	errors += cr.GetDoubleOption("limsprweight", limSPRweight);
+#ifdef GANESH
+	errors += cr.GetDoubleOption("randpecrweight", randPECRweight);
+#endif
+	
+	errors += cr.GetIntOption("limsprrange", limSPRrange);
+	errors += cr.GetIntOption("intervallength", intervalLength);
+	errors += cr.GetIntOption("intervalstostore", intervalsToStore);
+
+	
+		
+	return -errors;
+}
+
+int GamlConfig::Master::Serialize(char** buf_, int* size_) const	{
+	int& size = *size_;
+	char*& buf = *buf_;
+	
+	// calculate the size first
+	size = sizeof(*this);
+	
+	// allocate the buffer
+	buf = new char[size];
+	
+	// populate the buffer
+	char* p = buf;
+	
+	memcpy(p, this, sizeof(*this));
+	p += sizeof(*this);
+	
+	// sanity checks
+	assert(p-buf == size);
+	
+	return size;
+}
+
+int GamlConfig::Master::Deserialize(char* buf, int size)	{
+
+	char* p = buf;
+	
+	memcpy(this, p, sizeof(*this));
+	p += sizeof(*this);
+	
+	// sanity checks
+	assert(buf+size == p);
+	
+	return 0;
+}
+
+bool GamlConfig::Master::operator==(const GamlConfig::Master& rhs) const	{
+	if (memcmp(this, &rhs, sizeof(*this)) == 0)
+		return true;
+	return false;
+}
+
+/////////////////////////////////////////////////////////////////////////
+// GamlConfig::Remote methods ///////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////
+
+GamlConfig::Remote::Remote()	{
+	memset(this, 0, sizeof(*this));
+}
+
+int GamlConfig::Remote::Read(const char* fname)	{
+
+	ConfigReader cr;	
+	if (cr.Load(fname) != 0)	{
+		printf("ERROR: GamlConfig::Remote::Read(%s) failed.\n", fname);
+		return -1;
+	}
+	
+	int errors = 0;
+	errors += cr.SetSection("remote");
+	errors += cr.GetIntOption("gammashape", gammashape);
+	errors += cr.GetIntOption("holdover", holdover);
+	errors += cr.GetIntRangeOption("nindivs", min_nindivs, max_nindivs);
+	errors += cr.GetIntOption("interval", interval);
+	errors += cr.GetIntOption("stopgen", stopgen);
+	errors += cr.GetDoubleRangeOption("meanbrlenmuts", min_brlen_muts, max_brlen_muts);
+	errors += cr.GetDoubleOption("selectionintensity", selectionIntensity);
+	errors += cr.GetDoubleOption("startoptprec", startOptPrec);
+	errors += cr.GetDoubleOption("minoptprec", minOptPrec);
+	errors += cr.GetDoubleOption("topoweight", topoWeight);
+	errors += cr.GetDoubleOption("modweight", modWeight);	
+	errors += cr.GetDoubleOption("brlenweight", brlenWeight);	
+	
+	errors += cr.GetDoubleOption("randnniweight", randNNIweight);
+	errors += cr.GetDoubleOption("randsprweight", randSPRweight);	
+	errors += cr.GetDoubleOption("limsprweight", limSPRweight);
+#ifdef GANESH
+	errors += cr.GetDoubleOption("randpecrweight", randPECRweight);
+#endif
+	
+	errors += cr.GetIntOption("limsprrange", limSPRrange);
+	errors += cr.GetIntOption("intervallength", intervalLength);
+	errors += cr.GetIntOption("intervalstostore", intervalsToStore);
+
+	return -errors;
+}
+
+int GamlConfig::Remote::Serialize(char** buf_, int* size_) const	{
+	int& size = *size_;
+	char*& buf = *buf_;
+	
+	// calculate the size first
+	size = sizeof(*this);
+	
+	// allocate the buffer
+	buf = new char[size];
+	
+	// populate the buffer
+	char* p = buf;
+	
+	memcpy(p, this, sizeof(*this));
+	p += sizeof(*this);
+	
+	// sanity checks
+	assert(p-buf == size);
+	
+	return size;
+}
+
+int GamlConfig::Remote::Deserialize(char* buf, int size)	{
+
+	char* p = buf;
+	
+	memcpy(this, p, sizeof(*this));
+	p += sizeof(*this);
+	
+	// sanity checks
+	assert(buf+size == p);
+	
+	return 0;
+}
+
+bool GamlConfig::Remote::operator==(const GamlConfig::Remote& rhs) const	{
+	if (memcmp(this, &rhs, sizeof(*this)) == 0)
+		return true;
+	return false;
+}
+
+/////////////////////////////////////////////////////////////////////////
+// GamlConfig methods ///////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////
+
+GamlConfig::GamlConfig()	{
+}
+
+int GamlConfig::Read(const char* fname)	{
+	int gerrors, merrors, rerrors;
+	
+	gerrors = -gc.Read(fname);
+	if (gerrors > 0)	{
+		printf("ERROR: GamlConfig::Read(): reading [general] produced %d errors.\n", gerrors);
+	}
+	
+	merrors = -mc.Read(fname);
+	if (merrors > 0)	{
+		printf("ERROR: GamlConfig::Read(): reading [master] produced %d errors.\n", merrors);
+	}
+	
+	rerrors = -rc.Read(fname);
+	if (rerrors > 0)	{
+		printf("ERROR: GamlConfig::Read(): reading [remote] produced %d errors.\n", rerrors);
+	}
+	
+	if (gerrors || merrors || rerrors)
+		return -1;
+		
+	return 0;
+}
+
+int GamlConfig::Serialize(char** buf_, int* size_) const{
+	//there's no need to serialize and send the master conf info	
+	
+	int& size = *size_;
+	char*& buf = *buf_;
+	
+	int gsize, msize, rsize;
+	char *gbuf, *mbuf, *rbuf;
+	
+	gc.Serialize(&gbuf, &gsize);
+//	mc.Serialize(&mbuf, &msize);
+	rc.Serialize(&rbuf, &rsize);
+	
+	size = gsize + rsize + sizeof(int)*2;
+//	size = gsize + msize + rsize + sizeof(int)*3;
+	
+	char* p = buf = new char[size];
+	
+	// put in the sizes
+	
+	memcpy(p, &gsize, sizeof(gsize));
+	p += sizeof(gsize);
+	
+//	memcpy(p, &msize, sizeof(msize));
+//	p += sizeof(msize);
+	
+	memcpy(p, &rsize, sizeof(rsize));
+	p += sizeof(rsize);
+	
+	// put in the data
+
+	memcpy(p, gbuf, gsize);
+	p += gsize;
+
+
+//	memcpy(p, mbuf, msize);
+//	p += msize;
+	
+	memcpy(p, rbuf, rsize);
+	p += rsize;
+	
+	delete [] gbuf;
+//	delete [] mbuf;
+	delete [] rbuf;
+	
+	return size;
+}
+
+int GamlConfig::Deserialize(char* buf, int size)	{
+	int gsize, msize, rsize;
+	
+	char* p = buf;
+	
+	memcpy(&gsize, p, sizeof(gsize));
+	p += sizeof(gsize);
+*/
+/*	
+	memcpy(&msize, p, sizeof(msize));
+	p += sizeof(msize);
+*/	
+/*	memcpy(&rsize, p, sizeof(rsize));
+	p += sizeof(rsize);
+	
+	gc.Deserialize(p, gsize);
+	p += gsize;
+	rc.Deserialize(p, rsize);
+	p += rsize;
+	
+	// sanity checks
+	assert(p-buf == size);
+	
+	return 0;
+}
+
+bool GamlConfig::operator==(const GamlConfig& rhs) const	{
+	if (	gc == rhs.gc	&&
+			mc == rhs.mc	&&
+			rc == rhs.rc
+		)
+		return true;
+	return false;
+}
+*/
+
diff --git a/src/configoptions.h b/src/configoptions.h
new file mode 100644
index 0000000..d636e38
--- /dev/null
+++ b/src/configoptions.h
@@ -0,0 +1,241 @@
+// GARLI version 2.1 source code
+// Copyright 2005-2014 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+#ifndef CONFIGOPTIONS_H
+#define CONFIGOPTIONS_H
+
+#include <string>
+
+using std::string;
+using std::vector;
+
+class ConfigReader;
+
+class ConfigModelSettings{
+	public:
+	//model settings
+	string datatype;
+	string geneticCode;
+	string stateFrequencies; //equal, estimate, emprical, fixed
+	string rateMatrix;		 //6rate, 2rate, 1rate, fixed, custom(
+	string proportionInvariant; //none, fixed, estimate
+	string rateHetModel;			//gamma, gammafixed, flex, none
+	unsigned numRateCats;
+	ConfigModelSettings(){
+		stateFrequencies = "estimate";
+		rateMatrix = "6rate";
+		proportionInvariant = "estimate";
+		rateHetModel = "gamma";
+		numRateCats = 4;
+		datatype = "dna";
+		geneticCode = "standard";		
+		}
+	};
+
+class GeneralGamlConfig{
+	public:
+	//these options will be the same regardless of whether a population is master or remote
+
+	//output related
+	string ofprefix;
+	unsigned logevery;
+	unsigned saveevery;
+	bool outputTreelog;
+	bool outputMostlyUselessFiles;
+	bool outputPhylipTree;
+	bool outputCurrentBestTopology;
+
+	bool collapseBranches;
+	//this is just a string that I can use for whatever I want in special runmodes
+	string arbitraryString;
+	unsigned int siteWindowLength;
+	unsigned int siteWindowStride;
+	bool combineAdjacentIdenticalGapPatterns;
+
+	bool usePatternManager;
+	bool rootAtBranchMidpoint;
+	bool useOptBoundedForBlen;
+	string parameterValueString;
+	bool optimizeInputOnly;
+
+	//starting the run
+	int randseed;
+	int bootstrapSeed;
+	string streefname;
+	bool refineStart;
+	bool refineEnd;
+
+	//general run details
+	string datafname;
+	string constraintfile;
+	FLOAT_TYPE megsClaMemory;
+	FLOAT_TYPE availableMemory;
+	bool restart;
+	bool checkpoint;
+	FLOAT_TYPE significantTopoChange;
+	string outgroupString;
+	unsigned searchReps;
+	unsigned runmode;
+	unsigned outputSitelikelihoods;
+	bool reportRunProgress;
+	bool scoreOnly;
+
+	bool ignoreStopCodons;
+
+	//finishing the run
+	bool enforceTermConditions;
+	unsigned lastTopoImproveThresh;
+	FLOAT_TYPE improveOverStoredIntervalsThresh;
+	unsigned stopgen;
+	unsigned stoptime;
+	int swapTermThreshold;
+
+	unsigned attachmentsPerTaxon;
+
+	bool workPhaseDivision;
+
+	//this holds descriptions of models, possible > 1 in the case of partitioning
+
+/*
+	//model settings
+	string datatype;
+	string geneticCode;
+	string stateFrequencies; //equal, estimate, emprical, fixed
+	string rateMatrix;		 //6rate, 2rate, 1rate, fixed, custom(
+	string proportionInvariant; //none, fixed, estimate
+	string rateHetModel;			//gamma, gammafixed, flex, none
+	unsigned numRateCats;	
+*/
+
+	vector<ConfigModelSettings> configModelSets;
+	bool linkModels;//full linkage for partitioned models / no linkage
+	bool subsetSpecificRates;//whether models are linked or not, separate rate multiplier for each subset
+
+	//all of the following options can vary between master and remote
+	//general population stuff
+	unsigned nindivs;
+	unsigned holdover;
+	FLOAT_TYPE selectionIntensity;
+	FLOAT_TYPE holdoverPenalty;
+
+	FLOAT_TYPE startOptPrec;
+	FLOAT_TYPE minOptPrec;
+	int numPrecReductions;
+	FLOAT_TYPE precReductionFactor; //deprecated
+	FLOAT_TYPE treeRejectionThreshold;
+
+	//parameters affecting proportion of mutations
+	FLOAT_TYPE topoWeight;
+		FLOAT_TYPE randNNIweight;
+		FLOAT_TYPE randSPRweight;
+		FLOAT_TYPE limSPRweight;
+//      FLOAT_TYPE randPECRweight;
+	FLOAT_TYPE modWeight;
+	FLOAT_TYPE brlenWeight;
+
+	unsigned intervalLength;
+	unsigned intervalsToStore;
+
+	//parameters affecting other details of mutations				
+	FLOAT_TYPE meanBrlenMuts;
+	FLOAT_TYPE gammaShapeBrlen;
+	FLOAT_TYPE gammaShapeModel;
+	unsigned limSPRrange;		
+	FLOAT_TYPE uniqueSwapBias;
+	FLOAT_TYPE distanceSwapBias;
+	
+	//optional analyses
+	unsigned bootstrapReps;
+	FLOAT_TYPE resampleProportion;
+	bool inferInternalStateProbs;
+
+#ifdef INCLUDE_PERTURBATION
+	//perturbation parameters
+	int pertType;			
+	FLOAT_TYPE pertThresh;
+	int minPertInterval;
+	int maxPertsNoImprove;
+	bool restartAfterAbandon;
+	int gensBeforeRestart;
+	
+	FLOAT_TYPE ratchetProportion;
+	FLOAT_TYPE ratchetOffThresh;
+	int ratchetMaxGen;
+	
+	int nniTargetAccepts;
+	int nniMaxAttempts;
+	
+	int numSprCycles;
+	int sprPertRange;
+#endif
+
+	//the number of seconds between remote tree sends (parallel only)
+	FLOAT_TYPE sendInterval;
+	
+	//by default these come from the defs.h file, but could be overriden
+	FLOAT_TYPE minBrlen;
+	FLOAT_TYPE maxBrlen;
+	FLOAT_TYPE startingBrlen;
+
+ 	// methods
+	GeneralGamlConfig();
+	int Read(const char*, bool isMaster=false);
+	bool ReadPossibleModelPartition(ConfigReader &cr);
+	int Serialize(char**, int*) const;
+	int Deserialize(char*, int);
+	bool operator==(const GeneralGamlConfig&) const;
+	};
+		
+class MasterGamlConfig: public GeneralGamlConfig{
+	public:
+	//parallel behavior parameters-stored in pop->paraMan on master only
+	FLOAT_TYPE startUpdateThresh;
+	FLOAT_TYPE minUpdateThresh;
+	FLOAT_TYPE updateReductionFactor;
+		
+	int subtreeInterval;
+	FLOAT_TYPE subtreeStartThresh;
+	int minSubtreeSize;
+	int targetSubtreeSize;
+	FLOAT_TYPE orphanFactor;
+	
+	int maxRecomIndivs;
+/*	
+	int pertType;			
+	FLOAT_TYPE pertThresh;
+	FLOAT_TYPE pertAmount;
+	int maxPertsNoImprove;
+	
+	FLOAT_TYPE ratchetProportion;
+	FLOAT_TYPE ratchetOffThresh;
+	int ratchetMaxGen;
+	
+	FLOAT_TYPE nniAcceptThresh;
+	int numSprCycles;
+	int sprPertRange;
+*/
+	int bootstrapReps;
+	FLOAT_TYPE bootTermThresh;
+
+ 	// methods
+	MasterGamlConfig();
+	int Read(const char*, bool isMaster=false);
+	};
+
+#endif
+
diff --git a/src/configreader.cpp b/src/configreader.cpp
new file mode 100644
index 0000000..e38c3fe
--- /dev/null
+++ b/src/configreader.cpp
@@ -0,0 +1,640 @@
+// GARLI version 2.0 source code
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#include <stdio.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <iostream>
+#include <limits.h>
+#include <math.h>
+
+using namespace std;
+
+#include "defs.h"
+#include "configreader.h"
+#include "errorexception.h"
+#include "funcs.h"
+
+int ConfigReader::UNKNOWN=0;
+int ConfigReader::SECTION=1;
+int ConfigReader::OPTION=2; 
+
+ConfigReader::ConfigReader()	{
+
+}
+
+ConfigReader::ConfigReader(const char* filename)	{
+	Load(filename);
+}
+
+ConfigReader::~ConfigReader()	{
+
+}
+
+int ConfigReader::Load(const char* filename)	{
+	FILE* file;
+
+	// clear all currently loaded sections
+	sections.clear();
+
+#ifndef BOINC
+	file = fopen(filename, "r");
+#else
+	char input_path[512];
+    boinc_resolve_filename(filename, input_path, sizeof(input_path));
+    file = boinc_fopen(input_path, "r");
+#endif
+
+	if (file == NULL) throw ErrorException("could not open file \"%s\".", filename);
+
+	int type;
+	string sectionName, name, val;
+	Options options;
+	bool first = true;
+
+	while (!feof(file))	{
+
+		type = ReadSectionOrOption(file, name, val);
+
+		if (type == SECTION)	{
+			if (!first)	{
+				sections.insert(pair<string, Options>(sectionName, options));
+				options.clear();
+			}
+			else
+				first = false;
+			sectionName = name;
+		}
+		else if (type == OPTION)	{
+			options.insert(pair<string, string>(name, val));
+		}
+
+	}
+
+	// insert the last section
+	sections.insert(pair<string, Options>(sectionName, options));
+
+	fclose(file);
+
+	return 0;
+}
+
+/*****************************************************************************************
+** Save() **
+*****************************************************************************************/
+int ConfigReader::Save(const char* filename)	{
+	FILE* file = fopen(filename, "w");
+
+	if (file == NULL)	{
+		printf("Error opening file \"%s\" for writing.\n", filename);
+		return -1;
+	}
+
+	map<string, Options>::iterator sit = sections.begin();
+	map<string, string>::iterator oit;
+
+	while (sit != sections.end())	{
+
+		// write the section
+		fprintf(file, "[%s]\n", sit->first.c_str());
+
+		// write the options
+		oit = sit->second.begin();
+		while (oit != sit->second.end())	{
+			fprintf(file, "%s = %s\n", oit->first.c_str(), oit->second.c_str());
+			++oit;
+		}
+
+		fprintf(file, "\n");
+		++sit;
+
+	}
+
+	fclose(file);
+
+	return 0;
+}
+
+/****************************************************************************************/
+/*** AddSection() ***/
+/****************************************************************************************/
+int ConfigReader::AddSection(const char* _name)	{
+	int rv;
+	string name;
+	Sections::iterator it;
+
+	name = _name;
+	TrimWhiteSpace(name);
+	it = sections.find(name);
+	if (it == sections.end())
+		rv = 0;
+	else
+		rv = 1;
+	sections.insert(pair<string, Options>(name, Options()));
+	return rv;
+}
+
+/****************************************************************************************/
+/*** RemoveSection() ***/
+/****************************************************************************************/
+int ConfigReader::RemoveSection(const char* _name)	{
+	int rv;
+	string name;
+	Sections::iterator it;
+
+	name = _name;
+	TrimWhiteSpace(name);
+	it = sections.find(name);
+	if (it == sections.end())	// section doesn't exist, bomb out
+		rv = -1;
+	else	{
+		sections.erase(it);
+		rv = 0;
+	}
+	return rv;
+}
+
+/****************************************************************************************/
+/*** SetSection() ***/
+/****************************************************************************************/
+int ConfigReader::SetSection(const char* name)	{
+	cur_section = name;
+	TrimWhiteSpace(cur_section);
+	Sections::iterator sit = sections.find(cur_section);
+	if (sit == sections.end())
+		return -1;
+	return 0;
+}
+
+/****************************************************************************************/
+/*** GetSection() ***/
+/****************************************************************************************/
+const string ConfigReader::GetCurrentSection()	{
+	return cur_section;
+	}
+
+/****************************************************************************************/
+/*** SetOption() ***/
+/****************************************************************************************/
+int ConfigReader::SetOption(const char* _option, const char* _val)	{
+	int rv;
+	string option, val;
+	Sections::iterator sit;
+	Options::iterator oit;
+
+	sit = sections.find(cur_section);
+	if (sit == sections.end())	// section doesn't exist...bomb out
+		rv = -1;
+	else	{
+		option = _option;
+		val = _val;
+		TrimWhiteSpace(option);
+		TrimWhiteSpace(val);
+		oit = sit->second.find(option);
+		if (oit == sit->second.end())	{	// option doesn't exist, create it
+			rv = 0;
+		}
+		else	{	// option exists, overwrite
+			sit->second.erase(oit);
+			rv = 1;
+		}
+		sit->second.insert(pair<string, string>(option, val));
+	}
+
+	return rv;
+}
+
+/****************************************************************************************/
+/*** RemoveOption() ***/
+/****************************************************************************************/
+int ConfigReader::RemoveOption(const char* _option)	{
+	int rv;
+	string option;
+	Sections::iterator sit;
+	Options::iterator oit;
+
+	sit = sections.find(cur_section);
+	if (sit == sections.end())	// section doesn't exist, bomb out
+		rv = -2;
+	else	{
+		option = _option;
+		TrimWhiteSpace(option);
+		oit = sit->second.find(option);
+		if (oit == sit->second.end())	{	// option doesn't exist, bomb out
+			rv = -1;
+		}
+		else	{	// option exists, remove it
+			sit->second.erase(oit);
+			rv = 0;
+		}
+	}
+
+	return rv;
+}
+
+/****************************************************************************************/
+/*** GetStringOption() ***/
+/****************************************************************************************/
+int ConfigReader::GetStringOption(const char* _option, string& val, bool optional /*=false*/)	{
+	int rv;
+	string option;
+	Sections::iterator sit;
+	Options::iterator oit;
+
+	sit = sections.find(cur_section);
+	if (sit == sections.end())	// section doesn't exist, bomb out
+		rv = -2;
+			else	{
+				option = _option;
+				TrimWhiteSpace(option);
+				oit = sit->second.find(option);
+				if (oit == sit->second.end())	{	// option doesn't exist, bomb out
+					rv = -1;
+					if(!optional) throw ErrorException("could not find string configuration entry \"%s\"", option.c_str());
+				}
+				else	{	// option exists, get the value
+					val = oit->second;
+					rv = 0;
+				}
+			}
+
+	return rv;
+}
+
+/****************************************************************************************/
+/*** GetBoolOption() ***/
+/****************************************************************************************/
+int ConfigReader::GetBoolOption(const char* option, bool& val, bool optional /*=false*/)	{
+	int rv;
+	string str;
+	if (GetStringOption(option, str, optional) == 0)	{  // option exists
+		// lower case it
+		for (int i = 0; i < (int)str.length(); ++i)
+			str[i] = tolower(str[i]);
+ 
+		if (str == "true")
+			val = true;
+		else if (str == "false")
+			val = false;
+		else if(isdigit(str[0]) != 0){
+			if (atoi(str.c_str()) != 0)
+				val = true;
+			else val = false;
+			}
+		else 
+			throw ErrorException("expecting boolean (0 or 1) for entry \"%s\", found %s", option, str.c_str());
+
+		rv = 0;
+	}
+	else{
+		rv = -1;
+		if(!optional) throw ErrorException("could not find boolean configuration entry \"%s\"", option);
+		}
+		
+	return rv;
+}
+
+/****************************************************************************************/
+/*** GetIntOption() ***/
+/****************************************************************************************/
+int ConfigReader::GetIntOption(const char* option, int& val, bool optional /*=false*/)	{
+	int rv;
+	string str;
+	FLOAT_TYPE dummy;//read into a FLOAT_TYPE first to check bounds
+	if (GetStringOption(option, str, optional) == 0)	{  // option exists
+		dummy = (FLOAT_TYPE) atof(str.c_str());
+		if(dummy > (INT_MAX-1)) throw ErrorException("entry for option \"%s\" (%s) is greater than its max (%u)" , option, str.c_str(), (INT_MAX-1));
+		if(fabs(dummy - (int)dummy) > 0.0) throw ErrorException("entry for option \"%s\" (%s) is not an integer" , option, str.c_str());
+		val = (int) dummy;
+		rv = 0;
+	}
+	else{
+		rv = -1;
+		if(!optional) throw ErrorException("could not find integer configuration entry \"%s\"", option);
+		}
+
+	return rv;
+}
+
+/****************************************************************************************/
+/*** GetIntNonZeroOption() ***/
+/****************************************************************************************/
+int ConfigReader::GetIntNonZeroOption(const char* option, int& val, bool optional /*=false*/)	{
+	int rv;
+	string str;
+	FLOAT_TYPE dummy;//read into a FLOAT_TYPE first to check bounds
+	if (GetStringOption(option, str, optional) == 0)	{  // option exists
+		dummy = (FLOAT_TYPE) atof(str.c_str());
+		if(dummy > (INT_MAX-1)) throw ErrorException("entry for option \"%s\" (%s) is greater than its max (%u)" , option, str.c_str(), (INT_MAX-1));
+		if(FloatingPointEquals(dummy, ZERO_POINT_ZERO, 1e-8)) throw ErrorException("entry for option \"%s\" cannot be zero", option);
+		if(!(FloatingPointEquals(dummy, (int)dummy, 1e-8))) throw ErrorException("entry for option \"%s\" (%s) is not an integer" , option, str.c_str());
+		val = (int) dummy;
+		rv = 0;
+	}
+	else{
+		rv = -1;
+		if(!optional) throw ErrorException("could not find integer configuration entry \"%s\"", option);
+		}
+
+	return rv;
+}
+
+/****************************************************************************************/
+/*** GetUnsignedOption() ***/
+/****************************************************************************************/
+int ConfigReader::GetUnsignedOption(const char* option, unsigned& val, bool optional /*=false*/)	{
+	int rv;
+	string str;
+	FLOAT_TYPE dummy;//read into a FLOAT_TYPE first to check sign and bounds
+	if (GetStringOption(option, str, optional) == 0)	{  // option exists
+		dummy = (FLOAT_TYPE) atof(str.c_str());
+		if(dummy < 0.0) throw ErrorException("entry for option \"%s\" must be >=0", option);
+		if(dummy > (UINT_MAX-1)) throw ErrorException("entry for option \"%s\" (%s) is greater than its max (%u)" , option, str.c_str(), (UINT_MAX-1));
+		if(fabs(dummy - (unsigned)dummy) > 0.0) throw ErrorException("entry for option \"%s\" (%s) is not an integer" , option, str.c_str());
+		val = (unsigned) dummy;
+		rv = 0;
+	}
+	else{
+		rv = -1;
+		if(!optional) throw ErrorException("could not find unsigned integer configuration entry \"%s\"", option);
+		}
+
+	return rv;
+}
+
+/****************************************************************************************/
+/*** GetUnsignedOption() ***/
+/****************************************************************************************/
+int ConfigReader::GetUnsignedNonZeroOption(const char* option, unsigned& val, bool optional /*=false*/)	{
+	int rv;
+	string str;
+	FLOAT_TYPE dummy;//read into a FLOAT_TYPE first to check sign and bounds
+	if (GetStringOption(option, str, optional) == 0)	{  // option exists
+		dummy = (FLOAT_TYPE) atof(str.c_str());
+		if(!(dummy > 0.0)) throw ErrorException("entry for option \"%s\" must be >0", option);
+		if(dummy > (UINT_MAX-1)) throw ErrorException("entry for option \"%s\" (%s) is greater than its max (%u)" , option, str.c_str(), (UINT_MAX-1));
+		if(!(FloatingPointEquals(dummy, (unsigned)dummy, 1e-8))) throw ErrorException("entry for option \"%s\" (%s) is not an integer" , option, str.c_str());
+		val = (unsigned) dummy;
+		rv = 0;
+	}
+	else{
+		rv = -1;
+		if(!optional) throw ErrorException("could not find unsigned integer configuration entry \"%s\"", option);
+		}
+
+	return rv;
+}
+
+
+/****************************************************************************************/
+/*** GetIntRangeOption() ***/
+/****************************************************************************************/
+int ConfigReader::GetIntRangeOption(const char* option, int& val1, int& val2)	{
+	int rv;
+	string str;
+	if (GetStringOption(option, str) == 0)	{  // option exists
+
+		// split up the string
+		int len = (int)str.length();
+		int i = (int)str.find(' ', 0);
+		if (i < 0)
+			rv = -1;
+		else	{
+			val1 = atoi(str.substr(0, i).c_str());
+			val2 = atoi(str.substr(i+1, len-i).c_str());
+			rv = 0;
+		}
+	}
+	else{
+		rv = -1;
+		throw ErrorException("could not find integer range configuration entry \"%s\"", option);
+		}
+
+	return rv;
+}
+
+/****************************************************************************************/
+/*** GetFloatOption() ***/
+/****************************************************************************************/
+int ConfigReader::GetFloatOption(const char* option, float& val)	{
+	int rv;
+	string str;
+	if (GetStringOption(option, str) == 0)	{  // option exists
+		val = (float)atof(str.c_str());
+		rv = 0;
+	}
+	else
+		rv = -1;
+
+	return rv;
+}
+
+/****************************************************************************************/
+/*** GetFloatRangeOption() ***/
+/****************************************************************************************/
+int ConfigReader::GetFloatRangeOption(const char* option, float& val1, float& val2)	{
+	int rv;
+	string str;
+	if (GetStringOption(option, str) == 0)	{  // option exists
+
+		// split up the string
+		int len = (int)str.length();
+		int i = (int)str.find(' ', 0);
+		if (i < 0)
+			rv = -1;
+		else	{
+			val1 = (float)atof(str.substr(0, i).c_str());
+			val2 = (float)atof(str.substr(i+1, len-i).c_str());
+			rv = 0;
+		}
+	}
+	else
+		rv = -1;
+
+	return rv;
+}
+
+/****************************************************************************************/
+/*** GetDoubleOption() ***/
+/****************************************************************************************/
+int ConfigReader::GetDoubleOption(const char* option, FLOAT_TYPE& val, bool optional /*=false*/)	{
+	int rv;
+	string str;
+	if (GetStringOption(option, str, optional) == 0)	{  // option exists
+		val = (FLOAT_TYPE) atof(str.c_str());
+		rv = 0;
+	}
+	else{
+		rv = -1;
+		if(!optional) throw ErrorException("error: could not find float configuration entry \"%s\"", option);
+		}
+
+	return rv;
+}
+
+/****************************************************************************************/
+/*** GetPositiveDoubleOption() ***/
+/****************************************************************************************/
+//this is just a version of GetDoubleOption that checks that the value is non-negative
+int ConfigReader::GetPositiveDoubleOption(const char* option, FLOAT_TYPE& val, bool optional /*=false*/)	{
+	int rv;
+	string str;
+	if (GetStringOption(option, str, optional) == 0)	{  // option exists
+		val = (FLOAT_TYPE) atof(str.c_str());
+		if(val < 0.0) throw ErrorException("configuration entry \"%s\" cannot be negative", option);
+		rv = 0;
+	}
+	else{
+		rv = -1;
+		if(!optional) throw ErrorException("could not find float configuration entry \"%s\"", option);
+		}
+
+	return rv;
+}
+
+/****************************************************************************************/
+/*** GetPositiveNonZeroDoubleOption() ***/
+/****************************************************************************************/
+//this is just a version of GetDoubleOption that checks that the value is non-negative, and that it is not
+//zero.  atof returns zero when it encounters an error, which is very annoying behavior.  When the entry must
+//be nonzero, at least we can check for that
+int ConfigReader::GetPositiveNonZeroDoubleOption(const char* option, FLOAT_TYPE& val, bool optional /*=false*/)	{
+	int rv;
+	string str;
+	if (GetStringOption(option, str, optional) == 0)	{  // option exists
+		val = (FLOAT_TYPE) atof(str.c_str());
+		if(val == ZERO_POINT_ZERO) throw ErrorException("configuration entry \"%s\" cannot be zero (possible problems reading this entry)", option);
+		if(val < 0.0) throw ErrorException("configuration entry \"%s\" cannot be negative", option);
+		rv = 0;
+	}
+	else{
+		rv = -1;
+		if(!optional) throw ErrorException("could not find float configuration entry \"%s\"", option);
+		}
+
+	return rv;
+}
+
+/****************************************************************************************/
+/*** GetDoubleRangeOption() ***/
+/****************************************************************************************/
+int ConfigReader::GetDoubleRangeOption(const char* option, FLOAT_TYPE& val1, FLOAT_TYPE& val2)	{
+	int rv;
+	string str;
+	if (GetStringOption(option, str) == 0)	{  // option exists
+
+		// split up the string
+		int len = (int)str.length();
+		int i = (int)str.find(' ', 0);
+		if (i < 0)
+			rv = -1;
+		else	{
+			val1 = (FLOAT_TYPE) atof(str.substr(0, i).c_str());
+			val2 = (FLOAT_TYPE) atof(str.substr(i+1, len-i).c_str());
+			rv = 0;
+		}
+	}
+	else{
+		rv = -1;
+		throw ErrorException("could not find float range configuration entry \"%s\"", option);
+		}
+
+	return rv;
+}
+
+/*****************************************************************************************
+** PRIVATE METHODS ***********************************************************************
+*****************************************************************************************/
+
+int ConfigReader::ReadSectionOrOption(FILE* file, string& name, string& val)	{
+
+	string line;
+	size_t index;
+	size_t len;
+	int type = UNKNOWN;
+
+	do	{
+		len = ReadLine(file, line);
+		if (line.find('=') < len)
+			type = OPTION;
+		else if (line.find('[') < len && line.find(']') < len)
+			type = SECTION;
+	}
+	while (type == UNKNOWN && !feof(file));
+
+	if (type == SECTION)	{
+		line.erase(line.find('['), 1);
+		line.erase(line.find(']'), 1);
+		name = line;
+	}
+	else if (type == OPTION)	{
+		index = line.find('=');
+		val = line.substr(index+1);
+		name = line.substr(0, index);
+	}
+
+	TrimWhiteSpace(name);
+	if (type == OPTION)
+		TrimWhiteSpace(val);
+
+	return type;
+}
+
+int ConfigReader::ReadLine(FILE* file, string& line)	{
+	char ch;
+
+	line = "";
+
+	fread(&ch, sizeof(char), 1, file);
+	while (ch != '\n' && ch != '\r' && !feof(file))	{
+		line += ch;
+		fread(&ch, sizeof(char), 1, file);
+	}
+
+	return (int)line.length();
+}
+
+void ConfigReader::TrimWhiteSpace(string& str)	{
+	int index;
+
+	if (str.length() == 0)
+		return;
+
+	index = (int)str.find(' ', 0);
+	while (index != -1 && index < (int)str.length())	{
+		while (index < (int)str.length()-1 && str[index+1] == ' ')
+			str.erase(index+1, 1);
+		index = (int)str.find(' ', index+1);
+	}
+
+	if (str.find(' ', 0) == 0)
+		str.erase(0, 1);
+ 	if ( (str.length() > 0) && (str.find(' ', str.length()-1) == str.length()-1) )
+ 		str.erase(str.length()-1, 1);
+
+}
+
+//this just takes master and general and combines them into a single "all" section
+//which will allow ignoring of section headings in general, but still deal with old
+//configs
+void ConfigReader::MakeAllSection(){
+	map<std::string, std::string> ops = sections["general"];
+	ops.insert(sections["master"].begin(), sections["master"].end());
+	string name="all";
+	sections.insert(pair<std::string, Options>(name, ops));
+	}
+
diff --git a/src/configreader.h b/src/configreader.h
new file mode 100644
index 0000000..c856b33
--- /dev/null
+++ b/src/configreader.h
@@ -0,0 +1,87 @@
+// GARLI version 2.0 source code
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef CONFIGREADER_H
+#define CONFIGREADER_H
+
+#include <stdio.h>
+#include <string>
+#include <map>
+
+//using std::string;
+//using std::map;
+
+typedef map<string, string> Options;
+typedef map<string, Options> Sections;
+
+class ConfigReader	{
+public:
+	ConfigReader();
+	ConfigReader(const char*);
+	~ConfigReader();
+
+	int Load(const char*);
+	int Save(const char*);
+
+	int AddSection(const char*);
+	int RemoveSection(const char*);
+	int SetSection(const char*);
+	const string GetCurrentSection();
+	void MakeAllSection();
+
+	int SetOption(const char*, const char*);
+	int RemoveOption(const char*);
+
+	int GetStringOption(const char*, string&, bool optional=false);
+	int GetBoolOption(const char*, bool&, bool optional=false);
+	int GetIntOption(const char*, int&, bool optional=false);
+	int GetIntNonZeroOption(const char*, int&, bool optional=false);
+	int GetIntRangeOption(const char*, int&, int&);
+	int GetUnsignedOption(const char* option, unsigned& val, bool optional=false);
+	int GetUnsignedNonZeroOption(const char* option, unsigned& val, bool optional=false);
+	int GetFloatOption(const char*, float&);
+	int GetFloatRangeOption(const char*, float&, float&);
+	int GetDoubleOption(const char*, FLOAT_TYPE&, bool optional=false);
+	int GetDoubleRangeOption(const char*, FLOAT_TYPE&, FLOAT_TYPE&);
+	int GetPositiveDoubleOption(const char*, FLOAT_TYPE&, bool optional=false);
+	int GetPositiveNonZeroDoubleOption(const char* option, FLOAT_TYPE& val, bool optional=false);
+
+	Sections::const_iterator BeginSection() const	{
+		return sections.begin();
+	}
+	Sections::const_iterator EndSection() const	{
+		return sections.end();
+	}
+
+private:
+	static int UNKNOWN;
+	static int SECTION;
+	static int OPTION;
+
+private:
+
+	int ReadSectionOrOption(FILE* file, string& name, string& val);
+	int ReadLine(FILE* file, string& line);
+
+	void TrimWhiteSpace(string& str);
+
+	Sections sections;
+	string cur_section;
+};
+
+
+#endif
diff --git a/src/datamatr.cpp b/src/datamatr.cpp
new file mode 100644
index 0000000..d777c75
--- /dev/null
+++ b/src/datamatr.cpp
@@ -0,0 +1,1946 @@
+// GARLI version 2.1 source code
+// Copyright 2005-2014 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+//	NOTE: Portions of this source adapted from GAML source, written by Paul O. Lewis
+
+#include <iostream>
+#include <fstream>
+#include <iomanip>
+#include <vector>
+#include <algorithm>
+
+using namespace std;
+
+#include "defs.h"
+#include "datamatr.h"
+#include "rng.h"
+#include "nxsstring.h"
+#include "errorexception.h"
+#include "outputman.h"
+#include "model.h"
+#include "garlireader.h"
+#include "stopwatch.h"
+
+//extern ModelSpecification modSpec;
+
+#define MAX_TAXON_LABEL		100
+
+extern rng rnd;
+extern OutputManager outman;
+
+bool my_pair_compare(pair<int, int> fir, pair<int,int> sec) {return fir.second < sec.second;}
+
+int SitePattern::numTax;
+int SitePattern::maxNumStates;
+
+int		numCompares;
+
+bool SitePattern::operator<(const SitePattern &rhs) const{
+	//zero state sites (all missing) will now be shuffled to the start (previously the end) and removed later
+	//potentially constant sites always need to come just after that
+	//sorting will first be by number of states (fast), then by the state vectors (slow)
+	assert(numStates > -1 && rhs.numStates > -1);
+	numCompares++;
+	
+	if(numStates < rhs.numStates)
+		return true;
+	if(numStates > rhs.numStates)
+		return false;
+
+	assert(stateVec.empty() == false);
+	assert(stateVec.size() == rhs.stateVec.size());
+
+	//this lexigraphically compares the vector contents
+	if(stateVec < rhs.stateVec)
+		return true;
+
+	return false;
+	}
+
+bool SitePattern::operator==(const SitePattern &rhs) const{
+	return (stateVec == rhs.stateVec);
+	}
+
+
+//CalcPatternTypeAndNumStates determines whether pattern a is constant, informative, or missing
+//The passed in vector is used as scratch, and is assumed to already be of size maxNumStates
+//This ALSO has the side effect of filling in the SitePattern::numStates field, which is necessary for sorting.
+int SitePattern::CalcPatternTypeAndNumStates( vector<unsigned int> &stateCounts ){
+	bool ambig = false;	//any total or partial ambiguity
+	int nStates = 0;
+	bool informative = false;
+	bool constant = false;
+	bool missing = false;
+
+	//fill the scratch array with zeros
+	std::fill(stateCounts.begin(), stateCounts.end(), 0);
+
+	//count the number of times each state occurs, and whether there are any partially
+	//ambiguous characters (currently only allowed for nuc data)
+	unsigned char full_ambig = (maxNumStates == 4 ? 15 : maxNumStates);
+	if(maxNumStates == 4){
+		for(vector<unsigned char>::iterator sit = stateVec.begin();sit != stateVec.end();sit++){
+			unsigned char c = *sit;
+			if(c != full_ambig && (c & (c - 1))){
+				ambig = true;
+				break;
+				}
+			else if(c != full_ambig){
+				stateCounts[(c > 1) + (c > 2) + (c > 4)]++;
+				}
+			}
+		}
+	else {
+		for(vector<unsigned char>::iterator sit = stateVec.begin();sit != stateVec.end();sit++){
+			unsigned char c = *sit;
+			if(c != full_ambig){
+				stateCounts[c]++;
+				}
+			}
+		}
+
+	if(!ambig){
+		//no partial ambiguity (all AA and codon will come this way) 
+		//without ambiguity, having 2+ states with 2+ counts means informativeness
+		int numDoubles = 0;
+		for(int s = 0; s < maxNumStates; s++ ){
+			if(stateCounts[s] > 0){
+				nStates++;
+				if(stateCounts[s] > 1){
+					numDoubles++;
+					}
+				}
+			}
+
+		if(nStates == 0){
+			missing = true;
+			assert(numDoubles == 0);
+			}
+		else if(nStates == 1){
+			constant = true;
+			assert(numDoubles < 2);
+			}
+		else{
+			if(numDoubles > 1){
+				informative = true;
+				}
+			}
+		}
+	else{
+		assert(maxNumStates == 4);
+		//this very convoluted scheme (worked out by Mark) must be used to determine informativeness
+		//if partial ambiguity is allowed (only for nuc data currently)
+		multiset<unsigned char> pat;
+		unsigned char conStates = 15;
+		for(vector<unsigned char>::iterator sit = stateVec.begin();sit != stateVec.end();sit++){
+			unsigned char c = *sit;
+			pat.insert(c);
+			conStates &= c;
+			}
+
+		//constant sites are possible with partial ambiguity if some resolution gives a single state
+		if(conStates){
+			if(conStates == 15) 
+				missing = true;
+			else 
+				constant = true;
+			}
+		else{
+			vector< pair<int, int> > stateScores;
+			for(unsigned state=0;state < 4;state++){
+				int sc = 0;
+				for(multiset<unsigned char>::iterator it=pat.begin();it != pat.end();it++){
+					if(!((*it) & (1 << state))){
+						sc++;
+						}
+					}
+				stateScores.push_back(pair<int, int>(state, sc));
+				}
+			sort(stateScores.begin(), stateScores.end(), my_pair_compare);
+			int minStar = stateScores[0].second;
+			if(minStar > 1){
+				set<unsigned char> uPat;
+				for(multiset<unsigned char>::iterator it=pat.begin();it != pat.end();it++)
+					uPat.insert(*it);
+				int minScore = MinScore(uPat, minStar);
+				if(minScore < minStar){
+					informative = true;
+					}
+				}
+			}
+		}
+
+	if(missing){
+		type = MISSING;
+		nStates = 0;
+		}
+	else if(constant){
+		type = CONSTANT;
+		nStates = 1;
+		}
+	else if(informative){
+		type = INFORMATIVE;
+		nStates = max(2, nStates);
+		}
+	else{
+		type = UNINFORM_VARIABLE;
+		nStates = max(2, nStates);
+		}
+
+	//Note that numStates here may not be the true number of states in the
+	//case of ambiguity, but it really only matters that it is accurate in 
+	//discriminating 0/1/1+ states because code elsewhere depends on it.
+	numStates = nStates;
+	return type;
+	}
+
+//this is used for determining informative sites when there is partial ambiguity
+int SitePattern::MinScore(set<unsigned char> patt, int bound, unsigned char bits/*=15*/, int prevSc/*=0*/) const{
+	if(patt.size() == 0) return 0;
+	int min_sc_this_lvl = 9999;
+	int curr_sc_this_lvl = 9999;
+	for(unsigned s2 = 0;s2 < 4;s2++){
+		unsigned char thisBit = (1 << s2);
+		if(bits & thisBit){
+			set<unsigned char> remaining;
+			for(set<unsigned char>::iterator it=patt.begin();it != patt.end();it++){
+				if(!(*it & thisBit)) remaining.insert(*it);
+				}
+			if(remaining.size() > 0){
+				if(prevSc + 1 < bound)
+					curr_sc_this_lvl = 1 + MinScore(remaining, bound, bits & ~thisBit, prevSc+1);
+				else 
+					curr_sc_this_lvl = bound - prevSc;
+				}
+			else return 0;
+			
+			if(curr_sc_this_lvl < min_sc_this_lvl)
+				min_sc_this_lvl = curr_sc_this_lvl;
+			if(min_sc_this_lvl == 0 || min_sc_this_lvl + prevSc < bound)
+				return min_sc_this_lvl;
+			}
+		}
+	return min_sc_this_lvl;
+	}
+
+//Collapse merges like patterns, transfering over the counts and site numbers represented by each sucessive identical column.
+//Patterns that are assigned zero counts here will be removed in Pack(), but will still contribute to the numNonMissingRealSitesInOrigMatrix, except
+//for those with zero states (= missing)
+void PatternManager::NewCollapse(){
+	list<SitePattern>::iterator first;
+	list<SitePattern>::iterator second  = patterns.begin();
+
+	while(second != patterns.end()){
+		first = second++;
+		while(second != patterns.end() && (*first == *second)){
+			(*first).count += (*second).count;
+			(*first).siteNumbers.insert((*first).siteNumbers.end(), (*second).siteNumbers.begin(), (*second).siteNumbers.end());
+			//if a wtset was used, this definitely doesn't need to be the case
+			//assert((*first).count == (*first).siteNumbers.size());
+			(*second).count = 0;
+			second++;
+			}
+		}
+	//this will zero the count of all missing pats, which will make them not get put into the uniquePatterns
+	//list in NewPack
+	for(list<SitePattern>::iterator pit = patterns.begin();pit != patterns.end();pit++){
+		if((*pit).numStates == 0){
+			(*pit).count = 0;
+			}
+		}
+	}
+
+void PatternManager::NewSort(){
+	//this is the stl list sort function, using SitePattern::operator<
+	patterns.sort();
+	}
+
+// This version of pack copies unique patterns from the patterns list into the uniquePatterns list
+void PatternManager::NewPack(){
+	for(list<SitePattern>::iterator pit = patterns.begin();pit != patterns.end();pit++){
+		if(pit->numStates > 0){
+			if(pit->count > 0){ 
+				uniquePatterns.push_back(*pit);
+				}
+			}
+		}
+	pman_numPatterns = uniquePatterns.size();
+	compressed = true;
+	}
+
+//This does all necessary processing in the patman (assuming that it has already been filled with data)
+//up to the point when the compressed matrix can be copied back into 
+//this will only be used for nuc/AA/codon data
+void PatternManager::ProcessPatterns(){
+	CalcPatternTypesAndNumStates();
+	NewSort();
+	NewCollapse();
+	NewPack();
+	NewDetermineConstantSites();
+	}
+
+//it would really make more sense to do this after packing, but the number of states
+//is needed in pattern comparison in sorting.  This also does what Summarize used to, 
+//filling the counts of various types of patterns
+//THIS DOES NOT CURRENTLY SUPPORT CONDITIONING PATTERNS!
+void PatternManager::CalcPatternTypesAndNumStates(){
+	//this is just a scratch array to be used repeatedly in PatternType	
+	vector<unsigned int> s(maxNumStates);
+
+	pman_numMissingChars = pman_numConstantChars = pman_numInformativeChars = pman_numUninformVariableChars = pman_numNonMissingRealCountsInOrigMatrix = 0;
+
+	pman_numRealSitesInOrigMatrix = patterns.size();
+	for(list<SitePattern>::iterator pit = patterns.begin();pit != patterns.end();pit++){
+		int t = pit->CalcPatternTypeAndNumStates(s);
+		//Fixed 2 bugs - It is important to calculate numNonMissingRealCountsInOrigMatrix here from counts of the  
+		//the generally unpacked data, because it could effectively be partially packed due to the use of a wtset, 
+		//but also need to keep separate track of the number of columns in the orig matrix with numRealSitesInOrigMatrix
+		if( t != SitePattern::MISSING )
+			pman_numNonMissingRealCountsInOrigMatrix += pit->count;
+
+		if( t == SitePattern::MISSING )
+			pman_numMissingChars += pit->count;
+		else if( t == SitePattern::CONSTANT )
+			pman_numConstantChars += pit->count;
+		else if( t == SitePattern::INFORMATIVE )
+			pman_numInformativeChars += pit->count;
+		else{
+			assert(t == SitePattern::UNINFORM_VARIABLE);
+			pman_numUninformVariableChars += pit->count;
+			}
+		}
+	pman_numNonMissingChars = pman_numRealSitesInOrigMatrix - pman_numMissingChars;
+	if( pman_numNonMissingChars == 0 ){
+		throw ErrorException("Matrix is made up entirely of missing characters (?, -, or N)!");
+		}
+	}
+
+//note where all of the constant sites are, and what state they are.
+//this is kind of ugly, but will never be rate limiting
+void PatternManager::NewDetermineConstantSites(){
+	assert(compressed);
+	lastConstant=-1;
+	list<SitePattern>::iterator pat = uniquePatterns.begin();
+	assert(pat->numStates > 0);
+	while(pat != uniquePatterns.end() && pat->numStates == 1){
+		lastConstant++;
+		pat++;
+		}
+	
+	int t = 0;
+	int thisCon = 0;
+	if(maxNumStates == 4){
+		for(pat = uniquePatterns.begin();thisCon++ <= lastConstant;pat++){
+			t = 0;
+			char c=15;
+			while(t < numTax){
+				char ch = pat->stateVec[t];
+				c = c & ch;
+				t++;
+				}
+			assert(c != 0);
+			pat->constStates = c;
+			}
+		}
+	else{//not allowing ambiguity for codon/AA's, so this is a bit easier
+		for(pat = uniquePatterns.begin();thisCon++ <= lastConstant;pat++){
+			t = 0;
+			char c = maxNumStates;
+			do{
+				c = pat->stateVec[t];
+				t++;
+				}while(c == maxNumStates && t < numTax);
+			assert(t <= numTax);
+			pat->constStates = c;
+			}
+		}
+	}
+
+//The following are for copying the results of the pattern processing back into the old fields of DataMatrix
+
+//This takes the unique pattern types and uses their siteNumbers vector to map back to the original
+//ordering of sites, as used to tbe stored in the number array.
+void PatternManager::FillNumberVector(vector<int> &nums) const{
+	if(nums.size() != patterns.size()){
+		nums.clear();
+		nums.resize(patterns.size());
+		}
+	
+	//this is necessary so that all missing patterns, which should already have been removed from
+	//uniquePatterns, will properly show up as -1 in the number array, since they will not be overwritten
+	//with other values below
+	for(vector<int>::iterator nit = nums.begin();nit != nums.end();nit++)
+		(*nit) = -1;
+
+	int p = 0;
+	for(list<SitePattern>::const_iterator pit = uniquePatterns.begin();pit != uniquePatterns.end();pit++){
+		for(vector<int>::const_iterator nit = (*pit).siteNumbers.begin(); nit != (*pit).siteNumbers.end();nit++)
+			nums[*nit] = p;
+		p++;
+		}
+	}
+
+void PatternManager::FillCountVector(vector<int> &counts) const{
+	counts.clear();
+	for(list<SitePattern>::const_iterator pit = uniquePatterns.begin();pit != uniquePatterns.end();pit++){
+		counts.push_back((*pit).count);
+		}
+	}
+
+void PatternManager::FillNumStatesVector(vector<int> &ns) const{
+	ns.clear();
+	for(list<SitePattern>::const_iterator pit = uniquePatterns.begin();pit != uniquePatterns.end();pit++){
+		ns.push_back((*pit).numStates);
+		}
+	}
+
+void PatternManager::FillConstStatesVector(vector<int> &cs) const{
+	int c = 0;
+	for(list<SitePattern>::const_iterator pit = uniquePatterns.begin();pit != uniquePatterns.end();pit++){
+		cs.push_back((*pit).constStates);
+		c++;
+		}
+	}
+
+//Takes the data out of the SitePattern list and copies into the DataMatrix 2d matrix
+void PatternManager::FillTaxaXCharMatrix(unsigned char **mat) const{
+	for(int t = 0;t < numTax;t++){
+		int c = 0;
+		for(list<SitePattern>::const_iterator cit = uniquePatterns.begin();cit != uniquePatterns.end();cit++){
+			mat[t][c++] = (*cit).stateVec[t];
+			}
+		}
+	}
+
+void PatternManager::FillIntegerValues(int &_nMissing, int &_nConstant, int &_nVarUninform, int &_nInformative, int &_lastConst, int &_numRealSitesInOrigMatrix, int &_numNonMissingRealCountsInOrigMatrix, int &_numNonMissingRealSitesInOrigMatrix, int &_numPatterns) const {
+	_numRealSitesInOrigMatrix = pman_numRealSitesInOrigMatrix;
+	_numNonMissingRealCountsInOrigMatrix = pman_numNonMissingRealCountsInOrigMatrix;
+	_numNonMissingRealSitesInOrigMatrix = pman_numNonMissingChars;
+	_numPatterns = pman_numPatterns;
+
+	_nMissing = pman_numMissingChars;
+	_nConstant = pman_numConstantChars;
+	_nVarUninform = pman_numUninformVariableChars;
+	_nInformative = pman_numInformativeChars;
+	_lastConst = lastConstant;
+	}
+
+void DataMatrix::OutputDataSummary() const{
+	//outman.UserMessage("\n#######################################################");
+	outman.UserMessage("\tSummary of data:");
+	outman.UserMessage("\t  %d sequences.", NTax());
+	outman.UserMessage("\t  %d constant characters.", NConstant() - numConditioningPatterns);
+	outman.UserMessage("\t  %d parsimony-informative characters.", NInformative());
+	outman.UserMessage("\t  %d uninformative variable characters.", NVarUninform());
+	int total = NConstant() + NInformative() + NVarUninform() - numConditioningPatterns;
+	if(NMissing() > 0){
+		outman.UserMessage("\t  %d characters were completely missing or ambiguous (removed).", NMissing());
+		//outman.UserMessage("\t  %d total characters (%d before removing empty columns).", total, GapsIncludedNChar() - numConditioningPatterns);
+		outman.UserMessage("\t  %d total characters (%d before removing empty columns).", total, numNonMissingRealCountsInOrigMatrix + NMissing());
+		}
+	else outman.UserMessage("\t  %d total characters.", total);
+
+	assert(total == numNonMissingRealCountsInOrigMatrix);
+
+	outman.UserMessage("\t  %d unique patterns in compressed data matrix.", NChar() - numConditioningPatterns);
+	outman.flush();
+	}
+
+void DataMatrix::ProcessPatterns() {
+	Stopwatch stoppy;
+	stoppy.Start();
+	if(usePatternManager){
+		patman.ProcessPatterns();
+		GetDataFromPatternManager();
+		patman.Reset();
+		}
+	else{
+		Summarize();
+		Collapse();
+		DetermineConstantSites();
+		}
+	CalcEmpiricalFreqs();
+	ReserveOriginalCounts();
+	OutputDataSummary();
+	int t = stoppy.SplitTime();
+	/*There isn't much point in outputting all of this clutter
+	if(t == 0)
+		outman.UserMessage("\tPattern processing required < 1 second");
+	else
+		outman.UserMessage("\tPattern processing required %d second(s)", stoppy.SplitTime());
+	if(numCompares > 0)
+		outman.UserMessage("\t%d pattern comparisons were needed", numCompares);
+	outman.UserMessage("");
+	*/
+	}
+
+//this pulls all of the processed data back out of the patman into the old fields of DataMatrix
+void DataMatrix::GetDataFromPatternManager(){
+	ResizeCharacterNumberDependentVariables(patman.NChar()) ;
+	patman.FillNumberVector(newNumber);
+	patman.FillCountVector(newCount);
+	patman.FillNumStatesVector(newNumStates);
+	patman.FillConstStatesVector(newConstStates);
+	patman.FillIntegerValues(numMissingChars, numConstantChars, numVariableUninformChars, numInformativeChars, lastConstant, numRealSitesInOrigMatrix, numNonMissingRealCountsInOrigMatrix, numNonMissingRealSitesInOrigMatrix, numPatterns);
+	patman.FillTaxaXCharMatrix(matrix);
+	if(patman.compressed)
+		dense = 1;
+	}
+
+DataMatrix::~DataMatrix(){
+	if( count ) MEM_DELETE_ARRAY(count); // count is of length numPatterns
+	if( numStates ) MEM_DELETE_ARRAY(numStates); // numStates is of length numPatterns
+	if( number ) MEM_DELETE_ARRAY(number); // number is of length numPatterns
+	if( origDataNumber ) MEM_DELETE_ARRAY(origDataNumber); // origDataNumber is of length numPatterns
+	if( taxonLabel ) {
+		for( int j = 0; j < nTaxAllocated; j++ )
+			MEM_DELETE_ARRAY( taxonLabel[j] ); // taxonLabel[j] is of length strlen(taxonLabel[j])+1
+	    MEM_DELETE_ARRAY(taxonLabel); // taxonLabel is of length nTax
+	}
+	if( matrix ) {
+		for( int j = 0; j < nTaxAllocated; j++ )
+			MEM_DELETE_ARRAY(matrix[j]); // matrix[j] is of length numPatterns
+		MEM_DELETE_ARRAY(matrix); // matrix is of length nTax
+	}
+	if(constStates!=NULL) delete []constStates;
+	if(origCounts!=NULL) delete []origCounts;
+	}
+
+void DataMatrix::SetTaxonLabel(int i, const char* s)
+{
+	if( taxonLabel && (i < nTax) )
+		ReplaceTaxonLabel(i, s);
+}
+
+void DataMatrix::ReplaceTaxonLabel( int i, const char* s )
+{
+	assert( taxonLabel );
+	if( taxonLabel[i] ) {
+		MEM_DELETE_ARRAY(taxonLabel[i]); // taxonLabel[i] is of length strlen(taxonLabel[i])+1
+	}
+	int newLength = (strlen(s)+1);
+	if(newLength > MAX_TAXON_LABEL) throw ErrorException("Sorry, taxon name %s for taxon #%d is too long (max length=%d)", s, i+1, MAX_TAXON_LABEL);
+	MEM_NEW_ARRAY(taxonLabel[i],char,newLength);
+	strcpy(taxonLabel[i], s);
+}
+
+//
+// PositionOf returns position (starting from 0) of taxon whose name
+// matches the string s in the taxonLabel list
+//
+int DataMatrix::PositionOf( char* s ) const
+{
+	int i;
+
+	for( i = 0; i < nTax; i++ ) {
+		if( strcmp( taxonLabel[i], s ) == 0 ) break;
+	}
+
+	assert( i < nTax );
+
+	return i;
+}
+
+int DataMatrix::MinScore(set<unsigned char> patt, int bound, unsigned char bits/*=15*/, int prevSc/*=0*/) const{
+	if(patt.size() == 0) return 0;
+	int min_sc_this_lvl = 9999;
+	int curr_sc_this_lvl = 9999;
+	for(unsigned s2 = 0;s2 < 4;s2++){
+		unsigned char thisBit = (1 << s2);
+		if(bits & thisBit){
+			set<unsigned char> remaining;
+			for(set<unsigned char>::iterator it=patt.begin();it != patt.end();it++){
+				if(!(*it & thisBit)) remaining.insert(*it);
+				}
+			if(remaining.size() > 0){
+				if(prevSc + 1 < bound)
+					curr_sc_this_lvl = 1 + MinScore(remaining, bound, bits & ~thisBit, prevSc+1);
+				else 
+					curr_sc_this_lvl = bound - prevSc;
+				}
+			else return 0;
+			
+			if(curr_sc_this_lvl < min_sc_this_lvl)
+				min_sc_this_lvl = curr_sc_this_lvl;
+			if(min_sc_this_lvl == 0 || min_sc_this_lvl + prevSc < bound)
+				return min_sc_this_lvl;
+			}
+		}
+	return min_sc_this_lvl;
+	}
+
+//
+// PatternType determines whether pattern k is constant, informative, or missing
+//it used to try to determine autapomorphies, although not correctly
+//
+int DataMatrix::PatternType( int k , unsigned int *stateCounts) const{
+	assert(k < numPatterns);
+	if( k >= numPatterns )
+		return 0;
+	int retval;
+
+	bool ambig = false;	//any total or partial ambiguity
+	int nStates = 0; 
+	bool informative = false;
+	bool constant = false;
+	bool missing = false;
+
+	//fill the scratch array with zeros
+	memset(stateCounts, 0x00, maxNumStates * sizeof(*stateCounts));
+
+	//count the number of times each state occurs, and whether there are any partially
+	//ambiguous characters (currently only allowed for nuc data)
+	unsigned char full_ambig = (maxNumStates == 4 ? 15 : maxNumStates);
+	if(maxNumStates == 4){
+		for(int t = 0; t < nTax; t++ ){
+			unsigned char c = Matrix( t, k );
+			if(c != full_ambig && (c & (c-1))){
+				ambig = true;
+				break;
+				}
+			else if(c != full_ambig)
+				stateCounts[(c > 1) + (c > 2) + (c > 4)]++;
+			}
+		}
+	else {
+		for(int t = 0; t < nTax; t++ ){
+			unsigned char c = Matrix( t, k );
+			if(c != full_ambig)
+				stateCounts[c]++;
+			}
+		}
+
+	if(!ambig){
+		//no partial ambiguity (all AA and codon will come this way) 
+		//without ambiguity, having 2+ states with 2+ counts means informativeness
+		int numDoubles = 0;
+		for(int s = 0; s < maxNumStates; s++ ){
+			if(stateCounts[s] > 0){
+				nStates++;
+				if(stateCounts[s] > 1) numDoubles++;
+				}
+			}
+
+		if(nStates == 0){
+			missing = true;
+			assert(numDoubles == 0);
+			}
+		else if(nStates == 1){
+			constant = true;
+			assert(numDoubles < 2);
+			}
+		else{
+			if(numDoubles > 1) informative = true;
+			}
+		}
+	else{
+		//this very convoluted scheme must be used to determine informativeness
+		//if ambiguity is allowed (only for nuc data currently)
+		multiset<unsigned char> patt;
+		unsigned char conStates = 15;
+		for(int t = 0;t < nTax;t++){
+			unsigned char c = Matrix( t, k );
+			patt.insert(c);
+			conStates &= c;
+			}
+
+		//constant sites are possible with ambiguity of some resolution gives a single state
+		if(conStates){
+			if(conStates == 15) missing = true;
+			else constant = true;
+			}
+		else{
+			vector< pair<int, int> > stateScores;
+			for(unsigned state=0;state < 4;state++){
+				int sc = 0;
+				for(multiset<unsigned char>::iterator it=patt.begin();it != patt.end();it++){
+					if(!((*it) & (1 << state))){
+						sc++;
+						}
+					}
+				stateScores.push_back(pair<int, int>(state, sc));
+				}
+			sort(stateScores.begin(), stateScores.end(), my_pair_compare);
+			int minStar = stateScores[0].second;
+			if(minStar > 1){
+				set<unsigned char> uPatt;
+				for(multiset<unsigned char>::iterator it=patt.begin();it != patt.end();it++)
+					uPatt.insert(*it);
+				int minScore = MinScore(uPatt, minStar);
+				if(minScore < minStar){
+					informative = true;
+					}
+				}
+			}
+		}
+
+	if(missing){
+		retval = PT_MISSING;
+		nStates = 0;
+		}
+	else if(constant){
+		retval = PT_CONSTANT;
+		nStates = 1;
+		}
+	else if(informative){
+		retval = PT_INFORMATIVE | PT_VARIABLE;
+		nStates = max(2, nStates);
+		}
+	else{
+		retval = PT_VARIABLE;
+		nStates = max(2, nStates);
+		}
+
+/*	ofstream deb;
+	if(k==0) deb.open("pat.log");
+	else deb.open("pat.log", ios::app);
+	deb << k << "\t" << constant << "\t" << informative << "\t" << nStates << "\n";
+	deb.close();
+*/
+	//Note that numStates here may not be the true number of states in the
+	//case of ambiguity, but it really only matters that it is accurate in 
+	//discriminating 0/1/1+ states because code elsewhere depends on it.
+	numStates[k] = nStates;
+	return retval;
+	}
+
+//
+// Summarize tallies number of constant, informative, and autapomorphic characters
+//
+void DataMatrix::Summarize(){
+	assert( numPatterns > 0 );
+
+	numMissingChars = numConstantChars = numInformativeChars = numVariableUninformChars = numNonMissingRealCountsInOrigMatrix = 0;
+
+    //this is just a scratch array to be used repeatedly in PatternType
+    vector<unsigned int> s(maxNumStates);
+	
+	numRealSitesInOrigMatrix = numPatterns - numConditioningPatterns;
+	for(int k = 0; k < numPatterns; k++ ) {
+		int ptFlags = PatternType(k, &s[0]);
+		//Fixed 2 bugs - It is important to calculate numNonMissingRealCountsInOrigMatrix here from counts of the  
+		//the generally unpacked data, because it could effectively be partially packed due to the use of a wtset, 
+		//but also need to keep separate track of the number of columns in the orig matrix with numRealSitesInOrigMatrix
+		if( ptFlags != PT_MISSING && k >= numConditioningPatterns)
+			numNonMissingRealCountsInOrigMatrix += count[k];
+		if( ptFlags == PT_MISSING )
+			numMissingChars += count[k];
+		else if( ptFlags & PT_CONSTANT )
+			numConstantChars += count[k];
+		else if( ptFlags & PT_INFORMATIVE )
+			numInformativeChars += count[k];
+		else{
+			assert(ptFlags & PT_VARIABLE);
+			numVariableUninformChars += count[k];
+			}
+		}
+	numNonMissingRealSitesInOrigMatrix = numRealSitesInOrigMatrix - numMissingChars;
+	if( numConstantChars + numInformativeChars + numVariableUninformChars == 0 ){
+		throw ErrorException("Matrix is made up entirely of missing characters (?, -, or N)!");
+		}
+	}
+
+//
+// NewMatrix deletes old matrix, taxonLabel, count, and number
+// arrays and creates new ones
+//
+void DataMatrix::NewMatrix( int taxa, int sites )
+{
+	//allocate an extra taxon unless there previously wasn't one
+	int extraTax = 1;
+	if(nTaxAllocated > 0){
+		extraTax = nTaxAllocated - nTax;
+		}
+
+	// delete taxon labels
+	if( taxonLabel ) {
+		int i;
+		for( i = 0; i < nTaxAllocated; i++ )
+			MEM_DELETE_ARRAY(taxonLabel[i]); // taxonLabel[i] is of length strlen(taxonLabel[i])+1
+		MEM_DELETE_ARRAY(taxonLabel); // taxonLabel is of length nTax
+		}
+
+	// create new array of taxon label pointers
+	if( taxa > 0 ) {
+		MEM_NEW_ARRAY(taxonLabel,char*,taxa + extraTax);
+		for( int i = 0; i < taxa + extraTax; i++ )
+			taxonLabel[i] = NULL;
+		}
+
+	// delete data matrix and count and number arrays
+	if( matrix ) {
+		int j;
+		for( j = 0; j < taxa + extraTax; j++ )
+			MEM_DELETE_ARRAY(matrix[j]); // matrix[j] has length numPatterns
+		MEM_DELETE_ARRAY(matrix); // matrix has length nTax
+		}
+
+	if(usePatternManager == false){
+		if( count ) {
+			MEM_DELETE_ARRAY(count); //count has length numPatterns
+			}
+		if( numStates ) {
+			MEM_DELETE_ARRAY(numStates); // numStates has length numPatterns
+			}
+		}
+	//yarg - this is used even when usePatMan == true, when converting from nuc to AA matrix
+	if( number ) {
+		MEM_DELETE_ARRAY(number); // number has length numPatterns
+		}
+	if( origDataNumber ) {
+		MEM_DELETE_ARRAY(origDataNumber); // origDataNumber has length numPatterns
+		}
+	// create new data matrix, and new count and number arrays
+	// all counts are initially 1, and characters are numbered
+	// sequentially from 0 to numPatterns-1
+	if( taxa > 0 && sites > 0 ) {
+		MEM_NEW_ARRAY(matrix,unsigned char*,taxa + extraTax);
+		MEM_NEW_ARRAY(number,int,sites);
+		MEM_NEW_ARRAY(origDataNumber,int,sites);
+		for( int j = 0; j < sites; j++ ) {
+			number[j] = j;
+			//number[j] = ( j < numConditioningPatterns ? -1 : j - numConditioningPatterns);
+			//in the case of conditioning patterns or partitioning this will be updated later anyway
+			origDataNumber[j] = j;
+			}
+		if(usePatternManager == false){
+			MEM_NEW_ARRAY(count,int,sites);
+			MEM_NEW_ARRAY(numStates,int,sites);
+
+			for( int j = 0; j < sites; j++ ) {
+				count[j] = 1;
+				numStates[j] = 1;
+				}
+			}
+		for( int i = 0; i < taxa + extraTax; i++ ) {
+			matrix[i]=new unsigned char[sites];
+			//MEM_NEW_ARRAY(matrix[i],unsigned char,sites);
+			//memset( matrix[i], 0xff, taxa*sizeof(unsigned char) );
+			memset( matrix[i], 0xff, sites*sizeof(unsigned char) );
+			}
+		}
+
+	// set dimension variables to new values
+	nTax = taxa;
+	nTaxAllocated = nTax + extraTax;
+	//these will likely be updated later
+	numRealSitesInOrigMatrix = numNonMissingRealSitesInOrigMatrix = sites - numConditioningPatterns;
+	nonZeroCharCount = numPatterns = sites;
+	}
+
+void DataMatrix::ResizeCharacterNumberDependentVariables(int nCh) {
+	//ONLY CALL THIS BEFORE GETTING DATA FROM PATMAN, OTHERWISE SOME VARIABLES
+	//WILL BE WRONG!!!
+	numPatterns = nCh;
+
+	// delete data matrix and count and number arrays
+	if( matrix ) {
+		int j;
+		for( j = 0; j < nTaxAllocated; j++ )
+			MEM_DELETE_ARRAY(matrix[j]); // matrix[j] has length numPatterns
+		MEM_DELETE_ARRAY(matrix); // matrix has length nTax
+	}
+
+	if( count ) {
+		MEM_DELETE_ARRAY(count); //count has length numPatterns
+	}
+	if( numStates ) {
+		MEM_DELETE_ARRAY(numStates); // numStates has length numPatterns
+	}
+
+	// create new data matrix, and new count and number arrays
+	// all counts are initially 1, and characters are numbered
+	// sequentially from 0 to numPatterns-1
+	if( numPatterns > 0 ) {
+		MEM_NEW_ARRAY(matrix,unsigned char*,nTaxAllocated);
+		MEM_NEW_ARRAY(count,int,numPatterns);
+		MEM_NEW_ARRAY(numStates,int,numPatterns);
+
+		for( int j = 0; j < numPatterns; j++ ) {
+			count[j] = 1;
+			numStates[j] = 1;
+		}
+		for( int i = 0; i < nTaxAllocated; i++ ) {
+			matrix[i]=new unsigned char[numPatterns];
+			memset( matrix[i], 0xff, numPatterns*sizeof(unsigned char) );
+			}
+		}
+
+	//set dimension variables to new values, which actually MUST be updated elsewhere to be correct
+	//see note at top of func
+	nonZeroCharCount = numRealSitesInOrigMatrix = numNonMissingRealSitesInOrigMatrix = numPatterns;
+	}
+
+//deprecated
+DataMatrix& DataMatrix::operator =(const DataMatrix& d){
+	assert(0);
+	NewMatrix( d.NTax(), d.NChar() );
+
+	int i, j;
+	for( i = 0; i < nTax; i++ ) {
+		SetTaxonLabel(i, d.TaxonLabel(i) );
+	}
+
+	for( j = 0; j < numPatterns; j++ ) {
+		SetCount(j, d.Count(j) );
+		origCounts[j] = d.origCounts[j];
+		number[j] = d.Number(j);
+		numStates[j] = d.NumStates(j);
+	}
+
+	for( i = 0; i < nTax; i++ ) {
+		for( j = 0; j < numPatterns; j++ )
+			SetMatrix(i, j, d.Matrix(i, j));
+	}
+
+	return *this;
+	}
+
+//
+// Pack simply deletes sites having a count of zero
+//
+void DataMatrix::Pack(){
+
+	int i, j, newNChar = 0;
+
+	// determine dimensions of new matrix
+	for( j = 0; j < numPatterns; j++ ) {
+		if( count[j] )
+			newNChar++;
+	}
+
+	//DEBUG - something was going wrong and causing crashes in some cases (only AA's?) when a new matrix
+	//was created with the same dimensions as the original.  Haven't figured out why yet, 
+	//but this avoids the crash at least.
+	if(newNChar == numPatterns){
+		dense = true;
+		return;
+		}
+
+	// create new matrix and count arrays and fill
+	unsigned char** newMatrix;
+        MEM_NEW_ARRAY(newMatrix,unsigned char*,nTaxAllocated);
+	int* newCount;
+        MEM_NEW_ARRAY(newCount,int,newNChar);
+	int* newNumStates;
+        MEM_NEW_ARRAY(newNumStates,int,newNChar);
+
+	for( i = 0; i < nTaxAllocated; i++ )
+		 MEM_NEW_ARRAY(newMatrix[i],unsigned char,newNChar);
+
+
+	i = 0;
+	for( j = 0; j < numPatterns; j++ ) {
+		if( count[j] ) {
+			for( int k = 0; k < nTax; k++ )
+				newMatrix[k][i] = matrix[k][j];
+			newCount[i] = count[j];
+			newNumStates[i] = numStates[j];
+			i++;
+			}
+		else{//as we remove columns, shift all the greater numbers over
+			for(int c=0;c < numPatterns;c++){
+				if(number[c] >= i) number[c]--;
+				}
+			}
+		}
+
+	// delete old matrix and count arrays
+	if( count ) MEM_DELETE_ARRAY(count); // count has length numPatterns
+	if( numStates ) MEM_DELETE_ARRAY(numStates); // numStates has length numPatterns
+	if( matrix ) {
+		for( i = 0; i < nTaxAllocated; i++ )
+			MEM_DELETE_ARRAY(matrix[i]); // matrix[i] has length numPatterns
+		MEM_DELETE_ARRAY(matrix); // matrix has length nTax
+        }
+
+	// set count, matrix and numStates to their new counterparts
+	count = newCount;
+	numStates = newNumStates;
+	matrix = newMatrix;
+	numPatterns = newNChar;
+	nonZeroCharCount = numPatterns;
+	}
+
+
+void DataMatrix::DetermineConstantSites(){
+	//note where all of the constant sites are, and what they are
+	//this is kind of ugly, but will never be rate limiting
+	lastConstant=-1;
+	assert(numStates[0] > 0);
+	while(numStates[lastConstant+1]==1) lastConstant++;
+	
+	constStates=new int[lastConstant+1];
+	int t;
+	if(maxNumStates == 4){
+		for(int i=0;i<lastConstant+1;i++){
+			t=0;
+			char c=15;
+			while(t<nTax){
+				char ch=Matrix(t, i);
+				c = c & ch;
+				t++;
+				}
+			assert(c!=0);
+			constStates[i]=c;
+			}
+		}
+	else{//not allowing ambiguity for codon/AA's, so this is a bit easier
+		for(int i=0;i<lastConstant+1;i++){
+			t=0;
+			char c = maxNumStates;
+			do{
+				c = Matrix(t, i);
+				t++;
+				}while(c == maxNumStates && t < nTax);
+			assert(t <= nTax);
+			constStates[i]=c;
+			}
+		}
+	}
+
+//
+//	SwapCharacters swaps matrix column i with column j
+//
+void DataMatrix::SwapCharacters( int i, int j ){
+	unsigned char tmp;
+	for( int k = 0; k < nTax; k++ ) {
+		tmp = Matrix( k, i );
+		SetMatrix( k, i, Matrix( k, j ) );
+		SetMatrix( k, j, tmp );
+		}
+
+	//swap pattern counts
+	int c = count[i];
+	count[i] = count[j];
+	count[j] = c;
+
+	//and the nStates
+	int s=numStates[i];
+	numStates[i]=numStates[j];
+	numStates[j]=s;
+
+	//and the number
+	for(int c=0;c<numRealSitesInOrigMatrix + numConditioningPatterns;c++){
+		if(number[c] == i) 
+			number[c] = j;
+		else if(number[c] == j) 
+			number[c] = i;
+		}
+	}
+
+void DataMatrix::BeginNexusTreesBlock(string &trans) const{
+	//this outputs everything up through the translate table
+	trans = "#NEXUS\n\nbegin trees;\ntranslate\n";
+
+	char temp[500];
+	for(int k=0;k<nTax;k++){
+		//DO NOT call GetEscaped() or BlanksToUnderscores() on the names here - they are stored 
+		//exactly as they should be output upon initial reading
+		NxsString tnstr = TaxonLabel(k);
+		if( k == nTax-1 )
+			sprintf(temp, " %d %s;\n", (k+1), tnstr.c_str());
+		else
+			sprintf(temp, " %d %s,\n", (k+1), tnstr.c_str());
+		trans += temp;
+		}
+	}
+
+void DataMatrix::BeginNexusTreesBlock(ofstream &treeout) const{
+	//this outputs everything up through the translate table
+	treeout << "#NEXUS\n\nbegin trees;\ntranslate\n";
+ 	for(int k=0;k<nTax;k++){
+		//DO NOT call GetEscaped() or BlanksToUnderscores() on the names here - they are stored 
+		//exactly as they should be output upon initial reading
+		treeout << "  " << (k+1);
+		NxsString tnstr = TaxonLabel(k);
+		treeout << "  " << tnstr.c_str();
+		if( k == nTax-1 )
+			treeout << ";\n";
+		else
+			treeout << ",\n";
+		}
+	treeout.flush();
+	}
+
+int DataMatrix::TaxonNameToNumber(const NxsString &name) const{\
+	string nameStr = NxsToken::Tokenize(name)[0].GetToken();
+	for(int i=0;i<nTax;i++){
+		if(nameStr == (NxsToken::Tokenize(TaxonLabel(i)))[0].GetToken())
+			return i+1;//indeces run 0->ntax-1, taxon numbers 1->ntax
+			}
+	return -1;
+	}
+
+//
+// ComparePatterns returns:
+//	 0		complete identity
+//	-1		if i less than j
+//	 1		if i greater than j
+//
+int DataMatrix::ComparePatterns( const int i, const int j ) const{		
+	//DJZ 10/28/03 altering this to always put constant patterns at the start, which will
+	//make implementing invariant sites much easier.  
+
+	int cmp = 0;
+		
+	if(numStates[i]==1){
+		if(numStates[j]==1){
+			if(Matrix(0,i) < Matrix(0,j)) return -1;
+			//else return 1;
+			else{
+				for( int k = 0; k < nTax; k++ ) {
+					int same = ( Matrix( k, i ) == Matrix( k, j ) );
+					if( !same )	{
+						FLOAT_TYPE diff = ( (FLOAT_TYPE)Matrix( k, i ) - (FLOAT_TYPE)Matrix( k, j ) );
+						cmp = ( diff < 0.0 ? -1 : 1 );
+						break;
+					}
+				}
+				return cmp;
+				}
+			}
+		else return -1;
+		}
+	else if(numStates[j]==1){
+		return 1;
+		}
+	
+	
+	for( int k = 0; k < nTax; k++ ) {
+		int same = ( Matrix( k, i ) == Matrix( k, j ) );
+		if( !same )	{
+			FLOAT_TYPE diff = ( (FLOAT_TYPE)Matrix( k, i ) - (FLOAT_TYPE)Matrix( k, j ) );
+			cmp = ( diff < 0.0 ? -1 : 1 );
+			break;
+		}
+	}
+	return cmp;
+}
+
+//
+// Collapse merges like patterns
+//
+void DataMatrix::Collapse(){
+	int i = 0, j = 1;
+	assert(nonZeroCharCount == numPatterns);
+	Sort();
+
+	while( i < numPatterns ) {
+		while( j < numPatterns && ComparePatterns( i, j ) == 0 ) {
+			// pattern j same as pattern i
+			count[i] += count[j];
+			count[j] = 0;
+			j++;
+			}
+		i = j++;
+		}
+		
+	//DJZ 10/28/03 get rid of all missing patterns	
+	int q=numPatterns-1;
+	while(numStates[q] == 0){
+		//This sets the number to -1 for an all missing site, indicating that none of the packed
+		//matrix columns corresponds to it
+		for(i = 0;i < numPatterns;i++){ 
+			if(number[i]==q) 
+				number[i]=-1;
+			}
+		count[q--]=0;
+		//NO, this is now done in Summarize()!!
+		//when all missing columns are deleted, remove them from the total number of characters
+		//numNonMissingRealSitesInOrigMatrix--;
+		}
+	
+	Pack();
+	assert(nonZeroCharCount == numPatterns);
+	}
+
+//
+// EliminateAdjacentIdenticalColumns sets the count of successive identical patterns
+// in the original alignment to zero (usually applied to gaps)
+// i.e., adjacent identical patterns count as only one observation
+// 5/17/12 Ooops, changed to only do this for non-constant columns
+void DataMatrix::EliminateAdjacentIdenticalColumns(){
+	//this needs to happen here to know the number of state counts, but will be redone later
+	Summarize();
+	
+	int i = 0, j = 1;
+	assert(nonZeroCharCount == numPatterns);
+
+	int numCombined = 0;
+	while( i < NChar() ) {
+		//need to avoid subtracting zero state chars here (blank cols) since the will be removed already
+		//oops, and one state characters, since we don't want to collapse all present columns
+		while( numStates[i] > 1 && j < NChar() && ComparePatterns( i, j ) == 0 ) {
+			// pattern j same as pattern i
+			count[j] = 0;
+			//when columns are eliminated, remove them from the total number of characters
+			numNonMissingRealSitesInOrigMatrix--;
+			numCombined++;
+			j++;
+			}
+		i = j++;
+		}
+	outman.UserMessage("	***%d IDENTICAL ADJACENT CHARACTERS ELIMINATED***", numCombined);
+	}
+
+//
+//  BSort implements a simple bubblesort
+//
+void DataMatrix::BSort( int byCounts /* = 0 */ ){
+	int swap, k;
+	for( int i = 0; i < numPatterns-1; i++ ) {
+		for( int j = i+1; j < numPatterns; j++ ) {
+			if( byCounts )
+				swap = ( count[i] < count[j] ? 1 : 0 );
+			else
+				swap = ( ComparePatterns( i, j ) > 0 ? 1 : 0 );
+			if( swap ) {
+				SwapCharacters( i, j );
+
+				k = count[i];
+				count[i] = count[j];
+				count[j] = k;
+
+				k = numStates[i];
+				numStates[i] = numStates[j];
+				numStates[j] = k;
+
+				k = number[i];
+				number[i] = number[j];
+				number[j] = k;
+			}
+		}
+	}
+}
+
+void DataMatrix::DebugSaveQSortState( int top, int bottom, int ii, int jj, int xx, const char* title )
+{
+	ofstream qsf( "qsstate.txt", ios::out | ios::app );
+	qsf << endl << title << endl;
+
+	int i, j;
+	for( j = 0; j < numPatterns; j++ )
+	{
+		qsf << setw(6) << j << "  ";
+		for( i = 0; i < nTax; i++ )
+			qsf << DatumToChar( Matrix( i, j ) );
+		if( j == top )
+			qsf << " <-- top   ";
+		if( j == ii )
+			qsf << " <-- i     ";
+		if( j == bottom )
+			qsf << " <-- bottom";
+		if( j == jj )
+			qsf << " <-- j     ";
+		if( j == xx )
+			qsf << " <-- x     ";
+		qsf << endl;
+	}
+
+	qsf.close();
+}
+
+//
+//  QSort implements the quicksort algorithm
+//
+void DataMatrix::QSort( int top, int bottom )
+{
+	int i = top;
+	int j = bottom;
+	int x = ( top + bottom ) / 2;
+	//DebugSaveQSortState( top, bottom, i, j, x, "Entering QSort" );
+	do {
+		while( ComparePatterns( i, x ) < 0  &&  i < bottom ) i++ ;
+		while( ComparePatterns( x, j ) < 0  &&  j > top    ) j-- ;
+
+		if( i <= j ) {
+			//DebugSaveQSortState( top, bottom, i, j, x, "Just about to swap i and j" );
+			SwapCharacters( i, j );
+
+			if( x == i )		// keep track of the reference pattern!
+				x = j;
+			else if( x == j )	
+				x = i;
+			i++;
+			if(j) j--;
+			//DebugSaveQSortState( top, bottom, i, j, x, "Just after swapping" );
+		}
+
+	} while( i <= j );
+
+	if( top <  j      ) QSort( top, j      );
+	if( i   <  bottom ) QSort(   i, bottom );
+}
+
+int DataMatrix::GetToken( istream& in, char* tokenbuf, int maxlen, bool acceptComments /*=true*/ )
+{
+	int ok = 1;
+
+	int i;
+	char ch = ' ';
+
+	// skip leading whitespace
+	while( in && ( isspace(ch) || ch == '[' ) ){
+		in.get(ch);
+		if(ch == '[' && acceptComments==false) return -1;
+		}
+	if( !in ) return 0;
+
+	tokenbuf[0] = ch;
+	tokenbuf[1] = '\0';
+	tokenbuf[maxlen-1] = '\0';
+		
+	for( i = 1; i < maxlen-1; i++ ) {
+		in.get(ch);
+		if( isspace(ch) || ch == ']' )
+			break;
+		tokenbuf[i] = ch;
+		tokenbuf[i+1] = '\0';
+	}
+
+	if( i >= maxlen-1 )
+		ok = 0;
+
+	return ok;
+}
+
+int DataMatrix::GetToken( FILE *in, char* tokenbuf, int maxlen){
+	int ok = 1;
+
+	int i;
+	char ch = ' ';
+
+	// skip leading whitespace
+	while( !ferror(in) && ( isspace(ch) || ch == '[' ) ){
+		ch = getc(in);
+		}
+	if( ferror(in) ) return 0;
+
+	tokenbuf[0] = ch;
+	tokenbuf[1] = '\0';
+	tokenbuf[maxlen-1] = '\0';
+		
+	for( i = 1; i < maxlen-1; i++ ) {
+		ch = getc(in);
+		if( isspace(ch) || ch == ']' )
+			break;
+		tokenbuf[i] = ch;
+		tokenbuf[i+1] = '\0';
+	}
+
+	if( i >= maxlen-1 )
+		ok = 0;
+
+	return ok;
+}
+//
+// Read reads in data from a file
+
+int DataMatrix::ReadPhylip( const char* infname){
+
+	//PARTITION
+	ModelSpecification *modSpec = modSpecSet.GetModSpec(0);
+
+	char ch;
+	bool isNexus=false;
+
+	FILE *inf;
+#ifdef BOINC
+	char input_path[512];
+	boinc_resolve_filename(infname, input_path, sizeof(input_path));
+    inf = boinc_fopen(input_path, "r");
+#else
+	inf = fopen(infname, "r");
+#endif
+	if(ferror(inf)) throw ErrorException("problem opening datafile %s for reading", infname);
+	
+	// get comments (note: comments only allowed at the beginning of the file)
+	int end_of_comments = 0;
+	while( !end_of_comments ){
+		ch = getc(inf);
+		if( ch != '/' ) {
+			ungetc(ch, inf);
+			end_of_comments = 1;
+			}
+		else {
+			// ch is a slash, ignore rest of this line
+			while( ch != '\n' && ch != '\r' && ch != EOF) {
+				ch = getc(inf);
+				}
+			}
+		}
+
+	// get the dimensions of the data file
+	int num_taxa=0, num_chars=0;
+	fscanf(inf, "%d  %d", &num_taxa, &num_chars);
+
+	NewMatrix( num_taxa, num_chars );
+
+	// read in the data, including taxon names
+	int blockStartNum = 0, charNum, i;
+	bool firstPass = true;
+	bool allDataRead = false;
+	bool interleaved = false;
+
+	while(allDataRead == false){
+		//loop over the taxa, doing so multiple times for interleaved data
+		for( i = 0; i < num_taxa; i++ ) {
+			if(firstPass){
+				// get name for taxon i
+				char taxon_name[ MAX_TAXON_LABEL ];
+				int ok = GetToken(inf, taxon_name, MAX_TAXON_LABEL);
+				if( !ok ) {
+					throw ErrorException("problem reading data: name for taxon #%d too long", i+1);
+					}
+				SetTaxonLabel( i, taxon_name );
+				}
+
+			// get data for taxon i
+			unsigned char datum;
+			for( charNum = blockStartNum; charNum < num_chars; charNum++ ) {
+				if(firstPass == false && charNum == blockStartNum){
+					do{
+						ch = getc(inf);
+						}while(isspace(ch) && ch != EOF);
+					}
+				else{
+					do{
+						ch = getc(inf);
+						}while(ch == ' ' || ch == '\t');
+					}
+				if(ch == '['){//if there is a comment here, which is how the "color" used to be represented
+					while (ch != ']' && ch != EOF) ch = getc(inf);
+					ch = getc(inf);
+					}
+				if( ch == '.' ){
+	    			datum = Matrix( 0, charNum );
+					}
+				else if(ch == '\n' || ch == '\r'){
+					//file must be interleaved (or broken)
+					if(!interleaved && i != 0)
+						throw ErrorException("Unexpected line break found while reading data for taxon %s", TaxonLabel(i));
+					else{
+						interleaved = true;
+						break;
+						}
+					}
+	 			else{ 
+					if(modSpec->IsAminoAcid() && modSpec->IsCodonAminoAcid() == false)
+						datum = CharToDatum(ch);
+					else 
+						datum = CharToBitwiseRepresentation(ch);
+					}
+				SetMatrix( i, charNum, datum );
+				}
+			}
+		if(charNum == num_chars && i == num_taxa) allDataRead = true;
+		else{
+			firstPass = false;
+			blockStartNum = charNum;
+			}
+		}
+
+	// read in the line containing the counts
+	do{
+		ch = getc(inf);
+		}while(ch != EOF && isspace(ch));
+	if( !feof(inf) ) {
+		if(isdigit(ch) == false) throw ErrorException("Found extraneous information at end of phylip formatted datafile");
+		ungetc(ch, inf);
+		int i;
+		char buf[10];
+		for( i = 0; i < num_chars; i++ ) {
+			int ok = GetToken( inf, buf, 10);
+			if(feof(inf)) break;
+			int cnt = atoi(buf);			
+			SetCount( i, cnt );
+			}
+		if(i != num_chars) throw ErrorException("problem reading pattern counts");
+		else dense = 1;
+		//DJZ 9-13-06
+		//It is very important to properly set the numNonMissingRealSitesInOrigMatrix variable now
+		//to be the sum of the counts, otherwise bootstrapping after reading
+		//a .cond file will give wrong resampling!!!!!
+		numNonMissingRealSitesInOrigMatrix=0;
+		for(int i=0;i<num_chars;i++){
+			numNonMissingRealSitesInOrigMatrix += count[i];
+			}
+		}
+
+	// read in the line containing the number of states for each character
+	if( ferror(inf) == false ) {
+		int i;
+		char buf[10];
+		for( i = 0; i < num_chars; i++ ) {
+			int nstates;
+			GetToken(inf, buf, 10);
+			if( !inf ) break;
+			nstates = atoi(buf);
+			SetNumStates( i, nstates );
+		}
+	}
+
+	fclose(inf);
+	return 1;
+}
+
+int DataMatrix::ReadFasta( const char* infname){
+	char ch;
+	bool isNexus=false;
+
+	//PARTITION
+	ModelSpecification *modSpec = modSpecSet.GetModSpec(0);
+
+	FILE *inf;
+#ifdef BOINC
+	char input_path[512];
+	boinc_resolve_filename(infname, input_path, sizeof(input_path));
+    inf = boinc_fopen(input_path, "r");
+#else
+	inf = fopen(infname, "r");
+#endif
+	if(ferror(inf)) throw ErrorException("problem opening datafile %s for reading", infname);
+	
+	//we don't know in advance what the number of characters or taxa is with fasta files
+	//So, look through the file to get that info, then read it for real
+	
+	int num_taxa=0, num_chars=0, cur_char;
+	char taxon_name[ MAX_TAXON_LABEL ];
+	while( !feof(inf) ){
+		GetToken(inf, taxon_name, MAX_TAXON_LABEL);
+		num_taxa++;
+		cur_char = 0;
+		do{
+			ch = getc(inf);
+			if( !isspace(ch) && ch != '>' && ch != EOF) cur_char++;
+			}while(ch != '>' && ch != EOF);
+		if(num_taxa == 1) num_chars = cur_char;
+		else if(cur_char != num_chars) throw ErrorException("# of characters for taxon %s (%d) not equal\n\tto the # of characters for first taxon (%d)", taxon_name, cur_char, num_chars);
+		}
+	rewind(inf);
+
+	NewMatrix( num_taxa, num_chars );
+
+	for(int i = 0; i < num_taxa; i++ ) {
+		// get name for taxon i
+		char taxon_name[ MAX_TAXON_LABEL ];
+		int ok = GetToken(inf, taxon_name, MAX_TAXON_LABEL);
+		if( !ok ) {
+			throw ErrorException("problem reading data: name for taxon #%d too long", i+1);
+			}
+		SetTaxonLabel( i, taxon_name+1 );
+			
+
+		// get data for taxon i
+		unsigned char datum;
+		for(int charNum = 0; charNum < num_chars; charNum++ ) {
+			do{
+				ch = getc(inf);
+				}while(isspace(ch));
+			if(modSpec->IsAminoAcid() && modSpec->IsCodonAminoAcid() == false)
+				datum = CharToDatum(ch);
+			else 
+				datum = CharToBitwiseRepresentation(ch);
+
+			SetMatrix( i, charNum, datum );
+			}
+		}
+
+	fclose(inf);
+	return 1;
+}
+
+void DataMatrix::DumpCounts( const char* s )
+{
+	ofstream tmpf( "tmpfile.txt", ios::out | ios::app );
+   tmpf << endl << endl;
+   if(s) { tmpf << s << endl; }
+   for( int j = 0; j < numPatterns; j++ ) {
+      tmpf << j << "  " << Count(j) << endl;
+   }
+   tmpf << endl;
+}
+
+//
+// saves data under the name s but with extension changed to '.mlt'
+// if third argument supplied, a NEXUS file ending in '.nex' is saved also
+//
+int DataMatrix::Save( const char* path, char* newfname /* = 0 */, char*
+#if defined( AUTOSAVE_NEXUS )
+	nxsfname /* = 0 */
+#endif
+   )
+{
+	int i, j;//, nchar_total;
+	char newpath[ MAXPATH ];
+
+	strcpy( newpath, path );
+
+#if defined( AUTOSAVE_NEXUS )
+	//  ________________________________________
+	// |                                        |
+	// | save uncompressed data to file nxspath |
+	// |________________________________________|
+	//
+   int k;
+	char nxspath[ MAXPATH ];
+	strcat( nxspath, ".nex" );
+
+	cerr << endl << "Opening file '" << nxspath << "' for saving..." << endl;
+
+	ofstream nxsf( nxspath );
+	if( !nxsf ) {
+		cerr << endl << "Error: could not open file '" << nxspath << "' for saving" << endl;
+		return 0;
+	}
+
+	nchar_total = 0;
+	for( j = 0; j < numPatterns; j++ )
+		nchar_total += Count(j);
+
+	nxsf << "#nexus" << endl << endl;
+	nxsf << "begin data;" << endl;
+	nxsf << "  dimensions ntax=" << nTax << "  nchar=" << nchar_total << ";" << endl;
+	nxsf << "  format missing=? datatype=standard;" << endl;
+	nxsf << "  matrix" << endl;
+
+	for( i = 0; i < nTax; i++ ) {
+		nxsf << TaxonLabel(i) << "  ";
+		nxsf << " [" << TaxonColor(i) << "]  ";
+
+		for( j = 0; j < numPatterns; j++ ) {
+			for( k = 0; k < Count(j); k++ ) {
+				nxsf << DatumToChar( Matrix( i, j ) );
+			}
+		}
+		nxsf << endl;
+	}
+
+	nxsf << ";" << endl;
+	nxsf << "end;" << endl << endl;
+
+	if( !nxsf ) {
+		cerr << endl << "Error saving data to file '" << nxspath << "':  disk full?" << endl;
+		return 0;
+	}
+
+	nxsf.close();
+
+	if( nxsfname ) {
+		strcpy( nxsfname, nxspath );
+	}
+#endif
+
+	//  _______________________________________
+	// |                                       |
+	// | save compressed data to file newpath  |
+	// |_______________________________________|
+	//
+
+	//strcat( newpath, ".comp" );
+	outman.UserMessage("Opening file \"%s\" for saving...", newpath);
+
+	ofstream outf( newpath );
+	if( !outf ) throw ErrorException("Error: could not open file \"%s\"", newpath);
+
+/*	nchar_total = 0;
+	for( j = 0; j < numPatterns; j++ ) {
+		int k = PatternType(j);
+		if( (k & PT_CONSTANT) && !InvarCharsExpected() ) continue;
+		nchar_total++;
+	}
+*/
+
+	outf << "#NEXUS\nbegin data;\ndimensions ntax=" <<nTax << " nchar=" << numPatterns << ";\n";
+	outf << "format datatype=dna missing=? gap=-;\n";
+	outf << "matrix" << endl;
+
+	//outf << nTax << "  " << numPatterns << endl;
+	for( i = 0; i < nTax; i++ ) {
+		outf << TaxonLabel(i) << "  ";
+		for( j = 0; j < numPatterns; j++ ) {
+//			int k = PatternType(j);
+//			if( (k & PT_CONSTANT) && !InvarCharsExpected() ) continue;
+			outf << DatumToChar( Matrix( i, j ) );
+		}
+		outf << endl;
+	}
+
+	outf << ";" << endl;
+	outf << "end;";
+	outf << "begin assumptions;\n";
+	string str;
+	this->MakeWeightSetString(str, "packed");
+	outf << str.c_str() << "\n;end;\n";
+	outf.close();
+	return 1;
+
+	// save a line containing the counts for each character
+	for( j = 0; j < numPatterns; j++ ) {
+//		int k = PatternType(j);
+//		if( (k & PT_CONSTANT) && !InvarCharsExpected() ) continue;
+		outf << Count(j) << ' ';
+	}
+	outf << endl;
+
+	// save a line containing the number of states for each character
+	for( j = 0; j < numPatterns; j++ ) {
+//		int k = PatternType(j);
+//		if( (k & PT_CONSTANT) && !InvarCharsExpected() ) continue;
+		outf << NumStates(j) << ' ';
+	}
+	outf << endl;
+
+	if( !outf ) {
+		cerr << endl << "Error saving data to file '" << newpath << "':  disk full?" << endl;
+		return 0;
+	}
+
+	outf.close();
+
+	/* cjb
+	if( newfname ) {
+		strcpy( newfname, newpath );
+	}
+	*/
+
+	return 1;
+}
+
+void DataMatrix::WriteCollapsedData(){
+		
+//write the data matrix
+	for(int i=0;i<nTax;i++){
+		}
+
+	}
+	
+void DataMatrix::ExplicitDestructor()	{
+	if( count ) MEM_DELETE_ARRAY(count); // count is of length numPatterns
+	if( numStates ) MEM_DELETE_ARRAY(numStates); // numStates is of length numPatterns
+	if( number ) MEM_DELETE_ARRAY(number); // number is of length numPatterns
+	if( taxonLabel ) {
+		int j;
+		for( j = 0; j < nTaxAllocated; j++ )
+			MEM_DELETE_ARRAY( taxonLabel[j] ); // taxonLabel[j] is of length strlen(taxonLabel[j])+1
+	    MEM_DELETE_ARRAY(taxonLabel); // taxonLabel is of length nTax
+		}
+	if( matrix ) {
+		int j;
+		for( j = 0; j < nTax; j++ )
+			MEM_DELETE_ARRAY(matrix[j]); // matrix[j] is of length numPatterns
+		MEM_DELETE_ARRAY(matrix); // matrix is of length nTax
+		}
+	memset(this, 0, sizeof(DataMatrix));
+}
+
+
+void DataMatrix::Reweight(FLOAT_TYPE prob){
+	for(int i=0;i<numPatterns;i++){
+		FLOAT_TYPE r=rnd.uniform();
+		if(r * 2.0 < prob) count[i]++;
+		else if(r < prob) count[i]--;
+		}
+	}
+
+//4-15-08 adding the option to specify a resample proportion, for jackknifing and what Cecile Ane called
+//the "multidimentional bootstrap"
+int DataMatrix::BootstrapReweight(int seedToUse, FLOAT_TYPE resampleProportion){
+	//a seed is passed in and used for the reweighting - Either for restarting or not
+	//Either way we'll return the seed at the end of the reweighting, to be stored as the Population::nextBootstrapSeed
+	//which allows exactly the same bootstraped datasets to be used in multiple runs, but with different
+	//settings for the actual search
+	if(resampleProportion >= 5.0) outman.UserMessage("WARNING: The resampleproportion setting is the proportion to resample,\nNOT the percentage (1.0 = 100%%).\nThe value you specified (%.2f) is a very large proportion.", resampleProportion);
+
+	int originalSeed = rnd.seed();
+	rnd.set_seed(seedToUse);
+
+	//This is a little dumb, but since there are parallel counts and origCounts variables depending on whether the new PatternManager
+	//is being used, need to alias them so that the remainder of this function works unchanged
+	const int *origCountsAlias;
+	if(newOrigCounts.size() > 0){
+		origCountsAlias = &newOrigCounts[0];
+		}
+	else
+		origCountsAlias = origCounts;
+
+	int *countsAlias;
+	if(newCount.size() > 0){
+		countsAlias = &newCount[0];
+		}
+	else
+		countsAlias = count;
+
+	FLOAT_TYPE *cumProbs = new FLOAT_TYPE[numPatterns];
+	
+	FLOAT_TYPE p=0.0;
+	cumProbs[0]=(FLOAT_TYPE) origCountsAlias[0] / ((FLOAT_TYPE) numNonMissingRealCountsInOrigMatrix);
+
+	countsAlias[0] = 0;
+	for(int i = 1;i < numPatterns;i++){
+		cumProbs[i] = cumProbs[i-1] + (FLOAT_TYPE) origCountsAlias[i] / ((FLOAT_TYPE) numNonMissingRealCountsInOrigMatrix);
+		countsAlias[i] = 0;
+		}
+	cumProbs[numPatterns - 1] = 1.0;
+
+	//ofstream deb("counts.log", ios::app);
+	//ofstream deb("counts.log");
+
+	//round to nearest int
+	int numToSample = (int) (((FLOAT_TYPE)numNonMissingRealCountsInOrigMatrix * resampleProportion) + 0.5);
+	if(numToSample != numNonMissingRealCountsInOrigMatrix) outman.UserMessage("Resampling %d characters (%.2f%%).\n", numToSample, resampleProportion*100);
+
+	for(int c=0;c<numToSample;c++){
+		FLOAT_TYPE p=rnd.uniform();
+		int pat=0; 
+		while(p > cumProbs[pat]) 
+			pat++;
+		countsAlias[pat]++;
+		}
+/*
+	for(int i = 0;i < numPatterns;i++)
+		deb << i << "\t" << origCountsAlias[i] << "\t" << countsAlias[i] <<  endl;
+*/
+	//take a count of the number of chars that were actually resampled
+	nonZeroCharCount = 0;
+	int numZero = 0;
+	int totCounts = 0;
+	for(int d=0;d<numPatterns;d++){
+		if(countsAlias[d] > 0) {
+			nonZeroCharCount++;
+			totCounts += countsAlias[d];
+			}
+		else 
+			numZero++;
+		}
+	delete []cumProbs;
+	assert(totCounts == numNonMissingRealCountsInOrigMatrix);
+	assert(nonZeroCharCount + numZero == numPatterns);
+
+	int nextSeed = rnd.seed();
+	rnd.set_seed(originalSeed);
+	return nextSeed;
+	}
+
+void DataMatrix::CheckForIdenticalTaxonNames(){
+	const char *name1, *name2;
+	vector< pair<int, int> > identicals;
+
+	for(int t1=0;t1<nTax-1;t1++){
+		for(int t2=t1+1;t2<nTax;t2++){
+			name1 = TaxonLabel(t1);
+			name2 = TaxonLabel(t2);
+			if(_stricmp(name1, name2) == 0) identicals.push_back(make_pair(t1, t2));
+			}
+		}
+	
+	if(identicals.size() > 0){
+		outman.UserMessage("Error! Multiple sequences with same name encountered!:");
+		for(vector< pair<int, int> >::iterator it=identicals.begin() ; it != identicals.end() ; it++){
+			outman.UserMessage("\t%s : numbers %d and %d", TaxonLabel((*it).first), (*it).first+1, (*it).second+1);
+			}
+		throw(ErrorException("Terminating.  Please make all sequence names unique!"));
+		}
+	}
+
+void DataMatrix::GetStringOfOrigDataColumns(string &str) const{
+	//note that GetSetAsNexusString takes zero offset indeces and converts them to
+	//char nums, ie adds 1 to each
+	NxsUnsignedSet chars;
+	for(int c = numConditioningPatterns;c < numRealSitesInOrigMatrix + numConditioningPatterns;c++)
+		chars.insert(origDataNumber[c]);
+	str = NxsSetReader::GetSetAsNexusString(chars);
+	}
+
+void DataMatrix::CountMissingCharsByColumn(vector<int> &vec){
+	for(int c = 0;c < numPatterns;c++){
+		int missing = 0;
+		for(int t = 0;t < nTax;t++){
+			if(Matrix(t, c) == fullyAmbigChar) 
+				missing++;
+			}
+		vec.push_back(missing);
+		}
+	}
+
+void DataMatrix::MakeWeightSetString(NxsCharactersBlock &charblock, std::string &wtstring, string name){
+	NxsTransformationManager &transformer = charblock.GetNxsTransformationManagerRef();
+	//this is a list of IntWeightToIndexSet objects
+	NxsTransformationManager::ListOfIntWeights intWeights;
+	
+	NxsUnsignedSet dummy;
+	//the charset was empty, implying that all characters in this block will go into a single matrix
+	for(int i = 0;i < charblock.GetNumChar();i++)
+		dummy.insert(i);
+
+	for(int countNum = 0;dummy.size() > 0;countNum++){
+		//this is a pair<int, std::set<unsigned> >
+		NxsTransformationManager::IntWeightToIndexSet weightToIndex;
+		weightToIndex.first = countNum;
+		for(NxsUnsignedSet::iterator it = dummy.begin();it != dummy.end();){
+			int thisCount = Count(*it);
+			if(thisCount == countNum){
+				weightToIndex.second.insert(*it);
+				int err = *it++;
+				dummy.erase(err);
+				}
+			else it++;
+			}
+		if(weightToIndex.second.size() > 0)
+			intWeights.push_back(weightToIndex);
+		}
+	
+	transformer.AddIntWeightSet("bootstrapped", intWeights, true);
+	ostringstream out;
+	transformer.WriteWtSet(out);
+	wtstring = out.str();
+	}
+
+void DataMatrix::MakeWeightSetString(std::string &wtstring, string name){
+	NxsTransformationManager transformer;// = charblock.GetNxsTransformationManagerRef();
+	//this is a list of IntWeightToIndexSet objects
+	NxsTransformationManager::ListOfIntWeights intWeights;
+	
+	NxsUnsignedSet dummy;
+	//the charset was empty, implying that all characters in this block will go into a single matrix
+	for(int i = 0;i < numPatterns;i++)
+		dummy.insert(i);
+
+	for(int countNum = 0;dummy.size() > 0;countNum++){
+		//this is a pair<int, std::set<unsigned> >
+		NxsTransformationManager::IntWeightToIndexSet weightToIndex;
+		weightToIndex.first = countNum;
+		for(NxsUnsignedSet::iterator it = dummy.begin();it != dummy.end();){
+			int thisCount = Count(*it);
+			if(thisCount == countNum){
+				weightToIndex.second.insert(*it);
+				int err = *it++;
+				dummy.erase(err);
+				}
+			else it++;
+			}
+		if(weightToIndex.second.size() > 0)
+			intWeights.push_back(weightToIndex);
+		}
+	
+	transformer.AddIntWeightSet(name.c_str(), intWeights, true);
+	ostringstream out;
+	transformer.WriteWtSet(out);
+	wtstring = out.str();
+	}
+
diff --git a/src/datamatr.h b/src/datamatr.h
new file mode 100644
index 0000000..853b5d9
--- /dev/null
+++ b/src/datamatr.h
@@ -0,0 +1,517 @@
+// GARLI version 2.1 source code
+// Copyright 2005-2014 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+//	NOTE: Portions of this source adapted from GAML source, written by Paul O. Lewis
+
+#ifndef __DATAMATR_H
+#define __DATAMATR_H
+
+#include <string>
+#include <cstring>
+#include <iostream>
+#include <cassert>
+#include <stdio.h>
+#include <math.h>
+using namespace std;
+
+#include "ncl.h"
+#include "errorexception.h"
+
+class GarliReader;
+
+typedef FLOAT_TYPE** DblPtrPtr;
+#define MAX_STATES (8*sizeof(unsigned char))
+#define FIRST_STATE	(0x01)
+#define LAST_STATE	(0x80)
+#define MISSING_DATA	(0xf)		// all bits set to 1
+
+#if defined( CPLUSPLUS_EXCEPTIONS )
+#  define THROW_BADSTATE(a) throw XBadState(a)
+#else
+#  define THROW_BADSTATE(a) BadState(a)
+#endif
+
+class SitePattern{
+public:
+	int count;
+	int origCount;
+	int numStates;
+	int constStates;
+	static int numTax;
+	static int maxNumStates;
+	vector<unsigned char> stateVec;
+	vector<int> siteNumbers;
+	enum patternType{
+		MISSING = 1,
+		CONSTANT = 2,
+		UNINFORM_VARIABLE = 3,
+		INFORMATIVE = 4
+		}type;
+
+	SitePattern(){Reset();}
+	SitePattern(const SitePattern &rhs){
+		Reset();
+		siteNumbers = rhs.siteNumbers;
+		stateVec = rhs.stateVec;
+		count = rhs.count;
+		origCount = rhs.origCount;
+		numStates = rhs.numStates;
+		constStates = rhs.constStates;
+		}
+	~SitePattern(){
+		stateVec.clear();
+		siteNumbers.clear();
+		}
+	void Reset(){
+		count = origCount = numStates = constStates = -1;
+		stateVec.clear();
+		siteNumbers.clear();
+//		if(numTax > 0)
+//			stateVec.reserve(numTax);
+		}
+	static void SetStatics(int nt, int ns){
+		numTax = nt;
+		maxNumStates = ns;
+		}
+
+	//bool PatternLessThan(const SitePattern &lhs, const SitePattern &rhs) const;
+	bool operator==(const SitePattern &rhs) const;
+	bool operator<(const SitePattern &rhs) const;
+	void AddChar(const unsigned char c){
+		stateVec.push_back(c);
+		}
+	void SetCount(int c) {
+		count = origCount = c;
+		}
+	int CalcPatternTypeAndNumStates(vector<unsigned int> &stateCounts);
+	int MinScore(set<unsigned char> patt, int bound, unsigned char bits=15, int prevSc=0) const;
+	};
+
+//An alternate and several order of magnitude faster means of packing data.  The functionality is really the
+//same as that in DataMatrix functions, it just uses better classes and STL sorting.  To keep from changing lots of
+//code, even if this is used the results are copied back into their usual locations in DataMatrix.
+//Also need to keep around DataMatrix packing for certain types of data.
+//THIS DOES NOT CURRENTLY SUPPORT CONDITIONING PATTERNS, NOR IS IS CURRENTLY USED FOR NON-SEQUENCE DATA
+class PatternManager{
+	friend class DataMatrix;
+
+	int numTax;
+	int maxNumStates;
+	int pman_numPatterns;				//this is the CURRENT number of patterns, so will change during packing
+
+	int pman_numRealSitesInOrigMatrix;				
+	int pman_numNonMissingRealCountsInOrigMatrix;				
+	int pman_numNonMissingChars;			
+	int pman_numMissingChars;			
+	int pman_numConstantChars;			
+	int pman_numInformativeChars;		
+	int pman_numUninformVariableChars;	
+	
+	int lastConstant;					
+	bool compressed;					//dense
+	list<SitePattern> patterns;
+	list<SitePattern> uniquePatterns;
+	vector<int> constStates;
+
+	~PatternManager(){
+		patterns.clear();
+		uniquePatterns.clear();
+		constStates.clear();
+		}
+	virtual void NewCollapse();
+	virtual void NewPack();
+	virtual void NewSort();
+	virtual void NewDetermineConstantSites();
+
+public:
+	void Initialize(int nt, int max){
+		Reset();
+		numTax = nt;
+		maxNumStates = max;
+		SitePattern::maxNumStates = max;
+		SitePattern::numTax = nt;
+		}
+	void Reset(){
+		numTax = maxNumStates = pman_numRealSitesInOrigMatrix = pman_numNonMissingChars = pman_numPatterns = pman_numMissingChars = pman_numConstantChars = pman_numInformativeChars = lastConstant = pman_numUninformVariableChars = 0;
+		compressed = false;
+		patterns.clear();
+		uniquePatterns.clear();
+		constStates.clear();
+		}
+	void AddPattern(const SitePattern &add){
+		patterns.push_back(add);
+		}
+	//these are named along the lines of the old DataMatrix members
+	int NChar() const {
+		if(uniquePatterns.empty())
+			return -1;
+		else
+			return uniquePatterns.size();
+		}
+	void ProcessPatterns();
+	void CalcPatternTypesAndNumStates();
+	//funcs for getting info back out of the patman into the datamatrix object
+	void FillNumberVector(vector<int> &nums) const;
+	void FillTaxaXCharMatrix(unsigned char **mat) const;
+	void FillNumStatesVector(vector<int> &ns) const;
+	void FillCountVector(vector<int> &counts) const;
+	void FillConstStatesVector(vector<int> &cs) const;
+	void FillIntegerValues(int &numMissingChars, int &numConstantChars, int &numVariableUninformChars, int &numInformativeChars, int &lastConstant, int &numRealSitesInOrigMatrix, int &numNonMissingRealCountsInOrigMatrix, int &totNChar, int &NChar) const;
+	};
+
+// Note: the class below has pure virtual member functions
+class DataMatrix{
+protected:
+	//This currently all becomes a bit of a nightmare when there are conditioning patterns included in the matrix, a la mkv.
+	//Some of the below include those counts (numConstantChars, numPatterns), but many don't (anything with OrigMatrix in the name)
+	int		nTax;
+	int		nTaxAllocated;			//allocate more than nTax to allow for the addition of dummy taxa
+									//this will only be used during allocating and deallocation
+									//if a dummy taxon is created then nTax will be incremented
+	
+	int		numPatterns;			//This is the size of the *CURRENT* *INTERNAL* representation of a datamatrix.
+									//Thus, depending on when during the data pattern processing procedure, it may be
+									//the same size as the true matrix, include zero count sites, or only consist of unique
+									//patterns.  After processing it will be the number of unique patterns that are
+									//looped over in likelihood calculations, so is the most frequently used size value.
+									//It DOES always include conditioning patterns.
+
+	unsigned numConditioningPatterns;	//Extra dummy characters added to the start of the matrix (currently all constant)
+										//In terms of packing and processing, they aren't treated differently, and it is
+										//REQUIRED that they will pack and appear as the first N characters in the matrix.
+										//They are also the first N characters in the matrix BEFORE packing as well.
+
+	int 	numRealSitesInOrigMatrix;	//The actual number of columns in the data matrix read in, WITHOUT excluded chars
+										//or conditioning patterns, but with all missing.  This is mainly for outputting 
+										//things with reference to the orig matrix.
+
+	int		numNonMissingRealSitesInOrigMatrix;	//as numRealSitesInOrigMatrix, with all missing columns removed
+
+	int 	numNonMissingRealCountsInOrigMatrix;	//The actual number of effective characters in the data matrix read in.
+													//Will differ from numRealSitesInOrigMatrix in that all missing columns aren't
+													//included, and because of any wtsets.  Does not contain missing or conditioning patterns
+													//This is critically used in bootstrap resampling.
+
+	int		nonZeroCharCount;		//this is the number of character patterns that have non-zero
+									//counts after bootstrap resampling.  Zero count characters can
+									//be avoided in the conditional likelihood calcs, but how this
+									//is done varies depending on the context
+									//only used when outputting something relative to input alignment
+	
+	int		numMissingChars;
+	int		numConstantChars;
+	int		numInformativeChars;
+	int		numVariableUninformChars;
+
+	int		dense;					//whether the data has been sorted and identical patterns combined
+	
+	unsigned char**         matrix;
+	PatternManager patman;
+
+	int*		count;
+	int*		origCounts;
+	//maping of chars to columns. indeces are original char numbers, values are the packed column representing that char
+	//both start at 0, so offset upon output
+	int*		number; 
+	/*in the partitioned context number maps the columns of the original partition subset to the columns of the
+	compressed matrix.  So, number[j] is the column of the packed matrix that represents column j of the 
+	partition subset.  So, this may have no relationship to the original data matrix before the subsets were
+	even made.  origDataNumber then maps the columns of the uncompressed subset to the original full datamatrix.
+	Thus, number[j] is the compressed column that represents uncompressed subset column j (many-to-one mapping)
+	origDataNumber[j] is the column of the orignal matrix that corresponds to uncompressed subset column j (one-to-one mapping)
+	example (zero offset): partition by codon position, so sub1 = {0, 3, 6, ...}, sub2 = {1, 4, 7, ...} and sub3 = {2, 5, 8, ...}
+	each subset is its own datamatrix object, with its own number and origDataNumber arrays.
+	so, sub1->number[0] is the column of the compressed sub1 matrix that represents the first column of sub1
+	    (same for sub2 and sub3)
+	    sub1->number[1] is the column of the compressed sub2 matrix that represents the second column of sub2
+	    (same for sub2 and sub3)
+		sub1->origDataNumber[0] = 0
+		sub2->origDataNumber[0] = 1
+		sub1->origDataNumber[1] = 3
+		sub2->origDataNumber[1] = 4
+		etc.
+	the values in number must the shuffled around as the matrix is compressed
+	the values in origDataNumber are set when SetMatrix is called, and don't change thereafter
+	*/
+	int*		origDataNumber;
+
+	//These are new correlates to the old dynamicaly allocated arrays.  They will be filled from
+	//the pattern manager.
+	vector<int> newNumber;
+	vector<int> newNumStates;
+	vector<int> newCount;
+	vector<int> newOrigCounts;
+	vector<int> newConstStates;
+	vector<string> newTaxonLabel;
+
+	char**          taxonLabel;
+	int 	lastConstant;
+	int 	*constStates;//the state (or states) that a constant site contains
+	unsigned char fullyAmbigChar;
+
+	protected:
+		int*	numStates;
+		int     maxNumStates;
+		bool	useDefaultWeightsets;
+		string	wtsetName;
+		bool	usePatternManager;
+
+	protected:
+		char	info[80];
+		virtual void	SwapCharacters( int i, int j );
+		virtual int	ComparePatterns( const int i, const int j ) const;
+		void	BSort( int byCounts = 0 );
+		void	DebugSaveQSortState( int top, int bottom, int ii, int jj, int xx, const char* title );
+		void	QSort( int top, int bottom );
+		void	ReplaceTaxonLabel( int i, const char* s );
+
+	public:
+		enum {
+			PT_MISSING		= 0x0000,
+			PT_CONSTANT		= 0x0001,
+			PT_INFORMATIVE		= 0x0002,
+			PT_VARIABLE		= 0x0004
+		};
+
+	public:
+		DataMatrix() : dense(0), nTax(0), numPatterns(0), matrix(0), count(0),
+			number(0), taxonLabel(0), numStates(0),
+			numMissingChars(0), numConstantChars(0), numInformativeChars(0), numVariableUninformChars(0),
+			lastConstant(-1), constStates(0), origCounts(0),
+			fullyAmbigChar(15), useDefaultWeightsets(true), usePatternManager(false),
+			nTaxAllocated(0), origDataNumber(0), numConditioningPatterns(0)
+			{ memset( info, 0x00, 80 ); }
+		DataMatrix( int ntax, int nchar )
+			: nTax(ntax), numPatterns(nchar), dense(0), matrix(0), count(0),
+			number(0), taxonLabel(0), numStates(0),
+			numMissingChars(0), numConstantChars(0), numInformativeChars(0), numVariableUninformChars(0),
+			lastConstant(-1), constStates(0), origCounts(0),
+			fullyAmbigChar(15), useDefaultWeightsets(true), usePatternManager(false),
+			nTaxAllocated(0), origDataNumber(0), numConditioningPatterns(0)
+			{ memset( info, 0x00, 80 ); NewMatrix(ntax, nchar); }
+		virtual ~DataMatrix();
+
+		// pure virtual functions - must override in derived class
+		virtual unsigned char	CharToDatum( char ch )	const			= 0;
+		virtual unsigned char CharToBitwiseRepresentation( char ch ) const= 0;
+		virtual char	DatumToChar( unsigned char d )	const           = 0;
+		virtual unsigned char	FirstState()		    const           = 0;
+		virtual unsigned char	LastState()		        const           = 0;
+		virtual void CalcEmpiricalFreqs() = 0;
+//		virtual FLOAT_TYPE	Freq( unsigned char, int = 0)	                        = 0;
+
+		// virtual functions - can override in derived class
+		virtual FLOAT_TYPE	TransitionProb( int /*i*/, int /*j*/
+			, int /*site*/, FLOAT_TYPE /*brlen*/) { return 0.0; }
+		virtual int NumStates(int j) const
+			{ return ( numStates && (j < numPatterns) ? numStates[j] : 0 ); }
+
+		void SetUsePatternManager(bool tf) {usePatternManager = tf;}
+		bool GetUsePatternManager() const {return usePatternManager;}
+		void ProcessPatterns();
+		void OutputDataSummary() const;
+
+		void GetDataFromPatternManager();
+		// functions for getting the data in and out
+		int GetToken( istream& in, char* tokenbuf, int maxlen, bool acceptComments=true );
+		int GetToken( FILE *in, char* tokenbuf, int maxlen);
+		int ReadPhylip( const char* filename);
+		int ReadFasta( const char* filename);
+		int Save( const char* filename, char* newfname = 0, char* nxsfname = 0 );
+
+		char*	DataType() { return info; }
+		int     unsigned charToInt( unsigned char d ) const { return (int)d; }
+
+		int NTax() const { return nTax; }
+		void SetNTax(int ntax) { nTax = ntax; }
+
+		virtual int NChar() const { return numPatterns; }
+		int TotalNChar() const { return numNonMissingRealSitesInOrigMatrix; }
+		int GapsIncludedNChar() const { return numRealSitesInOrigMatrix; }
+		void SetNChar(int nchar) { numPatterns = nchar; }
+		unsigned NumConditioningPatterns() const{return numConditioningPatterns;}
+
+		int BootstrappedNChar() {return nonZeroCharCount;} 
+		void Flush() { NewMatrix( 0, 0 ); }
+		int Dense() const { return dense; }
+		
+		//argument here is column number from uncompressed subset
+		//return val is compressed pattern representing that column
+		int Number(int j) const{
+			if(newNumber.size() > 0)
+				return newNumber[j];
+			assert(j < numRealSitesInOrigMatrix + numConditioningPatterns);
+			return number[j];
+			}
+
+		//argument here is column number from uncompressed subset
+		//return val is column from original full matrix before partitioning
+		int OrigDataNumber(int j) const{
+			assert(j < numRealSitesInOrigMatrix + numConditioningPatterns);
+			return origDataNumber[j];
+			}
+
+		virtual int Count(int j) const{ 
+			if(newCount.size() > 0)
+				return newCount[j];
+			assert(j < numPatterns);
+			return count[j];
+			}
+		virtual int CountByOrigIndex(int j) const{ 
+			if(newCount.size() > 0)
+				if(newNumber.size() > 0){
+					assert(newCount.size() > j);
+					return newCount[newNumber[j]];
+					}
+			assert(j < numRealSitesInOrigMatrix + numConditioningPatterns);
+			return count[number[j]];
+			}
+		virtual const int *GetCounts() const {
+			if(newCount.size() > 0)
+				return &(newCount[0]);
+			return count;
+			}
+		const int *GetConstStates() const {
+			if(newConstStates.size() > 0)
+				return &(newConstStates[0]);
+			return constStates;
+			}
+		void SetCount(int j, int c){
+			if(newCount.size() > 0){
+				assert(newCount.size() > j);
+				newCount[j] = c;
+				}
+			else
+				if( count && (j < numPatterns) ) 
+					count[j] = c; 
+			}
+		void SetNumStates(int j, int c){ 
+			if( numStates && (j < numPatterns) ) numStates[j] = c;
+			}
+		const char* TaxonLabel(int i) const{
+			return ( taxonLabel && (i < nTax) ? taxonLabel[i] : 0 );
+			}
+		void SetTaxonLabel(int i, const char* s);
+		
+		int TaxonNameToNumber(const NxsString &name) const;
+
+		void CopyNamesFromOtherMatrix(const DataMatrix *dat){
+			assert(taxonLabel);
+			for(int t=0;t<nTax;t++) 
+				SetTaxonLabel(t, dat->TaxonLabel(t));
+			}
+
+		void BeginNexusTreesBlock(ofstream &treeout) const;
+		void BeginNexusTreesBlock(string &trans) const;
+
+		virtual void CreateMatrixFromNCL(const NxsCharactersBlock *, NxsUnsignedSet &charset) = 0;
+		
+		virtual unsigned char Matrix( int i, int j ) const {
+			assert( matrix );
+			assert( i >= 0 );
+			assert( i < nTax );
+			assert( j >= 0 );
+			assert( j < numPatterns );
+			return (unsigned char)matrix[i][j];
+			}
+
+		unsigned char *GetRow( int i) const {
+			assert( matrix );
+			assert( i >= 0 );
+			assert( i < nTax );
+			return matrix[i];
+		}
+		virtual void SetMatrix( int i, int j, unsigned char c){
+			if(matrix && (i < nTax) && (j < numPatterns))
+				matrix[i][j] = c;
+			}
+		void SetOriginalDataNumber(const int subsetMatColumn, const int origMatColumn){
+			origDataNumber[subsetMatColumn] = origMatColumn;			
+			}
+
+		int MatrixExists() const { return ( matrix && nTax>0 && numPatterns>0 ? 1 : 0 ); }
+		int NMissing() const { return numMissingChars; }
+		int NConstant() const { return numConstantChars; }
+		int LastConstant() const {return lastConstant;}
+		int NInformative() const { return numInformativeChars; }
+		int NVarUninform() const { return numVariableUninformChars; }
+
+		DataMatrix& operator =(const DataMatrix&);
+
+		void Sort( int byCounts = 0 ){
+			byCounts;
+			QSort( 0, NChar()-1 );
+			}
+		virtual int PatternType( int , unsigned int *) const;	// returns PT_XXXX constant indicating type of pattern
+		void Summarize();       // fills in numConstantChars, numInformativeChars, and numVariableUninformChars data members
+		virtual void Collapse();
+		void EliminateAdjacentIdenticalColumns();
+		virtual void Pack();
+		void NewMatrix(int nt, int nc);	// flushes old matrix, creates new one
+		void ResizeCharacterNumberDependentVariables(int nCh);
+		int PositionOf( char* s ) const; // returns pos (0..nTax-1) of taxon named s
+		void DumpCounts( const char* s );
+		void WriteCollapsedData();  //DZ
+		void SaveNexus(const char* filename, int iosFlags /* = 0 */); //DZ
+		virtual void DetermineConstantSites();
+		void ExplicitDestructor();  // cjb - totally clear the DataMatrix and revert it to its original state as if it was just constructed
+		void CheckForIdenticalTaxonNames();
+		bool DidUseDefaultWeightsets() const {return (wtsetName.length() > 0);}
+		string WeightsetName() const { return wtsetName;}
+
+		//for determining parsimony informative chars
+		int MinScore(set<unsigned char> patt, int bound, unsigned char bits=15, int sc=0) const;
+		void GetStringOfOrigDataColumns(string &str) const;
+
+	public:	
+      void ReserveOriginalCounts(){
+		if(usePatternManager == false){
+			if(origCounts == NULL) 
+				origCounts = new int[numPatterns];
+			}
+		else
+			assert(newOrigCounts.size() == 0);
+  		for(int i=0;i<numPatterns;i++){
+			if(newCount.size() > 0){
+				assert(newCount.size() > i);
+				newOrigCounts.push_back(newCount[i]);
+				}
+			else
+				origCounts[i] = count[i];
+  			}
+  		}
+      void RestoreOriginalCounts(){
+			if(origCounts == NULL) 
+				return;
+      		for(int i=0;i<numPatterns;i++){
+				if(newCount.size() > 0){
+					assert(newCount.size() > i);
+					newCount[i] = newOrigCounts[i];
+					}
+				else
+      				count[i] = origCounts[i];
+      			}
+      		}
+      void Reweight(FLOAT_TYPE prob);
+      virtual int BootstrapReweight(int seedToUse, FLOAT_TYPE resampleProportion);
+	  void CountMissingCharsByColumn(vector<int> &vec);
+	  void MakeWeightSetString(NxsCharactersBlock &charblock, string &wtstring, string name);
+      void MakeWeightSetString(std::string &wtstring, string name);
+};
+
+#endif
+
diff --git a/src/defs.h b/src/defs.h
new file mode 100644
index 0000000..87721de
--- /dev/null
+++ b/src/defs.h
@@ -0,0 +1,161 @@
+// GARLI version 2.1 source code
+// Copyright 2005-2014 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+
+#ifndef DEFS
+#define DEFS
+
+#if defined(HAVE_CONFIG_H)
+	#include "config.h"
+#endif
+//these will be defined by either the Microsoft compiler
+//or the intel compiler when openmp support is turned on
+//by compiling with /openmp (ms) or -openmp (icc)
+//Nothing else should need to be defined anywhere to get 
+//openMP working
+#if defined (__OPENMP) || defined (_OPENMP)
+	#include "omp.h"
+	#define OPEN_MP
+	#define OMP_INTINTCLA
+	#define OMP_INTTERMCLA
+	#define OMP_TERMDERIV
+	#define OMP_INTDERIV
+	
+	#define OMP_INTINTCLA_NSTATE
+	#define OMP_INTTERMCLA_NSTATE
+	#define OMP_TERMDERIV_NSTATE
+	#define OMP_INTDERIV_NSTATE
+	#define OMP_INTSCORE_NSTATE
+	#define OMP_TERMSCORE_NSTATE
+#endif
+
+/*
+#ifndef NDEBUG
+#undef NDEBUG
+#endif
+*/
+
+#define USE_COUNTS_IN_BOOT
+
+//#undef OPT_DEBUG
+
+#define ONE_BRANCH_INS_DEL
+
+//The ONLY thing that should need to be done to turn on memcheck leak detection
+//should be defining MONITORING_ALLOCATION here
+#undef MONITORING_ALLOCATION
+#include "memchk.h"
+
+#define ADAPTIVE_BOUNDED_OPT
+#define ALT_NR_BAIL
+#define PUSH_TO_MIN_BLEN
+#define SUM_AA_REL_RATES
+#define NEW_BUMPING
+#define STOCHASTIC_STARTING_BLENS
+#undef IGNORE_SMALL_TOPO_IMP
+#undef INCLUDE_PERTURBATION
+#undef SUBTREE_VERSION
+//#undef ENABLE_CUSTOM_PROFILER
+//#undef SINGLE_PRECISION_FLOATS
+//#undef SWAP_BASED_TERMINATION
+
+//#undef OUTPUT_UNIQUE_TREES
+#undef VARIABLE_OPTIMIZATION
+
+#undef INPUT_RECOMBINATION
+#define NUM_INPUT 12
+
+//#undef ALLOW_SINGLE_SITE
+
+#undef EQUIV_CALCS
+
+typedef double MODEL_FLOAT;
+
+#ifdef SINGLE_PRECISION_FLOATS
+	typedef float FLOAT_TYPE;
+	#define ONE_POINT_ZERO 1.0f
+	#define ZERO_POINT_FIVE 0.5f
+	#define ZERO_POINT_ZERO 0.0f
+	#define DEF_MIN_BRLEN 1e-8f
+	#define DEF_MAX_BRLEN 100.0f
+	#define DEF_STARTING_BRLEN 0.05f
+	#define GARLI_FP_EPS FLT_EPSILON
+	#define LUMP_LIKES
+	#if !defined(LUMP_FREQ)
+		#define LUMP_FREQ 400
+	#endif
+#else
+	typedef double FLOAT_TYPE;
+	#define ONE_POINT_ZERO 1.0
+	#define ZERO_POINT_FIVE 0.5
+	#define ZERO_POINT_ZERO 0.0
+	#define DEF_MIN_BRLEN 1e-8
+	#define DEF_MAX_BRLEN 100.0
+	#define DEF_STARTING_BRLEN 0.05
+	#define GARLI_FP_EPS DBL_EPSILON
+	#if !defined(LUMP_FREQ)
+		#define LUMP_FREQ 400
+	#endif
+#endif
+
+#define MAXPATH   		256
+#define DEF_PRECISION	8
+
+#define MEM_DELETE_ARRAY(v)		{ delete [] v; v=NULL; }
+#define MEM_NEW_ARRAY(a,t,n)	{ a = new t[n]; }
+
+#ifdef BOINC
+	#define WRITE_TO_FILE(ptr, size, count) write((void *) ptr, (size_t) size, (size_t) count)
+	#define OUTPUT_CLASS MFILE
+
+	#include "boinc_api.h"
+	#include "filesys.h"
+	#ifdef _WIN32
+		#include "boinc_win.h"
+	#else
+		#include "config.h"
+	#endif
+#else
+	#define WRITE_TO_FILE(ptr, size, count) write((const char *) ptr, (streamsize) size*count)
+	#define OUTPUT_CLASS ofstream
+#endif
+
+//mpi message tags
+#ifdef MPI_VERSION
+#define TAG_PARAMS_SIZE			1
+#define TAG_PARAMS				2
+#define TAG_DATA_SIZE			3
+#define TAG_DATA				4
+#define TAG_TREE_STRINGS_COUNT	5
+#define TAG_TREE_STRINGS_SIZE	6
+#define TAG_TREE_STRINGS		7
+#define TAG_CONFIG				8
+#define TAG_QUIT				9
+#define TAG_KAPPAS				10
+#define TAG_NINDIVS				11
+#define TAG_ACCEPT_COUNT		12
+#define TAG_TREE_STRINGS_REQUEST 13
+#define TAG_SCORE				14
+#define TAG_PIS					15
+#define TAG_MODEL				16
+#define TAG_REMOTE_TYPE_SWITCH	17
+#define TAG_SUBTREE_DEFINE		18
+#define TAG_SUBTREE_ITERATION	19
+#define TAG_PERTURB				20
+#endif
+
+#endif
diff --git a/src/errorexception.h b/src/errorexception.h
new file mode 100644
index 0000000..ca05c01
--- /dev/null
+++ b/src/errorexception.h
@@ -0,0 +1,125 @@
+// GARLI version 1.00 source code
+// Copyright 2005-2010 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef ERROREXCEPTION
+#define ERROREXCEPTION
+
+#include <stdarg.h>
+#include <cassert>
+#include <cstring>
+#include <ostream>
+#include "outputman.h"
+
+using namespace std;
+
+extern OutputManager outman;
+
+#define BUFFER_LENGTH 500
+
+class ErrorException{
+	
+	public:
+	char *message;
+	size_t messlen;
+	//char message[5000];
+	//char message[400];
+	ErrorException(){
+		message = NULL;
+		}
+/*
+	ErrorException(const char *fmt, ...){
+		message = new char[500];
+		va_list vl;
+		va_start(vl, fmt);
+		vsprintf(message, fmt, vl);
+		assert(strlen(message) < 5000);
+		va_end(vl);
+		}
+*/
+	ErrorException(const ErrorException &other){
+		messlen = strlen(other.message);
+		message = new char[messlen + 1];
+		strcpy(message, other.message);
+		}
+
+	ErrorException(const char *fmt, ...){
+		messlen = BUFFER_LENGTH;
+		message = new char[messlen];
+
+		va_list vl;
+		va_start(vl, fmt);
+		int len = vsnprintf(message, messlen, fmt, vl);
+		va_end(vl);
+
+		if((len > -1 && len < messlen) == false){//default buffer is not long enough or there was an error
+			delete []message;
+			message = NULL;
+			//char *longmessage = NULL;
+			if(len > -1){//on unix systems vsnprintf returns the required length.  There is some
+				//some ambiguity about whether it includes the null termination or not, but
+				//the number passed to vsnprintf should definitely include it.
+					
+				message = new char[len+2];
+				va_start(vl, fmt);
+				vsnprintf(message, len+1, fmt, vl);
+				va_end(vl);
+				}
+			else{
+#if defined(_MSC_VER)
+				//on windows a negative value means that the length wasn't engough
+				messlen = BUFFER_LENGTH * 2;
+				message = new char[messlen+1];
+				va_start(vl, fmt);
+				while(vsnprintf(message, messlen, fmt, vl) < 0){
+					delete []message;
+					messlen *= 2;
+					message = new char[messlen+1];
+					va_end(vl);
+					va_start(vl, fmt);
+					}
+				va_end(vl);
+#else
+				//otherwise negative means a formatting error
+				sprintf(message, "(problem formatting some program output...)");
+				return;
+#endif
+				}
+			//message = longmessage;
+			}
+		}
+
+	~ErrorException(){
+		delete []message;
+		}
+
+	void Print(ostream &out){
+		outman.UserMessage("ERROR!: %s\n\n", message);
+		//out << "ERROR!: " << message << endl << endl;
+		}
+
+	void Print(FILE *out){
+		fprintf(out, "ERROR!: %s\n\n", message);
+		}
+	};
+	
+class UnscoreableException{
+public:
+	UnscoreableException(){};
+	};
+
+#endif
+
diff --git a/src/funcs.cpp b/src/funcs.cpp
new file mode 100644
index 0000000..b219c56
--- /dev/null
+++ b/src/funcs.cpp
@@ -0,0 +1,1038 @@
+// GARLI version 0.96b8 source code
+// Copyright 2005-2008 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+//	NOTE: Portions of this source adapted from:
+//	Press, W. H., B. P. Flannery, S. A. Teukolsky, and W. T. Vetterling.  1992. 
+//	Numerical Recipes in C : The Art of Scientific Computing.  Cambridge University Press, Cambridge.
+
+#if defined(_MSC_VER)
+//POL 23-Feb-2006 VC doesn't have this header, and it was not needed to compile
+//#	include <unistd.h>
+#else
+#	include <unistd.h>
+#endif
+
+#include "defs.h"
+#include "funcs.h"
+#include "population.h"
+#include "tree.h"
+#include "outputman.h"
+#include "garlireader.h"
+
+extern OutputManager outman;
+
+#undef ROOT_OPT
+#define FOURTH_ROOT
+
+#define LOG_MIN_BRLEN log(min_brlen)
+
+bool FloatingPointEquals(const FLOAT_TYPE first, const FLOAT_TYPE sec, const FLOAT_TYPE epsilon){
+	FLOAT_TYPE diff = fabs(first - sec);
+	return (diff < epsilon);
+	}
+
+//this is for sticking info about what is defined into log files, for later checking
+void OutputImportantDefines(){
+	outman.DebugMessage("#####\nThe following are/are not defined:");
+
+#ifdef RESCALE_ARRAY_LENGTH
+	outman.DebugMessage("RESCALE_ARRAY_LENGTH = %d", RESCALE_ARRAY_LENGTH);
+#endif
+
+	outman.DebugMessageNoCR("LUMP_LIKES : ");
+#ifdef LUMP_LIKES
+	outman.DebugMessage("%d", LUMP_FREQ);
+#else
+	outman.DebugMessage("no");
+#endif
+
+#ifdef DEBUG_SCORES
+	outman.DebugMessage("DEBUG_SCORES");
+#endif
+
+#ifdef OPT_DEBUG
+	outman.DebugMessage("OPT_DEBUG");
+#endif
+
+#ifdef VARIABLE_OPTIMIZATION
+	outman.DebugMessage("VARIABLE_OPTIMIZATION");
+#endif
+
+#ifdef NO_EVOLUTION
+	outman.DebugMessage("NO_EVOLUTION");
+#endif
+
+#ifdef SWAP_BASED_TERMINATION
+	outman.DebugMessage("SWAP_BASED_TERMINATION");
+#endif
+
+#ifdef ADAPTIVE_BOUNDED_OPT
+	outman.DebugMessage("ADAPTIVE_BOUNDED_OPT = yes");
+#else
+	outman.DebugMessage("ADAPTIVE_BOUNDED_OPT = no");
+#endif
+
+#ifdef PUSH_TO_MIN_BLEN
+	outman.DebugMessage("PUSH_TO_MIN_BLEN = yes");
+#else
+	outman.DebugMessage("PUSH_TO_MIN_BLEN = no");
+#endif
+
+#ifdef DEBUG_MESSAGES
+	outman.DebugMessage("DEBUG_MESSAGES = yes");
+#else
+	outman.DebugMessage("DEBUG_MESSAGES = no");
+#endif
+
+	outman.DebugMessage("#####\n");
+	}
+
+#ifdef BROOK_GPU
+#include <brook/brook.hpp>
+//#include <brook/profiler.hpp>
+//using namespace brook::internal;
+
+void  BranchLike2 (::brook::stream des,
+		::brook::stream res,
+		::brook::stream pmat);
+
+void  SecondBranchLike (::brook::stream des,
+		::brook::stream part,
+		::brook::stream res,
+		::brook::stream pmat);
+
+void  Product4 (::brook::stream des1,
+		::brook::stream des2,
+		::brook::stream res);
+
+		brook::stream LCLstream(brook::getStreamType(( float4  *)0), 890, -1);
+		brook::stream RCLstream(brook::getStreamType(( float4  *)0), 890, -1);
+		brook::stream deststream(brook::getStreamType(( float4  *)0), 890, -1);
+//		brook::stream tempstream(brook::getStreamType(( float4  *)0), 890, -1);
+//		brook::stream tempstream2(brook::getStreamType(( float4  *)0), 890, -1);
+		brook::stream Lprstream(brook::getStreamType(( float  *)0), 16, -1);
+		brook::stream Rprstream(brook::getStreamType(( float  *)0), 16, -1);
+#endif
+
+
+//a variety of functions that don't belong to any class
+
+#if defined(SINGLE_PRECISION_FLOATS) && (!defined(_MSC_VER)) || (defined(BOINC) && defined (_WIN32))
+//Overloaded versions of min and max that take different types for the two arguments
+//This should not be used in hot code when possible, and conditional comp should
+//be used to make two different versions of the code
+float min(const double first, const float second) {return min((float) first, second);}
+float min(const float first, const double second) {return min(first, (float) second);}
+float max(const double first, const float second) {return max((float) first, second);}
+float max(const float first, const double second) {return max(first, (float) second);}
+#endif
+
+int FileExists( const char* s )
+{
+
+#ifdef POWERMAC_VERSION	// cjb
+
+	if( s && access( s, 0 ) == 0 )
+		return 1;
+#else
+	if (s)	{
+		ifstream test(s);
+		if(test.good())	{
+			test.close();
+			return 1;
+		}
+	}
+#endif
+
+	return 0;
+}
+/*
+// GetRestartParams extracts the following pieces of information from
+// the first line of the state file:
+//	1. the last generation done on previous run (prev_generations)
+//		- we want to start this run with generation prev_generations
+//	2. the time recorded after the last generation was completed (prev_time)
+//		- we'll start counting seconds with prev_time rather than zero
+//	3. the random number seed with which to begin the run (randomSeed)
+//		- we thus start exactly where we left off before
+//
+void GetRestartParams( Parameters& params )
+{
+	if( !FileExists( params.statefname ) ) throw ErrorException("Error opening state file: %s", params.statefname);
+
+	ifstream sf( params.statefname );
+	sf >> params.prev_generations >> params.prev_time >> params.randomSeed;
+	sf.close();
+	
+	rnd.set_seed( params.randomSeed );
+}
+*/
+
+int GetToken( FILE *in, char* tokenbuf, int maxlen){
+	int ok = 1;
+
+	int i;
+	char ch = ' ';
+
+	// skip leading whitespace
+	while( in && ( isspace(ch) || ch == '[' ) ){
+		ch = getc(in);
+		}
+	if( !in ) return 0;
+
+	tokenbuf[0] = ch;
+	tokenbuf[1] = '\0';
+	tokenbuf[maxlen-1] = '\0';
+		
+	for( i = 1; i < maxlen-1; i++ ) {
+		ch = getc(in);
+		if( isspace(ch) || ch == ']' )
+			break;
+		tokenbuf[i] = ch;
+		tokenbuf[i+1] = '\0';
+	}
+
+	if( i >= maxlen-1 )
+		ok = 0;
+
+	return ok;
+}
+
+bool FileIsNexus(const char *name){
+	if (!FileExists(name))	{
+		throw ErrorException("could not open file: %s!", name);
+		}
+
+	bool nexus = false;
+	FILE *inf;
+#ifdef BOINC
+	inf = boinc_fopen(name, "r");
+#else
+	inf = fopen(name, "r");
+#endif
+	char buf[1024];
+	GetToken(inf, buf, 1024);
+	if(!(_stricmp(buf, "#NEXUS"))) nexus = true;
+
+	fclose(inf);
+	return nexus;
+	}
+
+bool FileIsFasta(const char *name){
+	if (!FileExists(name))	{
+		throw ErrorException("could not open file: %s!", name);
+		}
+
+	bool fasta = false;
+	FILE *inf;
+#ifdef BOINC
+	inf = boinc_fopen(name, "r");
+#else
+	inf = fopen(name, "r");
+#endif
+	char buf[1024];
+	GetToken(inf, buf, 1024);
+	if(buf[0] == '>') fasta = true;
+
+	fclose(inf);
+	return fasta;
+	}
+/* //the ReadData within the GarliReader should now be used to read all data files
+bool ReadData(const char* filename)	{
+	bool usedNCL = false;
+
+	if (!FileExists(filename))	{
+		throw ErrorException("data file not found: %s!", filename);
+		}
+
+	if(FileIsNexus(filename)){
+		outman.UserMessage("Attempting to read data file in Nexus format (using NCL): %s ...", filename);
+		GarliReader &reader = GarliReader::GetInstance();
+#ifdef FACTORY
+		reader.ReadFilepath(filename, MultiFormatReader::NEXUS_FORMAT);
+#else
+		int err = reader.HandleExecute(filename, true);
+		if(err) throw ErrorException("Problem reading nexus datafile");
+#endif
+		//moving error checking and finding of correct char block into individual CreateMatrix functions
+	//	NxsCharactersBlock *chars = reader.GetCharactersBlock();
+	//	if(modSpec.IsAminoAcid() && modSpec.IsCodonAminoAcid()==false && chars->GetDataType() != NxsCharactersBlock::protein)
+	//		throw ErrorException("protein data specified, but nexus file does not contain protein data!");
+		//FACTORY
+		//		data->CreateMatrixFromNCL(reader);
+		usedNCL = true;
+		}
+	else if(1)
+		assert(0);
+/*	else if(FileIsFasta(filename)){
+		outman.UserMessage("Attempting to read data file in Fasta format: %s ...", filename);
+		data->ReadFasta(filename);
+		}
+	else{
+		outman.UserMessage("Attempting to read data file in Phylip format: %s ...", filename);
+		data->ReadPhylip(filename);
+		}
+*/
+/*
+	if(modSpec.IsCodon()){
+		assert(0);
+		if(modSpec.IsVertMitoCode()){
+			static_cast<CodonData*>(data)->SetVertMitoCode();
+			}
+		static_cast<CodonData*>(data)->FillCodonMatrix(false);
+		}
+	else if(modSpec.IsCodonAminoAcid()){
+		assert(0);
+		if(modSpec.IsVertMitoCode()){
+			static_cast<CodonData*>(data)->SetVertMitoCode();
+			}
+		static_cast<CodonData*>(data)->SetAminoAcid();
+		static_cast<CodonData*>(data)->FillCodonMatrix(true);
+		}
+*/
+/*
+	// report summary statistics about the data
+	data->Summarize();
+	outman.UserMessage("\nData summary:");
+	outman.UserMessage(" %d taxa", data->NTax());
+	outman.UserMessage(" %d total characters.", data->NChar());
+	outman.UserMessage("   %d constant characters.", data->NConstant());
+	outman.UserMessage("   %d parsimony-informative characters.", data->NInformative());
+	outman.UserMessage("   %d autapomorphic characters.", data->NAutapomorphic());
+	//int total = data->NConstant() + data->NInformative() + data->NAutapomorphic();
+	outman.flush();
+
+	//if(modSpec.IsNucleotide()){
+	if(1){
+		// try to compress
+		if (!data->Dense())	{
+			outman.UserMessage("Compressing data matrix...");
+			data->Collapse();
+			outman.UserMessage("%d columns in data matrix after compression.", data->NChar());
+			}
+		else {
+			outman.UserMessage("Datafile already compressed.");
+			outman.UserMessage("%d columns in compressed data matrix.\n", data->NChar());
+			}
+		
+		if(modSpec.IsNucleotide()){
+			data->DetermineConstantSites();
+//			if(!data->Dense()) data->Save(filename, "new");
+			}
+		else if(modSpec.IsAminoAcid()){
+//			static_cast<CodonData*>(data)->DetermineConstantAASites();
+			}
+		}
+*/	
+/*	return usedNCL;
+	}
+*/
+
+int ReadData(GeneralGamlConfig *conf, NucleotideData* data)	{
+	assert(0);
+	// regurgitate params specified
+/*	if( params.restart ) {
+		outman.UserMessage("Restarting using state file \"%s\"", params.statefname);
+		GetRestartParams( const_cast<Parameters&>(params) );
+		outman.UserMessage("random number seed set to %d", params.randomSeed);
+		outman.UserMessage("last generation from previous run was %d", params.prev_generations);
+		outman.UserMessage("starting with previous elapsed time, which was %d seconds", params.prev_time);
+		}
+*/
+//	const_cast<Parameters&>(params).BriefReport( cout );
+//	outman.UserMessage("");
+
+	// Check to be sure data file exists
+	//
+/*	if( !FileExists( conf->datafname.c_str() ) ) throw ErrorException("data file does not exist: %s", conf->datafname.c_str());
+
+	// Read in the data matrix
+	outman.flush();
+	outman.UserMessage("Reading data file %s...", conf->datafname.c_str());
+	data->Read( conf->datafname.c_str() );
+
+	// report summary statistics about data
+	data->Summarize();
+	outman.UserMessage(" %d constant characters.", data->NConstant());
+	outman.UserMessage(" %d parsimony-informative characters.", data->NInformative());
+	outman.UserMessage(" %d autapomorphic characters.", data->NAutapomorphic());
+	int total = data->NConstant() + data->NInformative() + data->NAutapomorphic();
+	outman.UserMessage(" %d total characters.", total);
+	outman.flush();
+
+	//DZ Only compress and write data to file if dense=0 (data is not already compressed)
+	if(!(data->Dense())){
+		outman.UserMessage("Compressing data file...");
+		data->Collapse();
+		data->Save("compdata.nex", "new");
+		outman.UserMessage("  %d columns in data matrix after compression", data->NChar());
+		}
+	else outman.UserMessage("Datafile already compressed.\n %d columns in compressed data matrix", data->NChar());
+
+	data->DetermineConstantSites();
+	outman.UserMessage("");
+	outman.flush();
+*/	return 0;
+
+}
+
+int RandomInt(int lb, int ub)	{
+	return lb + rand() % (ub-lb+1);
+}
+
+FLOAT_TYPE RandomFrac()	{
+	return (FLOAT_TYPE) (rand() / RAND_MAX);
+}
+
+FLOAT_TYPE RandomDouble(FLOAT_TYPE lb, FLOAT_TYPE ub)	{
+	return lb + RandomFrac() * (ub - lb);
+}
+
+
+//Bracketing func from Numerical Recipies
+//attempts to use parabolic fit to bracket, otherwise
+//uses golden section
+#define GOLD 1.618034
+#define CGOLD 0.3819660
+#define ZEPS 1.0e-10
+#define GLIMIT 100.0
+//#define GLIMIT 1.6
+#define ITMAX 50
+#define TINY 1.0e-20
+#define SHFT(a,b,c,d) a=b;b=c;c=d;
+#define SIGN(a,b) ((b)>ZERO_POINT_ZERO ? fabs(a) : -fabs(a))
+#define FMAX(a,b) ((a)>(b) ? (a):(b))
+
+//This version takes a node pointer and optimizes blens
+int mnbrak(FLOAT_TYPE *ax, FLOAT_TYPE *bx, FLOAT_TYPE *cx, FLOAT_TYPE *fa, FLOAT_TYPE *fb, FLOAT_TYPE *fc, FLOAT_TYPE (*func)(TreeNode*, Tree*, FLOAT_TYPE), TreeNode *thisnode, Tree *thistree){
+	FLOAT_TYPE ulim, u, r, q, fu;
+	
+//	ofstream brak("brakdebug.log", ios::app);
+//	brak.precision(10);
+//	brak << "node " << thisnode->nodeNum << "\n";	
+	
+	*fa=(*func)(thisnode, thistree, *ax);
+	*fb=(*func)(thisnode, thistree, *bx);
+	*fc=(*func)(thisnode, thistree, *cx);
+	
+	//hopefully we passsed in a good bracket.  If so, get out.
+	if(*fb < *fa && *fb < *fc) return 0;
+	
+	/*
+	
+	if(*fb > *fa){
+		SHFT(dum, *ax, *bx, dum)
+		SHFT(dum, *fb, *fa, dum)
+		}
+
+	*cx=(*bx)+GOLD*(*bx-*ax);
+	*cx = (*cx > min_brlen ? (*cx < DEF_MAX_BRLEN ? *cx : DEF_MAX_BRLEN) : min_brlen);
+	*fc=(*func)(thisnode, thistree, *cx);
+*/
+	while(*fb>*fc){
+			
+		r=(*bx-*ax)*(*fb-*fc);
+		q=(*bx-*cx)*(*fb-*fa);			
+		u=(*bx)-((*bx-*cx)*q-(*bx-*ax)*r)/(FLOAT_TYPE)(2.0*SIGN(FMAX(fabs(q-r),TINY), q-r));
+		u = (FLOAT_TYPE)(u > DEF_MIN_BRLEN ? (u < DEF_MAX_BRLEN ? u : DEF_MAX_BRLEN) : DEF_MIN_BRLEN);
+		ulim=(FLOAT_TYPE)((*bx)+GLIMIT*(*cx-*bx));
+		if((*bx-u)*(u-*cx)>ZERO_POINT_ZERO){
+			fu=(*func)(thisnode, thistree, u);
+			if(fu < *fc){
+				*ax=*bx;
+				*bx=u;
+				*fa=*fb;
+				*fb=fu;
+				return 0;
+				}
+			else if(fu > *fb){
+				*cx=u;
+				*fc=fu;
+				return 0;
+				}
+			u=(FLOAT_TYPE)((*cx)+GOLD*(*cx-*bx));
+			//DZ 10/27/03 don't let this evaluate totally insane blens	
+/*			if(u>=.69){ //=ln(2)
+				if(max(*ax, max(*bx, *cx)) < .69) u=.69;
+				else{
+					 u=max(*ax, max(*bx, *cx)) + .69;
+					 }
+				limited=true;
+				}
+*/			fu=(*func)(thisnode, thistree, u);
+			}
+		else if((*cx-u)*(u-ulim)>ZERO_POINT_ZERO){
+			//DZ 10/27/03 don't let this evaluate totally insane blens	
+	/*		if(u>=.69){ //=ln(2)
+				if(max(*ax, max(*bx, *cx)) < .69) u=.69;
+				else{
+					u=max(*ax, max(*bx, *cx)) + .69;
+					}
+				limited=true;
+				}
+	*/		fu=(*func)(thisnode, thistree, u);
+			if(fu <*fc){
+				SHFT(*bx, *cx, u, *cx+(FLOAT_TYPE)GOLD*(*cx-*bx));
+				SHFT(*fb, *fc, fu, (*func)(thisnode, thistree, u));
+				}
+			}
+		else if((u-ulim)*(ulim-*cx) >ZERO_POINT_ZERO){
+			u=ulim;
+			//DZ 10/27/03 don't let this evaluate totally insane blens	
+	/*		if(u>=.69){ //=ln(2)
+				if(max(*ax, max(*bx, *cx)) < .69) u=.69;
+				else{
+					u=max(*ax, max(*bx, *cx)) + .69;
+					}
+				limited=true;
+				}
+	*/		fu=(*func)(thisnode, thistree, u);
+			}
+		else{
+			u=(*cx)+(FLOAT_TYPE)GOLD*(*cx-*bx);
+			fu=(*func)(thisnode, thistree, u);
+			}
+		SHFT(*ax, *bx, *cx, u)
+		SHFT(*fa, *fb, *fc, fu)
+	/*	if(((*ax < -18.42) && (*bx < -18.42)) || ((*ax<-10) && (*bx<-10) && (*cx>1))){
+			//DZ 12-18-03 if our three best points are all < ln(1e-8), just give up and take that as a blen
+			//the MLE is probably essentially 0.  Note that sometimes when ax and bx are very small this 
+			//func tries very large values for cx, which I think is a bug.  This hack also avoids that
+			return 1;
+			}
+	*/	}
+	return 0;
+	}
+
+
+//This version takes a node pointer and optimizes blens
+FLOAT_TYPE brent(FLOAT_TYPE ax, FLOAT_TYPE bx, FLOAT_TYPE cx, FLOAT_TYPE (*f)(TreeNode *, Tree*, FLOAT_TYPE), FLOAT_TYPE tol, FLOAT_TYPE *xmin, TreeNode *thisnode, Tree *thistree){
+	 int iter;
+	 FLOAT_TYPE a, b, d, etemp, fu, fv, fw, fx, p, q, r, tol1, tol2, u, v, w, x, xm;
+	 FLOAT_TYPE e=ZERO_POINT_ZERO;
+	 
+	 a=(ax < cx ? ax : cx); //make a the smallest of the three bracket points 
+	 b=(ax > cx ? ax : cx); //and b the largest
+	 x=w=v=bx;				//make x the current minimum, as well as w and v
+	 
+	 fw=fv=fx=(*f)(thisnode, thistree, x);
+	 
+	 for(iter=1;iter<=ITMAX;iter++){
+	 	xm=ZERO_POINT_FIVE*(a+b);		//xm is the midpoint of the bracket (of a and b)
+	 	
+	 	tol2=(FLOAT_TYPE)(2.0*(tol1=(FLOAT_TYPE)(tol*fabs(x)+ZEPS)));	
+	 	
+	 	if (fabs(x-xm) <= (tol2-ZERO_POINT_FIVE*(b-a))){ //termination condition
+	 		*xmin=x;							//if the distance between x and bracket mean is < 
+	 		return fx;
+	 		}
+	 	if (fabs(e) > tol1){	//construct a trial parabolic fit
+	 		r=(x-w)*(fx-fv);
+	 		q=(x-v)*(fx-fw);
+	 		p=(x-v)*q-(x-w)*r;
+	 		q=(FLOAT_TYPE)(2.0*(q-r));
+	 		if(q>ZERO_POINT_ZERO) p=-p;
+	 		q=fabs(q);
+	 		etemp=e;
+	 		e=d;
+	 		if(fabs(p) >= fabs(ZERO_POINT_FIVE*q*etemp)||p<=q*(a-x) || p>=q*(b-x)) //determine if the parabolic fit is good
+	 			d=(FLOAT_TYPE)(CGOLD*(e=(x>=xm?a-x:b-x)));  //if not
+	 			
+	 		else{				//if so, take the parabolic step
+	 			d=p/q;
+	 			u=x+d;
+	 			if(u-a < tol2||b-u<tol2)
+	 				d=SIGN(tol1,xm-x);
+	 			}
+	 		}
+	 	else{
+	 		d=(FLOAT_TYPE)(CGOLD*(e=(x>=xm?a-x:b-x))); //e is the distance moved in the step before last
+	 		}							 //d is golden section of that (.38.... times)
+	 		
+	 	u=(fabs(d) >= tol1 ? x+d : x+SIGN(tol1,d));//u is the next point to be evaluated
+	 												//it is x+d or ?
+	 	fu=(*f)(thisnode, thistree, u);
+	 	if(fu<=fx){						//if our new try at u is better than the previous min at x
+	 		
+	 		if(u>=x) a=x; else b=x;		//if u is > x, x becomes a, otherwise it becomes b
+	 		SHFT(v,w,x,u);				//w becomes v, x becomes w and u becomes x
+	 		SHFT(fv,fw,fx,fu);			
+	 		}
+	 	
+	 	else{							//if our new try at u is worse than the old min at x
+	 	
+	 		if(u<x) a=u; else b=u;		//if u is < x, u becomes a, otherwise it becomes b
+	 		
+	 		if(fu<=fw||w==x){			//if the score at u is < the score of the last attempt or x was the last attempt
+	 			v=w;					//w is the second best point
+	 			w=u;					//v is the third best point
+	 			fv=fw;					
+	 			fw=fu;
+	 			}
+	 		else if(fu<=fv||v==x||v==w){
+	 			v=u;
+	 			fv=fu;
+	 			}
+	 		}
+	 	}
+	 *xmin=x;
+	 return fx;
+	 }
+
+#ifdef FOURTH_ROOT
+#define effectiveMin 0.01
+#define effectiveMax 1.77827941
+#define sweetspot 0.08
+#define smallShift 0.02
+#elif ROOT_OPT
+#define effectiveMin 0.0001
+#define effectiveMax 3.16227766
+#define sweetspot 0.0016
+#define smallShift 0.0004
+#else
+#define effectiveMin min_brlen
+#define effectiveMax max_brlen
+#define sweetspot 0.00000256
+#define smallShift 0.00000016
+#endif
+
+
+//My version of the bracketing fuction that can abort and stop evaluating under certain conditions
+//it assumes that the raw branch lengths are being passed in (not logs) so values are bounded
+//by the minimum branch length
+int DZbrak(FLOAT_TYPE *worstOuter, FLOAT_TYPE *mid, FLOAT_TYPE *bestOuter, FLOAT_TYPE *worstOuterL, FLOAT_TYPE *midL, FLOAT_TYPE *bestOuterL, FLOAT_TYPE (*func)(TreeNode*, Tree*, FLOAT_TYPE, bool), TreeNode *thisnode, Tree *thistree){
+	//points are always passed in such that worstOuter < mid < bestOuter
+	FLOAT_TYPE nextTry, r, q, nextTryL, dum;
+	bool possibleZeroMLE=false;
+
+	*worstOuterL=(*func)(thisnode, thistree, *worstOuter, true);
+	if(*midL<0)
+		*midL=(*func)(thisnode, thistree, *mid, true);
+
+	if(*midL>*worstOuterL){//the min must be to the left (or maybe between) of our evals, so don't bother 
+		//evaluating the bestOuter we passed in, which we know is to the right. Either evaluate the min,
+		//or if worstOuter already is the the min evaluate a point between the current evals
+		if(*worstOuter==effectiveMin){
+			SHFT(dum, *bestOuter, *worstOuter, *mid)
+			SHFT(dum, *bestOuterL, *worstOuterL, *midL)
+			*mid=(FLOAT_TYPE)((*worstOuter+*bestOuter)*ZERO_POINT_FIVE);
+			*midL=(*func)(thisnode, thistree, *mid, true);
+			if(*bestOuterL < *midL && !(*mid > sweetspot)) return 1;
+			}
+		else if(!(*worstOuter > sweetspot)){
+			SHFT(dum, *mid, *worstOuter, dum)
+			SHFT(dum, *midL, *worstOuterL, dum)
+			*bestOuter=(FLOAT_TYPE)effectiveMin;
+			*bestOuterL=(*func)(thisnode, thistree, *bestOuter, true);
+			if(*bestOuterL < *midL && !(*mid > sweetspot)) return 1;
+			}
+		else{
+			*bestOuter=(FLOAT_TYPE)(sweetspot-.02);
+			possibleZeroMLE=true;
+			SHFT(dum, *worstOuter, *mid, dum)
+			SHFT(dum, *worstOuterL, *midL, dum)
+			*bestOuterL=(*func)(thisnode, thistree, *bestOuter, true);
+			}
+		}
+	else
+		*bestOuterL=(*func)(thisnode, thistree, *bestOuter, true);
+
+	/*There are a pretty limited number of cases for each loop here
+	case 1: We have three points that define a bracket -> exit with 0
+	case 2: We have three points with sucessively better scores to the right
+			2a: The curvature implied by the three points is convex or only slightly concave which makes 
+				the parabolic estimate very poor. -> Do a GOLD step.
+			2b: The parabolic estimate is between mid and bestOuter -> take parabolic step
+			2c: The parabolic estimate is to the right of bestOuter -> ?
+			
+	case 3: We have three points with sucessively better scores to the left
+			3a: The best score is at the minimum allowed value, suggesting a possible zero MLE
+				3a1: Parabolic estimate is between mid and minimum value.  ??
+				3a2: Parabolic estimate is < minimum -> return zeroMLE=true
+			3b: The parabolic estimate is between mid and bestOuter -> take parabolic step
+			3c: The parabolic estimate is to the left of bestOuter  -> take parabolic step
+	*/
+	
+	if(*worstOuterL < *bestOuterL){
+		SHFT(dum, *worstOuter, *bestOuter, dum)
+		SHFT(dum, *worstOuterL, *bestOuterL, dum)	
+		}
+
+	do{
+		if(*midL < *worstOuterL && *midL < *bestOuterL){//case 1, got a bracket
+			if(*bestOuter==effectiveMin && (*worstOuter - *mid)> .2){
+				//nextTry=(*mid+*worstOuter)*.5;
+				nextTry=(FLOAT_TYPE)0.16;
+				nextTryL=(*func)(thisnode, thistree, nextTry, true);
+				assert(nextTryL < *worstOuterL);
+				if(nextTryL < *midL){
+					SHFT(*bestOuter, *mid, nextTry, dum)
+					SHFT(*bestOuterL, *midL, nextTryL, dum)						
+					}
+				else if(nextTryL < *bestOuterL){
+					SHFT(*worstOuter, *bestOuter, nextTry, dum)
+					SHFT(*worstOuterL, *bestOuterL, nextTryL, dum)						
+					}
+				else{
+					*worstOuter=nextTry;
+					*worstOuterL=nextTryL;					
+					}
+				}
+			return 0;
+			}
+		else{
+			FLOAT_TYPE diffMidBestL=(*midL-*bestOuterL);
+			FLOAT_TYPE diffMidBest=(*mid-*bestOuter);
+			FLOAT_TYPE diffMidWorstL=(*worstOuterL-*midL);
+			FLOAT_TYPE diffMidWorst=(*worstOuter-*mid);
+			if(*worstOuter < *bestOuter){ //case 2
+				//check the curvature
+		
+				FLOAT_TYPE slopeRatio=(diffMidBestL/diffMidBest) / (diffMidWorstL/diffMidWorst);
+				if(slopeRatio > 0.9){
+					nextTry=(FLOAT_TYPE)((*bestOuter)+2.0*(*bestOuter-*mid));//case 2a
+					}
+				else{ //case 2b and 2c
+					r=diffMidWorst*diffMidBestL;
+					q=diffMidBest*diffMidWorstL;
+					nextTry=(FLOAT_TYPE)((*mid)-(diffMidBest*q-(*mid-*worstOuter)*r)/(2.0*SIGN(FMAX(fabs(q-r),TINY), q-r)));
+					if(/*nextTry > *bestOuter && */fabs(nextTry-*bestOuter) < smallShift){
+						//if the parabolic estimate is very near our current best it tends to take
+						//a while to get the bracket, so just push it a little further to the right
+						nextTry += (FLOAT_TYPE)smallShift;
+						}
+					}
+				}
+			
+			else if(*worstOuter > *bestOuter){ //case 3
+				r=diffMidWorst*diffMidBestL;
+				q=diffMidBest*diffMidWorstL;
+				nextTry=(FLOAT_TYPE)((*mid)-(diffMidBest*q-diffMidWorst*r)/(2.0*SIGN(FMAX(fabs(q-r),TINY), q-r)));
+				if(*bestOuter==effectiveMin){
+					if(nextTry < effectiveMin || *mid < sweetspot || possibleZeroMLE) return 1; //case 3a2
+					else {//case 3a1
+						//just go with the parabolic
+						}				
+					}
+				else {
+					if(possibleZeroMLE==true) nextTry=(FLOAT_TYPE)effectiveMin;
+					}
+				}
+			}
+		assert(nextTry >= effectiveMin);
+		nextTryL=(*func)(thisnode, thistree, nextTry, true);
+		if(nextTryL < *bestOuterL){
+			if((*mid-nextTry) * (nextTry-*bestOuter)>ZERO_POINT_ZERO){//if the proposed point is between mid and bestOuter
+				SHFT(dum, *worstOuter, *mid, nextTry);
+				SHFT(dum, *worstOuterL, *midL, nextTryL);
+				}
+			else{
+				SHFT(*worstOuter, *mid, *bestOuter, nextTry);
+				SHFT(*worstOuterL, *midL, *bestOuterL, nextTryL);
+				}
+			}
+		else{
+			if((*mid-nextTry)*(nextTry-*bestOuter)>ZERO_POINT_ZERO){//if the proposed point is between mid and bestOuter
+				assert(nextTryL < *midL);//if this isn't the case there are multiple optima
+				SHFT(dum, *worstOuter, *mid, nextTry);
+				SHFT(dum, *worstOuterL, *midL, nextTryL);		
+				}
+			else{
+				if(nextTryL < *midL){
+					SHFT(*worstOuter, *mid, *bestOuter, nextTry);
+					SHFT(*worstOuterL, *midL, *bestOuterL, nextTryL);
+					}
+				else{
+					SHFT(dum, *mid, *bestOuter, dum);
+					SHFT(dum, *midL, *bestOuterL, dum);
+					*worstOuter=nextTry;
+					*worstOuterL=nextTryL;
+					}
+				}
+			}
+		}while(1);
+	assert(0);
+	return 0;
+}
+	
+//I'm reworking this a bit to better use the information that has already been generated in the bracketing function
+//since we already have those function evaluations, we might as well pass them in and use them
+FLOAT_TYPE DZbrent(FLOAT_TYPE ax, FLOAT_TYPE bx, FLOAT_TYPE cx, FLOAT_TYPE fa, FLOAT_TYPE fx, FLOAT_TYPE fc, FLOAT_TYPE (*f)(TreeNode *, Tree*, FLOAT_TYPE, bool), FLOAT_TYPE tol, FLOAT_TYPE *xmin, TreeNode *thisnode, Tree *thistree){
+	 int iter;
+ 	 FLOAT_TYPE a, b, d, etemp, fu, fv, fw/*, fx*/, p, q, r, tol1, tol2, u, v, w, x, xm;
+	 FLOAT_TYPE e=ZERO_POINT_ZERO;
+	 
+	 if((fx<fa && fx<fc)==false){
+	 	//if bx isn't the current minimum, make is so
+	 	if(fa<fx){
+	 		FLOAT_TYPE dummy=fa;
+	 		fa=fx;
+	 		fx=dummy;
+	 		dummy=ax;
+	 		ax=bx;
+	 		bx=dummy;
+	 		}
+	 	else if(fc<fx){
+	 		FLOAT_TYPE dummy=fc;
+	 		fc=fx;
+	 		fx=dummy;
+	 		dummy=cx;
+	 		cx=bx;
+	 		bx=dummy;	 		
+	 		}
+	 	}
+	 assert(fx<fa && fx<fc);
+	 
+	 FLOAT_TYPE paraMinlnL, paraErr, paraErrCrit;
+	 paraErrCrit=(tol<.5 ? tol*10 : 5);
+	 bool paraOK=false, para=false;
+
+//	ofstream brak("brakdebug.log", ios::app);
+//	brak << "node " << thisnode->nodeNum << "\n";
+
+	 a=(ax < cx ? ax : cx); //make a the smallest of the three bracket points 
+	 b=(ax > cx ? ax : cx); //and b the largest
+	if(ax>cx){
+		FLOAT_TYPE dummy=fa;
+		fa=fc;
+		fc=dummy;
+		}
+		
+	 x=bx;				//make x the current minimum
+
+ 	if(fa<fc){
+ 		w=a;
+ 		fw=fa;
+ 		v=b;
+ 		fv=fc;
+ 		}
+ 	else{
+ 		v=a;
+ 		fv=fa;
+ 		w=b;
+ 		fw=fc; 		
+ 		}
+
+	xm=(FLOAT_TYPE)ZERO_POINT_FIVE*(a+b);       //xm is the midpoint of the bracket (of a and b)
+	e=(x>=xm?a-x:b-x);	//set e to the larger of the two bracket intervals
+	d=(FLOAT_TYPE)CGOLD*e;
+
+//	assert(a<=x && x<=b);
+	 
+//	 fw=fv=fx=(*f)(thisnode, thistree, x);
+	 
+	 for(iter=1;iter<=ITMAX;iter++){
+
+	 	xm=(FLOAT_TYPE)ZERO_POINT_FIVE*(a+b);		//xm is the midpoint of the bracket (of a and b)
+	 	
+	 	tol2=(FLOAT_TYPE)(2.0*(tol1=(FLOAT_TYPE)(tol*fabs(x)+ZEPS)));	
+	 	
+/*	 	if (fabs(x-xm) <= (tol2-ZERO_POINT_FIVE*(b-a))){ //termination condition
+	 		*xmin=x;						
+	 		return fx;
+	 		}
+*/// 	if (fabs(e) > tol1){	//construct a trial parabolic fit
+	 		r=(x-w)*(fx-fv);
+	 		q=(x-v)*(fx-fw);
+	 		p=(x-v)*q-(x-w)*r;
+	 		q=(FLOAT_TYPE)2.0*(q-r);
+	 		if(q>ZERO_POINT_ZERO) p=-p;
+	 		q=fabs(q);
+	 		etemp=e;
+	 		e=d;
+	 		if(fabs(p) >= fabs(ZERO_POINT_FIVE*q*etemp)||p<=q*(a-x) || p>=q*(b-x)){ //determine if the parabolic fit is good
+	 			d=(FLOAT_TYPE)(CGOLD*(e=(x>=xm?a-x:b-x)));  //if not
+	 			u=(fabs(d) >= tol1 ? x+d : x+SIGN(tol1,d));
+	 			}
+	 			
+	 		else{				//if so, take the parabolic step
+	 			d=p/q;
+	 			u=x+d;
+	 			
+	 			FLOAT_TYPE alph=w-u;
+				FLOAT_TYPE beta=x-u; 
+				paraMinlnL=(((fx) * alph*alph) - ((fw) * beta*beta)) / (alph*alph - beta*beta);
+
+	 			if(paraOK==true){
+	 				//the estimation error in the parabolic step always seems to at least half each iteration,
+	 				//hence the division by 2.0
+	 				FLOAT_TYPE estlnL=(FLOAT_TYPE)(paraMinlnL - paraErr*ZERO_POINT_FIVE);
+	 				if((fx - estlnL) < tol){
+	 					*xmin=x;
+	 					return fx;
+	 					}
+	 				}
+	 			para=true;
+	 			
+	 			if(u-a < tol2||b-u<tol2)
+	 				d=SIGN(tol1,xm-x);
+	 			}
+//	 		}
+/*	 	else{
+	 		d=CGOLD*(e=(x>=xm?a-x:b-x)); //e is the distance moved in the step before last
+	 									 //d is golden section of that (.38.... times)
+	 		u=(fabs(d) >= tol1 ? x+d : x+SIGN(tol1,d));
+	 		}							 
+*/	 	//assert(a<=u && u<=b);										  
+		//for some reason this occasionally proposes a new value
+		//that is not within the bracket.  If that happens force
+		//the new point to be within a and b
+		if(!(a<=u && u<=b)){
+			ofstream S("brakmiss.log", ios::app);
+			S.precision(12);
+			S << fa << "\t" << fw << "\t" << fv << "\t" << fu << endl;
+			S << a << "\t" << b << "\t" << u << endl;
+			S.close();
+			u=a/b;
+			}
+	 	fu=(*f)(thisnode, thistree, u, false);
+	 	if(para==true){
+	 		paraErr=fu - paraMinlnL;
+	 		if(fabs(paraErr) < paraErrCrit) paraOK=true;
+	 		para=false;
+	 		}
+	 	
+	 	if(!(fu>fx)){						//if our new try at u is better than the previous min at x
+	 		
+	 		if(u>=x) a=x; else b=x;		//if u is > x, x becomes a, otherwise it becomes b
+	 		SHFT(v,w,x,u);				//w becomes v, x becomes w and u becomes x
+	 		SHFT(fv,fw,fx,fu);			
+	 		}
+	 	
+	 	
+		//DJZ 1/21/04 Rewrote this loop.  I think that it was buggy, and made no sense
+		//to me previously.  Was updating variables such that w and v were not either a or b
+		//(The bracket) but were older evaluations.  This resulted in terrible cases where
+		//the interval {w, x, v} didn't even contain a minimum at all, but {a, x, b} did.
+	 	else{						//if our new try at u is worse than the old min at x
+	 		if(u<x){					//if the new try is to the left of the min
+	 			a=u;
+		 		if(w<x){					//if the left bracket was w		
+		 			w=u;						//u becomes the new w
+					fw=fu;						
+		 			}
+		 		else{						//if the left braket was v
+		 			if(fu<fw){					//if fu is better than the old fw
+		 				v=w;						//w becomes the new v
+		 				fv=fw;
+		 				w=u;						//u becomes the new w
+		 				fw=fu;
+		 				}
+		 			else{						//if the old fw was better than fu
+		 				v=u;						//u becomes the new v
+		 				fv=fu;
+		 				}
+		 			}
+	 			}
+	 		else{
+	 			b=u;				//if the new try is to the right of the min
+	 			if(w<x){				//if the left bracket was w	
+	 				if(fu<fw){				//if fu is better than the old fw
+	 					v=w;					//w becomes the new v
+	 					fv=fw;
+	 					w=u;					//u becomes the new w
+	 					fw=fu;
+	 					}
+	 				else{					//if the old fw was better than fu
+	 					v=u;						//u becomes the new v
+	 					fv=fu;
+	 					}
+	 				}
+	 			else {					//if the left bracket was v
+	 				w=u;					//u becomes the new w
+	 				fw=fu;
+	 				}
+	 			}
+	 		}
+/*	 	
+	 		if(u<x) a=u; else b=u;		//if u is < x, u becomes a, otherwise it becomes b
+	 		
+	 		if(fu<=fw||w==x){			//if the score at u is < the score of the last attempt or x was the last attempt
+	 			v=w;					//w is the second best point
+	 			w=u;					//v is the third best point
+	 			fv=fw;					
+	 			fw=fu;
+	 			}
+	 		else if(fu<=fv||v==x||v==w){
+	 			v=u;
+	 			fv=fu;
+	 			}
+	 		}
+*/	 	}
+	 *xmin=x;
+	 return fx;
+	 }
+	 
+void InferStatesFromCla(vector<InternalState> &stateVec, const FLOAT_TYPE *cla, int nchar, int nstates){
+	//what is passed in here is really the unscaled posterior values for each state, marginalized across rates (including any invariant class).
+	//thus, the state frqeuencies have already been figured in and nothing needs to be done in CalcProbs besides divide each by the sum
+	//note that this clas then only uses the first nstates x nchar portion, instead of the usual nstates x nchar x nrates
+	for(int c=0;c<nchar;c++){
+		stateVec.push_back(InternalState(nstates));
+		stateVec[stateVec.size() - 1].CalcProbs(&cla[c * nstates]);
+		}
+	}
+
+FLOAT_TYPE CalculateHammingDistance(const char *str1, const char *str2, const int *counts, int nchar, int nstates){
+	FLOAT_TYPE diff=0.0;
+	int pos1=0, pos2=0;
+	int effectiveChar=0;
+	for(int i=0;i<nchar;i++){
+		bool unambig1 = true;
+		bool unambig2 = true;
+		if(nstates == 4){
+			if(str1[pos1] < 0){
+				unambig1 = false;
+				if(str1[pos1] == -4) pos1++;
+				else{
+    				int s=-str2[pos1++];
+	    			for(int i=0;i<s;i++) pos1++;
+					}
+				}
+			if(str2[pos2] < 0){
+				unambig2 = false;
+				if(str2[pos2] == -4) pos2++;
+				else{
+    				int s=-str2[pos2++];
+	    			for(int i=0;i<s;i++) pos2++;
+					}
+				}
+			}
+		else{
+			if(str1[pos1] == nstates){
+				unambig1 = false;
+				pos1++;
+				}
+			if(str1[pos2] == nstates){
+				unambig2 = false;
+				pos2++;
+				}
+			}
+		if(unambig1 && unambig2){
+			effectiveChar += counts[i];
+			if(str1[pos1++] != str2[pos2++]) diff += (FLOAT_TYPE) counts[i]; 
+			}
+		}
+
+	return diff/(FLOAT_TYPE)effectiveChar;
+}
+
+void SampleBranchLengthCurve(FLOAT_TYPE (*func)(TreeNode*, Tree*, FLOAT_TYPE, bool), TreeNode *thisnode, Tree *thistree){
+	for(FLOAT_TYPE len=(FLOAT_TYPE)effectiveMin;len<(FLOAT_TYPE)effectiveMax;len*=2.0)
+		(*func)(thisnode, thistree, len, true);
+	}
+
diff --git a/src/funcs.h b/src/funcs.h
new file mode 100644
index 0000000..567cea8
--- /dev/null
+++ b/src/funcs.h
@@ -0,0 +1,224 @@
+// GARLI version 2.0 source code
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef FUNCS_H
+#define FUNCS_H
+
+//a variety of functions that don't belong to any class
+
+#include <stdlib.h>
+
+#include "population.h"
+#include "sequencedata.h"
+#ifdef UNIX
+#include <sys/mman.h>
+#endif
+
+extern rng rnd;
+
+class StateSet{
+	protected:
+		vector<string> states;
+		int numStates;
+	public:
+		StateSet(int ns){
+			numStates = ns;
+			assert(numStates == 4 || numStates == 20 || numStates == 21);
+			if(numStates == 4){
+				states.push_back("A");
+				states.push_back("C");
+				states.push_back("G");
+				states.push_back("T");
+				}
+			else if(numStates > 19){
+				states.push_back("A");
+				states.push_back("C");
+				states.push_back("D");
+				states.push_back("E");
+				states.push_back("F");
+				states.push_back("G");
+				states.push_back("H");
+				states.push_back("I");
+				states.push_back("K");
+				states.push_back("L");
+				states.push_back("M");
+				states.push_back("N");
+				states.push_back("P");
+				states.push_back("Q");
+				states.push_back("R");
+				states.push_back("S");
+				states.push_back("T");
+				states.push_back("V");
+				states.push_back("W");
+				states.push_back("Y");
+				}
+			if(numStates == 21)
+				states.push_back("Z");
+			}
+		StateSet(const GeneticCode *code){
+			numStates = code->NumStates();
+			for(int s = 0;s < numStates;s++)
+				states.push_back(code->LookupCodonDisplayFromIndex(s));
+			}
+		void OutputInternalStateHeader(ofstream &out) const{
+			out << "site\tbestState(prob)\t";
+			for(int s = 0;s < numStates;s++)
+				out << "prob(" << states[s] << ")\t";
+			out << endl;
+			}
+		const string GetState(int s) const{
+			return states[s];
+			}
+	};
+
+class InternalState{
+	protected:
+		int best;
+		int numStates;
+		vector<FLOAT_TYPE> probs;
+	
+	public:
+		InternalState(int ns){
+			numStates = ns;
+			probs.resize(numStates);
+			}
+		void CalcProbs(const FLOAT_TYPE *tots){
+			FLOAT_TYPE tot=0.0;
+			best = 0;
+			FLOAT_TYPE bestVal = ZERO_POINT_ZERO;
+
+			for(int s = 0;s < numStates;s++)
+				tot += tots[s];
+			for(int i=0;i<numStates;i++){
+			probs[i]=tots[i]/tot;
+				if(probs[i] > bestVal){
+					bestVal = probs[i];
+					best = i;
+		}
+				}
+			}
+	void Output(ofstream &out, const StateSet &states) const{
+		out << states.GetState(best) << "(" << probs[best] << ")\t";
+		for(int s = 0;s < numStates;s++)
+			out << probs[s] << "\t";
+		out << endl;
+		}
+	};
+
+bool FloatingPointEquals(const FLOAT_TYPE first, const FLOAT_TYPE sec, const FLOAT_TYPE epsilon);
+
+#if defined(SINGLE_PRECISION_FLOATS) && (!defined(_MSC_VER)) || (defined(BOINC) && defined (_WIN32))
+//Overloaded versions of min and max that take different types for the two arguments
+//This should not be used in hot code when possible, and conditional comp should
+//be used to make two different versions of the code
+float min(const double first, const float second);
+float min(const float first, const double second);
+float max(const double first, const float second);
+float max(const float first, const double second);
+#endif
+
+void OutputImportantDefines();
+
+int FileExists(const char* s);
+bool FileIsFasta(const char *name);
+bool FileIsNexus(const char *name);
+int ReadData(GeneralGamlConfig *, SequenceData* data);
+bool ReadData(const char* filename);
+//void GetRestartParams(Parameters& params);
+int RandomInt(int lb, int ub);
+FLOAT_TYPE RandomFrac();
+FLOAT_TYPE RandomDouble(FLOAT_TYPE lb, FLOAT_TYPE ub);
+int mnbrak(FLOAT_TYPE *ax, FLOAT_TYPE *bx, FLOAT_TYPE *cx, FLOAT_TYPE *fa, FLOAT_TYPE *fb, FLOAT_TYPE *fc, FLOAT_TYPE (*func)(TreeNode*, Tree*, FLOAT_TYPE), TreeNode *thisnode, Tree *thistree);
+int DZbrak(FLOAT_TYPE *ax, FLOAT_TYPE *bx, FLOAT_TYPE *cx, FLOAT_TYPE *fa, FLOAT_TYPE *fb, FLOAT_TYPE *fc, FLOAT_TYPE (*func)(TreeNode*, Tree*, FLOAT_TYPE), TreeNode *thisnode, Tree *thistree);
+FLOAT_TYPE brent(FLOAT_TYPE ax, FLOAT_TYPE bx, FLOAT_TYPE cx, FLOAT_TYPE (*f)(TreeNode *, Tree*, FLOAT_TYPE), FLOAT_TYPE tol, FLOAT_TYPE *xmin, TreeNode *thisnode, Tree *thistree);
+FLOAT_TYPE DZbrent(FLOAT_TYPE ax, FLOAT_TYPE bx, FLOAT_TYPE cx, FLOAT_TYPE fa, FLOAT_TYPE fb, FLOAT_TYPE fc, FLOAT_TYPE (*f)(TreeNode *, Tree*, FLOAT_TYPE), FLOAT_TYPE tol, FLOAT_TYPE *xmin, TreeNode *thisnode, Tree *thistree);
+void DirichletRandomVariable (FLOAT_TYPE *alp, FLOAT_TYPE *z, int n);
+
+void InferStatesFromCla(vector<InternalState> &stateVec, const FLOAT_TYPE *cla, int nchar, int nstates);
+FLOAT_TYPE CalculateHammingDistance(const char *str1, const char *str2, const int *counts, int nchar, int nstates);
+
+void SampleBranchLengthCurve(FLOAT_TYPE (*func)(TreeNode*, Tree*, FLOAT_TYPE, bool), TreeNode *thisnode, Tree *thistree);
+
+int DZbrak(FLOAT_TYPE *worstOuter, FLOAT_TYPE *mid, FLOAT_TYPE *bestOuter, FLOAT_TYPE *worstOuterL, FLOAT_TYPE *midL, FLOAT_TYPE *bestOuterL, FLOAT_TYPE (*func)(TreeNode*, Tree*, FLOAT_TYPE, bool), TreeNode *thisnode, Tree *thistree);
+FLOAT_TYPE DZbrent(FLOAT_TYPE ax, FLOAT_TYPE bx, FLOAT_TYPE cx, FLOAT_TYPE fa, FLOAT_TYPE fx, FLOAT_TYPE fc, FLOAT_TYPE (*f)(TreeNode *, Tree*, FLOAT_TYPE, bool), FLOAT_TYPE tol, FLOAT_TYPE *xmin, TreeNode *thisnode, Tree *thistree);
+/*
+void CalcFullCLAInternalInternalRateHet(FLOAT_TYPE *dest, const FLOAT_TYPE *LCL, const FLOAT_TYPE *RCL, const FLOAT_TYPE *Lpr, const FLOAT_TYPE *Rpr, int nchar);
+void CalcFullCLATerminalTerminalRateHet(FLOAT_TYPE *dest, const FLOAT_TYPE *LCL, const FLOAT_TYPE *RCL, const FLOAT_TYPE *Lpr, const FLOAT_TYPE *Rpr, unsigned char *Ldata, unsigned char *Rdata, int nchar);
+void CalcFullCLAInternalTerminalRateHet(FLOAT_TYPE *dest, const FLOAT_TYPE *CL1, const FLOAT_TYPE *pr1, const FLOAT_TYPE *pr2, unsigned char *data2, int nchar);
+void CalcFullCLAInternalInternal(FLOAT_TYPE *dest, const FLOAT_TYPE *LCL, const FLOAT_TYPE *RCL, const FLOAT_TYPE *Lpr, const FLOAT_TYPE *Rpr, int nchar);
+void CalcFullCLATerminalTerminal(FLOAT_TYPE *dest, const FLOAT_TYPE *LCL, const FLOAT_TYPE *RCL, const FLOAT_TYPE *Lpr, const FLOAT_TYPE *Rpr, unsigned char *Ldata, unsigned char *Rdata, int nchar);
+void CalcFullCLAInternalTerminal(FLOAT_TYPE *dest, const FLOAT_TYPE *CL1, const FLOAT_TYPE *pr1, const FLOAT_TYPE *pr2, unsigned char *data2, int nchar);
+*/
+int gsl_min_find_bracket(FLOAT_TYPE (*f)(TreeNode *, Tree*, FLOAT_TYPE),FLOAT_TYPE *x_minimum,FLOAT_TYPE * f_minimum,FLOAT_TYPE * x_lower, FLOAT_TYPE * f_lower, FLOAT_TYPE * x_upper, FLOAT_TYPE * f_upper, size_t eval_max, TreeNode *thisnode, Tree *thistree);
+
+inline void ArrayMultiply(FLOAT_TYPE *dest, const FLOAT_TYPE *source, int num){
+	//simply multiplies each element in dest by the corresponding element in source, up to num
+	for(register int i=0;i<num;i++)
+		*(dest++) *= *(source++);
+	}
+	
+inline void CalcSiteCLARateHetEquals(FLOAT_TYPE *dest, const FLOAT_TYPE *tCL, const FLOAT_TYPE *tp){
+	//this function assumes that the pmat is arranged with the 16 entries for the
+	//first rate, followed by 16 for the second, etc.
+	for(int i=0;i<4;i++){
+		*(dest++)=tp[0]*tCL[0]+tp[1]*tCL[1]+tp[2]*tCL[2]+tp[3]*tCL[3];
+		*(dest++)=tp[4]*tCL[0]+tp[5]*tCL[1]+tp[6]*tCL[2]+tp[7]*tCL[3];
+		*(dest++)=tp[8]*tCL[0]+tp[9]*tCL[1]+tp[10]*tCL[2]+tp[11]*tCL[3];
+		*(dest++)=tp[12]*tCL[0]+tp[13]*tCL[1]+tp[14]*tCL[2]+tp[15]*tCL[3];
+		tp+=16;
+		tCL+=4;
+		}
+	}
+
+inline void CalcSiteCLARateHetTimes(FLOAT_TYPE *dest, const FLOAT_TYPE *tCL, const FLOAT_TYPE *tp){
+	//this function assumes that the pmat is arranged with the 16 entries for the
+	//first rate, followed by 16 for the second, etc.
+	for(int i=0;i<4;i++){
+		*(dest++)*=tp[0]*tCL[0]+tp[1]*tCL[1]+tp[2]*tCL[2]+tp[3]*tCL[3];
+		*(dest++)*=tp[4]*tCL[0]+tp[5]*tCL[1]+tp[6]*tCL[2]+tp[7]*tCL[3];
+		*(dest++)*=tp[8]*tCL[0]+tp[9]*tCL[1]+tp[10]*tCL[2]+tp[11]*tCL[3];
+		*(dest++)*=tp[12]*tCL[0]+tp[13]*tCL[1]+tp[14]*tCL[2]+tp[15]*tCL[3];
+		tp+=16;
+		tCL+=4;
+		}
+					}
+			 
+
+
+
+template<class T>
+void ScrambleArray(int n, T ar[])	{
+	int times = n*2;
+
+	int x, y;
+	T temp;
+	for (int i = 0; i < times; ++i)	{
+//		x = rand() % n;
+//		y = rand() % n;
+		x = rnd.random_int(RAND_MAX) % n;
+		y = rnd.random_int(RAND_MAX) % n;
+
+		if (x != y)	{
+			temp = ar[x];
+			ar[x] = ar[y];
+			ar[y] = temp;
+		}
+	}
+
+};
+
+#endif
diff --git a/src/garli.br b/src/garli.br
new file mode 100644
index 0000000..8612789
--- /dev/null
+++ b/src/garli.br
@@ -0,0 +1,87 @@
+
+
+kernel void
+BranchLike2(float4 des<>, out float4 res<>, float pmat[16]){
+	res.x = des.x * pmat[0] + des.y * pmat[1] + des.z * pmat[2] + des.w * pmat[3];
+	res.y = des.x * pmat[4] + des.y * pmat[5] + des.z * pmat[6] + des.w * pmat[7];
+	res.z = des.x * pmat[8] + des.y * pmat[9] + des.z * pmat[10] + des.w * pmat[11];
+	res.w = des.x * pmat[12] + des.y * pmat[13] + des.z * pmat[14] + des.w * pmat[15];
+	}
+
+kernel void
+SecondBranchLike(float4 des<>, float4 part<>, out float4 res<>, float pmat[16]){
+	res.x = part.x * (des.x * pmat[0] + des.y * pmat[1] + des.z * pmat[2] + des.w * pmat[3]);
+	res.y = part.y * (des.x * pmat[4] + des.y * pmat[5] + des.z * pmat[6] + des.w * pmat[7]);
+	res.z = part.z * (des.x * pmat[8] + des.y * pmat[9] + des.z * pmat[10] + des.w * pmat[11]);
+	res.w = part.w * (des.x * pmat[12] + des.y * pmat[13] + des.z * pmat[14] + des.w * pmat[15]);
+	}
+/*
+kernel void
+SingleLikeKernel(float4 des<>, float4 des2<>, out float4 res<>, float pmat[32]){
+	res.x = des.x * pmat[0] + des.y * pmat[1] + des.z * pmat[2] + des.w * pmat[3];
+	res.y = des.x * pmat[4] + des.y * pmat[5] + des.z * pmat[6] + des.w * pmat[7];
+	res.z = des.x * pmat[8] + des.y * pmat[9] + des.z * pmat[10] + des.w * pmat[11];
+	res.w = des.x * pmat[12] + des.y * pmat[13] + des.z * pmat[14] + des.w * pmat[15];
+
+	res.x *= (des2.x * pmat[16] + des2.y * pmat[17] + des2.z * pmat[18] + des2.w * pmat[19]);
+	res.y *= (des2.x * pmat[20] + des2.y * pmat[21] + des2.z * pmat[22] + des2.w * pmat[23]);
+	res.z *= (des2.x * pmat[24] + des2.y * pmat[25] + des2.z * pmat[26] + des2.w * pmat[27]);
+	res.w *= (des2.x * pmat[28] + des2.y * pmat[29] + des2.z * pmat[30] + des2.w * pmat[31]);
+	}
+*/
+/*
+
+kernel void
+Product(float des1<>, float des2<>, out float res<>){
+	res = des1 * des2;
+	}
+	
+kernel void
+Product4(float4 des1<>, float4 des2<>, out float4 res<>){
+	res.x = des1.x * des2.x;
+	res.y = des1.y * des2.y;
+	res.z = des1.z * des2.z;
+	res.w = des1.w * des2.w;
+	}
+*/
+/*
+void DoOneBranchLike(float *des, float *res, float *pmat, int len){
+	float4 desstream<1>, resstream<1>;
+	//float pmatstream<4, 4>;
+	float pmatstream<16>;
+	
+	streamRead(desstream, des);
+	streamRead(resstream, res);
+	streamRead(pmatstream, pmat);
+	
+	BranchLike2(desstream, resstream, pmatstream);
+	streamWrite(resstream, res);
+	}
+*/
+/*	
+kernel void
+BranchLikeSecond(float4 des<>, float4 first<>, out float4 res<>, float pmat[4][4]){
+	res.x = first.x * (des.x * pmat[0][0] + des.y * pmat[0][1] + des.z * pmat[0][2] + des.w * pmat[0][3]);
+	res.y = first.y * (des.x * pmat[1][0] + des.y * pmat[1][1] + des.z * pmat[1][2] + des.w * pmat[1][3]);
+	res.z = first.z * (des.x * pmat[2][0] + des.y * pmat[2][1] + des.z * pmat[2][2] + des.w * pmat[2][3]);
+	res.w = first.w * (des.x * pmat[3][0] + des.y * pmat[3][1] + des.z * pmat[3][2] + des.w * pmat[3][3]);
+	}
+
+kernel void
+BranchLike2(float4 des<>, float4 des2<>, out float4 res<>, float pmat[4][4], float pmat2[4][4]){
+	res.x = (des.x * pmat[0][0] + des.y * pmat[0][1] + des.z * pmat[0][2] + des.w * pmat[0][3]) * (des2.x * pmat2[0][0] + des2.y * pmat2[0][1] + des2.z * pmat2[0][2] + des2.w * pmat2[0][3]);
+	res.y = (des.x * pmat[1][0] + des.y * pmat[1][1] + des.z * pmat[1][2] + des.w * pmat[1][3]) * (des2.x * pmat2[1][0] + des2.y * pmat2[1][1] + des2.z * pmat2[1][2] + des2.w * pmat2[1][3]);
+	res.z = (des.x * pmat[2][0] + des.y * pmat[2][1] + des.z * pmat[2][2] + des.w * pmat[2][3]) * (des2.x * pmat2[2][0] + des2.y * pmat2[2][1] + des2.z * pmat2[2][2] + des2.w * pmat2[2][3]);
+	res.w = (des.x * pmat[3][0] + des.y * pmat[3][1] + des.z * pmat[3][2] + des.w * pmat[3][3]) * (des2.x * pmat2[3][0] + des2.y * pmat2[3][1] + des2.z * pmat2[3][2] + des2.w * pmat2[3][3]);
+	}
+*/
+
+/*
+kernel void
+BranchLike(float4 des<>, out float4 res<>, float pmat[4][4]){
+	res.x = des.x * pmat[0][0] + des.y * pmat[0][1] + des.z * pmat[0][2] + des.w * pmat[0][3];
+	res.y = des.x * pmat[1][0] + des.y * pmat[1][1] + des.z * pmat[1][2] + des.w * pmat[1][3];
+	res.z = des.x * pmat[2][0] + des.y * pmat[2][1] + des.z * pmat[2][2] + des.w * pmat[2][3];
+	res.w = des.x * pmat[3][0] + des.y * pmat[3][1] + des.z * pmat[3][2] + des.w * pmat[3][3];
+	}
+*/
\ No newline at end of file
diff --git a/src/garlimain.cpp b/src/garlimain.cpp
new file mode 100644
index 0000000..f44e006
--- /dev/null
+++ b/src/garlimain.cpp
@@ -0,0 +1,904 @@
+// GARLI version 2.1 source code
+// Copyright 2005-2014 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+//	NOTE: Portions of this source adapted from GAML source, written by Paul O. Lewis
+
+#define PROGRAM_NAME "GARLI"
+#define MAJOR_VERSION "2"
+#define MINOR_VERSION "1"
+//DON'T mess with the following 2 lines!.  They are auto substituted by svn.
+#define SVN_REV "$Rev$"
+#define SVN_DATE "$Date$"
+
+//allocation monitoring stuff from Paul, Mark and Dave
+#define WRITE_MEM_REPORT_TO_FILE
+#define INSTANTIATE_MEMCHK
+
+#ifdef WIN32
+#include <conio.h>
+#endif
+
+#ifdef MPI_VERSION
+#include "mpi.h"
+#endif
+
+#include "defs.h"
+#include "population.h"
+#include "individual.h"
+#include "adaptation.h"
+#include "sequencedata.h"
+#include "garlireader.h"
+
+#include "funcs.h"
+#include "tree.h"
+#include "errorexception.h"
+#include "outputman.h"
+
+#ifdef WIN32
+#include <process.h>
+#define PID_FUNC() _getpid()
+typedef int pid_type;
+#else
+#include <sys/types.h>
+#include <unistd.h>
+#define PID_FUNC() getpid()
+typedef pid_t pid_type;
+#endif
+
+#ifdef MAC_FRONTEND
+#import <Foundation/Foundation.h>
+#import "MFEInterfaceClient.h"
+#endif
+
+#ifdef CUDA_GPU
+#include "cudaman.h"
+CudaManager *cudaman;
+int cuda_device_number=0;
+#endif
+
+OutputManager outman;
+bool interactive;
+bool is64bit = false;
+ 
+vector<ClaSpecifier> claSpecs;
+vector<DataSubsetInfo> dataSubInfo;
+//This is annoying, but the substituted rev and date from svn are in crappy format.
+//Get what we need from them
+//revision string looks like this: $Rev$
+std::string GetSvnRev(){
+	string temp = SVN_REV;
+	string ret;
+	for(int i=0;i<temp.length();i++){
+		char c = temp[i];
+		if(isdigit(c)) {
+			ret += c;
+			}
+		}
+	return ret;
+	}
+//date string looks like this: $Date$
+std::string GetSvnDate(){
+	string temp = SVN_DATE;
+	string ret;
+	int i=0;
+	int len = temp.length();
+	while(i < len && temp[i] != ',') i++;
+	i++;
+	while(i < len && !isdigit(temp[i])) i++;
+	while(i < len && temp[i] != ')') ret += temp[i++];
+	return ret;
+	}
+
+void OutputVersion(){
+	if(is64bit)
+		outman.UserMessage("%s Version %s.%s.%s (64-bit)", PROGRAM_NAME, MAJOR_VERSION, MINOR_VERSION, GetSvnRev().c_str());
+	else
+		outman.UserMessage("%s Version %s.%s.%s (32-bit)", PROGRAM_NAME, MAJOR_VERSION, MINOR_VERSION, GetSvnRev().c_str());
+	}
+
+int CheckRestartNumber(const string str){
+	int num=1;
+	char temp_buf[100];
+	sprintf(temp_buf, "%s.restart%d.best.tre", str.c_str(), num);
+	while(FileExists(temp_buf)) {
+		num ++;
+		sprintf(temp_buf, "%s.restart%d.best.tre", str.c_str(), num);
+		}
+	return num;
+	}
+
+void UsageMessage(char *execName){
+#ifdef SUBROUTINE_GARLI
+	OutputVersion();
+	outman.UserMessage("This MPI version is for doing a large number of search replicates or bootstrap");
+	outman.UserMessage("replicates, each using the SAME config file.  The results will be exactly");
+ 	outman.UserMessage("identical to those obtained by executing the config file a comparable number");
+ 	outman.UserMessage("of times with the serial version of the program.");
+	outman.UserMessage("\nUsage: The syntax for launching MPI jobs varies between systems");
+	outman.UserMessage("Most likely it will look something like the following:");
+	outman.UserMessage("  mpirun [MPI OPTIONS] %s -[# of times to execute config file]", execName);
+	outman.UserMessage("Specifying the number of times to execute the config file is mandatory.");
+	outman.UserMessage("This version will expect a config file named \"garli.conf\".");
+	outman.UserMessage("Consult your cluster documentation for details on running MPI jobs\n");
+#elif defined (OLD_SUBROUTINE_GARLI)
+	OutputVersion();
+	outman.UserMessage("This MPI version is for doing a large number of independent jobs in batch, each");
+	outman.UserMessage("using a DIFFERENT config file.  This might be useful for analyzing a large");
+	outman.UserMessage("number of simulated datasets or for analyzing a single dataset under a variety");
+	outman.UserMessage("of models or search settings.  The results will be exactly the same as if each");
+	outman.UserMessage("config file were executed separately by a serial version of GARLI.");
+	outman.UserMessage("\nUsage: The syntax for launching MPI jobs varies between systems");
+	outman.UserMessage("Most likely it will look something like the following:");
+	outman.UserMessage("  mpirun [MPI OPTIONS] %s [# of provided config files]", execName);
+	outman.UserMessage("This version will expect config files named \"run0.conf\", \"run1.conf\", etc.");
+	outman.UserMessage("Consult your cluster documentation for details on running MPI jobs\n");
+#else
+	outman.UserMessage    ("Usage: %s [OPTION] [config filename]", execName);
+	outman.UserMessage    ("Options:");
+	outman.UserMessage                 ("  -i, --interactive	interactive mode (allow and/or expect user feedback)");
+	if(interactive) 
+		outman.UserMessage("                    (interactive is the default for the version you are running)");
+	outman.UserMessage                 ("  -b, --batch		batch mode (do not expect user input)");
+	if(!interactive) 
+		outman.UserMessage("                    (batch is the default for the version you are running)");
+	outman.UserMessage                 ("  -v, --version		print version information and exit");
+	outman.UserMessage                 ("  -h, --help		print this help and exit");
+	outman.UserMessage                 ("  -t			run internal tests (requires dataset and config file)");
+	outman.UserMessage                 ("  -V			validate: load config file and data, validate config file, data, starting trees"); 
+	outman.UserMessage                 ("				and constraint files, print required memory and selected model, then exit");
+#ifdef CUDA_GPU
+	outman.UserMessage    ("  --device d_number	use specified CUDA device");
+#endif
+	outman.UserMessage("NOTE: If no config filename is passed on the command line the program\n   will look in the current directory for a file named \"garli.conf\"\n");
+#endif
+	}
+
+#ifdef BOINC
+int boinc_garli_main( int argc, char* argv[] );
+
+int main( int argc, char* argv[] ){
+	int retval = boinc_init();
+	if(retval){
+		cout << "Problem initializing BOINC system!" << endl;
+		return retval;
+		}
+	retval = boinc_garli_main( argc, argv );
+	if(retval) 
+		boinc_finish(retval);
+	else 
+		boinc_finish(0);
+	}
+
+int boinc_garli_main( int argc, char* argv[] )	{
+	outman.SetNoOutput(true);
+
+#elif defined( SUBROUTINE_GARLI ) || defined(OLD_SUBROUTINE_GARLI)
+int SubGarliMain(int rank)	
+	{
+	int argc=1;
+	char **argv=NULL;
+	//clear out whatever is in the reader already - it might be full if a single
+	//process has called SubGarliMain multiple times
+	GarliReader &reader = GarliReader::GetInstance();
+	reader.ClearContent();
+	//ditto for these other globals
+	modSpecSet.Delete();	
+	claSpecs.clear();
+	dataSubInfo.clear();
+#else
+int main( int argc, char* argv[] )	{
+#endif
+
+	CREATE_MEMCHK{//memory leak detecting trick - no overhead when turned off
+
+	#ifdef MPI_VERSION
+		MPIMain(argc, argv);
+	#endif
+
+	//I'm not sure that this is dependable or portable, but it is only for screen output, so isn't that important
+	int ptrSize = sizeof(int *);
+	if(ptrSize == 8)
+		is64bit = true;
+	else
+		is64bit = false;
+
+	string conf_name;
+
+	string svnRev = GetSvnRev();
+	string svnDate = GetSvnDate();
+
+#ifdef OLD_SUBROUTINE_GARLI
+	char name[12];
+	sprintf(name, "run%d.conf", rank);
+	conf_name = name;
+#elif defined(SUBROUTINE_GARLI)
+	conf_name = "garli.conf";
+#else
+	conf_name = "garli.conf";
+#endif
+
+#if defined(UNIX) || defined(BOINC)
+	interactive=false;
+#else
+	interactive=true;
+#endif
+
+	bool runTests = false;
+	bool validateMode = false;
+    if (argc > 1) {
+    	int curarg=1;
+        while(curarg<argc){
+				if(argv[curarg][0]=='-'){
+					//command line arguments with a dash
+					if(!_stricmp(argv[curarg], "-b") || !_stricmp(argv[curarg], "--batch")) interactive=false;
+#ifndef MAC_FRONTEND
+					else if(!_stricmp(argv[curarg], "-i") || !_stricmp(argv[curarg], "--interactive")) interactive=true;
+#else
+					else if (argv[curarg][1] == 'i') {
+						NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+						NSString *arg = [[[NSProcessInfo processInfo] arguments] objectAtIndex:curarg];
+						NSString *serverName = [[arg componentsSeparatedByString:@"="] objectAtIndex:1];
+						BOOL success = [[MFEInterfaceClient sharedClient] connectToServerWithName:serverName];
+						if (!success) {
+							NSLog(@"Failed to connect to interface server");
+							EXIT_FAILURE;
+						}
+						[pool release];
+#endif				
+					else if(argv[curarg][1]=='t') runTests = true;
+					else if(!strcmp(argv[curarg], "-v") || !_stricmp(argv[curarg], "--version")){
+						OutputVersion();
+#ifdef SUBROUTINE_GARLI
+						outman.UserMessage("MPI run distributing version");
+#endif
+#ifdef OPEN_MP
+						outman.UserMessage("OpenMP multithreaded version");
+#endif
+#ifdef SINGLE_PRECISION_FLOATS
+						outman.UserMessage("Single precision floating point version");
+#endif
+						outman.UserMessage("(DNA, AA, codon, morphology and partitioned models)");
+						outman.UserMessage("Copyright Derrick J. Zwickl 2005-2011");
+						outman.UserMessage("http://www.nescent.org/wg/garli/");
+						outman.UserMessage("garli.support at gmail.com");
+						return 0;
+						}
+					else if(!_stricmp(argv[curarg], "-h") || !_stricmp(argv[curarg], "--help")){
+						UsageMessage(argv[0]);
+						return 0;
+						}
+
+					else if(!strcmp(argv[curarg], "-V"))
+						//validate mode skips some allocation in pop::Setup, and then executes pop::ValidateInput,
+						//which is essentially a stripped down version of pop::SeedPopWithStartingTree
+						validateMode = true;
+#ifdef CUDA_GPU
+					else if(!_stricmp(argv[curarg], "--device")) cuda_device_number = atoi(argv[++curarg]);
+#endif
+					else {
+						outman.UserMessage("Unknown command line option %s", argv[curarg]);
+						UsageMessage(argv[0]);
+						return 0;
+						}
+					}
+				//if anything else appears, we'll assume that it's a config file
+				else conf_name = argv[curarg];
+	        curarg++;
+			}
+		}
+#ifdef GANESH
+	if(Tree::random_p==false) Tree::ComputeRealCatalan();
+#endif
+
+		//population is defined here, but not allocated until much later
+		Population *pop = NULL;
+
+		DataPartition dataPart;
+		DataPartition rawPart;
+		SequenceData *data = NULL;
+
+		try{
+			MasterGamlConfig conf;
+			bool confOK;
+			confOK = ((conf.Read(conf_name.c_str()) < 0) == false);
+
+#ifdef SUBROUTINE_GARLI
+			//override the ofprefix here, tacking .runXX onto it 
+			char temp[10];
+			if(rank < 10) sprintf(temp, ".run0%d", rank);
+			else sprintf(temp, ".run%d", rank);
+			conf.ofprefix += temp;
+#endif
+
+			// now set the random seed
+			int randomSeed;
+			if(conf.randseed < 1){
+				//Add in the pid with the time to get the seed.  Otherwise forking a bunch
+				//of runs simultaneously has a good chance of giving identical seeds
+				//I believe unsigned overflow is guaranteed to wrap around safely
+				pid_type pid = PID_FUNC();
+				srand((unsigned)time(NULL) + (unsigned)pid);
+				randomSeed = RandomInt(1, 1000000);
+				}
+			else randomSeed=conf.randseed;
+			rnd.set_seed(randomSeed);
+			
+			char temp_buf[100];
+
+			string datafile = conf.datafname;
+
+#ifdef BOINC
+			//deal with stdout and stderr, although I don't think that anything is being
+			//sent to them in BOINC mode
+			char buffer[2048];
+			boinc_resolve_filename("boinc_stdout", buffer, 2048);
+			FILE *stdout_fp = freopen(buffer, "w", stdout);
+			boinc_resolve_filename("boinc_stderr", buffer, 2048);
+			FILE *stderr_fp = freopen(buffer, "w", stderr);
+
+			//check for the presence of BOINC checkpoint files
+			conf.restart = true;
+			
+			sprintf(temp_buf, "%s.adap.check", conf.ofprefix.c_str());
+			boinc_resolve_filename(temp_buf, buffer, sizeof(buffer));
+			if(FileExists(buffer) == false) conf.restart = false;
+
+			sprintf(temp_buf, "%s.pop.check", conf.ofprefix.c_str());
+			boinc_resolve_filename(temp_buf, buffer, sizeof(buffer));
+			if(FileExists(buffer) == false) conf.restart = false;
+
+			if(conf.uniqueSwapBias != ONE_POINT_ZERO){
+				sprintf(temp_buf, "%s.swaps.check", conf.ofprefix.c_str());
+				boinc_resolve_filename(temp_buf, buffer, sizeof(buffer));
+				if(FileExists(buffer) == false) conf.restart = false;
+				}
+
+			if(confOK == true){
+				sprintf(temp_buf, "%s.screen.log", conf.ofprefix.c_str());
+				}
+			else sprintf(temp_buf, "ERROR.log");
+
+			if(conf.restart)
+				outman.SetLogFileForAppend(temp_buf);
+			else 
+				outman.SetLogFile(temp_buf);
+			
+			outman.UserMessage("Running BOINC %s Version %s.%s.%s (%s)", PROGRAM_NAME, MAJOR_VERSION, MINOR_VERSION, svnRev.c_str(), svnDate.c_str());
+			if(confOK && conf.restart == true) outman.UserMessage("Found BOINC checkpoint files.  Restarting....\n");
+
+			boinc_resolve_filename(datafile.c_str(), buffer, 2048);
+			datafile = buffer;
+#else	//not BOINC
+			if(confOK == true)
+				sprintf(temp_buf, "%s.screen.log", conf.ofprefix.c_str());
+			else
+				sprintf(temp_buf, "ERROR.log");
+
+			if(conf.restart) outman.SetLogFileForAppend(temp_buf);
+			else outman.SetLogFile(temp_buf);
+
+			outman.UserMessage("Running %s Version %s.%s.%s (%s)", PROGRAM_NAME, MAJOR_VERSION, MINOR_VERSION, svnRev.c_str(), svnDate.c_str());
+
+#endif
+
+#ifdef SUBROUTINE_GARLI //MPI versions
+			outman.UserMessage("->MPI Parallel Version<-\nNote: this version divides a number of independent runs across processors.");
+			outman.UserMessage("It is not the multipopulation parallel Garli algorithm.\n(but is generally a better use of resources)"); 
+#endif
+#if defined(OPEN_MP)
+			outman.UserMessageNoCR("->OpenMP multithreaded version for multiple processors/cores");
+#elif !defined(SUBROUTINE_GARLI)
+			outman.UserMessageNoCR("->Single processor version");
+#endif
+
+			if(is64bit)
+				outman.UserMessage(" for 64-bit OS<-");
+			else
+				outman.UserMessage(" for 32-bit OS<-");
+
+#ifdef SINGLE_PRECISION_FLOATS
+			outman.UserMessage("->Single precision floating point version<-\n");
+#endif
+
+#ifdef CUDA_GPU
+			outman.UserMessage("->CUDA GPU version<-\n");
+#endif
+			outman.UserMessage("##############################################################");
+			outman.UserMessage(" This is GARLI 2.1: maximum likelihood phylogenetic inference");
+			outman.UserMessage(" using nucleotide, amino acid, codon and morphology-like data,");
+			outman.UserMessage("             as well as partitioned models.");
+			outman.UserMessage("   General program usage is extensively documented here:");
+			outman.UserMessage("            http://www.nescent.org/wg/garli/");
+			outman.UserMessage("   See this page for details on partitioned model usage:");
+			outman.UserMessage("  http://www.nescent.org/wg_garli/Using_partitioned_models");
+			outman.UserMessage("   and this page for details on Mkv mophology model usage:");
+			outman.UserMessage("    http://www.nescent.org/wg_garli/Mkv_morphology_model");
+			outman.UserMessage("         PLEASE LET ME KNOW OF ANY PROBLEMS AT:");
+			outman.UserMessage("                garli.support at gmail.com");
+			outman.UserMessage("##############################################################");
+
+			outman.UserMessageNoCR("Compiled %s %s", __DATE__, __TIME__); 
+
+#if defined (_MSC_VER)
+			outman.UserMessage(" using Microsoft C++ compiler version %.2f", _MSC_VER/100.0);
+#elif defined(__INTEL_COMPILER)
+			outman.UserMessage(" using Intel icc compiler version %.2f", __INTEL_COMPILER/100.0);
+#elif defined(__GNUC__)
+			outman.UserMessage(" using GNU gcc compiler version %d.%d.%d", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
+#else	
+			outman.UserMessage("");
+#endif
+
+#ifdef NCL_NAME_AND_VERSION
+			outman.UserMessage("Using %s", NCL_NAME_AND_VERSION);
+#endif
+
+			OutputImportantDefines();
+			outman.UserMessage("\n#######################################################");
+			outman.UserMessage("Reading config file %s", conf_name.c_str());
+			if(confOK == false) throw ErrorException("Error in config file...aborting");
+
+#ifdef SUBROUTINE_GARLI
+			if(conf.randseed != -1)
+				throw ErrorException("You cannot specify a random number seed with the MPI version.  This would cause all of the\n\tindependent MPI processes to give exactly identical results.  Set randomseed to -1");
+#endif
+			//This is pretty hacky.  Create one modSpec now because it is needed
+			//to read the data (to identify the expected type of sequence for phylip and
+			//fasta files), then add more later if there are multiple char blocks or CharPartitions
+			//in the case of a Nexus datafile, we actually don't need to know the datatype
+			//in advance, and can handle data subsets with different datatypes
+			modSpecSet.AddModSpec(conf.configModelSets[0]);
+
+			//read the datafile with the NCL-based GarliReader - should allow nexus, phylip and fasta
+			outman.UserMessage("###################################################\nREADING OF DATA");
+			GarliReader &reader = GarliReader::GetInstance();
+			bool usedNCL = reader.ReadData(datafile.c_str(), *modSpecSet.GetModSpec(0));
+			if(! usedNCL) 
+				throw ErrorException("There was a problem reading the data file.");
+			
+			//assuming a single taxa block
+			if(reader.GetNumTaxaBlocks() > 1) throw ErrorException("Expecting only one taxa block in datafile");
+			NxsTaxaBlock *taxblock = reader.GetTaxaBlock(0);
+
+			//currently data subsets will be created for each separate characters block, and/or for each
+			//part of a char partition within a characters block
+			int numCharBlocks = reader.GetNumCharactersBlocks(taxblock);
+			if(numCharBlocks == 0) throw ErrorException("No character data (in characters/data blocks) found in datafile");
+			vector<pair<NxsCharactersBlock *, NxsUnsignedSet> > effectiveMatrices;
+
+			outman.UserMessage("\n###################################################\nPARTITIONING OF DATA AND MODELS");
+			//loop over characters blocks
+			for(int c = 0;c < numCharBlocks;c++){
+				NxsCharactersBlock *charblock = reader.GetCharactersBlock(taxblock, c);
+				string cbName = charblock->GetTitle();
+				NxsAssumptionsBlock *assblock = NULL;
+				NxsUnsignedSet charSet;
+				bool foundCharPart = false;
+
+				int numAssBlocks = reader.GetNumAssumptionsBlocks(charblock);
+				if(numAssBlocks > 0){
+					//loop over assumptions blocks for this charblock
+					for(int a = 0;a < numAssBlocks;a++){
+						assblock = reader.GetAssumptionsBlock(charblock, a);
+						int numParts = assblock->GetNumCharPartitions();
+						if(numParts > 1) 
+							throw ErrorException("Found more than one CHARPARTITION referring to CHARACTERS block %s in a single ASSUMPTIONS or SETS blocks", charblock->GetTitle().c_str());
+						else if(numParts == 1){
+							if(foundCharPart == true)
+								throw ErrorException("Found more than one CHARPARTITION referring to CHARACTERS block %s in multiple ASSUMPTIONS or SETS blocks", charblock->GetTitle().c_str());\
+							else 
+								foundCharPart = true;
+							//get the name of the charpartition
+							vector<std::string> charPartNames;
+							assblock->GetCharPartitionNames(charPartNames);
+							const NxsPartition *part = assblock->GetCharPartition(charPartNames[0]);
+							int numSubsets = part->size();
+							int subsetNum = 0;
+							//loop over the partition subsets, each of which creates a data subset in GARLI
+							for(NxsPartition::const_iterator subit = part->begin();subit != part->end();subit++){
+								charSet = (*subit).second;
+								dataSubInfo.push_back(DataSubsetInfo(effectiveMatrices.size(), c, cbName, subsetNum, (*subit).first, DataSubsetInfo::NUCLEOTIDE, DataSubsetInfo::NUCLEOTIDE));
+								effectiveMatrices.push_back(make_pair(charblock, charSet));
+								subsetNum++;
+								}
+							}
+						}
+					if(foundCharPart == false){//no charpart found 
+						dataSubInfo.push_back(DataSubsetInfo(effectiveMatrices.size(), c, cbName, -1, "", DataSubsetInfo::NUCLEOTIDE, DataSubsetInfo::NUCLEOTIDE));
+						effectiveMatrices.push_back(make_pair(charblock, charSet));
+						}
+					}
+				else{ //no assumptions block found,  
+					dataSubInfo.push_back(DataSubsetInfo(effectiveMatrices.size(), c, cbName, -1, "", DataSubsetInfo::NUCLEOTIDE, DataSubsetInfo::NUCLEOTIDE));
+					effectiveMatrices.push_back(make_pair(charblock, charSet));
+					}
+				}
+
+			//report on how data and models line up, and deal with a few unsupported possibilites
+			if(conf.linkModels && conf.configModelSets.size() > 1)
+				throw ErrorException("Multiple model subsets specified, but linkmodels = 1");
+			if(effectiveMatrices.size() > 1){
+				if(conf.configModelSets.size() == 1){//only one model description found
+					if(conf.linkModels)
+						outman.UserMessage("\nCHECK: ONE MODEL APPLIES TO ALL DATA SUBSETS\n\t(full linkage, all parameters shared)\n");
+					else
+						outman.UserMessage("\nCHECK: ONE MODEL TYPE APPLIES TO ALL DATA SUBSETS,\n\tBUT WITH INDEPENDENT MODEL PARAMETERS (no linkage)\n");
+					}
+				else{//mulitple model descriptions found
+					if(conf.configModelSets.size() != effectiveMatrices.size())
+						throw ErrorException("Multiple data subsets and model subsets specified, but numbers don't match");
+					else outman.UserMessage("\nCHECK: DIFFERENT MODEL TYPES AND MODEL PARAMETERS APPLY\n\tTO EACH DATA SUBSET (no linkage)\n");
+					}
+				}
+			else if(conf.configModelSets.size() != 1)
+				throw ErrorException("Multiple models specified, but only one data subset found");
+
+			//set this
+			modSpecSet.SetInferSubsetRates(conf.subsetSpecificRates && effectiveMatrices.size() > 1);
+
+			//now create a datamatrix object for each effective matrix
+			//because of exsets some subsets of a charpart could contain no characters,
+			//but I'm not going to deal with that right now, and will crap out
+
+			//EFFECTIVE matrices ( = datasubsets) are the actual chunks of data specified by separate charblocks and/or charpartitions
+			//There is a one to one matching between effective matrices and CLAs.  EXCEPT in the case of Nstate data,
+			//in which case multiple matrices will be spawned 
+
+			for(int dataChunk = 0;dataChunk < effectiveMatrices.size();dataChunk++){
+				ModelSpecification *modSpec = NULL;
+				//for Mk type data the number of actual matrices created can be > the number of actual data chunks
+				//e.g., a first characters block might spawn 3 matrices for 2 state, 3 state and 4 state characters
+				//sucessive char blocks then need to take that into account
+				//a dataSubset is equivalent to a matrix in this respect
+				int nextMatrixNum = dataPart.NumSubsets();
+
+				if(dataChunk > 0){
+					if(conf.linkModels){//linkage means that all clas/matrices point to the same model/modSpec
+						//EXCEPT in the case of Mk type data with different numbers of states.  That is taken 
+						//care of below.
+						claSpecs.push_back(ClaSpecifier(dataChunk,0,dataChunk));
+						modSpec = modSpecSet.GetModSpec(0);
+						}
+					else{//models are not linked ...
+						if(conf.configModelSets.size() == 1)//but are all described by the same settings in the config file
+							modSpecSet.AddModSpec(conf.configModelSets[0]);
+						else{ //each has its own description in the config
+							modSpecSet.AddModSpec(conf.configModelSets[dataChunk]);
+							}
+						claSpecs.push_back(ClaSpecifier(nextMatrixNum, nextMatrixNum, nextMatrixNum));
+						modSpec = modSpecSet.GetModSpec(nextMatrixNum);
+						}
+					}
+				else{ //if this is the first model, it must correspond to the first modSpec
+					modSpec = modSpecSet.GetModSpec(0);
+					claSpecs.push_back(ClaSpecifier(0,0,0));
+					}
+				if(conf.linkModels && (modSpec->IsMkTypeModel() || modSpec->IsOrientedGap()))
+					throw ErrorException("Model linkage cannot be used with Mk/Mkv models (nor does it\n\tneed to be, since there are no estimated parameters).\n\tSet linkmodels = 0");
+
+				//defaults here are NUCLEOTIDE, so make changes as necessary
+				if(modSpec->IsCodon()) 
+					dataSubInfo[dataChunk].usedAs = DataSubsetInfo::CODON;
+				else if(modSpec->IsCodonAminoAcid())
+					dataSubInfo[dataChunk].usedAs = DataSubsetInfo::AMINOACID;
+				else if(modSpec->IsAminoAcid())
+					dataSubInfo[dataChunk].readAs = dataSubInfo[dataChunk].usedAs = DataSubsetInfo::AMINOACID;
+				else if(modSpec->IsNState())
+					dataSubInfo[dataChunk].readAs = dataSubInfo[dataChunk].usedAs = DataSubsetInfo::NSTATE;
+				else if(modSpec->IsNStateV())
+
+					dataSubInfo[dataChunk].readAs = dataSubInfo[dataChunk].usedAs = DataSubsetInfo::NSTATEV;
+				else if(modSpec->IsOrderedNState())
+					dataSubInfo[dataChunk].readAs = dataSubInfo[dataChunk].usedAs = DataSubsetInfo::ORDNSTATE;
+				else if(modSpec->IsOrderedNStateV())
+					dataSubInfo[dataChunk].readAs = dataSubInfo[dataChunk].usedAs = DataSubsetInfo::ORDNSTATEV;
+				else if(modSpec->IsOrientedGap())
+					dataSubInfo[dataChunk].readAs = dataSubInfo[dataChunk].usedAs = DataSubsetInfo::ORIENTEDGAP;
+				else if(modSpec->IsBinaryNotAllZeros())
+					dataSubInfo[dataChunk].readAs = dataSubInfo[dataChunk].usedAs = DataSubsetInfo::BINARY_NOT_ALL_ZEROS;
+				else if(modSpec->IsBinary())
+					dataSubInfo[dataChunk].readAs = dataSubInfo[dataChunk].usedAs = DataSubsetInfo::BINARY;
+
+				dataSubInfo[dataChunk].Report();
+				//outman.UserMessage("");
+
+				// Create the data object
+				//for nstate data the effective matrices will be further broken up into implied matrices that each have the same number of observed states
+				//the implied matrix number will be that number of states
+				int actuallyUsedImpliedMatrixIndex = 0;
+				int maxObservedStates = effectiveMatrices[dataChunk].first->GetMaxObsNumStates(false);
+				//for Mk the impliedMatrix number is the number of states
+				for(int impliedMatrix = 2;impliedMatrix < (modSpec->IsMkTypeModel() ? maxObservedStates + 1 : 3);impliedMatrix++){
+					if(modSpec->IsMkTypeModel() && !modSpec->IsOrientedGap()){
+						bool isOrdered = (modSpec->IsOrderedNState() || modSpec->IsOrderedNStateV());
+						bool isBinary = modSpec->IsBinary() || modSpec->IsBinaryNotAllZeros();
+						bool isConditioned =  (modSpec->IsNStateV() || modSpec->IsOrderedNStateV() || modSpec->IsBinaryNotAllZeros());
+						//data = new NStateData(impliedMatrix, (modSpec->IsNStateV() || modSpec->IsOrderedNStateV()), (modSpec->IsOrderedNState() || modSpec->IsOrderedNStateV()));
+						data = new NStateData(impliedMatrix, isOrdered, isBinary, isConditioned);
+						}
+					else if(modSpec->IsOrientedGap())
+						data = new OrientedGapData();
+					else if(modSpec->IsAminoAcid() && modSpec->IsCodonAminoAcid() == false)
+						data = new AminoacidData();
+					else //all other data will be read into a DNA matrix and
+						//then converted if necessary
+						data = new NucleotideData();
+
+					//it really shouldn't be necessary to use the PatternManager on non-sequence data
+					if(modSpec->IsNucleotide() || modSpec->IsAminoAcid() || modSpec->IsCodon())
+						data->SetUsePatternManager(conf.usePatternManager);
+					else
+						data->SetUsePatternManager(0);
+					
+					//if no charpart was specified, the second argument here will be empty
+					data->CreateMatrixFromNCL(effectiveMatrices[dataChunk].first, effectiveMatrices[dataChunk].second);
+
+#ifdef SINGLE_PRECISION_FLOATS
+					if(modSpec->IsMkTypeModel() || modSpec->IsOrientedGap()) throw ErrorException("Sorry, Mk/Mkv type models have not yet been tested with single precision.");
+#endif
+				
+					if(data->NChar() == 0){
+						//if there weren't any characters with a certain number of states,
+						//just get rid of the matrix.  This could in theory also work for
+						//totally excluded subsets, but that gets complicated because it
+						//isn't clear how the indexing of models specified in the config
+						//file should work
+						assert(modSpec->IsMkTypeModel());
+						outman.UserMessage("NOTE: No characters found with %d observed states.", impliedMatrix);
+						delete data;
+						}
+					else{//now we have a data matrix object created, already filtered for the correct sites or number of states
+						if(modSpec->IsMkTypeModel()){
+							if(modSpec->IsGammaRateHet() || modSpec->IsFlexRateHet())
+								throw ErrorException("Sorry, rate heterogeneity cannot be used with Mk/Mkv models yet.\n\tSet ratehetmodel = none.");
+							if(actuallyUsedImpliedMatrixIndex > 0){
+								//the specs are being added as we read and create subsets, so we can add them for the implied matrices
+								//as we go
+								claSpecs.push_back(ClaSpecifier(nextMatrixNum + actuallyUsedImpliedMatrixIndex, nextMatrixNum + actuallyUsedImpliedMatrixIndex, nextMatrixNum + actuallyUsedImpliedMatrixIndex));
+								//clone the current datasubset info, which applies to all of the implied matrices within this effective matrix
+								dataSubInfo.push_back(dataSubInfo[dataChunk]);
+								//also clone the modspec.  This isn't really necessary (or good) except that the number of states is stored by the modspecs
+								if(conf.linkModels)
+									modSpecSet.AddModSpec(conf.configModelSets[0]);
+								else//there may be only a single model set specified, but no linkage
+									modSpecSet.AddModSpec(conf.configModelSets[conf.configModelSets.size() > 1 ? dataChunk : 0]);
+								modSpec = modSpecSet.GetModSpec(modSpecSet.NumSpecs() - 1);
+								}
+							modSpec->SetNStates(impliedMatrix);
+							}
+						else if(modSpec->IsOrientedGap()){
+							if(modSpec->IsGammaRateHet() || modSpec->IsFlexRateHet())
+								throw ErrorException("Sorry, rate heterogeneity cannot be used with gap models yet.\n\tSet ratehetmodel = none.");
+							if(modSpecSet.InferSubsetRates())
+								outman.UserMessage("WARNING - YOU SHOULD TURN OFF SUBSET SPECIFIC RATE ESTIMATION WHEN USING GAP MODELS");
+							if(actuallyUsedImpliedMatrixIndex > 0){
+								//the specs are being added as we read and create subsets, so we can add them for the implied matrices
+								//as we go
+								claSpecs.push_back(ClaSpecifier(nextMatrixNum + actuallyUsedImpliedMatrixIndex, nextMatrixNum + actuallyUsedImpliedMatrixIndex, nextMatrixNum + actuallyUsedImpliedMatrixIndex));
+								//clone the current datasubset info, which applies to all of the implied matrices within this effective matrix
+								dataSubInfo.push_back(dataSubInfo[dataChunk]);
+								//also clone the modspec.  This isn't really necessary (or good) except that the number of states is stored by the modspecs
+								if(conf.linkModels)
+									modSpecSet.AddModSpec(conf.configModelSets[0]);
+								else//there may be only a single model set specified, but no linkage
+									modSpecSet.AddModSpec(conf.configModelSets[conf.configModelSets.size() > 1 ? dataChunk : 0]);
+								modSpec = modSpecSet.GetModSpec(modSpecSet.NumSpecs() - 1);
+								}
+							}
+						else if(modSpec->IsCodon()){
+							rawPart.AddSubset(data);
+							const NucleotideData *nuc = dynamic_cast<NucleotideData *>(data);
+							CodonData *dat;
+							if(nuc != NULL)
+								dat = new CodonData(nuc, modSpec->geneticCode, conf.ignoreStopCodons);
+							else throw ErrorException("Attempted to create codon matrix from non-nucleotide data");
+
+							//this probably shouldn't go here, but...
+							if(modSpec->IsF1x4StateFrequencies()) dat->SetF1X4Freqs();
+							else if(modSpec->IsF3x4StateFrequencies()) dat->SetF3X4Freqs();
+							else if(modSpec->IsEmpiricalStateFrequencies()) dat->SetCodonTableFreqs();
+
+							data = dat;
+							}
+						else if(modSpec->IsCodonAminoAcid()){
+							rawPart.AddSubset(data);
+							const NucleotideData *nuc = dynamic_cast<NucleotideData *>(data);
+							AminoacidData *dat;
+							if(nuc != NULL)
+								dat = new AminoacidData(nuc, modSpec->geneticCode, conf.ignoreStopCodons);
+							else throw ErrorException("Attempted to translate to amino acids from non-nucleotide data");
+
+							data = dat;
+							}
+				
+						dataPart.AddSubset(data);
+
+						if(modSpec->IsMkTypeModel()){
+							outman.UserMessage("\tSubset of data with %d states:", impliedMatrix);
+							string chars;
+							data->GetStringOfOrigDataColumns(chars);
+							outman.UserMessage("\t  chars%s", chars.c_str());
+							}
+
+						if(conf.combineAdjacentIdenticalGapPatterns && (modSpec->IsOrientedGap() || modSpec->IsBinaryNotAllZeros())){
+							if(conf.usePatternManager)
+								throw ErrorException("Sorry, the pattern manager can't be used with gap collapsing currently");
+							data->EliminateAdjacentIdenticalColumns();
+							}
+
+						data->ProcessPatterns();
+
+						dataSubInfo[dataChunk + actuallyUsedImpliedMatrixIndex].totalCharacters = data->TotalNChar();
+						dataSubInfo[dataChunk + actuallyUsedImpliedMatrixIndex].uniqueCharacters = data->NChar();
+						actuallyUsedImpliedMatrixIndex++;
+						}
+					}
+					//subset specific rates will be set if:
+					//1. subsetspecificrates = 1 in the conf
+					// and 
+					//2a. a partition is actually specified via multiple char blocks or a charpart
+					// and/or
+					//2b. nstate (Mk) model is specified, characters have different numbers of observed states
+					//(2b. is what needs to be taken care of here because we don't know whether there will
+					//be implied blocks in advance)
+					if(conf.subsetSpecificRates && modSpecSet.InferSubsetRates() == false)
+						if(actuallyUsedImpliedMatrixIndex > 1)
+							modSpecSet.SetInferSubsetRates(true);
+				}
+			
+			//this depends on the fact that an extra taxon slot was allocated but not yet used
+			if(modSpecSet.AnyOrientedGap()){
+				NxsTaxaBlock *tax = reader.GetTaxaBlock(0);
+				if(!tax->IsAlreadyDefined("ROOT"))
+					dataPart.AddDummyRoots();
+				}
+	
+			outman.UserMessage("\n###################################################");
+			//could deallocate the storage in the NCL reader here, which saves a bit of memory but isn't critical
+			//reader.DeleteCharacterBlocksFromFactories();
+			
+			//allocate the population
+			pop = new Population();
+			pop->usedNCL = usedNCL;
+			pop->Setup(&conf, &dataPart, &rawPart, 1, (validateMode == true ? -1 : 0));
+			pop->SetOutputDetails();
+
+			outman.UserMessage("STARTING RUN");
+			if(runTests){
+				outman.UserMessage("starting internal tests...");
+					pop->RunTests();
+				outman.UserMessage("******Successfully completed tests.******");
+				return 0;
+				}
+
+			if(conf.optimizeInputOnly)
+				conf.runmode = 11;
+
+			if(validateMode){
+				//validate mode skips some allocation in pop::Setup, and then executes pop::ValidateInput,
+				//which is essentially a stripped down version of pop::SeedPopWithStartingTree
+					pop->ValidateInput(1);
+				outman.UserMessage("VALIDATION COMPLETE. Check output above for information and possible errors.");
+				}
+				//the runmodes are essentially a hidden way of causing different (often very different) program
+				//behavior at runtime.  not really for user consumption
+			else if(conf.runmode != 0){
+				if(conf.runmode == 1)
+						pop->ApplyNSwaps(10);
+				else if(conf.runmode == 7)
+						pop->VariableStartingTreeOptimization(false);
+				else if(conf.runmode == 9)
+						pop->VariableStartingTreeOptimization(true);
+				else if(conf.runmode == 8){
+					throw ErrorException("Sorry, site rate estimation is not yet implemented in this version.");
+#ifdef OPEN_MP
+					throw ErrorException("can't estimate site rates in openmp version!");
+#endif
+#ifndef ALLOW_SINGLE_SITE
+					throw ErrorException("the program must be compiled with ALLOW_SINGLE_SITE defined in defs.h to use site rate estimation (runmode = 8)!");
+#endif
+					pop->OptimizeSiteRates();
+					}
+				else if(conf.runmode == 11){
+					pop->OptimizeInputAndWriteSitelikelihoods();
+					}
+				else if(conf.runmode == 12){
+					pop->OptimizeInputAndWriteSitelikelihoodsAndTryRootings();
+					}
+				else if(conf.runmode > 20){
+						pop->GenerateTreesOnly(conf.runmode);
+					}
+					else if(conf.runmode > 1) //this is runmodes 2-6
+						pop->SwapToCompletion(conf.startOptPrec);
+				}
+			else{
+					//if no checkpoint files are actually found conf->restart will be set to zero
+					if(pop->conf->restart) 
+						pop->conf->restart = pop->ReadStateFiles();
+
+					pop->SetOutputDetails();
+					if(pop->conf->bootstrapReps == 0){//NOT bootstrapping
+						pop->PerformSearch();
+						}
+					else
+						//Bootstrap() in turn calls PerformSearch for each boot rep
+						pop->Bootstrap();
+					pop->FinalizeOutputStreams(2);
+					}
+				dataPart.Delete();
+				if(pop != NULL){
+					delete pop;
+					pop = NULL;
+				}
+			}catch(ErrorException &err){
+				if(outman.IsLogSet() == false){
+					outman.SetLogFile("ERROR.log");
+					if(interactive == false) UsageMessage(argv[0]);
+					}
+				outman.UserMessage("\nERROR: %s\n\n", err.message);
+				if(pop != NULL){
+					pop->FinalizeOutputStreams(0);
+					pop->FinalizeOutputStreams(1);
+					pop->FinalizeOutputStreams(2);
+					}
+
+#ifdef MAC_FRONTEND
+				NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+				NSString *messageForInterface = [NSString stringWithUTF8String:err.message];
+				[[MFEInterfaceClient sharedClient] didEncounterError:messageForInterface];
+				[pool release];
+#endif
+				if(interactive==true){
+					outman.UserMessage("\n-Press enter to close program.-");
+					char d=getchar();
+					}
+				return 1;
+				}
+			catch(int error){
+				if(error==Population::nomem) cout << "not able to allocate enough memory!!!" << endl;
+				}
+		dataPart.Delete();
+		modSpecSet.Delete();
+	
+		if(interactive==true){
+			outman.UserMessage("\n-Press enter to close program.-");
+			char d=getchar();
+			}
+		outman.CloseLogFile();
+		}
+
+#if defined(MONITORING_ALLOCATION) && !defined(NDEBUG)
+		#if defined(WRITE_MEM_REPORT_TO_FILE)
+			char filename[50];
+			#ifndef WIN32
+			int rank=0;
+	//		MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+			sprintf(filename, "memcheck%d.txt", rank);
+			#else
+			strcpy(filename, "memcheck.txt");
+			#endif
+			ofstream memf(filename);
+			MEMCHK_REPORT(memf)
+			memf.close();
+		#else
+			MEMCHK_REPORT(cout)
+		#endif
+	#endif
+
+	return 0;
+};
+
diff --git a/src/garlireader.cpp b/src/garlireader.cpp
new file mode 100644
index 0000000..9ebb106
--- /dev/null
+++ b/src/garlireader.cpp
@@ -0,0 +1,1435 @@
+// GARLI version 2.1 source code
+// Copyright 2005-2014 Derrick J. Zwickl
+// email: zwickl at nescent.org
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+//  This file was adapted from from the BasicCmdLine example provided as
+//  part of the NCL
+
+//	Copyright (C) 1999-2002 Paul O. Lewis
+//
+//	This file is part of NCL (Nexus Class Library).
+//
+//	NCL is free software; you can redistribute it and/or modify
+//	it under the terms of the GNU General Public License as published by
+//	the Free Software Foundation; either version 2 of the License, or
+//	(at your option) any later version.
+//
+//	NCL is distributed in the hope that it will be useful,
+//	but WITHOUT ANY WARRANTY; without even the implied warranty of
+//	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//	GNU General Public License for more details.
+//
+//	You should have received a copy of the GNU General Public License
+//	along with NCL; if not, write to the Free Software Foundation, Inc., 
+//	59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+
+#include "defs.h"
+#include "ncl.h"
+#include "garlireader.h"
+#include "outputman.h"
+#include "errorexception.h"
+#include "model.h"
+#include <sstream>
+#include <cassert>
+
+int GARLI_main( int argc, char* argv[] );
+
+extern OutputManager outman;
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	The constructor simply passes along `i' to the base class constructor. Nothing else needs to be done.
+*/
+MyNexusToken::MyNexusToken(
+  istream &i)	/* the input file stream attached to the NEXUS file to be read */
+  : NxsToken(i)
+	{
+	}
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	Overrides the NxsToken::OutputComment virtual function (which does nothing) to display output comments [!comments
+|	like this one beginning with an exclamation point]. The output comment is passed through the OutputManager
+*/
+void MyNexusToken::OutputComment(
+  const NxsString &msg)	/* the output comment to be displayed */
+	{
+	size_t pos;
+	string s;
+	//changing this again - just eating the Garli output comments
+	s = "GarliScore";
+	pos = msg.find(s);
+	if(pos != string::npos){
+		//outman.UserMessage("This is apparently a tree inferred by Garli in a previous run.  Its score was %s", msg.substr(s.length()).c_str());
+		return;
+		}
+	s = "GarliModel";
+	pos = msg.find(s);
+	if(pos != string::npos){
+		//outman.UserMessage("Garli's model parameter values used in inferring this tree:\n\t%s", msg.substr(s.length()).c_str());
+		return;
+		}
+	
+	s =	"****NOTE";//this is a note about the parameter values either being from a run that was terimated early or that 
+					//they are only optimal for a certain tree. This is mainly for output when reading the trees in PAUP
+					//and we will just ignore them here
+	pos = msg.find(s);
+	if(pos != string::npos) return;
+	
+	outman.UserMessage("\nCOMMENT FOUND IN NEXUS FILE (output verbatim):");
+	outman.UserMessage(msg);
+	outman.UserMessage("(END OF NEXUS COMMENT)");
+	}
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	Initializes the `id' data member to "GarliReader" and calls the FactoryDefaults member function to perform the 
+|	remaining initializations. The data member `'' is set to NULL so that memory will be allocated for it in
+|	FactoryDefaults.
+*/
+GarliReader::GarliReader()
+	{
+	//none of these besides garliBlock are being used anymore
+	taxa			= NULL;
+	trees			= NULL;
+	assumptions		= NULL;
+	distances		= NULL;
+	characters		= NULL;
+	data			= NULL;
+	next_command	= NULL;
+	
+	
+	garliBlock		= NULL;
+	ClearContent();
+	}
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	Closes `logf' if it is open and deletes memory allocated to `next_command'.
+*/
+GarliReader::~GarliReader()
+	{
+	//this is a little odd, since ClearContent will reallocate a few things, but 
+	//it also ensures that a bunch of other things are deleted
+	ClearContent();
+
+	assert(next_command != NULL);
+	delete [] next_command;
+
+	if (logf_open)
+		logf.close();
+	
+	if(garliBlock != NULL){
+		Detach(garliBlock);
+		delete garliBlock;
+		garliBlock = NULL;
+		}
+	}
+
+//DJZ THIS WAS ADDED DIRECTLY FROM NxsReader, since Public Reader apparently deprecates this old API and
+//Add just asserts zero there.
+/*----------------------------------------------------------------------------------------------------------------------
+|	Adds `newBlock' to the end of the list of NxsBlock objects growing from `blockList'. If `blockList' points to NULL,
+|	this function sets `blockList' to point to `newBlock'. Calls SetNexus method of `newBlock' to inform `newBlock' of
+|	the NxsReader object that now owns it. This is useful when the `newBlock' object needs to communicate with the 
+|	outside world through the NxsReader object, such as when it issues progress reports as it is reading the contents
+|	of its block.
+*/
+/*
+void GarliReader::Add(
+  NxsBlock *newBlock)	// a pointer to an existing block object
+	{
+	assert(newBlock != NULL);
+
+	newBlock->SetNexus(this);
+
+	if (!blockList)
+		blockList = newBlock;
+	else
+		{
+		// Add new block to end of list
+		//
+		NxsBlock *curr;
+		for (curr = blockList; curr && curr->next;)
+			curr = curr->next;
+		assert(curr && !curr->next);
+		curr->next = newBlock;
+		}
+	}
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	Called by the NxsReader object when a block named `blockName' is entered. Allows program to notify user of 
+|	progress in parsing the NEXUS file. Also gives program the opportunity to ask user if it is ok to purge data 
+|	currently contained in this block. If user is asked whether existing data should be deleted, and the answer comes 
+|	back no, then then return false, otherwise return true. Overrides pure virtual function in class NxsReader. 
+*/
+bool GarliReader::EnteringBlock(
+  NxsString blockName)	/* the name of the block just entered */
+	{
+	message = "Reading ";
+	message += blockName;
+	message += " block...";
+	PrintMessage(false);
+
+	//3/25/08 if we already found a Garli block with a model (e.g. in the dataset file)
+	//we should crap out, since we don't know which one the user meant to use
+	//this is a change from previous behavior, in which I wanted the second to just override the first.
+	if(blockName.Equals("GARLI") && FoundModelString())
+		throw ErrorException("Multiple GARLI blocks found (possibly in multiple files).\n\tRemove or comment out all but one.");
+
+	return true;
+	}
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	Called by the NxsReader object when exiting a block named `blockName'. Allows program to notify user of progress 
+|	in parsing the NEXUS file. Virtual function that overrides the pure virtual function in the base class NxsReader.
+*/
+void GarliReader::ExitingBlock(
+  NxsString blockName)	/* the name of the block just exited */
+	{
+	//message to indicate that we sucessfully read whatever block this was
+	string mess;
+	if(blockName.Equals("CHARACTERS")){
+		switch (static_cast<NxsCharactersBlock *>(currBlock)->GetDataType()){
+			case NxsCharactersBlock::dna:
+				mess = " found dna data...";
+				break;
+			case NxsCharactersBlock::rna:
+				mess = " found rna data...";
+				break;
+			case NxsCharactersBlock::protein:
+				mess = " found protein data...";
+				break;
+			case NxsCharactersBlock::standard:
+				mess = " found standard data...";
+				break;
+			case NxsCharactersBlock::nucleotide:
+				mess = " found nucleotide data...";
+				break;
+			case NxsCharactersBlock::continuous:
+				mess = " found continuous data...";
+				break;
+			}
+		}
+
+	mess += " successful";
+	outman.UserMessage(mess);
+	}
+
+//Delete only the characters blocks, which can take a substantial amount of memory, and aren't needed after
+//Garli's matrices are created
+void GarliReader::DeleteCharacterBlocksFromFactories()
+	{
+	for(vector<NxsCharactersBlock *>::iterator cit = charactersBlockVec.begin();cit != charactersBlockVec.end();cit++){
+		RemoveBlockFromUsedBlockList(*cit);
+		delete *cit;
+		}
+	}
+
+//This used to be the FactoryDefaults function, but was changes to be consistent with
+//the higher level functions in PublicReader.  It clears out/resets everything that 
+//was in the reader AND gets the reader ready to do further reading - thus it is
+//a function that returns the reader to the state it was just after allocation.  It
+//is NOT a deallocater, although it will properly deallocate things if necessary
+//to get back to the initial state
+void GarliReader::ClearContent()
+	{
+	DeleteBlocksFromFactories();
+	MultiFormatReader::ClearContent();
+	inf_open = false;
+	logf_open = false;
+	quit_now = false;
+	message.clear();
+	//tell the reader to nuke identical taxa blocks, which could be created by reading a data/characters block
+	//and then another file with a trees block and taxa block
+	cullIdenticalTaxaBlocks();
+	treesBlockTemplate->SetAllowImplicitNames(true);
+
+	if(garliBlock != NULL){
+		Detach(garliBlock);
+		delete garliBlock;
+		garliBlock = NULL;
+		}
+
+	garliBlock = new GarliBlock();
+	Add(garliBlock);
+
+	if (next_command == NULL)
+		next_command = new char[COMMAND_MAXLEN + 1];
+	next_command[0] = '\0';
+
+	//none of the following should be getting used, but delete just in case
+	if (trees != NULL)
+		{
+		assert(0);
+		Detach(trees);
+		delete trees;
+		trees = NULL;
+		}
+
+	if (taxa != NULL)
+		{
+		assert(0);
+		Detach(taxa);
+		delete taxa;
+		taxa = NULL;
+		}
+
+	if (assumptions != NULL)
+		{
+		Detach(assumptions);
+		delete assumptions;
+		assumptions = NULL;
+		}
+
+	if (distances != NULL)
+		{
+		Detach(distances);
+		delete distances;
+		distances = NULL;
+		}
+
+	if (characters != NULL)
+		{
+		assert(0);
+		Detach(characters);
+		delete characters;
+		characters = NULL;
+		}
+
+	if (data != NULL)
+		{
+		assert(0);
+		Detach(data);
+		delete data;
+		data = NULL;
+		}
+	}
+
+	//DJZ this is my function, replacing an old one that appeared in funcs.cpp
+	//simpler now, since it uses NxsMultiFormatReader
+bool GarliReader::ReadData(const char* filename, const ModelSpecification &mSpec){
+	//first use a few of my crappy functions to try to diagnose the type of file and data
+	//then call the NxsMultiFormatReader functions to process it
+	if (!FileExists(filename))	{
+		throw ErrorException("data file not found: %s!", filename);
+		}
+	//if it is Nexus, don't need to specify anything else in advance
+	if(FileIsNexus(filename)){
+		outman.UserMessage("Attempting to read data file in Nexus format (using NCL):\n\t%s ...", filename);
+		ReadFilepath(filename, NEXUS_FORMAT);
+		}
+	else{//if this isn't nexus we'll try a bunch of formats to see if we can get something to work
+		//the idea here is that we create an ordered list of formats to try, then we try them 
+		typedef pair<MultiFormatReader::DataFormatType, NxsString> FormatPair;
+		list<FormatPair> formatsToTry;
+		NxsString name;
+		if(FileIsFasta(filename)){
+			//IsAminoAcid() returns true with codon-aminoacid datatype
+			if(mSpec.IsAminoAcid() && mSpec.IsCodonAminoAcid() == false){
+				formatsToTry.push_back(FormatPair(FASTA_AA_FORMAT, "Fasta amino acid"));
+				}
+			else{
+				if(mSpec.IsRna() == false)
+					formatsToTry.push_back(FormatPair(FASTA_DNA_FORMAT, "Fasta DNA"));
+				formatsToTry.push_back(FormatPair(FASTA_RNA_FORMAT, "Fasta RNA"));
+				}
+			}
+		else{//otherwise assume phylip format
+			//IsAminoAcid() returns true with codon-aminoacid datatype
+			if(mSpec.IsAminoAcid() && mSpec.IsCodonAminoAcid() == false){
+				formatsToTry.push_back(FormatPair(RELAXED_PHYLIP_AA_FORMAT, "relaxed Phylip amino acid"));
+				formatsToTry.push_back(FormatPair(INTERLEAVED_RELAXED_PHYLIP_AA_FORMAT, "interleaved relaxed Phylip amino acid"));
+				formatsToTry.push_back(FormatPair(PHYLIP_AA_FORMAT, "strict Phylip amino acid"));
+				formatsToTry.push_back(FormatPair(INTERLEAVED_PHYLIP_AA_FORMAT, "interleaved strict Phylip amino acid"));
+				}
+			else{
+				if(mSpec.IsRna() == false){
+					formatsToTry.push_back(FormatPair(RELAXED_PHYLIP_DNA_FORMAT, "relaxed Phylip DNA"));
+					formatsToTry.push_back(FormatPair(INTERLEAVED_RELAXED_PHYLIP_DNA_FORMAT, "interleaved relaxed Phylip DNA"));
+					formatsToTry.push_back(FormatPair(PHYLIP_DNA_FORMAT, "strict Phylip DNA"));
+					formatsToTry.push_back(FormatPair(INTERLEAVED_PHYLIP_DNA_FORMAT, "interleaved strict Phylip DNA"));
+					}
+
+				formatsToTry.push_back(FormatPair(RELAXED_PHYLIP_RNA_FORMAT, "relaxed Phylip RNA"));
+				formatsToTry.push_back(FormatPair(INTERLEAVED_RELAXED_PHYLIP_RNA_FORMAT, "interleaved relaxed Phylip RNA"));
+				formatsToTry.push_back(FormatPair(PHYLIP_RNA_FORMAT, "strict Phylip RNA"));
+				formatsToTry.push_back(FormatPair(INTERLEAVED_PHYLIP_RNA_FORMAT, "interleaved strict Phylip RNA"));
+				}
+			}
+		//now start trying formats
+		bool success;
+		for(list<FormatPair>::iterator formIt = formatsToTry.begin();formIt != formatsToTry.end();formIt++){
+			success = true;
+			try{
+				outman.UserMessage("Attempting to read data file %s as\n\t%s format (using NCL) ...", filename, (*formIt).second.c_str());
+				ReadFilepath(filename, (*formIt).first);
+				}
+			catch(NxsException &err){
+					NexusError(err.msg, err.pos, err.line, err.col, false);
+					outman.UserMessage("Problem reading data file as %s format...\n", (*formIt).second.c_str());
+					success = false;
+					}
+			catch(ErrorException &err){
+				//Sometimes NCL raises a NxsException, but then catches it and passes it onto my NexusError,
+				//which throws an ErrorException.  So, need to catch both types of exceptions here
+				outman.UserMessage("Problem reading data file as %s format...\n", (*formIt).second.c_str());
+				success = false;
+				}
+			if(success) break;
+			}
+		if(success == false)
+			throw ErrorException("\nUnable to read data file %s in any format.\n", filename);
+		else 
+			outman.UserMessage("\nData read successfully.");
+		}
+	return true;
+	}
+
+//verifies that we got the right number/type of blocks and returns the Characters block to be used
+const NxsCharactersBlock *GarliReader::CheckBlocksAndGetCorrectCharblock(const ModelSpecification &mSpec) const{
+	const int numTaxaBlocks = GetNumTaxaBlocks();
+	if(numTaxaBlocks > 1) 
+		throw ErrorException("Either more than one taxa block was found in the data file\n\tor multiple blocks had different taxon sets.");
+	else if(numTaxaBlocks == 0)
+		throw ErrorException("No taxa information was provided by NCL.\n\tThere may have been a problem reading the data file.\n\tCheck output above.");
+	const NxsTaxaBlock *taxablock = GetTaxaBlock(0);
+	const int numCharBlocks = GetNumCharactersBlocks(taxablock);
+	outman.UserMessageNoCR("");
+	if(numCharBlocks == 0)
+		throw ErrorException("No character data was provided by NCL. There may have been a problem reading\n\tthe data file, the data might be of the wrong type for the specified model,\n\tor the data might be in an invalid format or not aligned properly. Check output above.");
+	
+	//now check that we only have one of the charblock types that we want
+	int correctIndex = -1;
+	for(int c = 0;c < GetNumCharactersBlocks(taxablock);c++){
+		const NxsCharactersBlock *charblock = GetCharactersBlock(taxablock, c);
+		if((charblock->GetDataType() == NxsCharactersBlock::dna || charblock->GetDataType() == NxsCharactersBlock::nucleotide)
+			&& (mSpec.IsNucleotide() || mSpec.IsCodon() || mSpec.IsCodonAminoAcid())){
+			if(correctIndex > -1) throw ErrorException("More than one block containing nucleotide data was found.");
+			else correctIndex = c;
+			}
+		//rna data is not allowed as input for codon or codon-aminoacid analyses
+		else if(charblock->GetDataType() == NxsCharactersBlock::rna && (mSpec.IsNucleotide() || mSpec.IsRna())){
+			if(correctIndex > -1) throw ErrorException("More than one block containing nucleotide data was found.");
+			else correctIndex = c;
+			}
+		else if(charblock->GetDataType() == NxsCharactersBlock::protein && (mSpec.IsAminoAcid() && ! mSpec.IsCodonAminoAcid())){
+			if(correctIndex > -1) throw ErrorException("More than one block containing amino acid (protein) data was found.");
+			else correctIndex = c;
+			}
+		}
+	if(correctIndex == -1){
+		if(mSpec.IsNucleotide()) throw ErrorException("A data file was read, but no nucleotide data was found.");
+		else if(mSpec.IsRna()) throw ErrorException("A data file was read, but no RNA data was found.");
+		else if(mSpec.IsAminoAcid()) throw ErrorException("A data file was read, but no amino acid (protein) data was found.");
+		else if(mSpec.IsCodon()) throw ErrorException("DNA data is required as input for codon models.\n\tA data file was read, but none was found.");
+		else if(mSpec.IsCodonAminoAcid()) throw ErrorException("DNA data is required as input for codon translated amino acid models.\n\tA data file was read, but none was found.");
+		}
+	return GetCharactersBlock(taxablock, correctIndex);
+	}
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	Returns true if file named `fn' already exists, false otherwise.
+*/
+bool GarliReader::FileExists(
+  const char *fn) const	/* the name of the file to check */
+	{
+	bool exists = false;
+
+	FILE *fp = fopen(fn, "r");
+	if (fp != NULL)
+		{
+		fclose(fp);
+		exists = true;
+		}
+
+	return exists;
+	}
+
+//DJZ there are my crappy functions to try to diagnose file type
+bool GarliReader::FileIsNexus(const char *name) const{
+	if (!FileExists(name))	{
+		throw ErrorException("could not open file: %s!", name);
+		}
+
+	bool nexus = false;
+	FILE *inf;
+#ifdef BOINC
+	inf = boinc_fopen(name, "r");
+#else
+	inf = fopen(name, "r");
+#endif
+	char buf[1024];
+	GetToken(inf, buf, 1024);
+	if(!(_stricmp(buf, "#NEXUS"))) nexus = true;
+
+	fclose(inf);
+	return nexus;
+	}
+
+bool GarliReader::FileIsFasta(const char *name) const{
+	if (!FileExists(name))	{
+		throw ErrorException("could not open file: %s!", name);
+		}
+
+	bool fasta = false;
+	FILE *inf;
+#ifdef BOINC
+	inf = boinc_fopen(name, "r");
+#else
+	inf = fopen(name, "r");
+#endif
+	char buf[1024];
+	GetToken(inf, buf, 1024);
+	if(buf[0] == '>') fasta = true;
+
+	fclose(inf);
+	return fasta;
+	}
+
+int GarliReader::GetToken( FILE *in, char* tokenbuf, int maxlen) const{
+	int ok = 1;
+
+	int i;
+	char ch = ' ';
+
+	// skip leading whitespace
+	while( in && ( isspace(ch) || ch == '[' ) ){
+		ch = getc(in);
+		}
+	if( !in ) return 0;
+
+	tokenbuf[0] = ch;
+	tokenbuf[1] = '\0';
+	tokenbuf[maxlen-1] = '\0';
+		
+	for( i = 1; i < maxlen-1; i++ ) {
+		ch = getc(in);
+		if( isspace(ch) || ch == ']' )
+			break;
+		tokenbuf[i] = ch;
+		tokenbuf[i+1] = '\0';
+	}
+
+	if( i >= maxlen-1 )
+		ok = 0;
+
+	return ok;
+}
+
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	Called whenever a file name needs to be read from either the command line or a file. Expects next token to be "=" 
+|	followed by the token representing the file name. Call this function after, say, the keyword "file" has been read 
+|	in the following LOG command:
+|>
+|	log file=doofus.txt start replace;
+|>
+|	Note that this function will read only the "=doofus.txt " leaving "start replace;" in the stream for reading at 
+|	a later time.
+*/
+NxsString GarliReader::GetFileName(
+  NxsToken &token)	/* the token used to read from `in' */
+	{
+	// Eat the equals sign
+	//
+	token.GetNextToken();
+
+	if (!token.Equals("="))
+		{
+		errormsg = "Expecting an equals sign, but found ";
+		errormsg += token.GetToken();
+		errormsg += " instead";
+		throw NxsException(errormsg, token.GetFilePosition(), token.GetFileLine(), token.GetFileColumn());
+		}
+
+	// Now get the filename itself
+	//
+	token.GetNextToken();
+
+	return token.GetToken();
+	}
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	Called when the END or ENDBLOCK command needs to be parsed from within the GarliReader block. Basically just 
+|	checks to make sure the next token in the data file is a semicolon.
+*/
+void GarliBlock::HandleEndblock(
+  NxsToken &token)	/*  the token used to read from `in' */
+	{
+	// Get the semicolon following END or ENDBLOCK token
+	//
+	token.GetNextToken();
+
+	if (!token.Equals(";"))
+		{
+		errormsg = "Expecting ';' to terminate the END or ENDBLOCK command, but found ";
+		errormsg += token.GetToken();
+		errormsg += " instead";
+		throw NxsException(errormsg, token.GetFilePosition(), token.GetFileLine(), token.GetFileColumn());
+		}
+	}
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	Handles everything after the EXECUTE keyword and the terminating semicolon. Purges all blocks before executing 
+|	file specified, and no warning is given of this.
+| DJZ THIS IS NOT THE VERSION OF HandleExecute USED.  See the other overloaded version below.
+*/
+void GarliReader::HandleExecute(
+  NxsToken &token)	/* the token used to read from `in' */
+	{
+	// Issuing the EXECUTE command from within a file is a no-no (at least in this program)
+	//
+	if (inf_open)
+		{
+		errormsg = "Cannot issue execute command from within a GarliReader block";
+		throw NxsException(errormsg, token.GetFilePosition(), token.GetFileLine(), token.GetFileColumn());
+		}
+
+	// Get the file name to execute (note: if filename contains underscores, these will be
+	// automatically converted to spaces; user should surround such filenames with single quotes)
+	//
+	token.GetNextToken();
+
+	NxsString fn = token.GetToken();
+
+	// Get the semicolon terminating the EXECUTE command
+	//
+	token.GetNextToken();
+
+	if (!token.Equals(";"))
+		{
+		errormsg = "Expecting ';' to terminate the EXECUTE command, but found ";
+		errormsg += token.GetToken();
+		errormsg += " instead";
+		throw NxsException(errormsg, token.GetFilePosition(), token.GetFileLine(), token.GetFileColumn());
+		}
+
+	if (FileExists(fn.c_str()))
+		{
+		cerr << endl;
+		cerr << "Opening " << fn << "..." << endl;
+
+		ifstream inf(fn.c_str(), ios::binary | ios::in);
+
+		inf_open = true;
+
+		MyNexusToken ftoken(inf);
+
+		try
+			{
+			Execute(ftoken);
+			}
+		catch(NxsException &x)
+			{
+			NexusError(errormsg, x.pos, x.line, x.col);
+			}
+
+		if (inf_open)
+			inf.close();
+		inf_open = false;
+
+		// Users are allowed to put DATA blocks in their NEXUS files, but internally the data is always
+		// stored in a NxsCharacterBlock object.
+		//
+		if (characters->IsEmpty() && !data->IsEmpty())
+			{
+			data->TransferTo(*characters);
+			}
+
+		}	// if (FileExists(fn.c_str()))
+
+	else
+		{
+		cerr << endl;
+		cerr << "Oops! Could not find specified file: " << fn << endl;
+		}
+	}
+
+int GarliReader::HandleExecute(const char *filename, bool purge)	
+	{
+	// The filename to execute is passed in
+	//
+
+	NxsString fn = filename;
+	int ret = 0;
+
+	if (FileExists(fn.c_str()))
+		{
+		ifstream inf(fn.c_str(), ios::binary | ios::in);
+
+		inf_open = true;
+
+		MyNexusToken ftoken(inf);
+
+		try{
+			Execute(ftoken);
+			}
+		catch(NxsException &x){
+			//DJZ 3/24/08 this was a bug that I inherited from the NCL example BasicCmdLine
+			//the actual error message in x.msg was never getting printed because the empty
+			//errormsg member of NexusBlock was being passed instead of the error stored in the
+			//NxsException
+			//NexusError(errormsg, x.pos, x.line, x.col);
+			NexusError(x.msg, x.pos, x.line, x.col);
+			ret = 1;//error
+			}
+
+		if (inf_open)
+			inf.close();
+		inf_open = false;
+
+		// Users are allowed to put DATA blocks in their NEXUS files, but internally the data is always
+		// stored in a NxsCharacterBlock object.
+		//
+		if (characters->IsEmpty() && !data->IsEmpty())
+			{
+			data->TransferTo(*characters);
+			}
+
+		}	// if (FileExists(fn.c_str()))
+
+	else
+		{
+		outman.UserMessage("Sorry, could not find specified file: %s", fn.c_str());
+		ret = 1;
+		}
+	return ret;
+	}
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	Called when the HELP command needs to be parsed from within the GarliReader block.
+*/
+void GarliReader::HandleHelp(
+  NxsToken &token)	/* the token used to read from `in' */
+	{
+	// Retrieve all tokens for this command, stopping only in the event
+	// of a semicolon or an unrecognized keyword
+	//
+	for (;;)
+		{
+		token.GetNextToken();
+
+		if (token.Equals(";"))
+			{
+			break;
+			}
+		else
+			{
+			errormsg = "Unexpected keyword (";
+			errormsg += token.GetToken();
+			errormsg += ") encountered reading HELP command";
+			throw NxsException(errormsg, token.GetFilePosition(), token.GetFileLine(), token.GetFileColumn());
+			}
+		}
+
+	message = "\nExamples of use of available commands:";
+	message += "\n  help                     -> shows this message";
+	message += "\n  log file=mylog.txt start -> opens log file named mylog.txt";
+	message += "\n  log stop                 -> closes current log file";
+	message += "\n  exe mydata.nex           -> executes nexus file mydata.nex";
+	message += "\n  show                     -> reports on blocks currently stored";
+	message += "\n  quit                     -> terminates application";
+	message += "\n";
+	PrintMessage();
+	}
+
+void GarliReader::HandleGarliReader(
+  NxsToken &token){	/* the token used to read from `in' */
+	
+	}
+
+/*This would need to be rewritten for the new Factory/Multiformat system
+void GarliReader::HandleShow(
+  NxsToken &token)	
+	{
+	// Retrieve all tokens for this command, stopping only in the event
+	// of a semicolon or an unrecognized keyword
+	//
+	for (;;)
+		{
+		token.GetNextToken();
+
+		if (token.Equals(";"))
+			break;
+		else
+			{
+			errormsg = "Unexpected keyword (";
+			errormsg += token.GetToken();
+			errormsg += ") encountered reading HELP command";
+			throw NxsException(errormsg, token.GetFilePosition(), token.GetFileLine(), token.GetFileColumn());
+			}
+		}
+
+	message = "\nNexus blocks currently stored:";
+	PrintMessage();
+
+	if (!taxa->IsEmpty())
+		{
+		cerr << "\n  TAXA block found" << endl;
+		taxa->Report(cerr);
+		if (logf_open)
+			taxa->Report(logf);
+		}
+
+	if (!trees->IsEmpty())
+		{
+		cerr << "\n  TREES block found" << endl;
+		trees->Report(cerr);
+		if (logf_open)
+			trees->Report(logf);
+		}
+
+	if (!assumptions->IsEmpty())
+		{
+		cerr << "\n  ASSUMPTIONS block found" << endl;
+		assumptions->Report(cerr);
+		if (logf_open)
+			assumptions->Report(logf);
+		}
+
+	if (!distances->IsEmpty())
+		{
+		cerr << "\n  DISTANCES block found" << endl;
+		distances->Report(cerr);
+		if (logf_open)
+			distances->Report(logf);
+		}
+
+	if (!characters->IsEmpty())
+		{
+		cerr << "\n  CHARACTERS block found" << endl;
+		characters->Report(cerr);
+		if (logf_open)
+			characters->Report(logf);
+		if (!charBlocks.empty())
+			{
+			cerr << "\n  " << charBlocks.size() << " CHARACTERS block found" << endl;
+			for(vector<NxsCharactersBlock*>::iterator it=charBlocks.begin();it != charBlocks.end();it++){
+				(*it)->Report(cerr);
+				if (logf_open)
+					(*it)->Report(logf);
+				}
+			}
+		}
+
+	if (!data->IsEmpty())
+		{
+		cerr << "\n  DATA block found" << endl;
+		data->Report(cerr);
+		if (logf_open)
+			data->Report(logf);
+		}
+	}
+*/
+/*----------------------------------------------------------------------------------------------------------------------
+|	Called when the LOG command needs to be parsed from within the GarliReader block.
+*/
+void GarliReader::HandleLog(
+  NxsToken &token)	/* the token used to read from `in' */
+	{
+	bool starting = false;
+	bool stopping = false;
+	bool appending = false;
+	bool replacing = false;
+	bool name_provided = false;
+	NxsString logfname;
+
+	// Retrieve all tokens for this command, stopping only in the event
+	// of a semicolon or an unrecognized keyword
+	//
+	for (;;)
+		{
+		token.GetNextToken();
+
+		if (token.Equals(";"))
+			{
+			break;
+			}
+		else if (token.Abbreviation("STOp"))
+			{
+			stopping = true;
+			}
+		else if (token.Abbreviation("STArt"))
+			{
+			starting = true;
+			}
+		else if (token.Abbreviation("Replace"))
+			{
+			replacing = true;
+			}
+		else if (token.Abbreviation("Append"))
+			{
+			appending = true;
+			}
+		else if (token.Abbreviation("File"))
+			{
+			logfname = GetFileName(token);
+			name_provided = true;
+			}
+		else
+			{
+			errormsg = "Unexpected keyword (";
+			errormsg += token.GetToken();
+			errormsg += ") encountered reading LOG command";
+			throw NxsException(errormsg, token.GetFilePosition(), token.GetFileLine(), token.GetFileColumn());
+			}
+		}
+
+	// Check for incompatible combinations of keywords
+	//
+	if (stopping && (starting || appending || replacing || name_provided))
+		{
+		errormsg = "Cannot specify STOP with any of the following START, APPEND, REPLACE, FILE";
+		throw NxsException(errormsg, token.GetFilePosition(), token.GetFileLine(), token.GetFileColumn());
+		}
+
+	if (appending && replacing)
+		{
+		errormsg = "Cannot specify APPEND and REPLACE at the same time";
+		throw NxsException(errormsg, token.GetFilePosition(), token.GetFileLine(), token.GetFileColumn());
+		}
+
+	if (logf_open && (starting || name_provided || appending || replacing))
+		{
+		errormsg = "Cannot start log file since log file is already open";
+		throw NxsException(errormsg, token.GetFilePosition(), token.GetFileLine(), token.GetFileColumn());
+		}
+
+	// Is user closing an open log file?
+	//
+	if (stopping)
+		{
+		logf.close();
+		logf_open = false;
+
+		message = "\nLog file closed";
+		PrintMessage();
+
+		return;
+		}
+
+	// If this far, must be attempting to open a log file
+	//
+	if (!name_provided)
+		{
+		errormsg = "Must provide a file name when opening a log file\n";
+		errormsg += "e.g., log file=doofus.txt start replace;";
+		throw NxsException(errormsg, token.GetFilePosition(), token.GetFileLine(), token.GetFileColumn());
+		}   
+
+	if (appending)
+		{
+		logf_open = true;
+		logf.open(logfname.c_str(), ios::out | ios::app);
+
+		message = "\nAppending to log file ";
+		message += logfname;
+		PrintMessage();
+		}
+
+	else if (replacing)
+		{
+		logf_open = true;
+		logf.open(logfname.c_str());
+
+		message = "\nReplacing log file ";
+		message += logfname;
+		PrintMessage();
+		}
+
+	else 
+		{
+		bool exists = FileExists(logfname.c_str());
+		bool userok = true;
+		if (exists && !UserQuery("Ok to replace?", "Log file specified already exists", GarliReader::UserQueryEnum(GarliReader::uq_yes | GarliReader::uq_no)))
+			userok = false;
+
+		if (userok)
+			{
+			logf_open = true;
+			logf.open(logfname.c_str());
+			}
+
+		if (exists && userok)
+			{
+			message = "\nReplacing log file ";
+			message += logfname;
+			}
+
+		else if (userok)
+			{
+			message = "\nLog file ";
+			message += logfname;
+			message += " opened";
+			}
+
+		else
+			{
+			message = "\nLog command aborted";
+			}
+
+		PrintMessage();
+		}
+	}
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	Accepts a string in the form of a GarliReader block containing one command and processes it just like a real 
+|	GarliReader block in a NEXUS data file.
+*/
+	
+void GarliReader::HandleNextCommand()
+	{
+	std::istringstream cmdin(next_command);
+
+	MyNexusToken token(cmdin);
+	try
+		{
+		assert(garliBlock);
+		garliBlock->Read(token);
+		}
+	catch(NxsException &x) 
+		{
+		NexusError(errormsg, x.pos, x.line, x.col);
+		}
+	}
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	Called when an error is encountered in a NEXUS file. Allows program to give user details of the error as well as 
+|	the precise location of the error.
+*/
+void GarliReader::NexusError(
+  NxsString msg,	/* the error message */
+  file_pos ,		/* the point in the NEXUS file where the error occurred */
+  long line,		/* the line in the NEXUS file where the error occurred */
+  long col,			/* the column in the NEXUS file where the error occurred */
+  bool throwExcept /*=true*/)	/* whether to throw an actual exception or just output the error message */
+	{
+	message = "\n";
+	message += msg;
+	PrintMessage();
+
+	if (1)
+		{
+		message = "Line:   ";
+		message += line;
+		PrintMessage();
+
+		message = "Column: ";
+		message += col;
+		PrintMessage();
+		}
+	if(throwExcept)
+		throw ErrorException("NCL encountered a problem reading the dataset.");
+	}
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	Begins with the command just entered by the user, which is stored in the data member `next_command', adds a 
+|	semicolon (if the user failed to supply one), and then adds the string "end;" so the whole bundle looks like a 
+|	very short GarliReader block. This is then passed to HandleNextCommand, which processes it just like a real 
+|	GarliReader block in a NEXUS data file.
+*/
+void GarliReader::PreprocessNextCommand()
+	{
+	// If user failed to add the terminating semicolon, we'll do it now. We will also remove the line feed
+	// at the end and add the command "end;" to the end of the line (see explanation below).
+	//
+	unsigned len = strlen(next_command);
+	assert(len > 0);
+
+	// Remove any whitespace characters from end of string entered by user
+	//
+	unsigned i = len;
+	while (i > 0 && next_command[i-1] == ' ' || next_command[i-1] == '\t' || next_command[i-1] == '\n')
+		i--;
+
+	// If character at position i - 1 is a semicolon, put '\0' terminator at position i;
+	// otherwise, put a semicolon at position i and terminator at i + 1
+	//
+	if (next_command[i-1] != ';')
+		{
+		next_command[i] = ';';
+		i++;
+		}
+	assert(i <= COMMAND_MAXLEN);
+	next_command[i] = '\0';
+
+	// Now add a semicolon at the beginning and terminate with an "END;" command 
+	// so that we can pretend this is simply a very short private NEXUS block
+	// containing only one command.  This allows us to simply use the Read 
+	// function we inherited from the base class BstBase to process the command.
+	//
+	len = strlen(next_command);
+	assert(len < COMMAND_MAXLEN-2);
+	NxsString tmp = ";";
+	tmp += next_command;
+	tmp += "end;";
+	strcpy(next_command, tmp.c_str());
+	}
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	All output is funneled through here. Writes string currently stored in `message' (a NxsString data member) to the 
+|	output file stream, if open, and also to the console via cerr. Places a newline after the string if `linefeed' is 
+|	true.
+|	DJZ - funneling all messages through my OutputManager, which already outputs to the screen and a log file
+*/
+void GarliReader::PrintMessage(
+  bool linefeed)	/* if true, places newline character after message */
+	{
+	if(linefeed)
+		outman.UserMessage(message);
+	else 
+		outman.UserMessageNoCR(message);
+/*	cerr << message;
+	if (linefeed)
+		cerr << endl;
+
+	if (logf_open)
+		{
+		logf << message;
+		if (linefeed)
+			logf << endl;
+		}
+*/	
+	}
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	This function provides the ability to read everything following the block name (which is read by the NxsReader 
+|	object) to the END or ENDBLOCK statement. Characters are read from the input stream `in'. Overrides the virtual 
+|	function in the base class.
+*/
+void GarliBlock::Read(
+  NxsToken &token)	/* the token used to read from `in' */
+	{
+	isEmpty = false;
+	//if we already read a garli block with a model string, clear it
+	modelString.clear();
+
+	// This should be the semicolon after the block name
+	//
+	token.GetNextToken();
+
+	if (!token.Equals(";"))
+		{
+		errormsg = "Expecting ';' after ";
+		errormsg += id;
+		errormsg += " block name, but found ";
+		errormsg += token.GetToken();
+		errormsg += " instead";
+		throw NxsException(errormsg, token.GetFilePosition(), token.GetFileLine(), token.GetFileColumn());
+		}
+
+	for (;;)
+		{//only allowing three things to happen here 
+		//1. endblock is reached, sucessfully exiting the garli block
+		//2. something besides an endblock is read.  This is interpreted as part of the model string, with minimal error checking
+		//3. eof is hit before an endblock
+		
+		//we want to allow hyphens in parenthetical notation, since otherwise they are individual nexus tokens.
+		//this gets reset after every read
+		token.SetLabileFlagBit(NxsToken::hyphenNotPunctuation);
+		token.GetNextToken();
+
+		if (token.Abbreviation("ENdblock"))
+			{
+			HandleEndblock(token);
+			break;
+			}
+		else if(token.AtEOF() == false){
+			NxsString s = token.GetToken();
+			if(s.size() > 1 && (s.IsADouble() == false && s.IsALong() == false && s.find("M") > s.length())){
+				errormsg = "Unexpected character(s) in Garli block.\n     See manual for model parameter format.";
+				throw NxsException(errormsg, token.GetFilePosition(), token.GetFileLine(), token.GetFileColumn());
+				}
+			if(token.IsPunctuationToken() == false){//toss semicolons and such
+				modelString += token.GetToken();
+				modelString += ' ';
+				}
+			}
+		else
+			{
+			errormsg = "Unexpected end of file encountered before \"end;\" or\n     \"endblock;\" command in Garli block";
+			throw NxsException(errormsg, token.GetFilePosition(), token.GetFileLine(), token.GetFileColumn());
+			}
+		}
+/*
+		else if (token.Abbreviation("GarliReader"))
+			{
+			HandleGarliReader(token);
+			}
+		else if (token.Abbreviation("Help"))
+			{
+			HandleHelp(token);
+			}
+		else if (token.Abbreviation("Log"))
+			{
+			HandleLog(token);
+			}
+		else if (token.Abbreviation("EXecute"))
+			{
+			HandleExecute(token);
+			}
+		else if (token.Abbreviation("Show"))
+			{
+			HandleShow(token);
+			}
+		else if (token.Abbreviation("Quit"))
+			{
+			quit_now = true;
+
+			message = "\nGarliReader says goodbye\n";
+			PrintMessage();
+
+			break;
+			}
+		else
+			{
+			SkippingCommand(token.GetToken());
+			do
+				{
+				token.GetNextToken();
+				}
+			while (!token.AtEOF() && !token.Equals(";"));
+
+			if (token.AtEOF())
+				{
+				errormsg = "Unexpected end of file encountered";
+				throw NxsException(errormsg, token.GetFilePosition(), token.GetFileLine(), token.GetFileColumn());
+				}
+			}
+*/
+	}
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	This function outputs a brief report of the contents of this GarliReader block. Overrides the virtual function 
+|	in the NxsBlock base class.
+*/
+void GarliBlock::Report(
+  ostream &out)	const /* the output stream to which to write the report */
+	{
+/*	message.clear();
+	PrintMessage();
+	out << message << '\n';
+	message = id;
+	message += " block contains...";
+	PrintMessage();
+	out << message << '\n';
+*/	}
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	Runs the command line interpreter, allowing GarliReader to interact with user. Typically, this is the only 
+|	function called in main after a GarliReader object is created. If `infile_name' is non-NULL, the first command 
+|	executed by the command interpreter will be "EXECUTE `infile_name'".
+|  DJZ - not currently used, since I'm just using NCL to parse the datafile
+*/
+void GarliReader::Run(
+  char *infile_name)	/* the name of the NEXUS data file to execute (can be NULL) */
+	{
+	taxa			= new NxsTaxaBlock();
+	trees			= new NxsTreesBlock(taxa);
+#if defined(NCL_MAJOR_VERSION) && (NCL_MAJOR_VERSION >= 2) && (NCL_MINOR_VERSION >= 1)
+	trees->SetAllowImplicitNames(true);
+#endif
+	assumptions		= new NxsAssumptionsBlock(taxa);
+	characters		= new NxsCharactersBlock(taxa, assumptions);
+	distances		= new NxsDistancesBlock(taxa);
+	data			= new NxsDataBlock(taxa, assumptions);
+
+	Add(taxa);
+	Add(trees);
+	Add(assumptions);
+	Add(characters);
+	Add(distances);
+	Add(data);
+	Add(garliBlock);
+
+	if (infile_name != NULL)
+		{
+		strcpy(next_command, "exe ");
+		strncat(next_command, infile_name, 252);
+		PreprocessNextCommand();
+//DEBUG
+//		HandleNextCommand();
+		}
+
+	quit_now = false;
+	while (!quit_now) 
+		{
+		cerr << endl;
+		cerr << "GarliReader> ";
+		//cin.getline(next_command, COMMAND_MAXLEN);
+		unsigned i = 0;
+		for(;;)
+			{
+			int ch = cin.get();
+			if (i > COMMAND_MAXLEN)
+				{
+				cerr << endl;
+				cerr << "Error: the length of any one command cannot exceed ";
+				cerr << COMMAND_MAXLEN << " characters" << endl;
+				break;
+				}
+			else if (ch == 10 || ch == 13)
+				break;
+			next_command[i++] = (char)ch;
+			next_command[i] = '\0';
+			}
+		PreprocessNextCommand();
+//DEBUG
+//		HandleNextCommand();
+		}
+	}
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	Called when program does not recognize a block name encountered in a NEXUS file. Virtual function that overrides 
+|	the virtual function in the base class NxsReader.
+*/
+void GarliReader::SkippingBlock(
+  NxsString blockName)	/* the unrecognized block name */
+	{
+	message = "Skipping unknown block (";
+	message += blockName;
+	message += ")";
+	PrintMessage();
+	}
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	This function is called when an unknown command named `commandName' is about to be skipped. This version of the 
+|	function (which is identical to the base class version) does nothing (i.e., no warning is issued that a command 
+|	was unrecognized). Modify this virtual function to provide such warnings to the user (or eliminate it altogether 
+|	since the base class version already does what this does).
+*/
+void GarliReader::SkippingCommand(
+  NxsString commandName)	/* the name of the command being skipped */
+	{
+	message = "Skipping unknown command (";
+	message += commandName;
+	message += ")";
+	PrintMessage();
+	}
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	Called by the NxsReader object when skipping a block named blockName that has been disabled. Allows program to 
+|	notify user of progress in parsing the NEXUS file. Virtual function that overrides the virtual function in the 
+|	base class NxsReader.
+*/
+void GarliReader::SkippingDisabledBlock(
+  NxsString )	/* the name of the block just exited */
+	{
+	}
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	Returns true if response is either "ok" or "yes", and returns false if response is either "no" or "cancel".
+|	This is a general query function that can handle many situations. The possible responses are enumerated in 
+|	GarliReader::UserQueryEnum: uq_cancel, uq_ok, uq_yes, and uq_no. Not yet fully implemented: only handles uq_ok
+|	alone or the (uq_yes | uq_no) combination.
+*/
+bool GarliReader::UserQuery(
+  NxsString mb_message,						/* the question posed to the user */
+  NxsString mb_title,						/* the title of the message box */
+  GarliReader::UserQueryEnum mb_choices)	/* bit combination of uq_xx values indicating which buttons to show */
+	{
+	const bool yes_no			= (mb_choices == (GarliReader::uq_yes | GarliReader::uq_no));
+	const bool ok_only		= (mb_choices == GarliReader::uq_ok);
+	assert(ok_only || yes_no); // Still working on other choices
+
+	if (ok_only)
+		{
+		cerr << endl;
+		cerr << mb_title << endl;
+		cerr << "  " << mb_message;
+		cerr << " (press return to acknowledge) ";
+		cin.getline(next_command, COMMAND_MAXLEN);
+		return true;
+		}
+	cerr << endl;
+	cerr << mb_title << endl;
+	cerr << "  " << mb_message;
+	cerr << " (y/n) ";
+
+	cin.getline(next_command, COMMAND_MAXLEN);
+
+	// This could be made much simpler by just checking first letter: if 'y' then
+	// assume yes, if 'n' assume no.
+	//
+	bool yep  = (next_command[0] == 'y' && next_command[1] == '\0');
+	bool nope = (next_command[0] == 'n' && next_command[1] == '\0');
+
+	while (!yep && !nope)
+		{
+		cerr << endl;
+		cerr << "Must answer by typing either y or n and then pressing the Enter key" << endl;
+		cerr << endl;
+		cerr << mb_title << endl;
+		cerr << "  " << mb_message;
+		cerr << " (y/n) ";
+
+		cin.getline(next_command, COMMAND_MAXLEN);
+		yep  = (next_command[0] == 'y' && next_command[1] == '\0');
+		nope = (next_command[0] == 'n' && next_command[1] == '\0');
+		}
+
+	return yep;
+	}
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	Called if an "output comment" is encountered in a NEXUS data file. An output comment is a comment [text enclosed in
+|	square brackets] that begins with an exclamation point. [!This is an example of a NEXUS output comment]. Output
+|	comments are supposed to be displayed when encountered. Modify this function's body to display output comments, 
+|	which are made available as they are encountered via the `msg' argument.
+*/
+inline void	GarliReader::OutputComment(const NxsString &msg)
+	{
+	size_t pos;
+	string s;
+	//changing this again - just eating the Garli output comments
+	s = "GarliScore";
+	pos = msg.find(s);
+	if(pos != string::npos){
+		//outman.UserMessage("This is apparently a tree inferred by Garli in a previous run.  Its score was %s", msg.substr(s.length()).c_str());
+		return;
+		}
+	s = "GarliModel";
+	pos = msg.find(s);
+	if(pos != string::npos){
+		//outman.UserMessage("Garli's model parameter values used in inferring this tree:\n\t%s", msg.substr(s.length()).c_str());
+		return;
+		}
+	s =	"****NOTE";//this is a note about the parameter values either being from a run that was terimated early or that 
+					//they are only optimal for a certain tree. This is mainly for output when reading the trees in PAUP
+					//and we will just ignore them here
+	pos = msg.find(s);
+	if(pos != string::npos) return;
+	
+	outman.UserMessage("\nCOMMENT FOUND IN NEXUS FILE (output verbatim):");
+	outman.UserMessage(msg);
+	outman.UserMessage("(END OF NEXUS COMMENT)");
+	}
+
+GarliReader & GarliReader::GetInstance()
+	{
+	static GarliReader gr;
+	return gr;
+	}
+
+//This doesn't really have anything to do with the GarliReader class, it just acts on the passed in charblock
+string GarliReader::GetDefaultIntWeightSet(const NxsCharactersBlock *charblock, vector<int> &charWeights) {
+	const NxsTransformationManager transformer = charblock->GetNxsTransformationManagerRef();
+	string wset = transformer.GetDefaultWeightSetName();
+	if(wset.length() > 0){
+		charWeights = transformer.GetDefaultIntWeights();
+		if(charWeights.size() == 0)
+			throw ErrorException("Default weightSet \"%s\" contains non-integer weights", wset.c_str()); 
+		}
+	return wset;
+	}
diff --git a/src/garlireader.h b/src/garlireader.h
new file mode 100644
index 0000000..6ed8dd5
--- /dev/null
+++ b/src/garlireader.h
@@ -0,0 +1,236 @@
+// GARLI version 2.1 source code
+// Copyright 2005-2014 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+//  This file was adapted from from the BasicCmdLine example provided as
+//  part of the NCL
+
+//	Copyright (C) 1999-2002 Paul O. Lewis
+//
+//	This file is part of NCL (Nexus Class Library).
+//
+//	NCL is free software; you can redistribute it and/or modify
+//	it under the terms of the GNU General Public License as published by
+//	the Free Software Foundation; either version 2 of the License, or
+//	(at your option) any later version.
+//
+//	NCL is distributed in the hope that it will be useful,
+//	but WITHOUT ANY WARRANTY; without even the implied warranty of
+//	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//	GNU General Public License for more details.
+//
+//	You should have received a copy of the GNU General Public License
+//	along with NCL; if not, write to the Free Software Foundation, Inc., 
+//	59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+
+#ifndef NCL_GarliReader_H
+#define NCL_GarliReader_H
+
+#define COMMAND_MAXLEN  255
+
+#include "ncl.h"
+#include "nxsmultiformat.h"
+
+class ModelSpecification;
+
+//the reader is no longer derived from NexusBlock itself which was done such that it was it's own
+//custom block (a bit weird).  Garli block is separate entity now.
+class GarliBlock: public NxsBlock{
+    public:   
+        GarliBlock():NxsBlock(){
+			id ="GARLI";
+			}
+		NxsString modelString;
+		char *next_command;
+        void Read(NxsToken &token);
+        void HandleEndblock(NxsToken &token);
+		const NxsString GetModelString(){return modelString;}
+		bool ModelStringWasRead(){return modelString.empty() == false;}
+		void Clear() { modelString.clear();}
+		void Report(ostream &out) const;
+	//	void HandleNextCommand();
+//		void NexusError(NxsString msg, file_pos pos, long line, long col);
+    }; 
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	GarliReader provides a template for creating a program that reads NEXUS data files and provides a basic command 
+|	line. After compiling GarliReader, you will already have a program that understands the following commands, either 
+|	typed in at the console or provided in a GarliReader block in a NEXUS data file (exception is the execute command,
+|	which can only be entered at the console). Keywords in the descriptions below are given in uppercase, however the
+|	commands themselves are case-insensitive. Lower-case indicates a parameter supplied by the user (e.g., "filename" 
+|	would be replaced by the actual name of the file). Square brackets indicate optional keywords or subcommands.
+|>
+|	EXECUTE filename;
+|	
+|	LOG [options];
+|	
+|	  Option         Action
+|	  ------------------------------------------------------
+|	  FILE=filename  specifies name of log file to start
+|	  START          indicates logging is to be started
+|	  STOP           indicates logging is to be stopped
+|	  APPEND         append to log file if it already exists
+|	  REPLACE        replace log file without asking
+|	
+|	QUIT;
+|>
+|	See the Read function for details and to add other commands.
+|	
+|	To change the name of the program (which is also the prompt name and the name of the program's private NEXUS 
+|	block), replace all occurrences of GarliReader with the name of your program (also search for the string 
+|	"GarliReader" and replace with an appropriate string at each occurrence).
+|	
+|	This class handles reading and storage for the NxsReader block GarliReader. It also serves as the main class for 
+|	the program GarliReader, acting as both a NxsReader object (in order to be capable of parsing data files) as well 
+|	as a NxsBlock object (in order to be able to process commands in a GarliReader block). 
+|	
+|	Adding a new data member? Don't forget to:
+|~
+|	o Describe it in the class header comment at the top of "GarliReader.h"
+|	o Initialize it (unless it is self-initializing) in the constructor and reinitialize it in the Reset function
+|	o Describe the initial state in the constructor documentation
+|	o Delete memory allocated to it in both the destructor and Reset function
+|	o Report it in some way in the Report function
+|~
+*/
+
+class GarliReader
+  : public MultiFormatReader
+	{
+	friend class NxsBlock;
+	public:
+		static GarliReader & GetInstance();
+		enum UserQueryEnum		/* enumeration used with UserQuery member function to specify which choices to provide the user */
+			{
+			uq_cancel = 0x01,	/* provide opportunity to cancel */
+			uq_ok	  = 0x02,	/* provide opportunity to answer ok */
+			uq_yes	  = 0x04,	/* provide opportunity to answer yes */
+			uq_no 	  = 0x08	/* provide opportunity to answer no */
+			};
+
+							GarliReader();
+		virtual				~GarliReader();
+
+		bool				EnteringBlock(NxsString blockName);
+		void				ExitingBlock(NxsString blockName);
+		void				ExecuteStarting();
+		void				ExecuteStopping();
+		void				OutputComment(const NxsString &msg);
+		void				HandleNextCommand();
+		void				NexusError(NxsString msg, file_pos pos, long line, long col){
+							NexusError(msg, pos, line, col, true);
+							}
+		void				NexusError(NxsString msg, file_pos pos, long line, long col, bool throwExcept);
+		void				PreprocessNextCommand();
+		void				PrintMessage(bool linefeed = true);
+	//	virtual void		Report(ostream &out);
+		void				Run(char *infile_name);
+		void				SkippingBlock(NxsString blockName);
+		void				SkippingCommand(NxsString commandName);
+		void				SkippingDisabledBlock(NxsString blockName);
+		virtual bool		UserQuery(NxsString mb_message, NxsString mb_title, GarliReader::UserQueryEnum mb_choices = GarliReader::uq_ok);
+
+		//a bunch of hacky stuff here got removed when going to the new NLC Factory API and deriving the reader
+		//from Multiformat Reader- I don't need to worry about multiple charblocks and such myself.  Many functions
+		//that were here are now further up in the inheritance chain and not part of my code
+		//char blocks
+	
+	protected:
+		bool				inf_open;			/* true if `inf' is currently open */
+		bool				logf_open;			/* true if `logf' is currently open */
+		bool				quit_now;			/* set to false at beginning of Run and turns true only when QUIT command processed */
+		ofstream			logf;				/* the log file output stream */
+		NxsString			message;			/* workspace for composing output strings */
+		//none of these should be getting used with the new Factory/MultiformatReader system
+		NxsTreesBlock		*trees;				/* pointer to NxsTreesBlock object */
+		NxsTaxaBlock		*taxa;				/* pointer to NxsTaxaBlock object */
+		NxsAssumptionsBlock	*assumptions;		/* pointer to NxsAssumptionsBlock object */
+		NxsDistancesBlock	*distances;			/* pointer to NxsDistancesBlock object */
+		NxsCharactersBlock	*characters;		/* pointer to NxsCharactersBlock object */
+		NxsDataBlock		*data;				/* pointer to NxsDataBlock object */
+		//this still is being used
+		GarliBlock			*garliBlock;
+
+		NxsString			errormsg;
+		char				*next_command;		/* workspace for processing next command entered interactively by user */
+
+		unsigned			CharLabelToNumber(NxsString s) const;
+		bool				FileExists(const char* fn) const;
+		bool				FileIsNexus(const char *name) const;
+		bool				FileIsFasta(const char *name) const;
+		int					GetToken( FILE *in, char* tokenbuf, int maxlen) const;
+		NxsString			GetFileName(NxsToken& token);
+		void				HandleEndblock(NxsToken& token);
+		void				HandleShow(NxsToken& token);
+		void				HandleHelp(NxsToken& token);
+		void				HandleLog(NxsToken& token);
+		void				HandleExecute(NxsToken& token);
+		void				HandleGarliReader(NxsToken &token);
+
+	public:
+		int				HandleExecute(const char *filename, bool purge);
+		string			GetModelString(){
+							return garliBlock->GetModelString();
+							}
+		bool FoundModelString() {return garliBlock->ModelStringWasRead();}
+		void ClearModelString() {garliBlock->Clear();}
+
+		//this removes and deallocates everything in the reader and gets it ready
+		//for further reading
+		void ClearContent();
+		//delete only the characters blocks, which can take a substantial amount of memory, and aren't needed after
+		//Garli's matrices are created
+		void DeleteCharacterBlocksFromFactories();
+		bool ReadData(const char* filename, const ModelSpecification &modspec);
+		const NxsCharactersBlock *CheckBlocksAndGetCorrectCharblock(const ModelSpecification &modspec) const;
+		static string GetDefaultIntWeightSet(const NxsCharactersBlock *charblock, vector<int> &wset);
+		};
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	The MyNexusToken class provides a NxsToken-derived object that can display output comments as it encounters them.
+|	The virtual function NxsToken::OutputComment is overridden in this class for this purpose.
+*/
+class MyNexusToken
+  : public NxsToken
+	{
+	public:
+				MyNexusToken(istream &i);
+
+		void	OutputComment(const NxsString &msg);
+	};
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	Will be called by NxsReader::Execute after the initial "#NEXUS" keyword is found in a NEXUS file but before other
+|	tokens are read. Add code here if you need to do any initializations prior to encountering any NEXUS blocks in a
+|	NEXUS data file.
+*/
+inline void GarliReader::ExecuteStarting()
+	{
+	}
+
+/*----------------------------------------------------------------------------------------------------------------------
+|	Will be called by NxsReader::Execute just before it exits after reading to the end of a NEXUS data file (or until
+|	encountering a LEAVE command between NEXUS blocks. Add code here if you need to clean up any memory allocated in
+|	ExecuteStarting.
+*/
+inline void GarliReader::ExecuteStopping()
+	{
+	}
+
+
+#endif
+
diff --git a/src/individual.cpp b/src/individual.cpp
new file mode 100644
index 0000000..a1784b7
--- /dev/null
+++ b/src/individual.cpp
@@ -0,0 +1,1054 @@
+// GARLI version 0.96b8 source code
+// Copyright 2005-2008 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+//	NOTE: Portions of this source adapted from GAML source, written by Paul O. Lewis
+
+#include <iosfwd>
+#include <iomanip>
+#include <sstream>
+
+using namespace std;
+
+#include "defs.h"
+#include "set.h"
+#include "funcs.h"
+#include "adaptation.h"
+#include "model.h"
+#include "tree.h"
+#include "population.h"
+#include "condlike.h"
+#include "sequencedata.h"
+#include "treenode.h"
+#include "individual.h"
+#include "errorexception.h"
+#include "outputman.h"
+#include "reconnode.h"
+#include "utility.h"
+
+extern int memLevel;
+extern int calcCount;
+extern OutputManager outman;
+extern FLOAT_TYPE globalBest;
+
+#define MUTUALLY_EXCLUSIVE_MUTS
+
+#undef VARIABLE_OPTIMIZATION
+
+//
+//
+// Methods for class Individual
+//
+//
+Individual::Individual() : dirty(1), fitness(0.0), 
+	reproduced(false), willreproduce(false), parent(-1),
+	willrecombine(false), recombinewith(-1), topo(-1), mutated_brlen(0), 
+	mutation_type(0), accurateSubtrees(0){
+	 
+ 	treeStruct=NULL;
+//	mod=new Model();
+	}
+
+Individual::Individual(const Individual *other) : 
+	dirty(1), fitness(0.0), 
+	reproduced(false), willreproduce(false), parent(-1),
+	willrecombine(false), recombinewith(-1), topo(-1), mutated_brlen(0), 
+	mutation_type(0), accurateSubtrees(0){
+
+	//mod=new Model();
+	treeStruct=new Tree();
+
+	CopyNonTreeFields(other);
+	
+	treeStruct->MimicTopo(other->treeStruct);
+	dirty=false;
+	treeStruct->lnL=other->fitness;
+	treeStruct->modPart = &modPart;
+	}
+
+Individual::~Individual(){
+	if(treeStruct!=NULL)
+		delete treeStruct;
+	//if(mod!=NULL) delete mod;
+	}
+
+void Individual::CopySecByStealingFirstTree(Individual * sourceOfTreePtr, const Individual *sourceOfInformation){
+	CopyNonTreeFields(sourceOfInformation);
+	treeStruct=sourceOfTreePtr->treeStruct;
+	treeStruct->CopyBranchLens(sourceOfInformation->treeStruct);
+	treeStruct->CopyClaIndeces(sourceOfInformation->treeStruct,1);
+	dirty=false;
+}
+
+void Individual::CopySecByRearrangingNodesOfFirst(Tree * sourceOfTreePtr, const Individual *sourceOfInformation, bool CLAassigned /*=false*/){
+	CopyNonTreeFields(sourceOfInformation);
+	treeStruct=sourceOfTreePtr;
+
+	for(int i=treeStruct->getNumTipsTotal()+1;i<(2*treeStruct->getNumTipsTotal()-2);i++)
+		treeStruct->allNodes[i]->attached=false;
+		
+	//DZ 10-28 changing this	
+	treeStruct->MimicTopo(sourceOfInformation->treeStruct);
+	treeStruct->CopyClaIndeces(sourceOfInformation->treeStruct,CLAassigned);
+	dirty=false;
+	treeStruct->lnL=sourceOfInformation->fitness;
+	modPart.CopyModelPartition(&sourceOfInformation->modPart);
+	treeStruct->modPart = &modPart;
+	}
+
+void Individual::DuplicateIndivWithoutCLAs(const Individual *sourceOfInformation){
+	CopyNonTreeFields(sourceOfInformation);
+	if(treeStruct == NULL)
+		treeStruct = new Tree;
+
+	for(int i=treeStruct->getNumTipsTotal()+1;i<(2*treeStruct->getNumTipsTotal()-2);i++)
+		treeStruct->allNodes[i]->attached=false;
+		
+	treeStruct->MimicTopo(sourceOfInformation->treeStruct);
+	dirty=true;
+	treeStruct->lnL=sourceOfInformation->fitness;
+	modPart.CopyModelPartition(&sourceOfInformation->modPart);
+	treeStruct->modPart = &modPart;
+	}
+
+void Individual::Mutate(FLOAT_TYPE optPrecision, Adaptation *adap){
+	//this is the original version of mutate, and will be called by both 
+	//master and remote when they are mutating a tree that does not have
+	//its subtrees properly defined.
+
+	FLOAT_TYPE r = rnd.uniform();
+	//DJZ 1-5-05 Moving branch length mutation to be before topo, so that if both are performed
+	//the upward sweep needed for blen optimization in the topo mutation will automatically recalc
+	//nodes that were dirtied by the blen mutation, and the score of the tree can be finalized at
+	//an internal node after the last branch is optimized, rather than waiting until CalcAverageFitness
+	//when it will require a sweep down to the root		
+#ifndef MUTUALLY_EXCLUSIVE_MUTS
+	if(adap->branchOptPrecision != adap->minOptPrecision || r > adap->modelMutateProb + adap->topoMutateProb){
+#else
+	if(r >= adap->modelMutateProb + adap->topoMutateProb){
+#endif
+		mutated_brlen=treeStruct->BrlenMutate();
+		if(mutated_brlen > 0){
+			mutation_type |= brlen;
+			dirty=true;
+			}
+		}
+
+	try{
+		if(r <= adap->topoMutateProb){
+		  r = rnd.uniform();
+		  if(r<adap->limSPRprob){
+			int reconDist = treeStruct->TopologyMutator(optPrecision, adap->limSPRrange, 0);
+			if(reconDist == 1 || reconDist == -1) mutation_type |= randNNI;
+			else if(reconDist < 0) mutation_type |= limSPRCon;
+			else  mutation_type |= limSPR;
+			if(!FloatingPointEquals(treeStruct->lnL, -ONE_POINT_ZERO, 1.0e-8)){
+				fitness=treeStruct->lnL;
+				dirty=false;
+				}
+   			else dirty=true;
+		  }
+		  else if (r< adap->randSPRprob + adap->limSPRprob){
+			int reconDist = treeStruct->TopologyMutator(optPrecision, -1, 0);
+			if(reconDist < 0){
+				if(reconDist == -1) mutation_type |= randNNI;
+				else if(reconDist < -1 * (int)adap->limSPRrange) mutation_type |= randSPRCon;
+				else mutation_type |= limSPRCon;
+				}
+			else {
+				if(reconDist == 1) mutation_type |= randNNI;
+				else if(reconDist >  (int) adap->limSPRrange) mutation_type |= randSPR;
+				else mutation_type |= limSPR;
+				}
+			if(!FloatingPointEquals(treeStruct->lnL, -ONE_POINT_ZERO, 1.0e-8)){
+				fitness=treeStruct->lnL;
+				dirty=false;
+				}
+			else dirty=true;
+		  } 
+		  else {
+			treeStruct->TopologyMutator(optPrecision, 1, 0);
+			mutation_type |= randNNI;
+   			if(!FloatingPointEquals(treeStruct->lnL, -ONE_POINT_ZERO, 1.0e-8)){
+				fitness=treeStruct->lnL;
+				dirty=false;
+				}
+			else dirty=true;
+		  }
+		} // end if of topomutation
+		
+		//model mutations
+		else if( r < adap->modelMutateProb + adap->topoMutateProb){
+			mutation_type |= modPart.PerformModelMutation();
+			treeStruct->MakeAllNodesDirty();
+			dirty = true;
+			}
+
+		//be sure that we have an accurate score before any CLAs get invalidated
+		CalcFitness(0);
+		}
+	catch(UnscoreableException &ex){
+		//in some situations the tree just underflows no matter what - I've only seen this and only
+		//throw this from orientedGap models with very poor trees.
+		outman.DebugMessage("WARNING - created individual deemed unscorable!");
+		treeStruct->lnL = -FLT_MAX;
+		SetFitness(-FLT_MAX);
+		}
+
+/*	FLOAT_TYPE lnL = fitness;
+	dirty = true;
+	treeStruct->MakeAllNodesDirty();
+	CalcFitness(0);
+	if(!FloatingPointEquals(lnL, fitness, 1e-3)){
+		outman.UserMessage("DEBUG - scoring problem:%f vs %f", lnL, fitness);
+		//throw ErrorException("DEBUG - scoring problem:%f vs %f", lnL, fitness);
+		}
+*/
+//	treeStruct->calcs=calcCount;
+//	calcCount=0;
+}
+
+void Individual::CalcFitness(int subtreeNode){
+	if(dirty || FloatingPointEquals(treeStruct->lnL, ZERO_POINT_ZERO, max(1.0e-8, GARLI_FP_EPS * 2.0)) || FloatingPointEquals(treeStruct->lnL, -ONE_POINT_ZERO, max(1.0e-8, GARLI_FP_EPS * 2))){
+		if(subtreeNode>0 && accurateSubtrees==true){
+			treeStruct->Score( subtreeNode );
+			}
+		else treeStruct->Score( );
+		
+		fitness = treeStruct->lnL;
+		dirty = 0;
+		}
+	else{
+		assert(!FloatingPointEquals(treeStruct->lnL, -ONE_POINT_ZERO, 1e-8));
+		fitness = treeStruct->lnL;
+		}
+
+	if(memLevel > 0)
+		treeStruct->RemoveTempClaReservations();
+	}
+
+void Individual::MakeRandomTree(int nTax){
+	treeStruct=new Tree();
+
+	int n = nTax;
+	Set taxset(n);
+	for( int i = 1; i <= n; i++ )
+		taxset += i;
+		
+	int placeInAllNodes=n+1;
+	
+	if(treeStruct->constraints.empty() == true){
+		// add nodes randomly
+		for( int i = 0; i < n; i++ ) {
+			int pos = rnd.random_int( taxset.Size() );
+			int k = taxset[pos];
+			treeStruct->RandomlyAttachTip(k, placeInAllNodes  );
+			taxset -= k;
+			}
+		}
+	else{
+		// add nodes randomly, ensuring that the resulting partial tree is compatible with constraints
+		Bipartition mask;
+		for( int i = 0; i < n; i++ ) {
+			int pos = rnd.random_int( taxset.Size() );
+			int k = taxset[pos];
+			treeStruct->RandomlyAttachTipWithConstraints(k, placeInAllNodes, &mask );
+			taxset -= k;
+			}
+#ifndef NDEBUG
+		for(vector<Constraint>::iterator conit=treeStruct->constraints.begin();conit!=treeStruct->constraints.end();conit++){
+			TreeNode *check = NULL;
+			if((*conit).IsBackbone())
+				check = treeStruct->ContainsMaskedBipartitionOrComplement(*(*conit).GetBipartition(), *(*conit).GetBackboneMask());
+			else
+				check = treeStruct->ContainsBipartitionOrComplement(*(*conit).GetBipartition());
+			if((*conit).IsPositive()) assert(check != NULL);
+			else assert(check == NULL);
+			}
+#endif
+		}
+	if(treeStruct->dummyRootBranchMidpoint)
+		treeStruct->MoveDummyRootToBranchMidpoint();
+
+	treeStruct->AssignCLAsFromMaster();
+	}
+
+void Individual::MakeStepwiseTree(int nTax, int attachesPerTaxon, FLOAT_TYPE optPrecision ){
+	treeStruct=new Tree();
+	treeStruct->modPart = &modPart;
+	treeStruct->AssignCLAsFromMaster();
+
+	Individual scratchI;
+	scratchI.treeStruct=new Tree();
+	Tree *scratchT = scratchI.treeStruct;
+	scratchT->modPart = &scratchI.modPart;
+	scratchT->AssignCLAsFromMaster();
+	scratchI.CopySecByRearrangingNodesOfFirst(scratchT, this, true);
+
+	int n = nTax;
+	Set taxset(n);
+	for( int i = 1; i <= n; i++ )
+		taxset += i;
+		
+	int placeInAllNodes=n+1;
+//	ofstream stepout("stepwise.log");
+	outman.UserMessage("number of taxa added:");
+
+	Bipartition mask;//mask is used for constrained trees
+	for(int i = 0;i<3;i++){//add the first 3
+		int pos = rnd.random_int( taxset.Size() );
+		int k = taxset[pos];
+		if(treeStruct->constraints.empty())
+			scratchT->RandomlyAttachTip(k, placeInAllNodes  );
+		else
+			scratchT->RandomlyAttachTipWithConstraints(k, placeInAllNodes, &mask );
+		taxset -= k;
+		}
+	//use information on the similarity between sequences to choose first stepwise additions
+/*	
+	const SequenceData *dat = treeStruct->data;
+	int nstates = mod->NStates();
+	FLOAT_TYPE **pdist = New2DArray<FLOAT_TYPE>(dat->NTax(), dat->NTax());
+	for(int i=0;i<nTax;i++){
+		pdist[i][i] = 0.0;
+		for(int j=i+1;j<nTax;j++){
+			pdist[i][j] = CalculateHammingDistance((char*) dat->GetRow(i), (char*) dat->GetRow(j), dat->GetCounts(), dat->NChar(), nstates);
+			pdist[j][i] = pdist[i][j];
+			}
+		}
+	//add the first 3
+	//be careful because the taxa are indexed from 1->ntax
+	int pos = rnd.random_int( taxset.Size() );
+	int first = (taxset[pos]);
+	scratchT->RandomlyAttachTip(first, placeInAllNodes  );
+	taxset -= first;
+	
+	//add the furthest taxon to that
+	int sec = 1;
+	FLOAT_TYPE maxDist = pdist[first-1][sec-1];
+	for(int i=sec+1;i<=dat->NTax();i++){
+		if(pdist[first-1][i-1] > maxDist){
+			sec = i; 
+			maxDist = pdist[first-1][sec-1];
+			}
+		}
+	scratchT->RandomlyAttachTip(sec, placeInAllNodes  );
+	taxset -= sec;
+	//add the furthest taxon to that (which may in fact be close to first, but should not have a pdist = 0 to it)
+	int third = (first == 1 ? 2 : 1);
+	maxDist = pdist[sec-1][third-1];
+	for(int i=third+1;i<=dat->NTax();i++){
+		if(pdist[sec-1][i] > maxDist && i != first && pdist[first-1][third-1] > ZERO_POINT_ZERO){
+			third = i; 
+			maxDist = pdist[sec-1][third-1];
+			}
+		}
+	scratchT->RandomlyAttachTip(third, placeInAllNodes  );
+	taxset -= third;
+*/
+	CopySecByRearrangingNodesOfFirst(treeStruct, &scratchI, true);
+
+	for( int i = 3; i < n; i++ ) {
+		//select a random node
+		int pos = rnd.random_int( taxset.Size() );
+		int k = taxset[pos];
+		taxset -= k;
+		//add the node randomly - this is a little odd, but for the existing swap collecting machinery
+		//to work right, the taxon to be added needs to already be in the tree
+		if(treeStruct->constraints.empty())
+			scratchT->RandomlyAttachTip(k, placeInAllNodes  );
+		else
+			scratchT->RandomlyAttachTipWithConstraints(k, placeInAllNodes, &mask );
+		TreeNode *added = scratchT->allNodes[k];
+
+		scratchT->SweepDirtynessOverTree(added);
+		scratchT->OptimizeBranchesWithinRadius(added->anc, optPrecision, 0, NULL);
+
+		//backup what we have now
+		CopySecByRearrangingNodesOfFirst(treeStruct, &scratchI, true);
+		FLOAT_TYPE bestScore = scratchT->lnL;
+		
+		//collect reconnection points - this will automatically filter for constraints
+		scratchT->GatherValidReconnectionNodes(scratchT->NTax()*2, added, NULL, &mask);
+		
+//			stepout << i << "\t" << k << "\t" << bestScore << "\t";
+
+		//start swappin
+		int num=0;
+		//for(list<ReconNode>::iterator b = scratchT->sprRang.begin();b != scratchT->sprRang.end();b++){
+		ReconList attempted;
+		while(num < attachesPerTaxon && scratchT->sprRang.size() > 0){
+			int connectNum = rnd.random_int(scratchT->sprRang.size());
+			listIt broken = scratchT->sprRang.NthElement(connectNum);
+			//try a reattachment point
+			scratchT->SPRMutate(added->nodeNum, &(*broken), optPrecision, 0);
+			//record the score
+			broken->chooseProb = scratchT->lnL;
+			attempted.AddNode(*broken);
+			scratchT->sprRang.RemoveNthElement(connectNum);
+//			stepout << scratchT->lnL << "\t";
+			//restore the tree
+			scratchI.CopySecByRearrangingNodesOfFirst(scratchT, this, true);
+			num++;
+			}
+		//now find the best score
+		ReconNode *best = NULL;
+		
+		//For debugging, add to random place, to check correct filtering of attachment points for constraints
+/*
+		if(attempted.size() != 0)
+			best = attempted.RandomReconNode();
+*/
+		for(list<ReconNode>::iterator b = attempted.begin();b != attempted.end();b++){
+			if((*b).chooseProb > bestScore){
+				best = &(*b);
+				bestScore = (*b).chooseProb;
+				}
+			}
+
+		//if we didn't find anything better than the initial random attachment we don't need to do anything
+		if(best != NULL){
+			scratchT->SPRMutate(added->nodeNum, best, optPrecision, 0);
+			}
+		else scratchT->Score();
+		scratchI.CalcFitness(0);
+
+//		stepout << scratchT->lnL << endl;
+		CopySecByRearrangingNodesOfFirst(treeStruct, &scratchI, true);
+
+		//outman.UserMessage(" %d %f", i+1, scratchT->lnL);
+		outman.UserMessageNoCR(" %d ", i+1);
+		outman.flush();
+		//when we've added half the taxa optimize alpha, flex or omega 
+		if(i == (n/2)){
+			FLOAT_TYPE improve = 0.0;
+			for(int modnum = 0;modnum < modPart.NumModels();modnum++){
+				Model *mod = scratchI.modPart.GetModel(modnum);
+				const ModelSpecification *modSpec = mod->GetCorrespondingSpec();
+				if(modSpec->IsCodon())//optimize omega even if there is only 1
+					improve += scratchT->OptimizeOmegaParameters(optPrecision, modnum);
+				else if(mod->NRateCats() > 1){
+					if(modSpec->IsFlexRateHet()){//Flex rates
+						//no longer doing alpha first, it was too hard to know if the flex rates had been partially optimized
+						//already during making of a stepwise tree
+						improve += scratchT->OptimizeFlexRates(optPrecision, modnum);
+						}
+					else if(modSpec->fixAlpha == false){//normal gamma
+						//do NOT let alpha go too low here - on bad or random starting trees the branch lengths get crazy long
+						improve += scratchT->OptimizeBoundedParameter(modnum, optPrecision, mod->Alpha(), 0, 0.05, 999.9, &Model::SetAlpha);
+						}
+					}
+				if(modSpec->includeInvariantSites && !modSpec->fixInvariantSites)
+					improve += scratchT->OptimizeBoundedParameter(modnum, optPrecision, mod->PropInvar(), 0, 1.0e-8, mod->maxPropInvar, &Model::SetPinv);
+				}
+			if(modSpecSet.InferSubsetRates()){
+				improve += scratchT->OptimizeSubsetRates(optPrecision);
+				}
+			outman.UserMessageNoCR("\nOptimizing parameters... improved %.3f lnL", improve);
+			scratchT->Score();
+			FLOAT_TYPE start=scratchT->lnL;
+			scratchT->OptimizeAllBranches(optPrecision);
+			FLOAT_TYPE bimprove = max(scratchT->lnL - start, 0.0);
+			outman.UserMessage("\nOptimizing branchlengths... improved %.3f lnL", bimprove);
+			}
+		}		
+
+//	stepout.close();
+	outman.UserMessage("");
+	scratchI.treeStruct->RemoveTreeFromAllClas();
+	delete scratchI.treeStruct;
+	scratchI.treeStruct=NULL;
+	}
+
+
+void Individual::GetStartingConditionsFromFile(const char* fname, int rank, int nTax, bool restart /*=false*/){
+	//using a startfile for the initial conditions
+	//12-28-05 This part used to check whether a tree had previously been read in before going into
+	//this loop. Now it goes in regardlesss, since it needs to for bootstrapping from a starting tree
+	
+	if (!FileExists(fname))	
+		throw ErrorException("starting model/tree file \"%s\" does not exist!", fname);
+	ifstream stf( fname, ios::in );
+	if (!stf)
+		throw ErrorException("starting model/tree file \"%s\" could not be opened!", fname);
+	
+	bool foundModel, foundTree, numericalTaxa;
+	int strlen;
+	char c;
+
+	if(restart == false){
+		//first we need to determine whether there is a model and/or a treestring and
+		//check if the taxon numbers or names are present in the tree string
+		c=' ';
+		c=stf.get();
+		if(c=='#'){//nexus tree files should now be going through NCL elsewhere, so we shouldn't be here
+				assert(0);
+				throw ErrorException("Sorry, GARLI does not yet read Nexus tree files.  See manual for starting tree/model format.");
+				}
+		strlen=1;
+		foundModel=false;
+		foundTree=false;
+		numericalTaxa=true;
+		while(c!='\n' && c!='\r' && c!=';' && stf.eof()==false){
+			if(foundModel==false && foundTree==false){
+				if(isalpha(c)){
+					//changing from b for base freqs to e, for equilibrium freqs
+					if(c=='r'||c=='R'||c=='b'||c=='B'||c=='e'||c=='E'||c=='a'||c=='A'||c=='p'||c=='P'||c=='i'||c=='I'||c=='f'||c=='o'||c=='O'||c=='M'||c=='m'||c=='S'||c=='s') 
+						foundModel=true;
+					else throw ErrorException("Unknown model parameter specification! \"%c\"", c);
+					}
+				}
+			if(foundTree==false && c=='('){
+				foundTree=true;
+				}
+			if(foundTree==true){
+				if(isalpha(c) && c!='e' && c!='E'){//for scientific notation
+					numericalTaxa=false;
+					}
+				}
+			strlen++;
+			c=stf.get();
+			}
+		}
+	else{//if we are restarting, we can a few things for granted
+		//also note the the rank will be incremented by 1, since
+		//we want to skip the first line, which had non-tree info on it
+		assert(0);
+		foundModel=foundTree=numericalTaxa=true;
+		rank++;
+		strlen = (int)((nTax*2)*(10+DEF_PRECISION)+ (FLOAT_TYPE) log10((FLOAT_TYPE) ((FLOAT_TYPE)nTax)*nTax*2));
+		}
+
+	//we know what we need to, now reopen the file
+	stf.close();
+	stf.clear();
+	stf.open( fname, ios::in );
+
+	char *temp=new char[strlen + 100];
+	
+	//if this is a remote population in a parallel run or a multirep run, find the proper tree (ie line number)
+	int effectiveRank=rank;
+	for(int r=0;r<effectiveRank;r++){
+		c=stf.get();
+		do{
+			c=stf.get();	
+			}while(c!='\r' && c!='\n' && !stf.eof());
+		while(stf.peek()=='\r' || stf.peek()=='\n') c=stf.get();
+		if(stf.eof() || stf.peek()==EOF){//we hit the end of the file, so we'll just start over.  Figure which tree we want
+			effectiveRank=rank%(r+1);
+			r=-1; //this is necessary so that when the loop above increments r it will =0
+			stf.close();
+			stf.clear();
+			stf.open( fname, ios::in );
+			}
+		}
+
+	//bool foundRmat, foundStateFreqs, foundAlpha, foundPinv;
+	//foundRmat=foundStateFreqs=foundAlpha=foundPinv = false;
+	
+	if(foundModel == true){
+//		if(modPart.NumModels() > 1)
+//			throw ErrorException("Specification of model parameter values is not yet supported with partitioned models");
+		string modString;
+		do{
+			c=stf.get();
+			modString += c;
+			//}while(c != '(' && c != '\r' && c != '\n' && !stf.eof());
+			}while(stf.peek() != '(' && stf.peek() != '\r' && stf.peek() != '\n' && !stf.eof());
+		while((stf.peek() == '\n' || stf.peek() == '\r') && stf.eof() == false) 
+			stf.get(c);
+		modPart.ReadGarliFormattedModelStrings(modString);
+		}
+
+	if(foundTree==true){
+		string treeString;
+		char c;
+		stf.get(c);
+		do{
+			treeString += c;
+			stf.get(c);
+			}while(c != '\n' && c!= '\r' && stf.eof() == false);
+		while((stf.peek() == '\n' || stf.peek() == '\r') && stf.eof() == false) stf.get(c);
+
+		//the call to the tree constructor can change the seed because random branch lengths are generated when the tree doesn't
+		//have them.  So, store and restore the seed, mainly for output purposes (the seed output to the screen happens after this
+		//call
+		int seed = rnd.seed();
+
+		//now allowing polytomies, since they will be taken care of in Population::SeedPopulationWithStartingTree
+		treeStruct=new Tree(treeString.c_str(), numericalTaxa, true);
+		//treeStruct=new Tree(treeString.c_str(), numericalTaxa);
+
+		//check that any defined constraints are present in the starting tree
+		int conNum=1;
+		for(vector<Constraint>::iterator conit=treeStruct->constraints.begin();conit!=treeStruct->constraints.end();conit++){
+			TreeNode *check = NULL;
+			if((*conit).IsBackbone())
+				check = treeStruct->ContainsMaskedBipartitionOrComplement(*(*conit).GetBipartition(), *(*conit).GetBackboneMask());
+			else
+				check = treeStruct->ContainsBipartitionOrComplement(*(*conit).GetBipartition());
+			if(((*conit).IsPositive() && check == NULL) || ((*conit).IsPositive() == false  && check != NULL))
+				throw ErrorException("Starting tree not compatible with constraint number %d!!!", conNum);
+			}
+		treeStruct->AssignCLAsFromMaster();
+		}
+
+	//if no tree is found the making of the random tree will now be taken care of back in Population::SeedPopulationWithStartingTree
+	//else MakeRandomTree(nTax);
+
+	if(restart == false){
+		if(!foundTree && !foundModel) 
+			throw ErrorException("No starting tree or model was found in the specified starting conditions\n\tfile %s.\n\tIf it is a Nexus file it must start with #NEXUS\n\tOtherwise see manual for information on starting condition format.", fname);
+
+		if(foundTree==true)
+			outman.UserMessage("Obtained starting tree %d from file %s",  effectiveRank+1, fname);
+		else{
+			outman.UserMessage("No starting tree found in file %s", fname);
+			}
+
+		if(foundModel==true){
+			outman.UserMessage("Obtained starting or fixed model parameter values from file %s", fname);
+			string m;
+			modPart.FillGarliFormattedModelStrings(m);
+			outman.UserMessage("This is the current full model string:");
+			outman.UserMessage("%s", m.c_str());
+			}
+		else{
+			//this checks whether we have already gotten some parameter values from file, which might have come from a garli block in the datafile
+			if(!(modSpecSet.GotAnyParametersFromFile())){
+				outman.UserMessage("No starting model parameter values found in %s\nUsing default parameter values", fname);
+				}
+			}
+			
+		outman.UserMessage("");
+		}
+
+	for(int m=0;m < modPart.NumModels();m++){
+		modPart.GetModel(m)->UpdateQMat();
+		}
+	stf.close();
+	delete []temp;
+	}
+
+void Individual::GetStartingTreeFromNCL(const NxsTreesBlock *treesblock, int rank, int nTax, bool restart /*=false*/){
+	assert(treeStruct == NULL);
+
+	int totalTrees = treesblock->GetNumTrees();
+
+	int effectiveRank = rank % totalTrees;
+	
+	//the call to the tree constructor can change the seed because random branch lengths are generated when the tree doesn't
+	//have them.  So, store and restore the seed, mainly for output purposes (the seed output to the screen happens after this
+	//call
+	int seed = rnd.seed();
+
+	//we will get the tree string from NCL with taxon numbers (starting at 1), regardless of how it was initially read in 
+	const NxsFullTreeDescription &t = treesblock->GetFullTreeDescription(effectiveRank);
+	if(t.AllTaxaAreIncluded() == false && !treeStruct->someOrientedGap)
+		throw ErrorException("Starting tree description must contain all taxa.");
+	string ts = t.GetNewick();
+	ts += ";";
+	treeStruct=new Tree(ts.c_str(), true, true);
+
+	rnd.set_seed(seed);
+
+	//check that any defined constraints are present in the starting tree
+	int conNum=1;
+	for(vector<Constraint>::iterator conit=treeStruct->constraints.begin();conit!=treeStruct->constraints.end();conit++){
+		TreeNode *check = NULL;
+		if((*conit).IsBackbone())
+			check = treeStruct->ContainsMaskedBipartitionOrComplement(*(*conit).GetBipartition(), *(*conit).GetBackboneMask());
+		else
+			check = treeStruct->ContainsBipartitionOrComplement(*(*conit).GetBipartition());
+		if(((*conit).IsPositive() && check == NULL) || ((*conit).IsPositive() == false  && check != NULL))
+			throw ErrorException("Starting tree not compatible with constraint number %d!!!", conNum);
+		}
+	treeStruct->AssignCLAsFromMaster();
+
+	for(int m=0;m < modPart.NumModels();m++){
+		modPart.GetModel(m)->UpdateQMat();
+		}
+	}
+
+void Individual::RefineStartingConditions(bool optModel, FLOAT_TYPE branchPrec){
+	//This has been deprecated in favor of Population::InitialOptimization, which is essentially the same code
+	assert(0);
+	bool optOmega, optAlpha, optFlex, optPinv, optFreqs, optRelRates, optSubsetRates;
+	optOmega = optAlpha = optFlex = optPinv = optFreqs = optRelRates = optSubsetRates = false;
+
+	bool optInsDel = false;
+
+	if(optModel){
+		for(int modnum = 0;modnum < modPart.NumModels();modnum++){
+			Model *mod = modPart.GetModel(modnum);
+			const ModelSpecification *modSpec = mod->GetCorrespondingSpec();
+			if(modSpec->numRateCats > 1 && modSpec->IsNonsynonymousRateHet() == false && modSpec->IsFlexRateHet() == false && modSpec->fixAlpha == false) 
+				optAlpha = true;
+			if(modSpec->IsFlexRateHet()) 
+				optFlex = true;
+			if(modSpec->includeInvariantSites && modSpec->fixInvariantSites == false) 
+				optPinv = true;
+			if(modSpec->IsCodon() && !modSpec->fixOmega) 
+				optOmega = true;
+			if(modSpec->IsOrientedGap()) 
+				optInsDel = true;
+
+			if(modSpec->IsCodon() == false && modSpec->fixStateFreqs == false && modSpec->IsEqualStateFrequencies() == false && modSpec->IsEmpiricalStateFrequencies() == false)
+				optFreqs = true;
+			//this is the case of forced freq optimization with codon models.  For everything to work they must be set as both not fixed but empirical
+			if(modSpec->IsCodon() && modSpec->fixStateFreqs == false && modSpec->IsEqualStateFrequencies() == false && modSpec->IsEmpiricalStateFrequencies() == true)
+				optFreqs = true;
+			if(modSpec->fixRelativeRates == false && (modSpec->Nst() > 1 || modSpec->IsEstimateAAMatrix() || modSpec->IsTwoSerineRateMatrix()))
+				optRelRates = true;
+			}
+		//oops, bug fixed 10/2/12 - subset rates weren't getting opt in linked models
+		//modSpecSet.inferSubsetRates is already getting set only if conf.inferSubsetRates
+		//is true and there are multiple matrices, but not necessarily multiple models
+		//if(modSpecSet.InferSubsetRates() && modSpecSet.NumSpecs() > 1)
+		if(modSpecSet.InferSubsetRates())
+			optSubsetRates = true;
+		}
+
+	outman.UserMessageNoCR("optimizing: starting branch lengths");
+	if(optAlpha) outman.UserMessageNoCR(", alpha shape");
+	if(optPinv) outman.UserMessageNoCR(", prop. invar");
+	if(optRelRates) outman.UserMessageNoCR(", rel rates");
+	if(optFreqs) outman.UserMessageNoCR(", eq freqs");
+	if(optOmega) outman.UserMessageNoCR(", dN/dS (aka omega) parameters");
+	if(optInsDel){
+		outman.UserMessageNoCR(", ins rate");
+		outman.UserMessageNoCR(", del rate");
+		}
+	if(optSubsetRates) outman.UserMessageNoCR(", subset rates");
+	outman.UserMessage("...");
+	FLOAT_TYPE improve=(FLOAT_TYPE)999.9;
+	CalcFitness(0);
+
+	for(int i=1;improve > branchPrec;i++){
+		FLOAT_TYPE alphaOptImprove=0.0, pinvOptImprove = 0.0, omegaOptImprove = 0.0, flexOptImprove = 0.0, optImprove=0.0, scaleOptImprove=0.0, subsetRateImprove=0.0, rateOptImprove=0.0;
+		FLOAT_TYPE freqOptImprove=0.0, insDelImprove = 0.0;
+		
+		CalcFitness(0);
+		FLOAT_TYPE passStart=Fitness();
+		
+		optImprove=treeStruct->OptimizeAllBranches(branchPrec);
+		CalcFitness(0);
+
+		FLOAT_TYPE trueImprove= Fitness() - passStart;
+		assert(trueImprove >= -1.0);
+		if(trueImprove < ZERO_POINT_ZERO) trueImprove = ZERO_POINT_ZERO;
+
+		vector<FLOAT_TYPE> blens;
+		treeStruct->StoreBranchlengths(blens);
+		scaleOptImprove=treeStruct->OptimizeTreeScale(branchPrec);
+		CalcFitness(0);
+		//if some of the branch lengths were at the minimum or maximum boundaries the scale optimization
+		//can actually worsen the score.  If so, return them to their original lengths.
+		if(scaleOptImprove < ZERO_POINT_ZERO){
+			treeStruct->RestoreBranchlengths(blens);
+			CalcFitness(0);
+			scaleOptImprove = ZERO_POINT_ZERO;
+			}
+
+		CalcFitness(0);
+		if(optModel){
+			for(int modnum = 0;modnum < modPart.NumModels();modnum++){
+				Model *mod = modPart.GetModel(modnum);
+				const ModelSpecification *modSpec = mod->GetCorrespondingSpec();
+				if(modSpec->IsCodon()){
+					if(!modSpec->fixOmega)
+						omegaOptImprove += treeStruct->OptimizeOmegaParameters(branchPrec, modnum);
+					}
+				else if(mod->NRateCats() > 1){
+					if(modSpec->IsFlexRateHet()){//Flex rates
+						//no longer doing alpha first, it was too hard to know if the flex rates had been partially optimized
+						//already during making of a stepwise tree
+						//if(i == 1) rateOptImprove = treeStruct->OptimizeAlpha(branchPrec);
+						//if(i == 1 && modSpec.gotFlexFromFile==false) rateOptImprove = treeStruct->OptimizeBoundedParameter(branchPrec, mod->Alpha(), 0, 1.0e-8, 999.9, &Model::SetAlpha);
+						flexOptImprove += treeStruct->OptimizeFlexRates(branchPrec, modnum);
+						}
+					else if(modSpec->fixAlpha == false){//normal gamma
+						//rateOptImprove = treeStruct->OptimizeAlpha(branchPrec);
+						//do NOT let alpha go too low here - on bad or random starting trees the branch lengths get crazy long
+						//rateOptImprove = treeStruct->OptimizeBoundedParameter(branchPrec, mod->Alpha(), 0, 1.0e-8, 999.9, &Model::SetAlpha);
+						//alphaOptImprove += treeStruct->OptimizeBoundedParameter(branchPrec, mod->Alpha(), 0, 0.05, 999.9, modnum, &Model::SetAlpha);
+						alphaOptImprove += treeStruct->OptimizeBoundedParameter(modnum, branchPrec, mod->Alpha(), 0, 0.05, 999.9, &Model::SetAlpha);
+						}
+					}
+				if(modSpec->includeInvariantSites && !modSpec->fixInvariantSites)
+					pinvOptImprove += treeStruct->OptimizeBoundedParameter(modnum, branchPrec, mod->PropInvar(), 0, 1.0e-8, mod->maxPropInvar, &Model::SetPinv);
+				if(modSpec->IsOrientedGap()){
+					insDelImprove += treeStruct->OptimizeInsertDeleteRates(branchPrec, modnum);
+					}
+				if(modSpec->IsCodon() == false && modSpec->fixStateFreqs == false && modSpec->IsEqualStateFrequencies() == false && modSpec->IsEmpiricalStateFrequencies() == false)
+					freqOptImprove += treeStruct->OptimizeEquilibriumFreqs(branchPrec, modnum);
+				if(modSpec->fixRelativeRates == false && (modSpec->Nst() > 1 || modSpec->IsEstimateAAMatrix() || modSpec->IsTwoSerineRateMatrix()))
+					rateOptImprove += treeStruct->OptimizeRelativeNucRates(branchPrec, modnum);
+				}
+			if(optSubsetRates){
+				subsetRateImprove += treeStruct->OptimizeSubsetRates(branchPrec);
+				}
+			}
+		improve=scaleOptImprove + trueImprove + alphaOptImprove + pinvOptImprove + flexOptImprove + omegaOptImprove + rateOptImprove + freqOptImprove + subsetRateImprove + insDelImprove;
+		outman.precision(8);
+		outman.UserMessageNoCR("pass%2d:+%9.3f (branch=%7.2f scale=%6.2f", i, improve, trueImprove, scaleOptImprove);
+		if(optOmega) outman.UserMessageNoCR(" omega=%6.2f", omegaOptImprove);
+		if(optAlpha) outman.UserMessageNoCR(" alpha=%6.2f", alphaOptImprove);
+
+		if(optFreqs) outman.UserMessageNoCR(" freqs=%6.2f", freqOptImprove);
+		if(optRelRates) outman.UserMessageNoCR(" rel rates=%6.2f", rateOptImprove);
+
+		if(optFlex) outman.UserMessageNoCR(" flex=%6.2f", flexOptImprove);
+		if(optPinv) outman.UserMessageNoCR(" pinv=%6.2f", pinvOptImprove);
+		if(optInsDel){
+			outman.UserMessageNoCR(" ins/del=%6.2f", insDelImprove);
+			}
+		if(optSubsetRates) outman.UserMessageNoCR(" subset rates=%6.2f", subsetRateImprove);
+		outman.UserMessage(")");
+		}
+
+	treeStruct->nodeOptVector.clear();
+	}
+
+void Individual::ReadTreeFromFile(istream & inf)
+{	char tmp[256];
+	char ch = ' ';
+	NxsString s;
+
+	while( inf )
+	{
+		inf.get( tmp, 255, '\n' );
+		inf.get(ch);
+		tmp[255] = '\0';
+		s += tmp;
+		if( ch == '\n' ) 
+			break;
+		else
+			s += ch;
+	}
+	treeStruct=new Tree(s.c_str(), true);
+	}
+
+void Individual::CopyNonTreeFields(const Individual* ind ){
+	fitness = ind->fitness;
+	accurateSubtrees=ind->accurateSubtrees;
+	modPart.CopyModelPartition(&ind->modPart);
+	
+	dirty = ind->dirty;
+	topo=ind->topo;
+	}
+
+/* 7/21/06 needs to be fixed to correspond to changes in tree for constraints
+void Individual::SubtreeMutate(int subdomain, FLOAT_TYPE optPrecision, vector<int> const &subtreeMemberNodes, Adaptation *adap){
+  //this version is used only by remotes when they have had a subtree defined for them
+  //it will mutate only within that subtree, and because we know that the next mutation
+  //will also be within that subtree we can get away without recalculating some likelihood
+  //arrays
+
+	//because we don't do model mutations during subtree mode, factor the modelMutateProb out
+  	FLOAT_TYPE effectiveTopoProb=adap->topoMutateProb / (1.0/(1.0-adap->modelMutateProb));
+	FLOAT_TYPE r = rnd.uniform();
+#ifndef MUTUALLY_EXCLUSIVE_MUTS
+	if(adap->branchOptPrecision != adap->minOptPrecision || r > effectiveTopoProb){
+#else
+	if(r >= effectiveTopoProb){
+#endif
+		mutated_brlen=treeStruct->BrlenMutateSubset( subtreeMemberNodes );
+		if(mutated_brlen > 0){
+			mutation_type |= brlen;
+			dirty=true;
+			}
+		}
+
+	if(r < effectiveTopoProb){
+		r = rnd.uniform();
+		int cut;
+		if(r<adap->randNNIprob){
+		  	//the node passed to the nni function can only be an internal node, so
+		  	//pick from the first part of the list which contains the internals
+		    cut = subtreeMemberNodes[(int)(rnd.uniform()*(subtreeMemberNodes.size()/2-1))];
+		    int branch = rnd.uniform() < .5;
+		    treeStruct->NNIMutate(cut, branch, optPrecision, subdomain);
+		    mutation_type |= randNNI;
+		    if(treeStruct->lnL !=-1.0){
+			    fitness=treeStruct->lnL;
+			    dirty=false;
+		    	}
+	   		else dirty=true;
+		 	}
+	  
+		  else if(r < adap->randNNIprob + adap->randSPRprob){
+			int broken;
+		 	
+		 	//the nodes passed to the spr function can be internals or terminals, so 
+		 	//choose anywhere in the list
+			do{
+		    	cut=subtreeMemberNodes[(int)(rnd.uniform()*subtreeMemberNodes.size())];
+		    
+			    vector<int> SPRList;
+				SPRList.reserve(subtreeMemberNodes.size());
+			    treeStruct->allNodes[subdomain]->right->getSPRList(cut,SPRList);
+			    treeStruct->allNodes[subdomain]->left->getSPRList(cut,SPRList);
+			    
+			    broken=SPRList[(int)(rnd.uniform()*SPRList.size())];
+			    }while(treeStruct->allNodes[broken]->next==treeStruct->allNodes[cut] || 
+		    	           treeStruct->allNodes[broken]->prev==treeStruct->allNodes[cut]);
+		    	           //reattaching to cut's sib recreates the same tree, so avoid
+    
+		    treeStruct->SPRMutate(cut, broken, optPrecision, subdomain, 0);
+		    mutation_type |= randSPR;
+		    if(treeStruct->lnL !=-1.0){
+			    fitness=treeStruct->lnL;
+			    dirty=false;
+			    }
+	   		else dirty=true;
+		  }
+		  else{//limited spr
+		 	//the nodes passed to the spr function can be internals or terminals, so 
+		 	//choose anywhere in the list
+		 	TreeNode *sib;
+		 	do{
+		    	cut=subtreeMemberNodes[(int)(rnd.uniform()*subtreeMemberNodes.size())];
+		    	if(treeStruct->allNodes[cut]->next != NULL) sib=treeStruct->allNodes[cut]->next;
+		    	else sib=treeStruct->allNodes[cut]->prev;
+		    	}while(treeStruct->allNodes[cut]->anc->nodeNum == subdomain && sib->left==NULL);
+		    			
+		    treeStruct->SPRMutate(cut, -1, optPrecision, subdomain, adap->limSPRrange);
+		    mutation_type |= limSPR;
+		    if(treeStruct->lnL !=-1.0){
+			    fitness=treeStruct->lnL;
+			    dirty=false;
+			    }
+	   		else dirty=true;
+		  }
+		}
+/*  
+  else{
+    assert(TaxonSwapList.size>0);
+    FLOAT_TYPE s2, s1 = params->rnd.uniform();
+    int randint2, randint1 = TaxonSwapList.size * s1 + 1;
+    if(randint1>TaxonSwapList.size) randint1 = TaxonSwapList.size;
+    do{
+      s2 = params->rnd.uniform();
+      randint2 = TaxonSwapList.size * s2 + 1;
+    }while(randint2==randint1);
+
+    if(randint2>TaxonSwapList.size) randint2 = TaxonSwapList.size;
+
+    treeStruct->TaxonSwap(randint1, randint2, optPrecision);
+    mutation_type |= taxonSwap;
+  } 
+*//*
+	CalcFitness(subdomain);
+	treeStruct->calcs=calcCount;
+	calcCount=0;
+	}
+*/
+
+/*7/21/06 needs to be fixed to correspond to changes in tree for constraints
+void Individual::NonSubtreeMutate(const ParallelManager *pMan, FLOAT_TYPE optPrecision, Adaptation *adap)
+{//this version is used only by the master when subtree mode is active
+//it will make a mutation on one of the nodes that are not contained within
+//a subtree, which are in a vector that is passed in
+
+	//because we don't do model mutations during subtree mode, factor the modelMutateProb out
+  	FLOAT_TYPE effectiveTopoProb=adap->topoMutateProb / (1.0/(1.0-adap->modelMutateProb));
+	FLOAT_TYPE r = rnd.uniform();
+
+#ifndef MUTUALLY_EXCLUSIVE_MUTS
+	if(adap->branchOptPrecision != adap->minOptPrecision || r >= effectiveTopoProb){
+#else
+	if(r >= effectiveTopoProb){
+#endif
+	 	mutated_brlen=treeStruct->BrlenMutateSubset(pMan->nonSubtreeNodesforSPR);
+		if(mutated_brlen > 0){
+			mutation_type |= brlen;
+			dirty=true;
+			}
+		}
+
+  if(r < effectiveTopoProb){
+	  FLOAT_TYPE r = rnd.uniform();
+	  if(r<(adap->randNNIprob/(1.0-adap->randSPRprob)) && (pMan->nonSubtreeNodesforNNI.size() > 0)){
+	    int randint1;
+	    do{
+	    	randint1 = pMan->nonSubtreeNodesforNNI[(int)(pMan->nonSubtreeNodesforNNI.size() *  rnd.uniform())];
+	    	}while(randint1<=params->data->NTax());
+	    int branch = rnd.uniform() < .5;
+	    treeStruct->NNIMutate(randint1,branch,optPrecision, 0);
+	    mutation_type |= randNNI;
+	    if(treeStruct->lnL !=-1.0){
+		    fitness=treeStruct->lnL;
+		    dirty=false;
+	    	}
+   		else dirty=true;
+	  }
+	  
+	  else if(pMan->nonSubtreeNodesforSPR.size() > 3){
+	 	int randint1, randint2;
+	   	bool done;
+	    do{
+	    	done=false;
+	    	randint1 = pMan->nonSubtreeNodesforSPR[(int)(pMan->nonSubtreeNodesforSPR.size() *  rnd.uniform())];
+	    	randint2 = pMan->nonSubtreeNodesforSPR[(int)(pMan->nonSubtreeNodesforSPR.size() *  rnd.uniform())];
+	    	//check that the cut node (randint1) is not an ancestor of the attachment node (randint2)
+	    	TreeNode *tmp=treeStruct->allNodes[randint2];
+	    	while((tmp->nodeNum != 0) && (tmp->nodeNum != randint1)){
+	    		tmp=tmp->anc;
+	    		}
+	    	if(tmp->nodeNum==0) done=true;
+	    	
+	    	//check if the nodes are siblings 
+	    	tmp=treeStruct->allNodes[randint1]->anc;
+	    	if(tmp->left->nodeNum==randint2) done=false;
+	    	if(tmp->left->next->nodeNum==randint2) done=false;
+	    	if(tmp->left->next->next != NULL)
+	    		if(tmp->left->next->next->nodeNum == randint2) done=false;
+		       	
+	    	}while(done == false || treeStruct->allNodes[randint1]->anc->nodeNum==randint2); 
+	 
+	    treeStruct->SPRMutate(randint1, randint2, optPrecision, pMan->nonSubtreeNodesforNNI);
+	    mutation_type |= limSPR;
+	    if(treeStruct->lnL !=-1.0){
+		    fitness=treeStruct->lnL;
+		    dirty=false;
+	    	}
+   		else dirty=true;
+	  	}
+	}
+*/ /*  
+  else{
+    assert(TaxonSwapList.size>0);
+    FLOAT_TYPE s2, s1 = params->rnd.uniform();
+    int randint2, randint1 = TaxonSwapList.size * s1 + 1;
+    if(randint1>TaxonSwapList.size) randint1 = TaxonSwapList.size;
+    do{
+      s2 = params->rnd.uniform();
+      randint2 = TaxonSwapList.size * s2 + 1;
+    }while(randint2==randint1);
+
+    if(randint2>TaxonSwapList.size) randint2 = TaxonSwapList.size;
+
+    treeStruct->TaxonSwap(randint1, randint2, optPrecision);
+    mutation_type |= taxonSwap;
+  } 
+*/
+/*	CalcFitness(0);
+
+	treeStruct->calcs=calcCount;
+	calcCount=0;
+}
+*/
diff --git a/src/individual.h b/src/individual.h
new file mode 100644
index 0000000..4985b8f
--- /dev/null
+++ b/src/individual.h
@@ -0,0 +1,173 @@
+// GARLI version 2.0 source code
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef INDIVIDUAL_H
+#define INDIVIDUAL_H
+
+#include "tree.h"
+#include "model.h"
+
+class CondLikeArray;
+class Tree;
+class ParallelManager;
+class Adaptation;
+
+class Individual
+{
+	FLOAT_TYPE fitness;
+	bool dirty;      // individual becomes dirty if mutated in any way
+
+	public:
+
+		int mutation_type;
+		//here we define the binary equivalents of the mutation types, so that they can all be rolled
+		//into a single int with bit flags
+		enum {	//normal mutation types
+				randNNI 	= 0x0001,  //1
+			 	randSPRCon	= 0x0002,  //2
+			 	randSPR		= 0x0004,  //4			
+			 	limSPR		= 0x0008,  //8
+			 	limSPRCon	= 0x0010,  //16
+			 	randRecom	= 0x0020,  //32
+			 	bipartRecom	= 0x0040,  //64
+				taxonSwap   = 0x1000,  //4096
+				subtreeRecom= 0x2000,  //8192
+				
+			 	brlen		= 0x0080,  //128
+
+			 	rates		= 0x0100,  //256
+			 	pi			= 0x0200,  //512
+			 	alpha		= 0x0400,  //1024
+			 	pinv		= 0x0800,  //2048
+				subsetRate	= 0x4000,	//16384
+			 	muScale		= 0x10000, //65536
+				indel		= 0x20000, //131072
+	#ifdef GANESH
+                randPECR    = 0x4000,  //16384                
+	#endif		 	
+			 	rerooted	= 0x8000,  //32768 - this is needed because in many senses a tree that has been rerooted
+			 						   //is a new topology (for example the left, right and anc pointers from a particular nodenum
+			 						   //won't be the same before and after rerooting) although the likelihood is the same
+
+			 	//compostite types
+
+#ifdef GANESH
+			 	anyTopo		= (randNNI | exNNI | randSPR | limSPR 
+			 		 | exlimSPR | randRecom | bipartRecom | taxonSwap
+                     | subtreeRecom | randPECR ) ,
+#else
+			 	anyTopo		= (randNNI | randSPRCon | randSPR | limSPR 
+			 		 | limSPRCon | randRecom | bipartRecom | taxonSwap | subtreeRecom ) ,
+#endif
+			 	anyModel	= rates | pi | alpha | pinv | muScale | subsetRate | indel
+			 	};
+		int mutated_brlen;//the number of brlen muts
+		bool accurateSubtrees;
+
+		//Model *mod;
+		ModelPartition modPart;
+		
+		Tree *treeStruct;
+
+		bool reproduced;
+		bool willreproduce;
+		bool willrecombine;
+		int recombinewith;
+		int parent,topo;
+		Individual();
+		Individual(const Individual *other);
+		~Individual();
+
+		FLOAT_TYPE Fitness() const { return fitness; }
+		void SetDirty() { dirty = true; }
+		bool IsDirty() const { return dirty; }
+
+		void SetFitness( FLOAT_TYPE f ) {
+			fitness = f;
+			dirty=false;
+			}
+		void GetStartingConditionsFromFile(const char *fname, int rank, int nTax, bool restart=false);
+		void GetStartingTreeFromNCL(const NxsTreesBlock *treesblock, int rank, int nTax, bool restart=false);
+		void RefineStartingConditions(bool optModel, FLOAT_TYPE branchPrec);
+		void CalcFitness(int subtreeNode);
+		void ReadTreeFromFile(istream & inf);
+
+		
+//		void Mutate(int, FLOAT_TYPE);
+		void Mutate(FLOAT_TYPE optPrecision, Adaptation *adap);
+//		void SubtreeMutate(int subdomain, FLOAT_TYPE optPrecision, vector<int> const &subtreeList, Adaptation *adap);
+//		void NonSubtreeMutate(const ParallelManager *, FLOAT_TYPE optPrecision, Adaptation *adap);
+		
+		void CrossOverWith( Individual& so, FLOAT_TYPE optPrecision);
+		
+		void CopyNonTreeFields(const Individual* ind );
+		void CopyByStealingTree(Individual* ind );
+		void CopySecByStealingFirstTree(Individual * sourceOfTreePtr, const Individual *sourceOfInformation);
+		void CopySecByRearrangingNodesOfFirst(Tree * sourceOfTreePtr, const Individual *sourceOfInformation, bool CLAassigned=false);
+		void DuplicateIndivWithoutCLAs(const Individual *sourceOfInformation);
+		void ResetIndiv();
+		void MakeRandomTree(int nTax);
+		void MakeStepwiseTree(int nTax, int attemptsPerTaxon, FLOAT_TYPE optPrecision );
+	};
+
+
+inline void Individual::CopyByStealingTree(Individual* ind ){
+	CopyNonTreeFields(ind);
+	treeStruct=ind->treeStruct;
+	}
+
+inline void Individual::ResetIndiv(){
+	reproduced=willreproduce=willrecombine=false;
+	recombinewith=-1;
+	mutation_type=mutated_brlen=0;
+	}
+
+#define BIPART_BASED_RECOM
+
+inline void Individual::CrossOverWith( Individual& so , FLOAT_TYPE optPrecision){
+	//check if the models are the same, which will allow the replicated parts of the trees
+	//to use the same clas
+	#ifdef BIPART_BASED_RECOM
+	//this will return -1 if no recombination actually occured
+	int x=-1;
+	x=treeStruct->BipartitionBasedRecombination(so.treeStruct, modPart.IsModelPartitionEqual(&so.modPart), optPrecision);
+	//if we don't find a bipart based recom that does much good, do a normal one
+	if(x==-1){
+		/*
+		treeStruct->RecombineWith( so.treeStruct, mod->IsModelEqual(so.mod), optPrecision);
+		mutation_type |= randRecom;
+		*/
+		mutation_type=0;
+		recombinewith=-1;
+		}
+	else{
+//		recombinewith+=100;
+		mutation_type |= bipartRecom;
+		fitness=treeStruct->lnL;
+		dirty=false;
+		CalcFitness(0);
+		}
+	#else
+	treeStruct->RecombineWith( so.treeStruct, params->rnd , kappa, mod->IsModelEqual(so.mod));
+	dirty=1;
+	#endif
+	}
+
+
+#endif
+
+
diff --git a/src/linalg.cpp b/src/linalg.cpp
new file mode 100644
index 0000000..f2e4c83
--- /dev/null
+++ b/src/linalg.cpp
@@ -0,0 +1,1363 @@
+// GARLI version 2.0 source code
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+//	NOTE: Portions of this source adapted from MrBayes source code (Huelsenbeck and Ronquist)
+//	I believe that they originaly appeared in PAUP* source code
+
+#if defined(_MSC_VER)
+//POL 23-Feb-2006 VC requires these headers instead if using the std namespace
+#	include <cstdio>
+#	include <cmath>
+#	include <cfloat>
+#	include <cassert>
+#else
+#	include <stdio.h>
+#	include <math.h>
+#	include <float.h>
+#	include <assert.h>
+#endif
+
+using namespace std;
+
+#include "defs.h"
+#include "linalg.h"
+
+#undef NO_ERROR
+#undef ERROR
+#define NO_ERROR	0
+#define ERROR		1
+
+#undef FALSE
+#undef TRUE
+#define FALSE		0
+#define TRUE		1
+
+static void     LUBackSubst (MODEL_FLOAT **a, int n, int *indx, MODEL_FLOAT *b);
+static int      EigenRG (int n, MODEL_FLOAT **a, MODEL_FLOAT *wr, MODEL_FLOAT *wi, MODEL_FLOAT **z, int *iv1, MODEL_FLOAT *fv1);
+static void     Balanc (int n, MODEL_FLOAT **a, int *pLow, int *pHigh, MODEL_FLOAT *scale);
+static void     Exchange (int j, int k, int l, int m, int n, MODEL_FLOAT **a, MODEL_FLOAT *scale);
+static void     ElmHes (int n, int low, int high, MODEL_FLOAT **a, int *intchg);
+static void     ElTran (int n, int low, int high, MODEL_FLOAT **a, int *intchg, MODEL_FLOAT **z);
+static int      Hqr2 (int n, int low, int high, MODEL_FLOAT **h, MODEL_FLOAT *wr, MODEL_FLOAT *wi, MODEL_FLOAT **z);
+static void     BalBak (int n, int low, int high, MODEL_FLOAT *scale, int m, MODEL_FLOAT **z);
+static void     CDiv (MODEL_FLOAT ar, MODEL_FLOAT ai, MODEL_FLOAT br, MODEL_FLOAT bi, MODEL_FLOAT *cr, MODEL_FLOAT *ci);
+//inline static MODEL_FLOAT   D_sign (MODEL_FLOAT a, MODEL_FLOAT b);
+
+#ifdef SINGLE_PRECISION_FLOATS
+#define TINY		1.0e-20f
+#else
+#define TINY		1.0e-20
+#endif
+
+
+#if !defined(MAX)
+#	define MAX(a,b)	(((a) > (b)) ? (a) : (b))
+#endif
+#if !defined(MIN)
+#	define MIN(a,b)	(((a) < (b)) ? (a) : (b))
+#endif
+
+/*--------------------------------------------------------------------------------------------------
+|
+|	D_sign
+|
+|	"Sign" function.
+*/
+
+
+inline static MODEL_FLOAT D_sign (MODEL_FLOAT a, MODEL_FLOAT b){
+	MODEL_FLOAT x = (a >= 0 ? a : -a);
+	return (b >= 0 ? x : -x);
+	}
+
+/*--------------------------------------------------------------------------------------------------
+|
+|	InvertMatrix
+|
+|	Invert matrix 'a' using LU-decomposition technique, storing inverse in 'a_inv'.  Matrix 'a'
+|	is destroyed.  Returns ERROR if matrix is singular, NO_ERROR otherwise.
+*/
+
+int InvertMatrix (MODEL_FLOAT **a, int n, MODEL_FLOAT *col, int *indx, MODEL_FLOAT **a_inv)
+	/*     **a = matrix represented as vector of row pointers      */
+	/*       n = order of matrix                                   */
+	/*    *col = work vector of size n                             */
+	/*   *indx = work vector of size n                             */
+	/* **a_inv = inverse of input matrix a (matrix a is destroyed) */
+{
+	int			rc, i, j;
+	
+	rc = LUDecompose(a, n, col, indx, (MODEL_FLOAT *)NULL);
+	if (rc == FALSE)
+		{
+		for (j = 0; j < n; j++)
+			{
+			for (i = 0; i < n; i++)
+				col[i] = 0.0;
+			col[j] = 1.0;
+			LUBackSubst(a, n, indx, col);
+			for (i = 0; i < n; i++)
+				a_inv[i][j] = col[i];
+			}
+		}
+	return rc;
+}
+
+/*--------------------------------------------------------------------------------------------------
+|
+|	LUDecompose
+|
+|	Replace matrix 'a' with its LU-decomposition.  Returns ERROR if matrix is singular, NO_ERROR
+|	otherwise.
+*/
+
+int LUDecompose (MODEL_FLOAT **a, int n, MODEL_FLOAT *vv, int *indx, MODEL_FLOAT *pd)
+	/*   **a = the matrix whose LU-decomposition is wanted                    */
+	/*     n = order of a                                                     */
+	/*   *vv = work vector of size n (stores implicit scaling of each row)    */
+	/* *indx => row permutation according to partial pivoting sequence        */
+	/*   *pd => 1 if number of row interchanges was even, -1 if odd (NULL OK) */
+{
+	int			i, imax, j, k;
+	MODEL_FLOAT		big, dum, sum, temp, d;
+
+	d = 1.0;
+	for (i = 0; i < n; i++)
+		{
+		big = 0.0;
+		for (j = 0; j < n; j++)
+			{
+			if ((temp = fabs(a[i][j])) > big)
+				big = temp;
+			}
+		if (big == 0.0)
+			{
+			printf("singular matrix in routine LUDecompose");
+			return ERROR;
+			}
+		vv[i] = ONE_POINT_ZERO / big;
+		}
+	for (j = 0; j < n; j++)
+		{
+		for (i = 0; i < j; i++)
+			{
+			sum = a[i][j];
+			for (k = 0; k < i; k++)
+				sum -= a[i][k] * a[k][j];
+			a[i][j] = sum;
+			}
+		big = 0.0;
+		for (i = j; i < n; i++)
+			{
+			sum = a[i][j];
+			for (k = 0; k < j; k++)
+				sum -= a[i][k] * a[k][j];
+			a[i][j] = sum;
+			dum = vv[i] * fabs(sum);
+			if (dum >= big)
+				{
+				big = dum;
+				imax = i;
+				}
+			}
+		if (j != imax)
+			{
+			for (k = 0; k < n; k++)
+				{
+				dum = a[imax][k];
+				a[imax][k] = a[j][k];
+				a[j][k] = dum;
+				}	
+			d = -d;
+			vv[imax] = vv[j];
+			}
+		indx[j] = imax;
+		if (a[j][j] == 0.0)
+			a[j][j] = TINY;
+		if (j != n - 1)
+			{
+			dum = ONE_POINT_ZERO / (a[j][j]);
+			for (i = j + 1; i < n; i++)
+				a[i][j] *= dum;
+			}
+		}
+
+	if (pd != NULL)
+		*pd = d;
+	return NO_ERROR;
+}
+
+/*--------------------------------------------------------------------------------------------------
+|
+|	LUBackSubst
+|
+|	Perform back-substition into LU-decomposed matrix in order to obtain inverse.
+*/
+
+void LUBackSubst (MODEL_FLOAT **a, int n, int *indx, MODEL_FLOAT *b)
+
+{
+	int			i, ip, j,
+				ii = -1;
+	MODEL_FLOAT		sum;
+
+	for (i = 0; i < n; i++)
+		{
+		ip = indx[i];
+		sum = b[ip];
+		b[ip] = b[i];
+		if (ii >= 0)
+			{
+			for (j = ii; j <= i - 1; j++)
+				sum -= a[i][j] * b[j];
+			}
+		else if (sum != 0.0)
+			ii = i;
+		b[i] = sum;
+		}
+	for (i = n - 1; i >= 0; i--)
+		{
+		sum = b[i];
+		for (j = i + 1; j < n; j++)
+			sum -= a[i][j] * b[j];
+		b[i] = sum / a[i][i];
+		}
+}
+
+/*--------------------------------------------------------------------------------------------------
+|
+|	EigenRealGeneral
+|
+|	Calculate eigenvalues and eigenvectors of a general real matrix assuming that all eigenvalues
+|	are real, using routines from the public domain EISPACK package.
+*/
+
+int EigenRealGeneral (int n, MODEL_FLOAT **a, MODEL_FLOAT *v, MODEL_FLOAT *vi, MODEL_FLOAT **u, int *iwork, MODEL_FLOAT *work)
+	/*      n = order of a                                                      */
+	/*    **a = input matrix in row-ptr representation; will be destroyed       */
+	/*     *v = array of size 'n' to receive eigenvalues                        */
+	/*    *vi = work vector of size 'n' for imaginary components of eigenvalues */
+	/*    **u = matrix in row-ptr representation to receive eigenvectors        */
+	/* *iwork = work vector of size 'n'                                         */
+	/*  *work = work vector of size 'n'                                         */
+{
+	int			i, rc;
+
+	rc = EigenRG (n, a, v, vi, u, iwork, work);
+	if (rc != NO_ERROR)
+		{
+		puts("\nInternal error in 'EigenRealGeneral'.");
+		printf ("rc = %d\n", rc);
+		return ERROR;
+		}
+
+	for (i = 0; i < n; i++)
+		{
+		if (vi[i] != 0.0)
+			return RC_COMPLEX_EVAL;
+		}
+
+	return NO_ERROR;
+}
+
+/*--------------------------------------------------------------------------------------------------
+|
+|	EigenRG
+|
+|	This subroutine calls the recommended sequence of subroutines from the eigensystem subroutine
+|	package (EISPACK) to find the eigenvalues of a real general matrix.  It was converted from
+|	Fortran to C by David Swofford.
+|
+|	ON INPUT:
+|
+|		n  is the order of the matrix 'a'
+|
+|		a  contains the real general matrix
+|
+|	ON OUTPUT:
+|
+|		wr  and  wi  contain the real and imaginary parts, respectively, of the eigenvalues.
+|		Complex conjugate pairs of eigenvalues appear consecutively with the eigenvalue having the
+|		positive imaginary part first.
+|
+|		z  contains the real and imaginary parts of the eigenvectors.  If the j-th eigenvalue is
+|		real, the j-th column of  z  contains its eigenvector.  If the j-th eigenvalue is complex
+|		with positive imaginary part, the j-th and (j+1)-th columns of  z  contain the real and
+|		imaginary parts of its eigenvector.  The conjugate of this vector is the eigenvector for
+|		the conjugate eigenvalue.
+|
+|		ierr  is an integer output variable set equal to an error completion code described in the
+|		documentation for Hqr and Hqr2.  The normal completion code is zero.
+|
+|		iv1  and  fv1  are temporary storage vectors of size n
+*/
+
+int EigenRG (int n, MODEL_FLOAT **a, MODEL_FLOAT *wr, MODEL_FLOAT *wi, MODEL_FLOAT **z, int *iv1, MODEL_FLOAT *fv1)
+
+{
+	static int	is1, is2;
+	int			ierr;
+
+	Balanc (n, a, &is1, &is2, fv1);
+	ElmHes (n, is1, is2, a, iv1);
+	ElTran (n, is1, is2, a, iv1, z);
+	ierr = Hqr2 (n, is1, is2, a, wr, wi, z);
+	if (ierr == 0)
+		BalBak (n, is1, is2, fv1, n, z);
+
+	return ierr;
+}
+
+/*--------------------------------------------------------------------------------------------------
+|
+|	Balanc
+|
+|	EISPACK routine translated from Fortran to C by David Swofford.  Modified EISPACK comments
+|	follow.
+|
+|	This subroutine is a translation of the algol procedure BALANCE, Num. Math. 13, 293-304(1969)
+|	by Parlett and Reinsch. Handbook for Auto. Comp., Vol. II-Linear Algebra, 315-326( 1971).
+|
+|	This subroutine balances a real matrix and isolates eigenvalues whenever possible.
+|
+|	ON INPUT:
+|
+|	   n is the order of the matrix.
+|
+|	   a contains the input matrix to be balanced.
+|
+|	ON OUTPUT:
+|
+|	   a contains the balanced matrix.
+|
+|	   low and high are two integers such that a(i,j) is equal to zero if
+|	      (1) i is greater than j and
+|	      (2) j=1,...,low-1 or i=high+1,...,n.
+|
+|	   scale contains information determining the permutations and scaling factors used.
+|
+|	Suppose that the principal submatrix in rows low through high has been balanced, that p(j)
+|	denotes the index interchanged with j during the permutation step, and that the elements of the
+|	diagonal matrix used are denoted by d(i,j).  Then
+|	   scale(j) = p(j),    for j = 1,...,low-1
+|	            = d(j,j),      j = low,...,high
+|	            = p(j)         j = high+1,...,n.
+|	The order in which the interchanges are made is n to high+1,  then 1 to low-1.
+|
+|	Note that 1 is returned for high if high is zero formally.
+*/
+
+void Balanc (int n, MODEL_FLOAT **a, int *pLow, int *pHigh, MODEL_FLOAT *scale)
+
+{
+	MODEL_FLOAT		c, f, g, r, s, b2;
+	int			i, j, k, l, m, noconv;
+
+	b2 = FLT_RADIX * FLT_RADIX;
+	k = 0;
+	l = n - 1;
+   	
+	/* search for rows isolating an eigenvalue and push them down */
+
+	for (j = l; j >= 0; j--)
+		{
+		for (i = 0; i <= l; i++)
+			{
+			if (i != j)
+				{
+				if (a[j][i] != 0.0)
+					goto next_j1;
+				}
+			}
+#		if 0  /* bug that dave caught */
+		m = l;
+		Exchange(j, k, l, m, n, a, scale);
+		if (l < 0)
+			goto leave;
+		else
+			j = --l;
+#		else
+		m = l;
+		Exchange(j, k, l, m, n, a, scale);
+		if (--l < 0)
+			goto leave;
+#		endif
+		
+		next_j1:
+			;
+		}
+
+	/* search for columns isolating an eigenvalue and push them left */
+
+	for (j = k; j <= l; j++)
+		{
+		for (i = k; i <= l; i++)
+			{
+			if (i != j)
+				{
+				if (a[i][j] != 0.0)
+					goto next_j;
+				}
+			}
+
+		m = k;
+		Exchange(j, k, l, m, n, a, scale);
+		k++;
+
+		next_j:
+			;
+		}
+
+	/* now balance the submatrix in rows k to l */
+	for (i = k; i <= l; i++)
+		scale[i] = 1.0;
+
+	/* iterative loop for norm reduction */
+	
+	do	{
+		noconv = FALSE;
+	
+		for (i = k; i <= l; i++)
+			{
+			c = 0.0;
+			r = 0.0;
+		
+			for (j = k; j <= l; j++)
+				{
+				if (j != i)
+					{
+					c += fabs(a[j][i]);
+					r += fabs(a[i][j]);
+					}
+				}
+			/* guard against zero c or r due to underflow */
+			if ((c != 0.0) && (r != 0.0))
+				{
+				g = r / FLT_RADIX;
+				f = 1.0;
+				s = c + r;
+	
+				while (c < g)
+					{
+					f *= FLT_RADIX;
+					c *= b2;
+					}
+	
+				g = r * FLT_RADIX;
+	
+				while (c >= g)
+					{
+					f /= FLT_RADIX;
+					c /= b2;
+					}
+		
+				/* now balance */
+	
+				if ((c + r) / f < s * .95)
+					{
+					g = ONE_POINT_ZERO / f;
+					scale[i] *= f;
+					noconv = TRUE;				
+					for (j = k; j < n; j++)
+						a[i][j] *= g;
+					for (j = 0; j <= l; j++)
+						a[j][i] *= f;
+					}
+				}
+			}	
+		}
+		while (noconv);
+
+	leave:
+		*pLow = k;
+		*pHigh = l;
+}
+
+/*--------------------------------------------------------------------------------------------------
+|
+|	Exchange
+|
+|	Support function for EISPACK routine Balanc.
+*/
+
+void Exchange (int j, int k, int l, int m, int n, MODEL_FLOAT **a, MODEL_FLOAT *scale)
+
+{
+	int			i;
+	MODEL_FLOAT		f;
+
+	scale[m] = (MODEL_FLOAT)j;
+	if (j != m)
+		{
+		for (i = 0; i <= l; i++)
+			{
+			f = a[i][j];
+			a[i][j] = a[i][m];
+			a[i][m] = f;
+			}	
+		for (i = k; i < n; i++)
+			{
+			f = a[j][i];
+			a[j][i] = a[m][i];
+			a[m][i] = f;
+			}
+		}
+}
+
+/*--------------------------------------------------------------------------------------------------
+|
+|	ElmHes
+|
+|	EISPACK routine translated from Fortran to C by David Swofford.  Modified EISPACK comments
+|	follow.
+|
+|	This subroutine is a translation of the algol procedure ELMHES, Num. Math. 12, 349-368(1968) by
+|	Martin and Wilkinson.  Handbook for Auto. Comp., Vol. II-Linear Algebra, 339-358 (1971).
+|
+|	Given a real general matrix, this subroutine reduces a submatrix situated in rows and columns
+|	low through high to upper Hessenberg form by stabilized elementary similarity transformations.
+|
+|	ON INPUT:
+|
+|		n is the order of the matrix.
+|
+|		low and high are integers determined by the balancing subroutine BALANC.  If BALANC has not
+|		been used, set low=1, high=n.
+|
+|		a contains the input matrix.
+|
+|	ON OUTPUT:
+|
+|		a contains the Hessenberg matrix.  The multipliers which were used in the reduction are
+|		stored in the remaining triangle under the Hessenberg matrix.
+|
+|		int contains information on the rows and columns interchanged in the reduction.  Only
+|		elements low through high are used.
+*/
+
+void ElmHes (int n, int low, int high, MODEL_FLOAT **a, int *intchg)
+
+{
+	int			i, j, m;
+	MODEL_FLOAT		x, y;
+	int			la, mm1, kp1, mp1;
+	
+	la = high - 1;
+	kp1 = low + 1;
+	if (la < kp1)
+		return;
+
+	for (m = kp1; m <= la; m++)
+		{
+		mm1 = m - 1;
+		x = 0.0;
+		i = m;
+	
+		for (j = m; j <= high; j++)
+			{
+			if (fabs(a[j][mm1]) > fabs(x))
+				{
+				x = a[j][mm1];
+				i = j;
+				}
+			}
+	
+		intchg[m] = i;
+		if (i != m)
+			{
+			/* interchange rows and columns of a */
+			for (j = mm1; j < n; j++)
+				{
+				y = a[i][j];
+				a[i][j] = a[m][j];
+				a[m][j] = y;
+				}
+			for (j = 0; j <= high; j++)
+				{
+				y = a[j][i];
+				a[j][i] = a[j][m];
+				a[j][m] = y;
+				}
+			}
+
+		if (x != 0.0)
+			{
+			mp1 = m + 1;
+		
+			for (i = mp1; i <= high; i++)
+				{
+				y = a[i][mm1];
+				if (y != 0.0)
+					{
+					y /= x;
+					a[i][mm1] = y;
+					for (j = m; j < n; j++)
+						a[i][j] -= y * a[m][j];
+					for (j = 0; j <= high; j++)
+						a[j][m] += y * a[j][i];
+					}
+				}
+			}
+		}
+}
+
+/*--------------------------------------------------------------------------------------------------
+|
+|	ElTran
+|
+|	EISPACK routine translated from Fortran to C by David Swofford.  Modified EISPACK comments
+|	follow.
+|
+|	This subroutine is a translation of the algol procedure ELMTRANS,  Num. Math. 16, 181-204 (1970)
+|	by Peters and Wilkinson.  Handbook for Auto. Comp., Vol. II-Linear Algebra, 372-395 (1971).
+|
+|	This subroutine accumulates the stabilized elementary similarity transformations used in the
+|	reduction of a  real general matrix to upper Hessenberg form by  ElmHes.
+|
+|	ON INPUT:
+|
+|		n is the order of the matrix.
+|
+|		low and high are integers determined by the balancing subroutine Balanc.  if  Balanc has
+|		not been used, set low=1, high=n.
+|
+|		a contains the multipliers which were used in the reduction by ElmHes in its lower triangle
+|		below the subdiagonal.
+|
+|		intchg contains information on the rows and columns interchanged in the reduction by ElmHes.
+|		Only elements low through high are used.
+|
+|	ON OUTPUT:
+|
+|	   z contains the transformation matrix produced in the reduction by ElmHes.
+*/
+
+void ElTran (int n, int low, int high, MODEL_FLOAT **a, int *intchg, MODEL_FLOAT **z)
+
+{
+	int			i, j, mp;
+
+	/* initialize z to identity matrix */
+	for (j = 0; j < n; j++)
+		{
+		for (i = 0; i < n; i++)
+			z[i][j] = 0.0;
+		z[j][j] = 1.0;
+		}
+
+	for (mp = high - 1; mp >= low + 1; mp--)
+		{
+		for (i = mp + 1; i <= high; i++)
+			z[i][mp] = a[i][mp-1];
+	
+		i = intchg[mp];
+		if (i != mp) 
+			{
+			for (j = mp; j <= high; j++)
+				{
+				z[mp][j] = z[i][j];
+				z[i][j] = 0.0;
+				}
+			z[i][mp] = 1.0;
+			}
+		}
+}
+
+/*--------------------------------------------------------------------------------------------------
+|
+|	Hqr2
+|
+|	EISPACK routine translated from Fortran to C by David Swofford.  Modified EISPACK comments
+|	follow.
+|
+|	This subroutine is a translation of the algol procedure HQR2, Num. Math. 16, 181-204 (1970) by
+|	Peters and Wilkinson.  Handbook for Auto. Comp., Vol. II-Linear Algebra, 372-395 (1971).
+|
+|	This subroutine finds the eigenvalues and eigenvectors of a real upper Hessenberg matrix by
+|	the QR method.  The eigenvectors of a real general matrix can also be found if ElmHes and
+|	ElTran or OrtHes  and  OrTran  have been used to reduce this general matrix to Hessenberg form
+|	and to accumulate the similarity transformations.
+|
+|	ON INPUT:
+|
+|		n is the order of the matrix
+|
+|		low and high are integers determined by the balancing subroutine Balanc.  If Balanc has not
+|		been used, set low=0, high=n-1.
+|
+|		h contains the upper Hessenberg matrix
+|
+|		z contains the transformation matrix produced by ElTran after the reduction by ElmHes, or
+|		by OrTran after the reduction by OrtHes, if performed.  If the eigenvectors of the
+|		Hessenberg matrix are desired, z must contain the identity matrix.
+|
+|	ON OUTPUT:
+|
+|		h has been destroyed
+|
+|		wr and wi contain the real and imaginary parts, respectively, of the eigenvalues.  The
+|		eigenvalues are unordered except that complex conjugate pairs of values appear consecutively
+|		with the eigenvalue having the positive imaginary part first.  If an error exit is made, the
+|		eigenvalues should be correct for indices ierr,...,n-1.
+|
+|		z contains the real and imaginary parts of the eigenvectors.   If the i-th eigenvalue is
+|		real, the i-th column of z contains its eigenvector.  If the i-th eigenvalue is complex with
+|		positive imaginary part, the i-th and (i+1)-th columns of z contain the real and imaginary
+|		parts of its eigenvector.  The eigenvectors are unnormalized.  If an error exit is made,
+|		none of the eigenvectors has been found. 
+|
+|		Return value is set to:
+|			zero	for normal return,
+|			j		if the limit of 30*n iterations is exhausted while the j-th eigenvalue is
+|					being sought.
+|
+|	Calls CDiv for complex division.
+*/
+
+//DJZ - Intel compiler 10.0 -O2 optimization breaks this function
+//so this pragma reduces the optimization level
+#if (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1000)
+#pragma intel optimization_level 1
+#endif
+int Hqr2 (int n, int low, int high, MODEL_FLOAT **h, MODEL_FLOAT *wr, MODEL_FLOAT *wi, MODEL_FLOAT **z)
+
+{
+	int			i, j, k, l, m, na, en, notlas, mp2, itn, its, enm2, twoRoots;
+	MODEL_FLOAT		norm, p, q, r, s, t, w, x, y, ra, sa, vi, vr, zz, tst1, tst2;
+
+	/* store roots isolated by Balanc and compute matrix norm */
+	norm = 0.0;
+	k = 0;
+	for (i = 0; i < n; i++)
+		{
+		for (j = k; j < n; j++)
+			norm += fabs(h[i][j]);
+
+		k = i;
+		if ((i < low) || (i > high))
+			{
+			wr[i] = h[i][i];
+			wi[i] = 0.0;
+			}
+		}
+
+	en = high;
+	t = 0.0;
+	itn = n * 30;
+
+	/* search for next eigenvalues */
+
+	while (en >= low)
+		{
+		its = 0;
+		na = en - 1;
+		enm2 = na - 1;
+		twoRoots = FALSE;
+
+		/* look for single small sub-diagonal element */
+		for (;;)
+			{
+			for (l = en; l > low; l--)
+				{
+				s = fabs(h[l-1][l-1]) + fabs(h[l][l]);
+				if (s == 0.0)
+					s = norm;
+				tst1 = s;
+				tst2 = tst1 + fabs(h[l][l-1]);
+				if (tst2 == tst1)
+					break;
+				}
+	
+			/* form shift */
+		
+			x = h[en][en];
+			if (l == en)
+				break;
+			y = h[na][na];
+			w = h[en][na] * h[na][en];
+			if (l == na)
+				{
+				twoRoots = TRUE;
+				break;
+				}
+
+			if (itn == 0)
+				{
+				/* set error -- all eigenvalues have not converged after 30*n iterations */
+				return en;
+				}
+			if ((its == 10) || (its == 20))
+				{
+				/* form exceptional shift */
+				t += x;
+			
+				for (i = low; i <= en; i++)
+					h[i][i] -= x;
+			
+				s = fabs(h[en][na]) + fabs(h[na][enm2]);
+				x = s * (MODEL_FLOAT) 0.75;
+				y = x;
+				w = s * (MODEL_FLOAT)-0.4375 * s;
+				}
+	
+			its++;
+			--itn;
+	
+			/* look for two consecutive small sub-diagonal elements */
+			for (m = enm2; m >= l; m--)
+				{
+				zz = h[m][m];
+				r = x - zz;
+				s = y - zz;
+				p = (r * s - w) / h[m+1][m] + h[m][m+1];
+				q = h[m+1][m+1] - zz - r - s;
+				r = h[m+2][m+1];
+				s = fabs(p) + fabs(q) + fabs(r);
+				p /= s;
+				q /= s;
+				r /= s;
+				if (m == l)
+					break;
+				tst1 = fabs(p) * (fabs(h[m-1][m-1]) + fabs(zz) + fabs(h[m+1][m+1]));
+				tst2 = tst1 + fabs(h[m][m-1]) * (fabs(q) + fabs(r));
+				if (tst2 == tst1)
+					break;
+				}
+		
+			mp2 = m + 2;
+			for (i = mp2; i <= en; i++)
+				{
+				h[i][i-2] = 0.0;
+				if (i != mp2)
+					h[i][i-3] = 0.0;
+				}
+	
+			/* MODEL_FLOAT qr step involving rows l to en and columns m to en */
+			for (k = m; k <= na; k++)
+				{
+				notlas = (k != na);
+				if (k != m)
+					{
+					p = h[k][k-1];
+					q = h[k+1][k-1];
+					r = 0.0;
+					if (notlas)
+						r = h[k+2][k-1];
+					x = fabs(p) + fabs(q) + fabs(r);
+					if (x == 0.0)
+						continue;
+					p /= x;
+					q /= x;
+					r /= x;
+					}
+	
+				s = D_sign(sqrt(p*p + q*q + r*r), p);
+				if (k != m)
+					h[k][k-1] = -s * x;
+				else if (l != m)
+					h[k][k-1] = -h[k][k-1];
+				p += s;
+				x = p / s;
+				y = q / s;
+				zz = r / s;
+				q /= p;
+				r /= p;
+				if (!notlas)
+					{
+					/* row modification */
+					for (j = k; j < n; j++)
+						{
+						p = h[k][j] + q * h[k+1][j];
+						h[k][j] -= p * x;
+						h[k+1][j] -= p * y;
+						} 
+				
+					j = MIN(en, k + 3);
+					/* column modification */
+					for (i = 0; i <= j; i++)
+						{
+						p = x * h[i][k] + y * h[i][k+1];
+						h[i][k] -= p;
+						h[i][k+1] -= p * q;
+						}
+					/* accumulate transformations */
+					for (i = low; i <= high; i++)
+						{
+						p = x * z[i][k] + y * z[i][k+1];
+						z[i][k] -= p;
+						z[i][k+1] -= p * q;
+						}
+					}
+				else
+					{
+					/* row modification */
+					for (j = k; j < n; j++)
+						{
+						p = h[k][j] + q * h[k+1][j] + r * h[k+2][j];
+						h[k][j] -= p * x;
+						h[k+1][j] -= p * y;
+						h[k+2][j] -= p * zz;
+						}
+				
+					j = MIN(en, k + 3);
+					/* column modification */
+					for (i = 0; i <= j; i++)
+						{
+						p = x * h[i][k] + y * h[i][k+1] + zz * h[i][k+2];
+						h[i][k] -= p;
+						h[i][k+1] -= p * q;
+						h[i][k+2] -= p * r;
+						}
+					/* accumulate transformations */
+					for (i = low; i <= high; i++)
+						{
+						p = x * z[i][k] + y * z[i][k+1] + zz * z[i][k+2];
+						z[i][k] -= p;
+						z[i][k+1] -= p * q;
+						z[i][k+2] -= p * r;
+						}
+					}
+				}
+			}
+
+		if (twoRoots)
+			{
+			/* two roots found */
+			p = (y - x) / (MODEL_FLOAT) 2.0;
+			q = p * p + w;
+			zz = sqrt(fabs(q));
+			h[en][en] = x + t;
+			x = h[en][en];
+			h[na][na] = y + t;
+			/* DLS 28aug96: Changed "0.0" to "-1e-12" below.  Roundoff errors can cause this value
+			                to dip ever-so-slightly below zero even when eigenvalue is not complex.
+			*/
+			if (q >= -1e-12)
+				{
+				/* real pair */
+				zz = p + D_sign(zz, p);
+				wr[na] = x + zz;
+				wr[en] = wr[na];
+				if (zz != 0.0)
+					wr[en] = x - w/zz;
+				wi[na] = 0.0;
+				wi[en] = 0.0;
+				x = h[en][na];
+				s = fabs(x) + fabs(zz);
+				p = x / s;
+				q = zz / s;
+				r = sqrt(p*p + q*q);
+				p /= r;
+				q /= r;
+				/* row modification */
+				for (j = na; j < n; j++)
+					{
+					zz = h[na][j];
+					h[na][j] = q * zz + p * h[en][j];
+					h[en][j] = q * h[en][j] - p * zz;
+					}
+				/* column modification */
+				for (i = 0; i <= en; i++)
+					{
+					zz = h[i][na];
+					h[i][na] = q * zz + p * h[i][en];
+					h[i][en] = q * h[i][en] - p * zz;
+					}
+				/* accumulate transformations */
+				for (i = low; i <= high; i++)
+					{
+					zz = z[i][na];
+					z[i][na] = q * zz + p * z[i][en];
+					z[i][en] = q * z[i][en] - p * zz;
+					}
+				}
+			else
+				{
+				/* complex pair */
+				wr[na] = x + p;
+				wr[en] = x + p;
+				wi[na] = zz;
+				wi[en] = -zz;
+				}
+			en = enm2;
+			}
+		else
+			{
+			/* one root found */
+			h[en][en] = x + t;
+			wr[en] = h[en][en];
+			wi[en] = 0.0;
+			en = na;
+			}
+		}
+	
+	/* All roots found.  Backsubstitute to find vectors of upper triangular form */
+
+	if (norm == 0.0)
+		return 0;
+
+	for (en = n - 1; en >= 0; en--)
+		{
+		p = wr[en];
+		q = wi[en];
+		na = en - 1;
+		/* DLS 28aug96: Changed "0.0" to -1e-12 below (see comment above) */
+		if (q < -1e-12)
+			{
+			/* complex vector */
+			m = na;
+			/* last vector component chosen imaginary so that eigenvector matrix is triangular */
+			if (fabs(h[en][na]) > fabs(h[na][en]))
+				{
+				h[na][na] = q / h[en][na];
+				h[na][en] = -(h[en][en] - p) / h[en][na];
+				}
+			else
+				CDiv(0.0, -h[na][en], h[na][na] - p, q, &h[na][na], &h[na][en]);
+
+			h[en][na] = 0.0;
+			h[en][en] = 1.0;
+			enm2 = na - 1;
+			if (enm2 >= 0)
+				{
+				for (i = enm2; i >= 0; i--)
+					{
+					w = h[i][i] - p;
+					ra = 0.0;
+					sa = 0.0;
+			
+					for (j = m; j <= en; j++)
+						{
+						ra += h[i][j] * h[j][na];
+						sa += h[i][j] * h[j][en];
+						}
+			
+					if (wi[i] < 0.0)
+						{
+						zz = w;
+						r = ra;
+						s = sa;
+						}
+					else
+						{
+						m = i;
+						if (wi[i] == 0.0)
+							CDiv(-ra, -sa, w, q, &h[i][na], &h[i][en]);
+						else
+							{
+							/* solve complex equations */
+							x = h[i][i+1];
+							y = h[i+1][i];
+							vr = (wr[i] - p) * (wr[i] - p) + wi[i] * wi[i] - q * q;
+							vi = (wr[i] - p) * (MODEL_FLOAT)2.0 * q;
+							if ((vr == 0.0) && (vi == 0.0))
+								{
+								tst1 = norm * (fabs(w) + fabs(q) + fabs(x) + fabs(y) + fabs(zz));
+								vr = tst1;
+								do	{
+									vr *= (MODEL_FLOAT) 0.01;
+									tst2 = tst1 + vr;
+									}
+									while (tst2 > tst1);
+								}
+							CDiv(x * r - zz * ra + q * sa, x * s - zz * sa - q * ra, vr, vi, &h[i][na], &h[i][en]);
+							if (fabs(x) > fabs(zz) + fabs(q))
+								{
+								h[i+1][na] = (-ra - w * h[i][na] + q * h[i][en]) / x;
+								h[i+1][en] = (-sa - w * h[i][en] - q * h[i][na]) / x;
+								}
+							else
+								CDiv(-r - y * h[i][na], -s - y * h[i][en], zz, q, &h[i+1][na], &h[i+1][en]);
+							}
+				
+						/* overflow control */
+						tst1 = fabs(h[i][na]);
+						tst2 = fabs(h[i][en]);
+						t = MAX(tst1, tst2);
+						if (t != 0.0)
+							{
+							tst1 = t;
+							tst2 = tst1 + ONE_POINT_ZERO / tst1;
+							if (tst2 <= tst1)
+								{
+								for (j = i; j <= en; j++)
+									{
+									h[j][na] /= t;
+									h[j][en] /= t;
+									}
+								}
+							}
+						}
+					}
+				}
+			/* end complex vector */
+			}
+		else if (q == 0.0)
+			{
+			/* real vector */
+			m = en;
+			h[en][en] = 1.0;
+			if (na >= 0)
+				{
+				for (i = na; i >= 0; i--)
+					{
+					w = h[i][i] - p;
+					r = 0.0;
+			
+					for (j = m; j <= en; j++)
+						r += h[i][j] * h[j][en];
+			
+					if (wi[i] < 0.0)
+						{
+						zz = w;
+						s = r;
+						continue;
+						}
+					else
+						{
+						m = i;
+						if (wi[i] == 0.0)
+							{
+							t = w;
+							if (t == 0.0)
+								{
+								tst1 = norm;
+								t = tst1;
+								do	{
+									t *= (MODEL_FLOAT) 0.01;
+									tst2 = norm + t;
+									}
+									while (tst2 > tst1);
+								}			
+							h[i][en] = -r / t;
+							}
+						else
+							{
+							/* solve real equations */
+							x = h[i][i+1];
+							y = h[i+1][i];
+							q = (wr[i] - p) * (wr[i] - p) + wi[i] * wi[i];
+							t = (x * s - zz * r) / q;
+							h[i][en] = t;
+							if (fabs(x) > fabs(zz))
+								h[i+1][en] = (-r - w * t) / x;
+							else
+								h[i+1][en] = (-s - y * t) / zz;
+							}
+				
+						/* overflow control */
+						t = fabs(h[i][en]);
+						if (t != 0.0)
+							{
+							tst1 = t;
+							tst2 = tst1 + ONE_POINT_ZERO / tst1;
+							if (tst2 <= tst1)
+								{
+								for (j = i; j <= en; j++)
+									h[j][en] /= t;
+								}
+							}
+						}
+					}
+				}
+			/* end real vector */
+			}
+		}
+	/* end back substitution */
+	
+	/* vectors of isolated roots */
+	for (i = 0; i < n; i++)
+		{
+		if ((i < low) || (i > high))
+			{
+			for (j = i; j < n; j++)
+				z[i][j] = h[i][j];
+			}
+		}
+
+	/* multiply by transformation matrix to give vectors of original full matrix */
+	for (j = n - 1; j >= low; j--)
+		{
+		m = MIN(j, high);
+		for (i = low; i <= high; i++)
+			{
+			zz = 0.0;
+			for (k = low; k <= m; k++)
+				zz += z[i][k] * h[k][j];
+			z[i][j] = zz;
+			}
+		}
+
+	return 0;
+}
+
+/*--------------------------------------------------------------------------------------------------
+|
+|	BalBak
+|
+|	EISPACK routine translated from Fortran to C by David Swofford.  Modified EISPACK comments
+|	follow.
+|
+|	This subroutine is a translation of the algol procedure BALBAK, Num. Math. 13, 293-304 (1969)
+|	by Parlett and Reinsch.  Handbook for Auto. Comp., vol. II-Linear Algebra, 315-326 (1971).
+|
+|	This subroutine forms the eigenvectors of a real general matrix by back transforming those of
+|	the corresponding balanced matrix determined by  Balanc.
+|
+|	ON INPUT:
+|
+|		n is the order of the matrix.
+|
+|		low and high are integers determined by Balanc.
+|
+|		scale contains information determining the permutations and scaling factors used by Balanc.
+|
+|		m is the number of columns of z to be back transformed.
+|
+|		z contains the real and imaginary parts of the eigenvectors to be back transformed in its
+|		first m columns.
+|
+|	ON OUTPUT:
+|
+|		z contains the real and imaginary parts of the transformed eigenvectors in its first m
+|		columns.
+*/
+
+void BalBak (int n, int low, int high, MODEL_FLOAT *scale, int m, MODEL_FLOAT **z)
+
+{
+	int			i, j, k, ii;
+	MODEL_FLOAT		s;
+
+	if (m != 0)
+		{
+		if (high != low)
+			{
+			for (i = low; i <= high; i++)
+				{
+				s = scale[i];	/* left hand eigenvectors are back transformed if this statement is
+								   replaced by  s = 1.0/scale[i] */
+				for (j = 0; j < m; j++)
+					z[i][j] *= s;
+				}
+			}
+		for (ii = 0; ii < n; ii++)
+			{
+			i = ii;
+			if ((i < low) || (i > high))
+				{
+				if (i < low)
+					i = low - ii;
+				k = (int)scale[i];
+				if (k != i)
+					{
+					for (j = 0; j < m; j++)
+						{
+						s = z[i][j];
+						z[i][j] = z[k][j];
+						z[k][j] = s;
+						}
+					}
+				}
+			}
+		}
+}
+
+/*--------------------------------------------------------------------------------------------------
+|
+|	CDiv
+|
+|	Complex division, (cr,ci) = (ar,ai)/(br,bi)
+*/
+
+void CDiv (MODEL_FLOAT ar, MODEL_FLOAT ai, MODEL_FLOAT br, MODEL_FLOAT bi, MODEL_FLOAT *cr, MODEL_FLOAT *ci)
+
+{
+	MODEL_FLOAT		s, ais, bis, ars, brs;
+
+	s = fabs(br) + fabs(bi);
+	ars = ar / s;
+	ais = ai / s;
+	brs = br / s;
+	bis = bi / s;
+	s = brs*brs + bis*bis;
+	*cr = (ars*brs + ais*bis) / s;
+	*ci = (ais*brs - ars*bis) / s;
+}
+
+
+//these are from John's MCMC.c file
+void CalcCijk (MODEL_FLOAT *c_ijk, int n, const MODEL_FLOAT **u, const MODEL_FLOAT **v)
+
+{
+		/* precalculate values for faster matrix mult in GTRChangeMatrix and GTRDerivatives */
+		MODEL_FLOAT *pc = c_ijk;
+		for (int i=0; i<n; i++)
+			for (int j=0; j<n; j++)
+				for (int k=0; k<n; k++){
+				 	*pc++ = u[i][k] * v[k][j];	/* (note: pc = &c[i][j][k]) */
+//					assert(*(pc-1) >= 0.0);
+					}
+}
+
+
+void CalcPij (const MODEL_FLOAT *c_ijk, int n, const MODEL_FLOAT *eigenValues, MODEL_FLOAT v, MODEL_FLOAT r, MODEL_FLOAT **p, MODEL_FLOAT *EigValexp)
+
+{
+
+	register int		nsq = n * n;
+	MODEL_FLOAT				sum;
+	const MODEL_FLOAT *ptr;
+	MODEL_FLOAT *pMat = p[0];
+	MODEL_FLOAT vr = v * r;
+	MODEL_FLOAT *g = EigValexp;
+	for (int k=0; k<n; k++)
+		*g++ = exp(*eigenValues++ * vr);
+
+	ptr = c_ijk;
+#if 1
+	for(int i=0; i<nsq; i++){
+		g = EigValexp;
+		sum = 0.0;
+		for(int k=0; k<n; k++)
+			sum += (*ptr++) * (*g++);
+	//	assert(sum > 0.0f);
+
+#ifdef _SINGLE_PRECISION_FLOATS
+		*pMat++ = (sum < ZERO_POINT_ZERO) ? FLT_MIN : sum;
+#else
+		*pMat++ = (sum < ZERO_POINT_ZERO) ? ZERO_POINT_ZERO : sum;
+#endif
+		}
+#else
+	for(i=0; i<n; i++)
+		{
+		for(j=0; j<n; j++)
+			{
+			g = EigValexp;
+			sum = ZERO_POINT_ZERO;
+			for(k=0; k<n; k++)
+				sum += (*ptr++) * (*g++);
+			//p[i][j] = (sum < ZERO_POINT_ZERO) ? ZERO_POINT_ZERO : sum;
+			*pMat++ = (sum < ZERO_POINT_ZERO) ? ZERO_POINT_ZERO : sum;
+			}
+		}
+#endif
+
+}
+
+
diff --git a/src/linalg.h b/src/linalg.h
new file mode 100644
index 0000000..abfe378
--- /dev/null
+++ b/src/linalg.h
@@ -0,0 +1,22 @@
+/*	linalg.h
+|
+|	Prototypes for matrix-inversion and eigensystem functions
+|
+|	Copyright (c) 1998 by David L. Swofford, Smithsonian Institution.
+|	All rights reserved.
+|
+|	NOTE: if ANSI function prototypes are not supported, define NO_PROTOTYPES
+|		  before including this file.
+*/
+
+#define RC_COMPLEX_EVAL 2	/* code that complex eigenvalue obtained */
+
+extern int  InvertMatrix (MODEL_FLOAT **a, int n, MODEL_FLOAT *col, int *indx, MODEL_FLOAT **a_inv);
+extern int  LUDecompose (MODEL_FLOAT **a, int n, MODEL_FLOAT *vv, int *indx, MODEL_FLOAT *pd);
+int  EigenRealGeneral (int n, MODEL_FLOAT **a, MODEL_FLOAT *v, MODEL_FLOAT *vi, MODEL_FLOAT **u, int *iwork, MODEL_FLOAT *work);
+
+
+//these are actually from John's MCMC.c file
+void CalcCijk (MODEL_FLOAT *c_ijk, int n, const MODEL_FLOAT **u,  const MODEL_FLOAT **v);
+void CalcPij (const MODEL_FLOAT *c_ijk, int n, const MODEL_FLOAT *eigenValues, MODEL_FLOAT v, MODEL_FLOAT r, MODEL_FLOAT **p, MODEL_FLOAT *EigValexp);
+
diff --git a/src/memchk.h b/src/memchk.h
new file mode 100644
index 0000000..efc8496
--- /dev/null
+++ b/src/memchk.h
@@ -0,0 +1,325 @@
+// This file is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+//	do not re-disribute
+//	by Paul O. Lewis, Mark T. Holder and David L. Swofford
+//	
+//
+#ifndef __MEMORYACCOUNTANT
+#define __MEMORYACCOUNTANT
+
+
+#if defined (MONITORING_ALLOCATION) && !defined(NDEBUG)
+	#include <vector>
+	#include <string>
+	#include <cassert>
+	#include <iostream>
+	#include <algorithm>
+	#define CREATE_MEMCHK					\
+		MemoryAccountant memAccountant;	\
+		memTracker = &memAccountant;			\
+		memTracker->StartRecording();
+	#define MEMCHK_REPORT(o)					\
+		memTracker->StopRecording();			\
+		memAccountant.Summarize(o);
+
+	using namespace std;
+	
+	class MemoryAccountant;
+
+	#if defined (INSTANTIATE_MEMCHK)
+		//struct dmalloc_t dmalloc;
+		MemoryAccountant* memTracker = NULL;
+	#else
+		//extern struct dmalloc_t dmalloc;
+		extern MemoryAccountant* memTracker;
+	#endif
+
+	/*----------------------------------------------------------------------------------------------------------------------
+	|	Structure used to store accounting information for one individual memory allocation.
+	*/
+	class MemoryInfo
+		{
+		public:
+		void		*ptr;
+		unsigned 	filename_index;
+		unsigned 	line_number;
+		unsigned 	num_bytes;
+		enum	{	Mem_Array 				= 0x01,	/* was allocated using the new [] operator */
+					Mem_Op_Err_Free_Array 	= 0x02, /* was allocated using the new, but freed with delete [] */
+					Mem_Op_Err_New_Array 	= 0x04, /* was allocated using the new[], but freed with delete */
+					Mem_Mid_Array_Delete	= 0x08  /* delete called with an address in the middle of array */
+				};
+		unsigned	flag;
+		bool		array_allocation;
+		MemoryInfo(bool is_arr = false);
+		};
+		
+	inline MemoryInfo::MemoryInfo(
+	  bool is_arr)	/*true if the memory was allocated using new [] */
+		{
+		flag = is_arr ? (unsigned) Mem_Array : 0U;
+		ptr = (void *)NULL;
+		filename_index = 0L;
+		line_number = 0L;
+		num_bytes = 0L;
+		}
+
+	/*----------------------------------------------------------------------------------------------------------------------
+	|	Keeps track of memory allocations and deletions if AddMemoryInfo is called after every call to the new operator and 
+	|	MarkDeleted is called for every call to the delete or delete [] operator, which can be done using macros so that 
+	|	memory accounting is not done in the release version.
+	*/
+	class MemoryAccountant
+		{
+		typedef vector<MemoryInfo>	MemInfoVector;
+		typedef vector<string>				FileNameVector;
+
+		FileNameVector		filenames;			/* vector of source file names used to provide filename_index element in the MemoryInfo struct */
+		MemoryInfo	tmp;				/* workspace used when adding a new mem_info element */
+		MemInfoVector		mem_info;			/* vector of allocation records */
+		unsigned			nBad;				/* number of remaining allocs that have not yet been deleted */
+		unsigned			nUnknown;			/* number of deletes on non-NULL pointers that are not in our database */
+		unsigned			nAllocs;			/* total number of allocs that we have caught with our overload of new */
+		unsigned long		numBytesAllocated;	/* total number of bytes from allocs that we have caught with our overload of new */
+		unsigned long		currentlyAllocated;	/* the number of bytes that are allocated but haven't been freed (only catchs allocations through our new operator) */
+		unsigned long		peakAllocation;		/* the most bytes that are ever allocated at one time (only catchs allocations through our new operator) */
+		public:
+		static bool			recording;			/* if true, records allocations and deletions; otherwise, ignores them */
+			MemoryAccountant();
+			~MemoryAccountant();
+
+			void StartRecording();
+			void StopRecording();
+
+			void AddMemoryInfo(void *p, string fn, unsigned ln, unsigned long b = 0L, bool is_arr = false);
+			void MarkDeleted(void *p, bool is_arr = false);
+
+			void Summarize(ostream &out);
+		};
+
+	inline void MemoryAccountant::StartRecording()
+		{
+		recording = true;
+		}
+
+	inline void MemoryAccountant::StopRecording()
+		{
+		recording = false;
+		}
+
+	inline void *operator new (size_t size, const char *file, int line)
+		{
+		void *p = malloc(size);
+		if (p == NULL)
+			throw std::bad_alloc();
+		if (memTracker != NULL && MemoryAccountant::recording)
+			memTracker->AddMemoryInfo(p, file, (unsigned)line, size, false);
+		return p;
+		}
+
+	inline void operator delete (void *p)
+		{
+		if (p != NULL)
+			{
+			if (memTracker != NULL && MemoryAccountant::recording)
+				memTracker->MarkDeleted(p, false);
+			free(p);
+			}
+		}
+
+	#if !defined (_MSC_VER)
+		inline void * operator new [] (size_t size, const char *file, int line)
+			{
+		 	void *p = malloc (size);
+			if (p == NULL)
+				throw std::bad_alloc();
+			if (memTracker != NULL && MemoryAccountant::recording)
+					memTracker->AddMemoryInfo(p, file, (unsigned) line, size, true);
+			return p;
+			}
+
+		inline void operator delete [](void *p)
+			{
+			if (p != NULL)
+				{
+				if (memTracker != NULL && MemoryAccountant::recording)
+					memTracker->MarkDeleted(p, true);
+				free(p);
+				}
+			}
+	#endif	//!defined (_MSC_VER)
+
+	#define NEW new (__FILE__, __LINE__)
+	#define new NEW
+	#if defined (INSTANTIATE_MEMCHK)
+		bool MemoryAccountant::recording = false;
+
+		/*----------------------------------------------------------------------------------------------------------------------
+		|	Default constructor does nothing currently.
+		*/
+		MemoryAccountant::MemoryAccountant() 
+			: nBad(0L), 
+			nUnknown(0L), 
+			nAllocs(0L), 
+			numBytesAllocated(0L),
+			peakAllocation(0L),
+			currentlyAllocated(0L)
+			{
+			}
+
+		/*----------------------------------------------------------------------------------------------------------------------
+		|	Destructor does nothing currently.
+		*/
+		MemoryAccountant::~MemoryAccountant()
+			{
+			filenames.erase(filenames.begin(), filenames.end());
+			}
+
+		/*----------------------------------------------------------------------------------------------------------------------
+		|	Fills in fields of temporary MemoryInfo structure tmp and pushes it onto the mem_info vector.
+		*/
+		void MemoryAccountant::AddMemoryInfo(
+		  void			*p,		/* pointer to the allocated memory */
+		  string		fn,		/* name of file where allocation occurred */
+		  unsigned		ln,		/* line number where allocation occurred */
+		  unsigned long b,		/* number of bytes allocated (defaults to 0L, which means number of bytes is not being tracked) */
+		  bool 			is_arr)	/* true if the allocated using the new [] operator */
+			{
+			if (!MemoryAccountant::recording) 
+				return;
+			nAllocs++;
+			numBytesAllocated += b;
+			currentlyAllocated += b;
+			if (currentlyAllocated > peakAllocation)
+				peakAllocation = currentlyAllocated;
+				
+			// Attempt to find fn in the stored vector of file names
+			//
+			FileNameVector::iterator i = find(filenames.begin(), filenames.end(), fn);
+			if (i == filenames.end())
+				{
+				// fn has not previously been encountered
+				//
+				tmp.filename_index = filenames.size();
+				filenames.push_back(fn);
+				}
+			else
+				{
+				// fn has not previously been encountered
+				//
+				tmp.filename_index = (unsigned) (i - filenames.begin());
+				}
+			
+			tmp.ptr = p;
+			tmp.flag = is_arr ? (unsigned) MemoryInfo::Mem_Array : 0U;
+			tmp.num_bytes = b;
+			tmp.line_number = ln;
+			mem_info.push_back(tmp);
+			nBad++;
+			}
+
+		/*----------------------------------------------------------------------------------------------------------------------
+		|	Finds pointer p in mem_info vector and sets it to NULL, marking it as having been deleted.
+		*/
+		void MemoryAccountant::MarkDeleted(
+		  void *p,		/* the pointer to be marked */
+		  bool is_arr)	/*true if the memory is being freed with the delete [] operator */
+			{
+			if (!recording || p == NULL)
+				return;
+
+			bool found = false;
+			bool middleArrayError = false;
+			MemInfoVector::iterator i;
+			for (i = mem_info.begin(); i != mem_info.end(); i++)
+				{
+				if (i->ptr == p)
+					{
+					if (is_arr)
+						{
+						if (!(i->flag & MemoryInfo::Mem_Array))
+							i->flag |= MemoryInfo::Mem_Op_Err_Free_Array;
+						}
+					else
+						{
+						if (i->flag & MemoryInfo::Mem_Array)
+							i->flag |= MemoryInfo::Mem_Op_Err_New_Array;
+						}
+					i->ptr = NULL;
+					nBad--;
+					found = true;
+					currentlyAllocated -= i->num_bytes;
+					break;
+					}
+				else if (i->ptr < p && ((unsigned long) i->ptr + (unsigned long) i->num_bytes > (unsigned long) p))
+					{
+					middleArrayError = true;
+					i->flag |= MemoryInfo::Mem_Mid_Array_Delete;
+					assert(middleArrayError == false);
+					}
+				}
+			assert(! (found && middleArrayError));	// shouldn't be possible to trip the middle of an array error and later find the mem object
+			if (!found)
+				nUnknown++;
+			}
+
+		/*----------------------------------------------------------------------------------------------------------------------
+		|	Summarizes memory allocations recorded, displaying total number of allocations, number of allocations currently
+		|	not deleted, and file name and line number for remaining undeleted elements.
+		*/
+		void MemoryAccountant::Summarize(
+		  ostream &out)	/* output stream for showing summary */
+			{
+			out << "\n\nMemory Report" << endl;
+
+			out << "\nTotal allocations: " << nAllocs << " ("<< numBytesAllocated <<" bytes)"<<endl;
+			out << "\nLargest Memory Requirement: " << peakAllocation << "  bytes"<<endl;
+			if (nBad == 0L)
+				out << "0 undeleted memory elements!" << endl;
+			else if (nBad == 1L)
+				out << "There was 1 undeleted memory element" << endl;
+			else
+				out << "There were " << nBad << " undeleted memory elements" << endl;
+
+			// Compute approximate amount of memory required to just track allocs
+			//
+			unsigned z = mem_info.size() * sizeof(MemoryInfo);
+			z += sizeof(MemoryAccountant);
+			FileNameVector::iterator j;
+			for (j = filenames.begin(); j != filenames.end(); j++)
+				z += (*j).length();
+			out << "The memory tracker itself required at least " << z << " bytes" << endl;
+
+			MemInfoVector::iterator i;
+			for (i = mem_info.begin(); i != mem_info.end(); i++)
+				{
+				MemoryInfo &mi = (*i);
+				if (mi.ptr != NULL || mi.flag > 1)
+					{
+					out << "  ";
+					if (mi.num_bytes > 0L)
+						out << mi.num_bytes << " bytes ";
+					else
+						out << "unknown number of bytes ";
+					if (mi.ptr != NULL)
+						out << "remaining from allocation at ";
+					if (mi.flag & MemoryInfo::Mem_Op_Err_Free_Array)
+						out << "allocated with new but freed with delete [].  Allocation at ";
+					else if (mi.flag & MemoryInfo::Mem_Op_Err_New_Array)
+						out << "allocated with new [] but freed with delete.  Allocation at ";
+					else if (mi.flag & MemoryInfo::Mem_Mid_Array_Delete)
+						out << "allocated but deletion occurred from the middle. Allocation at ";
+					string s = filenames[mi.filename_index];
+					out << s;
+					out << " (" << mi.line_number << ")" << endl;
+					}
+				}
+			}
+#		endif //defined (INSTANTIATE_MEMCHK)
+#	else	// #if defined(MONITORING_ALLOCATION) && !defined(NDEBUG
+#		define CREATE_MEMCHK
+#		define MEMCHK_REPORT(o)
+#	endif	// #if defined(MONITORING_ALLOCATION) && !defined(NDEBUG)
+
+#endif // #ifndef __MEMORYACCOUNTANT
diff --git a/src/model.cpp b/src/model.cpp
new file mode 100644
index 0000000..de5d4d2
--- /dev/null
+++ b/src/model.cpp
@@ -0,0 +1,4966 @@
+// GARLI version 2.1 source code
+// Copyright 2005-2014 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#include <iostream>
+#include <sstream>
+
+using namespace std;
+
+#include "defs.h"
+#include "utility.h"
+#include "linalg.h"
+#include "model.h"
+#include "individual.h"
+#include "sequencedata.h"
+#include "rng.h"
+
+#undef ALIGN_MODEL
+
+Profiler ProfCalcPmat("CalcPmat      ");
+Profiler ProfCalcEigen("CalcEigen     ");
+					 
+extern rng rnd;
+extern vector<DataSubsetInfo> dataSubInfo;
+FLOAT_TYPE Model::mutationShape;
+
+FLOAT_TYPE PointNormal (FLOAT_TYPE prob);
+FLOAT_TYPE IncompleteGamma (FLOAT_TYPE x, FLOAT_TYPE alpha, FLOAT_TYPE LnGamma_alpha);
+FLOAT_TYPE PointChi2 (FLOAT_TYPE prob, FLOAT_TYPE v);
+
+Model::~Model(){
+	if(stateFreqs.empty() == false){
+		for(int i=0;i<(int)stateFreqs.size();i++)
+			delete stateFreqs[i];
+		}
+
+	if(relNucRates.empty() == false){
+		if(nst==6  || nst == -1){
+			//3/25/08 this needed to change a bit for arbitrary matrices
+			//since some of the elements might be aliased
+			for(int i=0;i<(int)relNucRates.size();i++){
+				if(relNucRates[i] != NULL){
+					for(int j=i+1;j<(int)relNucRates.size();j++){
+						if(relNucRates[j] == relNucRates[i]) relNucRates[j] = NULL;
+						}
+					delete relNucRates[i];
+					relNucRates[i] = NULL;
+					}
+				}
+			}
+		else if(nst==2){
+			delete relNucRates[0];
+			delete relNucRates[1];
+			}
+		else if(nst==1) delete relNucRates[0];
+		}
+
+	if(modSpec->IsCodon()){
+		for(int r=0;r<NRateCats();r++){
+			delete omegas[r];
+			delete omegaProbs[r];
+			}
+		}
+
+	if(propInvar != NULL) delete propInvar;
+
+	if(alpha != NULL) delete alpha;
+
+	if(insertRate != NULL)
+		delete insertRate;
+	if(deleteRate !=NULL)
+		delete deleteRate;
+
+	for(vector<BaseParameter*>::iterator delit=paramsToMutate.begin();delit!=paramsToMutate.end();delit++)
+		delete *(delit);
+
+	Delete2DArray(eigvals);
+	delete []eigvalsimag;
+	delete []iwork;
+	delete []work;
+	delete []col;
+	delete []indx;
+	if(c_ijk != NULL)
+		Delete2DArray(c_ijk);
+	delete []EigValexp;
+	delete []EigValderiv;
+	delete []EigValderiv2;
+	delete []blen_multiplier;
+
+#ifndef ALIGN_MODEL
+	Delete3DArray(eigvecs);
+	Delete2DArray(teigvecs);
+	Delete3DArray(inveigvecs);
+	//Delete3DArray(pmat);
+	Delete3DArray(pmat1);
+	Delete3DArray(pmat2);
+	Delete3DArray(qmat);
+	Delete3DArray(tempqmat);
+	Delete3DArray(deriv1);
+	Delete3DArray(deriv2);
+
+	#ifdef SINGLE_PRECISION_FLOATS
+	Delete3DArray(fpmat1);
+	Delete3DArray(fpmat2);	
+	Delete3DArray(fderiv1);
+	Delete3DArray(fderiv2);
+	#endif
+#else
+	Delete2DAlignedArray(eigvecs);
+	Delete2DAlignedArray(teigvecs);
+	Delete2DAlignedArray(inveigvecs);
+	Delete3DAlignedArray(pmat);
+	Delete2DAlignedArray(qmat);
+	Delete2DAlignedArray(tempqmat);
+	Delete3DAlignedArray(deriv1);
+	Delete3DAlignedArray(deriv2);
+#endif
+	}
+
+void Model::AllocateEigenVariables(){
+#ifndef ALIGN_MODEL
+	//a bunch of allocation here for all of the qmatrix->eigenvector->pmatrix related variables
+	eigvalsimag=new MODEL_FLOAT[nstates];
+	iwork=new int[nstates];
+	work=new MODEL_FLOAT[nstates];
+	col=new MODEL_FLOAT[nstates];
+	indx=new int[nstates];
+	EigValexp=new MODEL_FLOAT[nstates*NRateCats()];
+	EigValderiv=new MODEL_FLOAT[nstates*NRateCats()];
+	EigValderiv2=new MODEL_FLOAT[nstates*NRateCats()];
+
+	//create the matrix for the eigenvectors
+	eigvecs=New3DArray<MODEL_FLOAT>(NRateCats(), nstates, nstates);
+
+	//create a temporary matrix to hold the eigenvectors that will be destroyed during the invertization
+	teigvecs=New2DArray<MODEL_FLOAT>(nstates,nstates);
+
+	//create the matrix for the inverse eigenvectors
+	inveigvecs=New3DArray<MODEL_FLOAT>(NRateCats(), nstates, nstates);	
+
+	//allocate the pmats
+	pmat1=New3DArray<MODEL_FLOAT>(NRateCats(), nstates, nstates);
+	pmat2=New3DArray<MODEL_FLOAT>(NRateCats(), nstates, nstates);
+	
+#ifdef SINGLE_PRECISION_FLOATS
+	//allocate single precision versions of the matrices
+	fpmat1=New3DArray<FLOAT_TYPE>(NRateCats(), nstates, nstates);
+	fpmat2=New3DArray<FLOAT_TYPE>(NRateCats(), nstates, nstates);
+	fderiv1=New3DArray<FLOAT_TYPE>(NRateCats(), nstates, nstates);
+	fderiv2=New3DArray<FLOAT_TYPE>(NRateCats(), nstates, nstates);
+
+#endif
+	
+	//it is actually less efficient to precalc the c_ijk for codon models due to the immense
+	//size of the matrix.  So don't allocate it at all.
+	if(modSpec->IsCodon() == false){
+		c_ijk=New2DArray<MODEL_FLOAT>(1,nstates*nstates*nstates);
+		}
+	else c_ijk = NULL;
+
+	//allocate qmat and tempqmat
+	//if this is a model with multiple qmats (like multi-omega models or mixtures)
+	//it needs to be bigger
+	if(modSpec->IsNonsynonymousRateHet() == false){
+		qmat=New3DArray<MODEL_FLOAT>(1, nstates,nstates);
+		tempqmat=New3DArray<MODEL_FLOAT>(1, nstates,nstates);
+		blen_multiplier = new FLOAT_TYPE[1];
+		eigvals=New2DArray<MODEL_FLOAT>(1, nstates);//eigenvalues
+		}
+	else{
+		qmat=New3DArray<MODEL_FLOAT>(NRateCats(), nstates, nstates);
+		tempqmat=New3DArray<MODEL_FLOAT>(NRateCats(), nstates, nstates);
+		blen_multiplier = new FLOAT_TYPE[NRateCats()];
+		eigvals=New2DArray<MODEL_FLOAT>(NRateCats(), nstates);//eigenvalues
+		}
+
+	deriv1=New3DArray<MODEL_FLOAT>(NRateCats(), nstates, nstates);
+	deriv2=New3DArray<MODEL_FLOAT>(NRateCats(), nstates, nstates);
+#else
+
+	//a bunch of allocation here for all of the qmatrix->eigenvector->pmatrix related variables
+	eigvals=new MODEL_FLOAT[nstates];//eigenvalues
+	eigvalsimag=new MODEL_FLOAT[nstates];
+	iwork=new int[nstates];
+	work=new MODEL_FLOAT[nstates];
+	col=new MODEL_FLOAT[nstates];
+	indx=new int[nstates];
+	c_ijk=new MODEL_FLOAT[nstates*nstates*nstates];	
+	EigValexp=new MODEL_FLOAT[nstates*NRateCats()];	
+
+	//create the matrix for the eigenvectors
+	eigvecs=New2DAlignedArray<MODEL_FLOAT>(nstates,nstates);
+
+	//create a temporary matrix to hold the eigenvectors that will be destroyed during the invertization
+	teigvecs=New2DAlignedArray<MODEL_FLOAT>(nstates,nstates);
+
+	//create the matrix for the inverse eigenvectors
+	inveigvecs=New2DAlignedArray<MODEL_FLOAT>(nstates,nstates);	
+
+	//allocate the pmat
+	pmat=New3DAlignedArray<MODEL_FLOAT>(NRateCats(), nstates, nstates);
+
+	//allocate qmat and tempqmat
+	qmat=New2DAlignedArray<MODEL_FLOAT>(nstates,nstates);
+	tempqmat=New2DAlignedArray<MODEL_FLOAT>(nstates,nstates);
+
+	deriv1=New3DAlignedArray<MODEL_FLOAT>(NRateCats(), nstates, nstates);
+	deriv2=New3DAlignedArray<MODEL_FLOAT>(NRateCats(), nstates, nstates);
+#endif
+	}
+
+void Model::UpdateQMat(){
+	//recalculate the qmat from the statefreqs and rates
+
+	if(modSpec->IsCodon()){
+		UpdateQMatCodon();
+		return;
+		}
+	else if(modSpec->IsOrientedGap()){
+		return;
+		}	
+	else if(modSpec->IsAminoAcid()){
+		UpdateQMatAminoAcid();
+		return;
+		}
+	else if(modSpec->IsNState() || modSpec->IsNStateV() || modSpec->IsBinary() || modSpec->IsBinaryNotAllZeros()){
+		UpdateQMatNState();
+		return;
+		}
+	else if(modSpec->IsOrderedNState() || modSpec->IsOrderedNStateV()){
+		UpdateQMatOrderedNState();
+		return;
+		}
+	
+	if(nstates==4){
+		qmat[0][0][1]=*relNucRates[0] * *stateFreqs[1];  //a * piC
+		qmat[0][0][2]=*relNucRates[1] * *stateFreqs[2];  //b * piG
+		qmat[0][0][3]=*relNucRates[2] * *stateFreqs[3];  //c * piT
+		qmat[0][1][2]=*relNucRates[3] * *stateFreqs[2];  //d * piG
+		qmat[0][1][3]=*relNucRates[4] * *stateFreqs[3];  //e * piT
+		qmat[0][2][3]=*stateFreqs[3];  			//f(=1) * piT 
+		qmat[0][1][0]=*relNucRates[0] * *stateFreqs[0];  //a * piA
+		qmat[0][2][0]=*relNucRates[1] * *stateFreqs[0];  //b * piA
+		qmat[0][2][1]=*relNucRates[3] * *stateFreqs[1];  //d * piC
+		qmat[0][3][0]=*relNucRates[2] * *stateFreqs[0];  //c * piA
+		qmat[0][3][1]=*relNucRates[4] * *stateFreqs[1];  //e * piC
+		qmat[0][3][2]=*stateFreqs[2]; 			//f(=1) * piG
+		}
+	else {//this isn't being used - see UpdateQmatCodon and UpdateQmatAminoAcid
+		//general nstate x nstate method	
+		int rnum=0;
+		for(int i=0;i<nstates;i++){
+			for(int j=i+1;j<nstates;j++){
+				qmat[0][i][j]=*relNucRates[rnum] * *stateFreqs[j];
+				qmat[0][j][i]=*relNucRates[rnum] * *stateFreqs[i];
+				rnum++;
+				}
+			}
+		}
+		
+	//set diags to sum rows to 0
+	MODEL_FLOAT sum;
+	for(int x=0;x<nstates;x++){
+		sum=ZERO_POINT_ZERO;
+		for(int y=0;y<nstates;y++){
+			if(x!=y) sum+=qmat[0][x][y];
+			}
+		qmat[0][x][x]=-sum;
+		}
+
+	//calculate the branch length rescaling factor
+	blen_multiplier[0]=(ZERO_POINT_FIVE/((qmat[0][0][1]**stateFreqs[0])+(qmat[0][0][2]**stateFreqs[0])+(qmat[0][0][3]**stateFreqs[0])+(qmat[0][1][2]**stateFreqs[1])+(qmat[0][1][3]**stateFreqs[1])+(qmat[0][2][3]**stateFreqs[2])));
+	}
+
+void Model::FillQMatLookup(){
+	//the code here is:
+	//bit 1 = viable 1 nuc change path
+	//bit 2 = transition
+	//bit 4 = Nonsynonymous
+	//bit 8 = A->C or C->A nuc change
+	//bit 16 = A->G or G->A nuc change
+	//bit 32 = A->T or T->A nuc change
+	//bit 64 = C->G or G->C nuc change
+	//bit 128 = C->T or T->C nuc change
+	//bit 256 = G->T or T->G nuc change
+	
+	//although it seems a little wacky, I'm going to fill the 64x64 matrix, and then eliminate the
+	//rows and columns that are stop codons, since they differ for different codes and the following 
+	//stuff would be hell without regularity.  The static qmatLookup is only calculated once anyway.
+	
+	int tempqmatLookup[64*64];
+	for(int q=0;q<64*64;q++) tempqmatLookup[q]=0;
+	//its easier to do this in 4 x 4 blocks
+	for(int i=0;i<16;i++){
+		for(int j=0;j<16;j++){
+			for(int ii=0;ii<4;ii++){
+				for(int jj=0;jj<4;jj++){
+					if(i==j){//on diagonal 4x4
+						if(ii!=jj){
+							//all the cells in this subsection are 1 nuc change away
+							tempqmatLookup[64*(i*4+ii) + (j*4+jj)] = 1;
+							if((ii+jj)%2 == 0)
+								tempqmatLookup[64*(i*4+ii) + (j*4+jj)] |= 2;
+							if((ii==0 && jj==1) || (ii==1 && jj==0)) tempqmatLookup[64*(i*4+ii) + (j*4+jj)] |= 8;
+							else if((ii==0 && jj==2) || (ii==2 && jj==0)) tempqmatLookup[64*(i*4+ii) + (j*4+jj)] |= 16;
+							else if((ii==0 && jj==3) || (ii==3 && jj==0)) tempqmatLookup[64*(i*4+ii) + (j*4+jj)] |= 32;
+							else if((ii==1 && jj==2) || (ii==2 && jj==1)) tempqmatLookup[64*(i*4+ii) + (j*4+jj)] |= 64;
+							else if((ii==1 && jj==3) || (ii==3 && jj==1)) tempqmatLookup[64*(i*4+ii) + (j*4+jj)] |= 128;
+							else if((ii==2 && jj==3) || (ii==3 && jj==2)) tempqmatLookup[64*(i*4+ii) + (j*4+jj)] |= 256;
+							}
+						}
+					else if(floor(i/4.0)==floor(j/4.0)){//near diagonal 4x4, some cells differ at the 2nd pos
+						if(ii==jj){
+							//the diagonal cells in this subsection are 1 nuc change away
+							tempqmatLookup[64*(i*4+ii) + (j*4+jj)] = 1;
+							if(abs(i-j) == 2)
+								tempqmatLookup[64*(i*4+ii) + (j*4+jj)] |= 2;
+							if((i%4==0 && j%4==1) || (i%4==1 && j%4==0)) tempqmatLookup[64*(i*4+ii) + (j*4+jj)] |= 8;
+							else if((i%4==0 && j%4==2) || (i%4==2 && j%4==0)) tempqmatLookup[64*(i*4+ii) + (j*4+jj)] |= 16;
+							else if((i%4==0 && j%4==3) || (i%4==3 && j%4==0)) tempqmatLookup[64*(i*4+ii) + (j*4+jj)] |= 32;
+							else if((i%4==1 && j%4==2) || (i%4==2 && j%4==1)) tempqmatLookup[64*(i*4+ii) + (j*4+jj)] |= 64;
+							else if((i%4==1 && j%4==3) || (i%4==3 && j%4==1)) tempqmatLookup[64*(i*4+ii) + (j*4+jj)] |= 128;
+							else if((i%4==2 && j%4==3) || (i%4==3 && j%4==2)) tempqmatLookup[64*(i*4+ii) + (j*4+jj)] |= 256;							
+							}
+						}
+					else{//far from diagonal 4x4, some cells differ at the 1nd pos
+						if(i%4 == j%4){
+							if(ii==jj){
+								//the diagonal cells in this subsection are 1 nuc change away
+								tempqmatLookup[64*(i*4+ii) + (j*4+jj)] = 1;
+								if(abs(i-j) ==8)
+									tempqmatLookup[64*(i*4+ii) + (j*4+jj)] |= 2;
+								if((i/4==0 && j/4==1) || (i/4==1 && j/4==0)) tempqmatLookup[64*(i*4+ii) + (j*4+jj)] |= 8;
+								else if((i/4==0 && j/4==2) || (i/4==2 && j/4==0)) tempqmatLookup[64*(i*4+ii) + (j*4+jj)] |= 16;
+								else if((i/4==0 && j/4==3) || (i/4==3 && j/4==0)) tempqmatLookup[64*(i*4+ii) + (j*4+jj)] |= 32;
+								else if((i/4==1 && j/4==2) || (i/4==2 && j/4==1)) tempqmatLookup[64*(i*4+ii) + (j*4+jj)] |= 64;
+								else if((i/4==1 && j/4==3) || (i/4==3 && j/4==1)) tempqmatLookup[64*(i*4+ii) + (j*4+jj)] |= 128;
+								else if((i/4==2 && j/4==3) || (i/4==3 && j/4==2)) tempqmatLookup[64*(i*4+ii) + (j*4+jj)] |= 256;	
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+
+	//mark the nonsynonymous changes with |4 and the stops with -1
+	for(int from=0;from<64;from++){
+		for(int to=0;to<64;to++){
+			int fromAA = code->CodonLookup(from);
+			int toAA = code->CodonLookup(to);
+			//if one of the codons is a stop
+			if(fromAA == 20 || toAA == 20)
+				tempqmatLookup[64*from + to] = -1;
+			//if this is a viable 1 nucleotide change
+			else if(tempqmatLookup[64*from + to] & 1){
+				//if this is a nonsynonymous change
+				if(fromAA != toAA) 
+					tempqmatLookup[64*from + to] |= 4;
+				}
+			}
+		}
+#ifdef CODON_QMAT_HACK
+//WHEN PLAYING HERE, REMEMBER THAT THESE INDECES ARE WITH RESPECT TO THE
+//WHOLE 64X64 MATRIX
+	//Put in whatever ad hoc alterations to the codon matrix
+	//Hack in single changes for serine -> serine double hits
+	//giving them a rate of omega X the first pos change
+	//AGC->TCC
+/*	tempqmatLookup[629] = 1 | 4 | 32;
+	//AGT->TCT
+	tempqmatLookup[759] = 1 | 4 | 32;
+	//TCT->AGT
+	tempqmatLookup[3531] = 1 | 4 | 32;
+	//TCC->AGC
+	tempqmatLookup[3401] = 1 | 4 | 32;
+*/
+//all transitions between
+//the two sets of serine codons
+	//AGC->TCN
+	tempqmatLookup[628] = 1 | 4 | 32;
+	tempqmatLookup[629] = 1 | 4 | 32;
+	tempqmatLookup[630] = 1 | 4 | 32;
+	tempqmatLookup[631] = 1 | 4 | 32;
+	//AGT->TCN
+	tempqmatLookup[756] = 1 | 4 | 32;
+	tempqmatLookup[757] = 1 | 4 | 32;
+	tempqmatLookup[758] = 1 | 4 | 32;
+	tempqmatLookup[759] = 1 | 4 | 32;
+	//TCN->AGC
+	tempqmatLookup[3337] = 1 | 4 | 32;
+	tempqmatLookup[3401] = 1 | 4 | 32;
+	tempqmatLookup[3465] = 1 | 4 | 32;
+	tempqmatLookup[3529] = 1 | 4 | 32;
+	//TCN->AGT
+	tempqmatLookup[3339] = 1 | 4 | 32;
+	tempqmatLookup[3403] = 1 | 4 | 32;
+	tempqmatLookup[3467] = 1 | 4 | 32;
+	tempqmatLookup[3531] = 1 | 4 | 32;
+	
+#endif
+
+	//remove the columns and rows representing stops
+	int reducedCell = 0;
+	for(int fullCell=0;fullCell<64*64;fullCell++){
+		if(tempqmatLookup[fullCell] != -1)
+			qmatLookup[reducedCell++] = tempqmatLookup[fullCell];
+		}
+	//assert(reducedCell == nstates*nstates);
+
+/*	ofstream deb("debugQmat.log");
+	for(int from=0;from<nstates;from++){
+		for(int to=0;to<nstates;to++){
+			deb << qmatLookup[from*nstates + to] << "\t";
+			}
+		deb << endl;
+		}
+*/	}
+
+
+void Model::UpdateQMatCodon(){
+//	ofstream dout("AAdist.log");
+
+//	double composition[61]={0.12, 0.484, 0.12, 0.484, 0.0727, 0.0727, 0.0727, 0.0727, 0.236, 0.516, 0.236, 0.516, 0, 0, 0, 0, 0.324, 0.211, 0.324, 0.211, 0.142, 0.142, 0.142, 0.142, 0.236, 0.236, 0.236, 0.236, 0, 0, 0, 0, 0.335, 0.502, 0.335, 0.502, 0, 0, 0, 0, 0.269, 0.269, 0.269, 0.269, 0, 0, 0, 0, 0.0727, 0.0727, 0.516, 0.516, 0.516, 0.516, 1, 0.0473, 1, 0, 0, 0, 0};
+//	double polarity[61]={0.79, 0.827, 0.79, 0.827, 0.457, 0.457, 0.457, 0.457, 0.691, 0.531, 0.691, 0.531, 0.037, 0.037, 0.0988, 0.037, 0.691, 0.679, 0.691, 0.679, 0.383, 0.383, 0.383, 0.383, 0.691, 0.691, 0.691, 0.691, 0, 0, 0, 0, 0.914, 1, 0.914, 1, 0.395, 0.395, 0.395, 0.395, 0.506, 0.506, 0.506, 0.506, 0.123, 0.123, 0.123, 0.123, 0.16, 0.16, 0.531, 0.531, 0.531, 0.531, 0.0741, 0.0617, 0.0741, 0, 0, 0, 0};
+//	double molvol[61]={0.695, 0.317, 0.695, 0.317, 0.347, 0.347, 0.347, 0.347, 0.725, 0.647, 0.725, 0.647, 0.647, 0.647, 0.611, 0.647, 0.491, 0.557, 0.491, 0.557, 0.177, 0.177, 0.177, 0.177, 0.725, 0.725, 0.725, 0.725, 0.647, 0.647, 0.647, 0.647, 0.479, 0.305, 0.479, 0.305, 0.168, 0.168, 0.168, 0.168, 0, 0, 0, 0, 0.485, 0.485, 0.485, 0.485, 0.796, 0.796, 0.647, 0.647, 0.647, 0.647, 0.311, 1, 0.311, 0.647, 0.772, 0.647, 0.772};
+	assert(code != NULL);
+	for(int w=0;w<NRateCats();w++){
+		for(int i=0;i<nstates;i++){
+			for(int j=0;j<nstates;j++){
+				if(qmatLookup[i*nstates+j]==0){//if two codons are >1 appart
+					qmat[w][i][j]=0.0;
+					}
+				else{
+					qmat[w][i][j] = *stateFreqs[j];
+					if(nst == 2){
+						if(qmatLookup[i*nstates+j] & 2){//if the difference is a transition
+							qmat[w][i][j] *= *relNucRates[1];
+							}
+						}
+					else if(nst == 6){
+						if(qmatLookup[i*nstates+j] & 8) qmat[w][i][j] *= *relNucRates[0];
+						else if(qmatLookup[i*nstates+j] & 16) qmat[w][i][j] *= *relNucRates[1];
+						else if(qmatLookup[i*nstates+j] & 32) qmat[w][i][j] *= *relNucRates[2];
+						else if(qmatLookup[i*nstates+j] & 64) qmat[w][i][j] *= *relNucRates[3];
+						else if(qmatLookup[i*nstates+j] & 128) qmat[w][i][j] *= *relNucRates[4];
+						else if(qmatLookup[i*nstates+j] & 256) qmat[w][i][j] *= *relNucRates[5];
+						}
+					if(qmatLookup[i*nstates+j]&4){
+						//this is where omega or AA property stuff will go
+						//double phi=pow(abs((composition[i]-scalerC->val)/(composition[j]-scalerC->val)),Vc->val);
+						//double phi=pow(abs((polarity[i]-scalerC->val)/(polarity[j]-scalerC->val)),Vc->val);
+						//double phi=pow(exp(abs(polarity[i]-polarity[j])),Vc->val);
+						//double phi=pow(exp(abs(composition[i]-composition[j])),Vc->val);
+						//double phi=pow(1-abs(polarity[i]-polarity[j]),Vc->val);
+
+	/*
+						double compdist=abs(composition[i]-composition[j]);
+						double poldist=abs(polarity[i]-polarity[j]);
+						double voldist=abs(molvol[i]-molvol[j]);
+						
+						double comp, pol, vol;
+	*/
+						/*
+						//this is essentially Yang's geometric relationship for each distance separately
+						//there is a separate 'b' variable for each property, and a single 'a'
+						double comp=exp(-Vc->val*abs(composition[i]-composition[j]));
+						double pol=exp(-Vc->val*abs(composition[i]-composition[j]));
+						double vol=exp(-Vc->val*abs(composition[i]-composition[j]));
+						qmat[i][j] *= comp;
+						qmat[i][j] *= scalerC->val; //overall omega type thing 
+						qmat[i][j] *= pol;
+						qmat[i][j] *= vol;	
+	*/
+						int nParams = 0;
+
+						if(nParams==5){
+							//this is essentially Yang's linear relationship for each distance separately
+							//there is a separate 'b' variable for each property, and a single 'a'
+	/*						comp=(1-scalerC->val*compdist);
+							pol=(1-scalerP->val*poldist);
+							vol=(1-scalerM->val*voldist);
+							qmat[i][j] *= comp;
+
+							qmat[i][j] *= omega->val; //overall omega type thing 
+							qmat[i][j] *= pol;
+							qmat[i][j] *= vol;
+	*/						}
+
+						if(nParams==0){
+							qmat[w][i][j] *= *omegas[w]; //overall omega
+							}
+
+						if(nParams==1){
+							//raw distances with overall omega
+	/*						comp=1.0-compdist;
+							pol=1.0-poldist;
+							vol=1.0-voldist;
+							qmat[i][j] *= comp;
+							qmat[i][j] *= omega->val; //overall omega
+							qmat[i][j] *= pol;
+							qmat[i][j] *= vol;
+	*/						}
+
+						else if(nParams==4){
+							//powered distances with overall omega
+	/*						comp=pow((1.001-compdist),powerC->val-1.0);
+							pol=pow((1.001-poldist),powerP->val-1.0);
+							vol=pow((1.001-voldist),powerM->val-1.0);
+							qmat[i][j] *= comp;
+							qmat[i][j] *= omega->val; //overall omega type thing 
+							qmat[i][j] *= pol;
+							qmat[i][j] *= vol;
+	*/						}
+
+						else if(nParams==7){
+							//powered distances with scalers and overall omega
+	/*						comp=pow(1-scalerC->val * abs(composition[i]-composition[j]),powerC->val);
+							pol=pow(1-scalerP->val * abs(polarity[i]-polarity[j]),powerP->val);
+							vol=pow(1-scalerM->val * abs(molvol[i]-molvol[j]),powerM->val);
+							qmat[i][j] *= comp;
+							qmat[i][j] *= omega->val; //overall omega type thing 
+							qmat[i][j] *= pol;
+							qmat[i][j] *= vol;
+	*/						}
+					
+	/*					//raw distances with overall omega
+						double comp=1-abs(composition[i]-composition[j]);
+						double pol=1-abs(polarity[i]-polarity[j]);
+						double vol=1-abs(molvol[i]-molvol[j]);
+						qmat[i][j] *= comp;
+						qmat[i][j] *= scalerC->val; //overall omega type thing 
+						qmat[i][j] *= pol;
+						qmat[i][j] *= vol;	
+	*/
+	/*					//raw distances converted to single euclidian and not rescaled to new max, with overall omega
+						double eucdist=1 - sqrt(comp*comp + pol*pol + vol*vol);
+						if(eucdist<0){
+							eucdist=0;
+							}
+						qmat[i][j] *= eucdist;
+						qmat[i][j] *= scalerC->val; //overall omega type thing 					
+	*/
+	/*
+						//powered distances converted to a euclidian with overall omega, not rescaled
+						double comp=pow(1-abs(composition[i]-composition[j]),scalerC->val);
+						double pol=pow(1-abs(polarity[i]-polarity[j]),powerP->val);
+						double vol=pow(1-abs(molvol[i]-molvol[j]),powerM->val);
+						double eucdist=1 - sqrt((1-comp)*(1-comp) + (1-pol)*(1-pol) + (1-vol)*(1-vol));
+						qmat[i][j] *= eucdist;
+						qmat[i][j] *= Vc->val; //overall omega type thing 
+	*/					
+	/*					//powered distances converted to a euclidian with overall omega, rescaled to max
+						double comp=pow(1-abs(composition[i]-composition[j]),scalerC->val);
+						double pol=pow(1-abs(polarity[i]-polarity[j]),powerP->val);
+						double vol=pow(1-abs(molvol[i]-molvol[j]),powerM->val);
+						double eucdist=1 - (sqrt((1-comp)*(1-comp) + (1-pol)*(1-pol) + (1-vol)*(1-vol)))/sqrt(3.0);
+						qmat[i][j] *= eucdist;
+						qmat[i][j] *= Vc->val; //overall omega type thing 
+	*/
+	/*
+						//raw distances converted to single euclidian rescaled to euc max, with overall omega
+						double eucdist=1.0 - sqrt(comp*comp + pol*pol + vol*vol) / sqrt(3)); //make sure to rescale the max here
+						qmat[i][j] *= eucdist;
+						qmat[i][j] *= scalerC->val; //overall omega type thing
+	*/					
+						//raw distances with estimated weights, converted to single euclidian, with overall omega
+						//the weights are really only relative, with the composition weight fixed to 1
+	/*					//distance rescaled to new max value
+						double eucdist=sqrt(comp*comp + powerP->val*pol*pol + powerM->val*vol*vol);
+						double eucmax=sqrt(1 + powerP->val*powerP->val + powerM->val*powerM->val);
+						qmat[i][j] *= 1.0 - eucdist/eucmax;
+						qmat[i][j] *= scalerC->val; //overall omega type thing
+	*/
+	/*					//raw distances converted to single euclidian rescaled to euc max, with overall omega
+						//also with a parameter like the 'b' in Yang's linear model
+						double eucdist=1.0 - Vc->val*sqrt(comp*comp + pol*pol + vol*vol) / sqrt(3); //make sure to rescale the max here
+						if(eucdist<0) eucdist=0.0;
+						qmat[i][j] *= eucdist;
+						qmat[i][j] *= scalerC->val; //overall omega type thing
+	*/
+						//raw distances converted to single euclidian rescaled to euc max, with overall omega
+	/*					//raised to an estimated power
+						double eucdist=pow(1.0 - sqrt(comp*comp + pol*pol + vol*vol) / sqrt(3), powerP->val); //make sure to rescale the max here
+						if(eucdist<0) eucdist=0.0;
+						qmat[i][j] *= eucdist;
+						qmat[i][j] *= scalerC->val; //overall omega type thing
+	*/
+	/*
+						//alternative forumulation allowing the curve to go above 1.
+						//infers "intercept" and power
+						//double eucdist=sqrt(comp*comp + pol*pol + vol*vol) / sqrt(3.0); //make sure to rescale the max here
+						double eucdist=comp; //make sure to rescale the max here
+						eucdist=pow((1.0-(eucdist)*(eucdist-powerP->val)), scalerC->val);
+						qmat[i][j] *= eucdist;
+						qmat[i][j] *= Vc->val; //overall omega type thing
+	*/
+						//raw distances converted to single euclidian rescaled to euc max, with overall omega
+	/*					//raised to an estimated power, with a scaler (ie 'b' on the euc) <0 set to 0
+						double eucdist=1.0 - powerP->val * sqrt(comp*comp + pol*pol + vol*vol) / sqrt(3); //make sure to rescale the max here
+						if(eucdist<0){
+							eucdist=0.0;
+							}
+						eucdist=pow(eucdist, Vc->val);
+						qmat[i][j] *= eucdist;
+						qmat[i][j] *= scalerC->val; //overall omega type thing
+	*/
+						//raw distances with estimated weights, converted to single euclidian, with overall omega
+						//the weights are really only relative, with the composition weight fixed to 1
+						//distance rescaled to new max value, also with the b of Yang
+	/*					double eucdist=scalerC->val * sqrt(comp*comp + powerP->val*pol*pol + powerM->val*vol*vol);
+						double eucmax=sqrt(1 + powerP->val*powerP->val + powerM->val*powerM->val);
+						eucdist = 1.0 - eucdist/eucmax;
+						if(eucdist<0) eucdist=0.0;
+						qmat[i][j] *= eucdist;
+						qmat[i][j] *= Vc->val; //overall omega type thing
+	*/
+						//raw distances with estimated weights, converted to single euclidian, with overall omega
+						//the weights are really only relative, with the composition weight fixed to 1
+	/*					//distance rescaled to new max value, also with the b of Yang
+						double eucdist=scalerC->val * sqrt(comp*comp + powerP->val*pol*pol + powerM->val*vol*vol);
+						double eucmax=sqrt(1 + powerP->val*powerP->val + powerM->val*powerM->val);
+						eucdist=1.0 - eucdist/eucmax;
+						if(eucdist<0) eucdist=0.0;
+						eucdist = pow(eucdist, scalerP->val);
+						qmat[i][j] *= eucdist;
+						qmat[i][j] *= Vc->val; //overall omega type thing
+	*/
+						/*
+						//this is called "3propPowerDenom"
+						double comp=pow(1-(abs(composition[i]-composition[j])/(1+scalerC->val)),Vc->val);
+						double pol=pow(1-(abs(polarity[i]-polarity[j])/(1+scalerP->val)),powerP->val);
+						double vol=pow(1-(abs(molvol[i]-molvol[j])/(1+scalerM->val)),powerM->val);
+						qmat[i][j] *= comp;
+						qmat[i][j] *= pol;
+						qmat[i][j] *= vol;
+						*/
+						}
+					}
+				}
+			}
+		}
+
+	//set diags to sum rows to 0 and calculate the branch length rescaling factor
+	//note the there is really only a single rescaler, but it is stored separately 
+	//for each omega model
+	double sum, weightedDiagSum;
+	blen_multiplier[0] = 0.0;
+
+	for(int w=0;w<NRateCats();w++){
+		weightedDiagSum = 0.0;
+		for(int x=0;x<nstates;x++){
+			sum = 0.0;
+			for(int y=0;y<nstates;y++){
+				if(x!=y) sum+=qmat[w][x][y];
+				}
+			qmat[w][x][x]=-sum;
+			weightedDiagSum += sum * *stateFreqs[x];
+			}
+		blen_multiplier[0] += weightedDiagSum * *omegaProbs[w];
+		}
+	//note that although there si one blen multiplier per matrix, they are all set to the same value
+	blen_multiplier[0] = ONE_POINT_ZERO / blen_multiplier[0];
+	for(int i=1;i<NRateCats();i++)
+		blen_multiplier[i] = blen_multiplier[0];
+	}
+
+//This just duplicates what happens at the end of UpdateQmatCodon, where the total rate is summed
+//across the matrix to calc the blens scaler.  Here it sums the rates for S and NS cells separately
+//and returns a vector with (S rate sum) / ((S rate sum) + (NS rate sum)) for each w set and then
+//over all categories
+void Model::CalcSynonymousBranchlengthProportions(vector<FLOAT_TYPE> &results){
+	results.clear();
+	UpdateQMatCodon();
+
+//calc the S and NS blens separately
+	vector<double> sumS, sumNS;
+	sumS.resize(NRateCats());
+	sumNS.resize(NRateCats());	
+	double weightedSumS, weightedSumNS;
+	double tempSumS, tempSumNS;
+	for(int w=0;w<NRateCats();w++){
+		weightedSumS = weightedSumNS = 0.0;
+		for(int x=0;x<nstates;x++){
+			tempSumS = tempSumNS = 0.0;
+			for(int y=0;y<nstates;y++){
+				if(x!=y){
+					if(qmatLookup[x*nstates+y]&4)
+						tempSumNS += qmat[w][x][y];
+					else
+						tempSumS += qmat[w][x][y];
+					}
+				}
+			//qmat[w][x][x]=-sum;
+			weightedSumS += tempSumS * *stateFreqs[x];
+			weightedSumNS += tempSumNS * *stateFreqs[x];
+			}
+		sumS[w] = weightedSumS * *omegaProbs[w];
+		sumNS[w] = weightedSumNS * *omegaProbs[w];
+		results.push_back((sumS[w] / (sumS[w] + sumNS[w])));
+		}
+		
+	double totSumS = 0.0, totSumNS = 0.0;
+	for(int w=0;w<NRateCats();w++){
+		totSumS += sumS[w];
+		totSumNS += sumNS[w];
+		}
+	//verify that this all makes sense given the already calc'ed blen mults 
+	assert(FloatingPointEquals(blen_multiplier[0], (ONE_POINT_ZERO / (totSumS + totSumNS)), 1e-3));	
+	//outman.UserMessage("w = %f S = %f NS = %f, propS = %f", *omegas[0], totSumS, totSumNS, (totSumS / (totSumS + totSumNS)));
+	results.push_back(totSumS / (totSumS + totSumNS));
+	}
+
+void Model::UpdateQMatAminoAcid(){
+
+	for(int from=0;from<nstates;from++)
+		for(int to=0;to<nstates;to++)
+			qmat[0][from][to] = *stateFreqs[to];
+
+	if(modSpec->IsJonesAAMatrix()) MultiplyByJonesAAMatrix();
+	else if(modSpec->IsDayhoffAAMatrix()) MultiplyByDayhoffAAMatrix();
+	else if(modSpec->IsWAGAAMatrix()) MultiplyByWAGAAMatrix();
+	else if(modSpec->IsMtMamAAMatrix()) MultiplyByMtMamAAMatrix();
+	else if(modSpec->IsMtRevAAMatrix()) MultiplyByMtRevAAMatrix();
+	else if(modSpec->IsEstimateAAMatrix() || modSpec->IsTwoSerineRateMatrix() || modSpec->IsUserSpecifiedRateMatrix()){
+		vector<FLOAT_TYPE *>::iterator r = relNucRates.begin();
+		for(int from=0;from<nstates - 1;from++){
+			for(int to=from+1;to<nstates;to++){
+				qmat[0][from][to] *= **r;
+				r++;
+				}
+			}
+		assert(r == relNucRates.end());
+		r = relNucRates.begin();
+		for(int to=0;to<nstates - 1;to++){
+			for(int from=to+1;from<nstates;from++){
+				qmat[0][from][to] *= **r;
+				r++;
+				}
+			}
+		assert(r == relNucRates.end());
+		}
+	
+	//set diags to sum rows to 0 and calculate the branch length rescaling factor
+	double sum, weightedDiagSum = 0.0;
+	blen_multiplier[0] = 0.0;
+
+	for(int from=0;from<nstates;from++){
+		//qmat[0][from][from] = 0.0;
+		sum = 0.0;
+		for(int to=0;to<nstates;to++){
+			if(from != to) sum += qmat[0][from][to];
+			}
+		qmat[0][from][from] = -sum;
+		weightedDiagSum += sum * *stateFreqs[from];
+		}
+	blen_multiplier[0] = ONE_POINT_ZERO / weightedDiagSum;
+	}
+
+void Model::UpdateQMatNState(){
+	for(int from=0;from<nstates;from++)
+		for(int to=0;to<nstates;to++)
+			qmat[0][from][to] = *stateFreqs[to];
+
+	//set diags to sum rows to 0 and calculate the branch length rescaling factor
+	double sum, weightedDiagSum = 0.0;
+	blen_multiplier[0] = 0.0;
+
+	for(int from=0;from<nstates;from++){
+		//qmat[0][from][from] = 0.0;
+		sum = 0.0;
+		for(int to=0;to<nstates;to++){
+			if(from != to) sum += qmat[0][from][to];
+			}
+		qmat[0][from][from] = -sum;
+		weightedDiagSum += sum * *stateFreqs[from];
+		}
+	blen_multiplier[0] = ONE_POINT_ZERO / weightedDiagSum;
+	}
+
+void Model::UpdateQMatOrderedNState(){
+	for(int from=0;from<nstates;from++)
+		for(int to=0;to<nstates;to++){
+			if(abs(from - to) == 1)
+				qmat[0][from][to] = *stateFreqs[to];
+			else
+				qmat[0][from][to] = ZERO_POINT_ZERO;
+			}
+
+	//set diags to sum rows to 0 and calculate the branch length rescaling factor
+	double sum, weightedDiagSum = 0.0;
+	blen_multiplier[0] = 0.0;
+
+	for(int from=0;from<nstates;from++){
+		//qmat[0][from][from] = 0.0;
+		sum = 0.0;
+		for(int to=0;to<nstates;to++){
+			if(from != to) sum += qmat[0][from][to];
+			}
+		qmat[0][from][from] = -sum;
+		weightedDiagSum += sum * *stateFreqs[from];
+		}
+	blen_multiplier[0] = ONE_POINT_ZERO / weightedDiagSum;
+	}
+
+void Model::CalcEigenStuff(){
+	ProfCalcEigen.Start();
+	//if rate params or statefreqs have been altered, requiring the recalculation of the eigenvectors and c_ijk
+	//NOTE that the calculation of the blen_multiplier (rate matrix scaler) now occurs in UpdateQMat()
+	UpdateQMat();
+	
+	int effectiveModels = modSpec->IsNonsynonymousRateHet() ? NRateCats() : 1;
+	memcpy(**tempqmat, **qmat, effectiveModels*nstates*nstates*sizeof(MODEL_FLOAT));
+	for(int m=0;m<effectiveModels;m++){
+		EigenRealGeneral(nstates, tempqmat[m], &eigvals[m][0], eigvalsimag, eigvecs[m], iwork, work);
+
+		memcpy(*teigvecs, *eigvecs[m], nstates*nstates*sizeof(MODEL_FLOAT));
+		InvertMatrix(teigvecs, nstates, col, indx, inveigvecs[m]);
+		
+		//For codon models using this precalculation actually makes things things slower in CalcPmat (cache thrashing,
+		//I think) so don't bother doing it here.  In fact, don't even allocate it in the model
+		if(modSpec->IsCodon() == false)
+			CalcCijk(&c_ijk[m][0], nstates, (const MODEL_FLOAT**) eigvecs[m], (const MODEL_FLOAT**) inveigvecs[m]);
+		}
+
+	eigenDirty=false;
+	ProfCalcEigen.Stop();
+	}
+
+//this just copies elements from a double precision matrix into a single precision one
+void ChangeMatrixPrecision(int elements, double ***pmat, float ***fpmat){
+	for(int e=0;e<elements;e++)
+		fpmat[0][0][e] = (float) pmat[0][0][e];
+	}
+
+//usually this will be called with 2 branch lengths to caluclate two pmats, but if only one 
+//is needed the other blen with be -1
+void Model::CalcPmats(FLOAT_TYPE blen1, FLOAT_TYPE blen2, FLOAT_TYPE *&mat1, FLOAT_TYPE *&mat2){
+	ProfCalcPmat.Start();
+	if(this->modSpec->IsOrientedGap()){
+		if(!(blen1 < ZERO_POINT_ZERO)){
+			CalcOrientedGapPmat(blen1, pmat1);
+#ifdef SINGLE_PRECISION_FLOATS
+			ChangeMatrixPrecision(nstates * nstates * modSpec->numRateCats, pmat1, fpmat1);
+			mat1 = **fpmat1;
+#else
+			mat1 = **pmat1;
+#endif
+			}
+		if(!(blen2 < ZERO_POINT_ZERO)){
+			CalcOrientedGapPmat(blen2, pmat2);
+#ifdef SINGLE_PRECISION_FLOATS
+			ChangeMatrixPrecision(nstates * nstates * modSpec->numRateCats, pmat2, fpmat2);
+			mat2 = **fpmat2;
+#else
+			mat2 = **pmat2;
+#endif
+			}
+		}
+	else{
+		if(!(blen1 < ZERO_POINT_ZERO)){
+			AltCalcPmat(blen1, pmat1);
+#ifdef SINGLE_PRECISION_FLOATS
+			ChangeMatrixPrecision(nstates * nstates * modSpec->numRateCats, pmat1, fpmat1);
+			mat1 = **fpmat1;
+#else
+			mat1 = **pmat1;
+#endif
+			}
+		if(!(blen2 < ZERO_POINT_ZERO)){
+			AltCalcPmat(blen2, pmat2);
+#ifdef SINGLE_PRECISION_FLOATS
+			ChangeMatrixPrecision(nstates * nstates * modSpec->numRateCats, pmat2, fpmat2);
+			mat2 = **fpmat2;
+#else
+			mat2 = **pmat2;
+#endif
+			}
+		}
+
+/*		for(int i=0;i<nstates;i++)
+		for(int j=0;j<nstates;j++)
+			assert(FloatingPointEquals(metaPmat[i*nstates+j], pmat[0][i][j], 1e-5));
+*/
+	ProfCalcPmat.Stop();
+	return;
+	
+	}
+
+void Model::CalcOrientedGapPmat(FLOAT_TYPE blen, MODEL_FLOAT ***&mat){
+
+	//insertion proportion only figures in at scoring
+	
+	//deletion rate
+	double mu = DeleteRate();
+	//If expMu is too small, then (1 - expMu) becomes one.  This is DBL_EPSILON (2.2204460492503131e-016), 
+	//but use FLT_EPSILON (1.1920928955078125e-007) to be safe. This is reached when (mu * blen) = ~16
+	double expMu = max(exp(-mu * blen), (double) FLT_EPSILON);
+
+	//very simple pmat
+	mat[0][0][0] = 1.0;					//remain in "will be inserted state"
+	
+	//Although the insertion prob depends on the total treelength (it is blen/TL for a given branch)
+	//the TL factor can be figured in at the root.  Since the blens could be > 1.0, this opens the
+	//possibility of overflow, so reduce the blen here.  If the artificial reduction is too much
+	//the normal rescaling will kick in
+
+#ifdef ONE_BRANCH_INS_DEL
+	//10/11/10 - more changes after some thought.  Looks like we DO need to account for ins -> del
+	//on a single branch, making mat[0][2] non-zero.  Actual probs are determined via a convolution
+	//that integrate over all possible placements of ins then del on the branch.  The denominator for
+	//both still has the treelength in it, so will be taken care of at the root.  mat[0][2] will
+	//only appear for fully gap sites.  The 0.1 will be figured in again to avoid overflow.
+
+	//this full term is:
+	//mat[0][0][1] = (1.0 - expMu) / (mu * TL);
+	//but the (mu * TL) will be factored in at the root
+	mat[0][0][1] = (1.0 - expMu);
+
+	//(actually mat[0][2] is now figured in at the root, so not even used from the pmat
+	//mat[0][0][2] = (blen / TL) - (1.0 - expMu) / (mu * TL);
+
+#else
+	mat[0][0][1] = blen * 0.1;	//prob of insert, uniform along branches
+	mat[0][0][2] = 0.0;					//insert and del on same branch (should be 0?)
+#endif
+	mat[0][1][2] = 1.0 - expMu;			//deletion
+	//mat[0][1][1] = 1.0 - mat[0][1][2];	//no deletion
+	mat[0][1][1] = expMu;	//no deletion
+	mat[0][2][2] = 1.0;					//stay deleted (?)
+	
+	mat[0][1][0] = mat[0][2][0] =  mat[0][2][1] = ZERO_POINT_ZERO;
+/*
+	//earlier abandoned stuff worked out with Mark
+	mat[0][0][0] = expLam;
+	mat[0][0][1] = ((expLam - expMu) * lambda) / (mu - lambda); 
+	mat[0][0][2] = (mu - (mu * expLam) + (expMu - 1.0) * lambda) / (mu - lambda);
+	
+	mat[0][1][1] = expMu;	
+	mat[0][1][2] = 1.0 - expMu;
+	
+	mat[0][2][2] = 1.0;
+	
+	mat[0][1][0] = mat[0][2][0] =  mat[0][2][1] = ZERO_POINT_ZERO;
+*/
+	//from Rivas and Eddy
+/*
+	double psi = IndelPsi(blen);
+	double gamma = IndelGamma(blen);
+	double delProb = (1.0 - psi) * gamma;
+	//here R&E multiply by pi(j) for the base being inserted.  Not sure if I should have any
+	//value here or not.
+	double insProb = psi; //psi * 0.25;
+
+	mat[0][0][0] = ONE_POINT_ZERO - insProb;
+	mat[0][0][1] = insProb;
+	//we used to have a value here, but not sure if it is necessary when conditioning on a base making it to the present day
+	mat[0][0][2] = ZERO_POINT_ZERO;
+	
+	mat[0][1][1] = ONE_POINT_ZERO - delProb;
+	mat[0][1][2] = delProb;
+*/	
+/*
+	ofstream mats("mats.log", ios::app);
+	mats << lambda << "\t" << mu << "\t" << blen << "\t"; //endl;
+	for(int f = 0;f < 3;f++){
+		for(int t = 0;t < 3;t++){
+			mats << mat[0][f][t] << "\t";
+			}
+		//mats << endl;
+	}
+	mats << endl;
+*/
+/*	
+ //my initial attempt at this
+	int ns = 3;
+
+	//insertions 0 -> 1
+	mat[0][0][1] = 1.0 - exp(-rateI * blen);
+
+	//deletions 1 -> 2
+	mat[0][1][2] = 1.0 - exp(-rateD * blen);
+
+	//stay null 0 -> 0
+	mat[0][0][0] = 1.0 - mat[0][0][1];
+	
+	//stay inserted 1 -> 1
+	mat[0][1][1] = 1.0 - mat[0][1][2];
+
+	//stay deleted 2 -> 2
+	mat[0][2][2] = 1.0;
+
+	mat[0][0][2] = mat[0][1][0] = mat[0][2][0] =  mat[0][2][1] = ZERO_POINT_ZERO;
+*/
+/*
+	//insertions 0 -> 1
+	**mat[0 * ns + 1] = 1.0 - exp(-rateI * blen);
+
+	//deletions 1 -> 2
+	**mat[1 * ns + 2] = 1.0 - exp(-rateD * blen);
+
+	//stay null 0 -> 0
+	**mat[0 * ns + 0] = 1.0 - **mat[0 * ns + 1];
+	
+	//stay inserted 1 -> 1
+	**mat[1 * ns + 1] = 1.0 - **mat[1 * ns + 2];
+
+	//stay deleted 2 -> 2
+	**mat[2 * ns + 2] = 1.0;
+*/
+	}
+
+void Model::CalcPmat(MODEL_FLOAT blen, MODEL_FLOAT *metaPmat, bool flip /*=false*/){
+	assert(0);
+	/*
+	ProfCalcPmat.Start();
+	assert(flip == false);
+
+	//this is a bit of a hack to avoid requiring the fuction calling this one to know if 
+	//this is a nucleotide, AA or codon model
+	if(NStates() > 4){
+		if(NStates() == 20){
+			CalcPmatNState(blen, metaPmat);
+			}
+		else{
+			FLOAT_TYPE ***ptr;
+			AltCalcPmat(blen, ptr);
+			memcpy(metaPmat, **ptr, nstates*nstates*NRateCats()*sizeof(FLOAT_TYPE));
+			}
+
+		ProfCalcPmat.Stop();
+		return;
+		}
+
+	//this will be a wacky pmat calculation that combines the pmats for all of the rates
+	FLOAT_TYPE tmpFreqs[4];
+	for(int i=0;i<nstates;i++) tmpFreqs[i] = *stateFreqs[i];
+
+	for(int r=0;r<NRateCats();r++){
+		if(nst==6){
+			if(eigenDirty==true)
+				CalcEigenStuff();
+
+			FLOAT_TYPE tempblen;
+			if(NoPinvInModel()==true || modSpec->IsFlexRateHet())//if we're using flex rates, pinv should already be included
+				//in the rate normalization, and doesn't need to be figured in here
+				tempblen=(blen * blen_multiplier[0] * rateMults[r]);
+			else
+				tempblen=(blen * blen_multiplier[0] * rateMults[r]) / (ONE_POINT_ZERO-*propInvar);
+			
+			CalcPij(c_ijk[0], nstates, eigvals[0], 1, tempblen, pmat[0], EigValexp);
+			}
+		else if(nst==2 || modSpec.IsEqualStateFrequencies() == false){
+			//remember that relNucRates[1] is kappa for nst=2 models
+			FLOAT_TYPE PI, A, K=*relNucRates[1];
+			FLOAT_TYPE R=tmpFreqs[0]+tmpFreqs[2];
+			FLOAT_TYPE Y=ONE_POINT_ZERO - R;
+			blen_multiplier[0]=(ZERO_POINT_FIVE/((R*Y)+K*((tmpFreqs[0])*((tmpFreqs[2]))+(tmpFreqs[1])*((tmpFreqs[3])))));
+			FLOAT_TYPE tempblen ;
+			if(NoPinvInModel()==true || modSpec.IsFlexRateHet())//if we're using flex rates, pinv should already be included
+				//in the rate normalization, and doesn't need to be figured in here
+				tempblen=(blen * blen_multiplier[0] * rateMults[r]);
+			else
+				tempblen=(blen * blen_multiplier[0] * rateMults[r]) / (ONE_POINT_ZERO-*propInvar);
+			FLOAT_TYPE expblen=exp(-tempblen);
+
+			for(register int f=0;f<4;f++){
+				for(register int t=0;t<4;t++){	
+					if(f==t){
+						if(t==0||t==2) PI = R;
+						else PI = Y;
+						A=ONE_POINT_ZERO + PI * (K - ONE_POINT_ZERO);
+						(**pmat)[f*4+t]=(tmpFreqs[t])+(tmpFreqs[t])*((ONE_POINT_ZERO/PI)-ONE_POINT_ZERO)*expblen+((PI-(tmpFreqs[t]))/PI)*exp(-A*tempblen);
+						assert((**pmat)[f*4+t] > ZERO_POINT_ZERO);
+						assert((**pmat)[f*4+t] < ONE_POINT_ZERO);
+						}
+					else if((f+t)%2){
+						(**pmat)[f*4+t]=((tmpFreqs[t]))*(ONE_POINT_ZERO-expblen);//tranversion
+						assert((**pmat)[f*4+t] > ZERO_POINT_ZERO);
+						assert((**pmat)[f*4+t] < ONE_POINT_ZERO);
+						}
+					else{
+						if(t==0||t==2) PI=R;
+						else PI = Y;
+						A=ONE_POINT_ZERO + PI * (K - ONE_POINT_ZERO);
+						(**pmat)[f*4+t]=(tmpFreqs[t])+(tmpFreqs[t])*((ONE_POINT_ZERO/PI)-ONE_POINT_ZERO)*expblen-((tmpFreqs[t])/PI)*exp(-A*tempblen);//transition
+						assert((**pmat)[f*4+t] > ZERO_POINT_ZERO);
+						assert((**pmat)[f*4+t] < ONE_POINT_ZERO);
+						}
+					}
+				}
+			}
+		else if(nst==1){
+			blen_multiplier[0]=(FLOAT_TYPE)(4.0/3.0);
+			//	}
+			FLOAT_TYPE tempblen ;
+			if(NoPinvInModel()==true || modSpec.IsFlexRateHet())//if we're using flex rates, pinv should already be included
+				//in the rate normalization, and doesn't need to be figured in here
+				tempblen=(blen * blen_multiplier[0] * rateMults[r]);
+			else
+				tempblen=(blen * blen_multiplier[0] * rateMults[r]) / (ONE_POINT_ZERO-*propInvar);
+			FLOAT_TYPE expblen=exp(-tempblen);			
+			for(register int f=0;f<4;f++){
+				for(register int t=0;t<4;t++){
+					if(f==t)
+						(**pmat)[f*4+t]=expblen+(FLOAT_TYPE) 0.25*(ONE_POINT_ZERO-expblen);
+					else 
+						(**pmat)[f*4+t]=(FLOAT_TYPE)0.25*((ONE_POINT_ZERO)-expblen);
+					}
+				}
+			}
+	
+		if(flip==true){
+			//copy and flip the calculated pmat into the metaPmat
+			for(int i=0;i<4;i++)
+				for(int j=0;j<4;j++){
+					metaPmat[i*16+j+r*4]=pmat[0][0][i+j*4];
+					}
+			}
+		else{
+			//Copy the pmats into the metaPmat in order
+			for(int i=0;i<4;i++)
+				for(int j=0;j<4;j++){
+					metaPmat[i*4+j+r*16]=pmat[0][0][i*4+j];
+					}
+			}
+		}	
+	ProfCalcPmat.Stop();
+*/
+	}	
+
+void Model::CalcPmatNState(FLOAT_TYPE blen, MODEL_FLOAT *metaPmat){
+	assert(0);
+/*
+	if(eigenDirty==true)
+		CalcEigenStuff();
+
+	if(modSpec.IsNonsynonymousRateHet()){
+		for(int w=0;w<NRateCats();w++){
+			FLOAT_TYPE tempblen;
+			tempblen=blen * blen_multiplier[w];
+
+			CalcPij(&c_ijk[w][0], nstates, &eigvals[w][0], 1, tempblen, pmat[0], EigValexp);
+
+			//Copy the pmats into the metaPmat in order
+			for(int i=0;i<nstates;i++)
+				for(int j=0;j<nstates;j++)
+					metaPmat[w*nstates*nstates + i*nstates + j]=pmat[0][i][j];
+			}
+		}
+	else{
+		for(int r=0;r<NRateCats();r++){
+			FLOAT_TYPE tempblen;
+			if(NoPinvInModel()==true || modSpec.IsFlexRateHet())//if we're using flex rates, pinv should already be included
+				//in the rate normalization, and doesn't need to be figured in here
+				tempblen=(blen * blen_multiplier[0] * rateMults[r]);
+			else
+				tempblen=(blen * blen_multiplier[0] * rateMults[r]) / (ONE_POINT_ZERO-*propInvar);
+
+			CalcPij(c_ijk[0], nstates, eigvals[0], 1, tempblen, pmat[0], EigValexp);
+
+			//Copy the pmats into the metaPmat in order
+			for(int i=0;i<nstates;i++)
+				for(int j=0;j<nstates;j++)
+					metaPmat[r*nstates*nstates + i*nstates + j]=pmat[0][0][i*nstates + j];
+			}
+		}
+*/
+/*	char filename[50];
+	char temp[10];
+	sprintf(temp, "%.2f.log", blen);	
+	strcpy(filename, "pmatdebug");
+	strcat(filename, temp);	
+	*/
+	
+	//output pmat
+/*	ofstream pmd(filename);
+	for(int i=0;i<nstates;i++){
+		for(int j=0;j<nstates;j++){
+			pmd << p[i][j] << "\t";
+			}
+		pmd << endl;
+		}
+*/	}
+
+
+void Model::OutputPmats(ofstream &deb){
+	for(int r=0;r<NRateCats();r++){
+		deb << "pmat1 rate" << r << endl;
+		for(int f=0;f<nstates;f++){
+			for(int t=0;t<nstates;t++){
+				deb << pmat1[r][f][t] << "\t";
+				}
+			deb << endl;
+			}
+		deb << endl;
+		}
+	deb << endl;
+	for(int r=0;r<NRateCats();r++){
+		deb << "pmat2 rate" << r << endl;
+		for(int f=0;f<nstates;f++){
+			for(int t=0;t<nstates;t++){
+				deb << pmat2[r][f][t] << "\t";
+				}
+			deb << endl;
+			}
+		deb << endl;
+		}
+
+	}
+
+void Model::CalcDerivatives(FLOAT_TYPE dlen, FLOAT_TYPE ***&pr, FLOAT_TYPE ***&one, FLOAT_TYPE ***&two){
+	if(eigenDirty==true)
+		CalcEigenStuff();
+
+	for(int rate=0;rate<NRateCats();rate++){
+		const unsigned rateOffset = nstates*rate; 
+		for(int k=0; k<nstates; k++){
+			MODEL_FLOAT scaledEigVal;
+			if(modSpec->IsNonsynonymousRateHet() == false){
+				if(NoPinvInModel()==true || modSpec->IsFlexRateHet())//if we're using flex rates, pinv should already be included
+					//in the rate normalization, and doesn't need to be figured in here
+					scaledEigVal = eigvals[0][k]*rateMults[rate]*blen_multiplier[0];	
+				else
+					scaledEigVal = eigvals[0][k]*rateMults[rate]*blen_multiplier[0]/(ONE_POINT_ZERO-*propInvar);
+				}
+			else{
+				scaledEigVal = eigvals[rate][k]*blen_multiplier[rate];
+				}
+			EigValexp[k+rateOffset] = exp(scaledEigVal * dlen);
+			EigValderiv[k+rateOffset] = scaledEigVal*EigValexp[k+rateOffset];
+			EigValderiv2[k+rateOffset] = scaledEigVal*EigValderiv[k+rateOffset];
+			}
+		}
+
+	if(NStates() > 59){//using precalced eigvecs X inveigvecs (c_ijk) is less efficient for codon models, and I
+					//don't want a conditional in the inner loop
+		for(int rate=0;rate<NRateCats();rate++){
+			int model=0;
+			if(modSpec->IsNonsynonymousRateHet())
+				model = rate;
+			const unsigned rateOffset = nstates*rate;
+			for (int i = 0; i < nstates; i++){
+				for (int j = 0; j < nstates; j++){
+					MODEL_FLOAT sum_p=ZERO_POINT_ZERO;
+					MODEL_FLOAT sum_d1p=ZERO_POINT_ZERO;
+					MODEL_FLOAT sum_d2p = ZERO_POINT_ZERO;
+					for (int k = 0; k < nstates; k++){ 
+						const MODEL_FLOAT x = eigvecs[model][i][k]*inveigvecs[model][k][j];
+						sum_p   += x*EigValexp[k+rateOffset];
+						sum_d1p += x*EigValderiv[k+rateOffset];
+						sum_d2p += x*EigValderiv2[k+rateOffset];
+						}
+					pmat1[rate][i][j] = (sum_p > ZERO_POINT_ZERO ? sum_p : ZERO_POINT_ZERO);
+					deriv1[rate][i][j] = sum_d1p;
+					deriv2[rate][i][j] = sum_d2p;
+					}
+				}
+			}
+		}
+	else{ // aminoacids or nucleotides
+		for(int rate=0;rate<NRateCats();rate++){
+			const unsigned rateOffset = nstates*rate;
+			for (int i = 0; i < nstates; i++){
+				for (int j = 0; j < nstates; j++){
+					MODEL_FLOAT sum_p=ZERO_POINT_ZERO;
+					MODEL_FLOAT sum_d1p=ZERO_POINT_ZERO;
+					MODEL_FLOAT sum_d2p = ZERO_POINT_ZERO;
+					for (int k = 0; k < nstates; k++){ 
+						MODEL_FLOAT x = c_ijk[0][i*nstates*nstates + j*nstates +k];
+						sum_p   += x*EigValexp[k+rateOffset];
+						sum_d1p += x*EigValderiv[k+rateOffset];
+						sum_d2p += x*EigValderiv2[k+rateOffset];
+						}
+					pmat1[rate][i][j] = (sum_p > ZERO_POINT_ZERO ? sum_p : ZERO_POINT_ZERO);
+					deriv1[rate][i][j] = sum_d1p;
+					deriv2[rate][i][j] = sum_d2p;
+					}
+				}
+			}
+		}
+#ifdef SINGLE_PRECISION_FLOATS
+	ChangeMatrixPrecision(nstates * nstates * NRateCats(), deriv1, fderiv1);
+	ChangeMatrixPrecision(nstates * nstates * NRateCats(), deriv2, fderiv2);
+	ChangeMatrixPrecision(nstates * nstates * NRateCats(), pmat1, fpmat1);
+
+	one=fderiv1;
+	two=fderiv2;
+	pr=fpmat1;
+#else
+	one=deriv1;
+	two=deriv2;
+	pr=pmat1;
+#endif
+	}
+
+
+bool DoubleAbsLessThan(double &first, double &sec){return fabs(first) <= fabs(sec);}
+
+void Model::AltCalcPmat(FLOAT_TYPE dlen, MODEL_FLOAT ***&pmat){
+	if(eigenDirty==true)
+		CalcEigenStuff();
+
+	for(int rate=0;rate<NRateCats();rate++){
+		const unsigned rateOffset = nstates*rate; 
+		for(int k=0; k<nstates; k++){
+			MODEL_FLOAT scaledEigVal;
+			if(modSpec->IsNonsynonymousRateHet() == false){
+				if(NoPinvInModel()==true || modSpec->IsFlexRateHet())//if we're using flex rates, pinv should already be included
+					//in the rate normalization, and doesn't need to be figured in here
+					scaledEigVal = eigvals[0][k]*rateMults[rate]*blen_multiplier[0];	
+				else
+					scaledEigVal = eigvals[0][k]*rateMults[rate]*blen_multiplier[0]/(ONE_POINT_ZERO-*propInvar);
+				}
+			else{
+				scaledEigVal = eigvals[rate][k]*blen_multiplier[rate];
+				}
+			EigValexp[k+rateOffset] = exp(scaledEigVal * dlen);
+			}
+		}
+
+	if(NStates() == 20 || NStates() == 21){
+		for(int rate=0;rate<NRateCats();rate++){
+			int model=0;
+			const unsigned rateOffset = nstates*rate;
+#ifdef OPEN_MP
+#pragma omp parallel for
+#endif
+			for (int i = 0; i < nstates; i++){
+				for (int j = 0; j < nstates; j++){
+					MODEL_FLOAT sum_p=ZERO_POINT_ZERO;
+					for (int k = 0; k < nstates; k++){ 
+						const MODEL_FLOAT x = c_ijk[0][model*nstates*nstates*nstates + i*nstates*nstates + j*nstates +k];
+						sum_p   += x*EigValexp[k+rateOffset];
+						}
+					pmat[rate][i][j] = (sum_p > ZERO_POINT_ZERO ? sum_p : ZERO_POINT_ZERO);
+					}
+				}
+			}
+		}
+	else if(NStates()>59){
+		for(int rate=0;rate<NRateCats();rate++){
+			int model=0;
+			if(modSpec->IsNonsynonymousRateHet())
+				model = rate;
+			const unsigned rateOffset = nstates*rate;
+#ifdef OPEN_MP
+#pragma omp parallel for
+#endif
+			for (int i = 0; i < nstates; i++){
+				for (int j = 0; j < nstates; j++){
+					MODEL_FLOAT sum_p=ZERO_POINT_ZERO;
+					for (int k = 0; k < nstates; k++){ 
+						const MODEL_FLOAT x = eigvecs[model][i][k]*inveigvecs[model][k][j];
+						sum_p   += x*EigValexp[k+rateOffset];
+						}
+					pmat[rate][i][j] = (sum_p > ZERO_POINT_ZERO ? sum_p : ZERO_POINT_ZERO);
+
+/*					//This was an attempt to improve floating point accuracy by avoiding the summing
+					//of numbers with very different magnitudes.  It was somewhat helpful, but only
+					//necessary in odd cases and came with a horrible overhead
+					FLOAT_TYPE sum_pBig=ZERO_POINT_ZERO;
+					FLOAT_TYPE sum_pSmall=ZERO_POINT_ZERO;
+					FLOAT_TYPE sum_pBig2=ZERO_POINT_ZERO;
+					FLOAT_TYPE sum_pSmall2=ZERO_POINT_ZERO;
+					for (int k = 0; k < nstates; k++){ 
+						const FLOAT_TYPE x = eigvecs[model][i][k]*inveigvecs[model][k][j];
+					
+						if(x < ZERO_POINT_ZERO){
+							if(x < -1e-4)
+								sum_pSmall   += x*EigValexp[k+rateOffset];
+							else 
+								sum_pSmall2   += x*EigValexp[k+rateOffset];
+							}
+						else{
+							if(x > 1e-4)
+								sum_pBig   += x*EigValexp[k+rateOffset];
+							else
+								sum_pBig2   += x*EigValexp[k+rateOffset];
+							}
+						}
+//					FLOAT_TYPE tot = sum_pBig2 + sum_pSmall2; 
+//					tot += sum_pBig + sum_pSmall;
+					FLOAT_TYPE tot = sum_pBig2 + sum_pBig; 
+					tot += (sum_pSmall2 + sum_pSmall);
+					sum_p = tot;
+*/
+					}
+				}
+			}
+		}
+	else if(modSpec->IsMkTypeModel()){
+		for(int rate=0;rate<NRateCats();rate++){
+			int model=0;
+			const unsigned rateOffset = nstates*rate;
+			for (int i = 0; i < nstates; i++){
+				for (int j = 0; j < nstates; j++){
+					MODEL_FLOAT sum_p=ZERO_POINT_ZERO;
+					for (int k = 0; k < nstates; k++){ 
+						const MODEL_FLOAT x = c_ijk[0][model*nstates*nstates*nstates + i*nstates*nstates + j*nstates +k];
+						sum_p   += x*EigValexp[k+rateOffset];
+						}
+					pmat[rate][i][j] = (sum_p > ZERO_POINT_ZERO ? sum_p : ZERO_POINT_ZERO);
+					}
+				}
+			}	
+		}
+	else{
+		for(int rate=0;rate<NRateCats();rate++){
+			int model=0;
+			const unsigned rateOffset = 4*rate;
+			for (int i = 0; i < 4; i++){
+				for (int j = 0; j < 4; j++){
+					MODEL_FLOAT sum_p=ZERO_POINT_ZERO;
+					for (int k = 0; k < 4; k++){ 
+						const MODEL_FLOAT x = c_ijk[0][model*4*4*4 + i*4*4 + j*4 +k];
+						sum_p   += x*EigValexp[k+rateOffset];
+						}
+					pmat[rate][i][j] = (sum_p > ZERO_POINT_ZERO ? sum_p : ZERO_POINT_ZERO);
+					}
+				}
+			}
+		}
+	}
+
+void Model::SetDefaultModelParameters(SequenceData *data){
+	//some of these depend on having read the data already
+	//also note that this resets the values in the case of 
+	//bootstrapping.  Any of this could be overridden by
+	//values specified in a start file
+
+	for(vector<BaseParameter*>::iterator pit=paramsToMutate.begin();pit != paramsToMutate.end();pit++){
+		(*pit)->SetToDefaultValues();
+		}
+	if(modSpec->numRateCats > 1 && modSpec->IsNonsynonymousRateHet() == false){
+		if(modSpec->IsFlexRateHet()){
+			//if alpha is only being used to manipulate the flex rates, it wouldn't be reset above
+			SetAlpha(0, 0.5);
+			}
+		DiscreteGamma(rateMults, rateProbs, *alpha);
+		}
+
+    //this is a somewhat odd place to do this, but ends up making the most sense
+    if(modSpec->IsCodon()){
+        if(code == NULL)
+            SetCode(static_cast<CodonData*>(data)->GetCode());
+        }
+
+	if((modSpec->IsEqualStateFrequencies() == false && (modSpec->IsCodon() && modSpec->IsUserSpecifiedStateFrequencies()) == false && modSpec->IsPrecaledAAFreqs() == false)
+		|| (modSpec->IsF3x4StateFrequencies() || modSpec->IsF1x4StateFrequencies())){
+		//if the state freqs aren't equal, they will either start at the empirical values 
+		//or be fixed at them
+		//if using the F3x4 or F1x4 flavors, they should have already be calculated and stored in the data empirical frequency field
+		FLOAT_TYPE *f = new FLOAT_TYPE[nstates];
+		data->GetEmpiricalFreqs(f);
+		SetPis(f, false, true);
+		delete []f;
+		}
+
+	if(modSpec->includeInvariantSites==false){
+		SetPinv(ZERO_POINT_ZERO, false);
+		SetMaxPinv(ZERO_POINT_ZERO);
+		}
+	else{
+		//if there are no constant sites, warn user that Pinv should not be used
+		//if(data->NConstant() == 0) throw(ErrorException("This dataset contains no constant characters!\nInference of the proportion of invariant sites is therefore meaningless.\nPlease set invariantsites to \"none\""));
+		if(data->NConstant() == 0){
+			outman.UserMessage("This dataset contains no constant characters!\nInference of the proportion of invariant sites is therefore meaningless.\nSetting invariantsites to \"none\".");
+			outman.UserMessage("(If this is a partitioned model, you may ignore the previous message)");
+			SetPinv(ZERO_POINT_ZERO, false);
+			SetMaxPinv(ZERO_POINT_ZERO);
+			modSpec->includeInvariantSites = false;
+			}
+		else{
+			SetPinv((FLOAT_TYPE)0.25 * ((FLOAT_TYPE)data->NConstant()/(data->NConstant()+data->NInformative()+data->NVarUninform())), false);
+			SetMaxPinv((FLOAT_TYPE)data->NConstant()/(data->NConstant()+data->NInformative()+data->NVarUninform()));			
+			if(modSpec->IsFlexRateHet()) 
+				NormalizeRates();
+			else AdjustRateProportions();
+			}
+		}
+	eigenDirty = true;
+	}
+
+void Model::MutateRates(){
+	//paramsToMutate[1]->Mutator(Model::mutationShape);
+	//assert(Rates(0) == Rates(2));
+
+/*	int rateToChange=int(rnd.uniform()*(nst));
+	
+	if(rateToChange<nst-1){
+		rates[rateToChange] *= rnd.gamma( Model::mutationShape );
+//		rates[rateToChange] *= exp(MODEL_CHANGE_SCALER * (params->rnd.uniform()-.5));
+		if(rates[rateToChange]>99.9) rates[rateToChange]=99.9;
+		}
+
+	else{//if we alter the reference rate GT (fixed to 1.0)
+		//scale all of the other rates
+		//FLOAT_TYPE scaler=exp(MODEL_CHANGE_SCALER * (params->rnd.uniform()-.5));
+		FLOAT_TYPE scaler= rnd.gamma( Model::mutationShape );
+		for(int i=0;i<nst-1;i++){
+			rates[i] /= scaler;
+			}
+		}
+
+	// don't let rates[0] become greater than 99.0
+	// if this upper limit is changed, be sure to check consequences
+	// in AllocMigrantStrings function in gamlmain.C (i.e., currently
+	// only allow 3 characters plus number needed for precision)
+*/	eigenDirty=true;
+	}
+
+void Model::MutatePis(){
+	assert(0);
+	//basetest->Mutator(Model::mutationShape);
+//	paramsToMutate[0]->Mutator(Model::mutationShape);
+//	dirty=true;
+
+	//alternative:change one pi with a multiplier and rescale the rest
+/*	int piToChange=int(rnd.uniform()*4.0);
+	
+	FLOAT_TYPE newPi=pi[piToChange] * rnd.gamma( Model::mutationShape );
+	for(int b=0;b<4;b++)
+		if(b!=piToChange) pi[b] *= (1.0-newPi)/(1.0-pi[piToChange]);
+	pi[piToChange]=newPi;
+	dirty=true;
+*/	}
+/*
+void Model::MutateRateProbs(){
+	int ProbToChange=int(rnd.uniform()*(FLOAT_TYPE) NRateCats());
+	
+	FLOAT_TYPE newProb=rateProbs[ProbToChange] * rnd.gamma( Model::mutationShape / 10.0 );
+	for(int b=0;b<NRateCats();b++)
+		if(b!=ProbToChange) rateProbs[b] *= (1.0-newProb)/(1.0-rateProbs[ProbToChange]);
+	rateProbs[ProbToChange]=newProb;
+	NormalizeRates();
+	}
+
+void Model::MutateRateMults(){
+	int rateToChange=int(rnd.uniform()*NRateCats());
+	rateMults[rateToChange] *= rnd.gamma( Model::mutationShape / 10.0);
+	NormalizeRates();
+	}
+	
+void Model::MutateAlpha(){
+//	alpha *= exp(MODEL_CHANGE_SCALER * (params->rnd.uniform()-.5));
+	*alpha *=rnd.gamma( Model::mutationShape );
+	DiscreteGamma(rateMults, rateProbs, *alpha);
+	//change the proportion of rates in each gamma cat
+	}
+	
+void Model::MutatePropInvar(){
+//	propInvar *= exp(MODEL_CHANGE_SCALER * (params->rnd.uniform()-.5));
+	FLOAT_TYPE mult=rnd.gamma( Model::mutationShape );
+	if(*propInvar == maxPropInvar && (mult > 1.0)) mult=1.0/mult;
+	*propInvar *= mult;
+	*propInvar = (*propInvar > maxPropInvar ? maxPropInvar : *propInvar);
+	//change the proportion of rates in each gamma cat
+	for(int i=0;i<NRateCats();i++){
+		rateProbs[i]=(1.0-*propInvar)/NRateCats();
+		}
+	}
+*/
+void Model::CopyModel(const Model *from){
+	assert(stateFreqs[0] != NULL);
+
+	if(modSpec->IsCodon()){
+		//code = from->code;
+        if(code == NULL)
+            SetCode(from->code);
+		for(int i=0;i<omegas.size();i++)
+			*omegas[i]=*(from->omegas[i]);
+		for(int i=0;i<omegaProbs.size();i++)
+			*omegaProbs[i]=*(from->omegaProbs[i]);
+		}
+
+	//CANNOT memcpy stateFreqs and relNucRates because they are vectors of pointers, not of doubles
+
+	//Arg, had twoserine bug here.  If AA, rel rates need to be copied:
+	//1) If IsEstimateAAMatrix - matrix needs to be propagated as it changes
+	//2) If is estimated two-serine model (i.e., modSpec.IsTwoSerineRateMatrix() && !modSpec.fixRelativeRates) - as above
+
+	//THE FOLLOWING TWO ONE-TIME CASES COULD BE REMOVED FROM HERE AND ONLY CALLED DURING INITIAL CLONING, AND I LOOKED INTO
+	//THIS, BUT IT GETS NASTY AND POTENTIALLY BUGGY TO TRY IT.  THESE ARE RARE USE CASES, SO I WON'T WORRY ABOUT THE OVERHEAD,
+	//WHICH MAY BE LARGE
+	//3) If IsUserSpecifiedRateMatrix (=fixed) - Doesn't need to be copied during run since it won't be changing, but DOES need to be copied 
+										//when the initial tree is cloned into the pop, to overwrite the default parameter values
+	//This is what was missing in two serine bug:
+	//4) If is a fixed two-serine matrix (i.e., modSpec.IsTwoSerineRateMatrix() && modSpec.fixRelativeRates) - for same reason as previous,
+										//to overwrite default values
+
+	//if(modSpec.IsAminoAcid() == false || modSpec.IsEstimateAAMatrix() || (modSpec.IsTwoSerineRateMatrix() && !modSpec.fixRelativeRates) || (modSpec.IsAminoAcid() && modSpec.IsUserSpecifiedRateMatrix()))
+	if((modSpec->IsAminoAcid() == false && modSpec->IsMkTypeModel() == false && modSpec->IsOrientedGap() == false) || modSpec->IsEstimateAAMatrix() || modSpec->IsTwoSerineRateMatrix() || (modSpec->IsAminoAcid() && modSpec->IsUserSpecifiedRateMatrix()))
+		for(int i=0;i<relNucRates.size();i++)
+			*relNucRates[i]=*(from->relNucRates[i]);
+	
+	for(int i=0;i<nstates;i++)
+		*stateFreqs[i]=*(from->stateFreqs[i]);
+
+	//memcpy(pi, from->pi, sizeof(FLOAT_TYPE)*4);
+
+	memcpy(rateMults, from->rateMults, sizeof(FLOAT_TYPE)*NRateCats());
+	memcpy(rateProbs, from->rateProbs, sizeof(FLOAT_TYPE)*NRateCats());
+
+	if(modSpec->IsGammaRateHet())
+		*alpha=*(from->alpha);
+	*propInvar=*(from->propInvar);
+	maxPropInvar = from->maxPropInvar;
+
+	if(from->eigenDirty == false){
+		//copy the already calculated eigen variables, which are nontrivial to 
+		//calculate for non-nucleotide models
+		CopyEigenVariables(from);
+		eigenDirty = false;
+		}
+	else 
+		eigenDirty=true;
+
+	if(modSpec->IsOrientedGap()){
+		*insertRate = *from->insertRate;
+		*deleteRate = *from->deleteRate;
+		}
+	}	
+
+void Model::CopyEigenVariables(const Model *from){
+	int effectiveModels = modSpec->IsNonsynonymousRateHet() ? NRateCats() : 1;
+	memcpy(**qmat, **from->qmat, effectiveModels*nstates*nstates*sizeof(MODEL_FLOAT));
+	memcpy(**eigvecs, **from->eigvecs, NRateCats()*nstates*nstates*sizeof(MODEL_FLOAT));
+	memcpy(**inveigvecs, **from->inveigvecs, NRateCats()*nstates*nstates*sizeof(MODEL_FLOAT));
+	memcpy(*eigvals, *from->eigvals, effectiveModels * nstates * sizeof(MODEL_FLOAT));
+	memcpy(blen_multiplier, from->blen_multiplier, effectiveModels * sizeof(FLOAT_TYPE));
+	//c_ijk isn't allocated or used for codon models
+	if(c_ijk != NULL)
+		memcpy(*c_ijk, *from->c_ijk, effectiveModels*nstates*nstates*nstates*sizeof(MODEL_FLOAT));	
+	}
+
+void Model::SetModel(FLOAT_TYPE *model_string){
+	int slot=0;
+	for(int i=0;i<nst-1;i++)
+		*relNucRates[i]=model_string[slot++];
+	for(int j=0;j<4;j++)
+		*stateFreqs[j]=model_string[slot++];
+		
+	if(NRateCats()>1) *alpha=model_string[slot++];
+	DiscreteGamma(rateMults, rateProbs, *alpha);
+	//using whether or not this individual had a PI of >0 in the first
+	//place to decide whether we should expect one in the string.
+	//Seems safe.
+	if(*propInvar!=ZERO_POINT_ZERO) *propInvar=model_string[slot++];
+	eigenDirty=true;
+	}
+
+FLOAT_TYPE Model::TRatio() const{
+	FLOAT_TYPE numerator = *relNucRates[1] * ( *stateFreqs[0]**stateFreqs[2] + *stateFreqs[1]**stateFreqs[3] );
+	FLOAT_TYPE denominator = ( *stateFreqs[0] + *stateFreqs[2] ) * ( *stateFreqs[1] + *stateFreqs[3] );
+	return ( numerator / denominator );
+	}
+
+bool Model::IsModelEqual(const Model *other) const {
+	assert(0);
+	//this will need to be generalized if other models are introduced
+	for(int i=0;i<6;i++)
+		if(!FloatingPointEquals(*relNucRates[i], *(other->relNucRates[i]), 1e-15)) return false;
+	
+	for(int i=0;i<nstates;i++)
+		if(!FloatingPointEquals(*stateFreqs[i], *(other->stateFreqs[i]), 1e-15)) return false;
+
+	if(!modSpec->IsCodon() && NRateCats() > 1){
+		for(int i=0;i<this->NRateCats();i++){
+			if(!FloatingPointEquals(rateMults[i], other->rateMults[i], 1e-15)) return false;
+			if(!FloatingPointEquals(rateProbs[i], other->rateProbs[i], 1e-15)) return false;
+			}
+		}
+	else if(modSpec->IsCodon()){
+		for(int i=0;i<this->NRateCats();i++){
+			if(!FloatingPointEquals(Omega(i), other->Omega(i), 1e-15)) return false;
+			if(!FloatingPointEquals(OmegaProb(i), other->OmegaProb(i), 1e-15)) return false;
+			}
+		}
+
+/*
+	if(rateMults[0] != other->rateMults[0]) return false;
+	if(rateMults[1] != other->rateMults[1]) return false;
+	if(rateMults[2] != other->rateMults[2]) return false;
+	if(rateMults[3] != other->rateMults[3]) return false;
+	
+	if(rateProbs[0] != other->rateProbs[0]) return false;
+	if(rateProbs[1] != other->rateProbs[1]) return false;
+	if(rateProbs[2] != other->rateProbs[2]) return false;
+	if(rateProbs[3] != other->rateProbs[3]) return false;
+*/
+	if(alpha!=other->alpha) return false;
+	if(propInvar!=other->propInvar) return false;
+
+	
+
+	return true;
+	}
+
+//a bunch of the gamma rate het machinery
+//from MrBayes
+
+/*-------------------------------------------------------------------------------
+|                                                                               |
+|  Discretization of gamma distribution with equal proportions in each          |
+|  category.                                                                    |
+|                                                                               |
+-------------------------------------------------------------------------------*/ 
+#ifdef SINGLE_PRECISION_FLOATS
+#define POINTGAMMA(prob,alpha,beta) 		PointChi2(prob,2.0f*(alpha))/(2.0f*(beta))
+#else
+#define POINTGAMMA(prob,alpha,beta) 		PointChi2(prob,2.0*(alpha))/(2.0*(beta))
+#endif
+
+/* ------------------------------------------------------------------------------
+|                                                                               |
+|  Returns z so That Prob{x<z} = prob where x ~ N(0,1) and                      |
+|  (1e-12) < prob < 1-(1e-12).  Returns (-9999) if in error.                    |
+|                                                                               |
+|  Odeh, R. E. and J. O. Evans.  1974.  The percentage points of the normal     |
+|     distribution.  Applied Statistics, 22:96-97 (AS70)                        |
+|                                                                               |
+|  Newer methods:                                                               |
+|                                                                               |
+|  Wichura, M. J.  1988.  Algorithm AS 241: The percentage points of the        |
+|     normal distribution.  37:477-484.                                         |
+|  Beasley, JD & S. G. Springer.  1977.  Algorithm AS 111: The percentage       |
+|     points of the normal distribution.  26:118-121.                           |
+|                                                                               |
+-------------------------------------------------------------------------------*/   
+FLOAT_TYPE PointNormal (FLOAT_TYPE prob){
+#ifdef SINGLE_PRECISION_FLOATS
+	FLOAT_TYPE 		a0 = -0.322232431088f, a1 = -1.0f, a2 = -0.342242088547f, a3 = -0.0204231210245f,
+ 					a4 = -0.453642210148e-4f, b0 = 0.0993484626060f, b1 = 0.588581570495f,
+ 					b2 = 0.531103462366f, b3 = 0.103537752850f, b4 = 0.0038560700634f,
+ 					y, z = 0.0f, p = prob, p1;
+#else
+	FLOAT_TYPE 		a0 = -0.322232431088, a1 = -1.0, a2 = -0.342242088547, a3 = -0.0204231210245,
+ 					a4 = -0.453642210148e-4, b0 = 0.0993484626060, b1 = 0.588581570495,
+ 					b2 = 0.531103462366, b3 = 0.103537752850, b4 = 0.0038560700634,
+ 					y, z = 0, p = prob, p1;
+#endif
+
+	p1 = (p<ZERO_POINT_FIVE ? p : 1-p);
+	if (p1<1e-20) 
+	   return (-9999);
+	y = sqrt (log(1/(p1*p1)));   
+	z = y + ((((y*a4+a3)*y+a2)*y+a1)*y+a0) / ((((y*b4+b3)*y+b2)*y+b1)*y+b0);
+	return (p<ZERO_POINT_FIVE ? -z : z);
+
+}
+
+/*-------------------------------------------------------------------------------
+|                                                                               |
+|  Returns the incomplete gamma ratio I(x,alpha) where x is the upper           |
+|  limit of the integration and alpha is the shape parameter.  Returns (-1)     |
+|  if in error.                                                                 |
+|  LnGamma_alpha = ln(Gamma(alpha)), is almost redundant.                      |
+|  (1) series expansion     if (alpha>x || x<=1)                                |
+|  (2) continued fraction   otherwise                                           |
+|                                                                               |
+|  RATNEST FORTRAN by                                                           |
+|  Bhattacharjee, G. P.  1970.  The incomplete gamma integral.  Applied         |
+|     Statistics, 19:285-287 (AS32)                                             |
+|                                                                               |
+-------------------------------------------------------------------------------*/   
+FLOAT_TYPE IncompleteGamma (FLOAT_TYPE x, FLOAT_TYPE alpha, FLOAT_TYPE LnGamma_alpha){
+	int 			i;
+#ifdef SINGLE_PRECISION_FLOATS
+	FLOAT_TYPE 		p = alpha, g = LnGamma_alpha,
+					accurate = GARLI_FP_EPS, overflow = 1e30f,
+					factor, gin = 0.0f, rn = 0.0f, a = 0.0f, b = 0.0f, an = 0.0f, 
+					dif = 0.0f, term = 0.0f, pn[6];
+#else
+	FLOAT_TYPE 		p = alpha, g = LnGamma_alpha,
+					accurate = 1e-8, overflow = 1e30,
+					factor, gin = 0.0, rn = 0.0, a = 0.0, b = 0.0, an = 0.0, 
+					dif = 0.0, term = 0.0, pn[6];
+#endif
+
+	if (x == ZERO_POINT_ZERO) 
+		return (ZERO_POINT_ZERO);
+	if (x < 0 || p <= 0) 
+		return (-ONE_POINT_ZERO);
+
+	factor = exp(p*log(x)-x-g);   
+	if (x>1 && x>=p) 
+		goto l30;
+	gin = ONE_POINT_ZERO;  
+	term = ONE_POINT_ZERO;  
+	rn = p;
+	l20:
+		rn++;
+		term *= x/rn;   
+		gin += term;
+		if (term > accurate) 
+			goto l20;
+		gin *= factor/p;
+		goto l50;
+	l30:
+		a = ONE_POINT_ZERO-p;   
+		b = a+x+ONE_POINT_ZERO;  
+		term = ZERO_POINT_ZERO;
+		pn[0] = ONE_POINT_ZERO;  
+		pn[1] = x;  
+		pn[2] = x+1;  
+		pn[3] = x*b;
+		gin = pn[2]/pn[3];
+	l32:
+		a++;  
+		b += 2.0;  
+		term++;   
+		an = a*term;
+		for (i=0; i<2; i++) 
+			pn[i+4] = b*pn[i+2]-an*pn[i];
+		if (pn[5] == 0) 
+			goto l35;
+		rn = pn[4]/pn[5];   
+		dif = fabs(gin-rn);
+		if (dif>accurate) 
+			goto l34;
+		if (dif<=accurate*rn) 
+			goto l42;
+	l34:
+		gin = rn;
+	l35:
+		for (i=0; i<4; i++) 
+			pn[i] = pn[i+2];
+		if (fabs(pn[4]) < overflow) 
+			goto l32;
+		for (i=0; i<4; i++) 
+			pn[i] /= overflow;
+		goto l32;
+	l42:
+		gin = ONE_POINT_ZERO-factor*gin;
+	l50:
+		return (gin);
+
+}
+
+inline FLOAT_TYPE LnGamma (FLOAT_TYPE alp){
+/*	FLOAT_TYPE cof[6];
+	cof[0]=76.18009172947146;
+    cof[1]=-86.50532032941677;
+    cof[2]=24.01409824083091;
+    cof[3]=-1.231739572450155;
+    cof[4]=0.1208650973866179e-2;
+    cof[5]=-0.5395239384953e-5;	
+	FLOAT_TYPE xx=alp;
+	FLOAT_TYPE yy=alp;
+	FLOAT_TYPE tmp=xx + 5.5 - (xx + 0.5) * log(xx + 5.5);
+	FLOAT_TYPE ser = 1.000000000190015;
+	for(int j=0;j<5;j++){
+		ser += (cof[j] / ++yy);
+		}
+	return log(2.5066282746310005*ser/xx)-tmp;
+	}
+*/
+	FLOAT_TYPE x = alp, f=ZERO_POINT_ZERO, z;
+	
+	if (x < 7) 
+		{
+		f = ONE_POINT_ZERO;  
+		z = x-ONE_POINT_ZERO;
+		while (++z < 7.0)  
+			f *= z;
+		x = z;   
+		f = -log(f);
+		}
+	z = ONE_POINT_ZERO/(x*x);
+#ifdef SINGLE_PRECISION_FLOATS
+	return  (f + (x-0.5f)*log(x) - x + 0.918938533204673f + 
+			(((-0.000595238095238f*z+0.000793650793651f)*z-0.002777777777778f)*z +
+			0.083333333333333f)/x);
+#else
+	return  (f + (x-0.5)*log(x) - x + 0.918938533204673 + 
+			(((-0.000595238095238*z+0.000793650793651)*z-0.002777777777778)*z +
+			0.083333333333333)/x);
+#endif
+	}
+
+FLOAT_TYPE PointChi2 (FLOAT_TYPE prob, FLOAT_TYPE v){
+#ifdef SINGLE_PRECISION_FLOATS
+	//potential error e needs to be increased here
+	//because of lesser decimal precision of floats
+	FLOAT_TYPE 		e = 0.5e-4f, aa = 0.6931471805f, p = prob, g,
+					xx, c, ch, a = 0.0f, q = 0.0f, p1 = 0.0f, p2 = 0.0f, t = 0.0f, 
+					x = 0.0f, b = 0.0f, s1, s2, s3, s4, s5, s6;
+	if (p < 0.000002f || p > 0.999998f || v <= 0.0f) 
+		return (-1.0f);
+
+	g = LnGamma (v*ZERO_POINT_FIVE);
+	xx = v/2.0f;   
+	c = xx - ONE_POINT_ZERO;
+	if (v >= -1.24f*log(p)) 
+		goto l1;
+#else
+	FLOAT_TYPE 		e = 0.5e-6, aa = 0.6931471805, p = prob, g,
+					xx, c, ch, a = 0.0, q = 0.0, p1 = 0.0, p2 = 0.0, t = 0.0, 
+					x = 0.0, b = 0.0, s1, s2, s3, s4, s5, s6;
+	if (p < 0.000002 || p > 0.999998 || v <= 0.0) 
+		return (-ONE_POINT_ZERO);
+	
+	g = LnGamma (v*ZERO_POINT_FIVE);
+	xx = v/2.0;   
+	c = xx - ONE_POINT_ZERO;
+	if (v >= -1.24*log(p)) 
+		goto l1;
+#endif
+
+	ch = pow((p*xx*exp(g+xx*aa)), ONE_POINT_ZERO/xx);
+	if (ch-e < ZERO_POINT_ZERO) 
+		return (ch);
+	goto l4;
+#ifdef SINGLE_PRECISION_FLOATS
+	l1:
+		if (v > 0.32f) 
+			goto l3;
+		ch = 0.4f;
+		a = log(ONE_POINT_ZERO-p);
+	l2:
+		q = ch;  
+		p1 = ONE_POINT_ZERO+ch*(4.67f+ch);  
+		p2 = ch*(6.73f+ch*(6.66f+ch));
+		t = -0.5f+(4.67f+2.0f*ch)/p1 - (6.73f+ch*(13.32f+3.0f*ch))/p2;
+		ch -= (ONE_POINT_ZERO-exp(a+g+0.5f*ch+c*aa)*p2/p1)/t;
+		if (fabs(q/ch-ONE_POINT_ZERO)-0.01f <= ZERO_POINT_ZERO) 
+			goto l4;
+		else                       
+			goto l2;
+	l3: 
+		x = PointNormal (p);
+		p1 =  0.222222f/v;   
+		ch = v*pow((x*sqrt(p1)+ONE_POINT_ZERO-p1), 3.0f);
+		if (ch > 2.2f*v+6.0f)  
+			ch =  -2.0f*(log(ONE_POINT_ZERO-p)-c*log(0.5f*ch)+g);
+#else
+	l1:
+		if (v > 0.32) 
+			goto l3;
+		ch = 0.4;
+		a = log(ONE_POINT_ZERO-p);
+	l2:
+		q = ch;  
+		p1 = ONE_POINT_ZERO+ch*(4.67+ch);  
+		p2 = ch*(6.73+ch*(6.66+ch));
+		t = -0.5+(4.67+2.0*ch)/p1 - (6.73+ch*(13.32+3.0*ch))/p2;
+		ch -= (ONE_POINT_ZERO-exp(a+g+0.5*ch+c*aa)*p2/p1)/t;
+		if (fabs(q/ch-ONE_POINT_ZERO)-0.01 <= ZERO_POINT_ZERO) 
+			goto l4;
+		else                       
+			goto l2;
+	l3: 
+		x = PointNormal (p);
+		p1 =  0.222222/v;   
+		ch = v*pow((x*sqrt(p1)+ONE_POINT_ZERO-p1), 3.0);
+		if (ch > 2.2*v+6.0)  
+			ch =  -2.0*(log(ONE_POINT_ZERO-p)-c*log(0.5*ch)+g);
+#endif
+	l4:
+		q = ch;
+		p1 = ZERO_POINT_FIVE*ch;
+		if ((t = IncompleteGamma (p1, xx, g)) < ZERO_POINT_ZERO) 
+			{
+			printf ("\nerr IncompleteGamma");
+			return (-ONE_POINT_ZERO);
+			}
+		p2 = p-t;
+		t = p2*exp(xx*aa+g+p1-c*log(ch));   
+		b = t/ch;
+#ifdef SINGLE_PRECISION_FLOATS
+		a = 0.5f*t-b*c;
+		s1 = (210.0f+a*(140.0f+a*(105.0f+a*(84.0f+a*(70.0f+60.0f*a))))) / 420.0f;
+		s2 = (420.0f+a*(735.0f+a*(966.0f+a*(1141.0f+1278.0f*a))))/2520.0f;
+		s3 = (210.0f+a*(462.0f+a*(707.0f+932.0f*a)))/2520.0f;
+		s4 = (252.0f+a*(672.0f+1182.0f*a)+c*(294.0f+a*(889.0f+1740.0f*a)))/5040.0f;
+		s5 = (84.0f+264.0f*a+c*(175.0f+606.0f*a))/2520.0f;
+		s6 = (120.0f+c*(346.0f+127.0f*c))/5040.0f;
+		ch += t*(1+0.5f*t*s1-b*c*(s1-b*(s2-b*(s3-b*(s4-b*(s5-b*s6))))));
+#else
+		a = 0.5*t-b*c;
+		s1 = (210.0+a*(140.0+a*(105.0+a*(84.0+a*(70.0+60.0*a))))) / 420.0;
+		s2 = (420.0+a*(735.0+a*(966.0+a*(1141.0+1278.0*a))))/2520.0;
+		s3 = (210.0+a*(462.0+a*(707.0+932.0*a)))/2520.0;
+		s4 = (252.0+a*(672.0+1182.0*a)+c*(294.0+a*(889.0+1740.0*a)))/5040.0;
+		s5 = (84.0+264.0*a+c*(175.0+606.0*a))/2520.0;
+		s6 = (120.0+c*(346.0+127.0*c))/5040.0;
+		ch += t*(1+0.5*t*s1-b*c*(s1-b*(s2-b*(s3-b*(s4-b*(s5-b*s6))))));
+#endif
+		if (fabs(q/ch-ONE_POINT_ZERO) > e) 
+			goto l4;
+		return (ch);
+
+}
+
+//function taken from MB and hard wired for use here	
+void Model::DiscreteGamma(FLOAT_TYPE *rates, FLOAT_TYPE *props, FLOAT_TYPE shape){
+	bool median=false;
+	int 	i;
+	FLOAT_TYPE 	gap05 = ZERO_POINT_FIVE/NRateCats(), t, factor = shape/shape*NRateCats(), lnga1;
+
+	if (median){
+		for (i=0; i<NRateCats(); i++) 
+			rates[i] = POINTGAMMA((i/ZERO_POINT_FIVE+ONE_POINT_ZERO)*gap05, shape, shape);
+		for (i=0,t=0; i<NRateCats(); i++) 
+			t += rates[i];
+		for (i=0; i<NRateCats(); i++)     
+			rates[i] *= factor/t;
+		}
+	else {
+		lnga1 = LnGamma(shape+1);
+		
+		//DZ HACK
+		//I don't think that these lines are needed, since the frequencies are fixed at .25 anyway.
+		for (i=0; i<NRateCats()-1; i++) 
+			props[i] = POINTGAMMA((i+ONE_POINT_ZERO)/NRateCats(), shape, shape);
+		for (i=0; i<NRateCats()-1; i++) 
+			props[i] = IncompleteGamma(props[i]*shape, shape+1, lnga1);
+		
+		
+		rates[0] = props[0]*factor;
+		rates[NRateCats()-1] = (1-props[NRateCats()-2])*factor;
+		for (i=1; i<NRateCats()-1; i++)  
+			rates[i] = (props[i]-props[i-1])*factor;
+		}
+	for (i=0; i<NRateCats(); i++) 
+		props[i]=(ONE_POINT_ZERO-*propInvar)/NRateCats();
+	}	
+	
+void Model::OutputPaupBlockForModel(ofstream &outf, const char *treefname) const{
+	assert(modSpec->IsNucleotide());
+	outf << "begin paup;\nclear;\ngett file=" << treefname << " storebr;\nlset userbr ";
+	if(nst == 2) outf << "nst=2 trat= " << TRatio();
+	else if(nst == 1) outf << "nst=1 ";
+	else{
+		if(modSpec->IsArbitraryRateMatrix()) outf << "nst=6 rclass=" << modSpec->arbitraryRateMatrixString.c_str() << " rmat=(" << Rates(0) << " " << Rates(1) << " " << Rates(2) << " " << Rates(3) << " " << Rates(4) << ")";
+		else outf << "nst=6 rmat=(" << Rates(0) << " " << Rates(1) << " " << Rates(2) << " " << Rates(3) << " " << Rates(4) << ")";
+		}
+	
+	if(modSpec->IsEqualStateFrequencies() == true) outf << " base=eq ";
+	else if(modSpec->IsEmpiricalStateFrequencies() == true) outf << " base=emp ";
+	else outf << " base=(" << StateFreq(0) << " " << StateFreq(1) << " " << StateFreq(2) << ")";
+	
+	if(modSpec->IsFlexRateHet() == false){
+		if(NRateCats()>1) outf << " rates=gamma shape= " << Alpha() << " ncat=" << NRateCats();
+		else outf << " rates=equal";
+		outf << " pinv= " << PropInvar();
+		outf << ";\nend;\n";
+		}
+	else{
+		outf << " pinv= " << PropInvar();
+		outf << " [FLEX RATES:\t";
+		for(int i=0;i<NRateCats();i++){
+			outf << rateMults[i] << "\t";
+			outf << rateProbs[i] << "\t";
+			}
+		outf << "];\nend;\n";
+		outf << "[!THIS TREE INFERRED UNDER FLEX RATE MODEL WITH GARLI.\nNO COMPARABLE MODEL IS AVAILABLE IN PAUP!]" << endl;
+		}
+	}
+
+void Model::FillPaupBlockStringForModel(string &str, const char *treefname) const{
+	char temp[200];
+	sprintf(temp, "begin paup;\nclear;\ngett file=%s storebr;\nlset userbr ", treefname);
+	str += temp;
+	if(nst == 2){
+		sprintf(temp, "nst=2 trat=%f ", TRatio());
+		str += temp;
+		}
+	else if(nst == 1) str += "nst=1 ";
+	else{
+		if(modSpec->IsArbitraryRateMatrix())
+			sprintf(temp,"nst=6 rclass=%s rmat=(%f %f %f %f %f)", modSpec->arbitraryRateMatrixString.c_str(), Rates(0), Rates(1), Rates(2), Rates(3), Rates(4));
+		else
+			sprintf(temp,"nst=6 rmat=(%f %f %f %f %f)", Rates(0), Rates(1), Rates(2), Rates(3), Rates(4));
+		str += temp;
+		}
+	if(modSpec->IsEqualStateFrequencies()) str +=" base=eq ";
+	else if(modSpec->IsEmpiricalStateFrequencies()) str += " base=emp ";
+	else{
+		sprintf(temp," base=( %f %f %f)", StateFreq(0), StateFreq(1), StateFreq(2));
+		str += temp;
+		}
+
+	if(modSpec->IsFlexRateHet()==false){
+		if(NRateCats()>1){
+			sprintf(temp, " rates=gamma shape=%f ncat=%d", Alpha(), NRateCats());
+			str += temp;
+			}
+		else str += " rates=equal";
+		sprintf(temp, " pinv=%f;\nend;\n", PropInvar());;
+		str += temp;
+		}
+	else{
+		sprintf(temp, " pinv=%f  [FLEX RATES:\t", PropInvar());
+		str += temp;
+		for(int i=0;i<NRateCats();i++){
+			sprintf(temp, "%f\t%f\t", rateMults[i], rateProbs[i]);
+			str += temp;
+			}
+		str += "];\nend;\n[!THIS TREE INFERRED UNDER FLEX RATE MODEL WITH GARLI.\nNO COMPARABLE MODEL IS AVAILABLE IN PAUP!]\n";
+		}
+	}
+
+void Model::OutputGarliFormattedModel(ostream &outf) const{
+	//no reason to have different versions of the same thing, so just use the fill string function
+	string s;
+	FillGarliFormattedModelString(s);
+	outf << s.c_str();
+	return;
+/*
+	if(modSpec.IsCodon()){
+		outf << "o ";
+		for(int i=0;i<omegas.size();i++){
+			outf << *omegas[i] << " " << *omegaProbs[i] << " ";
+			}
+		}
+
+	if(modSpec->IsNucleotide() || modSpec->IsCodon())
+		outf << " r " << Rates(0) << " " << Rates(1) << " " << Rates(2) << " " << Rates(3) << " " << Rates(4);
+	outf << " e " ;
+	for(int i=0;i<nstates;i++)
+		outf << StateFreq(i) << " ";;
+	
+	if(modSpec->IsFlexRateHet()){
+		outf << " f ";
+		for(int i=0;i<NRateCats();i++){
+			outf << " " << rateMults[i] << "\t";
+			outf << rateProbs[i] << "\t";
+			}
+		}
+	else{
+		if(NRateCats()>1 && modSpec->IsNonsynonymousRateHet() == false) outf << " a " << Alpha();
+		}
+	if(PropInvar()!=ZERO_POINT_ZERO) outf << " p " << PropInvar();
+	outf << " ";
+*/	}
+
+void Model::FillModelOrHeaderStringForTable(string &s, bool model) const{	
+	s.clear();
+	char cStr[500];
+	if(modSpec->IsCodon()){
+		for(int i=0;i<omegas.size();i++){
+			if(model){
+				sprintf(cStr," %5.3f %5.3f", *omegas[i], *omegaProbs[i]);
+				s += cStr;
+				}
+			else{
+				char oStr[50];
+				sprintf(oStr, "w(%d)", i);
+				sprintf(cStr," %5s", oStr);
+				s += cStr;
+				sprintf(oStr, "p(%d)", i);
+				sprintf(cStr," %5s", oStr);
+				s += cStr;
+				}
+			}
+		}
+	if(modSpec->IsNucleotide() || modSpec->IsCodon() || modSpec->IsEstimateAAMatrix() || modSpec->IsTwoSerineRateMatrix()){
+		if(model){
+			//sprintf(cStr, " %5.2f %5.2f %5.2f %5.2f %5.2f %5.2f", Rates(0), Rates(1), Rates(2), Rates(3), Rates(4), 1.0);
+			for(int st = 0;st < relNucRates.size();st++){
+				sprintf(cStr," %6.4g", Rates(st));
+				s += cStr;
+				}
+			}
+		else{
+			string states;
+			//Z is second serine type
+			if(modSpec->IsAminoAcid())
+				states="ACDEFGHIKLMNPQRSTVWYZ";
+			else
+				states="ACGT";
+			char rStr[50];
+			for(int from=0;from<(modSpec->IsCodon() ? 4 - 1 : NStates() - 1);from++){
+				for(int to=from+1;to<(modSpec->IsCodon() ? 4 : NStates());to++){
+					sprintf(rStr, "r(%c%c)", states[from], states[to]);
+					sprintf(cStr," %6s", rStr);
+					s += cStr;
+					}
+				}
+/*
+			char rStr[50];
+			sprintf(rStr, "r(AC)");
+			sprintf(cStr," %5s", rStr);
+			s += cStr;
+			sprintf(rStr, "r(AG)");
+			sprintf(cStr," %5s", rStr);
+			s += cStr;
+			sprintf(rStr, "r(AT)");
+			sprintf(cStr," %5s", rStr);
+			s += cStr;
+			sprintf(rStr, "r(CG)");
+			sprintf(cStr," %5s", rStr);
+			s += cStr;
+			sprintf(rStr, "r(CT)");
+			sprintf(cStr," %5s", rStr);
+			s += cStr;
+			sprintf(rStr, "r(GT)");
+			sprintf(cStr," %5s", rStr);
+			s += cStr;
+*/			}
+			}
+/*	if(modSpec.IsNucleotide()){
+		if(model){
+			sprintf(cStr," %5.3f %5.3f %5.3f %5.3f ", StateFreq(0), StateFreq(1), StateFreq(2), StateFreq(3));
+			s += cStr;
+			}
+		else{
+			char pStr[50];
+			sprintf(pStr, "pi(A)");
+			sprintf(cStr,"%5s ", pStr);
+			s += cStr;
+			sprintf(pStr, "pi(C)");
+			sprintf(cStr,"%5s ", pStr);
+			s += cStr;
+			sprintf(pStr, "pi(G)");
+			sprintf(cStr,"%5s ", pStr);
+			s += cStr;
+			sprintf(pStr, "pi(T)");
+			sprintf(cStr,"%5s ", pStr);
+			s += cStr;
+			}
+		}
+*/	//else if(modSpec.IsAminoAcid()){
+		if(modSpec->IsNucleotide() || (modSpec->IsAminoAcid() && (modSpec->fixStateFreqs == false && modSpec->IsEqualStateFrequencies() == false && modSpec->IsEmpiricalStateFrequencies() == false))){
+			if(model){
+				for(int st = 0;st < stateFreqs.size();st++){
+					sprintf(cStr," %5.3f", StateFreq(st));
+					s += cStr;
+					}
+				}
+			else{
+				char pStr[50];
+				string states;
+				//Z is extra serine, and won't be shown in normal models because there are only 20 AA's
+				if(modSpec->IsAminoAcid())
+					states="ACDEFGHIKLMNPQRSTVWYZ";
+				else
+					states="ACGT";
+				for(int st = 0;st < stateFreqs.size();st++){
+					sprintf(pStr,"pi(%c)", states[st]);
+					sprintf(cStr," %5s", pStr);
+					s += cStr;
+					}
+				}
+			}
+
+	if(modSpec->IsFlexRateHet()){
+		for(int i=0;i<NRateCats();i++){
+			if(model){
+				sprintf(cStr, " %5.3f %5.3f", rateMults[i], rateProbs[i]);
+				s += cStr;
+				}
+			else{
+				char fStr[50];
+				sprintf(fStr, "fr(%d)", i);
+				sprintf(cStr," %5s", fStr);
+				s += cStr;
+				sprintf(fStr, "p(%d)", i);
+				sprintf(cStr," %5s", fStr);
+				s += cStr;
+				}
+			}
+		}
+	else{
+		if(modSpec->IsGammaRateHet()){
+			if(model)
+				sprintf(cStr, " %5.3f", Alpha());
+			else{
+				sprintf(cStr, " %5s", "alpha");
+				}
+			s += cStr;
+			}
+		}
+	if(PropInvar()!=ZERO_POINT_ZERO){
+		if(model)
+			sprintf(cStr, " %5.3f", PropInvar());
+		else{
+			sprintf(cStr, " %5s", "pinv");
+			}
+		s += cStr;
+		}
+	if(modSpec->IsOrientedGap()){
+		if(model)
+			sprintf(cStr, " %5.3f %5.3f", *insertRate, *deleteRate);
+		else{
+			sprintf(cStr, " %5s %5s", "ins", "del");
+			}
+		s += cStr;
+		}
+	}
+
+void Model::OutputAminoAcidRMatrixMessage(ostream &out){
+	out << "Estimated AA rate matrices:" << endl;;
+	out << "NOTE THAT THIS FUNCTION IS FAIRLY EXPERIMENTAL, SO CHECK YOUR OUTPUT AND LET ME KNOW OF ANY PROBLEMS\n" << endl;;
+	out << "GARLI's order of AA's is alphabetically BY SINGLE LETTER CODE, i.e.:\n ACDEFGHIKLMNPQRSTVWY" << endl;
+	out << "The correspondence with the 3-letter codes and full names is this:" << endl;
+
+	out << "A\tAla\tAlanine\nC\tCys\tCysteine\nD\tAsp\tAspartic Acid\nE\tGlu\tGlutamic Acid\nF\tPhe\tPhenylalanine\nG\tGly\tGlycine\nH\tHis\tHistidine\n";
+	out << "I\tIle\tIsoleucine\nK\tLys\tLysine\nL\tLeu\tLeucine\nM\tMet\tMethionine\nN\tAsn\tAsparagine\nP\tPro\tProline\nQ\tGln\tGlutamine\nR\tArg\tArginine\n";
+	out << "S\tSer\tSerine\nT\tThr\tThreonine\nV\tVal\tValine\nW\tTrp\tTryptophan\nY\tTyr\tTyrosine\n" << endl;
+
+	out << "Unfortunately, I beleive that GARLI, PAML, and MrBayes all have different orderings of the amino acids.  PAML" << endl;
+	out << "is alphabetical by three-letter code, MrBayes is alphabetical by full name (same as PAML, but swap Gln and Glu), GARLI" << endl;
+	out << "is alphabetical by single letter code.  Additionally, I believe that PAML takes the below diagonal matrix as input,"<< endl;
+	out << "while GARLI and MrBayes take the upper." << endl;
+	out << "I COULD BE WRONG ABOUT THIS, AND YOU SHOULD VERIFY THAT THE ABOVE FACTS ARE TRUE BEFORE USING THE BELOW MATRICES" << endl;
+	out << "IN ANOTHER PROGRAM" << endl;
+	
+	out << "Following are the matrix inferred by GARLI in GARLI's order, then the same matrices ordered by the other systems" << endl;
+	out << "described above.  Both the above and below diagonal versions appear for each." << endl;
+
+	out << "The entries are scaled such that the mean rate is 100.  It can be rescaled by any constant factor without" << endl;
+	out << "changing its meaning. Entries on the diagonal are all zero." << endl;
+	out << "\nThe ABOVE diagonal SINGLE LETTER order is what would be fed back into GARLI as a starting condition to use this matrix" << endl;
+	out << "in future analyses.  Here is a GARLI block that could be used to do this.  The values could be fixed for further analyses" << endl;
+	out << "by setting \"ratematrix = fixed\" in the configuration file, or it could be used as starting values for another run estimating" << endl;
+	out << "the full matrix by leaving \"ratematrix = estimate\".  The block itself could be put in the same file as a NEXUS" << endl;
+	out << "data matrix, or put in a file (which must start with #NEXUS) specified on the streefname line of the configuarion file.\n" << endl;
+	}
+
+void Model::OutputAminoAcidRMatrixArray(ostream &out, int modNum, int treeNum){
+	//assert(el.size() == 400);
+	//first make a full 20x20 matrix
+	assert(modSpec->IsAminoAcid());
+	vector<FLOAT_TYPE> el(nstates * nstates, ZERO_POINT_ZERO);
+	vector<FLOAT_TYPE *>::iterator r = relNucRates.begin();
+	FLOAT_TYPE tot = ZERO_POINT_ZERO;
+	for(int from=0;from<nstates;from++){
+		for(int to=from;to<nstates;to++){
+			if(from == to)
+				el[from * nstates + to] = 0.0;
+			else{
+				el[from * nstates + to] = **r;
+				el[to * nstates + from] = **r;
+				tot += **r;
+				r++;
+				}
+			}
+		}
+	assert(r == relNucRates.end());
+	char str[100];
+
+	out << "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" << endl;
+	out << "begin garli;" << endl;
+	out << "[Search replicate " << treeNum + 1 << " Model subset " << modNum + 1 << " ]" << endl;
+	out << "[this specifies an amino acid rate matrix, with AA's ordered alphabetically by SINGLE LETTER CODE]" << endl;
+	out << "[it is the above diagonal portion of the matrix, in order across each row]" << endl;
+	if(modSpec->fixStateFreqs == false && modSpec->IsEqualStateFrequencies() == false && modSpec->IsEmpiricalStateFrequencies() == false)
+		out << "[below the rate matrix is a line begining with \"e\" that specifies the estimated AA frequencies in GARLI format]" << endl;
+
+	out << "M" << modNum+1 << " r ";
+	
+	FLOAT_TYPE scaleTo = 100.0 * ((nstates * nstates) - nstates)/2.0;
+
+	for(int from=0;from<nstates - 1;from++){
+		for(int to=from+1;to<nstates;to++){
+			sprintf(str, "%.5g", (el[from * nstates + to] * (scaleTo/tot)));
+			out << str << " ";
+			}
+		if(modSpec->fixStateFreqs == false && modSpec->IsEqualStateFrequencies() == false && modSpec->IsEmpiricalStateFrequencies() == false){
+			out << "\ne ";
+			for(int st = 0;st < nstates;st++)
+				out << StateFreq(st) << " ";
+			}
+		}
+	out << ";\nend;\n" << endl;
+
+	//21st state is extra serine
+	int corThree[21] = {0, 14, 11, 2, 1, 13, 3, 5, 6, 7, 9, 8, 10, 4, 12, 15, 16, 18, 19, 17, 20};
+	int corFull[21] =  {0, 14, 11, 2, 1, 3, 13, 5, 6, 7, 9, 8, 10, 4, 12, 15, 16, 18, 19, 17, 20};
+
+	out << "This is the SINGLE LETTER order (GARLI), above diagonal matrix\n" << endl;
+	out << "(this is what appears in the above GARLI block)\n";
+	for(int from=0;from<nstates - 1;from++){
+		for(int to=0;to<nstates;to++){
+			if(to <= from)
+				out << "\t";
+			else{
+				sprintf(str, "%.5g", (el[from * nstates + to] * (scaleTo/tot)));
+				out << str;
+				if(to != from -1)
+					out << "\t";
+				}
+			}
+		out << endl;
+		}
+	out << endl;
+
+	out << "\nThis is the SINGLE LETTER order (GARLI) below diagonal matrix\n" << endl;
+
+	for(int from=1;from<nstates;from++){
+		for(int to=0;to<from;to++){
+			sprintf(str, "%.5g", (el[from * nstates + to] * (scaleTo/tot)));
+			out << str;
+			if(to != from -1)
+				out << "\t";
+			}
+		out << endl;
+		}
+	out << endl;
+
+	out << "This is the THREE LETTER code order (PAML) above diagonal matrix\n" << endl;
+	//above diagonal
+	for(int from=0;from<nstates - 1;from++){
+		for(int to=0;to<nstates;to++){
+			if(to <= from)
+				out << "\t";
+			else{
+				sprintf(str, "%.5g", (el[corThree[from] * nstates + corThree[to]] * (scaleTo/tot)));
+				out << str;
+				if(to != from -1)
+					out << "\t";
+				}
+			}
+		out << endl;
+		}
+	out << endl;
+
+	out << "\nThis is the THREE LETTER order (PAML), below diagonal matrix\n" << endl;
+
+	for(int from=1;from<nstates;from++){
+		for(int to=0;to<from;to++){
+			sprintf(str, "%.5g", (el[corThree[from] * nstates + corThree[to]] * (scaleTo/tot)));
+			out << str;
+			if(to != from -1)
+				out << "\t";
+			}
+		out << endl;
+		}
+	out << endl;
+
+	out << "This is the FULL NAME code order (MrBayes) above diagonal matrix\n" << endl;
+	//above diagonal
+	for(int from=0;from<nstates - 1;from++){
+		for(int to=0;to<nstates;to++){
+			if(to <= from)
+				out << "\t";
+			else{
+				sprintf(str, "%.5g", (el[corFull[from] * nstates + corFull[to]] * (scaleTo/tot)));
+				out << str;
+				if(to != from -1)
+					out << "\t";
+				}
+			}
+		out << endl;
+		}
+	out << endl;
+
+	out << "\nThis is the FULL NAME order (MrBayes), below diagonal matrix\n" << endl;
+
+	for(int from=1;from<nstates;from++){
+		for(int to=0;to<from;to++){
+			sprintf(str, "%.5g", (el[corFull[from] * nstates + corFull[to]] * (scaleTo/tot)));
+			out << str;
+			if(to != from -1)
+				out << "\t";
+			}
+		out << endl;
+		}
+	out << endl;
+
+	
+	out << "These are AA frequencies that were used, which may have been estimated or not." << endl;
+	//Z is the extra serine
+	string states="ACDEFGHIKLMNPQRSTVWYZ";
+	out << "Single letter order" << endl;
+	out.precision(5); 
+	for(int st = 0;st < stateFreqs.size();st++){
+		out << states[st] << "\t";
+		}
+	out << endl;
+	for(int st = 0;st < stateFreqs.size();st++){
+		out << StateFreq(st) << "\t";
+		}
+	out << endl;
+	out << "Three letter order" << endl;
+	for(int st = 0;st < stateFreqs.size();st++){
+		out << StateFreq(corThree[st]) << "\t";
+		}
+	out << endl;
+	out << "Full name order" << endl;
+	for(int st = 0;st < stateFreqs.size();st++){
+		out << StateFreq(corFull[st]) << "\t";
+		}
+	out << endl;
+	}
+
+void Model::OutputHumanReadableModelReportWithParams() const{
+	//Report on the model setup and parameter values - like a beefed up version of Population::ModelReport
+	if(modSpec->IsCodon()){
+		if(modSpec->IsVertMitoCode()) outman.UserMessage("  Number of states = 60 (codon data, vertebrate mitochondrial code)");
+		else if(modSpec->IsInvertMitoCode()) outman.UserMessage("  Number of states = 62 (codon data, invertebrate mitochondrial code)");
+		else outman.UserMessage("  Number of states = 61 (codon data, standard code)");
+		}
+	else if(modSpec->IsAminoAcid()){
+		if(modSpec->nstates == 20)
+			outman.UserMessage("  Number of states = 20 (amino acid data)");
+		else if(modSpec->nstates == 21)
+			outman.UserMessage("  Number of states = 21 (amino acid data, experimental matrix with two serine types)");
+		}
+	else if(modSpec->IsNState() || modSpec->IsNStateV())
+		outman.UserMessage("  Number of states = %d (standard data)", nstates);
+	else if(modSpec->IsOrderedNState() || modSpec->IsOrderedNStateV())
+		outman.UserMessage("  Number of states = %d (ordered standard data)", nstates);
+	else if(modSpec->IsBinary() || modSpec->IsBinaryNotAllZeros())
+		outman.UserMessage("  Number of states = 2 (binary data)");
+	else if(modSpec->IsOrientedGap())
+		outman.UserMessage("  Number of states = 2 (0/1 coding of gaps)");
+	else
+		outman.UserMessage("  Number of states = 4 (nucleotide data)");
+	
+	if(modSpec->IsNucleotide() || modSpec->IsCodon()){
+		if(modSpec->IsCodon() && modSpec->numRateCats == 1){ 
+			if(!modSpec->fixOmega)
+				outman.UserMessageNoCR("  One estimated dN/dS ratio (aka omega) = %f\n", Omega(0));
+			else
+				outman.UserMessageNoCR("  One dN/dS ratio (aka omega).\n    Value provided by user (fixed) = %f\n", Omega(0));
+			}
+		if(modSpec->IsCodon()) 
+			outman.UserMessageNoCR("  Nucleotide Relative Rate Matrix Assumed by Codon Model: ");
+		else outman.UserMessageNoCR("  Nucleotide Relative Rate Matrix: ");
+		if(nst == 6){
+			if(modSpec->IsArbitraryRateMatrix()) outman.UserMessage("\n    User specified matrix type: %s ", modSpec->arbitraryRateMatrixString.c_str());
+			else outman.UserMessage("    6 rates ");
+			if(modSpec->fixRelativeRates == true) outman.UserMessage("    Values specified by user (fixed)");
+			//else outman.UserMessage("");
+			outman.UserMessage("    AC = %.3f, AG = %.3f, AT = %.3f, CG = %.3f, CT = %.3f, GT = %.3f", Rates(0), Rates(1), Rates(2), Rates(3), Rates(4), 1.0);
+			}
+		else if(nst == 2){
+			outman.UserMessageNoCR("    2 rates (transition and transversion) K param = %.4f", Rates(1));
+			if(modSpec->IsCodon() == false) outman.UserMessage(" (ti/tv = %.4f)",  TRatio());
+			else outman.UserMessage("");
+			}
+		else outman.UserMessage("    1 rate");
+		}
+	else if(modSpec->IsAminoAcid()){
+		outman.UserMessageNoCR("  Amino Acid Rate Matrix: ");
+		if(modSpec->IsJonesAAMatrix()) outman.UserMessage("Jones");
+		else if(modSpec->IsDayhoffAAMatrix()) outman.UserMessage("Dayhoff");
+		else if(modSpec->IsPoissonAAMatrix()) outman.UserMessage("Poisson");
+		else if(modSpec->IsWAGAAMatrix()) outman.UserMessage("WAG");
+		else if(modSpec->IsMtMamAAMatrix()) outman.UserMessage("MtMam");
+		else if(modSpec->IsMtRevAAMatrix()) outman.UserMessage("MtRev");
+		else if(modSpec->IsEstimateAAMatrix()) outman.UserMessage("Estimated (189 free parameters)");
+		else if(modSpec->IsUserSpecifiedRateMatrix()) outman.UserMessage(" values specified by user (fixed)");
+		else if(modSpec->IsTwoSerineRateMatrix() && !modSpec->fixRelativeRates) outman.UserMessage("Experimental model with two serine types\n    Matrix estimated (209 free parameters)");
+		else if(modSpec->IsTwoSerineRateMatrix()) outman.UserMessage("Experimental model with two serine types\n    Matrix specified by user.");
+		}
+	else if(modSpec->IsNState()){
+		outman.UserMessage("  Character change matrix:\n    One rate (symmetric one rate Mk model)");
+		}
+	else if(modSpec->IsNStateV()){
+		outman.UserMessage("  Character change matrix:\n    One rate (symmetric one rate Mkv model)");
+		}
+	else if(modSpec->IsOrderedNState()){
+		outman.UserMessage("  Character change matrix:\n    One rate (ordered symmetric one rate Mk model)");
+		}
+	else if(modSpec->IsOrderedNStateV()){
+		outman.UserMessage("  Character change matrix:\n    One rate (ordered symmetric one rate Mkv model)");
+		}
+	else if(modSpec->IsOrientedGap()){
+		outman.UserMessage("  Character change matrix: irreversible matrix\n    deletion rate parameter only estimated if using a partitioned\n    model without subset rates");
+		outman.UserMessage("    deletion rate = %.3f", *deleteRate);
+		}
+	else if(modSpec->IsBinary()){
+		outman.UserMessage("  Character change matrix:\n    Binary (2-state symmetric one rate model)");
+		}
+	else if(modSpec->IsBinaryNotAllZeros()){
+		outman.UserMessage("  Character change matrix:\n    Binary, no all-zero columns (2-state symmetric one rate model)");
+		}
+
+	outman.UserMessageNoCR("  Equilibrium State Frequencies: ");
+	if(modSpec->IsEqualStateFrequencies()){
+		if(modSpec->IsCodon()){
+			if(modSpec->IsVertMitoCode()) outman.UserMessage("equal (1/60 = 0.01667, fixed)");
+			else if(modSpec->IsInvertMitoCode()) outman.UserMessage("equal (1/62 = 0.01613, fixed)");
+			else outman.UserMessage("equal (1/61 = 0.01639, fixed)");
+			}
+		else if(modSpec->IsAminoAcid())
+			outman.UserMessage("equal (0.05, fixed)");
+		else if(modSpec->IsMkTypeModel())
+			outman.UserMessage("equal (%.2f, fixed)", 1.0/nstates);
+		else if(modSpec->IsOrientedGap()){
+			outman.UserMessage("proportion of inserted sites parameter");
+			outman.UserMessage("    insert proportion = %.3f", *insertRate);
+			}
+		else 
+			outman.UserMessage("equal (0.25, fixed)");
+		}
+	else if(modSpec->IsF3x4StateFrequencies()) outman.UserMessage("\n    empirical values calculated by F3x4 method (fixed)");
+	else if(modSpec->IsF1x4StateFrequencies()) outman.UserMessage("\n    empirical values calculated by F1x4 method (fixed)");
+	else if(modSpec->IsEmpiricalStateFrequencies()){
+		if(modSpec->IsAminoAcid()) outman.UserMessage("empirical (observed) values (+F)");
+		else outman.UserMessage("empirical (observed) values, fixed:");
+		}
+	else if(modSpec->IsJonesAAFreqs()) outman.UserMessage("Jones");
+	else if(modSpec->IsWAGAAFreqs()) outman.UserMessage("WAG");
+	else if(modSpec->IsMtMamAAFreqs()) outman.UserMessage("MtMam");
+	else if(modSpec->IsMtRevAAFreqs()) outman.UserMessage("MtRev");
+	else if(modSpec->IsDayhoffAAFreqs()) outman.UserMessage("Dayhoff");
+	else if(modSpec->IsUserSpecifiedStateFrequencies()) outman.UserMessage("specified by user (fixed)");
+	else outman.UserMessage("estimated");
+		
+	if(!modSpec->IsEqualStateFrequencies()){
+		if(modSpec->IsCodon())  outman.UserMessageNoCR("    (AAA, AAC, AAG, AAT, ACA, ... etc)\n    ");
+		else if(modSpec->IsAminoAcid() && !modSpec->IsTwoSerineRateMatrix()) outman.UserMessageNoCR("    (ACDEFGHIKLMNPQRSTVWY)\n    ");
+		else if(modSpec->IsAminoAcid() && modSpec->IsTwoSerineRateMatrix()) outman.UserMessageNoCR("    (ACDEFGHIKLMNPQRSTVWYZ) (Z=ACG and AGT Serines)\n    ");
+		else outman.UserMessageNoCR("    (ACGT) ");
+		for(int i=0;i<nstates;i++){
+			outman.UserMessageNoCR("%.4f ", StateFreq(i));
+			if(i>0 && (i+1)!= nstates && !((i+1)%5)) outman.UserMessageNoCR("\n    ");
+			}
+		outman.UserMessage("");
+		}
+
+	outman.UserMessage("  Rate Heterogeneity Model:");
+	if(modSpec->numRateCats == 1){
+		if(modSpec->includeInvariantSites == false) outman.UserMessage("    no rate heterogeneity");
+		else{
+			if(modSpec->fixInvariantSites == true) outman.UserMessage("    only an invariant (invariable) site category,\n    proportion specified by user (fixed)\n    %.4f", PropInvar());
+			else outman.UserMessage("    only an invariant (invariable) site category, proportion estimated\n    %.4f", PropInvar());
+			}
+		}
+	else{
+		outman.UserMessageNoCR("    %d ", modSpec->numRateCats);
+		if(modSpec->IsNonsynonymousRateHet()){
+			if(!modSpec->fixOmega){
+			outman.UserMessage("nonsynonymous rate categories, rate and proportion of each estimated\n     (this is effectively the M3 model of PAML)");
+				}
+			else{
+				outman.UserMessage("nonsynonymous rate categories, rate and proportion of each provided by user (fixed)\n     (this is effectively the M3 model of PAML)");
+				}
+			outman.UserMessage("      dN/dS\tProportion");
+			for(int i=0;i<modSpec->numRateCats;i++)
+				outman.UserMessage("      %5.4f\t%5.4f", Omega(i), OmegaProb(i));
+			}
+		else if(modSpec->IsFlexRateHet() == false){
+			if(modSpec->fixAlpha == true) outman.UserMessage("discrete gamma distributed rate categories,\n      alpha param specified by user (fixed)\n      %.4f", Alpha());
+			else outman.UserMessage("discrete gamma distributed rate categories, alpha param estimated\n      %.4f", Alpha());
+			if(modSpec->includeInvariantSites == true){
+				if(modSpec->fixInvariantSites == true) outman.UserMessage("    with an invariant (invariable) site category,\n    proportion specified by user (fixed)\n      %.4f", PropInvar());				
+				else outman.UserMessage("    with an invariant (invariable) site category, proportion estimated\n      %.4f", PropInvar());	
+				}
+			outman.UserMessage("    Substitution rate categories under this model:\n      rate\tproportion");
+			if(modSpec->includeInvariantSites == true) outman.UserMessage("      %5.4f\t%5.4f", 0.0, PropInvar());
+			for(int r=0;r<modSpec->numRateCats;r++)
+				outman.UserMessage("      %5.4f\t%5.4f", rateMults[r], rateProbs[r]);
+			}
+		else{
+			outman.UserMessage("FLEX rate categories, rate and proportion of each estimated");
+			if(modSpec->includeInvariantSites == true){
+				if(modSpec->fixInvariantSites == true) outman.UserMessage("    with an invariant (invariable) site category,\n    proportion specified by user (fixed)");				
+				else outman.UserMessage("    with an invariant (invariable) site category, proportion estimated");
+				}
+			outman.UserMessage("      Estimated substitution rate categories:\n      rate\tproportion");
+			for(int r=0;r<modSpec->numRateCats;r++)
+				outman.UserMessage("      %5.4f\t%5.4f", rateMults[r], rateProbs[r]);
+			}
+		}
+	outman.UserMessage("");
+
+	}
+
+#define MODEL_OUTPUT_PREC 5
+void Model::FillGarliFormattedModelString(string &s) const{
+	char temp[1000];
+	int prec = MODEL_OUTPUT_PREC;
+	if(modSpec->IsCodon()){
+		s += " o";
+		for(int i=0;i<omegas.size();i++){
+			sprintf(temp," %.*f %.*f",  prec, *omegas[i],  prec, *omegaProbs[i]);
+			s += temp;
+			}
+		}
+	if(modSpec->IsNucleotide() || modSpec->IsCodon() || modSpec->IsEstimateAAMatrix() || modSpec->IsTwoSerineRateMatrix() || (modSpec->IsAminoAcid() && modSpec->IsUserSpecifiedRateMatrix())){
+		//sprintf(temp," r %.*f %.*f %.*f %.*f %.*f", prec, Rates(0), prec, Rates(1), prec, Rates(2), prec, Rates(3), prec, Rates(4));
+		//s += temp;
+		s += " r ";
+		for(int st = 0;st < relNucRates.size();st++){
+			sprintf(temp," %.*f", prec, Rates(st));
+			s += temp;
+			}
+		}
+	if(modSpec->IsNucleotide()){
+		sprintf(temp," e %.*f %.*f %.*f %.*f",  prec, StateFreq(0),  prec, StateFreq(1),  prec, StateFreq(2),  prec, StateFreq(3));
+		s += temp;
+		}
+	else if(!IsOrientedGap()){
+		sprintf(temp," e ");
+		s += temp;
+		for(int i=0;i<nstates;i++){
+			sprintf(temp," %.*f ",  prec, StateFreq(i));
+			s += temp;
+			}
+		}
+
+	if(modSpec->IsFlexRateHet()){
+		s += " f ";
+		for(int i=0;i<NRateCats();i++){
+			sprintf(temp, " %.*f %.*f ",  prec, rateMults[i],  prec, rateProbs[i]);
+			s += temp;
+			}
+		}
+	else{
+		if(modSpec->IsGammaRateHet()){
+			sprintf(temp, " a %.*f",  prec, Alpha());
+			s += temp;
+			}
+		}
+	if(PropInvar()!=ZERO_POINT_ZERO){
+		sprintf(temp, " p %.*f",  prec, PropInvar());
+		s += temp;
+		}
+	if(modSpec->IsOrientedGap()){
+		sprintf(temp, " i %f d %f", *insertRate, *deleteRate);
+		s += temp;
+		}
+	s += " ";
+	}
+
+/*	
+void Model::ReadModelFromFile(NexusToken &token){
+	token.GetNextToken();
+
+	do{
+		if(token.Equals("r")){//rate parameters
+			token.GetNextToken();
+			FLOAT_TYPE r[5];
+			for(int i=0;i<5;i++){
+				r[i]=atof(token.GetToken().c_str());
+				token.GetNextToken();
+				}
+			SetRmat(r);
+			if(token.IsNumericalToken()) token.GetNextToken();//this is necessary incase GT is included
+			}
+		else if(token.Equals("b")){
+			token.GetNextToken();
+			FLOAT_TYPE b[3];
+			for(int i=0;i<3;i++){
+				b[i]=atof(token.GetToken().c_str());
+				token.GetNextToken();
+				}
+			SetPis(b);
+			if(token.IsNumericalToken()) token.GetNextToken();//this is necessary incase T is included						
+			}
+		else if(token.Equals("a")){
+			token.GetNextToken();
+			SetAlpha(atof(token.GetToken().c_str()));
+			token.GetNextToken();
+			}				
+		else if(token.Equals("p")){
+			token.GetNextToken();
+			SetPinv(atof(token.GetToken().c_str()));
+			token.GetNextToken();
+			}
+		else if(token.Begins("(") == false){
+			token.GetNextToken();
+			}
+		}while(token.Begins("(") == false);
+	UpdateQMat();
+}
+*/	
+	
+void Model::ReadGarliFormattedModelString(string &modString){
+	istringstream stf(modString, stringstream::in);
+
+	char c;
+	NxsString temp;
+	c=stf.get();
+	do{//read parameter values identified by single letter identifier.  Each section should
+		//take care of advancing to the following letter 
+		if(c == 'R' || c == 'r'){//rate parameters
+			if(modSpec->IsAminoAcid() && modSpec->IsEstimateAAMatrix() == false && modSpec->IsUserSpecifiedRateMatrix() == false && modSpec->IsTwoSerineRateMatrix() == false) 
+				throw ErrorException("Amino acid rate matrix parameters cannot be specified unless \"ratematrix = fixed\" or \"ratematrix = estimate\" are used.");
+			//FLOAT_TYPE r[6];
+			vector<FLOAT_TYPE> r;
+			//for(int i=0;i<5;i++){
+			for(int i=0;i<relNucRates.size() - 1;i++){
+				temp.clear();
+				stf >> temp;
+
+				if(temp.size() == 0)
+					throw(ErrorException("Unexpected end of model string while reading rate matrix parameters.\nExamine file and check manual for format.\n"));
+				if(temp[0] != '.' && (!isdigit(temp[0]))) 
+					throw(ErrorException("Problem reading rate matrix parameters from file (maybe too few rates?).\n\tFor amino acid models 190 rates should be specified, (or 189 rates if the last rate is assumed to be 1.0).\n\tFor nucleotide models 6 should be specified (or 5 if the last rate is assumed to be 1.0).\n\tExamine file and check manual or website for format.\n"));
+				//r[i]=(FLOAT_TYPE)atof(temp.c_str());
+				r.push_back((FLOAT_TYPE)atof(temp.c_str()));
+				}
+			do{
+				c=stf.get();
+				}while(!stf.eof() && (c == ' ' || c == '\t'));	
+			if(isdigit(c) || c=='.'){//read the GT rate, if specified
+				string v;
+				v = c;
+				while((!isalpha(c) || c=='e' || c == 'E') && !stf.eof()){
+					c=stf.get();
+					if(isdigit(c) || c=='.' || c=='e' || c=='E' || c == '-')
+						v += c;
+					else if(c == ' ' || c == '\t'){
+						c=stf.get();
+						if(isdigit(c) || c=='.')
+							throw ErrorException("It appears that too many relative rates was specified in the model string.\n\tFor amino acid models 190 rates should be specified, (or 189 rates if the last rate is assumed to be 1.0).\n\tFor nucleotide models 6 should be specified (or 5 if the last rate is assumed to be 1.0).");
+						break;
+						}
+					}
+				//r[5] = atof(v.c_str());
+				r.push_back((FLOAT_TYPE)atof(v.c_str()));
+				}
+			//else r[5] = ONE_POINT_ZERO;
+			else 
+				r.push_back(ONE_POINT_ZERO);
+			if(r.size() != relNucRates.size()){
+				if(modSpec->IsAminoAcid())
+					throw ErrorException("It appears that too few relative rates were specified in the model string (found %d).\n\tFor amino acid models 190 rates should be specified, (or 189 rates if the last rate is assumed to be 1.0).", r.size());
+				else
+					throw ErrorException("Incorrect number of relative rates specified in the model string.\t6 rates should be specified, (or 5 rates if the G-T rate is assumed to be 1.0).");
+				}
+			SetRmat(&r[0], true, true);
+			modSpec->gotRmatFromFile=true;
+			}
+		else if(c == 'E' || c == 'e' || c == 'b' || c == 'B'){//base freqs
+			//7/12/07 changing this to pay attention to the 4th state, if specified
+			//although it should be calcuable from the other three, having exact restartability
+			//sometimes requires that it is taken as is
+			//FLOAT_TYPE b[4];
+			int nstates = modSpec->nstates;
+			vector<FLOAT_TYPE> b(nstates);
+			for(int i=0;i<nstates-1;i++){
+				temp.clear();
+				stf >> temp;
+				if(temp.size() == 0)
+					throw(ErrorException("Unexpected end of model string while reading equilibrium frequency parameters.\nExamine file and check manual for format.\n"));
+				if(temp[0] != '.' && (!isdigit(temp[0]))) 
+					throw(ErrorException("Problem reading equilibrium state frequency parameters from file.\nExamine file and check manual for format.\n"));
+				b[i]=(FLOAT_TYPE)atof(temp.c_str());
+				}
+			do{
+				c=stf.get();
+				}while(!stf.eof() && (c == ' ' || c == '\t'));	
+			if(isdigit(c) || c=='.'){
+				string v;
+				v = c;
+				while(!isalpha(c) && !stf.eof()){
+					c=stf.get();
+					if(isdigit(c) || c=='.')
+						v += c;
+					else if(c == ' ' || c == '\t'){
+						c=stf.get();
+						if(isdigit(c) || c=='.')
+							throw ErrorException("It appears that too many equilibrium frequencies were specified in the model string.\n\tFor amino acid models 20 should be specified, (or 19 if the last is assumed to make the sum 1.0).\n\tFor nucleotide models 4 (or 3 if the last is assumed to make the sum 1.0).");
+						break;
+						}
+					}
+				b[nstates-1]=(FLOAT_TYPE)atof(v.c_str());
+				}
+			else{
+				FLOAT_TYPE tot = ZERO_POINT_ZERO;
+				for(int i=0;i<nstates-1;i++) 
+					tot += b[i];
+				b[nstates-1] = ONE_POINT_ZERO - tot;
+				}
+			//in this case we're "forcing" estimation of state frequencies but providing starting values, 
+			//and because this is rather a hack we can't actually do the validation without crapping out 
+			if(modSpec->IsCodon() && modSpec->fixStateFreqs == false && modSpec->IsEmpiricalStateFrequencies())
+				SetPis(&b[0], false, true);
+			else
+				SetPis(&b[0], true, true);
+			modSpec->gotStateFreqsFromFile=true;
+			}
+		else if(c == 'A' || c == 'a'){//alpha shape
+			if(modSpec->IsFlexRateHet()) 
+				throw(ErrorException("Config file specifies ratehetmodel = flex, but starting model contains alpha!\n"));
+			if(modSpec->IsNonsynonymousRateHet()) 
+				throw(ErrorException("Config file specifies ratehetmodel = nonsynonymous, but starting model contains alpha!\n"));
+			temp.clear();
+			stf >> temp;
+			if(temp.size() == 0)
+				throw(ErrorException("Unexpected end of model string while reading alpha parameter.\nExamine file and check manual for format.\n"));
+			if(temp[0] != '.' && (!isdigit(temp[0]))) 
+				throw(ErrorException("Problem reading alpha parameter from file.\nExamine file and check manual for format.\n"));
+			SetAlpha((FLOAT_TYPE)atof(temp.c_str()), true);
+			c=stf.get();
+			modSpec->gotAlphaFromFile=true;
+			}				
+		//apropriating "i" for insert rate
+		//else if(c == 'P' || c == 'p' || c == 'i' || c == 'I'){//proportion invariant
+		else if(c == 'P' || c == 'p'){//proportion invariant
+			temp.clear();
+			stf >> temp;
+			if(temp.size() == 0)
+				throw(ErrorException("Unexpected end of model string while reading proportion of invariant sites parameter.\nExamine file and check manual for format.\n"));
+			if(temp[0] != '.' && (!isdigit(temp[0]))) 
+				throw(ErrorException("Problem reading proportion of invariant sites parameter from file.\nExamine file and check manual for format.\n"));
+			FLOAT_TYPE p=(FLOAT_TYPE)atof(temp.c_str());
+			SetPinv(p, true);
+			c=stf.get();
+			modSpec->gotPinvFromFile=true;
+			}
+		else if(c == 'F' || c == 'f'){//flex rates
+			if(modSpec->IsFlexRateHet()==false) 
+				throw(ErrorException("Flex rate parameters specified, but ratehetmodel is not flex!\n"));
+			FLOAT_TYPE rates[20];
+			FLOAT_TYPE probs[20];
+			for(int i=0;i<NRateCats();i++){
+				temp.clear();
+				stf >> temp;
+				if(temp.size() == 0)
+					throw(ErrorException("Unexpected end of model string while reading flex rate parameters.\nExamine file and check manual for format.\n"));
+				if(isalpha(temp[0])) 
+					throw ErrorException("Problem with flex rates specification in starting condition file");
+				rates[i]=(FLOAT_TYPE)atof(temp.c_str());
+				temp.clear();
+				stf >> temp;
+				if(temp.size() == 0)
+					throw(ErrorException("Unexpected end of model string while reading flex rate parameters.\nExamine file and check manual for format.\n"));
+				if(isalpha(temp[0])) 
+					throw ErrorException("Problem with flex rates specification in starting condition file");
+				probs[i]=(FLOAT_TYPE)atof(temp.c_str());
+				}		
+			SetFlexRates(rates, probs, true);
+			NormalizeRates();
+			c=stf.get();
+			modSpec->gotFlexFromFile=true;
+			}
+		else if(c == 'O' || c == 'o'){//omega parameters
+			if(modSpec->IsCodon() == false) 
+				throw ErrorException("Omega parameters specified for non-codon model?");
+			FLOAT_TYPE rates[20];
+			FLOAT_TYPE probs[20];
+			if(NRateCats() == 1){//just a single omega value to get, maybe with a proportion of 1.0 following it
+				temp.clear();
+				stf >> temp;
+				if(temp.size() == 0)
+					throw(ErrorException("Unexpected end of model string while reading omega parameters.\nExamine file and check manual for format.\n"));
+				if(isalpha(temp[0])) 
+					throw ErrorException("Problem with omega parameter specification in starting condition file");
+				rates[0]=(FLOAT_TYPE)atof(temp.c_str());
+				do{
+					c=stf.get();
+					}while(!stf.eof() && (c == ' ' || c == '\t'));	
+				if(isdigit(c) || c=='.'){
+					string v;
+					v = c;
+					temp.clear();
+					stf >> temp;
+					if(temp.size() == 0)
+						throw(ErrorException("Unexpected end of model string while reading omega parameters.\nExamine file and check manual for format.\n"));
+					v += temp;
+					if(FloatingPointEquals(atof(v.c_str()), ONE_POINT_ZERO, 1.0e-5) == false)
+						throw ErrorException("Problem with omega parameter specification in starting condition file\n(wrong number of rate cats specified in config?)");
+					do{
+						c=stf.get();
+						}while(!stf.eof() && (c == ' ' || c == '\t'));		
+					if(isdigit(c) || c == '.') 
+						throw ErrorException("Problem with omega parameter specification in starting condition file");
+					}
+				probs[0] = ONE_POINT_ZERO;
+				SetOmegas(rates, probs);
+				}
+			else{
+				for(int i=0;i<NRateCats();i++){
+					temp.clear();
+					stf >> temp;
+					if(temp.size() == 0)
+						throw(ErrorException("Unexpected end of model string while reading omega parameters.\nExamine file and check manual for format.\n"));
+					if(isalpha(temp[0])) 
+						throw ErrorException("Problem with omega parameter specification in starting condition file");
+					rates[i]=(FLOAT_TYPE)atof(temp.c_str());
+					temp.clear();
+					stf >> temp;
+					if(temp.size() == 0)
+						throw(ErrorException("Unexpected end of model string while reading omega parameters.\nExamine file and check manual for format.\n"));
+					if(isalpha(temp[0])) 
+						throw ErrorException("Problem with omega parameter specification in starting condition file");
+					probs[i]=(FLOAT_TYPE)atof(temp.c_str());
+					}
+				do{
+					c=stf.get();
+					}while(!stf.eof() && (c == ' ' || c == '\t'));			
+				if(isdigit(c) || c == '.') throw ErrorException("Problem with omega parameter specification in starting condition file");
+				SetOmegas(rates, probs);
+				}
+			modSpec->gotOmegasFromFile=true;
+			}
+		else if(c == 'n'){
+			//the number of cats should now be set in the config file
+			c=stf.get();
+			assert(0);
+			}
+		else if(c == 'I' || c == 'i'){
+			stf >> temp;
+			if(temp[0] != '.' && (!isdigit(temp[0])))
+				throw(ErrorException("Problem reading insertion rate parameter from file.\nExamine file and check manual for format.\nNote that the proportion of invariable sites parameter is specified with \"p\", not \"i\""));
+			if(! NxsString(temp).IsADouble())
+				throw(ErrorException("Problem reading insertion rate parameter from file.\nExamine file and check manual for format.\nNote that the proportion of invariable sites parameter is specified with \"p\", not \"i\""));
+			FLOAT_TYPE i = (FLOAT_TYPE)atof(temp.c_str());
+			if(insertRate == NULL)
+				throw ErrorException("insert rate (%f) specified for non-gap model!  Check configuration.", i);
+			SetInsertRate(0, i);
+			do{c=stf.get();}while(c==' ');		
+			modSpec->gotInsertFromFile=true;
+			}
+		else if(c == 'D' || c == 'd'){
+			stf >> temp;
+			if(temp[0] != '.' && (!isdigit(temp[0])))
+				throw(ErrorException("Problem reading deletion rate parameter from file.\nExamine file and check manual for format.\n"));
+			if(! NxsString(temp).IsADouble())
+				throw(ErrorException("Problem reading deletion rate parameter from file.\nExamine file and check manual for format.\n"));
+			FLOAT_TYPE d = (FLOAT_TYPE)atof(temp.c_str());
+			if(deleteRate == NULL)
+				throw ErrorException("delete rate (%f) specified for non-gap model!  Check configuration.", d);
+			SetDeleteRate(0, d);
+			do{c=stf.get();}while(c==' ');		
+			modSpec->gotDeleteFromFile=true;
+			}
+		else if(isalpha(c)) 
+			throw(ErrorException("Unknown model parameter specification in file.\nExamine file and check manual for format.\n"));
+		else if(c != '(') c=stf.get();
+		}while(c != '(' && c != '\r' && c != '\n' && !stf.eof());
+/* this isn't necessary with the new definition of the insert "rate" as a proportion
+		//adjust the indel rates, if necessary
+		if(IsOrientedGap() && *insertRate > *deleteRate){
+			if(modSpec->gotInsertFromFile && modSpec->gotDeleteFromFile && *insertRate > *deleteRate - 1.0e-2)
+				throw ErrorException("Insertion and deletion rates specified are not compatible.  Insertion rate must be < deletion rate");
+			else if(modSpec->gotInsertFromFile)
+				*deleteRate = *insertRate + 0.001;
+			else if(modSpec->gotDeleteFromFile)
+				*insertRate = *deleteRate - 0.001;
+			}
+*/
+	}
+
+void Model::CreateModelFromSpecification(int modnum){
+	modSpec = modSpecSet.GetModSpec(modnum);
+
+	nstates = modSpec->nstates;
+	if(modSpec->IsNucleotide() || modSpec->IsCodon())
+		nst = modSpec->Nst();
+	
+	else nst = -1;
+
+	if(IsOrientedGap()){
+		insertRate = new FLOAT_TYPE;
+		*insertRate = 0.5;
+		//AbsoluteRate *ins = new AbsoluteRate((FLOAT_TYPE **) &insertRate, modnum);
+		InsertProportion *ins = new InsertProportion((FLOAT_TYPE **) &insertRate, modnum);
+		ins->SetWeight(1);
+		paramsToMutate.push_back(ins);
+
+		//del rate may be optimized elsewhere, but not randomly during GA
+		//(optimized if part. model and no SSR)
+		deleteRate = new FLOAT_TYPE;
+		*deleteRate = 1.0;
+/*		DeleteRate *del = new DeleteRate((FLOAT_TYPE **) &deleteRate, modnum);
+		del->SetWeight(1);
+		paramsToMutate.push_back(del);
+*/
+		}
+	else{
+		insertRate = deleteRate = NULL;
+		}
+
+	nRateCats = modSpec->numRateCats;
+	
+	//deal with rate het models
+	propInvar = new FLOAT_TYPE;
+	includeInvariantSites = modSpec->includeInvariantSites;
+	if(includeInvariantSites){
+		assert(modSpec->IsCodon() == false);
+		*propInvar=(FLOAT_TYPE)0.2;
+		if(modSpec->fixInvariantSites == false){
+			ProportionInvariant *pi = new ProportionInvariant("proportion invariant", (FLOAT_TYPE **) &propInvar, modnum);
+			pi->SetWeight(1);
+			paramsToMutate.push_back(pi);
+			}			
+		}
+	else *propInvar=ZERO_POINT_ZERO;
+
+	if(NRateCats() > 1 && modSpec->IsNonsynonymousRateHet() == false){
+		//assert(modSpec.IsNucleotide() || modSpec.IsAminoAcid());
+		alpha = new FLOAT_TYPE;
+		*alpha = ZERO_POINT_FIVE;
+		
+		if(modSpec->IsFlexRateHet() == false){
+			DiscreteGamma(rateMults, rateProbs, *alpha);
+			if(modSpec->fixAlpha == false){
+				AlphaShape *a= new AlphaShape("alpha", &alpha, modnum);
+				a->SetWeight(1);
+				paramsToMutate.push_back(a);
+				}
+			}
+		else{
+			//start the flex rates out being equivalent to
+			//a gamma with alpha=.5
+			DiscreteGamma(rateMults, rateProbs, ZERO_POINT_FIVE);
+			if(modSpec->includeInvariantSites == true) NormalizeRates();
+
+			vector<FLOAT_TYPE*> dummy;
+			dummy.reserve(NRateCats());
+			
+			for(int i=0;i<NRateCats();i++)
+				dummy.push_back(&rateProbs[i]);
+			RateProportions *rateP=new RateProportions(&dummy[0], NRateCats(), modnum);
+			rateP->SetWeight((FLOAT_TYPE)NRateCats());
+			paramsToMutate.push_back(rateP);
+
+			dummy.clear();
+			for(int i=0;i<NRateCats();i++)
+				dummy.push_back(&rateMults[i]);
+			RateMultipliers *rateM=new RateMultipliers(&dummy[0], NRateCats(), modnum);
+			rateM->SetWeight((FLOAT_TYPE)NRateCats());
+			paramsToMutate.push_back(rateM);
+			}
+		}
+	else{
+		rateMults[0]=ONE_POINT_ZERO;
+		rateProbs[0]=ONE_POINT_ZERO;
+		alpha=NULL;
+		}
+
+	//deal with the state frequencies
+	for(int i=0;i<nstates;i++){
+		FLOAT_TYPE *f=new FLOAT_TYPE;
+		*f=(ONE_POINT_ZERO/(FLOAT_TYPE) nstates);
+		stateFreqs.push_back(f);
+		}
+	if(modSpec->IsEqualStateFrequencies() == false && modSpec->fixStateFreqs == false){
+		StateFrequencies *s=new StateFrequencies(&stateFreqs[0], nstates, modnum);
+		s->SetWeight(nstates);
+		paramsToMutate.push_back(s);
+		}
+	if(modSpec->IsAminoAcid()){
+		if(modSpec->IsJonesAAFreqs()) SetJonesAAFreqs();
+		if(modSpec->IsDayhoffAAFreqs()) SetDayhoffAAFreqs();
+		if(modSpec->IsWAGAAFreqs()) SetWAGAAFreqs();
+		if(modSpec->IsMtMamAAFreqs()) SetMtMamAAFreqs();
+		if(modSpec->IsMtRevAAFreqs()) SetMtRevAAFreqs();
+		}
+
+	//deal with the relative rates
+
+	if(modSpec->IsAminoAcid() == false){
+		if(nst==6){
+			if(modSpec->IsArbitraryRateMatrix()){
+				//user specified rate matrix type, like rclass = (a b c d e f) in paup
+				//trying to do this as generically as possible
+				string matrixSpec = modSpec->GetArbitraryRateMatrixString();
+				int pos = 0;
+				char characters[10];
+		//		int usedCharacters = 0;
+				FLOAT_TYPE **params = new FLOAT_TYPE*[6]; 
+
+				for(int r=0;r<6;r++){
+					while (pos < matrixSpec.size() && !isalnum(matrixSpec[pos])) pos++;
+					bool newChar = true;
+					char thisChar = matrixSpec[pos];
+					for(int c=0;c<r;c++){
+						if(thisChar == characters[c]){
+							params[r] = params[c];
+							newChar = false;
+							arbitraryMatrixIndeces[r] = c;
+							characters[r] = thisChar;
+							break;
+							}
+						}
+					if(newChar){
+						params[r] = new FLOAT_TYPE;
+						*params[r] = ONE_POINT_ZERO;
+						characters[r] = thisChar;
+						arbitraryMatrixIndeces[r] = r;
+	//					usedCharacters++;
+						}
+					pos++;
+					if(matrixSpec[pos] != ' ' && matrixSpec[pos] != '\t' && matrixSpec[pos] != ')') throw ErrorException("Problem parsing rate matrix specification.\n\tIt should look something like this (a b a c b c)");
+					}
+				while (pos < matrixSpec.size() && (matrixSpec[pos] == ' ' || matrixSpec[pos] == '\t')) pos++;
+				if(matrixSpec[pos] != ')') throw ErrorException("Problem parsing rate matrix specification.\n\tIt should look something like this (a b a c b c)");
+				for(int i=0;i<6;i++){
+					relNucRates.push_back(params[i]);
+					}
+
+				delete []params;
+				//it is hard to know what values to start the arbitrary matrix at, but try to make the transitions higher
+				//it doesn't really matter if some are aliased to one another
+				*relNucRates[1] = 4.0;
+				*relNucRates[4] = 4.0;
+				*relNucRates[5] = ONE_POINT_ZERO;
+				RelativeRates *r=new RelativeRates("Rate matrix", &relNucRates[0], 6, 1e-5, 999.9, modnum);
+				r->SetWeight(6);
+				paramsToMutate.push_back(r);
+				}
+			else{//normal GTR
+				//make the transitions higher to begin with
+				for(int i=0;i<6;i++){
+					FLOAT_TYPE *d=new FLOAT_TYPE;
+					relNucRates.push_back(d);
+					}
+				*relNucRates[0]=*relNucRates[2]=*relNucRates[3]=*relNucRates[5] = ONE_POINT_ZERO;
+				*relNucRates[1]=*relNucRates[4] = 4.0;
+				}
+			if(modSpec->fixRelativeRates == false){
+				RelativeRates *r=new RelativeRates("Rate matrix", &relNucRates[0], 6, 1e-3, 999.9, modnum);
+				r->SetWeight(6);
+				paramsToMutate.push_back(r);
+				}
+			}
+		else if(nst==2){
+			FLOAT_TYPE *a=new FLOAT_TYPE;
+			FLOAT_TYPE *b=new FLOAT_TYPE;
+			*a=ONE_POINT_ZERO;
+			*b=4.0;
+			relNucRates.push_back(a);
+			relNucRates.push_back(b);
+			relNucRates.push_back(a);
+			relNucRates.push_back(a);
+			relNucRates.push_back(b);
+			relNucRates.push_back(a);
+			
+			if(modSpec->fixRelativeRates == false){
+				RelativeRates *r=new RelativeRates("Rate matrix", &b, 1, 1e-3, 999.9, modnum);
+				r->SetWeight(2);
+				paramsToMutate.push_back(r);
+				}
+			}
+		else if(nst==1){
+			FLOAT_TYPE *a=new FLOAT_TYPE;
+			*a=ONE_POINT_ZERO;
+			for(int i=0;i<6;i++)
+				relNucRates.push_back(a);
+			}
+		}
+	else{//estimating or fixing the aminoacid rate matrix - a two serine matrix is either estimated or fixed and user specified, so goes through here regardless
+		if(modSpec->fixRelativeRates == false || modSpec->IsUserSpecifiedRateMatrix() || modSpec->IsTwoSerineRateMatrix()){
+			int seed = rnd.seed();
+			int matrixRates = nstates * (nstates - 1) / 2;
+			//for(int i=0;i<190;i++){
+			for(int i=0;i < matrixRates;i++){
+				FLOAT_TYPE *d=new FLOAT_TYPE;
+				//*d = ONE_POINT_ZERO;
+				if(i == (matrixRates - 1))
+					*d = 1.0;
+				else
+					*d = max(rnd.gamma(1), MIN_REL_RATE);
+				relNucRates.push_back(d);
+				}
+			rnd.set_seed(seed);
+#ifdef SUM_AA_REL_RATES	
+			this->NormalizeSumConstrainedRelativeRates(true, -1);
+#endif
+			if((modSpec->IsUserSpecifiedRateMatrix() == false) && ((modSpec->IsTwoSerineRateMatrix() &&  modSpec->fixRelativeRates) == false)){
+#ifdef SUM_AA_REL_RATES
+				SumConstrainedRelativeRates *r = new SumConstrainedRelativeRates("Rate matrix", &relNucRates[0], matrixRates, SUM_TO * 1.0e-6/(double)matrixRates, SUM_TO * 1.0e6/(double)matrixRates, SUM_TO, modnum);
+#else
+				RelativeRates *r=new RelativeRates("Rate matrix", &relNucRates[0], 190, 1e-3, 9999.9, modnum);
+#endif
+				
+				r->SetWeight(matrixRates);
+				paramsToMutate.push_back(r);
+				}
+			}
+		}
+
+	AllocateEigenVariables();//these need to be allocated regardless of
+		//nst because I don't feel like simplifying the deriv calcs for simpler
+		//models.  Pmat calcs for simpler models are simplified, and don't
+		//require the Eigen stuff	
+
+	if(modSpec->IsMkTypeModel() || modSpec->IsOrientedGap()){
+		//NSTATE - nothing needs to be done here right now
+		}
+	else if(modSpec->IsCodon() == false) 
+		UpdateQMat();
+	else if(modSpec->IsCodon()){
+		FLOAT_TYPE *d;
+		for(int i=0;i<NRateCats();i++){
+			d = new FLOAT_TYPE;
+			*d = 0.25 * (FLOAT_TYPE) (i + 1);
+			omegas.push_back(d);
+			d = new FLOAT_TYPE;
+			*d = 1.0 / NRateCats();
+			omegaProbs.push_back(d);
+			}
+
+/*		*omegas[0] = 0.0000;
+		*omegas[1] = 1.24023;
+		*omegas[2] = 2.99539;
+*/
+/*		if(NRateCats() == 1){
+			*omegas[0] = 1.0000;
+			*omegaProbs[0] = 1.0;
+			}
+		else{
+			*omegas[0] = 0.00000;
+			*omegas[1] = 0.79116;
+			*omegas[2] = 1.96505;
+
+			*omegaProbs[0] = 0.64547;
+			*omegaProbs[1] = 0.21651;
+			*omegaProbs[2] = 0.13802;
+			}
+*/
+/*		*omegas[0] = 0.8;
+		*omegas[1] = 1.0;
+		*omegas[2] = 1.2;
+*/
+
+/*		*omegaProbs[0] = 0.68280;
+		*omegaProbs[1] = 0.28284;
+		*omegaProbs[2] = 0.03436;
+*/
+
+/*		rateProbs[0] = 0.68280;
+		rateProbs[1] = 0.28284;
+		rateProbs[2] = 0.03436;
+*/
+		//*relNucRates[1] = 2.89288;
+	
+		if(!modSpec->fixOmega){
+			if(NRateCats() > 1){
+				RateProportions *omegaP=new RateProportions(&omegaProbs[0], NRateCats(), modnum);
+				omegaP->SetWeight((FLOAT_TYPE)NRateCats());
+				paramsToMutate.push_back(omegaP);
+				}
+				
+			RateMultipliers *omegaM=new RateMultipliers(&omegas[0], NRateCats(), modnum);
+			omegaM->SetWeight((FLOAT_TYPE)NRateCats());
+			paramsToMutate.push_back(omegaM);
+			}
+			
+/*		FLOAT_TYPE *NS=new FLOAT_TYPE;
+		*NS = 0.5;
+		FLOAT_TYPE *S=new FLOAT_TYPE;
+		*S = 1.0;
+		omegas.push_back(NS);
+		omegas.push_back(S);
+		RelativeRates *o=new RelativeRates("Omega", &omega[0], 2);
+
+		o->SetWeight(2);
+		paramsToMutate.push_back(o);
+*/
+        //this is hopefully not needed here (and can't be here now that
+		//the genetic code is not static), since the code has yet to be set
+        //it will be updated later
+		//UpdateQMatCodon();
+		}
+
+	eigenDirty=true;
+	}
+
+void Model::SetMtMamAAFreqs(){
+	*stateFreqs[0] 	=	0.0692	;
+	*stateFreqs[14]	=	0.0184	;
+	*stateFreqs[11]	=	0.0400	;
+	*stateFreqs[2]	=	0.0186	;
+	*stateFreqs[1]	=	0.0065	;
+	*stateFreqs[13]	=	0.0238	;
+	*stateFreqs[3]	=	0.0236	;
+	*stateFreqs[5]	=	0.0557	;
+	*stateFreqs[6]	=	0.0277	;
+	*stateFreqs[7]	=	0.0905	;
+	*stateFreqs[9]	=	0.1675	;
+	*stateFreqs[8]	=	0.0221	;
+	*stateFreqs[10]	=	0.0561	;
+	*stateFreqs[4]	=	0.0611	;
+	*stateFreqs[12]	=	0.0536	;
+	*stateFreqs[15]	=	0.0725	;
+	*stateFreqs[16]	=	0.0870	;
+	*stateFreqs[18]	=	0.0293	;
+	*stateFreqs[19]	=	0.0340	;
+	*stateFreqs[17]	=	0.0428	;
+	}
+
+void Model::SetMtRevAAFreqs(){
+	*stateFreqs[0] 	=	0.0720	;
+	*stateFreqs[14]	=	0.0190	;
+	*stateFreqs[11]	=	0.0390	;
+	*stateFreqs[2]	=	0.0190	;
+	*stateFreqs[1]	=	0.0060	;
+	*stateFreqs[13]	=	0.0250	;
+	*stateFreqs[3]	=	0.0240	;
+	*stateFreqs[5]	=	0.0560	;
+	*stateFreqs[6]	=	0.0280	;
+	*stateFreqs[7]	=	0.0880	;
+	*stateFreqs[9]	=	0.1690	;
+	*stateFreqs[8]	=	0.0230	;
+	*stateFreqs[10]	=	0.0540	;
+	*stateFreqs[4]	=	0.0610	;
+	*stateFreqs[12]	=	0.0540	;
+	*stateFreqs[15]	=	0.0720	;
+	*stateFreqs[16]	=	0.0860	;
+	*stateFreqs[18]	=	0.0290	;
+	*stateFreqs[19]	=	0.0330	;
+	*stateFreqs[17]	=	0.0430	;
+	}
+
+void Model::SetJonesAAFreqs(){
+		*stateFreqs[0] =0.076748;
+		*stateFreqs[14]=0.051691;
+		*stateFreqs[11]=0.042645;
+		*stateFreqs[2]=0.051544;
+		*stateFreqs[1]=0.019803;
+		*stateFreqs[13]=0.040752;
+		*stateFreqs[3]=0.06183;
+		*stateFreqs[5]=0.073152;
+		*stateFreqs[6]=0.022944;
+		*stateFreqs[7]=0.053761;
+		*stateFreqs[9]=0.091904;
+		*stateFreqs[8]=0.058676;
+		*stateFreqs[10]=0.023826;
+		*stateFreqs[4]=0.040126;
+		*stateFreqs[12]=0.050901;
+		*stateFreqs[15]=0.068765;
+		*stateFreqs[16]=0.058565;
+		*stateFreqs[18]=0.014261;
+		*stateFreqs[19]=0.032101;
+		*stateFreqs[17]=0.066005;
+		}
+		
+void Model::SetDayhoffAAFreqs(){
+	*stateFreqs[0]		=0.087127;
+	*stateFreqs[14]	=0.040904;
+	*stateFreqs[11]	=0.040432;
+	*stateFreqs[2]		=0.046872;
+	*stateFreqs[1]		=0.033474;
+	*stateFreqs[13]	=0.038255;
+	*stateFreqs[3]		=0.04953;
+	*stateFreqs[5]		=0.088612;
+	*stateFreqs[6]		=0.033618;
+	*stateFreqs[7]		=0.036886;
+	*stateFreqs[9]		=0.085357;
+	*stateFreqs[8]		=0.080482;
+	*stateFreqs[10]	=0.014753;
+	*stateFreqs[4]		=0.039772;
+	*stateFreqs[12]	=0.05068;
+	*stateFreqs[15]	=0.069577;
+	*stateFreqs[16]	=0.058542;
+	*stateFreqs[18]	=0.010494;
+	*stateFreqs[19]	=0.029916;
+	*stateFreqs[17]	=0.064718;
+	}		
+
+void Model::SetWAGAAFreqs(){
+	*stateFreqs[0]=0.0866279;
+	*stateFreqs[14]=0.043972;
+	*stateFreqs[11]=0.0390894;
+	*stateFreqs[2]=0.0570451;
+	*stateFreqs[1]=0.0193078;
+	*stateFreqs[13]=0.0367281;
+	*stateFreqs[3]=0.0580589;
+	*stateFreqs[5]=0.0832518;
+	*stateFreqs[6]=0.0244313;
+	*stateFreqs[7]=0.048466;
+	*stateFreqs[9]=0.086209;
+	*stateFreqs[8]=0.0620286;
+	*stateFreqs[10]=0.0195027;
+	*stateFreqs[4]=0.0384319;
+	*stateFreqs[12]=0.0457631;
+	*stateFreqs[15]=0.0695179;
+	*stateFreqs[16]=0.0610127;
+	*stateFreqs[18]=0.0143859;
+	*stateFreqs[19]=0.0352742;
+	*stateFreqs[17]=0.0708956;
+	}
+
+int Model::PerformModelMutation(){
+	//the ModelPartition version of this is now being called
+	assert(0);
+	if(paramsToMutate.empty()) return 0;
+	BaseParameter *mut = SelectModelMutation();
+	assert(mut != NULL);
+	mut->Mutator(mutationShape);
+	int retType;
+
+	if(mut->Type() == RELATIVERATES){
+		UpdateQMat();
+		retType=Individual::rates;
+		eigenDirty=true;
+		}
+	else if(mut->Type() == STATEFREQS){
+		UpdateQMat();
+		retType=Individual::pi;
+		eigenDirty=true;
+		}
+	
+	else if(mut->Type() == PROPORTIONINVARIANT){
+		//this max checking should really be rolled into the parameter class
+		*propInvar = (*propInvar > maxPropInvar ? maxPropInvar : *propInvar);
+		//the non invariant rates need to be rescaled even if there is only 1
+		if(modSpec->IsFlexRateHet() == false) AdjustRateProportions();
+		else NormalizeRates();
+		retType=Individual::pinv;
+		}
+	else if(mut->Type() == ALPHASHAPE){
+		DiscreteGamma(rateMults, rateProbs, *alpha);
+		retType=Individual::alpha;
+		}
+	else if(mut->Type() == RATEPROPS || mut->Type() == RATEMULTS){
+		//flex rates and omega muts come through here
+
+		//enforce an ordering of the rate multipliers, so that they can't "cross" one another
+		if(NRateCats() > 1)
+			CheckAndCorrectRateOrdering();
+
+		if(modSpec->IsFlexRateHet() == true)
+			NormalizeRates();
+		else if(modSpec->IsCodon()){
+			//this normalization could really be taken care of in the mutator, but this general purpose
+			//function does a better job of enforcing minimum values
+			NormalizeSumConstrainedValues(&omegaProbs[0], NRateCats(), ONE_POINT_ZERO, 1.0e-5, -1);
+			//eigen stuff needs to be recalced for changes to nonsynonymous rates
+			eigenDirty = true;
+			}
+		retType=Individual::alpha;
+		}
+	else if(mut->Type() == INSERTPROPORTION || mut->Type() == DELETERATE){
+		retType=Individual::indel;
+		}
+	return retType;
+	}
+
+
+BaseParameter *Model::SelectModelMutation(){
+	CalcMutationProbsFromWeights();
+	if(paramsToMutate.empty() == true) return NULL;
+	FLOAT_TYPE r=rnd.uniform();
+	vector<BaseParameter*>::iterator it;
+	for(it=paramsToMutate.begin();it!=paramsToMutate.end();it++){
+		if((*it)->GetProb() > r) return *it;
+		}
+	it--;
+	return *it;
+	}
+
+void Model::CalcMutationProbsFromWeights(){
+	FLOAT_TYPE tot=ZERO_POINT_ZERO, running=ZERO_POINT_ZERO;
+	for(vector<BaseParameter*>::iterator it=paramsToMutate.begin();it!=paramsToMutate.end();it++){
+		tot += (*it)->GetWeight();
+		}
+	for(vector<BaseParameter*>::iterator it=paramsToMutate.begin();it!=paramsToMutate.end();it++){
+		running += (*it)->GetWeight() / tot;
+		(*it)->SetProb(running);
+		}
+	}
+
+FLOAT_TYPE Model::GetTotalModelMutationWeight(){
+	FLOAT_TYPE tot=ZERO_POINT_ZERO;
+	for(vector<BaseParameter*>::iterator it=paramsToMutate.begin();it!=paramsToMutate.end();it++){
+		tot += (*it)->GetWeight();
+		}
+	return tot;
+	}
+
+/*
+void Model::OutputBinaryFormattedModel(OUTPUT_CLASS &out) const{
+	FLOAT_TYPE *r = new FLOAT_TYPE;
+	for(int i=0;i<5;i++){
+		*r = Rates(i);
+		out.write((char *) r, sizeof(FLOAT_TYPE));
+		}
+	for(int i=0;i<NStates();i++){
+		*r = StateFreq(i);
+		out.write((char *) r, sizeof(FLOAT_TYPE));
+		}
+	
+	if(modSpec->flexRates==true){
+		for(int i=0;i<NRateCats();i++){
+			out.write((char *) &rateMults[i], sizeof(FLOAT_TYPE));
+			out.write((char *) &rateProbs[i], sizeof(FLOAT_TYPE));
+			}
+		}
+	else{
+		if(NRateCats()>1){
+			*r = Alpha();
+			out.write((char *) r, sizeof(FLOAT_TYPE));
+			}
+		}
+	if(PropInvar()!=ZERO_POINT_ZERO){
+		*r = PropInvar();
+		out.write((char *) r, sizeof(FLOAT_TYPE));
+		}
+	delete r;
+	}
+*/
+
+void Model::OutputBinaryFormattedModel(OUTPUT_CLASS &out) const{
+	FLOAT_TYPE *r = new FLOAT_TYPE;
+	// 1/17/14 The assert here was diallowing non-sequence data to be checkpointed.  Don't recall that being intentional, and tests run fine.
+	// Added check of number of rates to avoid section entirely in non-sequence case
+	if(NumRelRates() > 0 && (modSpec->IsAminoAcid() == false || modSpec->IsUserSpecifiedRateMatrix() || modSpec->IsEstimateAAMatrix() || modSpec->IsTwoSerineRateMatrix())){
+		if(modSpec->IsAminoAcid())
+			assert(NumRelRates() == 190 || NumRelRates() == 210);
+//		else
+//			assert(NumRelRates() == 6);
+		for(int i=0;i<NumRelRates();i++){
+			*r = Rates(i);
+			out.WRITE_TO_FILE(r, sizeof(FLOAT_TYPE), 1);
+			}
+		}
+	//for codon models, output omega(s)
+	if(modSpec->IsCodon()){
+		for(int i=0;i<omegas.size();i++){
+			*r = *omegas[i];
+			out.WRITE_TO_FILE(r, sizeof(FLOAT_TYPE), 1);
+			*r = *omegaProbs[i];
+			out.WRITE_TO_FILE(r, sizeof(FLOAT_TYPE), 1);
+			}
+		}
+
+	//these may not actually be free params, but output them anyway
+	for(int i=0;i<NStates();i++){
+		*r = StateFreq(i);
+		out.WRITE_TO_FILE(r, sizeof(FLOAT_TYPE), 1);
+		}
+	
+	if(modSpec->IsFlexRateHet()){
+		for(int i=0;i<NRateCats();i++){
+			out.WRITE_TO_FILE(&rateMults[i], sizeof(FLOAT_TYPE), 1);
+			out.WRITE_TO_FILE(&rateProbs[i], sizeof(FLOAT_TYPE), 1);
+			}
+		}
+	else if(modSpec->IsGammaRateHet()){
+		*r = Alpha();
+		out.WRITE_TO_FILE(r, sizeof(FLOAT_TYPE), 1);
+		}
+	if(PropInvar()!=ZERO_POINT_ZERO){
+		*r = PropInvar();
+		out.WRITE_TO_FILE(r, sizeof(FLOAT_TYPE), 1);
+		}
+
+	if(IsOrientedGap()){
+		*r = *insertRate;
+		out.WRITE_TO_FILE(r, sizeof(FLOAT_TYPE), 1);
+
+		*r = *deleteRate;
+		out.WRITE_TO_FILE(r, sizeof(FLOAT_TYPE), 1);
+		}
+
+	delete r;
+	}
+
+void Model::ReadBinaryFormattedModel(FILE *in){
+	// 1/17/14 The assert here was diallowing non-sequence data to be checkpointed.  Don't recall that being intentional, and tests run fine.
+	// Added check of number of rates to avoid section entirely in non-sequence case
+	if(NumRelRates() > 0 && (modSpec->IsAminoAcid() == false || modSpec->IsUserSpecifiedRateMatrix() || modSpec->IsEstimateAAMatrix() || modSpec->IsTwoSerineRateMatrix())){
+		if(modSpec->IsAminoAcid())
+			assert(NumRelRates() == 190 || NumRelRates() == 210);
+//		else
+//			assert(NumRelRates() == 6);
+		FLOAT_TYPE *r = new FLOAT_TYPE[NumRelRates()];
+		for(int i=0;i<NumRelRates();i++){
+			assert(ferror(in) == false);
+			fread(r+i, sizeof(FLOAT_TYPE), 1, in);
+			}
+		SetRmat(r, false, false);
+		delete []r;
+		}
+
+	if(modSpec->IsCodon()){
+		FLOAT_TYPE o;
+		for(int i=0;i<omegas.size();i++){
+			fread(&o, sizeof(FLOAT_TYPE), 1, in);
+			*omegas[i] = o;
+			fread(&o, sizeof(FLOAT_TYPE), 1, in);
+			*omegaProbs[i] = o;
+			}
+		}	
+
+	FLOAT_TYPE *b = new FLOAT_TYPE[NStates()];
+	for(int i=0;i<NStates();i++){
+		fread((char*) &(b[i]), sizeof(FLOAT_TYPE), 1, in);
+		}
+	SetPis(b, false, false);
+	delete []b;
+
+	if(modSpec->IsFlexRateHet()){
+		for(int i=0;i<NRateCats();i++){
+			fread((char*) &(rateMults[i]), sizeof(FLOAT_TYPE), 1, in);
+			fread((char*) &(rateProbs[i]), sizeof(FLOAT_TYPE), 1, in);
+			}
+		}
+	else{
+		if(modSpec->IsGammaRateHet()){
+			FLOAT_TYPE a;
+			assert(ferror(in) == false);
+			fread((char*) &a, sizeof(FLOAT_TYPE), 1, in);
+			SetAlpha(a, false);
+			}
+		}
+	if(PropInvar()!=ZERO_POINT_ZERO){
+		FLOAT_TYPE p;
+		fread((char*) &p, sizeof(FLOAT_TYPE), 1, in);
+		SetPinv(p, false);
+		}
+	if(IsOrientedGap()){
+		FLOAT_TYPE x;
+		fread((char*) &x, sizeof(FLOAT_TYPE), 1, in);
+		*insertRate = x;
+
+		fread((char*) &x, sizeof(FLOAT_TYPE), 1, in);
+		*deleteRate = x;
+		}
+	}
+
+void Model::MultiplyByJonesAAMatrix(){
+	int modNum=0;
+	MODEL_FLOAT **qmatOffset = qmat[modNum];
+
+	qmatOffset[0][1] *= 0.056; qmatOffset[1][0] *= 0.056; qmatOffset[0][2] *= 0.081; qmatOffset[2][0] *= 0.081; qmatOffset[0][3] *= 0.105; qmatOffset[3][0] *= 0.105; 
+	qmatOffset[0][4] *= 0.015; qmatOffset[4][0] *= 0.015; qmatOffset[0][5] *= 0.179; qmatOffset[5][0] *= 0.179; qmatOffset[0][6] *= 0.027; qmatOffset[6][0] *= 0.027; 
+	qmatOffset[0][7] *= 0.036; qmatOffset[7][0] *= 0.036; qmatOffset[0][8] *= 0.035; qmatOffset[8][0] *= 0.035; qmatOffset[0][9] *= 0.03; qmatOffset[9][0] *= 0.03; 
+	qmatOffset[0][10] *= 0.054; qmatOffset[10][0] *= 0.054; qmatOffset[0][11] *= 0.054; qmatOffset[11][0] *= 0.054; qmatOffset[0][12] *= 0.194; qmatOffset[12][0] *= 0.194; 
+	qmatOffset[0][13] *= 0.057; qmatOffset[13][0] *= 0.057; qmatOffset[0][14] *= 0.058; qmatOffset[14][0] *= 0.058; qmatOffset[0][15] *= 0.378; qmatOffset[15][0] *= 0.378; 
+	qmatOffset[0][16] *= 0.475; qmatOffset[16][0] *= 0.475; qmatOffset[0][17] *= 0.298; qmatOffset[17][0] *= 0.298; qmatOffset[0][18] *= 0.009; qmatOffset[18][0] *= 0.009; 
+	qmatOffset[0][19] *= 0.011; qmatOffset[19][0] *= 0.011; qmatOffset[1][2] *= 0.01; qmatOffset[2][1] *= 0.01; qmatOffset[1][3] *= 0.005; qmatOffset[3][1] *= 0.005; 
+	qmatOffset[1][4] *= 0.078; qmatOffset[4][1] *= 0.078; qmatOffset[1][5] *= 0.059; qmatOffset[5][1] *= 0.059; qmatOffset[1][6] *= 0.069; qmatOffset[6][1] *= 0.069; 
+	qmatOffset[1][7] *= 0.017; qmatOffset[7][1] *= 0.017; qmatOffset[1][8] *= 0.007; qmatOffset[8][1] *= 0.007; qmatOffset[1][9] *= 0.023; qmatOffset[9][1] *= 0.023; 
+	qmatOffset[1][10] *= 0.031; qmatOffset[10][1] *= 0.031; qmatOffset[1][11] *= 0.034; qmatOffset[11][1] *= 0.034; qmatOffset[1][12] *= 0.014; qmatOffset[12][1] *= 0.014; 
+	qmatOffset[1][13] *= 0.009; qmatOffset[13][1] *= 0.009; qmatOffset[1][14] *= 0.113; qmatOffset[14][1] *= 0.113; qmatOffset[1][15] *= 0.223; qmatOffset[15][1] *= 0.223; 
+	qmatOffset[1][16] *= 0.042; qmatOffset[16][1] *= 0.042; qmatOffset[1][17] *= 0.062; qmatOffset[17][1] *= 0.062; qmatOffset[1][18] *= 0.115; qmatOffset[18][1] *= 0.115; 
+	qmatOffset[1][19] *= 0.209; qmatOffset[19][1] *= 0.209; qmatOffset[2][3] *= 0.767; qmatOffset[3][2] *= 0.767; qmatOffset[2][4] *= 0.004; qmatOffset[4][2] *= 0.004; 
+	qmatOffset[2][5] *= 0.13; qmatOffset[5][2] *= 0.13; qmatOffset[2][6] *= 0.112; qmatOffset[6][2] *= 0.112; qmatOffset[2][7] *= 0.011; qmatOffset[7][2] *= 0.011; 
+	qmatOffset[2][8] *= 0.026; qmatOffset[8][2] *= 0.026; qmatOffset[2][9] *= 0.007; qmatOffset[9][2] *= 0.007; qmatOffset[2][10] *= 0.015; qmatOffset[10][2] *= 0.015; 
+	qmatOffset[2][11] *= 0.528; qmatOffset[11][2] *= 0.528; qmatOffset[2][12] *= 0.015; qmatOffset[12][2] *= 0.015; qmatOffset[2][13] *= 0.049; qmatOffset[13][2] *= 0.049; 
+	qmatOffset[2][14] *= 0.016; qmatOffset[14][2] *= 0.016; qmatOffset[2][15] *= 0.059; qmatOffset[15][2] *= 0.059; qmatOffset[2][16] *= 0.038; qmatOffset[16][2] *= 0.038; 
+	qmatOffset[2][17] *= 0.031; qmatOffset[17][2] *= 0.031; qmatOffset[2][18] *= 0.004; qmatOffset[18][2] *= 0.004; qmatOffset[2][19] *= 0.046; qmatOffset[19][2] *= 0.046; 
+	qmatOffset[3][4] *= 0.005; qmatOffset[4][3] *= 0.005; qmatOffset[3][5] *= 0.119; qmatOffset[5][3] *= 0.119; qmatOffset[3][6] *= 0.026; qmatOffset[6][3] *= 0.026; 
+	qmatOffset[3][7] *= 0.012; qmatOffset[7][3] *= 0.012; qmatOffset[3][8] *= 0.181; qmatOffset[8][3] *= 0.181; qmatOffset[3][9] *= 0.009; qmatOffset[9][3] *= 0.009; 
+	qmatOffset[3][10] *= 0.018; qmatOffset[10][3] *= 0.018; qmatOffset[3][11] *= 0.058; qmatOffset[11][3] *= 0.058; qmatOffset[3][12] *= 0.018; qmatOffset[12][3] *= 0.018; 
+	qmatOffset[3][13] *= 0.323; qmatOffset[13][3] *= 0.323; qmatOffset[3][14] *= 0.029; qmatOffset[14][3] *= 0.029; qmatOffset[3][15] *= 0.03; qmatOffset[15][3] *= 0.03; 
+	qmatOffset[3][16] *= 0.032; qmatOffset[16][3] *= 0.032; qmatOffset[3][17] *= 0.045; qmatOffset[17][3] *= 0.045; qmatOffset[3][18] *= 0.01; qmatOffset[18][3] *= 0.01; 
+	qmatOffset[3][19] *= 0.007; qmatOffset[19][3] *= 0.007; qmatOffset[4][5] *= 0.005; qmatOffset[5][4] *= 0.005; qmatOffset[4][6] *= 0.04; qmatOffset[6][4] *= 0.04; 
+	qmatOffset[4][7] *= 0.089; qmatOffset[7][4] *= 0.089; qmatOffset[4][8] *= 0.004; qmatOffset[8][4] *= 0.004; qmatOffset[4][9] *= 0.248; qmatOffset[9][4] *= 0.248; 
+	qmatOffset[4][10] *= 0.043; qmatOffset[10][4] *= 0.043; qmatOffset[4][11] *= 0.01; qmatOffset[11][4] *= 0.01; qmatOffset[4][12] *= 0.017; qmatOffset[12][4] *= 0.017; 
+	qmatOffset[4][13] *= 0.004; qmatOffset[13][4] *= 0.004; qmatOffset[4][14] *= 0.005; qmatOffset[14][4] *= 0.005; qmatOffset[4][15] *= 0.092; qmatOffset[15][4] *= 0.092; 
+	qmatOffset[4][16] *= 0.012; qmatOffset[16][4] *= 0.012; qmatOffset[4][17] *= 0.062; qmatOffset[17][4] *= 0.062; qmatOffset[4][18] *= 0.053; qmatOffset[18][4] *= 0.053; 
+	qmatOffset[4][19] *= 0.536; qmatOffset[19][4] *= 0.536; qmatOffset[5][6] *= 0.023; qmatOffset[6][5] *= 0.023; qmatOffset[5][7] *= 0.006; qmatOffset[7][5] *= 0.006; 
+	qmatOffset[5][8] *= 0.027; qmatOffset[8][5] *= 0.027; qmatOffset[5][9] *= 0.006; qmatOffset[9][5] *= 0.006; qmatOffset[5][10] *= 0.014; qmatOffset[10][5] *= 0.014;
+	qmatOffset[5][11] *= 0.081; qmatOffset[11][5] *= 0.081; qmatOffset[5][12] *= 0.024; qmatOffset[12][5] *= 0.024; qmatOffset[5][13] *= 0.026; qmatOffset[13][5] *= 0.026; 
+	qmatOffset[5][14] *= 0.137; qmatOffset[14][5] *= 0.137; qmatOffset[5][15] *= 0.201; qmatOffset[15][5] *= 0.201; qmatOffset[5][16] *= 0.033; qmatOffset[16][5] *= 0.033; 
+	qmatOffset[5][17] *= 0.047; qmatOffset[17][5] *= 0.047; qmatOffset[5][18] *= 0.055; qmatOffset[18][5] *= 0.055; qmatOffset[5][19] *= 0.008; qmatOffset[19][5] *= 0.008; 
+	qmatOffset[6][7] *= 0.016; qmatOffset[7][6] *= 0.016; qmatOffset[6][8] *= 0.045; qmatOffset[8][6] *= 0.045; qmatOffset[6][9] *= 0.056; qmatOffset[9][6] *= 0.056; 
+	qmatOffset[6][10] *= 0.033; qmatOffset[10][6] *= 0.033; qmatOffset[6][11] *= 0.391; qmatOffset[11][6] *= 0.391; qmatOffset[6][12] *= 0.115; qmatOffset[12][6] *= 0.115; 
+	qmatOffset[6][13] *= 0.597; qmatOffset[13][6] *= 0.597; qmatOffset[6][14] *= 0.328; qmatOffset[14][6] *= 0.328; qmatOffset[6][15] *= 0.073; qmatOffset[15][6] *= 0.073; 
+	qmatOffset[6][16] *= 0.046; qmatOffset[16][6] *= 0.046; qmatOffset[6][17] *= 0.011; qmatOffset[17][6] *= 0.011; qmatOffset[6][18] *= 0.008; qmatOffset[18][6] *= 0.008; 
+	qmatOffset[6][19] *= 0.573; qmatOffset[19][6] *= 0.573; qmatOffset[7][8] *= 0.021; qmatOffset[8][7] *= 0.021; qmatOffset[7][9] *= 0.229; qmatOffset[9][7] *= 0.229; 
+	qmatOffset[7][10] *= 0.479; qmatOffset[10][7] *= 0.479; qmatOffset[7][11] *= 0.047; qmatOffset[11][7] *= 0.047; qmatOffset[7][12] *= 0.01; qmatOffset[12][7] *= 0.01; 
+	qmatOffset[7][13] *= 0.009; qmatOffset[13][7] *= 0.009; qmatOffset[7][14] *= 0.022; qmatOffset[14][7] *= 0.022; qmatOffset[7][15] *= 0.04; qmatOffset[15][7] *= 0.04; 
+	qmatOffset[7][16] *= 0.245; qmatOffset[16][7] *= 0.245; qmatOffset[7][17] *= 0.961; qmatOffset[17][7] *= 0.961; qmatOffset[7][18] *= 0.009; qmatOffset[18][7] *= 0.009; 
+	qmatOffset[7][19] *= 0.032; qmatOffset[19][7] *= 0.032; qmatOffset[8][9] *= 0.014; qmatOffset[9][8] *= 0.014; qmatOffset[8][10] *= 0.065; qmatOffset[10][8] *= 0.065; 
+	qmatOffset[8][11] *= 0.263; qmatOffset[11][8] *= 0.263; qmatOffset[8][12] *= 0.021; qmatOffset[12][8] *= 0.021; qmatOffset[8][13] *= 0.292; qmatOffset[13][8] *= 0.292; 
+	qmatOffset[8][14] *= 0.646; qmatOffset[14][8] *= 0.646; qmatOffset[8][15] *= 0.047; qmatOffset[15][8] *= 0.047; qmatOffset[8][16] *= 0.103; qmatOffset[16][8] *= 0.103; 
+	qmatOffset[8][17] *= 0.014; qmatOffset[17][8] *= 0.014; qmatOffset[8][18] *= 0.01; qmatOffset[18][8] *= 0.01; qmatOffset[8][19] *= 0.008; qmatOffset[19][8] *= 0.008; 
+	qmatOffset[9][10] *= 0.388; qmatOffset[10][9] *= 0.388; qmatOffset[9][11] *= 0.012; qmatOffset[11][9] *= 0.012; qmatOffset[9][12] *= 0.102; qmatOffset[12][9] *= 0.102; 
+	qmatOffset[9][13] *= 0.072; qmatOffset[13][9] *= 0.072; qmatOffset[9][14] *= 0.038; qmatOffset[14][9] *= 0.038; qmatOffset[9][15] *= 0.059; qmatOffset[15][9] *= 0.059; 
+	qmatOffset[9][16] *= 0.025; qmatOffset[16][9] *= 0.025; qmatOffset[9][17] *= 0.18; qmatOffset[17][9] *= 0.18; qmatOffset[9][18] *= 0.052; qmatOffset[18][9] *= 0.052; 
+	qmatOffset[9][19] *= 0.024; qmatOffset[19][9] *= 0.024; qmatOffset[10][11] *= 0.03; qmatOffset[11][10] *= 0.03; qmatOffset[10][12] *= 0.016; qmatOffset[12][10] *= 0.016; 
+	qmatOffset[10][13] *= 0.043; qmatOffset[13][10] *= 0.043; qmatOffset[10][14] *= 0.044; qmatOffset[14][10] *= 0.044; qmatOffset[10][15] *= 0.029; qmatOffset[15][10] *= 0.029; 
+	qmatOffset[10][16] *= 0.226; qmatOffset[16][10] *= 0.226; qmatOffset[10][17] *= 0.323; qmatOffset[17][10] *= 0.323; qmatOffset[10][18] *= 0.024; qmatOffset[18][10] *= 0.024; 
+	qmatOffset[10][19] *= 0.018; qmatOffset[19][10] *= 0.018; qmatOffset[11][12] *= 0.015; qmatOffset[12][11] *= 0.015; qmatOffset[11][13] *= 0.086; qmatOffset[13][11] *= 0.086; 
+	qmatOffset[11][14] *= 0.045; qmatOffset[14][11] *= 0.045; qmatOffset[11][15] *= 0.503; qmatOffset[15][11] *= 0.503; qmatOffset[11][16] *= 0.232; qmatOffset[16][11] *= 0.232; 
+	qmatOffset[11][17] *= 0.016; qmatOffset[17][11] *= 0.016; qmatOffset[11][18] *= 0.008; qmatOffset[18][11] *= 0.008; qmatOffset[11][19] *= 0.07; qmatOffset[19][11] *= 0.07; 
+	qmatOffset[12][13] *= 0.164; qmatOffset[13][12] *= 0.164; qmatOffset[12][14] *= 0.074; qmatOffset[14][12] *= 0.074; qmatOffset[12][15] *= 0.285; qmatOffset[15][12] *= 0.285; 
+	qmatOffset[12][16] *= 0.118; qmatOffset[16][12] *= 0.118; qmatOffset[12][17] *= 0.023; qmatOffset[17][12] *= 0.023; qmatOffset[12][18] *= 0.006; qmatOffset[18][12] *= 0.006; 
+	qmatOffset[12][19] *= 0.01; qmatOffset[19][12] *= 0.01; qmatOffset[13][14] *= 0.31; qmatOffset[14][13] *= 0.31; qmatOffset[13][15] *= 0.053; qmatOffset[15][13] *= 0.053; 
+	qmatOffset[13][16] *= 0.051; qmatOffset[16][13] *= 0.051; qmatOffset[13][17] *= 0.02; qmatOffset[17][13] *= 0.02; qmatOffset[13][18] *= 0.018; qmatOffset[18][13] *= 0.018; 
+	qmatOffset[13][19] *= 0.024; qmatOffset[19][13] *= 0.024; qmatOffset[14][15] *= 0.101; qmatOffset[15][14] *= 0.101; qmatOffset[14][16] *= 0.064; qmatOffset[16][14] *= 0.064; 
+	qmatOffset[14][17] *= 0.017; qmatOffset[17][14] *= 0.017; qmatOffset[14][18] *= 0.126; qmatOffset[18][14] *= 0.126; qmatOffset[14][19] *= 0.02; qmatOffset[19][14] *= 0.02; 
+	qmatOffset[15][16] *= 0.477; qmatOffset[16][15] *= 0.477; qmatOffset[15][17] *= 0.038; qmatOffset[17][15] *= 0.038; qmatOffset[15][18] *= 0.035; qmatOffset[18][15] *= 0.035; 
+	qmatOffset[15][19] *= 0.063; qmatOffset[19][15] *= 0.063; qmatOffset[16][17] *= 0.112; qmatOffset[17][16] *= 0.112; qmatOffset[16][18] *= 0.012; qmatOffset[18][16] *= 0.012; 
+	qmatOffset[16][19] *= 0.021; qmatOffset[19][16] *= 0.021; qmatOffset[17][18] *= 0.025; qmatOffset[18][17] *= 0.025; qmatOffset[17][19] *= 0.016; qmatOffset[19][17] *= 0.016; 
+	qmatOffset[18][19] *= 0.071; qmatOffset[19][18] *= 0.071;
+	}
+
+void Model::MultiplyByMtMamAAMatrix(){
+	int modNum=0;
+	MODEL_FLOAT **qmatOffset = qmat[modNum];
+
+	qmatOffset [ 0 ][ 14 ] *= 0.0337 ; qmatOffset [ 14 ][ 0 ] *= 0.0337 ;
+	qmatOffset [ 0 ][ 11 ] *= 0.0021 ; qmatOffset [ 11 ][ 0 ] *= 0.0021 ;
+	qmatOffset [ 0 ][ 2 ] *= 0.0116 ; qmatOffset [ 2 ][ 0 ] *= 0.0116 ;
+	qmatOffset [ 0 ][ 1 ] *= 0.0000 ; qmatOffset [ 1 ][ 0 ] *= 0.0000 ;
+	qmatOffset [ 0 ][ 13 ] *= 0.0000 ; qmatOffset [ 13 ][ 0 ] *= 0.0000 ;
+	qmatOffset [ 0 ][ 3 ] *= 0.0000 ; qmatOffset [ 3 ][ 0 ] *= 0.0000 ;
+	qmatOffset [ 0 ][ 5 ] *= 0.0821 ; qmatOffset [ 5 ][ 0 ] *= 0.0821 ;
+	qmatOffset [ 0 ][ 6 ] *= 0.0084 ; qmatOffset [ 6 ][ 0 ] *= 0.0084 ;
+	qmatOffset [ 0 ][ 7 ] *= 0.0790 ; qmatOffset [ 7 ][ 0 ] *= 0.0790 ;
+	qmatOffset [ 0 ][ 9 ] *= 0.0221 ; qmatOffset [ 9 ][ 0 ] *= 0.0221 ;
+	qmatOffset [ 0 ][ 8 ] *= 0.0000 ; qmatOffset [ 8 ][ 0 ] *= 0.0000 ;
+	qmatOffset [ 0 ][ 10 ] *= 0.0800 ; qmatOffset [ 10 ][ 0 ] *= 0.0800 ;
+	qmatOffset [ 0 ][ 4 ] *= 0.0000 ; qmatOffset [ 4 ][ 0 ] *= 0.0000 ;
+	qmatOffset [ 0 ][ 12 ] *= 0.0558 ; qmatOffset [ 12 ][ 0 ] *= 0.0558 ;
+	qmatOffset [ 0 ][ 15 ] *= 0.3601 ; qmatOffset [ 15 ][ 0 ] *= 0.3601 ;
+	qmatOffset [ 0 ][ 16 ] *= 0.7170 ; qmatOffset [ 16 ][ 0 ] *= 0.7170 ;
+	qmatOffset [ 0 ][ 18 ] *= 0.0053 ; qmatOffset [ 18 ][ 0 ] *= 0.0053 ;
+	qmatOffset [ 0 ][ 19 ] *= 0.0000 ; qmatOffset [ 19 ][ 0 ] *= 0.0000 ;
+	qmatOffset [ 0 ][ 17 ] *= 0.4191 ; qmatOffset [ 17 ][ 0 ] *= 0.4191 ;
+	qmatOffset [ 14 ][ 11 ] *= 0.0042 ; qmatOffset [ 11 ][ 14 ] *= 0.0042 ;
+	qmatOffset [ 14 ][ 2 ] *= 0.0000 ; qmatOffset [ 2 ][ 14 ] *= 0.0000 ;
+	qmatOffset [ 14 ][ 1 ] *= 0.1958 ; qmatOffset [ 1 ][ 14 ] *= 0.1958 ;
+	qmatOffset [ 14 ][ 13 ] *= 0.2590 ; qmatOffset [ 13 ][ 14 ] *= 0.2590 ;
+	qmatOffset [ 14 ][ 3 ] *= 0.0000 ; qmatOffset [ 3 ][ 14 ] *= 0.0000 ;
+	qmatOffset [ 14 ][ 5 ] *= 0.0190 ; qmatOffset [ 5 ][ 14 ] *= 0.0190 ;
+	qmatOffset [ 14 ][ 6 ] *= 0.2443 ; qmatOffset [ 6 ][ 14 ] *= 0.2443 ;
+	qmatOffset [ 14 ][ 7 ] *= 0.0000 ; qmatOffset [ 7 ][ 14 ] *= 0.0000 ;
+	qmatOffset [ 14 ][ 9 ] *= 0.0063 ; qmatOffset [ 9 ][ 14 ] *= 0.0063 ;
+	qmatOffset [ 14 ][ 8 ] *= 0.0526 ; qmatOffset [ 8 ][ 14 ] *= 0.0526 ;
+	qmatOffset [ 14 ][ 10 ] *= 0.0000 ; qmatOffset [ 10 ][ 14 ] *= 0.0000 ;
+	qmatOffset [ 14 ][ 4 ] *= 0.0000 ; qmatOffset [ 4 ][ 14 ] *= 0.0000 ;
+	qmatOffset [ 14 ][ 12 ] *= 0.0095 ; qmatOffset [ 12 ][ 14 ] *= 0.0095 ;
+	qmatOffset [ 14 ][ 15 ] *= 0.0032 ; qmatOffset [ 15 ][ 14 ] *= 0.0032 ;
+	qmatOffset [ 14 ][ 16 ] *= 0.0000 ; qmatOffset [ 16 ][ 14 ] *= 0.0000 ;
+	qmatOffset [ 14 ][ 18 ] *= 0.0168 ; qmatOffset [ 18 ][ 14 ] *= 0.0168 ;
+	qmatOffset [ 14 ][ 19 ] *= 0.0000 ; qmatOffset [ 19 ][ 14 ] *= 0.0000 ;
+	qmatOffset [ 14 ][ 17 ] *= 0.0000 ; qmatOffset [ 17 ][ 14 ] *= 0.0000 ;
+	qmatOffset [ 11 ][ 2 ] *= 0.9097 ; qmatOffset [ 2 ][ 11 ] *= 0.9097 ;
+	qmatOffset [ 11 ][ 1 ] *= 0.0000 ; qmatOffset [ 1 ][ 11 ] *= 0.0000 ;
+	qmatOffset [ 11 ][ 13 ] *= 0.0084 ; qmatOffset [ 13 ][ 11 ] *= 0.0084 ;
+	qmatOffset [ 11 ][ 3 ] *= 0.0000 ; qmatOffset [ 3 ][ 11 ] *= 0.0000 ;
+	qmatOffset [ 11 ][ 5 ] *= 0.0495 ; qmatOffset [ 5 ][ 11 ] *= 0.0495 ;
+	qmatOffset [ 11 ][ 6 ] *= 0.4822 ; qmatOffset [ 6 ][ 11 ] *= 0.4822 ;
+	qmatOffset [ 11 ][ 7 ] *= 0.0200 ; qmatOffset [ 7 ][ 11 ] *= 0.0200 ;
+	qmatOffset [ 11 ][ 9 ] *= 0.0000 ; qmatOffset [ 9 ][ 11 ] *= 0.0000 ;
+	qmatOffset [ 11 ][ 8 ] *= 0.4296 ; qmatOffset [ 8 ][ 11 ] *= 0.4296 ;
+	qmatOffset [ 11 ][ 10 ] *= 0.0221 ; qmatOffset [ 10 ][ 11 ] *= 0.0221 ;
+	qmatOffset [ 11 ][ 4 ] *= 0.0063 ; qmatOffset [ 4 ][ 11 ] *= 0.0063 ;
+	qmatOffset [ 11 ][ 12 ] *= 0.0347 ; qmatOffset [ 12 ][ 11 ] *= 0.0347 ;
+	qmatOffset [ 11 ][ 15 ] *= 0.4696 ; qmatOffset [ 15 ][ 11 ] *= 0.4696 ;
+	qmatOffset [ 11 ][ 16 ] *= 0.1158 ; qmatOffset [ 16 ][ 11 ] *= 0.1158 ;
+	qmatOffset [ 11 ][ 18 ] *= 0.0063 ; qmatOffset [ 18 ][ 11 ] *= 0.0063 ;
+	qmatOffset [ 11 ][ 19 ] *= 0.1643 ; qmatOffset [ 19 ][ 11 ] *= 0.1643 ;
+	qmatOffset [ 11 ][ 17 ] *= 0.0000 ; qmatOffset [ 17 ][ 11 ] *= 0.0000 ;
+	qmatOffset [ 2 ][ 1 ] *= 0.0000 ; qmatOffset [ 1 ][ 2 ] *= 0.0000 ;
+	qmatOffset [ 2 ][ 13 ] *= 0.0516 ; qmatOffset [ 13 ][ 2 ] *= 0.0516 ;
+	qmatOffset [ 2 ][ 3 ] *= 0.5991 ; qmatOffset [ 3 ][ 2 ] *= 0.5991 ;
+	qmatOffset [ 2 ][ 5 ] *= 0.0832 ; qmatOffset [ 5 ][ 2 ] *= 0.0832 ;
+	qmatOffset [ 2 ][ 6 ] *= 0.0116 ; qmatOffset [ 6 ][ 2 ] *= 0.0116 ;
+	qmatOffset [ 2 ][ 7 ] *= 0.0000 ; qmatOffset [ 7 ][ 2 ] *= 0.0000 ;
+	qmatOffset [ 2 ][ 9 ] *= 0.0000 ; qmatOffset [ 9 ][ 2 ] *= 0.0000 ;
+	qmatOffset [ 2 ][ 8 ] *= 0.0000 ; qmatOffset [ 8 ][ 2 ] *= 0.0000 ;
+	qmatOffset [ 2 ][ 10 ] *= 0.0000 ; qmatOffset [ 10 ][ 2 ] *= 0.0000 ;
+	qmatOffset [ 2 ][ 4 ] *= 0.0053 ; qmatOffset [ 4 ][ 2 ] *= 0.0053 ;
+	qmatOffset [ 2 ][ 12 ] *= 0.0021 ; qmatOffset [ 12 ][ 2 ] *= 0.0021 ;
+	qmatOffset [ 2 ][ 15 ] *= 0.0168 ; qmatOffset [ 15 ][ 2 ] *= 0.0168 ;
+	qmatOffset [ 2 ][ 16 ] *= 0.0000 ; qmatOffset [ 16 ][ 2 ] *= 0.0000 ;
+	qmatOffset [ 2 ][ 18 ] *= 0.0000 ; qmatOffset [ 18 ][ 2 ] *= 0.0000 ;
+	qmatOffset [ 2 ][ 19 ] *= 0.0000 ; qmatOffset [ 19 ][ 2 ] *= 0.0000 ;
+	qmatOffset [ 2 ][ 17 ] *= 0.0105 ; qmatOffset [ 17 ][ 2 ] *= 0.0105 ;
+	qmatOffset [ 1 ][ 13 ] *= 0.0000 ; qmatOffset [ 13 ][ 1 ] *= 0.0000 ;
+	qmatOffset [ 1 ][ 3 ] *= 0.0000 ; qmatOffset [ 3 ][ 1 ] *= 0.0000 ;
+	qmatOffset [ 1 ][ 5 ] *= 0.0000 ; qmatOffset [ 5 ][ 1 ] *= 0.0000 ;
+	qmatOffset [ 1 ][ 6 ] *= 0.3211 ; qmatOffset [ 6 ][ 1 ] *= 0.3211 ;
+	qmatOffset [ 1 ][ 7 ] *= 0.0432 ; qmatOffset [ 7 ][ 1 ] *= 0.0432 ;
+	qmatOffset [ 1 ][ 9 ] *= 0.0284 ; qmatOffset [ 9 ][ 1 ] *= 0.0284 ;
+	qmatOffset [ 1 ][ 8 ] *= 0.0000 ; qmatOffset [ 8 ][ 1 ] *= 0.0000 ;
+	qmatOffset [ 1 ][ 10 ] *= 0.0000 ; qmatOffset [ 10 ][ 1 ] *= 0.0000 ;
+	qmatOffset [ 1 ][ 4 ] *= 0.0074 ; qmatOffset [ 4 ][ 1 ] *= 0.0074 ;
+	qmatOffset [ 1 ][ 12 ] *= 0.0000 ; qmatOffset [ 12 ][ 1 ] *= 0.0000 ;
+	qmatOffset [ 1 ][ 15 ] *= 0.3654 ; qmatOffset [ 15 ][ 1 ] *= 0.3654 ;
+	qmatOffset [ 1 ][ 16 ] *= 0.1200 ; qmatOffset [ 16 ][ 1 ] *= 0.1200 ;
+	qmatOffset [ 1 ][ 18 ] *= 0.0684 ; qmatOffset [ 18 ][ 1 ] *= 0.0684 ;
+	qmatOffset [ 1 ][ 19 ] *= 0.5580 ; qmatOffset [ 19 ][ 1 ] *= 0.5580 ;
+	qmatOffset [ 1 ][ 17 ] *= 0.0000 ; qmatOffset [ 17 ][ 1 ] *= 0.0000 ;
+	qmatOffset [ 13 ][ 3 ] *= 0.2885 ; qmatOffset [ 3 ][ 13 ] *= 0.2885 ;
+	qmatOffset [ 13 ][ 5 ] *= 0.0000 ; qmatOffset [ 5 ][ 13 ] *= 0.0000 ;
+	qmatOffset [ 13 ][ 6 ] *= 0.5791 ; qmatOffset [ 6 ][ 13 ] *= 0.5791 ;
+	qmatOffset [ 13 ][ 7 ] *= 0.0000 ; qmatOffset [ 7 ][ 13 ] *= 0.0000 ;
+	qmatOffset [ 13 ][ 9 ] *= 0.0211 ; qmatOffset [ 9 ][ 13 ] *= 0.0211 ;
+	qmatOffset [ 13 ][ 8 ] *= 0.2548 ; qmatOffset [ 8 ][ 13 ] *= 0.2548 ;
+	qmatOffset [ 13 ][ 10 ] *= 0.0232 ; qmatOffset [ 10 ][ 13 ] *= 0.0232 ;
+	qmatOffset [ 13 ][ 4 ] *= 0.0000 ; qmatOffset [ 4 ][ 13 ] *= 0.0000 ;
+	qmatOffset [ 13 ][ 12 ] *= 0.0537 ; qmatOffset [ 12 ][ 13 ] *= 0.0537 ;
+	qmatOffset [ 13 ][ 15 ] *= 0.0316 ; qmatOffset [ 15 ][ 13 ] *= 0.0316 ;
+	qmatOffset [ 13 ][ 16 ] *= 0.0000 ; qmatOffset [ 16 ][ 13 ] *= 0.0000 ;
+	qmatOffset [ 13 ][ 18 ] *= 0.0000 ; qmatOffset [ 18 ][ 13 ] *= 0.0000 ;
+	qmatOffset [ 13 ][ 19 ] *= 0.0569 ; qmatOffset [ 19 ][ 13 ] *= 0.0569 ;
+	qmatOffset [ 13 ][ 17 ] *= 0.0347 ; qmatOffset [ 17 ][ 13 ] *= 0.0347 ;
+	qmatOffset [ 3 ][ 5 ] *= 0.0232 ; qmatOffset [ 5 ][ 3 ] *= 0.0232 ;
+	qmatOffset [ 3 ][ 6 ] *= 0.0232 ; qmatOffset [ 6 ][ 3 ] *= 0.0232 ;
+	qmatOffset [ 3 ][ 7 ] *= 0.0000 ; qmatOffset [ 7 ][ 3 ] *= 0.0000 ;
+	qmatOffset [ 3 ][ 9 ] *= 0.0000 ; qmatOffset [ 9 ][ 3 ] *= 0.0000 ;
+	qmatOffset [ 3 ][ 8 ] *= 0.2264 ; qmatOffset [ 8 ][ 3 ] *= 0.2264 ;
+	qmatOffset [ 3 ][ 10 ] *= 0.0000 ; qmatOffset [ 10 ][ 3 ] *= 0.0000 ;
+	qmatOffset [ 3 ][ 4 ] *= 0.0000 ; qmatOffset [ 4 ][ 3 ] *= 0.0000 ;
+	qmatOffset [ 3 ][ 12 ] *= 0.0000 ; qmatOffset [ 12 ][ 3 ] *= 0.0000 ;
+	qmatOffset [ 3 ][ 15 ] *= 0.0221 ; qmatOffset [ 15 ][ 3 ] *= 0.0221 ;
+	qmatOffset [ 3 ][ 16 ] *= 0.0042 ; qmatOffset [ 16 ][ 3 ] *= 0.0042 ;
+	qmatOffset [ 3 ][ 18 ] *= 0.0000 ; qmatOffset [ 18 ][ 3 ] *= 0.0000 ;
+	qmatOffset [ 3 ][ 19 ] *= 0.0000 ; qmatOffset [ 19 ][ 3 ] *= 0.0000 ;
+	qmatOffset [ 3 ][ 17 ] *= 0.0211 ; qmatOffset [ 17 ][ 3 ] *= 0.0211 ;
+	qmatOffset [ 5 ][ 6 ] *= 0.0000 ; qmatOffset [ 6 ][ 5 ] *= 0.0000 ;
+	qmatOffset [ 5 ][ 7 ] *= 0.0000 ; qmatOffset [ 7 ][ 5 ] *= 0.0000 ;
+	qmatOffset [ 5 ][ 9 ] *= 0.0000 ; qmatOffset [ 9 ][ 5 ] *= 0.0000 ;
+	qmatOffset [ 5 ][ 8 ] *= 0.0000 ; qmatOffset [ 8 ][ 5 ] *= 0.0000 ;
+	qmatOffset [ 5 ][ 10 ] *= 0.0000 ; qmatOffset [ 10 ][ 5 ] *= 0.0000 ;
+	qmatOffset [ 5 ][ 4 ] *= 0.0000 ; qmatOffset [ 4 ][ 5 ] *= 0.0000 ;
+	qmatOffset [ 5 ][ 12 ] *= 0.0000 ; qmatOffset [ 12 ][ 5 ] *= 0.0000 ;
+	qmatOffset [ 5 ][ 15 ] *= 0.1179 ; qmatOffset [ 15 ][ 5 ] *= 0.1179 ;
+	qmatOffset [ 5 ][ 16 ] *= 0.0000 ; qmatOffset [ 16 ][ 5 ] *= 0.0000 ;
+	qmatOffset [ 5 ][ 18 ] *= 0.0000 ; qmatOffset [ 18 ][ 5 ] *= 0.0000 ;
+	qmatOffset [ 5 ][ 19 ] *= 0.0011 ; qmatOffset [ 19 ][ 5 ] *= 0.0011 ;
+	qmatOffset [ 5 ][ 17 ] *= 0.0053 ; qmatOffset [ 17 ][ 5 ] *= 0.0053 ;
+	qmatOffset [ 6 ][ 7 ] *= 0.0000 ; qmatOffset [ 7 ][ 6 ] *= 0.0000 ;
+	qmatOffset [ 6 ][ 9 ] *= 0.0274 ; qmatOffset [ 9 ][ 6 ] *= 0.0274 ;
+	qmatOffset [ 6 ][ 8 ] *= 0.0000 ; qmatOffset [ 8 ][ 6 ] *= 0.0000 ;
+	qmatOffset [ 6 ][ 10 ] *= 0.0000 ; qmatOffset [ 10 ][ 6 ] *= 0.0000 ;
+	qmatOffset [ 6 ][ 4 ] *= 0.0000 ; qmatOffset [ 4 ][ 6 ] *= 0.0000 ;
+	qmatOffset [ 6 ][ 12 ] *= 0.0558 ; qmatOffset [ 12 ][ 6 ] *= 0.0558 ;
+	qmatOffset [ 6 ][ 15 ] *= 0.0211 ; qmatOffset [ 15 ][ 6 ] *= 0.0211 ;
+	qmatOffset [ 6 ][ 16 ] *= 0.0011 ; qmatOffset [ 16 ][ 6 ] *= 0.0011 ;
+	qmatOffset [ 6 ][ 18 ] *= 0.0000 ; qmatOffset [ 18 ][ 6 ] *= 0.0000 ;
+	qmatOffset [ 6 ][ 19 ] *= 1.6057 ; qmatOffset [ 19 ][ 6 ] *= 1.6057 ;
+	qmatOffset [ 6 ][ 17 ] *= 0.0000 ; qmatOffset [ 17 ][ 6 ] *= 0.0000 ;
+	qmatOffset [ 7 ][ 9 ] *= 0.2443 ; qmatOffset [ 9 ][ 7 ] *= 0.2443 ;
+	qmatOffset [ 7 ][ 8 ] *= 0.0063 ; qmatOffset [ 8 ][ 7 ] *= 0.0063 ;
+	qmatOffset [ 7 ][ 10 ] *= 0.3980 ; qmatOffset [ 10 ][ 7 ] *= 0.3980 ;
+	qmatOffset [ 7 ][ 4 ] *= 0.0600 ; qmatOffset [ 4 ][ 7 ] *= 0.0600 ;
+	qmatOffset [ 7 ][ 12 ] *= 0.0053 ; qmatOffset [ 12 ][ 7 ] *= 0.0053 ;
+	qmatOffset [ 7 ][ 15 ] *= 0.0000 ; qmatOffset [ 15 ][ 7 ] *= 0.0000 ;
+	qmatOffset [ 7 ][ 16 ] *= 0.3790 ; qmatOffset [ 16 ][ 7 ] *= 0.3790 ;
+	qmatOffset [ 7 ][ 18 ] *= 0.0000 ; qmatOffset [ 18 ][ 7 ] *= 0.0000 ;
+	qmatOffset [ 7 ][ 19 ] *= 0.0168 ; qmatOffset [ 19 ][ 7 ] *= 0.0168 ;
+	qmatOffset [ 7 ][ 17 ] *= 2.3375 ; qmatOffset [ 17 ][ 7 ] *= 2.3375 ;
+	qmatOffset [ 9 ][ 8 ] *= 0.0042 ; qmatOffset [ 8 ][ 9 ] *= 0.0042 ;
+	qmatOffset [ 9 ][ 10 ] *= 0.6412 ; qmatOffset [ 10 ][ 9 ] *= 0.6412 ;
+	qmatOffset [ 9 ][ 4 ] *= 0.2590 ; qmatOffset [ 4 ][ 9 ] *= 0.2590 ;
+	qmatOffset [ 9 ][ 12 ] *= 0.0453 ; qmatOffset [ 12 ][ 9 ] *= 0.0453 ;
+	qmatOffset [ 9 ][ 15 ] *= 0.0779 ; qmatOffset [ 15 ][ 9 ] *= 0.0779 ;
+	qmatOffset [ 9 ][ 16 ] *= 0.0358 ; qmatOffset [ 16 ][ 9 ] *= 0.0358 ;
+	qmatOffset [ 9 ][ 18 ] *= 0.0126 ; qmatOffset [ 18 ][ 9 ] *= 0.0126 ;
+	qmatOffset [ 9 ][ 19 ] *= 0.0263 ; qmatOffset [ 19 ][ 9 ] *= 0.0263 ;
+	qmatOffset [ 9 ][ 17 ] *= 0.1053 ; qmatOffset [ 17 ][ 9 ] *= 0.1053 ;
+	qmatOffset [ 8 ][ 10 ] *= 0.0621 ; qmatOffset [ 10 ][ 8 ] *= 0.0621 ;
+	qmatOffset [ 8 ][ 4 ] *= 0.0000 ; qmatOffset [ 4 ][ 8 ] *= 0.0000 ;
+	qmatOffset [ 8 ][ 12 ] *= 0.0190 ; qmatOffset [ 12 ][ 8 ] *= 0.0190 ;
+	qmatOffset [ 8 ][ 15 ] *= 0.0684 ; qmatOffset [ 15 ][ 8 ] *= 0.0684 ;
+	qmatOffset [ 8 ][ 16 ] *= 0.0526 ; qmatOffset [ 16 ][ 8 ] *= 0.0526 ;
+	qmatOffset [ 8 ][ 18 ] *= 0.0000 ; qmatOffset [ 18 ][ 8 ] *= 0.0000 ;
+	qmatOffset [ 8 ][ 19 ] *= 0.0705 ; qmatOffset [ 19 ][ 8 ] *= 0.0705 ;
+	qmatOffset [ 8 ][ 17 ] *= 0.0000 ; qmatOffset [ 17 ][ 8 ] *= 0.0000 ;
+	qmatOffset [ 10 ][ 4 ] *= 0.0116 ; qmatOffset [ 4 ][ 10 ] *= 0.0116 ;
+	qmatOffset [ 10 ][ 12 ] *= 0.0000 ; qmatOffset [ 12 ][ 10 ] *= 0.0000 ;
+	qmatOffset [ 10 ][ 15 ] *= 0.0495 ; qmatOffset [ 15 ][ 10 ] *= 0.0495 ;
+	qmatOffset [ 10 ][ 16 ] *= 0.7276 ; qmatOffset [ 16 ][ 10 ] *= 0.7276 ;
+	qmatOffset [ 10 ][ 18 ] *= 0.0137 ; qmatOffset [ 18 ][ 10 ] *= 0.0137 ;
+	qmatOffset [ 10 ][ 19 ] *= 0.0000 ; qmatOffset [ 19 ][ 10 ] *= 0.0000 ;
+	qmatOffset [ 10 ][ 17 ] *= 0.8760 ; qmatOffset [ 17 ][ 10 ] *= 0.8760 ;
+	qmatOffset [ 4 ][ 12 ] *= 0.0179 ; qmatOffset [ 12 ][ 4 ] *= 0.0179 ;
+	qmatOffset [ 4 ][ 15 ] *= 0.0948 ; qmatOffset [ 15 ][ 4 ] *= 0.0948 ;
+	qmatOffset [ 4 ][ 16 ] *= 0.0084 ; qmatOffset [ 16 ][ 4 ] *= 0.0084 ;
+	qmatOffset [ 4 ][ 18 ] *= 0.0000 ; qmatOffset [ 18 ][ 4 ] *= 0.0000 ;
+	qmatOffset [ 4 ][ 19 ] *= 0.7181 ; qmatOffset [ 19 ][ 4 ] *= 0.7181 ;
+	qmatOffset [ 4 ][ 17 ] *= 0.0063 ; qmatOffset [ 17 ][ 4 ] *= 0.0063 ;
+	qmatOffset [ 12 ][ 15 ] *= 0.2127 ; qmatOffset [ 15 ][ 12 ] *= 0.2127 ;
+	qmatOffset [ 12 ][ 16 ] *= 0.0821 ; qmatOffset [ 16 ][ 12 ] *= 0.0821 ;
+	qmatOffset [ 12 ][ 18 ] *= 0.0074 ; qmatOffset [ 18 ][ 12 ] *= 0.0074 ;
+	qmatOffset [ 12 ][ 19 ] *= 0.0084 ; qmatOffset [ 19 ][ 12 ] *= 0.0084 ;
+	qmatOffset [ 12 ][ 17 ] *= 0.0000 ; qmatOffset [ 17 ][ 12 ] *= 0.0000 ;
+	qmatOffset [ 15 ][ 16 ] *= 0.6465 ; qmatOffset [ 16 ][ 15 ] *= 0.6465 ;
+	qmatOffset [ 15 ][ 18 ] *= 0.0179 ; qmatOffset [ 18 ][ 15 ] *= 0.0179 ;
+	qmatOffset [ 15 ][ 19 ] *= 0.1127 ; qmatOffset [ 19 ][ 15 ] *= 0.1127 ;
+	qmatOffset [ 15 ][ 17 ] *= 0.0000 ; qmatOffset [ 17 ][ 15 ] *= 0.0000 ;
+	qmatOffset [ 16 ][ 18 ] *= 0.0000 ; qmatOffset [ 18 ][ 16 ] *= 0.0000 ;
+	qmatOffset [ 16 ][ 19 ] *= 0.0000 ; qmatOffset [ 19 ][ 16 ] *= 0.0000 ;
+	qmatOffset [ 16 ][ 17 ] *= 0.2495 ; qmatOffset [ 17 ][ 16 ] *= 0.2495 ;
+	qmatOffset [ 18 ][ 19 ] *= 0.0147 ; qmatOffset [ 19 ][ 18 ] *= 0.0147 ;
+	qmatOffset [ 18 ][ 17 ] *= 0.0000 ; qmatOffset [ 17 ][ 18 ] *= 0.0000 ;
+	qmatOffset [ 19 ][ 17 ] *= 0.0000 ; qmatOffset [ 17 ][ 19 ] *= 0.0000 ;
+	}
+
+void Model::MultiplyByMtRevAAMatrix(){
+	int modNum=0;
+	MODEL_FLOAT **qmatOffset = qmat[modNum];
+	qmatOffset  [ 0 ][ 14 ] *= 23.18   ; qmatOffset [ 14 ][ 0 ] *= 23.18 ;
+	qmatOffset  [ 0 ][ 11 ] *= 26.95   ; qmatOffset [ 11 ][ 0 ] *= 26.95 ;
+	qmatOffset  [ 0 ][ 2 ] *= 17.67   ; qmatOffset [ 2 ][ 0 ] *= 17.67 ;
+	qmatOffset  [ 0 ][ 1 ] *= 59.93   ; qmatOffset [ 1 ][ 0 ] *= 59.93 ;
+	qmatOffset  [ 0 ][ 13 ] *= 1.9   ; qmatOffset [ 13 ][ 0 ] *= 1.9 ;
+	qmatOffset  [ 0 ][ 3 ] *= 9.77   ; qmatOffset [ 3 ][ 0 ] *= 9.77 ;
+	qmatOffset  [ 0 ][ 5 ] *= 120.71   ; qmatOffset [ 5 ][ 0 ] *= 120.71 ;
+	qmatOffset  [ 0 ][ 6 ] *= 13.9   ; qmatOffset [ 6 ][ 0 ] *= 13.9 ;
+	qmatOffset  [ 0 ][ 7 ] *= 96.49   ; qmatOffset [ 7 ][ 0 ] *= 96.49 ;
+	qmatOffset  [ 0 ][ 9 ] *= 25.46   ; qmatOffset [ 9 ][ 0 ] *= 25.46 ;
+	qmatOffset  [ 0 ][ 8 ] *= 8.36   ; qmatOffset [ 8 ][ 0 ] *= 8.36 ;
+	qmatOffset  [ 0 ][ 10 ] *= 141.88   ; qmatOffset [ 10 ][ 0 ] *= 141.88 ;
+	qmatOffset  [ 0 ][ 4 ] *= 6.37   ; qmatOffset [ 4 ][ 0 ] *= 6.37 ;
+	qmatOffset  [ 0 ][ 12 ] *= 54.31   ; qmatOffset [ 12 ][ 0 ] *= 54.31 ;
+	qmatOffset  [ 0 ][ 15 ] *= 387.86   ; qmatOffset [ 15 ][ 0 ] *= 387.86 ;
+	qmatOffset  [ 0 ][ 16 ] *= 480.72   ; qmatOffset [ 16 ][ 0 ] *= 480.72 ;
+	qmatOffset  [ 0 ][ 18 ] *= 1.9   ; qmatOffset [ 18 ][ 0 ] *= 1.9 ;
+	qmatOffset  [ 0 ][ 19 ] *= 6.48   ; qmatOffset [ 19 ][ 0 ] *= 6.48 ;
+	qmatOffset  [ 0 ][ 17 ] *= 195.06   ; qmatOffset [ 17 ][ 0 ] *= 195.06 ;
+	qmatOffset  [ 14 ][ 11 ] *= 13.24   ; qmatOffset [ 11 ][ 14 ] *= 13.24 ;
+	qmatOffset  [ 14 ][ 2 ] *= 1.9   ; qmatOffset [ 2 ][ 14 ] *= 1.9 ;
+	qmatOffset  [ 14 ][ 1 ] *= 103.33   ; qmatOffset [ 1 ][ 14 ] *= 103.33 ;
+	qmatOffset  [ 14 ][ 13 ] *= 220.99   ; qmatOffset [ 13 ][ 14 ] *= 220.99 ;
+	qmatOffset  [ 14 ][ 3 ] *= 1.9   ; qmatOffset [ 3 ][ 14 ] *= 1.9 ;
+	qmatOffset  [ 14 ][ 5 ] *= 23.03   ; qmatOffset [ 5 ][ 14 ] *= 23.03 ;
+	qmatOffset  [ 14 ][ 6 ] *= 165.23   ; qmatOffset [ 6 ][ 14 ] *= 165.23 ;
+	qmatOffset  [ 14 ][ 7 ] *= 1.9   ; qmatOffset [ 7 ][ 14 ] *= 1.9 ;
+	qmatOffset  [ 14 ][ 9 ] *= 15.58   ; qmatOffset [ 9 ][ 14 ] *= 15.58 ;
+	qmatOffset  [ 14 ][ 8 ] *= 141.4   ; qmatOffset [ 8 ][ 14 ] *= 141.4 ;
+	qmatOffset  [ 14 ][ 10 ] *= 1.9   ; qmatOffset [ 10 ][ 14 ] *= 1.9 ;
+	qmatOffset  [ 14 ][ 4 ] *= 4.69   ; qmatOffset [ 4 ][ 14 ] *= 4.69 ;
+	qmatOffset  [ 14 ][ 12 ] *= 23.64   ; qmatOffset [ 12 ][ 14 ] *= 23.64 ;
+	qmatOffset  [ 14 ][ 15 ] *= 6.04   ; qmatOffset [ 15 ][ 14 ] *= 6.04 ;
+	qmatOffset  [ 14 ][ 16 ] *= 2.08   ; qmatOffset [ 16 ][ 14 ] *= 2.08 ;
+	qmatOffset  [ 14 ][ 18 ] *= 21.95   ; qmatOffset [ 18 ][ 14 ] *= 21.95 ;
+	qmatOffset  [ 14 ][ 19 ] *= 1.9   ; qmatOffset [ 19 ][ 14 ] *= 1.9 ;
+	qmatOffset  [ 14 ][ 17 ] *= 7.64   ; qmatOffset [ 17 ][ 14 ] *= 7.64 ;
+	qmatOffset  [ 11 ][ 2 ] *= 794.38   ; qmatOffset [ 2 ][ 11 ] *= 794.38 ;
+	qmatOffset  [ 11 ][ 1 ] *= 58.94   ; qmatOffset [ 1 ][ 11 ] *= 58.94 ;
+	qmatOffset  [ 11 ][ 13 ] *= 173.56   ; qmatOffset [ 13 ][ 11 ] *= 173.56 ;
+	qmatOffset  [ 11 ][ 3 ] *= 63.05   ; qmatOffset [ 3 ][ 11 ] *= 63.05 ;
+	qmatOffset  [ 11 ][ 5 ] *= 53.3   ; qmatOffset [ 5 ][ 11 ] *= 53.3 ;
+	qmatOffset  [ 11 ][ 6 ] *= 496.13   ; qmatOffset [ 6 ][ 11 ] *= 496.13 ;
+	qmatOffset  [ 11 ][ 7 ] *= 27.1   ; qmatOffset [ 7 ][ 11 ] *= 27.1 ;
+	qmatOffset  [ 11 ][ 9 ] *= 15.16   ; qmatOffset [ 9 ][ 11 ] *= 15.16 ;
+	qmatOffset  [ 11 ][ 8 ] *= 608.7   ; qmatOffset [ 8 ][ 11 ] *= 608.7 ;
+	qmatOffset  [ 11 ][ 10 ] *= 65.41   ; qmatOffset [ 10 ][ 11 ] *= 65.41 ;
+	qmatOffset  [ 11 ][ 4 ] *= 15.2   ; qmatOffset [ 4 ][ 11 ] *= 15.2 ;
+	qmatOffset  [ 11 ][ 12 ] *= 73.31   ; qmatOffset [ 12 ][ 11 ] *= 73.31 ;
+	qmatOffset  [ 11 ][ 15 ] *= 494.39   ; qmatOffset [ 15 ][ 11 ] *= 494.39 ;
+	qmatOffset  [ 11 ][ 16 ] *= 238.46   ; qmatOffset [ 16 ][ 11 ] *= 238.46 ;
+	qmatOffset  [ 11 ][ 18 ] *= 10.68   ; qmatOffset [ 18 ][ 11 ] *= 10.68 ;
+	qmatOffset  [ 11 ][ 19 ] *= 191.36   ; qmatOffset [ 19 ][ 11 ] *= 191.36 ;
+	qmatOffset  [ 11 ][ 17 ] *= 1.9   ; qmatOffset [ 17 ][ 11 ] *= 1.9 ;
+	qmatOffset  [ 2 ][ 1 ] *= 1.9   ; qmatOffset [ 1 ][ 2 ] *= 1.9 ;
+	qmatOffset  [ 2 ][ 13 ] *= 55.28   ; qmatOffset [ 13 ][ 2 ] *= 55.28 ;
+	qmatOffset  [ 2 ][ 3 ] *= 583.55   ; qmatOffset [ 3 ][ 2 ] *= 583.55 ;
+	qmatOffset  [ 2 ][ 5 ] *= 56.77   ; qmatOffset [ 5 ][ 2 ] *= 56.77 ;
+	qmatOffset  [ 2 ][ 6 ] *= 113.99   ; qmatOffset [ 6 ][ 2 ] *= 113.99 ;
+	qmatOffset  [ 2 ][ 7 ] *= 4.34   ; qmatOffset [ 7 ][ 2 ] *= 4.34 ;
+	qmatOffset  [ 2 ][ 9 ] *= 1.9   ; qmatOffset [ 9 ][ 2 ] *= 1.9 ;
+	qmatOffset  [ 2 ][ 8 ] *= 2.31   ; qmatOffset [ 8 ][ 2 ] *= 2.31 ;
+	qmatOffset  [ 2 ][ 10 ] *= 1.9   ; qmatOffset [ 10 ][ 2 ] *= 1.9 ;
+	qmatOffset  [ 2 ][ 4 ] *= 4.98   ; qmatOffset [ 4 ][ 2 ] *= 4.98 ;
+	qmatOffset  [ 2 ][ 12 ] *= 13.43   ; qmatOffset [ 12 ][ 2 ] *= 13.43 ;
+	qmatOffset  [ 2 ][ 15 ] *= 69.02   ; qmatOffset [ 15 ][ 2 ] *= 69.02 ;
+	qmatOffset  [ 2 ][ 16 ] *= 28.01   ; qmatOffset [ 16 ][ 2 ] *= 28.01 ;
+	qmatOffset  [ 2 ][ 18 ] *= 19.86   ; qmatOffset [ 18 ][ 2 ] *= 19.86 ;
+	qmatOffset  [ 2 ][ 19 ] *= 21.21   ; qmatOffset [ 19 ][ 2 ] *= 21.21 ;
+	qmatOffset  [ 2 ][ 17 ] *= 1.9   ; qmatOffset [ 17 ][ 2 ] *= 1.9 ;
+	qmatOffset  [ 1 ][ 13 ] *= 75.24   ; qmatOffset [ 13 ][ 1 ] *= 75.24 ;
+	qmatOffset  [ 1 ][ 3 ] *= 1.9   ; qmatOffset [ 3 ][ 1 ] *= 1.9 ;
+	qmatOffset  [ 1 ][ 5 ] *= 30.71   ; qmatOffset [ 5 ][ 1 ] *= 30.71 ;
+	qmatOffset  [ 1 ][ 6 ] *= 141.49   ; qmatOffset [ 6 ][ 1 ] *= 141.49 ;
+	qmatOffset  [ 1 ][ 7 ] *= 62.73   ; qmatOffset [ 7 ][ 1 ] *= 62.73 ;
+	qmatOffset  [ 1 ][ 9 ] *= 25.65   ; qmatOffset [ 9 ][ 1 ] *= 25.65 ;
+	qmatOffset  [ 1 ][ 8 ] *= 1.9   ; qmatOffset [ 8 ][ 1 ] *= 1.9 ;
+	qmatOffset  [ 1 ][ 10 ] *= 6.18   ; qmatOffset [ 10 ][ 1 ] *= 6.18 ;
+	qmatOffset  [ 1 ][ 4 ] *= 70.8   ; qmatOffset [ 4 ][ 1 ] *= 70.8 ;
+	qmatOffset  [ 1 ][ 12 ] *= 31.26   ; qmatOffset [ 12 ][ 1 ] *= 31.26 ;
+	qmatOffset  [ 1 ][ 15 ] *= 277.05   ; qmatOffset [ 15 ][ 1 ] *= 277.05 ;
+	qmatOffset  [ 1 ][ 16 ] *= 179.97   ; qmatOffset [ 16 ][ 1 ] *= 179.97 ;
+	qmatOffset  [ 1 ][ 18 ] *= 33.6   ; qmatOffset [ 18 ][ 1 ] *= 33.6 ;
+	qmatOffset  [ 1 ][ 19 ] *= 254.77   ; qmatOffset [ 19 ][ 1 ] *= 254.77 ;
+	qmatOffset  [ 1 ][ 17 ] *= 1.9   ; qmatOffset [ 17 ][ 1 ] *= 1.9 ;
+	qmatOffset  [ 13 ][ 3 ] *= 313.56   ; qmatOffset [ 3 ][ 13 ] *= 313.56 ;
+	qmatOffset  [ 13 ][ 5 ] *= 6.75   ; qmatOffset [ 5 ][ 13 ] *= 6.75 ;
+	qmatOffset  [ 13 ][ 6 ] *= 582.4   ; qmatOffset [ 6 ][ 13 ] *= 582.4 ;
+	qmatOffset  [ 13 ][ 7 ] *= 8.34   ; qmatOffset [ 7 ][ 13 ] *= 8.34 ;
+	qmatOffset  [ 13 ][ 9 ] *= 39.7   ; qmatOffset [ 9 ][ 13 ] *= 39.7 ;
+	qmatOffset  [ 13 ][ 8 ] *= 465.58   ; qmatOffset [ 8 ][ 13 ] *= 465.58 ;
+	qmatOffset  [ 13 ][ 10 ] *= 47.37   ; qmatOffset [ 10 ][ 13 ] *= 47.37 ;
+	qmatOffset  [ 13 ][ 4 ] *= 19.11   ; qmatOffset [ 4 ][ 13 ] *= 19.11 ;
+	qmatOffset  [ 13 ][ 12 ] *= 137.29   ; qmatOffset [ 12 ][ 13 ] *= 137.29 ;
+	qmatOffset  [ 13 ][ 15 ] *= 54.11   ; qmatOffset [ 15 ][ 13 ] *= 54.11 ;
+	qmatOffset  [ 13 ][ 16 ] *= 94.93   ; qmatOffset [ 16 ][ 13 ] *= 94.93 ;
+	qmatOffset  [ 13 ][ 18 ] *= 1.9   ; qmatOffset [ 18 ][ 13 ] *= 1.9 ;
+	qmatOffset  [ 13 ][ 19 ] *= 38.82   ; qmatOffset [ 19 ][ 13 ] *= 38.82 ;
+	qmatOffset  [ 13 ][ 17 ] *= 19   ; qmatOffset [ 17 ][ 13 ] *= 19 ;
+	qmatOffset  [ 3 ][ 5 ] *= 28.28   ; qmatOffset [ 5 ][ 3 ] *= 28.28 ;
+	qmatOffset  [ 3 ][ 6 ] *= 49.12   ; qmatOffset [ 6 ][ 3 ] *= 49.12 ;
+	qmatOffset  [ 3 ][ 7 ] *= 3.31   ; qmatOffset [ 7 ][ 3 ] *= 3.31 ;
+	qmatOffset  [ 3 ][ 9 ] *= 1.9   ; qmatOffset [ 9 ][ 3 ] *= 1.9 ;
+	qmatOffset  [ 3 ][ 8 ] *= 313.86   ; qmatOffset [ 8 ][ 3 ] *= 313.86 ;
+	qmatOffset  [ 3 ][ 10 ] *= 1.9   ; qmatOffset [ 10 ][ 3 ] *= 1.9 ;
+	qmatOffset  [ 3 ][ 4 ] *= 2.67   ; qmatOffset [ 4 ][ 3 ] *= 2.67 ;
+	qmatOffset  [ 3 ][ 12 ] *= 12.83   ; qmatOffset [ 12 ][ 3 ] *= 12.83 ;
+	qmatOffset  [ 3 ][ 15 ] *= 54.71   ; qmatOffset [ 15 ][ 3 ] *= 54.71 ;
+	qmatOffset  [ 3 ][ 16 ] *= 14.82   ; qmatOffset [ 16 ][ 3 ] *= 14.82 ;
+	qmatOffset  [ 3 ][ 18 ] *= 1.9   ; qmatOffset [ 18 ][ 3 ] *= 1.9 ;
+	qmatOffset  [ 3 ][ 19 ] *= 13.12   ; qmatOffset [ 19 ][ 3 ] *= 13.12 ;
+	qmatOffset  [ 3 ][ 17 ] *= 21.14   ; qmatOffset [ 17 ][ 3 ] *= 21.14 ;
+	qmatOffset  [ 5 ][ 6 ] *= 1.9   ; qmatOffset [ 6 ][ 5 ] *= 1.9 ;
+	qmatOffset  [ 5 ][ 7 ] *= 5.98   ; qmatOffset [ 7 ][ 5 ] *= 5.98 ;
+	qmatOffset  [ 5 ][ 9 ] *= 2.41   ; qmatOffset [ 9 ][ 5 ] *= 2.41 ;
+	qmatOffset  [ 5 ][ 8 ] *= 22.73   ; qmatOffset [ 8 ][ 5 ] *= 22.73 ;
+	qmatOffset  [ 5 ][ 10 ] *= 1.9   ; qmatOffset [ 10 ][ 5 ] *= 1.9 ;
+	qmatOffset  [ 5 ][ 4 ] *= 1.9   ; qmatOffset [ 4 ][ 5 ] *= 1.9 ;
+	qmatOffset  [ 5 ][ 12 ] *= 1.9   ; qmatOffset [ 12 ][ 5 ] *= 1.9 ;
+	qmatOffset  [ 5 ][ 15 ] *= 125.93   ; qmatOffset [ 15 ][ 5 ] *= 125.93 ;
+	qmatOffset  [ 5 ][ 16 ] *= 11.17   ; qmatOffset [ 16 ][ 5 ] *= 11.17 ;
+	qmatOffset  [ 5 ][ 18 ] *= 10.92   ; qmatOffset [ 18 ][ 5 ] *= 10.92 ;
+	qmatOffset  [ 5 ][ 19 ] *= 3.21   ; qmatOffset [ 19 ][ 5 ] *= 3.21 ;
+	qmatOffset  [ 5 ][ 17 ] *= 2.53   ; qmatOffset [ 17 ][ 5 ] *= 2.53 ;
+	qmatOffset  [ 6 ][ 7 ] *= 12.26   ; qmatOffset [ 7 ][ 6 ] *= 12.26 ;
+	qmatOffset  [ 6 ][ 9 ] *= 11.49   ; qmatOffset [ 9 ][ 6 ] *= 11.49 ;
+	qmatOffset  [ 6 ][ 8 ] *= 127.67   ; qmatOffset [ 8 ][ 6 ] *= 127.67 ;
+	qmatOffset  [ 6 ][ 10 ] *= 11.97   ; qmatOffset [ 10 ][ 6 ] *= 11.97 ;
+	qmatOffset  [ 6 ][ 4 ] *= 48.16   ; qmatOffset [ 4 ][ 6 ] *= 48.16 ;
+	qmatOffset  [ 6 ][ 12 ] *= 60.97   ; qmatOffset [ 12 ][ 6 ] *= 60.97 ;
+	qmatOffset  [ 6 ][ 15 ] *= 77.46   ; qmatOffset [ 15 ][ 6 ] *= 77.46 ;
+	qmatOffset  [ 6 ][ 16 ] *= 44.78   ; qmatOffset [ 16 ][ 6 ] *= 44.78 ;
+	qmatOffset  [ 6 ][ 18 ] *= 7.08   ; qmatOffset [ 18 ][ 6 ] *= 7.08 ;
+	qmatOffset  [ 6 ][ 19 ] *= 670.14   ; qmatOffset [ 19 ][ 6 ] *= 670.14 ;
+	qmatOffset  [ 6 ][ 17 ] *= 1.9   ; qmatOffset [ 17 ][ 6 ] *= 1.9 ;
+	qmatOffset  [ 7 ][ 9 ] *= 329.09   ; qmatOffset [ 9 ][ 7 ] *= 329.09 ;
+	qmatOffset  [ 7 ][ 8 ] *= 19.57   ; qmatOffset [ 8 ][ 7 ] *= 19.57 ;
+	qmatOffset  [ 7 ][ 10 ] *= 517.98   ; qmatOffset [ 10 ][ 7 ] *= 517.98 ;
+	qmatOffset  [ 7 ][ 4 ] *= 84.67   ; qmatOffset [ 4 ][ 7 ] *= 84.67 ;
+	qmatOffset  [ 7 ][ 12 ] *= 20.63   ; qmatOffset [ 12 ][ 7 ] *= 20.63 ;
+	qmatOffset  [ 7 ][ 15 ] *= 47.7   ; qmatOffset [ 15 ][ 7 ] *= 47.7 ;
+	qmatOffset  [ 7 ][ 16 ] *= 368.43   ; qmatOffset [ 16 ][ 7 ] *= 368.43 ;
+	qmatOffset  [ 7 ][ 18 ] *= 1.9   ; qmatOffset [ 18 ][ 7 ] *= 1.9 ;
+	qmatOffset  [ 7 ][ 19 ] *= 25.01   ; qmatOffset [ 19 ][ 7 ] *= 25.01 ;
+	qmatOffset  [ 7 ][ 17 ] *= 1222.94   ; qmatOffset [ 17 ][ 7 ] *= 1222.94 ;
+	qmatOffset  [ 9 ][ 8 ] *= 14.88   ; qmatOffset [ 8 ][ 9 ] *= 14.88 ;
+	qmatOffset  [ 9 ][ 10 ] *= 537.53   ; qmatOffset [ 10 ][ 9 ] *= 537.53 ;
+	qmatOffset  [ 9 ][ 4 ] *= 216.06   ; qmatOffset [ 4 ][ 9 ] *= 216.06 ;
+	qmatOffset  [ 9 ][ 12 ] *= 40.1   ; qmatOffset [ 12 ][ 9 ] *= 40.1 ;
+	qmatOffset  [ 9 ][ 15 ] *= 73.61   ; qmatOffset [ 15 ][ 9 ] *= 73.61 ;
+	qmatOffset  [ 9 ][ 16 ] *= 126.4   ; qmatOffset [ 16 ][ 9 ] *= 126.4 ;
+	qmatOffset  [ 9 ][ 18 ] *= 32.44   ; qmatOffset [ 18 ][ 9 ] *= 32.44 ;
+	qmatOffset  [ 9 ][ 19 ] *= 44.15   ; qmatOffset [ 19 ][ 9 ] *= 44.15 ;
+	qmatOffset  [ 9 ][ 17 ] *= 91.67   ; qmatOffset [ 17 ][ 9 ] *= 91.67 ;
+	qmatOffset  [ 8 ][ 10 ] *= 91.37   ; qmatOffset [ 10 ][ 8 ] *= 91.37 ;
+	qmatOffset  [ 8 ][ 4 ] *= 6.44   ; qmatOffset [ 4 ][ 8 ] *= 6.44 ;
+	qmatOffset  [ 8 ][ 12 ] *= 50.1   ; qmatOffset [ 12 ][ 8 ] *= 50.1 ;
+	qmatOffset  [ 8 ][ 15 ] *= 105.79   ; qmatOffset [ 15 ][ 8 ] *= 105.79 ;
+	qmatOffset  [ 8 ][ 16 ] *= 136.33   ; qmatOffset [ 16 ][ 8 ] *= 136.33 ;
+	qmatOffset  [ 8 ][ 18 ] *= 24   ; qmatOffset [ 18 ][ 8 ] *= 24 ;
+	qmatOffset  [ 8 ][ 19 ] *= 51.17   ; qmatOffset [ 19 ][ 8 ] *= 51.17 ;
+	qmatOffset  [ 8 ][ 17 ] *= 1.9   ; qmatOffset [ 17 ][ 8 ] *= 1.9 ;
+	qmatOffset  [ 10 ][ 4 ] *= 90.82   ; qmatOffset [ 4 ][ 10 ] *= 90.82 ;
+	qmatOffset  [ 10 ][ 12 ] *= 18.84   ; qmatOffset [ 12 ][ 10 ] *= 18.84 ;
+	qmatOffset  [ 10 ][ 15 ] *= 111.16   ; qmatOffset [ 15 ][ 10 ] *= 111.16 ;
+	qmatOffset  [ 10 ][ 16 ] *= 528.17   ; qmatOffset [ 16 ][ 10 ] *= 528.17 ;
+	qmatOffset  [ 10 ][ 18 ] *= 21.71   ; qmatOffset [ 18 ][ 10 ] *= 21.71 ;
+	qmatOffset  [ 10 ][ 19 ] *= 39.96   ; qmatOffset [ 19 ][ 10 ] *= 39.96 ;
+	qmatOffset  [ 10 ][ 17 ] *= 387.54   ; qmatOffset [ 17 ][ 10 ] *= 387.54 ;
+	qmatOffset  [ 4 ][ 12 ] *= 17.31   ; qmatOffset [ 12 ][ 4 ] *= 17.31 ;
+	qmatOffset  [ 4 ][ 15 ] *= 64.29   ; qmatOffset [ 15 ][ 4 ] *= 64.29 ;
+	qmatOffset  [ 4 ][ 16 ] *= 33.85   ; qmatOffset [ 16 ][ 4 ] *= 33.85 ;
+	qmatOffset  [ 4 ][ 18 ] *= 7.84   ; qmatOffset [ 18 ][ 4 ] *= 7.84 ;
+	qmatOffset  [ 4 ][ 19 ] *= 465.58   ; qmatOffset [ 19 ][ 4 ] *= 465.58 ;
+	qmatOffset  [ 4 ][ 17 ] *= 6.35   ; qmatOffset [ 17 ][ 4 ] *= 6.35 ;
+	qmatOffset  [ 12 ][ 15 ] *= 169.9   ; qmatOffset [ 15 ][ 12 ] *= 169.9 ;
+	qmatOffset  [ 12 ][ 16 ] *= 128.22   ; qmatOffset [ 16 ][ 12 ] *= 128.22 ;
+	qmatOffset  [ 12 ][ 18 ] *= 4.21   ; qmatOffset [ 18 ][ 12 ] *= 4.21 ;
+	qmatOffset  [ 12 ][ 19 ] *= 16.21   ; qmatOffset [ 19 ][ 12 ] *= 16.21 ;
+	qmatOffset  [ 12 ][ 17 ] *= 8.23   ; qmatOffset [ 17 ][ 12 ] *= 8.23 ;
+	qmatOffset  [ 15 ][ 16 ] *= 597.21   ; qmatOffset [ 16 ][ 15 ] *= 597.21 ;
+	qmatOffset  [ 15 ][ 18 ] *= 38.58   ; qmatOffset [ 18 ][ 15 ] *= 38.58 ;
+	qmatOffset  [ 15 ][ 19 ] *= 64.92   ; qmatOffset [ 19 ][ 15 ] *= 64.92 ;
+	qmatOffset  [ 15 ][ 17 ] *= 1.9   ; qmatOffset [ 17 ][ 15 ] *= 1.9 ;
+	qmatOffset  [ 16 ][ 18 ] *= 9.99   ; qmatOffset [ 18 ][ 16 ] *= 9.99 ;
+	qmatOffset  [ 16 ][ 19 ] *= 38.73   ; qmatOffset [ 19 ][ 16 ] *= 38.73 ;
+	qmatOffset  [ 16 ][ 17 ] *= 204.54   ; qmatOffset [ 17 ][ 16 ] *= 204.54 ;
+	qmatOffset  [ 18 ][ 19 ] *= 26.25   ; qmatOffset [ 19 ][ 18 ] *= 26.25 ;
+	qmatOffset  [ 18 ][ 17 ] *= 5.37   ; qmatOffset [ 17 ][ 18 ] *= 5.37 ;
+	qmatOffset  [ 19 ][ 17 ] *= 1.9   ; qmatOffset [ 17 ][ 19 ] *= 1.9 ;
+	}
+
+void Model::MultiplyByDayhoffAAMatrix(){
+	int modNum=0;
+	MODEL_FLOAT **qmatOffset = qmat[modNum];
+
+	qmatOffset[0][1] *= 0.036; qmatOffset[0][2] *= 0.12; qmatOffset[0][3] *= 0.198; qmatOffset[0][4] *= 0.018; qmatOffset[0][5] *= 0.24; qmatOffset[0][6] *= 0.023;
+	qmatOffset[0][7] *= 0.065; qmatOffset[0][8] *= 0.026; qmatOffset[0][9] *= 0.041; qmatOffset[0][10] *= 0.072; qmatOffset[0][11] *= 0.098; qmatOffset[0][12] *= 0.25;
+	qmatOffset[0][13] *= 0.089; qmatOffset[0][14] *= 0.027; qmatOffset[0][15] *= 0.409; qmatOffset[0][16] *= 0.371; qmatOffset[0][17] *= 0.208; qmatOffset[0][19] *= 0.024;
+	qmatOffset[1][0] *= 0.036; qmatOffset[1][5] *= 0.011; qmatOffset[1][6] *= 0.028; qmatOffset[1][7] *= 0.044; qmatOffset[1][12] *= 0.019; qmatOffset[1][14] *= 0.023;
+	qmatOffset[1][15] *= 0.161; qmatOffset[1][16] *= 0.016; qmatOffset[1][17] *= 0.049; qmatOffset[1][19] *= 0.096; qmatOffset[2][0] *= 0.12; qmatOffset[2][3] *= 1.153; 
+	qmatOffset[2][5] *= 0.125; qmatOffset[2][6] *= 0.086; qmatOffset[2][7] *= 0.024; qmatOffset[2][8] *= 0.071; qmatOffset[2][11] *= 0.905; qmatOffset[2][12] *= 0.013; 
+	qmatOffset[2][13] *= 0.134; qmatOffset[2][15] *= 0.095; qmatOffset[2][16] *= 0.066; qmatOffset[2][17] *= 0.018; qmatOffset[3][0] *= 0.198; qmatOffset[3][2] *= 1.153; 
+	qmatOffset[3][5] *= 0.081; qmatOffset[3][6] *= 0.043; qmatOffset[3][7] *= 0.061; qmatOffset[3][8] *= 0.083; qmatOffset[3][9] *= 0.011; qmatOffset[3][10] *= 0.03; 
+	qmatOffset[3][11] *= 0.148; qmatOffset[3][12] *= 0.051; qmatOffset[3][13] *= 0.716; qmatOffset[3][14] *= 0.001; qmatOffset[3][15] *= 0.079; qmatOffset[3][16] *= 0.034; 
+	qmatOffset[3][17] *= 0.037; qmatOffset[3][19] *= 0.022; qmatOffset[4][0] *= 0.018; qmatOffset[4][5] *= 0.015; qmatOffset[4][6] *= 0.048; qmatOffset[4][7] *= 0.196; 
+	qmatOffset[4][9] *= 0.157; qmatOffset[4][10] *= 0.092; qmatOffset[4][11] *= 0.014; qmatOffset[4][12] *= 0.011; qmatOffset[4][14] *= 0.014; qmatOffset[4][15] *= 0.046; 
+	qmatOffset[4][16] *= 0.013; qmatOffset[4][17] *= 0.012; qmatOffset[4][18] *= 0.076; qmatOffset[4][19] *= 0.698; qmatOffset[5][0] *= 0.24; qmatOffset[5][1] *= 0.011; 
+	qmatOffset[5][2] *= 0.125; qmatOffset[5][3] *= 0.081; qmatOffset[5][4] *= 0.015; qmatOffset[5][6] *= 0.01; qmatOffset[5][8] *= 0.027; qmatOffset[5][9] *= 0.007; 
+	qmatOffset[5][10] *= 0.017; qmatOffset[5][11] *= 0.139; qmatOffset[5][12] *= 0.034; qmatOffset[5][13] *= 0.028; qmatOffset[5][14] *= 0.009; qmatOffset[5][15] *= 0.234; 
+	qmatOffset[5][16] *= 0.03; qmatOffset[5][17] *= 0.054; qmatOffset[6][0] *= 0.023; qmatOffset[6][1] *= 0.028; qmatOffset[6][2] *= 0.086; qmatOffset[6][3] *= 0.043; 
+	qmatOffset[6][4] *= 0.048; qmatOffset[6][5] *= 0.01; qmatOffset[6][7] *= 0.007; qmatOffset[6][8] *= 0.026; qmatOffset[6][9] *= 0.044; qmatOffset[6][11] *= 0.535; 
+	qmatOffset[6][12] *= 0.094; qmatOffset[6][13] *= 0.606; qmatOffset[6][14] *= 0.24; qmatOffset[6][15] *= 0.035; qmatOffset[6][16] *= 0.022; qmatOffset[6][17] *= 0.044; 
+	qmatOffset[6][18] *= 0.027; qmatOffset[6][19] *= 0.127; qmatOffset[7][0] *= 0.065; qmatOffset[7][1] *= 0.044; qmatOffset[7][2] *= 0.024; qmatOffset[7][3] *= 0.061; 
+	qmatOffset[7][4] *= 0.196; qmatOffset[7][6] *= 0.007; qmatOffset[7][8] *= 0.046; qmatOffset[7][9] *= 0.257; qmatOffset[7][10] *= 0.336; qmatOffset[7][11] *= 0.077; 
+	qmatOffset[7][12] *= 0.012; qmatOffset[7][13] *= 0.018; qmatOffset[7][14] *= 0.064; qmatOffset[7][15] *= 0.024; qmatOffset[7][16] *= 0.192; qmatOffset[7][17] *= 0.889; 
+	qmatOffset[7][19] *= 0.037; qmatOffset[8][0] *= 0.026; qmatOffset[8][2] *= 0.071; qmatOffset[8][3] *= 0.083; qmatOffset[8][5] *= 0.027; qmatOffset[8][6] *= 0.026; 
+	qmatOffset[8][7] *= 0.046; qmatOffset[8][9] *= 0.018; qmatOffset[8][10] *= 0.243; qmatOffset[8][11] *= 0.318; qmatOffset[8][12] *= 0.033; qmatOffset[8][13] *= 0.153; 
+	qmatOffset[8][14] *= 0.464; qmatOffset[8][15] *= 0.096; qmatOffset[8][16] *= 0.136; qmatOffset[8][17] *= 0.01; qmatOffset[8][19] *= 0.013; qmatOffset[9][0] *= 0.041; 
+	qmatOffset[9][3] *= 0.011; qmatOffset[9][4] *= 0.157; qmatOffset[9][5] *= 0.007; qmatOffset[9][6] *= 0.044; qmatOffset[9][7] *= 0.257; qmatOffset[9][8] *= 0.018; 
+	qmatOffset[9][10] *= 0.527; qmatOffset[9][11] *= 0.034; qmatOffset[9][12] *= 0.032; qmatOffset[9][13] *= 0.073; qmatOffset[9][14] *= 0.015; qmatOffset[9][15] *= 0.017; 
+	qmatOffset[9][16] *= 0.033; qmatOffset[9][17] *= 0.175; qmatOffset[9][18] *= 0.046; qmatOffset[9][19] *= 0.028; qmatOffset[10][0] *= 0.072; qmatOffset[10][3] *= 0.03; 
+	qmatOffset[10][4] *= 0.092; qmatOffset[10][5] *= 0.017; qmatOffset[10][7] *= 0.336; qmatOffset[10][8] *= 0.243; qmatOffset[10][9] *= 0.527; qmatOffset[10][11] *= 0.001; 
+	qmatOffset[10][12] *= 0.017; qmatOffset[10][13] *= 0.114; qmatOffset[10][14] *= 0.09; qmatOffset[10][15] *= 0.062; qmatOffset[10][16] *= 0.104; qmatOffset[10][17] *= 0.258;
+	qmatOffset[11][0] *= 0.098; qmatOffset[11][2] *= 0.905; qmatOffset[11][3] *= 0.148; qmatOffset[11][4] *= 0.014; qmatOffset[11][5] *= 0.139; qmatOffset[11][6] *= 0.535; 
+	qmatOffset[11][7] *= 0.077; qmatOffset[11][8] *= 0.318; qmatOffset[11][9] *= 0.034; qmatOffset[11][10] *= 0.001; qmatOffset[11][12] *= 0.042; qmatOffset[11][13] *= 0.103;
+	qmatOffset[11][14] *= 0.032; qmatOffset[11][15] *= 0.495; qmatOffset[11][16] *= 0.229; qmatOffset[11][17] *= 0.015; qmatOffset[11][18] *= 0.023; qmatOffset[11][19] *= 0.095;
+	qmatOffset[12][0] *= 0.25; qmatOffset[12][1] *= 0.019; qmatOffset[12][2] *= 0.013; qmatOffset[12][3] *= 0.051; qmatOffset[12][4] *= 0.011; qmatOffset[12][5] *= 0.034;
+	qmatOffset[12][6] *= 0.094; qmatOffset[12][7] *= 0.012; qmatOffset[12][8] *= 0.033; qmatOffset[12][9] *= 0.032; qmatOffset[12][10] *= 0.017; qmatOffset[12][11] *= 0.042;
+	qmatOffset[12][13] *= 0.153; qmatOffset[12][14] *= 0.103; qmatOffset[12][15] *= 0.245; qmatOffset[12][16] *= 0.078; qmatOffset[12][17] *= 0.048; qmatOffset[13][0] *= 0.089;
+	qmatOffset[13][2] *= 0.134; qmatOffset[13][3] *= 0.716; qmatOffset[13][5] *= 0.028; qmatOffset[13][6] *= 0.606; qmatOffset[13][7] *= 0.018; qmatOffset[13][8] *= 0.153;
+	qmatOffset[13][9] *= 0.073; qmatOffset[13][10] *= 0.114; qmatOffset[13][11] *= 0.103; qmatOffset[13][12] *= 0.153; qmatOffset[13][14] *= 0.246; qmatOffset[13][15] *= 0.056;
+	qmatOffset[13][16] *= 0.053; qmatOffset[13][17] *= 0.035; qmatOffset[14][0] *= 0.027; qmatOffset[14][1] *= 0.023; qmatOffset[14][3] *= 0.001; qmatOffset[14][4] *= 0.014;
+	qmatOffset[14][5] *= 0.009; qmatOffset[14][6] *= 0.24; qmatOffset[14][7] *= 0.064; qmatOffset[14][8] *= 0.464; qmatOffset[14][9] *= 0.015; qmatOffset[14][10] *= 0.09;
+	qmatOffset[14][11] *= 0.032; qmatOffset[14][12] *= 0.103; qmatOffset[14][13] *= 0.246; qmatOffset[14][15] *= 0.154; qmatOffset[14][16] *= 0.026; qmatOffset[14][17] *= 0.024;
+	qmatOffset[14][18] *= 0.201; qmatOffset[14][19] *= 0.008; qmatOffset[15][0] *= 0.409; qmatOffset[15][1] *= 0.161; qmatOffset[15][2] *= 0.095; qmatOffset[15][3] *= 0.079;
+	qmatOffset[15][4] *= 0.046; qmatOffset[15][5] *= 0.234; qmatOffset[15][6] *= 0.035; qmatOffset[15][7] *= 0.024; qmatOffset[15][8] *= 0.096; qmatOffset[15][9] *= 0.017;
+	qmatOffset[15][10] *= 0.062; qmatOffset[15][11] *= 0.495; qmatOffset[15][12] *= 0.245; qmatOffset[15][13] *= 0.056; qmatOffset[15][14] *= 0.154; qmatOffset[15][16] *= 0.55;
+	qmatOffset[15][17] *= 0.03; qmatOffset[15][18] *= 0.075; qmatOffset[15][19] *= 0.034; qmatOffset[16][0] *= 0.371; qmatOffset[16][1] *= 0.016; qmatOffset[16][2] *= 0.066;
+	qmatOffset[16][3] *= 0.034; qmatOffset[16][4] *= 0.013; qmatOffset[16][5] *= 0.03; qmatOffset[16][6] *= 0.022; qmatOffset[16][7] *= 0.192; qmatOffset[16][8] *= 0.136;
+	qmatOffset[16][9] *= 0.033; qmatOffset[16][10] *= 0.104; qmatOffset[16][11] *= 0.229; qmatOffset[16][12] *= 0.078; qmatOffset[16][13] *= 0.053; qmatOffset[16][14] *= 0.026;
+	qmatOffset[16][15] *= 0.55; qmatOffset[16][17] *= 0.157; qmatOffset[16][19] *= 0.042; qmatOffset[17][0] *= 0.208; qmatOffset[17][1] *= 0.049; qmatOffset[17][2] *= 0.018;
+	qmatOffset[17][3] *= 0.037; qmatOffset[17][4] *= 0.012; qmatOffset[17][5] *= 0.054; qmatOffset[17][6] *= 0.044; qmatOffset[17][7] *= 0.889; qmatOffset[17][8] *= 0.01;
+	qmatOffset[17][9] *= 0.175; qmatOffset[17][10] *= 0.258; qmatOffset[17][11] *= 0.015; qmatOffset[17][12] *= 0.048; qmatOffset[17][13] *= 0.035; qmatOffset[17][14] *= 0.024;
+	qmatOffset[17][15] *= 0.03; qmatOffset[17][16] *= 0.157; qmatOffset[17][19] *= 0.028; qmatOffset[18][4] *= 0.076; qmatOffset[18][6] *= 0.027; qmatOffset[18][9] *= 0.046;
+	qmatOffset[18][11] *= 0.023; qmatOffset[18][14] *= 0.201; qmatOffset[18][15] *= 0.075; qmatOffset[18][19] *= 0.061; qmatOffset[19][0] *= 0.024; qmatOffset[19][1] *= 0.096;
+	qmatOffset[19][3] *= 0.022; qmatOffset[19][4] *= 0.698; qmatOffset[19][6] *= 0.127; qmatOffset[19][7] *= 0.037; qmatOffset[19][8] *= 0.013; qmatOffset[19][9] *= 0.028;
+	qmatOffset[19][11] *= 0.095; qmatOffset[19][14] *= 0.008; qmatOffset[19][15] *= 0.034; qmatOffset[19][16] *= 0.042; qmatOffset[19][17] *= 0.028; 
+	qmatOffset[19][18] *= 0.061;
+	//here are the zero entries
+	qmatOffset[0][18]=qmatOffset[18][0]=0.0;
+	qmatOffset[2][14]=qmatOffset[14][2]=0.0;
+	qmatOffset[1][11]=qmatOffset[11][1]=0.0;
+	qmatOffset[1][2]=qmatOffset[2][1]=0.0;
+	qmatOffset[9][2]=qmatOffset[2][9]=0.0;
+	qmatOffset[10][2]=qmatOffset[2][10]=0.0;
+	qmatOffset[4][2]=qmatOffset[2][4]=0.0;
+	qmatOffset[18][2]=qmatOffset[2][18]=0.0;
+	qmatOffset[19][2]=qmatOffset[2][19]=0.0;
+	qmatOffset[13][1]=qmatOffset[1][13]=0.0;
+	qmatOffset[3][1]=qmatOffset[1][3]=0.0;
+	qmatOffset[9][1]=qmatOffset[1][9]=0.0;
+	qmatOffset[8][1]=qmatOffset[1][8]=0.0;
+	qmatOffset[10][1]=qmatOffset[1][10]=0.0;
+	qmatOffset[4][1]=qmatOffset[1][4]=0.0;
+	qmatOffset[18][1]=qmatOffset[1][18]=0.0;
+	qmatOffset[4][13]=qmatOffset[13][4]=0.0;
+	qmatOffset[18][13]=qmatOffset[13][18]=0.0;
+	qmatOffset[19][13]=qmatOffset[13][19]=0.0;
+	qmatOffset[4][3]=qmatOffset[3][4]=0.0;
+	qmatOffset[18][3]=qmatOffset[3][18]=0.0;
+	qmatOffset[7][5]=qmatOffset[5][7]=0.0;
+	qmatOffset[18][5]=qmatOffset[5][18]=0.0;
+	qmatOffset[19][5]=qmatOffset[5][19]=0.0;
+	qmatOffset[10][6]=qmatOffset[6][10]=0.0;
+	qmatOffset[18][7]=qmatOffset[7][18]=0.0;
+	qmatOffset[4][8]=qmatOffset[8][4]=0.0;
+	qmatOffset[18][8]=qmatOffset[8][18]=0.0;
+	qmatOffset[18][10]=qmatOffset[10][18]=0.0;
+	qmatOffset[19][10]=qmatOffset[10][19]=0.0;
+	qmatOffset[18][12]=qmatOffset[12][18]=0.0;
+	qmatOffset[19][12]=qmatOffset[12][19]=0.0;
+	qmatOffset[18][16]=qmatOffset[16][18]=0.0;
+	qmatOffset[17][18]=qmatOffset[18][17]=0.0;
+	}
+
+void Model::MultiplyByWAGAAMatrix(){
+	int modNum=0;
+	MODEL_FLOAT **qmatOffset = qmat[modNum];
+
+	qmatOffset[14][0] *= 1.75252;
+	qmatOffset[0][14] *= 1.75252;
+	qmatOffset[11][0] *= 1.61995;
+	qmatOffset[0][11] *= 1.61995;
+	qmatOffset[11][14] *= 2.0187;
+	qmatOffset[14][11] *= 2.0187;
+	qmatOffset[2][0] *= 2.34804;
+	qmatOffset[0][2] *= 2.34804;
+	qmatOffset[2][14] *= 0.468033;
+	qmatOffset[14][2] *= 0.468033;
+	qmatOffset[2][11] *= 17.251;
+	qmatOffset[11][2] *= 17.251;
+	qmatOffset[1][0] *= 3.26324;
+	qmatOffset[0][1] *= 3.26324;
+	qmatOffset[1][14] *= 1.67824;
+	qmatOffset[14][1] *= 1.67824;
+	qmatOffset[1][11] *= 0.842805;
+	qmatOffset[11][1] *= 0.842805;
+	qmatOffset[1][2] *= 0.0962568;
+	qmatOffset[2][1] *= 0.0962568;
+	qmatOffset[13][0] *= 2.88691;
+	qmatOffset[0][13] *= 2.88691;
+	qmatOffset[13][14] *= 9.64477;
+	qmatOffset[14][13] *= 9.64477;
+	qmatOffset[13][11] *= 4.90465;
+	qmatOffset[11][13] *= 4.90465;
+	qmatOffset[13][2] *= 1.95972;
+	qmatOffset[2][13] *= 1.95972;
+	qmatOffset[13][1] *= 0.313977;
+	qmatOffset[1][13] *= 0.313977;
+	qmatOffset[3][0] *= 5.02923;
+	qmatOffset[0][3] *= 5.02923;
+	qmatOffset[3][14] *= 1.39535;
+	qmatOffset[14][3] *= 1.39535;
+	qmatOffset[3][11] *= 3.00956;
+	qmatOffset[11][3] *= 3.00956;
+	qmatOffset[3][2] *= 19.6173;
+	qmatOffset[2][3] *= 19.6173;
+	qmatOffset[3][1] *= 0.0678423;
+	qmatOffset[1][3] *= 0.0678423;
+	qmatOffset[3][13] *= 17.3783;
+	qmatOffset[13][3] *= 17.3783;
+	qmatOffset[5][0] *= 4.50138;
+	qmatOffset[0][5] *= 4.50138;
+	qmatOffset[5][14] *= 1.85767;
+	qmatOffset[14][5] *= 1.85767;
+	qmatOffset[5][11] *= 3.57627;
+	qmatOffset[11][5] *= 3.57627;
+	qmatOffset[5][2] *= 2.75024;
+	qmatOffset[2][5] *= 2.75024;
+	qmatOffset[5][1] *= 0.974403;
+	qmatOffset[1][5] *= 0.974403;
+	qmatOffset[5][13] *= 1.04868;
+	qmatOffset[13][5] *= 1.04868;
+	qmatOffset[5][3] *= 1.80382;
+	qmatOffset[3][5] *= 1.80382;
+	qmatOffset[6][0] *= 1.00707;
+	qmatOffset[0][6] *= 1.00707;
+	qmatOffset[6][14] *= 6.79042;
+	qmatOffset[14][6] *= 6.79042;
+	qmatOffset[6][11] *= 12.5704;
+	qmatOffset[11][6] *= 12.5704;
+	qmatOffset[6][2] *= 2.95706;
+	qmatOffset[2][6] *= 2.95706;
+	qmatOffset[6][1] *= 0.791065;
+	qmatOffset[1][6] *= 0.791065;
+	qmatOffset[6][13] *= 13.6438;
+	qmatOffset[13][6] *= 13.6438;
+	qmatOffset[6][3] *= 1.81116;
+	qmatOffset[3][6] *= 1.81116;
+	qmatOffset[6][5] *= 0.792457;
+	qmatOffset[5][6] *= 0.792457;
+	qmatOffset[7][0] *= 0.614288;
+	qmatOffset[0][7] *= 0.614288;
+	qmatOffset[7][14] *= 0.594093;
+	qmatOffset[14][7] *= 0.594093;
+	qmatOffset[7][11] *= 1.76099;
+	qmatOffset[11][7] *= 1.76099;
+	qmatOffset[7][2] *= 0.125304;
+	qmatOffset[2][7] *= 0.125304;
+	qmatOffset[7][1] *= 0.540574;
+	qmatOffset[1][7] *= 0.540574;
+	qmatOffset[7][13] *= 0.361952;
+	qmatOffset[13][7] *= 0.361952;
+	qmatOffset[7][3] *= 0.404776;
+	qmatOffset[3][7] *= 0.404776;
+	qmatOffset[7][5] *= 0.0967499;
+	qmatOffset[5][7] *= 0.0967499;
+	qmatOffset[7][6] *= 0.439075;
+	qmatOffset[6][7] *= 0.439075;
+	qmatOffset[9][0] *= 1.26431;
+	qmatOffset[0][9] *= 1.26431;
+	qmatOffset[9][14] *= 1.58126;
+	qmatOffset[14][9] *= 1.58126;
+	qmatOffset[9][11] *= 0.417907;
+	qmatOffset[11][9] *= 0.417907;
+	qmatOffset[9][2] *= 0.269452;
+	qmatOffset[2][9] *= 0.269452;
+	qmatOffset[9][1] *= 1.22101;
+	qmatOffset[1][9] *= 1.22101;
+	qmatOffset[9][13] *= 2.76265;
+	qmatOffset[13][9] *= 2.76265;
+	qmatOffset[9][3] *= 0.490144;
+	qmatOffset[3][9] *= 0.490144;
+	qmatOffset[9][5] *= 0.194782;
+	qmatOffset[5][9] *= 0.194782;
+	qmatOffset[9][6] *= 1.58695;
+	qmatOffset[6][9] *= 1.58695;
+	qmatOffset[9][7] *= 10.0752;
+	qmatOffset[7][9] *= 10.0752;
+	qmatOffset[8][0] *= 2.8795;
+	qmatOffset[0][8] *= 2.8795;
+	qmatOffset[8][14] *= 17.0032;
+	qmatOffset[14][8] *= 17.0032;
+	qmatOffset[8][11] *= 9.57014;
+	qmatOffset[11][8] *= 9.57014;
+	qmatOffset[8][2] *= 1.52466;
+	qmatOffset[2][8] *= 1.52466;
+	qmatOffset[8][1] *= 0.23523;
+	qmatOffset[1][8] *= 0.23523;
+	qmatOffset[8][13] *= 12.3754;
+	qmatOffset[13][8] *= 12.3754;
+	qmatOffset[8][3] *= 8.21158;
+	qmatOffset[3][8] *= 8.21158;
+	qmatOffset[8][5] *= 1.18692;
+	qmatOffset[5][8] *= 1.18692;
+	qmatOffset[8][6] *= 2.82919;
+	qmatOffset[6][8] *= 2.82919;
+	qmatOffset[8][7] *= 1.02892;
+	qmatOffset[7][8] *= 1.02892;
+	qmatOffset[8][9] *= 0.818336;
+	qmatOffset[9][8] *= 0.818336;
+	qmatOffset[10][0] *= 2.83893;
+	qmatOffset[0][10] *= 2.83893;
+	qmatOffset[10][14] *= 2.17063;
+	qmatOffset[14][10] *= 2.17063;
+	qmatOffset[10][11] *= 0.629813;
+	qmatOffset[11][10] *= 0.629813;
+	qmatOffset[10][2] *= 0.32966;
+	qmatOffset[2][10] *= 0.32966;
+	qmatOffset[10][1] *= 1.24069;
+	qmatOffset[1][10] *= 1.24069;
+	qmatOffset[10][13] *= 4.9098;
+	qmatOffset[13][10] *= 4.9098;
+	qmatOffset[10][3] *= 1.00125;
+	qmatOffset[3][10] *= 1.00125;
+	qmatOffset[10][5] *= 0.553173;
+	qmatOffset[5][10] *= 0.553173;
+	qmatOffset[10][6] *= 1.28409;
+	qmatOffset[6][10] *= 1.28409;
+	qmatOffset[10][7] *= 13.5273;
+	qmatOffset[7][10] *= 13.5273;
+	qmatOffset[10][9] *= 15.4228;
+	qmatOffset[9][10] *= 15.4228;
+	qmatOffset[10][8] *= 2.9685;
+	qmatOffset[8][10] *= 2.9685;
+	qmatOffset[4][0] *= 0.668808;
+	qmatOffset[0][4] *= 0.668808;
+	qmatOffset[4][14] *= 0.326346;
+	qmatOffset[14][4] *= 0.326346;
+	qmatOffset[4][11] *= 0.305538;
+	qmatOffset[11][4] *= 0.305538;
+	qmatOffset[4][2] *= 0.148478;
+	qmatOffset[2][4] *= 0.148478;
+	qmatOffset[4][1] *= 1.26464;
+	qmatOffset[1][4] *= 1.26464;
+	qmatOffset[4][13] *= 0.317481;
+	qmatOffset[13][4] *= 0.317481;
+	qmatOffset[4][3] *= 0.257789;
+	qmatOffset[3][4] *= 0.257789;
+	qmatOffset[4][5] *= 0.158647;
+	qmatOffset[5][4] *= 0.158647;
+	qmatOffset[4][6] *= 2.15858;
+	qmatOffset[6][4] *= 2.15858;
+	qmatOffset[4][7] *= 3.36628;
+	qmatOffset[7][4] *= 3.36628;
+	qmatOffset[4][9] *= 6.72059;
+	qmatOffset[9][4] *= 6.72059;
+	qmatOffset[4][8] *= 0.282261;
+	qmatOffset[8][4] *= 0.282261;
+	qmatOffset[4][10] *= 3.78302;
+	qmatOffset[10][4] *= 3.78302;
+	qmatOffset[12][0] *= 4.57074;
+	qmatOffset[0][12] *= 4.57074;
+	qmatOffset[12][14] *= 2.15896;
+	qmatOffset[14][12] *= 2.15896;
+	qmatOffset[12][11] *= 0.619836;
+	qmatOffset[11][12] *= 0.619836;
+	qmatOffset[12][2] *= 1.34714;
+	qmatOffset[2][12] *= 1.34714;
+	qmatOffset[12][1] *= 0.347612;
+	qmatOffset[1][12] *= 0.347612;
+	qmatOffset[12][13] *= 2.96563;
+	qmatOffset[13][12] *= 2.96563;
+	qmatOffset[12][3] *= 2.16806;
+	qmatOffset[3][12] *= 2.16806;
+	qmatOffset[12][5] *= 0.773901;
+	qmatOffset[5][12] *= 0.773901;
+	qmatOffset[12][6] *= 2.21205;
+	qmatOffset[6][12] *= 2.21205;
+	qmatOffset[12][7] *= 0.317506;
+	qmatOffset[7][12] *= 0.317506;
+	qmatOffset[12][9] *= 1.32127;
+	qmatOffset[9][12] *= 1.32127;
+	qmatOffset[12][8] *= 1.76944;
+	qmatOffset[8][12] *= 1.76944;
+	qmatOffset[12][10] *= 0.544368;
+	qmatOffset[10][12] *= 0.544368;
+	qmatOffset[12][4] *= 0.51296;
+	qmatOffset[4][12] *= 0.51296;
+	qmatOffset[15][0] *= 10.7101;
+	qmatOffset[0][15] *= 10.7101;
+	qmatOffset[15][14] *= 3.88965;
+	qmatOffset[14][15] *= 3.88965;
+	qmatOffset[15][11] *= 12.6274;
+	qmatOffset[11][15] *= 12.6274;
+	qmatOffset[15][2] *= 3.40533;
+	qmatOffset[2][15] *= 3.40533;
+	qmatOffset[15][1] *= 4.4726;
+	qmatOffset[1][15] *= 4.4726;
+	qmatOffset[15][13] *= 3.26906;
+	qmatOffset[13][15] *= 3.26906;
+	qmatOffset[15][3] *= 2.23982;
+	qmatOffset[3][15] *= 2.23982;
+	qmatOffset[15][5] *= 4.2634;
+	qmatOffset[5][15] *= 4.2634;
+	qmatOffset[15][6] *= 2.35176;
+	qmatOffset[6][15] *= 2.35176;
+	qmatOffset[15][7] *= 1.01497;
+	qmatOffset[7][15] *= 1.01497;
+	qmatOffset[15][9] *= 1.09535;
+	qmatOffset[9][15] *= 1.09535;
+	qmatOffset[15][8] *= 3.07289;
+	qmatOffset[8][15] *= 3.07289;
+	qmatOffset[15][10] *= 1.5693;
+	qmatOffset[10][15] *= 1.5693;
+	qmatOffset[15][4] *= 1.7346;
+	qmatOffset[4][15] *= 1.7346;
+	qmatOffset[15][12] *= 5.12592;
+	qmatOffset[12][15] *= 5.12592;
+	qmatOffset[16][0] *= 6.73946;
+	qmatOffset[0][16] *= 6.73946;
+	qmatOffset[16][14] *= 1.76155;
+	qmatOffset[14][16] *= 1.76155;
+	qmatOffset[16][11] *= 6.45016;
+	qmatOffset[11][16] *= 6.45016;
+	qmatOffset[16][2] *= 1.19107;
+	qmatOffset[2][16] *= 1.19107;
+	qmatOffset[16][1] *= 1.62992;
+	qmatOffset[1][16] *= 1.62992;
+	qmatOffset[16][13] *= 2.72592;
+	qmatOffset[13][16] *= 2.72592;
+	qmatOffset[16][3] *= 2.61419;
+	qmatOffset[3][16] *= 2.61419;
+	qmatOffset[16][5] *= 0.717545;
+	qmatOffset[5][16] *= 0.717545;
+	qmatOffset[16][6] *= 1.50385;
+	qmatOffset[6][16] *= 1.50385;
+	qmatOffset[16][7] *= 4.63305;
+	qmatOffset[7][16] *= 4.63305;
+	qmatOffset[16][9] *= 1.03778;
+	qmatOffset[9][16] *= 1.03778;
+	qmatOffset[16][8] *= 4.40689;
+	qmatOffset[8][16] *= 4.40689;
+	qmatOffset[16][10] *= 4.81721;
+	qmatOffset[10][16] *= 4.81721;
+	qmatOffset[16][4] *= 0.546192;
+	qmatOffset[4][16] *= 0.546192;
+	qmatOffset[16][12] *= 2.52719;
+	qmatOffset[12][16] *= 2.52719;
+	qmatOffset[16][15] *= 13.9104;
+	qmatOffset[15][16] *= 13.9104;
+	qmatOffset[18][0] *= 0.35946;
+	qmatOffset[0][18] *= 0.35946;
+	qmatOffset[18][14] *= 3.69815;
+	qmatOffset[14][18] *= 3.69815;
+	qmatOffset[18][11] *= 0.228503;
+	qmatOffset[11][18] *= 0.228503;
+	qmatOffset[18][2] *= 0.412312;
+	qmatOffset[2][18] *= 0.412312;
+	qmatOffset[18][1] *= 2.27837;
+	qmatOffset[1][18] *= 2.27837;
+	qmatOffset[18][13] *= 0.685467;
+	qmatOffset[13][18] *= 0.685467;
+	qmatOffset[18][3] *= 0.497433;
+	qmatOffset[3][18] *= 0.497433;
+	qmatOffset[18][5] *= 1.07071;
+	qmatOffset[5][18] *= 1.07071;
+	qmatOffset[18][6] *= 0.834267;
+	qmatOffset[6][18] *= 0.834267;
+	qmatOffset[18][7] *= 0.675128;
+	qmatOffset[7][18] *= 0.675128;
+	qmatOffset[18][9] *= 2.1139;
+	qmatOffset[9][18] *= 2.1139;
+	qmatOffset[18][8] *= 0.436898;
+	qmatOffset[8][18] *= 0.436898;
+	qmatOffset[18][10] *= 1.63857;
+	qmatOffset[10][18] *= 1.63857;
+	qmatOffset[18][4] *= 4.86017;
+	qmatOffset[4][18] *= 4.86017;
+	qmatOffset[18][12] *= 0.442935;
+	qmatOffset[12][18] *= 0.442935;
+	qmatOffset[18][15] *= 1.6641;
+	qmatOffset[15][18] *= 1.6641;
+	qmatOffset[18][16] *= 0.352251;
+	qmatOffset[16][18] *= 0.352251;
+	qmatOffset[19][0] *= 0.764894;
+	qmatOffset[0][19] *= 0.764894;
+	qmatOffset[19][14] *= 1.21225;
+	qmatOffset[14][19] *= 1.21225;
+	qmatOffset[19][11] *= 3.45058;
+	qmatOffset[11][19] *= 3.45058;
+	qmatOffset[19][2] *= 1.03489;
+	qmatOffset[2][19] *= 1.03489;
+	qmatOffset[19][1] *= 1.72794;
+	qmatOffset[1][19] *= 1.72794;
+	qmatOffset[19][13] *= 0.723509;
+	qmatOffset[13][19] *= 0.723509;
+	qmatOffset[19][3] *= 0.623719;
+	qmatOffset[3][19] *= 0.623719;
+	qmatOffset[19][5] *= 0.329184;
+	qmatOffset[5][19] *= 0.329184;
+	qmatOffset[19][6] *= 12.3072;
+	qmatOffset[6][19] *= 12.3072;
+	qmatOffset[19][7] *= 1.33502;
+	qmatOffset[7][19] *= 1.33502;
+	qmatOffset[19][9] *= 1.26654;
+	qmatOffset[9][19] *= 1.26654;
+	qmatOffset[19][8] *= 0.423423;
+	qmatOffset[8][19] *= 0.423423;
+	qmatOffset[19][10] *= 1.36128;
+	qmatOffset[10][19] *= 1.36128;
+	qmatOffset[19][4] *= 20.5074;
+	qmatOffset[4][19] *= 20.5074;
+	qmatOffset[19][12] *= 0.686449;
+	qmatOffset[12][19] *= 0.686449;
+	qmatOffset[19][15] *= 2.50053;
+	qmatOffset[15][19] *= 2.50053;
+	qmatOffset[19][16] *= 0.925072;
+	qmatOffset[16][19] *= 0.925072;
+	qmatOffset[19][18] *= 7.8969;
+	qmatOffset[18][19] *= 7.8969;
+	qmatOffset[17][0] *= 6.37375;
+	qmatOffset[0][17] *= 6.37375;
+	qmatOffset[17][14] *= 0.800207;
+	qmatOffset[14][17] *= 0.800207;
+	qmatOffset[17][11] *= 0.623538;
+	qmatOffset[11][17] *= 0.623538;
+	qmatOffset[17][2] *= 0.484018;
+	qmatOffset[2][17] *= 0.484018;
+	qmatOffset[17][1] *= 3.18413;
+	qmatOffset[1][17] *= 3.18413;
+	qmatOffset[17][13] *= 0.957268;
+	qmatOffset[13][17] *= 0.957268;
+	qmatOffset[17][3] *= 1.87059;
+	qmatOffset[3][17] *= 1.87059;
+	qmatOffset[17][5] *= 0.594945;
+	qmatOffset[5][17] *= 0.594945;
+	qmatOffset[17][6] *= 0.376062;
+	qmatOffset[6][17] *= 0.376062;
+	qmatOffset[17][7] *= 24.8508;
+	qmatOffset[7][17] *= 24.8508;
+	qmatOffset[17][9] *= 5.72027;
+	qmatOffset[9][17] *= 5.72027;
+	qmatOffset[17][8] *= 0.970464;
+	qmatOffset[8][17] *= 0.970464;
+	qmatOffset[17][10] *= 6.54037;
+	qmatOffset[10][17] *= 6.54037;
+	qmatOffset[17][4] *= 2.06492;
+	qmatOffset[4][17] *= 2.06492;
+	qmatOffset[17][12] *= 1.0005;
+	qmatOffset[12][17] *= 1.0005;
+	qmatOffset[17][15] *= 0.739488;
+	qmatOffset[15][17] *= 0.739488;
+	qmatOffset[17][16] *= 4.41086;
+	qmatOffset[16][17] *= 4.41086;
+	qmatOffset[17][18] *= 1.1609;
+	qmatOffset[18][17] *= 1.1609;
+	qmatOffset[17][19] *= 1;
+	qmatOffset[19][17] *= 1;
+	}
+
+ModelPartition::ModelPartition(){
+	for(int i=0;i<modSpecSet.NumSpecs();i++){
+		ModelSet * ms = new ModelSet(i);
+		modSets.push_back(ms);
+		for(int m=0;m<ms->NumModels();m++)
+			models.push_back(modSets[i]->GetModel(m));
+		}
+
+	//numSubsetRates will be = # specs in the case of no linkage
+	//but in the case of linkage with different subset rates #specs will be 1 and numSubsetRates > 1
+	//separate subset rates will always be stored for each data subset, but they won't be changed if 
+	//they aren't actually being estiamted
+	if(dataSubInfo.size() > 1){
+		int totalCharacters = 0;
+/*		for(int d = 0;d < dataSubInfo.size();d++){
+			totalCharacters += dataSubInfo[d].totalCharacters;
+			}
+		for(int d = 0;d < dataSubInfo.size();d++){
+			subsetRates.push_back(1.0);
+			subsetProportions.push_back(dataSubInfo[d].totalCharacters / (FLOAT_TYPE) totalCharacters);
+			}
+*/
+		//if we're in MKV mode and this is a subset that MKV will be applied to, need to compensate for dummy char
+		for(int d = 0;d < dataSubInfo.size();d++){
+			totalCharacters += dataSubInfo[d].totalCharacters - (dataSubInfo[d].usedAs == DataSubsetInfo::NSTATEV ? 1 : 0);
+			}
+		for(int d = 0;d < dataSubInfo.size();d++){
+			subsetRates.push_back(1.0);
+			subsetProportions.push_back((dataSubInfo[d].totalCharacters - (dataSubInfo[d].usedAs == DataSubsetInfo::NSTATEV ? 1 : 0))/ (FLOAT_TYPE) totalCharacters);
+			}
+#ifndef NDEBUG
+		double propTot = 0.0;
+		for(int d = 0;d < dataSubInfo.size();d++) propTot += subsetProportions[d];
+		assert(FloatingPointEquals(propTot, 1.0, 1e-6));
+#endif
+
+		if(modSpecSet.InferSubsetRates()){
+			vector<FLOAT_TYPE*> dummy;
+			for(int d = 0;d < dataSubInfo.size();d++)
+				dummy.push_back(&subsetRates[d]);
+			SubsetRates *rm = new SubsetRates(&dummy[0], dataSubInfo.size(), -1);
+			rm->SetWeight(dataSubInfo.size() * 2);
+			allParamsToMutate.push_back(rm);
+			}
+		}
+	else{
+		subsetRates.push_back(1.0);
+		subsetProportions.push_back(1.0);
+		}
+
+	CollectMutableParameters();
+	}
+
+//This is the size in KB not elements. KB is used because the number of bytes can be larger than UNSIGNED_MAX on very large datasets
+double ModelPartition::CalcRequiredCLAsizeKB(const DataPartition *dat){
+	unsigned size = 0;
+	double size2 = 0;
+	double KB = 1024;
+	for(vector<ClaSpecifier>::iterator specs = claSpecs.begin();specs != claSpecs.end();specs++){
+		const Model *thisMod = GetModel((*specs).modelIndex);
+		size2 += (dat->GetSubset((*specs).dataIndex)->NChar() / KB) * (thisMod->NStates() * thisMod->NRateCats() * sizeof(FLOAT_TYPE) + sizeof(int));
+		size += (thisMod->NStates() * thisMod->NRateCats() * dat->GetSubset((*specs).dataIndex)->NChar()) * sizeof(FLOAT_TYPE);
+		size += dat->GetSubset((*specs).dataIndex)->NChar() * sizeof(int);
+		}
+	assert(size2 * 1024 == size);
+	return size2;
+	}
+
+//this is the size in BYTES not elements
+unsigned ModelPartition::CalcRequiredCLAsize(const DataPartition *dat){
+	unsigned size = 0;
+	for(vector<ClaSpecifier>::iterator specs = claSpecs.begin();specs != claSpecs.end();specs++){
+		const Model *thisMod = GetModel((*specs).modelIndex);
+		size += (thisMod->NStates() * thisMod->NRateCats() * dat->GetSubset((*specs).dataIndex)->NChar()) * sizeof(FLOAT_TYPE);
+		size += dat->GetSubset((*specs).dataIndex)->NChar() * sizeof(int);
+		}
+	return size;
+	}
+
+//these are just stolen directly from the corresponding Model:: functions for now
+BaseParameter *ModelPartition::SelectModelMutation(){
+	CalcMutationProbsFromWeights();
+	if(allParamsToMutate.empty() == true) return NULL;
+	FLOAT_TYPE r=rnd.uniform();
+	vector<BaseParameter*>::iterator it;
+	for(it=allParamsToMutate.begin();it!=allParamsToMutate.end();it++){
+		if((*it)->GetProb() > r) return *it;
+		}
+	it--;
+	return *it;
+	}
+
+void ModelPartition::CalcMutationProbsFromWeights(){
+	FLOAT_TYPE tot=ZERO_POINT_ZERO, running=ZERO_POINT_ZERO;
+	for(vector<BaseParameter*>::iterator it=allParamsToMutate.begin();it!=allParamsToMutate.end();it++){
+		tot += (*it)->GetWeight();
+		}
+	for(vector<BaseParameter*>::iterator it=allParamsToMutate.begin();it!=allParamsToMutate.end();it++){
+		running += (*it)->GetWeight() / tot;
+		(*it)->SetProb(running);
+		}
+	}
+
+int ModelPartition::PerformModelMutation(){
+	if(allParamsToMutate.empty()) return 0;
+	BaseParameter *mut = SelectModelMutation();
+	assert(mut != NULL);
+	mut->Mutator(Model::mutationShape);
+	int retType;
+
+	if(mut->Type() == RELATIVERATES){
+		for(vector<int>::iterator mit = mut->modelsThatInclude.begin();mit != mut->modelsThatInclude.end();mit++){
+			models[*mit]->UpdateQMat();
+			models[*mit]->eigenDirty=true;
+			}
+		retType=Individual::rates;
+		}
+	else if(mut->Type() == STATEFREQS){
+		for(vector<int>::iterator mit = mut->modelsThatInclude.begin();mit != mut->modelsThatInclude.end();mit++){
+			models[*mit]->UpdateQMat();
+			models[*mit]->eigenDirty=true;
+			}
+		retType=Individual::pi;
+		}
+	
+	else if(mut->Type() == PROPORTIONINVARIANT){
+		//this max checking should really be rolled into the parameter class
+//DEBUG PARTITION - need to put this check somewhere - since the pinv value can be shared
+		//across subsets with different obs numbers of invariants, not sure how it should be
+		//limited
+//		*propInvar = (*propInvar > maxPropInvar ? maxPropInvar : *propInvar);
+		//the non invariant rates need to be rescaled even if there is only 1
+		for(vector<int>::iterator mit = mut->modelsThatInclude.begin();mit != mut->modelsThatInclude.end();mit++){
+			*(models[*mit]->propInvar) = (*(models[*mit]->propInvar) > (models[*mit]->maxPropInvar) ? (models[*mit]->maxPropInvar) : *(models[*mit]->propInvar));
+			if(modSpecSet.GetModSpec(*mit)->IsFlexRateHet() == false) 
+				models[*mit]->AdjustRateProportions();
+			else models[*mit]->NormalizeRates();
+			}
+		retType=Individual::pinv;
+		}
+	else if(mut->Type() == ALPHASHAPE){
+		for(vector<int>::iterator mit = mut->modelsThatInclude.begin();mit != mut->modelsThatInclude.end();mit++)
+			models[*mit]->DiscreteGamma(models[*mit]->rateMults, models[*mit]->rateProbs, *models[*mit]->alpha);
+		retType=Individual::alpha;
+		}
+	else if(mut->Type() == RATEPROPS || mut->Type() == RATEMULTS){
+		for(vector<int>::iterator mit = mut->modelsThatInclude.begin();mit != mut->modelsThatInclude.end();mit++){
+			//flex rates and omega muts come through here
+
+			//enforce an ordering of the rate multipliers, so that they can't "cross" one another
+			if(models[*mit]->NRateCats() > 1) 
+				models[*mit]->CheckAndCorrectRateOrdering();
+
+			if(modSpecSet.GetModSpec(*mit)->IsFlexRateHet() == true)
+				models[*mit]->NormalizeRates();
+			else if(modSpecSet.GetModSpec(*mit)->IsCodon()){
+				//this normalization could really be taken care of in the mutator, but this general purpose
+				//function does a better job of enforcing minimum values
+				models[*mit]->NormalizeSumConstrainedValues(&models[*mit]->omegaProbs[0], models[*mit]->NRateCats(), ONE_POINT_ZERO, 1.0e-5, -1);
+				//eigen stuff needs to be recalced for changes to nonsynonymous rates
+				models[*mit]->eigenDirty = true;
+				}
+			}
+			retType=Individual::alpha;
+		}
+	else if(mut->Type() == SUBSETRATE){
+		NormalizeSubsetRates();
+		retType=Individual::subsetRate;
+		}
+	else if(mut->Type() == INSERTPROPORTION || mut->Type() == DELETERATE){
+		retType=Individual::indel;
+		}
+	return retType;
+	}
+
+void ModelPartition::ReadGarliFormattedModelStrings(string &modstr){
+	NxsString mod(modstr.c_str());
+	NxsString::to_lower(mod);
+
+	try{
+		while(mod.length() > 0){
+			//now, read through the string, figuring out where each of the model strings start and end, and what numbers they are
+			size_t start = mod.find("m");
+			size_t start2 = mod.find("s");
+			if(start < start2){
+				if(start == string::npos)
+					throw ErrorException("Problem reading model parameter string.");
+				mod.erase(0, 1);
+				int space = mod.find(" ");
+				if(space == string::npos)
+					throw ErrorException("Problem reading model parameter string.");
+
+				//space here is the number of elements, not a range
+				//string num = mod.substr(0, space);
+				NxsString num = mod.substr(0, space).c_str();
+				if(!num.IsALong())
+					throw ErrorException("Expecting a model number, found %s!", num.c_str());
+				int modNum = atoi(num.c_str());
+				int modIndex = modNum - 1;
+				if(modNum == 0)
+					throw ErrorException("Model numbers in param strings should begin with M1, not M0!", modNum);
+				if(modIndex >= models.size())
+					throw ErrorException("Model number appearing in param string (%d) is too large!", modNum);
+				mod.erase(0, space + 1);
+					
+				//now we've eaten off everything up to the actual model string.  figure out where it ends for this model.
+				//find_first_of looks for the first occurence of the letters m or s.
+				size_t end = mod.find_first_of("ms");
+				if(end == string::npos){
+					if(mod.length() == 0)
+						throw ErrorException("Problem reading model parameter string.");
+					end = mod.length();
+					}
+				string thismod = mod.substr(0, end);
+				mod.erase(0, end);
+				GetModelSet(modIndex)->GetModel(0)->ReadGarliFormattedModelString(thismod);
+				}
+			else if(start2 != string::npos){
+				size_t space = mod.find(" ");
+				if(space == string::npos)
+					throw ErrorException("Problem reading subset rate parameters from file.");
+				mod.erase(0, space + 1);
+				vector<FLOAT_TYPE> ssr;
+				NxsString val;
+				for(int m = 0;m < NumSubsetRates();m++){
+					space = mod.find(" ");
+					if(space == string::npos){
+						if(mod.length() == 0){
+							throw(ErrorException("Problem reading subset rate parameters from file.  Wrong number of rates?", val.c_str()));
+							}
+						}
+					val = mod.substr(0, space).c_str();
+					mod.erase(0, space + 1);
+					if(! val.IsADouble())
+						throw ErrorException("Problem reading subset rate parameters from file.  Expected a number, found %s.", val.c_str());
+					ssr.push_back(atof(val.c_str()));
+					}
+				SetSubsetRates(ssr, true);
+				}
+			else{
+				//if there is only one model and the M0 wasn't specified, then try to read it anyway
+				if(models.size() == 1){
+					GetModelSet(0)->GetModel(0)->ReadGarliFormattedModelString(mod);
+					break;
+					}
+				else
+					throw ErrorException("Problem reading model specification string");
+				}
+			}
+		}
+	catch(ErrorException &mess){
+		outman.UserMessage("\nERROR. There was a problem with the model specification string near this point:\n\"%s\"", mod.c_str());
+		outman.UserMessage("\nProper format for specification of model parameters in the partitioned\nversion is as follows. Neither subset rates nor all models are required to\nappear. Line breaks are ignored, but the string must be terminated with a \";\".\nThe first model is M1. Omit the <>'s in the following.");
+		outman.UserMessage("\n\nS <subset rate 1> <subset rate 2> <etc.>\nM<first model number> <garli formatted param string for model>\nM<second model number>  <garli formatted param string for model>\n <etc.> ;");
+		outman.UserMessage("\nExample for 3 models:\nS  0.551458  0.302705  2.145837\nM1 r 1.959444 2.571568 1.406484 1.406484 3.725263 e 0.310294 0.176855 0.297080 0.215771 a 0.410964\nM2 r 4.366321 7.061605 1.603498 7.061605 4.366321 e 0.269302 0.163670 0.160508 0.406520 a 0.361294\nM3 r 1.000000 4.908101 3.372480 0.457829 4.908101 e 0.156505 0.353697 0.287843 0.201954 a 4.098323 p 0.034152;");
+		outman.UserMessage("\nWhen there is only one model (i.e., unpartitioned analyses), the \"M1\" part\nthat indicates the model number need not appear.");
+		throw mess;
+		}
+	}
+
+void ModelPartition::FillGarliFormattedModelStrings(string &s) const{
+	char temp[50];
+	if(modSpecSet.InferSubsetRates()){
+		s += " S ";
+		for(int r = 0;r < NumSubsetRates();r++){
+			sprintf(temp, " %f ", SubsetRate(r));
+			s += temp;
+			}
+		}
+	for(int m = 0;m < modSets.size(); m++){
+		sprintf(temp, " M%d" , m + 1);
+		s += temp;
+		GetModelSet(m)->GetModel(0)->FillGarliFormattedModelString(s);
+		}
+	}
+
+void ModelPartition::WriteModelPartitionCheckpoint(OUTPUT_CLASS &out) const {
+	//subsetProportions are data dependent, not free variables, so don't need to write
+	if(NumModelSets() > 1){
+		FLOAT_TYPE *dummy = new FLOAT_TYPE;	
+		for(int s = 0;s < NumSubsetRates();s++){
+			*dummy = subsetRates[s];
+			out.WRITE_TO_FILE(dummy, sizeof(FLOAT_TYPE), 1);
+			}
+		delete dummy;
+		}
+	for(int m = 0;m < modSets.size(); m++){
+		GetModelSet(m)->WriteModelSetCheckpoint(out);
+		}
+	}
+
+void ModelPartition::ReadModelPartitionCheckpoint(FILE *in) {
+	if(NumModelSets() > 1){	
+		FLOAT_TYPE *dummy = new FLOAT_TYPE;
+		vector<FLOAT_TYPE> rates;
+		for(int s = 0;s < NumSubsetRates();s++){
+			assert(ferror(in) == false);
+			fread(dummy, sizeof(FLOAT_TYPE), 1, in);
+			rates.push_back(*dummy);
+			}
+		SetSubsetRates(rates, false);
+		delete dummy;
+		}
+	for(int m = 0;m < modSets.size(); m++){
+		GetModelSet(m)->ReadModelSetCheckpoint(in);
+		}	
+	}
+
diff --git a/src/model.h b/src/model.h
new file mode 100644
index 0000000..4cc5b9e
--- /dev/null
+++ b/src/model.h
@@ -0,0 +1,2199 @@
+// GARLI version 2.1 source code
+// Copyright 2005-2014 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef _MODEL_
+#define _MODEL_
+
+#if !defined(_MSC_VER)
+#define _stricmp strcasecmp
+#endif
+
+#include <iostream>
+#include <cassert>
+#include <math.h>
+#include <vector>
+
+using namespace std;
+
+#include "rng.h"
+#include "sequencedata.h"
+#include "configoptions.h"
+#include "errorexception.h"
+
+class ModelSpecification;
+class ModelSpecificationSet;
+class MFILE;
+class Individual;
+class ClaSpecifier;
+
+extern rng rnd;
+//extern ModelSpecification modSpec;
+extern ModelSpecificationSet modSpecSet;
+extern bool FloatingPointEquals(const FLOAT_TYPE first, const FLOAT_TYPE sec, const FLOAT_TYPE epsilon);
+
+#ifdef SINGLE_PRECISION_FLOATS
+	#ifndef SUM_TO
+		#define SUM_TO 1900.0f
+	#endif
+
+	//min rate is 1.0e6 times less than the mean
+	//max is just less than SUM_TO
+	#define MIN_REL_RATE (SUM_TO * (1.0e-6f/190.0f))
+	#define MAX_REL_RATE (SUM_TO - (189.0f * MIN_REL_RATE))
+#else
+
+	#ifndef SUM_TO
+		#define SUM_TO 1900.0
+	#endif
+
+	//min rate is 1.0e6 times less than the mean
+	//max is just less than SUM_TO
+	#define MIN_REL_RATE (SUM_TO * (1.0e-6/190.0))
+	#define MAX_REL_RATE (SUM_TO - (189.0 * MIN_REL_RATE))
+#endif
+
+	enum{//the types
+		STATEFREQS = 1,
+		RELATIVERATES = 2,
+		ALPHASHAPE = 3,
+		RATEMULTS = 4,
+		RATEPROPS = 5,
+		PROPORTIONINVARIANT = 6,
+		SUBSETRATE = 7,
+		DELETERATE = 8,
+		INSERTPROPORTION = 9
+		};
+
+class BaseParameter {
+protected:
+	NxsString name;
+	int type;
+	int numElements;
+	bool fixed;
+	FLOAT_TYPE maxv,minv;
+	FLOAT_TYPE mutationWeight;
+	FLOAT_TYPE mutationProb;
+	vector<FLOAT_TYPE*> vals; //this will be aliased to the actual 
+						//parameter value within the model class (sneaky!)
+	vector<FLOAT_TYPE> default_vals;
+
+public:
+	vector<int> modelsThatInclude;//this isn't currently being used, but will eventually be used to only dirty models that changed
+
+	BaseParameter()	{
+		numElements=1;
+		maxv=minv=0.0;
+		}
+
+	BaseParameter(const char *n, FLOAT_TYPE **dv, int t, int numE, FLOAT_TYPE mn, FLOAT_TYPE mx, int modNum) {
+		vals.reserve(6);
+		default_vals.reserve(6);
+		name=n;
+		type=t;
+		numElements=numE;
+		for(int i=0;i<numElements;i++){
+			default_vals.push_back(*(dv[i]));
+			vals.push_back(dv[i]);
+			}
+		minv=mn;
+		maxv=mx;
+		fixed=false;
+		//PARTITION this is a hack for now that doesn't allow linking
+		modelsThatInclude.push_back(modNum);
+		}
+	~BaseParameter(){};
+/*	void Report(ostream &out){
+		out << "Type:\t" << name << "\n";
+		if(numElements > 1)
+			out << "Current value:\t";
+		else 
+			out << "Current values:\t";
+		for(int i=0;i<numElements;i++)
+			out << vals[
+
+		}
+*/
+	void SetFixed(bool tf) {fixed=tf;}
+	bool IsFixed() const {return fixed;}
+	int Type() const {return type;}
+	void SetWeight(FLOAT_TYPE w){mutationWeight=w;}
+	FLOAT_TYPE GetWeight(){return mutationWeight;}
+	void SetProb(FLOAT_TYPE p){mutationProb=p;}
+	FLOAT_TYPE GetProb(){return mutationProb;}
+	virtual void Mutator(FLOAT_TYPE) = 0;
+	void SetToDefaultValues(){
+		for(int e=0;e<numElements;e++) *vals[e] = default_vals[e];
+		}
+	};
+
+class StateFrequencies:public BaseParameter{
+
+public:
+	StateFrequencies(FLOAT_TYPE **dv, int numE, int modnum):BaseParameter("Base frequencies", dv, STATEFREQS, numE, 1e-4, 0.999, modnum){};
+
+	void Mutator(FLOAT_TYPE mutationShape){
+		int freqToChange;
+		FLOAT_TYPE newFreq;
+		FLOAT_TYPE rescaleBy;
+		bool ok;
+		do{
+			ok = true;
+			freqToChange = int(rnd.uniform()*numElements);
+			newFreq =*vals[freqToChange] * rnd.gamma( mutationShape );
+			rescaleBy = (FLOAT_TYPE)((1.0-newFreq)/(1.0-*vals[freqToChange]));
+			if(newFreq  > maxv)
+				ok = false;
+			else if(newFreq < minv)
+				ok = false;
+			//all of this checking should almost never be necessary, but if the rescaling after
+			//changing one rate would push one of the others over a boundary, just draw another
+			//freqToChange and multiplier
+			else{
+				for(int b=0;b<numElements;b++){
+					assert( *vals[b] >= 1e-4);
+					if(b!=freqToChange){
+						if(*vals[b] * rescaleBy > maxv || *vals[b] * rescaleBy < minv){
+							ok = false;
+							break;
+							}
+						}
+					}
+				}
+			}while(! ok);
+
+		for(int b=0;b<numElements;b++)
+			if(b!=freqToChange) 
+				*vals[b] *= rescaleBy;
+
+		*vals[freqToChange]=newFreq;
+		for(int i=0;i<numElements;i++)
+			assert(*vals[i] >= minv && *vals[i] <= maxv);
+		}
+	};
+
+class RelativeRates:public BaseParameter{
+public:
+	// 5/9/06 now enforcing non-zero minimum relative rate to avoid problems in the linear algebra functions
+	RelativeRates(const char *c, FLOAT_TYPE **dv, int numE, FLOAT_TYPE min, FLOAT_TYPE max, int modnum):BaseParameter(c, dv, RELATIVERATES, numE, min, max, modnum){};
+
+	void Mutator(FLOAT_TYPE mutationShape){
+		if(numElements > 1){
+			int rateToChange=int(rnd.uniform()*(numElements));
+
+			//3/25/08 had to change this to allow arbitrary rate matrices mutation
+			//of a rate other than GT might actually alter GT, so we need to actually check
+			//whether it is 1.0 or not
+			//if(rateToChange<numElements-1){
+				*vals[rateToChange] *= rnd.gamma( mutationShape );
+				if(*vals[rateToChange]>maxv) *vals[rateToChange]=maxv;
+				if(*vals[rateToChange]<minv) *vals[rateToChange]=minv;
+			//	}
+			if(FloatingPointEquals(*vals[numElements-1], ONE_POINT_ZERO, 1.0e-12) == false){
+				FLOAT_TYPE scaler = ONE_POINT_ZERO / *vals[numElements-1];
+				for(int i=0;i<numElements-1;i++){
+					if(vals[i] != vals[numElements-1]){
+						*vals[i] *= scaler;
+						if(*vals[i]>maxv) *vals[i]=maxv;
+						if(*vals[i]<minv) *vals[i]=minv;
+						}
+					}
+				*vals[numElements - 1] *= scaler;
+#ifdef SINGLE_PRECISION_FLOATS
+				assert(FloatingPointEquals(*vals[numElements-1], ONE_POINT_ZERO, 1.0e-6));
+#else
+				assert(FloatingPointEquals(*vals[numElements-1], ONE_POINT_ZERO, 1.0e-10));
+#endif
+				}
+	/*		if(rateToChange<numElements-1){
+				*vals[rateToChange] *= rnd.gamma( mutationShape );
+				if(*vals[rateToChange]>maxv) *vals[rateToChange]=maxv;
+				if(*vals[rateToChange]<minv) *vals[rateToChange]=minv;
+				}
+			else{//if we alter the reference rate, which we are assuming
+				//is the last one (GT for DNA models, fixed to 1.0)
+				//scale all of the other rates
+				FLOAT_TYPE scaler= rnd.gamma( mutationShape );
+				for(int i=0;i<numElements-1;i++){
+					*vals[i] /= scaler;
+					if(*vals[i]>maxv) *vals[i]=maxv;
+					if(*vals[i]<minv) *vals[i]=minv;
+					}
+				}
+	*/		}
+		else {
+			*vals[0] *= rnd.gamma( mutationShape );
+			if(*vals[0]>maxv) *vals[0]=maxv;
+			if(*vals[0]<minv) *vals[0]=minv;
+			}
+		}
+	};
+
+class SumConstrainedRelativeRates:public BaseParameter{
+public:
+	FLOAT_TYPE sumTo;
+	SumConstrainedRelativeRates(const char *c, FLOAT_TYPE **dv, int numE, FLOAT_TYPE min, FLOAT_TYPE max, FLOAT_TYPE sum, int modnum):BaseParameter(c, dv, RELATIVERATES, numE, min, max, modnum){sumTo = sum;};
+
+	void Mutator(FLOAT_TYPE mutationShape){
+		assert(numElements > 1);
+		int rateToChange=int(rnd.uniform()*(numElements));
+
+		FLOAT_TYPE newVal = *vals[rateToChange] * rnd.gamma( mutationShape );
+		if(newVal>maxv) 
+			newVal=maxv;
+		if(newVal<minv) 
+			newVal=minv;			
+		*vals[rateToChange] = newVal;
+
+		FLOAT_TYPE sum = ZERO_POINT_ZERO;
+		for(int i=0;i<numElements;i++)
+			sum += *vals[i];
+		for(int i=0;i<numElements;i++)
+			*vals[i] *= sumTo / sum;
+
+#ifndef NDEBUG
+		sum = ZERO_POINT_ZERO;
+		for(int i=0;i<numElements;i++)
+			sum += *vals[i];
+		assert(FloatingPointEquals(sum, sumTo, 1e-8));
+#endif
+		}
+	};
+
+class RateProportions:public BaseParameter{
+public:
+	RateProportions(FLOAT_TYPE **dv, int numE, int modnum):BaseParameter("Rate props", dv, RATEPROPS, numE, 1e-5, 0.999, modnum){maxv = 1.0 - (numE * minv);};
+	void Mutator(FLOAT_TYPE mutationShape){
+		int rateToChange=int(rnd.uniform()*(numElements));
+		*vals[rateToChange] *= rnd.gamma( mutationShape );
+		if(*vals[rateToChange] > maxv) 
+			*vals[rateToChange] = maxv;		
+		if(*vals[rateToChange] < minv) 
+			*vals[rateToChange] = minv;
+
+		//This rescaling is pretty poor, and can result in rates ending up
+		//below or above the limits.  It should be followed up by a call of
+		//NormalizeSumConstrainedValues
+		FLOAT_TYPE newTot = 1.0 - *vals[rateToChange];
+		FLOAT_TYPE oldTot = 0.0;
+		for(int i=0;i<numElements;i++)
+			if(i != rateToChange) 
+				oldTot += *vals[i];
+		for(int i=0;i<numElements;i++)
+			if(i != rateToChange) 
+				*vals[i] *= newTot / oldTot;
+		newTot = 0.0;
+		for(int i=0;i<numElements;i++) 
+			newTot += *vals[i];
+		assert(fabs(newTot - 1.0) < 0.0001);
+		}
+	};
+
+class RateMultipliers:public BaseParameter{
+public:
+	RateMultipliers(FLOAT_TYPE **dv, int numE, int modnum):BaseParameter("Rate mults", dv, RATEMULTS, numE, (FLOAT_TYPE)1e-5, (FLOAT_TYPE)999.9, modnum){};
+	void Mutator(FLOAT_TYPE mutationShape){
+		int rateToChange=int(rnd.uniform()*(numElements));
+		*vals[rateToChange] *= rnd.gamma( mutationShape );
+		if(*vals[rateToChange]<minv) *vals[rateToChange]=minv;
+		if(*vals[rateToChange]>maxv) *vals[rateToChange]=maxv;
+		}
+	};
+
+class AlphaShape:public BaseParameter{
+public:
+	AlphaShape(const char *c, FLOAT_TYPE **dv, int modnum):BaseParameter(c, dv, ALPHASHAPE, 1, (FLOAT_TYPE)0.05, (FLOAT_TYPE)999.9, modnum){};
+	void Mutator(FLOAT_TYPE mutationShape){
+		*vals[0] *=rnd.gamma( mutationShape );
+		if(*vals[0]<minv) *vals[0]=minv;
+		if(*vals[0]>maxv) *vals[0]=maxv;
+		}
+	};
+
+class ProportionInvariant:public BaseParameter{
+public:
+	ProportionInvariant(const char *c, FLOAT_TYPE **dv, int modnum):BaseParameter(c, dv, PROPORTIONINVARIANT, 1, (FLOAT_TYPE)0.0001, (FLOAT_TYPE)0.9999, modnum){};
+	void Mutator(FLOAT_TYPE mutationShape){
+		*vals[0] *=rnd.gamma( mutationShape );
+		if(*vals[0] < minv) 
+			*vals[0] = minv;
+		if(*vals[0] > maxv) 
+			*vals[0] = maxv;
+		}
+	};
+
+class InsertProportion:public BaseParameter{
+public:
+	InsertProportion(FLOAT_TYPE **dv, int modnum):BaseParameter("Insert prop.", dv, INSERTPROPORTION, 1, (FLOAT_TYPE)0.0001, (FLOAT_TYPE)0.9999, modnum){};
+	void Mutator(FLOAT_TYPE mutationShape){
+		*vals[0] *=rnd.gamma( mutationShape );
+		if(*vals[0] < minv) 
+			*vals[0] = minv;
+		if(*vals[0] > maxv) 
+			*vals[0] = maxv;
+		}
+	};
+
+class SubsetRates:public BaseParameter{
+public:
+	SubsetRates(FLOAT_TYPE **dv, int numE, int modnum):BaseParameter("Subset rate", dv, SUBSETRATE, numE, (FLOAT_TYPE)0.0, (FLOAT_TYPE)1.0, modnum){};
+	void Mutator(FLOAT_TYPE mutationShape){
+		int rateToChange=int(rnd.uniform()*(numElements));
+		*vals[rateToChange] *= rnd.gamma( mutationShape );
+		if(*vals[rateToChange]>maxv) *vals[rateToChange]=maxv;
+		}
+	};
+
+class DeleteRate:public BaseParameter{
+public:
+	DeleteRate(FLOAT_TYPE **dv, int modnum):BaseParameter("Delete rate", dv, DELETERATE, 1, (FLOAT_TYPE)0.0001, (FLOAT_TYPE)999.0, modnum){};
+	void Mutator(FLOAT_TYPE mutationShape){
+		*vals[0] *= rnd.gamma( mutationShape );
+		if(*vals[0] > maxv) 
+			*vals[0] = maxv;
+		if(*vals[0] < minv) 
+			*vals[0] = minv;
+		}
+	};
+
+class ModelSpecification{
+	//this will hold the model specification as a global variable
+	//so that any models allocated will immediately know what they are
+public:
+	bool isSetup;
+	int nstates;
+	int numRateCats;
+
+	bool fixStateFreqs;
+	bool fixRelativeRates;
+	string arbitraryRateMatrixString;
+
+//	bool fixSubstitutionRates;
+	//bool flexRates;
+
+	bool fixInvariantSites;
+	bool fixAlpha;
+	bool fixOmega;
+	bool includeInvariantSites;
+	
+	bool gotRmatFromFile;
+	bool gotStateFreqsFromFile;
+	bool gotAlphaFromFile;
+	bool gotFlexFromFile;
+	bool gotPinvFromFile;
+	bool gotOmegasFromFile;
+	bool gotInsertFromFile;
+	bool gotDeleteFromFile;
+
+	enum{
+		DNA = 0,
+		RNA = 1,
+		CODON = 2,
+		AMINOACID = 3,
+		CODONAMINOACID = 4,
+		NSTATE = 5,
+		NSTATEV = 6,
+		ORDNSTATE = 7,
+		ORDNSTATEV = 8,
+		ORIENTEDGAP = 9,
+		BINARY = 10,
+		BINARY_NOTALLZEROS = 11
+
+		}datatype;
+	
+	enum{
+		EQUAL = 0,
+		EMPIRICAL = 1,
+		ESTIMATE = 2,
+		F1X4 = 3,
+		F3X4 = 4,
+		JONES = 5,
+		DAYHOFF = 6,
+		WAG = 8,
+		MTMAM = 9,
+		MTREV = 10,
+		USERSPECIFIED = 20
+		}stateFrequencies;
+
+	enum{
+		NST1 = 0,
+		NST2 = 1,
+		NST6 = 2,
+		ARBITRARY = 3,
+		JONESMAT = 5,
+		DAYHOFFMAT = 6,
+		POISSON = 7,
+		WAGMAT = 8,
+		MTMAMMAT = 9,
+		MTREVMAT = 10,
+		ESTIMATEDAAMAT = 11,
+		TWOSERINEMAT = 12,
+		USERSPECIFIEDMAT = 20
+		}rateMatrix;
+	
+	enum{
+		NONE = 0,
+		GAMMA = 1,
+		FLEX  = 2,
+		NONSYN = 3
+		}rateHetType;
+
+	enum{
+		STANDARD = 0,
+		VERTMITO = 1,
+		INVERTMITO = 2,
+		STANDARDTWOSERINE = 3,
+		VERTMITOTWOSERINE = 4,
+		INVERTMITOTWOSERINE = 5
+		}geneticCode;	
+
+	ModelSpecification(){
+		nstates=4;
+		//this is the default model
+		SetGTR();
+		SetGammaRates();
+		SetNumRateCats(4, false);
+		SetInvariantSites();
+		datatype=DNA;
+		gotRmatFromFile = gotStateFreqsFromFile = gotAlphaFromFile = gotFlexFromFile = gotPinvFromFile = gotOmegasFromFile = gotInsertFromFile = gotDeleteFromFile = false;
+		geneticCode=STANDARD;
+		isSetup = false;
+		}
+
+	bool IsCodon() const {return datatype == CODON;}
+	bool IsNucleotide() const {return (datatype == DNA || datatype == RNA);}
+	bool IsRna() const {return (datatype == RNA);} //rna will be treated identically to dna almost everywhere, but it might be good to know when reading
+	bool IsAminoAcid() const {return (datatype == AMINOACID || datatype == CODONAMINOACID);}//for most purposes codon-aminoacid should be considered AA
+	bool IsCodonAminoAcid() const {return datatype == CODONAMINOACID;}
+	bool IsNState() const {return datatype == NSTATE;}
+	bool IsOrderedNState() const {return datatype == ORDNSTATE;}
+	bool IsNStateV() const {return datatype == NSTATEV;}
+	bool IsOrderedNStateV() const {return datatype == ORDNSTATEV;}
+	bool IsOrientedGap() const {return datatype == ORIENTEDGAP;}
+	bool IsBinary() const {return datatype == BINARY;}
+	bool IsBinaryNotAllZeros() const {return datatype == BINARY_NOTALLZEROS;}
+
+	//DO NOT INCLUDE OrientedGap here!
+	bool IsMkTypeModel() const {return (IsNState() || IsNStateV() || IsOrderedNState() || IsOrderedNStateV() || IsBinary() || IsBinaryNotAllZeros());}
+
+	bool GotAnyParametersFromFile() const {
+		return gotRmatFromFile || gotStateFreqsFromFile || gotAlphaFromFile || gotFlexFromFile || gotPinvFromFile || gotOmegasFromFile;
+		}
+	//A number of canned model setups
+	
+	void SetJC(){
+		nstates=4;
+		rateMatrix = NST1;
+		SetEqualStateFreqs();
+		fixRelativeRates=true;
+		}
+
+	void K2P(){
+		nstates=4;
+		rateMatrix = NST2;
+		SetEqualStateFreqs();
+		fixRelativeRates=false;
+		}
+
+	void SetF81(){
+		nstates=4;
+		rateMatrix = NST1;
+		SetEstimateStateFreqs();
+		fixRelativeRates=true;	
+		}
+
+	void SetHKY(){
+		nstates=4;
+		rateMatrix = NST2;
+		SetEstimateStateFreqs();
+		fixRelativeRates=false;
+		}
+
+	void SetGTR(){
+		nstates=4;
+		rateMatrix = NST6;
+		SetEstimateStateFreqs();
+		fixRelativeRates=false;
+		}
+
+	//this is the default, and shouldn't really need to be explicitly set
+	//this and SetRna depend on the default model settings from the constructor
+	void SetDna(){
+		datatype = DNA;
+		}
+
+	void SetRna(){
+		datatype = DNA;
+		}
+
+	void SetCodon(){
+		datatype = CODON;
+		rateMatrix = NST2;
+		stateFrequencies = EQUAL;
+		nstates = 61;//this might be overridden if a nonstandard code is set
+		numRateCats = 1;
+		fixRelativeRates=false;
+		fixOmega = false;
+		RemoveInvariantSites();
+		}
+
+	void SetAminoAcid(){
+		datatype = AMINOACID;
+		rateMatrix = WAGMAT;
+		stateFrequencies = WAG;
+		nstates = 20;
+		fixRelativeRates=true;
+		}
+
+	void SetCodonAminoAcid(){
+		datatype = CODONAMINOACID;
+		rateMatrix = WAGMAT;
+		stateFrequencies = WAG;
+		nstates = 20;
+		fixRelativeRates=true;
+		}
+
+	void SetNState(){
+		datatype = NSTATE;
+		rateMatrix = NST1;
+		stateFrequencies = EQUAL;
+		nstates = -1; //this will need to be reset later 
+		fixRelativeRates=true;
+		fixStateFreqs=true;
+		}
+
+	void SetOrderedNState(){
+		datatype = ORDNSTATE;
+		rateMatrix = NST1;
+		stateFrequencies = EQUAL;
+		nstates = -1; //this will need to be reset later 
+		fixRelativeRates=true;
+		fixStateFreqs=true;
+		}
+
+	void SetNStateV(){
+		datatype = NSTATEV;
+		rateMatrix = NST1;
+		stateFrequencies = EQUAL;
+		nstates = -1; //this will need to be reset later 
+		fixRelativeRates=true;
+		fixStateFreqs=true;
+		}
+
+	void SetOrderedNStateV(){
+		datatype = ORDNSTATEV;
+		rateMatrix = NST1;
+		stateFrequencies = EQUAL;
+		nstates = -1; //this will need to be reset later 
+		fixRelativeRates=true;
+		fixStateFreqs=true;
+		}
+
+	void SetOrientedGap(){
+		datatype = ORIENTEDGAP;
+		rateMatrix = NST1;
+		stateFrequencies = EQUAL;
+		nstates = 3;
+		fixRelativeRates=true;
+		fixStateFreqs=true;
+		}
+
+	void SetBinary(){
+		datatype = BINARY;
+		rateMatrix = NST1;
+		stateFrequencies = EQUAL;
+		nstates = 2;
+		fixRelativeRates=true;
+		fixStateFreqs=true;
+		}
+
+	void SetBinaryNotAllZeros(){
+		datatype = BINARY_NOTALLZEROS;
+		rateMatrix = NST1;
+		stateFrequencies = EQUAL;
+		nstates = 2;
+		fixRelativeRates=true;
+		fixStateFreqs=true;
+		}
+
+	void SetNStates(int ns){
+		nstates = ns;
+		}
+
+	void SetGammaRates(){
+		rateHetType = GAMMA;
+		fixAlpha=false;
+		}
+
+	void SetFlexRates(){
+		if(includeInvariantSites==true) throw(ErrorException("Invariant sites models should not be (and don't need to be) used\n     with the \"flex\" model of rate heterogeneity, since flex is able to\n     incorporate a class of sites with a rate of effectively zero"));
+		rateHetType = FLEX;
+		}
+
+	void SetNumRateCats(int nrates, bool test){//correct behavior here depends on the fact that the default 
+		//model includes gamma with 4 rate cats
+		if(test ==true){
+			if(rateHetType == NONE && nrates > 1)
+				throw(ErrorException("ratehetmodel set to \"none\", but numratecats is equal to %d!", nrates));
+			if(rateHetType != NONE && nrates == 1){
+				if(rateHetType == GAMMA && fixAlpha == false)
+					throw(ErrorException("ratehetmodel set to \"gamma\", but numratecats is equal to 1!"));
+				else if(rateHetType == GAMMA && fixAlpha == true)
+					throw(ErrorException("ratehetmodel set to \"gammafixed\", but numratecats is equal to 1!"));
+				else if(rateHetType == FLEX)
+					throw(ErrorException("ratehetmodel set to \"flex\", but numratecats is equal to 1!"));
+				//now allowing this to signify a single omega param
+//				else if(rateHetType == NONSYN)
+//					throw(ErrorException("ratehetmodel set to \"nonsynonymous\", but numratecats is equal to 1!"));				
+				}
+			}
+		
+		if(nrates < 1) 
+			throw(ErrorException("1 is the minimum value for numratecats."));
+		if(nrates > 20) 
+			throw(ErrorException("20 is the maximum value for numratecats."));
+		numRateCats=nrates;
+		}
+
+	void SetInvariantSites(){
+		if(rateHetType == NONSYN)
+			throw(ErrorException("invariant sites cannot be used with nonsynonymous rate variation"));			
+		includeInvariantSites=true;
+		fixInvariantSites=false;
+		}
+
+	void RemoveInvariantSites(){
+		includeInvariantSites=false;
+		fixInvariantSites=false;
+		}
+
+	void SetEmpiricalStateFreqs(){
+		stateFrequencies = EMPIRICAL;
+		fixStateFreqs=true;
+		}
+
+	//this is a hack to allow estimation of codon frequencies
+	//other parts of the code break if stateFreqs aren't f1x4/f3x4/emp in a codon model
+	//but leaving fixStateFreqs as false allows them to be estimated
+	void SetFakeEmpiricalStateFreqs(){
+		stateFrequencies = EMPIRICAL;
+		fixStateFreqs=false;
+		}
+
+	void SetEqualStateFreqs(){
+		stateFrequencies = EQUAL;
+		fixStateFreqs=true;
+		}
+	void SetUserSpecifiedStateFreqs(){
+		stateFrequencies = USERSPECIFIED;
+		fixStateFreqs=true;
+		}
+	void SetEstimateStateFreqs(){
+		stateFrequencies = ESTIMATE;
+		fixStateFreqs=false;
+		}
+	void SetF1X4StateFreqs(){
+		stateFrequencies = F1X4;
+		fixStateFreqs = true;
+		}
+	void SetF3X4StateFreqs(){
+		stateFrequencies = F3X4;
+		fixStateFreqs = true;
+		}
+	void SetFixedAlpha(){
+		fixAlpha=true;
+		}
+	void SetFixedInvariantSites(){
+		fixInvariantSites=true;
+		includeInvariantSites=true;
+		}
+	void SetUserSpecifiedRateMatrix(){
+		rateMatrix = USERSPECIFIEDMAT;
+		fixRelativeRates=true;
+		}
+	void SetJonesAAMatrix(){
+		rateMatrix = JONESMAT;
+		fixRelativeRates=true;
+		}
+	void SetPoissonAAMatrix(){
+		rateMatrix = POISSON;
+		fixRelativeRates=true;
+		}	
+	void SetDayhoffAAMatrix(){
+		rateMatrix = DAYHOFFMAT;
+		fixRelativeRates=true;
+		}
+	void SetWAGAAMatrix(){
+		rateMatrix = WAGMAT;
+		fixRelativeRates=true;
+		}	
+	
+	void SetMtMamAAMatrix(){
+		rateMatrix = MTMAMMAT;
+		fixRelativeRates=true;
+		}	
+
+	void SetMtRevAAMatrix(){
+		rateMatrix = MTREVMAT;
+		fixRelativeRates=true;
+		}	
+
+	void SetEstimatedAAMatrix(){
+		rateMatrix = ESTIMATEDAAMAT;
+		fixRelativeRates=false;
+		}
+
+	void SetTwoSerineRateMatrix(){
+		rateMatrix = TWOSERINEMAT;
+		nstates = 21;
+		fixRelativeRates=false;
+		}
+
+	void SetJonesAAFreqs(){
+		stateFrequencies = JONES;
+		fixStateFreqs=true;
+		}
+	void SetDayhoffAAFreqs(){
+		stateFrequencies = DAYHOFF;
+		fixStateFreqs=true;	
+		}
+	void SetWAGAAFreqs(){
+		stateFrequencies = WAG;
+		fixStateFreqs=true;
+		}
+
+	void SetMtMamAAFreqs(){
+		stateFrequencies = MTMAM;
+		fixStateFreqs=true;
+		}
+
+	void SetMtRevAAFreqs(){
+		stateFrequencies = MTREV;
+		fixStateFreqs=true;
+		}
+
+	void SetOmegaModel(){
+		rateHetType = NONSYN;
+		numRateCats = 3;
+		fixOmega = false;
+		}
+
+	void SetFixedOmegaModel(){
+		rateHetType = NONSYN;
+		numRateCats = 3;
+		fixOmega = true;
+		}
+
+	int Nst() const {
+		if(rateMatrix == NST1) return 1;
+		else if(rateMatrix == NST2) return 2;
+		else if(rateMatrix == NST6 || rateMatrix == ARBITRARY) return 6;
+		else if(rateMatrix == USERSPECIFIEDMAT && datatype != AMINOACID && datatype != CODONAMINOACID) return 6;
+		//estimation of AA matrices is now legal
+		//else assert(0);
+		return -1;
+		}
+
+	bool IsJonesAAFreqs() const {return (stateFrequencies == JONES);}
+	bool IsJonesAAMatrix() const {return (rateMatrix == JONESMAT);}
+	bool IsDayhoffAAFreqs() const {return (stateFrequencies == DAYHOFF);}
+	bool IsDayhoffAAMatrix() const {return (rateMatrix == DAYHOFFMAT);}
+	bool IsWAGAAFreqs() const {return (stateFrequencies == WAG);}
+	bool IsWAGAAMatrix() const {return (rateMatrix == WAGMAT);}
+	bool IsMtMamAAFreqs() const {return (stateFrequencies == MTMAM);}
+	bool IsMtMamAAMatrix() const {return (rateMatrix == MTMAMMAT);}
+	bool IsMtRevAAFreqs() const {return (stateFrequencies == MTREV);}
+	bool IsMtRevAAMatrix() const {return (rateMatrix == MTREVMAT);}
+	bool IsEstimateAAMatrix() const {return (rateMatrix == ESTIMATEDAAMAT);}
+	bool IsVertMitoCode() const {return (geneticCode == VERTMITO);}
+	bool IsInvertMitoCode() const {return (geneticCode == INVERTMITO);}
+	bool IsTwoSerineCode() const {return (geneticCode == STANDARDTWOSERINE);}
+	bool IsTwoSerineVertMitoCode() const {return (geneticCode == VERTMITOTWOSERINE);}
+	bool IsTwoSerineInvertMitoCode() const {return (geneticCode == INVERTMITOTWOSERINE);}
+	bool IsPoissonAAMatrix() const {return (rateMatrix == POISSON);}
+	bool IsUserSpecifiedRateMatrix() const {return rateMatrix == USERSPECIFIEDMAT;}
+	bool IsTwoSerineRateMatrix() const {return rateMatrix == TWOSERINEMAT;}
+	bool IsArbitraryRateMatrix() const {return rateMatrix == ARBITRARY;}
+	const string GetArbitraryRateMatrixString() const {return arbitraryRateMatrixString;}
+
+	bool IsEqualStateFrequencies() const {return stateFrequencies == EQUAL;}
+	bool IsEmpiricalStateFrequencies() const {return stateFrequencies == EMPIRICAL;}
+	bool IsUserSpecifiedStateFrequencies() const {return stateFrequencies == USERSPECIFIED;}
+	bool IsF3x4StateFrequencies() const {return stateFrequencies == F3X4;}
+	bool IsF1x4StateFrequencies() const {return stateFrequencies == F1X4;}
+	bool IsPrecaledAAFreqs() const {return (IsAminoAcid() && (stateFrequencies == DAYHOFF || stateFrequencies == JONES || stateFrequencies == WAG || stateFrequencies == MTMAM || stateFrequencies == MTREV));}
+
+	bool IsFlexRateHet() const {return rateHetType == FLEX;}
+	bool IsGammaRateHet() const {return rateHetType == GAMMA;}
+	bool IsNonsynonymousRateHet() const {return rateHetType == NONSYN;}
+
+	void SetStateFrequencies(const char *str){
+		if((datatype == NSTATE || datatype == NSTATEV) && _stricmp(str, "equal") != 0) 
+			throw(ErrorException("Invalid setting for statefrequencies: %s\n\tOnly equal state frequencies are currently available for the standard data type", str));
+		if(_stricmp(str, "equal") == 0) SetEqualStateFreqs();
+		else if(_stricmp(str, "estimate") == 0){
+			if(datatype == CODON) 
+				throw ErrorException("Sorry, ML estimation of equilibrium frequencies is not available under\ncodon models.  Try statefrequencies = empirical");
+			//else if(datatype == AMINOACID || datatype == CODONAMINOACID) outman.UserMessage("\nWARNING: to obtain good ML estimates of equilibrium aminoacid frequencies you\n\tmay need to run for a very long time or increase the modweight.\n\tConsider statefrequencies = empirical instead.\n");
+			SetEstimateStateFreqs();
+			}
+		else if(_stricmp(str, "estimateF") == 0){
+			//HACK - unfix freqs for codons, to cause estimation
+			if(datatype != CODON) 
+				throw ErrorException("Sorry, forced estimation of frequencies (estimateF) is only for codon models");
+			SetFakeEmpiricalStateFreqs();
+			outman.UserMessage("\n\n\nCUSTOM USAGE - ESTIMATING CODON FREQS BY ML\n\n\n");
+			}
+		else if(_stricmp(str, "empirical") == 0) SetEmpiricalStateFreqs();
+		else if(_stricmp(str, "fixed") == 0) SetUserSpecifiedStateFreqs();
+		else if(datatype == CODON && _stricmp(str, "f1x4") == 0) SetF1X4StateFreqs();
+		else if(datatype == CODON && _stricmp(str, "f3x4") == 0) SetF3X4StateFreqs();
+		else if((datatype == AMINOACID || datatype == CODONAMINOACID) && _stricmp(str, "jones") == 0) SetJonesAAFreqs();
+		else if((datatype == AMINOACID || datatype == CODONAMINOACID) && _stricmp(str, "dayhoff") == 0) SetDayhoffAAFreqs();
+		else if((datatype == AMINOACID || datatype == CODONAMINOACID) && _stricmp(str, "wag") == 0) SetWAGAAFreqs();
+		else if((datatype == AMINOACID || datatype == CODONAMINOACID) && _stricmp(str, "mtmam") == 0) SetMtMamAAFreqs();
+		else if((datatype == AMINOACID || datatype == CODONAMINOACID) && _stricmp(str, "mtrev") == 0) SetMtRevAAFreqs();
+		else throw(ErrorException("Invalid setting for statefrequencies: %s\n\tOptions for all datatypes: equal, empirical, fixed\n\tFor all datatypes besides codon: estimate\n\tFor aminoacid datatype only: poisson, dayhoff, jones, wag, mtmam, mtrev\n\tFor codon datatype only: F1X4, F3X4", str));
+		}
+	void SetRateMatrix(const char *str){
+		if(datatype == AMINOACID || datatype == CODONAMINOACID){
+			if(_stricmp(str, "jones") == 0) SetJonesAAMatrix();
+			else if(_stricmp(str, "dayhoff") == 0) SetDayhoffAAMatrix();
+			else if(_stricmp(str, "poisson") == 0) SetPoissonAAMatrix();
+			else if(_stricmp(str, "wag") == 0) SetWAGAAMatrix();
+			else if(_stricmp(str, "mtmam") == 0) SetMtMamAAMatrix();
+			else if(_stricmp(str, "mtrev") == 0) SetMtRevAAMatrix();
+			else if(_stricmp(str, "estimate") == 0){
+				outman.UserMessage("\nWARNING: to obtain good ML estimates of the aminoacid rate matrix (189 free parameters)\n\tyou may need to run for a very long time or increase the modweight.\n\tDo not attempt this unless you have a very large amount of data.\n");
+				SetEstimatedAAMatrix();
+				}
+			else if(_stricmp(str, "fixed") == 0) SetUserSpecifiedRateMatrix();
+			else if(_stricmp(str, "twoserine") == 0 || _stricmp(str, "twoserinefixed") == 0){
+				if(datatype != CODONAMINOACID)
+					throw(ErrorException("Sorry, codon input data (with the codon-aminoacid datatype) are currently required for the Two-Serine model"));
+				if(stateFrequencies != EMPIRICAL && stateFrequencies != ESTIMATE && stateFrequencies != USERSPECIFIED)
+					throw(ErrorException("Sorry, empirical, estimated or fixed must be used as the statefrequencies setting for the Two-Serine model"));
+				if( ! (IsTwoSerineCode() || IsTwoSerineVertMitoCode() || IsTwoSerineInvertMitoCode()))
+					throw(ErrorException("To use the twoserine rate matrix the genetic code must be \"standardtwoserine\" \"vertmitotwoserine\" or \"invertmitotwoserine\"."));
+				SetTwoSerineRateMatrix();
+				if(_stricmp(str, "twoserinefixed") == 0)
+					fixRelativeRates = true;
+				}
+			else throw(ErrorException("Sorry, %s is not a valid aminoacid rate matrix. \n\t(Options are: dayhoff, jones, poisson, wag, mtmam, mtrev, estimate, fixed)", str));
+			}
+		else if(datatype == NSTATE || datatype == NSTATEV){
+			if(_stricmp(str, "1rate") != 0) throw(ErrorException("Sorry, %s is not a valid ratematrix setting for the standard data type.\n\tOnly 1rate matrices are currently allowed.", str));
+			else rateMatrix = NST1;
+			}
+		else{
+			if(_stricmp(str, "6rate") == 0) rateMatrix = NST6;
+			else if(_stricmp(str, "2rate") == 0) rateMatrix = NST2;
+			else if(_stricmp(str, "1rate") == 0) rateMatrix = NST1;
+			else if(_stricmp(str, "fixed") == 0) SetUserSpecifiedRateMatrix();
+			else if(str[0] == '('){
+				rateMatrix = ARBITRARY;
+				arbitraryRateMatrixString = str;
+				}
+			else{
+				if(datatype == CODON) throw(ErrorException("Unknown setting for codon ratematrix: %s\n\t(options are: 6rate, 2rate, 1rate, fixed)", str));
+				else throw(ErrorException("Unknown setting for dna/rna ratematrix: %s\n\t(options are: 6rate, 2rate, 1rate, fixed)", str));
+				}
+			}
+		}
+	void SetProportionInvariant(const char *str){
+		//if the entry didn't appear, depend on the correct default being set by the datatype specification
+		if(_stricmp(str, "unspecified") == 0)
+			return;
+		if(_stricmp(str, "none") == 0) 
+			RemoveInvariantSites();
+		//else if(datatype == CODON || datatype == AMINOACID) throw(ErrorException("Sorry, invariant sites not yet supported with Codon/Aminoacid data"));
+		else if(datatype == CODON){
+			if(_stricmp(str, "fixed") == 0 || _stricmp(str, "estimate") == 0) 
+				throw ErrorException("Invariant sites cannot be used with codon models.\n     Try ratehetmodel = nonsynonymous to allow dN/dS variation across sites");
+			else throw(ErrorException("Unknown setting for proportioninvariant: %s\n\t(only valid option for codon models is none)", str));
+			}
+		else if(_stricmp(str, "fixed") == 0) SetFixedInvariantSites();
+		else if(_stricmp(str, "estimate") == 0) SetInvariantSites();
+		else throw(ErrorException("Unknown setting for proportioninvariant: %s\n\t(options are: none, fixed, estimate)", str));
+		}
+	void SetRateHetModel(const char *str){
+	//	if((datatype != DNA) && (datatype != AMINOACID) && _stricmp(str, "none")) throw(ErrorException("Sorry, rate heterogeneity not yet supported with Codon/Aminoacid data"));
+		if(datatype == CODON){
+			if(_stricmp(str, "nonsynonymous") == 0) 
+				SetOmegaModel();
+			else if(_stricmp(str, "nonsynonymousfixed") == 0) 
+				SetFixedOmegaModel();
+			else if(_stricmp(str, "none") == 0){
+				SetNumRateCats(1, false);
+				rateHetType = NONE;
+				}
+			else if(_stricmp(str, "gamma") == 0) throw ErrorException("Gamma rate heterogeneity cannot be used with codon models.\n     Try ratehetmodel = nonsynonymous to allow dN/dS variation across sites");
+			else throw(ErrorException("Unknown setting for ratehetmodel: %s\n\t(options for codon datatype are: nonsynonymous, nonsynonymousfixed, none)", str));
+			}
+		else{			
+			if(_stricmp(str, "gamma") == 0) SetGammaRates();
+			else if(_stricmp(str, "gammafixed") == 0){
+				SetGammaRates();
+				SetFixedAlpha();
+				}
+			else if(_stricmp(str, "flex") == 0) SetFlexRates();
+			else if(_stricmp(str, "none") == 0){
+				SetNumRateCats(1, false);
+				rateHetType = NONE;
+				}
+			else throw(ErrorException("Unknown setting for ratehetmodel: %s\n\t(options are for nucleotide or aminoacid data are: gamma, gammafixed, flex, none)", str));
+			}
+		}
+	void SetDataType(const char *str){
+		if(_stricmp(str, "codon") == 0) SetCodon();
+		else if(_stricmp(str, "codon-aminoacid") == 0) SetCodonAminoAcid();
+		else if(_stricmp(str, "aminoacid") == 0) SetAminoAcid();
+		else if(_stricmp(str, "protein") == 0) SetAminoAcid();
+		else if(_stricmp(str, "dna") == 0) str;
+		else if(_stricmp(str, "rna") == 0) SetRna();
+		else if(_stricmp(str, "nucleotide") == 0) str;
+		else if(_stricmp(str, "nstate") == 0) SetNState();
+		else if(_stricmp(str, "standard") == 0) SetNState();
+		else if(_stricmp(str, "standardordered") == 0) SetOrderedNState();
+		else if(_stricmp(str, "mk") == 0) SetNState();
+		else if(_stricmp(str, "standardvariable") == 0) SetNStateV();
+		else if(_stricmp(str, "standardvariableordered") == 0) SetOrderedNStateV();
+		else if(_stricmp(str, "standardorderedvariable") == 0) SetOrderedNStateV();
+		else if(_stricmp(str, "mkv") == 0) SetNStateV();
+		else if(_stricmp(str, "indelmixturemodel") == 0) SetOrientedGap();
+		else if(_stricmp(str, "gapmixturemodel") == 0) SetOrientedGap();
+		else if(_stricmp(str, "orientedgap") == 0) SetOrientedGap();
+		else if(_stricmp(str, "binary") == 0) SetBinary();
+		else if(_stricmp(str, "binarynotallzeros") == 0) SetBinaryNotAllZeros();
+		else throw(ErrorException("Unknown setting for datatype: %s\n\t(options are: codon, codon-aminoacid, aminoacid, nucleotide, standard[ordered], standardvariable[ordered], indelmixturemodel, binary, binarynotallzeros)", str));
+		}
+	void SetGeneticCode(const char *str){
+		if(datatype != DNA && datatype != RNA){
+			if(_stricmp(str, "standard") == 0) geneticCode = STANDARD;
+			else if(_stricmp(str, "vertmito") == 0){
+				geneticCode = VERTMITO;
+				if(datatype == CODON) nstates = 60;
+				}
+			else if(_stricmp(str, "invertmito") == 0){
+				geneticCode = INVERTMITO;
+				if(datatype == CODON) nstates = 62;
+				}
+			else if(_stricmp(str, "standardtwoserine") == 0) geneticCode = STANDARDTWOSERINE;
+			else if(_stricmp(str, "vertmitotwoserine") == 0) geneticCode = INVERTMITOTWOSERINE;
+			else if(_stricmp(str, "invertmitotwoserine") == 0) geneticCode = VERTMITOTWOSERINE;
+			else throw(ErrorException("Unknown genetic code: %s\n\t(options are: standard, vertmito, invertmito)", str));
+			}
+		}
+	//PARTITION
+	void SetupModSpec(const ConfigModelSettings &conf){
+		SetDataType(conf.datatype.c_str());
+		SetGeneticCode(conf.geneticCode.c_str());
+		SetStateFrequencies(conf.stateFrequencies.c_str());
+		SetRateMatrix(conf.rateMatrix.c_str());
+		SetProportionInvariant(conf.proportionInvariant.c_str());
+		SetRateHetModel(conf.rateHetModel.c_str());
+		SetNumRateCats(conf.numRateCats, true);
+		isSetup = true;
+		}
+/*
+	void SetupModSpec(const GeneralGamlConfig &conf){
+		SetDataType(conf.datatype.c_str());
+		SetGeneticCode(conf.geneticCode.c_str());
+		SetStateFrequencies(conf.stateFrequencies.c_str());
+		SetRateMatrix(conf.rateMatrix.c_str());
+		SetProportionInvariant(conf.proportionInvariant.c_str());
+		SetRateHetModel(conf.rateHetModel.c_str());
+		SetNumRateCats(conf.numRateCats, true);
+		isSetup = true;
+		}
+*/
+	};
+
+class ModelSpecificationSet{
+	//a set of ModelSpecifications, each corresponding to a data subset/modelset
+	vector<ModelSpecification*> modSpecs;
+	bool inferSubsetRates;
+public:
+	ModelSpecificationSet(){
+		inferSubsetRates = true;
+		}
+	~ModelSpecificationSet(){
+		for(int i = 0;i < modSpecs.size();i++)
+			delete modSpecs[i];
+		modSpecs.clear();
+		}
+	void Delete(){
+		for(int i = 0;i < modSpecs.size();i++)
+			delete modSpecs[i];
+		modSpecs.clear();
+		inferSubsetRates = true;
+		}
+	void AddModSpec(const ConfigModelSettings &conf){
+		ModelSpecification * mod = new ModelSpecification;
+		mod->SetupModSpec(conf);
+		modSpecs.push_back(mod);
+		}
+	ModelSpecification *GetModSpec(int num) const{
+		if(num > -1 == false || num >= modSpecs.size()) 
+			throw ErrorException("tried to access invalid ModSpec number");
+		return modSpecs[num];
+		}
+	bool IsSetup(int num){return GetModSpec(num)->isSetup;}
+	int NumSpecs() const {return modSpecs.size();}
+	void SetInferSubsetRates(bool i){inferSubsetRates = i;}
+	bool InferSubsetRates(){return inferSubsetRates;}
+	bool GotAnyParametersFromFile() {
+		for(vector<ModelSpecification *>::iterator msit = modSpecs.begin();msit != modSpecs.end();msit++)
+			if((*msit)->GotAnyParametersFromFile()) return true;
+		return false;
+		}
+	bool AnyOrientedGap(){
+		for(vector<ModelSpecification *>::iterator msit = modSpecs.begin();msit != modSpecs.end();msit++){
+			if((*msit)->IsOrientedGap()){
+				return true;
+				}
+			}
+		return false;
+		}
+	};
+
+class Model{
+
+	friend class ModelPartition;
+	friend class ModelSet;
+
+	int nst;
+	int nstates;
+	int nRateCats;
+	ModelSpecification *modSpec;//pointer to the corresponding ModelSpecification
+	int effectiveModels;//this is the number of models with different Q matrices
+						//it does not include things like gamma or flex rates,
+						//in which it is only the overall rate that varies
+	bool includeInvariantSites;
+
+	vector<FLOAT_TYPE*> stateFreqs;
+	vector<FLOAT_TYPE*> relNucRates;
+	//this is essentially a temporary scratch variable used during optimization.  See SetReferenceRelativeNucRate
+	FLOAT_TYPE currentRefRateScale;
+	int arbitraryMatrixIndeces[6];//this just keeps track of which rate parameters are aliased to single parameters
+	vector<FLOAT_TYPE*> omegas;
+	vector<FLOAT_TYPE*> omegaProbs;
+
+	bool eigenDirty;
+	FLOAT_TYPE *blen_multiplier; //this is the rescaling factor to make the mean rate in the qmat = 1
+
+	FLOAT_TYPE rateMults[20];
+	FLOAT_TYPE rateProbs[20];
+	
+	FLOAT_TYPE *alpha;
+	FLOAT_TYPE *propInvar;
+
+	FLOAT_TYPE *insertRate;
+	FLOAT_TYPE *deleteRate;
+
+	//variables used for the eigen process if nst=6
+	int *iwork, *indx;
+	MODEL_FLOAT **eigvals, *eigvalsimag, ***eigvecs, ***inveigvecs, **teigvecs, *work, *temp, *col, **c_ijk, *EigValexp, *EigValderiv, *EigValderiv2;
+	MODEL_FLOAT ***qmat, ***pmat1, ***pmat2;
+	MODEL_FLOAT ***tempqmat;
+	
+	#ifdef SINGLE_PRECISION_FLOATS
+	//these are used so that the transition matrices can be computed in double precision and
+	//then copied to sinlge precision for use in the CLA/Deriv functions
+	FLOAT_TYPE ***fpmat1, ***fpmat2;
+	FLOAT_TYPE ***fderiv1, ***fderiv2;
+	#endif
+	
+	//Newton Raphson crap
+	MODEL_FLOAT ***deriv1, ***deriv2;
+
+	//this will be a little bigger than necessary with some codes, but dynamically allocating a static is a bit of a pain
+	//Making these no longer static, to allow different codes for different
+	//partition subsets
+	//static int qmatLookup[62*62];
+	//static GeneticCode *code;
+	int qmatLookup[62*62];
+	GeneticCode *code;
+
+	public:
+//	static bool noPinvInModel;
+//	static bool useFlexRates;
+//	static int nRateCats;
+	static FLOAT_TYPE mutationShape;
+	FLOAT_TYPE maxPropInvar;
+
+	vector<BaseParameter*> paramsToMutate;
+
+	~Model();
+
+	Model(int num){
+        code = NULL;
+		stateFreqs.reserve(4);
+		relNucRates.reserve(6);
+		paramsToMutate.reserve(5);
+		//DEBUG - we should probably move this out of here.  It assumes that the
+		//global modspec has been setup
+		assert(modSpecSet.IsSetup(num));
+		CreateModelFromSpecification(num);
+		}
+
+	void CalcMutationProbsFromWeights();
+	FLOAT_TYPE GetTotalModelMutationWeight();
+	BaseParameter *SelectModelMutation();
+	const vector<BaseParameter *> *GetMutableParameters(){return ¶msToMutate;}
+	int PerformModelMutation();
+	void CreateModelFromSpecification(int);
+	void SetCode(GeneticCode *c){
+		code = c;
+		FillQMatLookup();
+		}
+	const ModelSpecification *GetCorrespondingSpec() const {return modSpec;}
+		
+	private:
+	void AllocateEigenVariables();
+	void CalcEigenStuff();
+
+	public:
+	void CalcPmat(MODEL_FLOAT blen, MODEL_FLOAT *metaPmat, bool flip =false);
+	void CalcPmats(FLOAT_TYPE blen1, FLOAT_TYPE blen2, FLOAT_TYPE *&mat1, FLOAT_TYPE *&mat2);
+	void CalcPmatNState(FLOAT_TYPE blen, MODEL_FLOAT *metaPmat);
+	void CalcDerivatives(FLOAT_TYPE, FLOAT_TYPE ***&, FLOAT_TYPE ***&, FLOAT_TYPE ***&);
+	void CalcDerivativesOrientedGap(FLOAT_TYPE, FLOAT_TYPE ***&, FLOAT_TYPE ***&, FLOAT_TYPE ***&);
+	void OutputPmats(ofstream &deb);
+	void AltCalcPmat(FLOAT_TYPE dlen, MODEL_FLOAT ***&pr);
+	void CalcOrientedGapPmat(FLOAT_TYPE blen, MODEL_FLOAT ***&mat);
+	void UpdateQMat();
+	void UpdateQMatCodon();
+	void CalcSynonymousBranchlengthProportions(vector<FLOAT_TYPE> &results);
+	void UpdateQMatAminoAcid();
+	void UpdateQMatNState();
+	void UpdateQMatOrderedNState();
+	void DiscreteGamma(FLOAT_TYPE *, FLOAT_TYPE *, FLOAT_TYPE);
+	bool IsModelEqual(const Model *other) const ;	
+	void CopyModel(const Model *from);
+	void CopyEigenVariables(const Model *from);
+	void SetModel(FLOAT_TYPE *model_string);
+	void OutputPaupBlockForModel(ofstream &, const char *) const;
+	void FillPaupBlockStringForModel(string &str, const char *treefname) const;
+	void OutputGarliFormattedModel(ostream &) const;
+	void FillGarliFormattedModelString(string &s) const;
+	void OutputBinaryFormattedModel(OUTPUT_CLASS &) const;
+	void ReadGarliFormattedModelString(string &);
+	void OutputHumanReadableModelReportWithParams() const;
+	void FillModelOrHeaderStringForTable(string &s, bool m) const;
+	void OutputAminoAcidRMatrixArray(ostream &out, int modNum, int treeNum);
+	void OutputAminoAcidRMatrixMessage(ostream &out);
+
+	void ReadBinaryFormattedModel(FILE *);
+	void FillQMatLookup();
+	void SetJonesAAFreqs();
+	void SetMtMamAAFreqs();
+	void SetMtRevAAFreqs();
+	void SetDayhoffAAFreqs();
+	void SetWAGAAFreqs();
+	void MultiplyByJonesAAMatrix();
+	void MultiplyByMtMamAAMatrix();
+	void MultiplyByMtRevAAMatrix();
+	void MultiplyByDayhoffAAMatrix();
+	void MultiplyByWAGAAMatrix();
+
+	//model mutations
+	void MutateRates();
+	void MutatePis();
+	void MutateAlpha();
+	void MutatePropInvar();
+	void MutateRateProbs();
+	void MutateRateMults();
+	
+	//Accessor functions
+	FLOAT_TYPE StateFreq(int p) const{ return *stateFreqs[p];}
+	FLOAT_TYPE TRatio() const;
+	FLOAT_TYPE Rates(int r) const { return *relNucRates[r];}
+	int NumRelRates() const {return relNucRates.size();}
+	int NRateCats() const {return nRateCats;}
+	FLOAT_TYPE *GetRateMults() {return rateMults;}
+	FLOAT_TYPE Alpha() const {return *alpha;}
+	FLOAT_TYPE PropInvar() const { return *propInvar;}
+	bool NoPinvInModel() const { return ! (modSpec->includeInvariantSites);}
+	FLOAT_TYPE MaxPinv() const{return maxPropInvar;}
+	int NStates() const {return nstates;}
+	int NumMutatableParams() const {return (int) paramsToMutate.size();}
+	int Nst() const {return nst;}
+	const int *GetArbitraryRateMatrixIndeces() const {return arbitraryMatrixIndeces;}
+	const GeneticCode *GetGeneticCode(){return code;}
+	bool IsNucleotide() const {return modSpec->IsNucleotide();}
+	bool IsOrientedGap() const {return modSpec->IsOrientedGap();}
+	bool IsNState() const {return modSpec->IsNState();}
+	bool IsNStateV() const {return modSpec->IsNStateV();}
+	bool IsOrderedNState() const {return modSpec->IsOrderedNState();}
+	bool IsOrderedNStateV() const {return modSpec->IsOrderedNStateV();}
+	bool IsBinary() const {return modSpec->IsBinary();}
+	bool IsBinaryNotAllZeros() const {return modSpec->IsBinaryNotAllZeros();}
+	const ModelSpecification *GetModSpec() const {return modSpec;}
+	
+	FLOAT_TYPE InsertRate() const {return *insertRate;}
+	FLOAT_TYPE DeleteRate() const {return *deleteRate;}
+	//these are the old freqs, no longer used.  Came from TKF I think
+	FLOAT_TYPE AbsenceFrequency() const {return (1.0 / ((*insertRate / *deleteRate) + 1.0));}
+	FLOAT_TYPE PresenceFrequency() const {return (*insertRate / *deleteRate) / ((*insertRate / *deleteRate) + 1.0);}
+	//these were from Rivas and Eddy, also not used currently
+	FLOAT_TYPE IndelPsi(FLOAT_TYPE blen)   const {return (InsertRate() / (InsertRate() + DeleteRate()) * (1.0 - exp(-(InsertRate() + DeleteRate()) * blen)));}
+	FLOAT_TYPE IndelGamma(FLOAT_TYPE blen) const {return (DeleteRate() / (InsertRate() + DeleteRate()) * (1.0 - exp(-(InsertRate() + DeleteRate()) * blen)));}
+
+	//Setting things
+	void SetDefaultModelParameters(SequenceData *data);
+	void SetRmat(FLOAT_TYPE *r, bool checkValidity, bool renormalize){
+		if(checkValidity == true && modSpec->IsAminoAcid() == false){
+			if(nst==1){
+				if((FloatingPointEquals(r[0], r[1], 1.0e-5) &&
+					FloatingPointEquals(r[1], r[2], 1.0e-5) &&
+					FloatingPointEquals(r[2], r[3], 1.0e-5) &&
+					FloatingPointEquals(r[3], r[4], 1.0e-5) &&
+					FloatingPointEquals(r[4], r[5], 1.0e-5)) == false)
+					throw(ErrorException("Config file specifies ratematrix = 1rate, but starting model has nonequal rates!\n"));
+				}
+			else if(nst==2){
+				if((FloatingPointEquals(r[0], r[2], 1.0e-5) &&
+					FloatingPointEquals(r[2], r[3], 1.0e-5) &&
+					FloatingPointEquals(r[1], r[4], 1.0e-5) &&
+					FloatingPointEquals(r[3], r[5], 1.0e-5)) == false)
+					throw(ErrorException("Config file specifies ratematrix = 2rate, but starting model parameters do not match!\n"));
+				}
+			else if(nst==6 && modSpec->IsArbitraryRateMatrix()){
+				for(int rate1=0;rate1<6-1;rate1++){
+					for(int rate2=rate1+1;rate2<6;rate2++){
+						if(arbitraryMatrixIndeces[rate1] == arbitraryMatrixIndeces[rate2]){
+							if(!FloatingPointEquals(r[rate1], r[rate2], max(1.0e-8, GARLI_FP_EPS * 2.0)))
+								throw(ErrorException("Provided relative rate parameters don't obey the ratematix specification!\n\tGiven this spec: %s, rates %d and %d should be equal.\n", modSpec->arbitraryRateMatrixString.c_str(), rate1+1, rate2+1));
+							}
+						}
+					}
+				}
+			}
+/*		if(FloatingPointEquals(r[5], ONE_POINT_ZERO, 1.0e-5) == false){
+			//if an alternate GTR paramterization is used in which GT != 1.0, rescale the rates
+			for(int i=0;i<5;i++)
+				r[i] /= r[5];
+			}
+		for(int i=0;i<5;i++) *relNucRates[i]=r[i];
+		*relNucRates[5]=1.0;
+		eigenDirty=true;
+*/
+		//if we're reading in from a binary checkpoint we may not want to renormalize if were close because
+		//the scores need to match exactly
+
+			//if we're constraining the matrix by summing the rates AND this is an AA model, do that
+			//otherwise do the normal fix at 1.0 constraint
+		if(modSpec->IsAminoAcid())
+			assert(modSpec->IsEstimateAAMatrix() || modSpec->IsUserSpecifiedRateMatrix() || modSpec->IsTwoSerineRateMatrix());
+	#ifdef SUM_AA_REL_RATES
+		if(modSpec->IsAminoAcid()){
+			for(int i=0;i<relNucRates.size();i++)
+				*relNucRates[i]=r[i];
+			if(renormalize)
+				this->NormalizeSumConstrainedRelativeRates(true, -1);
+		}
+		else{
+	#else
+		if(1){
+	#endif
+			if(renormalize){
+				int refRate = relNucRates.size()-1;
+				if(FloatingPointEquals(r[refRate], ONE_POINT_ZERO, 1.0e-5) == false){
+					for(int i=0;i<relNucRates.size();i++)
+						r[i] /= r[refRate];
+					}
+				r[refRate] = ONE_POINT_ZERO;
+				}
+			for(int i=0;i<relNucRates.size();i++)
+				*relNucRates[i]=r[i];
+			}
+		eigenDirty=true;
+		}
+	void SetPis(FLOAT_TYPE *b, bool checkValidity, bool renormalize){
+		//7/12/07 we'll now assume that all freqs have been passed in, rather than calcing the last
+		//from the others
+		if(checkValidity == true){
+//			if(modSpec.IsNucleotide()){
+				if(modSpec->IsEqualStateFrequencies() && (FloatingPointEquals(b[0], b[1], 1.0e-5) && FloatingPointEquals(b[1], b[2], 1.0e-5)) == false) 
+					throw(ErrorException("Config file specifies equal statefrequencies,\nbut starting model has nonequal frequencies!\n"));
+				if(modSpec->IsEmpiricalStateFrequencies()) 
+					throw(ErrorException("Config file specifies empirical statefrequencies,\nbut starting model contains frequencies!\nTry statefrequencies = fixed or statefrequencies = estimate."));
+				if(modSpec->IsPrecaledAAFreqs())
+					throw(ErrorException("Config file specifies \"named\" amino acid statefrequencies,\nbut starting model contains frequencies!\nTry statefrequencies = fixed or statefrequencies = estimate."));
+//				}
+			}
+		FLOAT_TYPE freqTot = 0.0;
+		for(int i=0;i<nstates;i++){
+			*stateFreqs[i]=b[i];
+			freqTot += *stateFreqs[i];
+			}
+		if(FloatingPointEquals(freqTot, ONE_POINT_ZERO, 1.0e-3) == false)
+			throw(ErrorException("State frequencies do not appear to add up to 1.0!\n"));
+		//if the total is near 1, make it exactly 1
+		else if(renormalize && FloatingPointEquals(freqTot, ONE_POINT_ZERO, 1.0e-6) == false){
+			for(int i=0;i<nstates;i++){
+				*stateFreqs[i] /= freqTot;
+				}
+			}
+		eigenDirty=true;
+		}
+
+	void SetFlexRates(FLOAT_TYPE *rates, FLOAT_TYPE *probs, bool renormalize){
+		if(modSpec->IsFlexRateHet() == false) throw ErrorException("Flex rate values specified in start file,\nbut ratehetmodel is not flex in conf file.");
+		for(int r=0;r<NRateCats();r++){
+			rateMults[r]=rates[r];
+			if(FloatingPointEquals(rateMults[r], ZERO_POINT_ZERO, max(1.0e-8, GARLI_FP_EPS * 2.0))){
+				outman.UserMessage("WARNING: Flex rate multipliers cannot be zero. Rate %d changed from zero to 1.0e-5", r);
+				rateMults[r] = 1.0e-5;
+				}
+			rateProbs[r]=probs[r];
+			if(FloatingPointEquals(rateProbs[r], ZERO_POINT_ZERO, max(1.0e-8, GARLI_FP_EPS * 2.0))){
+				throw ErrorException("Flex rate proportion %d cannot be zero.", r);
+				}
+			}
+		FLOAT_TYPE tot = ZERO_POINT_ZERO;
+		for(int r=0;r<NRateCats();r++)
+			tot += rateProbs[r];
+		if(!FloatingPointEquals(tot, ONE_POINT_ZERO, max(1.0e-3, GARLI_FP_EPS * 2.0)))
+			throw ErrorException("Specified Flex rate proportions don't add to 1.0!\n\tCorrect spec. is f rate1 prop1 rate2 prop2, etc.");
+		//make the proportions exactly 1
+		if(renormalize){
+			for(int r=0;r<NRateCats();r++)
+				rateProbs[r] /= tot;
+			}
+		}
+
+	FLOAT_TYPE FlexRate(int which){
+		assert(which < NRateCats());
+		return rateMults[which];
+		}
+
+	FLOAT_TYPE FlexProb(int which){
+		assert(which < NRateCats());
+		return rateProbs[which];
+		}
+
+	//These are the set parameter functions used in the generic OptimizeBoundedParameter function
+	//They need to have a standardized form, despite the fact that the "which" argument is unneccesary
+	//for some of them
+
+	void CheckStatefreqBounds(){
+		for(int b=0;b<nstates;b++){
+			assert( *stateFreqs[b] >= 1e-4);
+			}
+		}
+
+	void SetEquilibriumFreq(int which, FLOAT_TYPE val){
+
+		assert(which < this->nstates);
+#ifdef OLD_EQ_RESCALE
+		FLOAT_TYPE rescale = (FLOAT_TYPE)((1.0 - val)/(1.0 - *stateFreqs[which]));
+		for(int b=0;b<nstates;b++)
+			if(b!=which) *stateFreqs[b] *= rescale;
+		*stateFreqs[which] = val;
+
+#else
+
+		*stateFreqs[which] = val;
+		NormalizeSumConstrainedValues(&stateFreqs[0], nstates, 1.0, 1e-4, which);
+#endif
+		eigenDirty = true;
+		}
+
+	void SetRelativeNucRate(int which, FLOAT_TYPE val){
+		//this has the potential to do GT (fixed at 1.0) although that won't work with
+		//OptBounded currently
+		//DEBUG - Allow estimated AA matrices
+		//assert(which < 6);
+		//note that for arbitrary rate matrices mutation
+		//of a rate other than GT might actually alter GT, so we need to actually check
+		//whether it is 1.0 or not
+		*relNucRates[which] = val;
+		int refRate = NumRelRates() - 1;
+		if(FloatingPointEquals(*relNucRates[refRate], ONE_POINT_ZERO, 1.0e-12) == false){
+			FLOAT_TYPE scaler = ONE_POINT_ZERO / *relNucRates[refRate];
+			for(int i=0;i<NumRelRates();i++){
+				if(relNucRates[i] != relNucRates[refRate]){//this is checking whether the rate params are aliased to one another
+					*relNucRates[i] *= scaler;
+					}
+				}
+			*relNucRates[refRate] *= scaler;
+			}
+		eigenDirty = true;
+		}
+	//
+	void SetReferenceRelativeNucRate(int which, FLOAT_TYPE val){
+		FLOAT_TYPE newVal = val / currentRefRateScale;
+		SetRelativeNucRate(NumRelRates() - 1, newVal);
+		currentRefRateScale = val;
+		}
+	void ResetCurrentRefRateScale(){
+		currentRefRateScale = 1.0;
+		}
+
+//these should really only be getting called when SUM_AA_REL_RATES is defined
+//note that the rates are not actually renormalized such that they sum to one here
+//this should be ok since only one rate is being optimized at a time and renormalization
+//can happen between each.  Normalizing here would be a pain because other rates could
+//be pushed below the minimum, which will do odd things to the likelihood function
+	void SetSumConstrainedRelativeRate(int which, FLOAT_TYPE val){
+#ifndef SUM_AA_REL_RATES
+		assert(0);
+#endif
+		assert(val - 1.0e-8 <= MAX_REL_RATE && val + 1.0e-8 >= MIN_REL_RATE);
+		*relNucRates[which] = val;
+
+		NormalizeSumConstrainedRelativeRates(true, which);
+/*
+		FLOAT_TYPE initial = *relNucRates[which];
+		FLOAT_TYPE rescale = ((SUM_TO - val) / (SUM_TO - initial));
+
+		FLOAT_TYPE minSum = ZERO_POINT_ZERO;
+		FLOAT_TYPE nonMin = ZERO_POINT_ZERO;
+		bool someMin = false;
+
+		for(int i=0;i<NumRelRates();i++){
+			if(i != which){
+				*relNucRates[i] *= rescale;
+				if(*relNucRates[i] < MIN_REL_RATE){
+					*relNucRates[i] = MIN_REL_RATE;
+					minSum += MIN_REL_RATE;
+					someMin = true;
+					}
+				else
+					nonMin += *relNucRates[i];
+				}
+			}
+		if(someMin){
+			FLOAT_TYPE unfixedTarget = SUM_TO - val - minSum;
+			rescale = unfixedTarget / nonMin;
+			for(int i=0;i<NumRelRates();i++){
+				if(i != which && !FloatingPointEquals(*relNucRates[i], MIN_REL_RATE, 1e-8))
+					*relNucRates[i] *= rescale;
+				}
+			}
+		
+#ifndef NDEBUG
+		FLOAT_TYPE sum = ZERO_POINT_ZERO;
+		for(int i=0;i<NumRelRates();i++)
+			sum += *relNucRates[i];
+		assert(FloatingPointEquals(sum, SUM_TO, 1e-8));
+#endif
+*/
+		eigenDirty = true;
+		}
+
+	void NormalizeSumConstrainedRelativeRates(bool enforceBounds, int toNotChange){
+#ifndef SUM_AA_REL_RATES
+		assert(0);
+#endif
+		bool someMin = false;
+		
+		FLOAT_TYPE minSum = ZERO_POINT_ZERO;
+		FLOAT_TYPE sum = ZERO_POINT_ZERO;
+
+		for(int i=0;i<NumRelRates();i++){
+			if(i != toNotChange){
+				sum += *relNucRates[i];
+				if(*relNucRates[i] < MIN_REL_RATE)
+					someMin = true;
+				}
+			}
+		if(someMin || !(FloatingPointEquals(sum, SUM_TO, MIN_REL_RATE * 0.01))){
+			do{
+				FLOAT_TYPE unfixedTarget = SUM_TO - (toNotChange < 0 ? ZERO_POINT_ZERO : *relNucRates[toNotChange]) - minSum;
+				FLOAT_TYPE rescale = unfixedTarget / sum;
+				someMin = false;
+				sum = ZERO_POINT_ZERO;
+				for(int i=0;i<NumRelRates();i++){
+					if(i != toNotChange){
+						if(*relNucRates[i] >= ZERO_POINT_ZERO){
+							*relNucRates[i] *= rescale;
+							if(*relNucRates[i] < MIN_REL_RATE){
+								*relNucRates[i] = -1.0;
+								minSum += MIN_REL_RATE;
+								someMin = true;
+								}
+							else
+								sum += *relNucRates[i];
+							}
+						}
+					}
+				}while(someMin);
+			}
+
+		for(int i=0;i<NumRelRates();i++)
+			if(*relNucRates[i] < ZERO_POINT_ZERO)
+				*relNucRates[i]= MIN_REL_RATE;
+
+#ifndef NDEBUG
+		sum = ZERO_POINT_ZERO;
+		for(int i=0;i<NumRelRates();i++)
+			sum += *relNucRates[i];
+		assert(FloatingPointEquals(sum, SUM_TO, MIN_REL_RATE * 0.1));
+#endif
+		/*
+		FLOAT_TYPE sum = ZERO_POINT_ZERO;
+		FLOAT_TYPE minSum = ZERO_POINT_ZERO;
+		for(int i=0;i<NumRelRates();i++){
+			if(*relNucRates[i] < MIN_REL_RATE && enforceBounds){
+				*relNucRates[i] = MIN_REL_RATE;
+				minSum += MIN_REL_RATE;
+				}
+			//the max rate is a little weird in this context, since after
+			//rescaling it will no longer be at that rate.  I don't think 
+			//that this should cause problems.
+			else if(*relNucRates[i] > MAX_REL_RATE && enforceBounds){
+				*relNucRates[i] = MAX_REL_RATE;
+				sum += *relNucRates[i];
+				}
+			else{
+				sum += *relNucRates[i];
+				}
+			}
+		FLOAT_TYPE nonMinTarget = SUM_TO - minSum;
+		for(int i=0;i<NumRelRates();i++)
+			*relNucRates[i] *= SUM_TO / sum;
+		if(enforceBounds){
+			for(int i=0;i<NumRelRates();i++){
+				if(*relNucRates[i] < MIN_REL_RATE)
+					*relNucRates[i] = MIN_REL_RATE;
+				}
+			}
+			*/		
+		}
+
+	void NormalizeSumConstrainedValues(FLOAT_TYPE **vals, int numVals, FLOAT_TYPE targetSum, FLOAT_TYPE minVal, int toNotChange){
+		bool someMin = false;
+		
+		//CheckStatefreqBounds();
+		FLOAT_TYPE minSum = ZERO_POINT_ZERO;
+		FLOAT_TYPE sum = ZERO_POINT_ZERO;
+		//note that sum here is the sum of everything besides toNotChange
+		for(int i=0;i<numVals;i++){
+			if(i != toNotChange){
+				sum += *vals[i];
+				if(*vals[i] < minVal)
+					someMin = true;
+				}
+			}
+		//so if there is any toNotChange this will be true
+		if(someMin || !(FloatingPointEquals(sum, targetSum, minVal * 0.01))){
+			do{
+				FLOAT_TYPE unfixedTarget = targetSum - (toNotChange < 0 ? ZERO_POINT_ZERO : *vals[toNotChange]) - minSum;
+				FLOAT_TYPE rescale = unfixedTarget / sum;
+				someMin = false;
+				sum = ZERO_POINT_ZERO;
+				for(int i=0;i<numVals;i++){
+					if(i != toNotChange){
+						if(*vals[i] > ZERO_POINT_ZERO){
+							*vals[i] *= rescale;
+							if(*vals[i] < minVal){
+								*vals[i] = -1.0;
+								minSum += minVal;
+								someMin = true;
+								}
+							else
+								sum += *vals[i];
+							}
+						}
+					}
+				}while(someMin);
+			}
+
+		for(int i=0;i<numVals;i++)
+			if(*vals[i] < ZERO_POINT_ZERO)
+				*vals[i]= minVal;
+
+#ifndef NDEBUG
+		//CheckStatefreqBounds();
+		sum = ZERO_POINT_ZERO;
+		for(int i=0;i<numVals;i++){
+			sum += *vals[i];
+			}
+		assert(FloatingPointEquals(sum, targetSum, minVal * 0.1));
+#endif
+		}
+
+	void SetPinv(int which, FLOAT_TYPE val){
+		assert(which == 0);
+		*propInvar=val;
+		//change the proportion of rates in each gamma cat
+		for(int i=0;i<NRateCats();i++){
+			rateProbs[i]=(FLOAT_TYPE)(1.0-*propInvar)/NRateCats();
+			}
+		}
+
+	void SetAlpha(int which, FLOAT_TYPE val){
+		assert(modSpec->numRateCats > 1);
+		*alpha=val;
+		DiscreteGamma(rateMults, rateProbs, *alpha);
+		//This is odd, but we need to call normalize rates here if we are just using a gamma distrib to get starting rates for 
+		//flex.  Flex expects that the rates will be normalized including pinv elsewhere
+		if(modSpec->IsFlexRateHet()) NormalizeRates();
+		}
+
+	void SetDeleteRate(int which, FLOAT_TYPE val){
+		*deleteRate = val;
+		}
+
+	void SetInsertRate(int which, FLOAT_TYPE val){
+		*insertRate = val;
+		}
+
+	//these are the bounds on a particular rate that keep it from crossing a neighboring rate when rescaling happens
+	FLOAT_TYPE EffectiveLowerFlexBound(int which){
+		assert(which != 0);
+		assert(which < NRateCats());
+		FLOAT_TYPE whichProd = rateMults[which] * rateProbs[which];
+		FLOAT_TYPE factor = rateMults[which - 1] / ((rateMults[which] * (1.0 - whichProd)) + (whichProd * rateMults[which - 1]));
+		FLOAT_TYPE thisVal = rateMults[which] * factor;
+		FLOAT_TYPE lowerVal = rateMults[which - 1] * (1.0 - factor * rateMults[which] * rateProbs[which]) / (1.0 - rateMults[which] * rateProbs[which]);
+		assert(FloatingPointEquals(thisVal, lowerVal, 1e-4));
+		return max(thisVal, lowerVal)  + GARLI_FP_EPS;
+		}
+
+	FLOAT_TYPE EffectiveUpperFlexBound(int which){
+		assert(which < NRateCats() - 1);
+		FLOAT_TYPE whichProd = rateMults[which] * rateProbs[which];
+		FLOAT_TYPE factor = rateMults[which + 1] / ((rateMults[which] * (1.0 - whichProd)) + (whichProd * rateMults[which + 1]));
+		FLOAT_TYPE thisVal = rateMults[which] * factor;
+		FLOAT_TYPE upperVal = rateMults[which + 1] * (1.0 - factor * rateMults[which] * rateProbs[which]) / (1.0 - rateMults[which] * rateProbs[which]);
+		assert(FloatingPointEquals(thisVal, upperVal, 1e-4));
+		return min(thisVal, upperVal) - GARLI_FP_EPS;
+		}
+
+	void SetFlexRate(int which, FLOAT_TYPE val){
+		assert(which < NRateCats());
+		rateMults[which] = val;
+		NormalizeRates(which, which);
+		eigenDirty = true;
+		}
+
+	void SetFlexProb(int which, FLOAT_TYPE val){
+		assert(which < NRateCats());
+		rateProbs[which] = val;
+		//here the proportion that changed should remain constant, but there isn't anything wrong with
+		//the corresponding rate changing when rescaling
+		NormalizeRates(which, -1);
+		eigenDirty = true;
+		}
+
+	void SetOmega(int which, FLOAT_TYPE val){
+		assert(which < NRateCats());
+		*omegas[which] = val;
+		eigenDirty = true;
+		}
+
+	void SetOmegaProb(int which, FLOAT_TYPE val){
+		assert(which < NRateCats());
+		assert(val >= 0.0);
+		assert(val == val);
+		*omegaProbs[which] = val;
+
+		NormalizeSumConstrainedValues(&omegaProbs[0], NRateCats(), ONE_POINT_ZERO, 1.0e-5, which);
+/*
+		FLOAT_TYPE newTot = 1.0 - *omegaProbs[which];
+		FLOAT_TYPE oldTot = 0.0;
+		for(int i=0;i<NRateCats();i++)
+			if(i != which) 
+				oldTot += *omegaProbs[i];
+		for(int i=0;i<NRateCats();i++)
+			if(i != which){
+				assert(*omegaProbs[i] * newTot / oldTot > 0.0);
+				*omegaProbs[i] *= newTot / oldTot;
+				}
+#ifndef NDEBUG
+		newTot = 0.0;
+		for(int i=0;i<NRateCats();i++) 
+			newTot += *omegaProbs[i];
+		assert(FloatingPointEquals(newTot, ONE_POINT_ZERO, 1.0e-5));
+#endif
+*/
+		eigenDirty = true;
+		}
+
+	//this is pretty hacktacular, but using this as a dummy setting function 
+	//so that it can be passed to OptBounded, which needs a function pointer
+	//with signiture void (Model::*SetParam)(int, FLOAT_TYPE), thus can't make
+	//the set function part of TreeNode or Tree
+	//This shouldn't even be called
+	void SetBranchlengthDummy(int which, FLOAT_TYPE val){
+		assert(0);
+		}
+
+	void SetOmegas(const FLOAT_TYPE *rates, const FLOAT_TYPE *probs){
+		FLOAT_TYPE tot=0.0;
+		for(int r=0;r<NRateCats();r++){
+			if(FloatingPointEquals(rates[r], ZERO_POINT_ZERO, max(1.0e-8, GARLI_FP_EPS * 2.0))){
+				outman.UserMessage("WARNING: Omega parameter %d cannot be zero.  Setting to 1e-5", r);
+				*omegas[r] = 1.0e-5;
+				}
+			else *omegas[r]=rates[r];
+			*omegaProbs[r]=probs[r];
+			tot += *omegaProbs[r];
+			}
+		if(FloatingPointEquals(tot, ONE_POINT_ZERO, 1.0e-3) == false) throw ErrorException("omega category proportions add up to %f, not 1.0.", tot);
+		eigenDirty = true;
+		}
+
+	FLOAT_TYPE Omega(int which) const{
+		assert(which < NRateCats());
+		assert(*omegas[which] >= 0.0);
+		assert(*omegas[which] == *omegas[which]);
+		return *omegas[which];
+		}
+
+	FLOAT_TYPE OmegaProb(int which) const{
+		assert(which < NRateCats());
+		assert(*omegaProbs[which] >= 0.0);
+		assert(*omegaProbs[which] == *omegaProbs[which]);
+		return *omegaProbs[which];
+		}
+
+	void SetAlpha(FLOAT_TYPE a, bool checkValidity){
+		if(checkValidity == true)
+			if(modSpec->numRateCats==1) throw(ErrorException("Config file specifies ratehetmodel = none, but starting model contains alpha!\n"));
+		*alpha=a;
+		DiscreteGamma(rateMults, rateProbs, *alpha);
+		//This is odd, but we need to call normalize rates here if we are just using a gamma distrib to get starting rates for 
+		//flex.  Flex expects that the rates will be normalized including pinv elsewhere
+		if(modSpec->IsFlexRateHet()) NormalizeRates();
+		}
+
+	void SetPinv(FLOAT_TYPE p, bool checkValidity){
+		if(checkValidity == true){
+			if(modSpec->includeInvariantSites == false && p!=0.0) 
+				throw(ErrorException("Config file specifies invariantsites = none, but starting model contains it!\n"));
+			else if(modSpec->includeInvariantSites == true && p == 0.0){
+				outman.UserMessage("WARNING: Config file specifies estimation of invariantsites, but starting model sets it to zero!\n");
+				p = 1.0e-8;
+				//throw(ErrorException("Config file specifies invariantsites, but starting model sets it to zero!\n"));
+				}
+			}
+		*propInvar=p;
+		//change the proportion of rates in each gamma cat
+		for(int i=0;i<NRateCats();i++){
+			rateProbs[i]=(FLOAT_TYPE)(1.0-*propInvar)/NRateCats();
+			}
+		}
+	void SetMaxPinv(FLOAT_TYPE p){
+		maxPropInvar=p;
+		}
+	void SetDirty(bool tf){
+		if(tf) eigenDirty=true;
+		else eigenDirty=false;
+		}
+
+	void CheckAndCorrectRateOrdering(){
+		//if a rate gets bumped past two others we might need to pass over the rates twice
+		//this is certainly not the most efficient sorting algorithm, but it doesn't really matter
+		assert(NRateCats() > 1);
+		if(modSpec->IsNonsynonymousRateHet()){
+			bool done;
+			do{
+				done = true;
+				for(int f=0;f<NRateCats()-1;f++){
+					if(*omegas[f] > *omegas[f+1]){
+						//outman.UserMessage("prevented: %f %f", *omegas[f], *omegas[f+1]); 
+						FLOAT_TYPE dum = *omegas[f+1];
+						*omegas[f+1] = *omegas[f];
+						*omegas[f] = dum;
+						dum = *omegaProbs[f+1];
+						*omegaProbs[f+1] = *omegaProbs[f];
+						*omegaProbs[f] = dum;
+						done = false;
+						}
+					}
+				}while(!done);
+			}
+		else if(modSpec->IsFlexRateHet()){
+			bool done;
+			do{
+				done = true;
+				for(int f=0;f<NRateCats()-1;f++){
+					if(rateMults[f] > rateMults[f+1]){
+						FLOAT_TYPE dum = rateMults[f+1];
+						rateMults[f+1] = rateMults[f];
+						rateMults[f] = dum;
+						dum = rateProbs[f+1];
+						rateProbs[f+1] = rateProbs[f];
+						rateProbs[f] = dum;
+						done = false;
+						}
+					}
+				}while(!done);
+			}
+		else assert(0);
+		}
+
+	void AdjustRateProportions(){
+		//this will change the gamma class probs when pinv changes
+		for(int i=0;i<NRateCats();i++) 
+			rateProbs[i]=(FLOAT_TYPE)(1.0-*propInvar)/NRateCats();
+#ifndef NDEBUG
+		FLOAT_TYPE sum=0.0;
+		for(int i=0;i<NRateCats();i++){
+			sum += rateProbs[i];
+			}		
+		sum += *propInvar;
+		assert(FloatingPointEquals(sum, ONE_POINT_ZERO, 1.0e-5));
+#endif
+		}
+
+	void NormalizeRates(int probToRemainConstant = -1, int rateToRemainConstant = -1){
+		//optionally, pass the number of one of the rate/prob pairs to hold constant
+
+		FLOAT_TYPE sum=0.0;
+		FLOAT_TYPE minVal = 1e-5;
+
+		//FLOAT_TYPE **aliasedRates = new FLOAT_TYPE*[NRateCats()];
+		vector<FLOAT_TYPE *> aliasedRates;
+		for(int i=0;i<NRateCats();i++){
+			aliasedRates.push_back(&rateProbs[i]);
+			}
+		NormalizeSumConstrainedValues(&aliasedRates[0], NRateCats(), ONE_POINT_ZERO, minVal, probToRemainConstant);
+
+/*
+		for(int i=0;i<NRateCats();i++){
+			if(i != toRemainConstant) sum += rateProbs[i];
+			}
+
+		//pinv is figured into the normalization here, but it won't be changed itself.
+		if(NoPinvInModel()==false){
+			sum = sum / (FLOAT_TYPE)(1.0-*propInvar);
+			}
+
+		if(toRemainConstant > -1) 
+			sum /= (ONE_POINT_ZERO - rateProbs[toRemainConstant]);
+
+		for(int i=0;i<NRateCats();i++)	{
+			if(i != toRemainConstant) rateProbs[i] /= sum;
+			}
+*/
+
+		//3/17/09 - it is possible for mult rescaling to cause two rates to "cross" if one is being held constant.  If
+		//that happens, try again without holding it constant.  It isn't safe to call CheckAndCorrectRateOrdering()
+		//from here because that would change the numbering of the rates and would screw things up at a higher level
+		//if e.g. rate 2 is being optimized but it suddenly becomes rate 3.  NOTE THAT THIS IS ONLY USED FOR Flex rates
+		//although M3 codon models are very similar, the normalization there happens differently through the rmat rescaling
+		bool OK = true;
+		FLOAT_TYPE backup_mults[20];
+		for(int r=0;r<NRateCats();r++)
+			backup_mults[r] = rateMults[r];
+		do{
+			double rateToRemainConstantContrib;
+			sum=0.0;
+			if(rateToRemainConstant > -1){
+				rateToRemainConstantContrib = rateMults[rateToRemainConstant]*rateProbs[rateToRemainConstant];
+				//this means that it isn't possible to rescale and keep one of the rate/probs constant
+				if(rateToRemainConstantContrib > ONE_POINT_ZERO)
+					rateToRemainConstant = -1;
+				}
+				
+			for(int i=0;i<NRateCats();i++){
+				if(i != rateToRemainConstant) sum += rateMults[i]*rateProbs[i];
+				}
+			if(rateToRemainConstant > -1) sum /= (ONE_POINT_ZERO - (rateMults[rateToRemainConstant] * rateProbs[rateToRemainConstant]));
+			for(int i=0;i<NRateCats();i++){
+				if(i != rateToRemainConstant) rateMults[i] /= sum;
+				}
+			//check if the rates are ordered properly
+			int r = 1;
+			for(;r<NRateCats();r++)
+				if(rateMults[r-1] > rateMults[r]){
+					OK = false;
+					break;
+					}
+			if(r == NRateCats()) OK = true;
+			if(rateToRemainConstant == -1) assert(OK);
+			if(!OK){//restore the rates and try again
+				for(int r=0;r<NRateCats();r++)
+					rateMults[r] = backup_mults[r];
+				rateToRemainConstant = -1;
+				}
+			}while(!OK);
+
+#ifndef NDEBUG
+		sum=0.0;
+		for(int i=0;i<NRateCats();i++){
+			sum += rateProbs[i];
+			assert(rateProbs[i] > ZERO_POINT_ZERO);
+			assert(rateProbs[i] < ONE_POINT_ZERO);
+			assert(rateMults[i] > ZERO_POINT_ZERO);
+			}		
+		sum += *propInvar;
+		assert(fabs(sum - 1.0) < 0.0001);
+		sum=0.0;
+		for(int i=0;i<NRateCats();i++){
+			sum += rateMults[i]*rateProbs[i];
+			}
+		assert(FloatingPointEquals(sum, 1.0, 1.0e-5));
+
+#endif
+		}
+
+	const FLOAT_TYPE *GetRateProbs() {
+		//this is silly, but use the rateProbs as a holder to return the omegaProbs, which are in a vector of double pointers
+		if(modSpec->IsNonsynonymousRateHet())
+			for(int i=0;i<NRateCats();i++)
+				rateProbs[i] = *omegaProbs[i];
+
+#ifndef NDEBUG
+		FLOAT_TYPE sum=0.0;
+		for(int i=0;i<NRateCats();i++){
+			sum += rateProbs[i];
+			}
+		sum+=*propInvar;
+		assert(fabs(1.0-sum) < .001);
+#endif		
+		return rateProbs;
+		}
+	};
+
+class ModelSet{//this is a set of models that are applied to a _single_ set of sites
+				//i.e., model mixtures, although only ones in which the models have separate
+				//Q matrices, eigen variables, etc (not just rates, so gamma and flex rates don't count)
+	friend class Model;
+	
+	vector<Model*> mods;
+	vector<FLOAT_TYPE> modelProbs;
+	vector<FLOAT_TYPE> modelMutationProbs;
+public:
+	ModelSet(int m){
+		//currently one model per set
+		int numModels = 1;
+		for(int i=0;i<numModels;i++){
+			Model *mod = new Model(m);
+			mods.push_back(mod);
+			}
+		}
+	~ModelSet(){
+		for(int i=0;i<mods.size();i++)
+			delete mods[i];
+		mods.clear();
+		}
+	ModelSet(const ModelSet &m){
+		CopyModelSet(&m);
+		}
+	Model *GetModel(int m) const{
+		if(m < 0 || (m < mods.size()) == false) throw ErrorException("Attemped to access invalid Model number");
+		return mods[m];
+		}
+	unsigned NumModels(){return mods.size();}
+	void CopyModelSet(const ModelSet *m){
+		assert(GetModel(0)->stateFreqs[0] != NULL);
+		unsigned num = 0;
+		for(vector<Model*>::const_iterator modit = m->mods.begin();modit != m->mods.end();modit++){
+			Model *mod;
+			if(num >= mods.size()){
+				mod = new Model(num);
+				mods.push_back(mod);
+				}
+			else mod = mods[num];
+			mod->CopyModel(*modit);
+			num++;
+			}
+		}
+	bool IsModelSetEqual(const ModelSet *other) const{
+		bool equal = true;
+		for(unsigned i=0;i<mods.size();i++){
+			equal = mods[i]->IsModelEqual(other->GetModel(i));
+			if(!equal) return equal;
+			}
+		return equal;
+		}
+
+	void CollectMutableParameters(vector<BaseParameter *> &paramVec){
+		for(vector<Model*>::const_iterator modit = mods.begin();modit != mods.end();modit++){
+			const vector<BaseParameter *> *tempVec = (*modit)->GetMutableParameters();
+			for(unsigned i=0;i<tempVec->size();i++)
+				paramVec.push_back((*tempVec)[i]);
+			}
+		}
+	//currently nothing in ModelSet to save, since no mixing
+	void WriteModelSetCheckpoint(OUTPUT_CLASS &out) const{
+		for(vector<Model*>::const_iterator modit = mods.begin();modit != mods.end();modit++){
+			(*modit)->OutputBinaryFormattedModel(out);
+			}
+		}
+	void ReadModelSetCheckpoint(FILE *in){
+		for(vector<Model*>::iterator modit = mods.begin();modit != mods.end();modit++){
+			(*modit)->ReadBinaryFormattedModel(in);
+			}
+		}
+	void SetDefaultModelSetParameters(SequenceData *data){
+		for(vector<Model*>::iterator modit = mods.begin();modit != mods.end();modit++){
+			(*modit)->SetDefaultModelParameters(data);
+			}
+		}
+	};
+
+class ModelPartition{
+	//a collection of model sets, each of which corresponds to a set of characters
+
+	vector<ModelSet *> modSets;
+	//the models here are the same as included in the modSets - it will sometimes
+	//be handy to access them directly, and it will often be not matter what the 
+	//hierarchy is to calculate things as the model level (ie, pmats, CLAs etc)
+	vector<Model *> models;
+	vector<BaseParameter *> allParamsToMutate;
+//	FLOAT_TYPE globalRateScaler;
+
+	vector<FLOAT_TYPE> subsetRates;
+	vector<FLOAT_TYPE> subsetProportions;
+
+public:
+	ModelPartition();
+	~ModelPartition(){
+		for(int i = 0;i < modSets.size();i++)
+			delete modSets[i];
+		modSets.clear();
+		//these are just pulled from the modsets, so don't need to be deleted
+		models.clear();
+		allParamsToMutate.clear();
+		}
+
+	void CopyModelPartition(const ModelPartition *mp){
+		unsigned num = 0;
+		for(vector<ModelSet*>::const_iterator setit = mp->modSets.begin();setit != mp->modSets.end();setit++){
+			ModelSet *modSet;
+			if(num >= modSets.size()){
+				modSet = new ModelSet(num);
+				modSets.push_back(modSet);
+				}
+			else modSet = modSets[num];
+			modSet->CopyModelSet(*setit);
+			num++;
+			}
+		//subsetProportions are just proportional to the number of total chars in each data subset, so they won't vary
+		assert(NumSubsetRates() == mp->NumSubsetRates());
+		for(int d = 0;d < subsetRates.size();d++){
+			subsetRates[d] = mp->subsetRates[d];
+			}
+		}
+	unsigned NumModelSets() const {return modSets.size();}
+	unsigned NumModels() const {return models.size();}
+	unsigned NumMutableParams() const {return allParamsToMutate.size();}
+	unsigned NumSubsetRates() const {return subsetRates.size();}
+	FLOAT_TYPE SubsetRate(int i) const {return subsetRates[i];}
+	//can't think of anything else that really needs to get reset here
+	void Reset(){
+		for(int d = 0;d < subsetRates.size();d++){
+			subsetRates[d] = 1.0;
+			}
+		}
+	void SetSubsetRate(int which, FLOAT_TYPE val){
+		assert(which < subsetRates.size());
+		subsetRates[which] = val;
+		NormalizeSubsetRates(which);
+		}
+	void SetSubsetRates(const vector<FLOAT_TYPE> vals, bool renormalize){
+		assert(NumSubsetRates() == vals.size());
+		subsetRates.clear();
+		for(int i = 0;i < vals.size();i++)
+			subsetRates.push_back(vals[i]);
+		if(renormalize)
+			NormalizeSubsetRates();
+		}
+
+	int PerformModelMutation();
+	BaseParameter *SelectModelMutation();
+	void CalcMutationProbsFromWeights();
+	unsigned CalcRequiredCLAsize(const DataPartition *dat); //this is the size in BYTES not elements
+	double CalcRequiredCLAsizeKB(const DataPartition *dat); //this is the size in KB not elements
+
+	ModelSet *GetModelSet(int ms) const{
+		if(ms < 0 || ms < modSets.size() == false) throw ErrorException("Attemped to access invalid ModelSet number");
+		return modSets[ms];
+		}
+	Model *GetModel(int m) const{
+		if(m < 0 || (m < models.size()) == false) 
+			throw ErrorException("Attemped to access invalid Model number");
+		return models[m];
+		}
+	bool IsModelPartitionEqual(const ModelPartition *other) const{
+		bool equal = true;
+		for(unsigned i=0;i<modSets.size();i++){
+			equal = modSets[i]->IsModelSetEqual(other->GetModelSet(i));
+			if(!equal) return equal;
+			}
+		return equal;
+		}
+	void CollectMutableParameters(){
+		for(vector<ModelSet*>::const_iterator setit = modSets.begin();setit != modSets.end();setit++){
+			vector<BaseParameter *> setParams;
+			(*setit)->CollectMutableParameters(setParams);
+			for(vector<BaseParameter *>::iterator pit = setParams.begin();pit != setParams.end();pit++)
+				allParamsToMutate.push_back(*pit);
+			setParams.clear();
+			}
+		}
+	void NormalizeSubsetRates(int toRemainConstant = -1){
+		//optionally, pass the number of one of the rates to hold constant
+
+		//the proportions don't change, so this is simpler than flex rates
+		assert(subsetRates.size() > 1);
+
+		double toRemainConstantContrib;
+		if(toRemainConstant > -1){
+			toRemainConstantContrib = subsetRates[toRemainConstant]*subsetProportions[toRemainConstant];
+			//this means that it isn't possible to rescale and keep one of the rate/probs constant
+			if(toRemainConstantContrib > ONE_POINT_ZERO)
+				toRemainConstant = -1;
+			}
+		FLOAT_TYPE sum = 0.0;
+		for(int i=0;i<subsetRates.size();i++){
+			if(i != toRemainConstant) sum += subsetRates[i]*subsetProportions[i];
+			}
+		if(toRemainConstant > -1) sum /= (ONE_POINT_ZERO - (subsetRates[toRemainConstant] * subsetProportions[toRemainConstant]));
+		for(int i=0;i<subsetRates.size();i++){
+			if(i != toRemainConstant) subsetRates[i] /= sum;
+			}
+
+#ifndef NDEBUG
+		sum = 0.0;
+		for(int i=0;i<subsetRates.size();i++){
+			sum += subsetProportions[i] * subsetRates[i];
+			}
+		assert(FloatingPointEquals(sum, 1.0, 1e-6));
+#endif
+		}
+	void OutputHumanReadableModelReportWithParams(){
+		for(int m = 0;m < NumModels();m++){
+			outman.UserMessage("Model %d", m + 1);
+			models[m]->OutputHumanReadableModelReportWithParams();
+			}
+		if(modSpecSet.InferSubsetRates()){
+			outman.UserMessageNoCR("Subset rate multipliers:\n  ");
+			for(int d = 0;d < subsetRates.size();d++)
+				outman.UserMessageNoCR("%6.2f", SubsetRate(d));
+			outman.UserMessage("");
+			}
+		}
+
+	void ReadGarliFormattedModelStrings(string &modstr);
+	void FillGarliFormattedModelStrings(string &s) const;
+	void WriteModelPartitionCheckpoint(OUTPUT_CLASS &out) const;
+	void ReadModelPartitionCheckpoint(FILE *in);
+	};
+
+typedef void (Model::*SetParamFunc) (int, FLOAT_TYPE);
+#define CALL_SET_PARAM_FUNCTION(object, ptrToMember) ((object).*(ptrToMember))
+
+#endif
+
diff --git a/src/mpifuncs.cpp b/src/mpifuncs.cpp
new file mode 100644
index 0000000..58a4d5d
--- /dev/null
+++ b/src/mpifuncs.cpp
@@ -0,0 +1,1290 @@
+// GARLI version 0.94 source code
+// Copyright  2005 by Derrick J. Zwickl
+// All rights reserved.
+//
+// This code may be used and modified for non-commercial purposes
+// but redistribution in any form requires written permission.
+// Please contact:
+//
+//  Derrick Zwickl
+//	Integrative Biology, UT
+//	1 University Station, C0930
+//	Austin, TX  78712
+//  email: garli.support at gmail.com
+//
+//	Note: In 2006  moving to NESCENT (The National
+//	Evolutionary Synthesis Center) for a postdoc
+
+//	NOTE: Portions of this source adapted from GAML source, written by Paul O. Lewis
+
+// all of the mpi related code appears here or in threadfuncs.cpp
+
+
+#ifdef MPI_VERSION
+
+#include <stdarg.h>
+#include <mpi.h>
+#include <string.h>
+
+#include "mpifuncs.h"
+#include "defs.h"
+#include "population.h"
+#include "individual.h"
+#include "configoptions.h"
+#include "configreader.h"
+#include "funcs.h"
+#include "stopwatch.h"
+#include "threaddcls.h"
+#include "adaptation.h"
+#include "errorexception.h"
+
+// globals
+Stopwatch *g_sw=NULL;
+long int* g_gen = NULL;
+extern rng rnd;
+
+FILE *fhandle;
+
+int MPIMain(int argc, char** argv)	{
+
+	MPI_Init(&argc, &argv);
+	
+	int rank, nprocs;
+	MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+	MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
+
+	bool poo=true;
+	//if(rank==0) while (poo) ;
+
+	try{
+	if (rank == 0)	{
+        	MasterGamlConfig conf;
+	        int err=conf.Read("garli.conf", true);
+		if(err != 0){
+			send_quit_messages(nprocs);
+			throw ErrorException("Error in config file (Master)...aborting.");
+			}
+		
+		LogConfig(conf);
+
+	        // Create the data object
+        	NucleotideData data;
+        	ReadData(conf.datafname.c_str(), &data);
+
+	        // start the remote nodes going...
+        	StartProcs(conf, data);
+
+	        // start yourself!
+        	MasterMaster(conf, data);
+
+		}
+	else	{ // rank != 0
+	
+		int from, tag, size;
+		char* buf;
+		NucleotideData data;
+		GeneralGamlConfig conf;
+		if (conf.Read("garli.conf") < 0)	{
+			throw ErrorException("Error in config file (Remote)...aborting.");
+			}
+
+		//no longer sending the conf, just letting the remote read it from file
+//		for (int i = 0; i < 2; ++i)	{
+			RecvMPIMessage(&buf, &size, &from, &tag, true);
+			assert(from == 0); // sanity check
+			if (tag == TAG_DATA)	{
+				data.Deserialize(buf, size);
+				debug_mpi("receieved data from %d", from);
+				}
+/*			else if (tag == TAG_CONFIG)	{
+				conf.Deserialize(buf, size);
+				debug_mpi("received conf from %d", from);
+				}
+*/			else	{
+				debug_mpi("ERROR: received unexpected message from %d with tag %d", from, tag);
+				debug_mpi("aborting from MPIMain()");
+				}
+			delete [] buf;
+//		}
+		
+//		LogConfig(conf);
+		RemoteMaster(conf, data);
+		}
+	}catch(ErrorException &err){
+		err.Print(cout);
+		}
+	// time to kill some global vars
+	delete [] node_results;
+	
+	MPI_Finalize();
+	return 0;
+}
+
+int StartProcs(const GeneralGamlConfig& conf, NucleotideData& data)	{
+
+//	debug_mpi("entering StartProcs()");
+
+	char* conf_buf, *data_buf;
+	int conf_size, data_size;
+	GeneralGamlConfig ctest;
+//	NucleotideData dtest;
+
+	data.Serialize(&data_buf, &data_size);
+//	conf.Serialize(&conf_buf, &conf_size);
+	
+	// sanity check: make sure the serialization code works
+/*	dtest.Deserialize(data_buf, data_size);
+	assert(data == dtest);
+	ctest.Deserialize(conf_buf, conf_size);
+	assert(conf == ctest);
+*/	
+	int nprocs;
+	MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
+	for (int i = 1; i < nprocs; ++i)	{
+		SendMPIMessage(data_buf, data_size, i, TAG_DATA);
+		debug_mpi("sent data to node %d", i);
+//		SendMPIMessage(conf_buf, conf_size, i, TAG_CONFIG);
+//		debug_mpi("sent conf to node %d", i);
+	}
+	
+	delete [] data_buf;
+//	delete [] conf_buf;
+	
+	debug_mpi("leaving StartProcs()");
+	
+	return 0;
+}
+
+/* threaded MasterMaster */
+/* i would prefer that the thread initialization code happen in MPIMain(), but
+ * it needs Population pop, which is declared here */
+int MasterMaster(MasterGamlConfig& conf, NucleotideData& data)	{
+	Parameters params;
+	params.SetParams(conf, data);
+	LogParams(params);
+
+	int nprocs;
+	MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
+
+	bool poo=true;
+//	while(poo);
+		
+	Tree::alpha = params.gammaShapeBrlen;
+	Tree::meanBrlenMuts = params.meanBrlenMuts;
+
+	Population pop;
+//	debug_mpi("about to setup");
+	pop.Setup(params, &conf, nprocs, 0);
+	g_sw=&pop.stopwatch;
+//	debug_mpi("setup");
+	g_gen = &pop.gen;
+
+	pop.CalcAverageFitness();
+
+	// start the thread
+	pthread_t thread;
+	thread_arg_t targ;
+	pthread_mutex_init(&lock_pm, NULL);
+	pthread_mutex_init(&lock_pop, NULL);
+	pthread_cond_init(&cond_pm, NULL);
+	g_quit_time = false;
+	g_processing_message = false;
+	targ.conf = &const_cast<MasterGamlConfig&>(conf);
+	targ.pop = &pop;
+	targ.nprocs = nprocs;
+	
+	pthread_create(&thread, NULL, thread_func2, (void*)&targ);
+	
+	cout << "Master running..." << endl;
+
+	pop.gen=0;
+	while (!g_quit_time){
+		pthread_mutex_lock(&lock_pop);
+			pop.keepTrack();
+			pop.OutputFate();
+			if (pop.gen % conf.logevery == 0) pop.OutputLog();
+			++pop.gen;
+			pop.NextGeneration();
+			if(pop.gen % pop.params->saveEvery == 0) pop.CreateTreeFile( pop.params->treefname );
+			if(pop.gen % pop.adap->intervalLength == 0){
+	            	bool reduced=false;
+	    	        if(pop.gen-pop.lastTopoImprove >= pop.adap->intervalsToStore*pop.adap->intervalLength){
+	         	           reduced=pop.adap->ReducePrecision();
+	            	        }
+	    	        if(reduced){
+	            	        pop.lastTopoImprove=pop.gen;
+	                	   pop.indiv[pop.bestIndiv].treeStruct->OptimizeAllBranches(pop.adap->branchOptPrecision);
+	                   	   pop.indiv[pop.bestIndiv].SetDirty();
+	                   	   pop.CalcAverageFitness();
+							//DJZ 2/20/06
+							//reducing parallel remote update thresh based on same criteria as opt precision
+							double prev=pop.paraMan->updateThresh;
+							pop.paraMan->ReduceUpdateThresh();
+							debug_mpi("Remote update threshold reduced from %f to %f", prev, pop.paraMan->updateThresh);	                    	
+							}
+/*	           		 else if(!(pop.gen%(pop.adap->intervalLength*pop.adap->intervalsToStore))){
+	                            pop.indiv[pop.bestIndiv].treeStruct->OptimizeAllBranches(pop.adap->branchOptPrecision);
+	                            pop.indiv[pop.bestIndiv].SetDirty();
+	                            pop.CalcAverageFitness();
+	                            }
+*/
+				if(pop.enforceTermConditions == true
+					&& pop.gen-pop.lastTopoImprove > pop.lastTopoImproveThresh 
+					&& pop.adap->improveOverStoredIntervals < pop.improveOverStoredIntervalsThresh
+					&& pop.adap->branchOptPrecision == pop.adap->minOptPrecision){
+			//		&& pop.paraMan->updateThresh == pop.paraMan->minUpdateThresh){
+					cout << "Reached termination condition!\nlast topological improvement at gen " << pop.lastTopoImprove << endl;
+					cout << "Improvement over last " << pop.adap->intervalsToStore*pop.adap->intervalLength << " gen = " << pop.adap->improveOverStoredIntervals << endl;
+					g_quit_time=true;
+					break;
+					}
+				pop.CheckSubtrees();
+
+#ifdef INCLUDE_PERTURBATION
+				pop.CheckPerturbParallel();
+#endif
+				}
+		pthread_mutex_unlock(&lock_pop);
+		pthread_mutex_lock(&lock_pm);
+			while (g_processing_message)
+				pthread_cond_wait(&cond_pm, &lock_pm);
+		pthread_mutex_unlock(&lock_pm);
+		}
+	
+	//DJZ 3-1-06 Need to give control back to the thread one more time so that it can deal with any final messages
+	pthread_mutex_unlock(&lock_pop);
+	pthread_mutex_lock(&lock_pm);
+		while (g_processing_message)
+			pthread_cond_wait(&cond_pm, &lock_pm);
+	pthread_mutex_unlock(&lock_pm);
+		
+	pop.FinalOptimization();
+	pop.FinalizeOutputStreams();
+	pthread_join(thread, NULL);
+	return 0;
+}
+
+/* old MasterMaster 
+int MasterMaster(const GamlConfig& conf, NucleotideData& data)	{
+	Parameters params;
+	params.SetParams(conf, data, true);
+	LogParams(params);
+
+	Tree::brlen_mu       = params.brlenMutProb;
+	Tree::mu             = params.topoMutProb;
+	Tree::lambda         = params.crossoverProb;
+	Tree::alpha          = params.gammaShape;
+	
+	int nprocs;
+	MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
+	
+	Population pop;
+	pop.Setup(params, conf, nprocs, 0);
+	g_gen = &pop.gen;
+	
+	for (int i = 1; i < nprocs; ++i)	{
+		if (i < conf.hybridp.nt*nprocs)
+			debug_mpi("node %d is shielded migrants", i);
+		else
+			debug_mpi("node %d is alpha male replication", i);
+	}
+	
+	if (conf.method == "fde")
+		MasterFullDuplexExchange(pop, conf);
+	else if (conf.method == "sm")
+		MasterShieldedMigrants(pop, conf);
+	else if (conf.method == "amr")
+		MasterAlphaMaleReplication(pop, conf);
+	else if (conf.method == "hybrid")
+		MasterHybrid(pop, conf);
+	else	{
+		debug_mpi("ERROR: unknown method (GamlConfig::General::method): %s", conf.method.c_str());
+		MPI_Abort(MPI_COMM_WORLD, -1);
+	}
+
+	return 0;
+}
+*/
+
+
+int RemoteMaster(GeneralGamlConfig& conf, NucleotideData& data)	{
+
+	debug_mpi("starting RemoteMaster()...");
+	
+	int rank;
+	MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+	
+	Parameters params;
+	params.SetParams(conf, data);
+	//the seed has already been set in SetParams above, but we need to
+	//modify it so that all remotes are not the same
+	rnd.set_seed((rank+1) * rnd.init_seed());
+	LogParams(params);
+
+
+	Tree::alpha = params.gammaShapeBrlen;
+	Tree::meanBrlenMuts = params.meanBrlenMuts;
+	
+	int nprocs;
+	MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
+	
+	bool poo=true;
+//	while(poo);
+	
+	Population pop;
+	pop.Setup(params, &conf, nprocs, rank);
+	g_sw=&pop.stopwatch;
+	g_gen = &pop.gen;
+
+	
+	//for now all nodes will be SW
+	debug_mpi("doing remote subtree worker");
+	RemoteSubtreeWorker(pop, conf);
+	/*
+	if (conf.method == "fde")
+		assert(0);
+//		RemoteFullDuplexExchange(pop, conf);
+	//DJZ changed this 9/10/03 to avoid occasional disparity in the acutal # of sm nodes and the number of shields allocated
+	else if (conf.method == "sm" || (conf.method == "hybrid" && rank <= (int) (conf.hybridp.nt*(nprocs-1)))){
+//	else if (conf.method == "sm" || (conf.method == "hybrid" && rank < conf.hybridp.nt*nprocs)){
+		debug_mpi("doing remote shielded migrants");
+		RemoteShieldedMigrants(pop, conf);
+	}
+	else if (conf.method == "amr" || conf.method == "hybrid")	{
+		debug_mpi("doing remote alpha male replication");
+		RemoteAlphaMaleReplication(pop, conf);
+	}
+	else	{
+		debug_mpi("ERROR: unknown method (GamlConfig::General::method): %s", conf.method.c_str());
+		MPI_Abort(MPI_COMM_WORLD, -1);
+	}
+	*/
+	return 0;
+}
+
+/*
+int RemoteMaster(const GamlConfig& conf, NucleotideData& data)	{
+
+	debug_mpi("starting RemoteMaster()...");
+	
+	Parameters params;
+	params.SetParams(conf, data, false);
+	LogParams(params);
+	
+	Tree::brlen_mu       = params.brlenMutProb;
+	Tree::mu             = params.topoMutProb;
+	Tree::lambda         = params.crossoverProb;
+	Tree::alpha          = params.gammaShape;
+
+	Population pop;
+	pop.Setup(params, conf.max_nindivs);
+	
+	char* tree_strings_in;
+	char* tree_strings_out;
+	int trans_count = 0;
+
+	// tree's must be scored before calling next generation so call it here so it doesn't crash on gen == 1
+	pop.CalcAverageFitness();
+	
+	pop.gen = 1;
+	while (true)	{
+		if (pop.gen % conf.interval == 0)	{
+		
+			debug_mpi("send interval reached.");
+
+        	// sanity check: make sure param's nindivs == pop's current/original size
+      		assert( (params.nindivs == pop.current_size) && (pop.current_size == pop.original_size) );
+
+        	// see if there is a quit message
+        	int flag;
+			MPI_Status status;
+			MPI_Iprobe(0, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, &status);
+			if (flag)	{
+				if (status.MPI_TAG == TAG_QUIT)	{
+					debug_mpi("quit message received.");
+					break;
+				}
+				else // sanity check: should not get here
+					assert(status.MPI_TAG == TAG_QUIT);
+			}
+			
+			// save old scores for TransLog()
+			pop.CalcAverageFitness();
+			double* old_scores = new double[params.nindivs];
+			for (int j = 0; j < params.nindivs; ++j)
+				old_scores[j] = pop.indiv[j].Fitness();
+
+			// send tree strings to node
+			pop.ShrinkPopulation(params.nindivs, &tree_strings_out); // allocates buf on heap
+			SendResultsToNode(0, pop.original_size, tree_strings_out);
+			debug_mpi("sent %d tree strings to master...", pop.original_size);
+			char* p = tree_strings_out;
+			for (int i = 0; i < pop.original_size; ++i)	{
+				debug_mpi("%s", p);
+				p += strlen(p) +1;
+			}
+
+			// wait for tree's to be sent back.
+			// must probe this incase a quit message is sent
+			int nindivs;
+			MPI_Probe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &status);
+			if (status.MPI_SOURCE != 0)
+				assert(status.MPI_SOURCE == 0); // should not receive messages from any node except the master
+			if (status.MPI_TAG == TAG_QUIT)	{
+				debug_mpi("quit message received while waiting for tree strings.");
+				break;
+			}
+			else if (status.MPI_TAG == TAG_TREE_STRINGS_COUNT)	{
+			
+				GetResultsFromNode(0, &nindivs, &tree_strings_in);
+				debug_mpi("received %d tree strings from master...", nindivs);
+				char* p = tree_strings_in;
+				for (int i = 0; i < pop.original_size; ++i)	{
+					debug_mpi("%s", p);
+					p += strlen(p) +1;
+				}
+	
+				// sanity check: make sure we're getting back as many as we sent out
+				assert(nindivs == pop.original_size);
+
+				pop.ExtendPopulation(nindivs, tree_strings_in);
+				pop.CalcAverageFitness();
+				
+				// save new scores for TransLog()
+				double* new_scores = new double[params.nindivs];
+				for (int j = 0; j < params.nindivs; ++j)
+					new_scores[j] = pop.indiv[j].Fitness();
+				
+				// remote nodes send all indivs and replace all indivs
+				int* temp = new int[params.nindivs+1];
+				for (int j = 0; j < params.nindivs; ++j)
+					temp[j] = j;
+					
+				TransLog(trans_count++, params.nindivs, nindivs, tree_strings_out,
+						 nindivs, tree_strings_in,
+						 temp, temp,
+						 old_scores, new_scores);
+					
+				delete [] tree_strings_in;
+				delete [] tree_strings_out;
+				delete [] new_scores;
+				delete [] old_scores;
+				delete [] temp;
+				
+			}
+			else // sanity check: should not get here!
+				assert(status.MPI_TAG != TAG_QUIT || status.MPI_TAG != TAG_TREE_STRINGS_COUNT);
+		}
+		else	{
+			pop.NextGeneration();
+			++(pop.gen);
+		}
+	} // end while (true)
+
+	return 0;
+}
+*/
+/*	returns:	how many nodes have results.
+	pre condition:	nodes[] must be of size nprocs-1
+	post condition:	nodes[] will hold >which< nodes have results.
+	example:	if remote nodes 1, 2 and 5 have results, then
+				return == 3
+				nodes[] == {1, 2, 5, (garbage)...}
+*/
+int PollForResults(int nodes[])	{
+	int nprocs, flag, count = 0;
+	MPI_Status status;
+
+	MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
+	for (int i = 2 ; i < nprocs; ++i)	{
+		MPI_Iprobe(i, TAG_TREE_STRINGS_COUNT, MPI_COMM_WORLD, &flag, &status);
+		if (flag)
+			nodes[count++] = status.MPI_SOURCE;
+	}
+
+	return count;
+}
+
+bool PollForResults(int n)	{
+	int flag;
+	MPI_Status status;
+	MPI_Iprobe(n, TAG_TREE_STRINGS_COUNT, MPI_COMM_WORLD, &flag, &status);
+	if (flag)
+		return 1;
+	else
+		return 0;
+}
+	
+
+/*	results format:	4 bytes (int) - nindivs
+					4 bytes (int) - size of tree strings including null terminators
+					n bytes (char) - tree strings seperated by NULLs, terminated by a double NULL
+	returns:		which node it received from
+	side affects:	if returns 0, then tree_strings is allocated on the heap
+*/
+int GetResultsFromNode(int node, int* n_, char** tree_strings_)	{
+	int& n = *n_;
+	char*& tree_strings = *tree_strings_;
+	int buf_size = 0;
+	MPI_Status status;
+
+	// sanity check: make sure node_num is a valid node
+	int nprocs;
+	MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
+	assert( ((node >= 0) && (node < nprocs)) || (node == MPI_ANY_SOURCE) );
+	
+	MPI_Recv(&n, 1, MPI_INT, node, TAG_TREE_STRINGS_COUNT, MPI_COMM_WORLD, &status);
+	assert(n > 0);
+	if (node == MPI_ANY_SOURCE)
+		node = status.MPI_SOURCE;
+	MPI_Recv(&buf_size, 1, MPI_INT, node, TAG_TREE_STRINGS_SIZE, MPI_COMM_WORLD, &status);
+	assert(buf_size > 0);
+	tree_strings = new char[buf_size];
+	MPI_Recv(tree_strings, buf_size, MPI_CHAR, node, TAG_TREE_STRINGS, MPI_COMM_WORLD, &status);
+
+	// sanity check: the number of tree strings in tree_strings should == nindivs
+	int count = 0;
+	char* p = tree_strings;
+	while (*p)	{
+		p += strlen(p) + 1;
+		++count;
+	}
+	assert(count == n);
+	
+	// sanity check: make sure p ended up at the end of the string
+	++p;
+	assert(p-tree_strings == buf_size);
+	
+	return status.MPI_SOURCE;
+}
+
+/*	results format:	4 bytes (int) - nindivs
+					4 bytes (int) - size of tree strings including null terminators
+					n bytes (char) - tree strings seperated by NULLs, terminated by a double NULL
+	pre conditions:	0 < node < nprocs
+					n > 0
+					tree_strings must have n tree_strings seperated by NULLs
+*/
+int SendResultsToNode(int node, int n, char* tree_strings)	{
+
+	// sanity check: make sure node is a valid number
+	int nprocs;
+	MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
+	assert( (node >= 0) && (node < nprocs) );
+
+	// sanity check: make sure the actual number of tree strings in tree_strings is equal to n
+	int count = 0;
+	char* p = tree_strings;
+	while (*p)	{
+		p += strlen(p) + 1;
+		++count;
+	}
+	assert(count == n);
+
+	int buf_size = (p+1)-tree_strings;
+
+	// sanity check: make sure i calculated buf_size correctly
+	p = tree_strings;
+	count = 0;
+	while (*p || *(p+1))	{	// this is basically strlen() for string terminated by two NULLs instead of one
+		++count;
+		++p;
+	}
+	assert(count+2 == buf_size);
+
+	MPI_Status status;
+	MPI_Send(&n, 1, MPI_INT, node, TAG_TREE_STRINGS_COUNT, MPI_COMM_WORLD);
+	MPI_Send(&buf_size, 1, MPI_INT, node, TAG_TREE_STRINGS_SIZE, MPI_COMM_WORLD);
+	MPI_Send(tree_strings, buf_size, MPI_CHAR, node, TAG_TREE_STRINGS, MPI_COMM_WORLD);
+
+	return 0;
+}
+
+int ReceiveParams(Parameters* params_, int node)	{
+	Parameters& params = *params_;
+
+    int size;
+    MPI_Status status;
+	
+	MPI_Recv(&size, 1, MPI_INT, node, TAG_PARAMS_SIZE, MPI_COMM_WORLD, &status);
+	char* buf = new char[size];
+	MPI_Recv(buf, size, MPI_CHAR, node, TAG_PARAMS, MPI_COMM_WORLD, &status);
+
+	params.Deserialize(buf);
+
+	delete [] buf;
+
+	return 0;
+}
+
+int ReceiveData(NucleotideData* data_, int node)	{
+	NucleotideData& data = *data_;
+
+    int size;
+    MPI_Status status;
+
+	MPI_Recv(&size, 1, MPI_INT, node, TAG_DATA_SIZE, MPI_COMM_WORLD, &status);
+	char* buf = new char[size];
+	MPI_Recv(buf, size, MPI_CHAR, node, TAG_DATA, MPI_COMM_WORLD, &status);
+
+	data.Deserialize(buf, size);
+
+	delete [] buf;
+
+	return 0;
+}
+
+int debug_mpi(const char* fmt, ...)	{
+	static bool first_call = true;
+	static int rank;
+	static char fname[13];
+
+	if (first_call)	{
+		MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+		if (rank < 10)
+			sprintf(fname, "node0%d.log", rank);
+		else
+			sprintf(fname, "node%d.log", rank);
+		fhandle = fopen(fname, "w");
+		first_call = false;
+	}
+	if(g_sw != NULL)
+		fprintf(fhandle, "g %d, t %d: ", (g_gen && *g_gen != 0 ? *g_gen : -1), g_sw->SplitTime());
+	else 
+		fprintf(fhandle, "g %d, t %d: ", (g_gen && *g_gen != 0 ? *g_gen : -1), 0);
+	va_list vl;
+	va_start(vl, fmt);
+	vfprintf(fhandle, fmt, vl);
+	va_end(vl);
+	fprintf(fhandle, "\n");
+
+	fflush(fhandle);
+
+	return 0;
+}
+
+int TransLog(int to_who_or_count, int nindivs, int n, char* str_out, int m, char* str_in, int* to_send, int* to_replace, double* old_scores, double* new_scores)	{
+
+	char fname[64];
+	char temp_buf[64];
+	int rank;
+	static int* counts;
+	static bool first_call = true;
+	
+	MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+	
+	if (first_call && rank == 0)	{
+		int nprocs;
+		MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
+		counts = new int[nprocs];  // yeah yeah, so i'm never deallocating this.  it'll be free'd when the process ends....=)
+		memset(counts, 0, sizeof(int)*nprocs);
+	}
+	
+	if (rank < 10)
+		sprintf(fname, "trans0%d.log", rank);
+	else
+		sprintf(fname, "trans%d.log", rank);
+	
+	FILE* translog;
+	if (first_call)	{
+		translog = fopen(fname, "w");
+		first_call = false;
+	}
+	else
+		translog = fopen(fname, "a");
+	assert(translog);
+	
+	if (rank == 0)
+		sprintf(temp_buf, "%d-%d", to_who_or_count, counts[to_who_or_count]++);
+	else
+		sprintf(temp_buf, "%d-%d", rank, to_who_or_count);
+		
+	fprintf(translog, "transmission %s\n", temp_buf);
+	
+	fprintf(translog, "send count = %d\n", n);
+	for (int j = 0; j < n; ++j)	{
+		fprintf(translog, "%s\n", str_out);
+		str_out += strlen(str_out) + 1;
+	}
+	
+	fprintf(translog, "recv count = %d\n", m);
+	for (int j = 0; j < m; ++j)	{
+		fprintf(translog, "%s\n", str_in);
+		str_in += strlen(str_in) + 1;
+	}
+	
+	fprintf(translog, "indivs sent =");
+	for (int j = 0; j < n; ++j)	{
+		fprintf(translog, " %d", to_send[j]);
+	}
+	fprintf(translog, "\n");
+	
+	fprintf(translog, "indivs replaced =");
+	for (int j = 0; j < m; ++j)	{
+		fprintf(translog, " %d", to_replace[j]);
+	}
+	fprintf(translog, "\n");
+	
+	fprintf(translog, "old scores\n");
+	for (int j = 0; j < nindivs; ++j)
+		fprintf(translog, "%f\n", old_scores[j]);
+		
+	fprintf(translog, "new scores\n");
+	for (int j = 0; j < nindivs; ++j)
+		fprintf(translog, "%f\n", new_scores[j]);
+	
+	fprintf(translog, "\n");
+	fflush(translog);
+	fclose(translog);
+	return 0;
+}
+
+int RecvMPIMessage(char** buf_, int* size_, int* who_, int* tag_, bool block)	{
+	int& who = *who_;
+	int& tag = *tag_;
+	int& size = *size_;
+	char*& buf = *buf_;
+	
+	int flag;
+	MPI_Status status;
+	
+	MPI_Iprobe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, &status);
+	
+	if (flag == 0)	{
+		if (block == false)
+			return 0;
+		else
+			MPI_Probe(MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &status);
+	}
+
+	MPI_Get_count(&status, MPI_CHAR, &size);
+	buf = new char[size];
+	MPI_Recv(buf, size, MPI_CHAR, status.MPI_SOURCE, status.MPI_TAG, MPI_COMM_WORLD, &status);
+	who = status.MPI_SOURCE;
+	tag = status.MPI_TAG;
+	
+	return 1;
+}
+
+int RecvMPIMessage(char** buf_, int* size_, int who, int* tag_, bool block)	{
+	int& tag = *tag_;
+	int& size = *size_;
+	char*& buf = *buf_;
+	
+	int flag;
+	MPI_Status status;
+	
+	MPI_Iprobe(who, MPI_ANY_TAG, MPI_COMM_WORLD, &flag, &status);
+	
+	if (flag == 0)	{
+		if (block == false)
+			return 0;
+		else
+			MPI_Probe(who, MPI_ANY_TAG, MPI_COMM_WORLD, &status);
+	}
+
+	MPI_Get_count(&status, MPI_CHAR, &size);
+	buf = new char[size];
+	MPI_Recv(buf, size, MPI_CHAR, who, status.MPI_TAG, MPI_COMM_WORLD, &status);
+	tag = status.MPI_TAG;
+	
+	return 1;
+}
+
+int RecvMPIMessage(char** buf_, int* size_, int* who_, int tag, bool block)	{
+	int& who = *who_;
+	int& size = *size_;
+	char*& buf = *buf_;
+	
+	int flag;
+	MPI_Status status;
+	
+	MPI_Iprobe(MPI_ANY_SOURCE, tag, MPI_COMM_WORLD, &flag, &status);
+	
+	if (flag == 0)	{
+		if (block == false)
+			return 0;
+		else
+			MPI_Probe(MPI_ANY_SOURCE, tag, MPI_COMM_WORLD, &status);
+	}
+
+	MPI_Get_count(&status, MPI_CHAR, &size);
+	buf = new char[size];
+	MPI_Recv(buf, size, MPI_CHAR, status.MPI_SOURCE, tag, MPI_COMM_WORLD, &status);
+	who = status.MPI_SOURCE;
+	
+	return 1;
+}
+
+int RecvMPIMessage(char** buf_, int* size_, int who, int tag, bool block)	{
+	int& size = *size_;
+	char*& buf = *buf_;
+	
+	int flag;
+	MPI_Status status;
+	
+	MPI_Iprobe(who, tag, MPI_COMM_WORLD, &flag, &status);
+	
+	if (flag == 0)	{
+		if (block == false)
+			return 0;
+		else
+			MPI_Probe(who, tag, MPI_COMM_WORLD, &status);
+	}
+
+	MPI_Get_count(&status, MPI_CHAR, &size);
+	buf = new char[size];
+	MPI_Recv(buf, size, MPI_CHAR, who, tag, MPI_COMM_WORLD, &status);
+	
+	return 1;
+}
+
+int SendMPIMessage(char* buf, int size, int who, int tag)	{
+	return MPI_Send(buf, size, MPI_CHAR, who, tag, MPI_COMM_WORLD);
+}
+
+int LogConfig(const GeneralGamlConfig& conf)	{
+	debug_mpi("logging GamlConfig structure...");
+	
+	debug_mpi("[general]");
+	debug_mpi("logevery = %d", conf.logevery);
+	debug_mpi("saveevery = %d", conf.saveevery);
+	debug_mpi("datafname = %s", conf.datafname.c_str());
+	debug_mpi("streefname = %s", conf.streefname.c_str());
+	debug_mpi("ofprefix = %s", conf.ofprefix.c_str());
+	
+	debug_mpi("[master]");
+	debug_mpi("holdover = %d", conf.holdover);
+	debug_mpi("nindivs = %d %d", conf.min_nindivs, conf.max_nindivs);
+	debug_mpi("stopgen = %d", conf.stopgen);
+	
+	debug_mpi("[remote]");
+	debug_mpi("holdover = %d", conf.holdover);
+	debug_mpi("nindivs = %d %d", conf.min_nindivs, conf.max_nindivs);
+	debug_mpi("stopgen = %d", conf.stopgen);
+	
+	debug_mpi("done logging GamlConfig structure");
+	return 0;
+}
+
+int LogParams(const Parameters& params)	{
+	debug_mpi("logging Parameters (partial) structure...");
+	debug_mpi("holdover = %d", params.holdover);
+	debug_mpi("nindivs = %d", params.nindivs);
+	debug_mpi("randomSeed = %d", params.randomSeed);
+	return 0;
+}
+
+int LogTreeStrings(const char* tree_strings)	{
+	int count = 0;
+	const char* p = tree_strings;
+	while (*p)	{
+		p += strlen(p) + 1;
+		++count;
+	}
+	debug_mpi("%d tree strings:", count);
+	p = tree_strings;
+	while (*p)	{
+		debug_mpi("%s", p);
+		p += strlen(p) + 1;
+	}
+	return 0;
+}
+
+int LogKappas(const double* kappa_probs, const int count)	{
+	debug_mpi("%d kappa probs:", count);
+	for (int i = 0; i < count; ++i)
+		debug_mpi("%f", kappa_probs[i]);
+	return 0;
+}
+
+int LogPis(const double* pis, const int count)	{
+	debug_mpi("%d pis:", count);
+	for (int i = 0; i < count; ++i)
+		for(int b=0;b<4;b++)
+			debug_mpi("%f, ", pis[i*4+b]);
+	return 0;
+}
+
+int CountTreeStrings(char* p)	{
+	int count = 0;
+	while (*p)	{
+		p += strlen(p) + 1;
+		++count;
+	}
+	return count;
+}
+
+// string length for a string that is terminated by a double null
+int strlen2(char* p)	{
+	int count = 0;
+	while (*p || *(p+1))	{
+		++count;
+		++p;
+	}
+	return count;
+}
+
+int CalcMaxIndivs(const NucleotideData& data, int mem)	{
+	const int KB = 1024;
+	const int MB = KB*KB;
+	int sizeof_treenode = 4*data.NChar()*sizeof(double);
+	debug_mpi("sizeof_treenode = %d", sizeof_treenode);
+	int num_internal_treenode_per_indiv = data.NTax()-2;
+	int size_of_terminal_indivs=sizeof(int) * data.NChar();
+	debug_mpi("num_internal_treenode_per_indiv = %d", num_internal_treenode_per_indiv);
+	int sizeof_indiv = sizeof_treenode*num_internal_treenode_per_indiv*2;
+	sizeof_indiv+=size_of_terminal_indivs*data.NTax();
+	debug_mpi("sizeof_indiv = %d", sizeof_indiv);
+	debug_mpi("retval = %d", mem*MB / sizeof_indiv);
+	return mem*MB / sizeof_indiv;
+}
+
+int RemoteShieldedMigrants(Population& pop, const GeneralGamlConfig& conf)	{
+/*	int size, rank, nprocs, count = conf.numshields, restart_count = 0;
+	int *which = new int[count];
+	char *tree_strings, fname[64];
+	double *models, old_score;
+	
+	MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+	MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
+	if (rank < 10)	sprintf(fname, "log0%d.log", rank);
+	else	sprintf(fname, "log%d.log", rank);
+	
+	pop.CalcAverageFitness();
+	old_score = pop.bestFitness;
+	
+	//start the tree log file
+	pop.CreateTreeLog(rank);
+	
+	for (pop.gen = 1; pop.gen < conf.stopgen; ++pop.gen)	{
+		if (pop.gen % conf.repeatthresh == 0)	{
+			if (pop.bestFitness - old_score <= conf.scorethresh)	{
+				debug_mpi("repeat thresh=%d", conf.repeatthresh); 
+				debug_mpi("score threshold exceeded, restarting population (%f, %f)", old_score, pop.bestFitness);
+				pop.Restart(1, rank, nprocs, restart_count++);	
+				pop.CalcAverageFitness();
+			}
+			old_score = pop.bestFitness;
+		}
+		if (pop.gen % conf.logevery == 0)
+			pop.Log(fname, 0.0);
+		if (pop.gen % conf.interval == 0)	{
+
+			//Check for a message to change remote type
+			int tag;
+			RecvMPIMessage(&tree_strings, &size, 0, &tag, false);
+			if(tag == TAG_REMOTE_TYPE_SWITCH){
+				//call RemoteAlphaMaleReplication
+				debug_mpi("\tchanging remote type to AMR...\n");
+				RemoteAlphaMaleReplication(pop, conf);
+				return 0;//if we return from RemoteAMR, everything must be done, so return
+				}
+		
+			debug_mpi("STARTING SYNCHRONOUS COMMUNICATION (node %d)", 0);
+			pop.GetNBestIndivIndices(&which, count);
+			//pop.GetNRandomIndivIndices(&which, conf.numshieldedpernode);  // alternatively
+			pop.GetSpecifiedTreeStrings(&tree_strings, count, which);
+			SendMPIMessage(tree_strings, strlen2(tree_strings)+2, 0, TAG_TREE_STRINGS);
+			
+			int model_size=pop.GetSpecifiedModels(&models, count, which);
+			SendMPIMessage((char*) models, count*sizeof(double)*model_size, 0, TAG_MODEL);
+						
+			debug_mpi("\tsent: %d tree strings", count);
+			debug_mpi("\tsent: %d models, size: %d", count, model_size);
+						
+			delete [] tree_strings;
+			delete [] models;
+		
+		}
+		//adding this to make log files of trees for each population
+//		if(pop.gen % pop.params->saveEvery == 0) pop.AppendTreeToTreeLog( rank );
+		pop.NextGeneration();
+		pop.OutputFate();
+	}
+	SendMPIMessage(NULL, 0, 0, TAG_QUIT);
+	debug_mpi("STARTING SYNCHRONOUS COMMUNICATION (node %d)", 0);
+	debug_mpi("\tsent: quit message");
+	delete [] which;
+	// TODO what to do on quit?
+	debug_mpi("quitting");
+*/	return 0;
+}
+/*
+int RemoteAlphaMaleReplication(Population& pop, const GeneralGamlConfig& conf)	{
+	int which, *all, size, rank, tag;
+	char *tree_strings, *buf;
+	double score, *models;
+	char fname[32];
+	
+	all = new int[pop.params->nindivs];
+	for (int i = 0; i < pop.params->nindivs; ++i)
+		all[i] = i;
+
+	MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+	if (rank < 10) sprintf(fname, "log0%d.log", rank);
+	else sprintf(fname, "log%d.log", rank);
+		
+	pop.CalcAverageFitness();
+
+	for (pop.gen = 1; pop.gen < conf.stopgen; ++pop.gen)	{
+		if (pop.gen % conf.logevery == 0)
+			pop.OutputLog();
+		if (pop.gen % conf.interval == 0)	{
+			debug_mpi("STARTING SYNCHRONOUS COMMUNICATION (node 0)");
+			score = pop.bestFitness;
+			SendMPIMessage((char*)&score, sizeof(double), 0, TAG_SCORE);
+			debug_mpi("\tsend: score = %f", score);
+			RecvMPIMessage(&tree_strings, &size, 0, &tag);
+			if (tag == TAG_TREE_STRINGS_REQUEST)	{
+				debug_mpi("\trecv: tree strings request");
+				which = (int)pop.cumfit[pop.total_size-1][0];
+				pop.GetSpecifiedTreeStrings(&tree_strings, 1, &which);
+				SendMPIMessage(tree_strings, strlen2(tree_strings)+2, 0, TAG_TREE_STRINGS);
+				
+				int model_size=pop.GetSpecifiedModels(&models, 1, &which);
+				SendMPIMessage((char*)models, sizeof(double)*model_size, 0, TAG_MODEL);
+				
+				debug_mpi("\tsend: %d tree string", 1);
+				debug_mpi("\tsend: %d models, size:%d", 1, model_size*sizeof(double));	
+	
+				delete [] tree_strings;
+				delete [] models;
+			}
+			else if (tag == TAG_TREE_STRINGS)	{
+				debug_mpi("\trecv: %d tree strings", CountTreeStrings(tree_strings));
+				RecvMPIMessage(&buf, &size, 0, TAG_MODEL);
+				models=(double*) buf;
+
+				pop.ReplicateSpecifiedIndividuals(pop.total_size, all, tree_strings, models);
+				pop.CalcAverageFitness();
+				delete [] tree_strings;
+				delete [] models;
+			}
+			else	{
+				debug_mpi("alpha male replication recved bad message tag");
+				assert(false);
+			}
+		}
+		//adding this to make log files of trees for each population
+//		if(pop.gen % pop.params->saveEvery == 0) pop.AppendTreeToTreeLog( rank );
+	//	if(pop.gen % 100) pop.NNIoptimization();
+		pop.NextGeneration();
+		pop.OutputFate();
+	}
+	debug_mpi("sending quit message");
+	SendMPIMessage(NULL, 0, 0, TAG_QUIT);
+	delete [] all;
+	return 0;
+}
+*/
+
+void RemoteSendBestTree(Population& pop){
+	int *which=new int;
+	char *tree_strings;
+	double *models;
+	
+	pop.GetNBestIndivIndices(&which, 1);
+	pop.GetSpecifiedTreeStrings(&tree_strings, 1, which);
+	int size=strlen2(tree_strings)+2;
+//	debug_mpi("about to send treestrings...");
+	SendMPIMessage(tree_strings, size, 0, TAG_TREE_STRINGS);
+	debug_mpi("\tsent ind %d, lnL %f", *which, pop.indiv[*which].Fitness());
+//	debug_mpi("about to send modelstrings...");
+	int model_size=pop.GetSpecifiedModels(&models, 1, which);
+	SendMPIMessage((char*) models, sizeof(double)*model_size, 0, TAG_MODEL);
+//	debug_mpi("about to send subdef...");
+	char std[5];
+	sprintf(std, "%d", pop.subtreeDefNumber);
+	SendMPIMessage(std, strlen(std)+2, 0, TAG_SUBTREE_ITERATION);
+	
+	if(pop.subtreeDefNumber!=0){
+		char stn[10];
+		sprintf(stn, "%d", pop.subtreeNode);
+		SendMPIMessage(stn, strlen(stn)+2, 0, TAG_SUBTREE_DEFINE);
+		debug_mpi("\tvalid for subtree def %d, node %d", pop.subtreeDefNumber, pop.subtreeNode);
+		}
+	else
+		debug_mpi("\tno defined subtree");
+		
+	//finally, send the score
+	double score = pop.indiv[*which].Fitness();
+	SendMPIMessage((char*)&score, sizeof(double), 0, TAG_SCORE);	
+	
+	delete which;
+	delete [] tree_strings;
+	delete [] models;
+	}
+	
+
+
+int RemoteSubtreeWorker(Population& pop, const GeneralGamlConfig& conf){
+	int *which, size, rank, tag;
+	char *tree_strings, *buf;
+	double score, *models;
+	bool perturb;
+	
+	which=new int[5];
+	
+	MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+		
+	pop.CalcAverageFitness();
+
+	int lastSend=g_sw->SplitTime();	
+
+	cout << "Remote number " << rank << " running..." << endl;
+
+	for (pop.gen = 1; pop.gen < conf.stopgen;){
+
+		pop.keepTrack();
+		pop.OutputFate();
+		if (pop.gen % conf.logevery == 0)
+			pop.OutputLog();
+		++pop.gen;
+		pop.NextGeneration();
+
+	           if(pop.gen % pop.adap->intervalLength == 0){
+	                bool reduced=false;
+	                if(pop.gen-pop.lastTopoImprove >= pop.adap->intervalsToStore*pop.adap->intervalLength){
+	                   reduced=pop.adap->ReducePrecision();
+	                   }
+	                if(reduced){
+	                   pop.lastTopoImprove=pop.gen;
+	                   pop.indiv[pop.bestIndiv].treeStruct->OptimizeAllBranches(pop.adap->branchOptPrecision);
+	                   pop.indiv[pop.bestIndiv].SetDirty();
+	                   pop.CalcAverageFitness();
+	                        }
+/*	                 else if(!(pop.gen%(pop.adap->intervalLength*pop.adap->intervalsToStore))){
+	                        pop.indiv[pop.bestIndiv].treeStruct->OptimizeAllBranches(pop.adap->branchOptPrecision);
+	                        pop.indiv[pop.bestIndiv].SetDirty();
+	                        pop.CalcAverageFitness();
+	                        }
+*/					}
+			
+
+
+		if(g_sw->SplitTime() - lastSend > conf.sendInterval){
+			debug_mpi("SYNCH COMM (node 0)");
+			//send our best individual to the master
+			RemoteSendBestTree(pop);		
+			lastSend=g_sw->SplitTime();
+			if(pop.params->stoptime - g_sw->SplitTime() < 0){
+				debug_mpi("time limit of %d seconds reached...", pop.params->stoptime);
+				break;
+				}
+			}
+		//Check for a new tree from the master
+		bool firstmessage=true;
+		bool gotmessage=false;
+		int subtreeNode;
+		while(RecvMPIMessage(&tree_strings, &size, 0, &tag, false)==true){
+			//check for a quit message
+			if(tag == TAG_QUIT) {
+				debug_mpi("\trecv: quit message");
+				delete [] which;
+				debug_mpi("quitting");
+				return 0;	
+				}
+			//
+			bool gotNewIndiv=false;
+			int recievedDefNumber;
+			debug_mpi("SYNCH COMM (node 0)");
+			gotmessage=true;
+			assert(tag == TAG_TREE_STRINGS || tag==TAG_PERTURB);
+			if(firstmessage==false) debug_mpi("\tfound a newer message...");
+			if(tag != TAG_PERTURB){
+				gotNewIndiv=true;
+				RecvMPIMessage(&buf, &size, 0, &tag, true);
+				assert(tag == TAG_MODEL);
+				models=(double*) buf;
+			
+				debug_mpi("\tgot new ind" );
+				RecvMPIMessage(&buf, &size, 0, &tag, true);
+		
+	//		if(tag != TAG_PERTURB){
+				perturb=false;
+				assert(tag == TAG_SUBTREE_DEFINE);
+				subtreeNode=atoi(buf);
+				if(subtreeNode!=0){
+					delete []buf;
+					RecvMPIMessage(&buf, &size, 0, &tag, true);
+					assert(tag == TAG_SUBTREE_ITERATION);
+					recievedDefNumber=atoi(buf);
+					debug_mpi("\tworking on subtree def %d, node %d", recievedDefNumber, subtreeNode);
+					}
+				else recievedDefNumber=0;
+				}
+			else{
+				pop.pertMan->pertType=atoi(tree_strings);
+				perturb=true;
+				}	
+			
+			//if the current best and the new tree are either both accurate for the same subtree def or both
+			//inaccurate for subtrees, just replace the worst individual, rather than the
+			// whole pop, that way if the tree is old and worse that what the remote
+			// already has it won't matter
+			if(gotNewIndiv){
+				*which=(int)pop.cumfit[0][0];
+				debug_mpi("\treplacing indiv %d", *which);
+				pop.ReplaceSpecifiedIndividuals(1, which, tree_strings, models);
+				if(recievedDefNumber!=pop.subtreeDefNumber || (pop.subtreeNode!=0 && subtreeNode!=0)){
+					pop.AssignSubtree(subtreeNode, *which);
+					pop.CalcAverageFitness();
+					debug_mpi("\tfilling pop with clones of %d", *which);
+					pop.SetNewBestIndiv(*which);
+					pop.FillPopWithClonesOfBest();
+					pop.subtreeDefNumber=recievedDefNumber;
+					}
+
+				delete [] models;
+				delete [] buf;
+				}
+#ifdef INCLUDE_PERTURBATION
+			if(perturb==true){
+				pop.CalcAverageFitness();
+				if(pop.pertMan->pertType==1){
+					debug_mpi("peforming NNI perturbation...");
+					int toReplace=(pop.bestIndiv == 0 ? 1 : 0);
+					pop.AppendTreeToTreeLog(-1, pop.bestIndiv);
+					pop.NNIPerturbation(pop.bestIndiv, toReplace);
+					pop.SetNewBestIndiv(toReplace);
+					pop.FillPopWithClonesOfBest();
+					pop.AppendTreeToTreeLog(-1, pop.bestIndiv);
+					}
+				else if(pop.pertMan->pertType==2){
+					debug_mpi("peforming SPR perturbation...");
+					int toReplace=(pop.bestIndiv == 0 ? 1 : 0);
+					pop.AppendTreeToTreeLog(-1, pop.bestIndiv);
+					pop.SPRPerturbation(pop.bestIndiv, toReplace);
+					pop.SetNewBestIndiv(toReplace);
+					pop.FillPopWithClonesOfBest();
+					pop.AppendTreeToTreeLog(-1, pop.bestIndiv);
+					}
+				else assert(0);
+				}				
+#endif
+
+			delete [] tree_strings;
+			tag=0;
+			firstmessage=false;
+			}
+		if(gotmessage==true){
+//			if(pop.subtreeNode != subtreeNode) pop.AssignSubtree(subtreeNode);
+			pop.CalcAverageFitness();
+			debug_mpi("\tbest score= %f", pop.indiv[*which].Fitness());
+			pop.AppendTreeToTreeLog(-1, *which);
+			}
+		}
+
+	SendMPIMessage(NULL, 0, 0, TAG_QUIT);
+	debug_mpi("\tsent: quit message");
+	delete [] which;
+	pop.FinalizeOutputStreams();
+	debug_mpi("quitting");
+	return 0;
+	}
+
+
+
+#endif // #ifdef MPI_VERSION
+
diff --git a/src/mpifuncs.h b/src/mpifuncs.h
new file mode 100644
index 0000000..f566a1a
--- /dev/null
+++ b/src/mpifuncs.h
@@ -0,0 +1,82 @@
+// GARLI version 0.93 source code
+// Copyright  2005 by Derrick J. Zwickl
+// All rights reserved.
+//
+// This code may be used and modified for non-commercial purposes
+// but redistribution in any form requires written permission.
+// Please contact:
+//
+//  Derrick Zwickl
+//	Integrative Biology, UT
+//	1 University Station, C0930
+//	Austin, TX  78712
+//  email: garli.support at gmail.com
+//
+//	Note: In 2006  moving to NESCENT (The National
+//	Evolutionary Synthesis Center) for a postdoc
+
+#ifdef MPI_VERSION
+
+#ifndef MPIFUNCS_H
+#define MPIFUNCS_H
+
+#include "configoptions.h"
+#include "sequencedata.h"
+#include "parameters.h"
+#include "population.h"
+#include "threaddcls.h"
+
+int MPIMain(int arc, char** argv);
+
+int StartProcs(const GeneralGamlConfig&, NucleotideData&);
+
+int MasterMaster(MasterGamlConfig&, NucleotideData&);
+int RemoteMaster(GeneralGamlConfig&, NucleotideData&);
+int MasterFullDuplexExchange(Population& pop, const MasterGamlConfig& conf);
+int RemoteFullDuplexExchange(Population& pop, const GeneralGamlConfig& conf);
+int MasterShieldedMigrants(Population& pop, const MasterGamlConfig& conf);
+int RemoteShieldedMigrants(Population& pop, const GeneralGamlConfig& conf);
+int RemoteAlphaMaleReplication(Population& pop, const GeneralGamlConfig& conf);
+
+
+int RemoteSubtreeWorker(Population& pop, const GeneralGamlConfig& conf);
+int MasterAlphaMaleReplication(Population& pop, const MasterGamlConfig& conf);
+int MasterHybrid(Population& pop, const MasterGamlConfig& conf);	
+int MasterLastCall(Population& pop, int master_mem);
+
+//int DoMasterSM(Population& pop, const GamlConfig& conf, int who, transferred_data_t results);
+//int DoMasterAMR(Population& pop, const GamlConfig& conf, int who, transferred_data_t results);
+
+int CalcMaxIndivs(const NucleotideData&, int);
+
+// buf, size in bytes, from, tag, blocking
+int RecvMPIMessage(char**, int*, int*, int*, bool block = true);
+int RecvMPIMessage(char**, int*, int, int*, bool block = true);
+int RecvMPIMessage(char**, int*, int*, int, bool block = true);
+int RecvMPIMessage(char**, int*, int, int, bool block = true);
+// buf, size, to, tag
+int SendMPIMessage(char*, int, int, int);
+
+int PollForResults(int nodes[]);
+bool PollForResults(int n);
+
+int GetResultsFromNode(int node_num, int* nindivs_, char** tree_strings_);
+int SendResultsToNode(int node, int n, char* tree_strings);
+
+int ReceiveParams(Parameters* params_, int node);
+int ReceiveData(NucleotideData* data_, int node);
+
+int debug_mpi(const char* fmt, ...);
+int LogConfig(const GeneralGamlConfig&);
+int LogParams(const Parameters& params);
+int LogTreeStrings(const char* tree_strings);
+int LogKappas(const double* kappa_probs, const int count);
+int LogPis(const double* pis, const int count);
+int TransLog(int count, int nindivs, int n, char* str_out, int m, char* str_in, int* to_send, int* to_replace, double* old_scores, double* new_scores);
+
+int strlen2(char* p);
+int CountTreeStrings(char* p);
+
+#endif
+
+#endif
diff --git a/src/mpitrick.cpp b/src/mpitrick.cpp
new file mode 100644
index 0000000..c1f87fa
--- /dev/null
+++ b/src/mpitrick.cpp
@@ -0,0 +1,287 @@
+// GARLI version 1.00 source code
+// Copyright 2005-2010 Derrick J. Zwickl
+// email garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#if defined(SUBROUTINE_GARLI) || defined(OLD_SUBROUTINE_GARLI)
+
+#include "mpi.h"
+#include <iostream>
+#include <stdlib.h>
+#include <stdio.h>
+#include "defs.h"
+#include "string.h"
+#include <time.h>
+#include "funcs.h"
+#include "outputman.h"
+
+using namespace std;
+
+int SubGarliMain(int);
+
+void UsageMessage(char *execName);
+
+extern OutputManager outman;
+
+//old (parallel batch) and new (parallel replicates) mpi behavior now rolled into a single function
+
+#if(1)
+int jobloop(int, int, MPI_Comm, int numJobs);
+
+string MyFormattedTime(){
+	time_t rawtime;
+	struct tm * timeinfo;
+	time(&rawtime);
+	timeinfo = localtime(&rawtime);
+	string s = asctime(timeinfo);
+	s.erase(s.end()-1, s.end());
+	return s;
+	}
+
+int main(int argc,char **argv){
+
+  if(argc == 2){
+	if(!strcmp(argv[1], "--help") || !strcmp(argv[1], "--h") || !strcmp(argv[1], "-help") || !strcmp(argv[1], "-h")){
+		UsageMessage(argv[0]);
+		return 0;
+		}
+	}
+
+  int rc = MPI_Init(&argc,&argv); 
+  if(rc != MPI_SUCCESS){
+	outman.SetLogFile("mpi_messages.log");
+    	outman.UserMessage("Error starting MPI.  Terminating.");
+	MPI_Abort(MPI_COMM_WORLD, rc);
+	}
+
+  MPI_Comm comm,mycomm; 
+  int nproc, rank;
+  comm = MPI_COMM_WORLD;
+  MPI_Comm_size(comm,&nproc);
+  MPI_Comm_rank(comm,&rank);
+
+  timespec wait;
+  int numJobsTotal = 0;
+  
+  if(rank == 0){
+    	outman.SetLogFile("mpi_messages.log");
+	outman.UserMessageNoCR("MPI Garli started with command line: ");
+	for(int i=0;i<argc;i++) outman.UserMessageNoCR("%s ", argv[i]);
+        outman.UserMessage("\n");
+#ifdef OLD_SUBROUTINE_GARLI
+        outman.UserMessage("This is the original batch MPI GARLI version.  It expects a series of configuration");
+        outman.UserMessage("files named \"run0.conf\", \"run1.conf\", etc.  If no number is passed on the command");
+        outman.UserMessage("line after the executable name, then it assumes that the # configs = # processors.");
+        outman.UserMessage("Otherwise it looks for the specified number of configs.\n");
+
+	if(argc > 1){
+		if(! isdigit(argv[1][0])){
+			outman.UserMessage("***ERROR***:GARLI is expecting <exe> <total # configs>\n\tor\n\t<exe> <nothing>\n\tGot <exe> %s", argv[1]);
+			UsageMessage(argv[0]);
+			MPI_Finalize();
+			return 1;
+			}
+		else numJobsTotal = atoi(argv[1]);
+		}
+	else numJobsTotal = nproc;
+#else
+	if(argc == 1 || (argv[1][0] != '-' && !isdigit(argv[1][0]))){
+		outman.UserMessage("***ERROR***:Garli is expecting the number of jobs to be run to follow\n\tthe executable name on the command line\n");
+		UsageMessage(argv[0]);
+		MPI_Finalize();
+		return 1;
+		}
+	else{
+		if(argv[1][0] == '-') numJobsTotal = atoi(&argv[1][1]);
+		else numJobsTotal = atoi(&argv[1][0]);
+		}
+#endif
+  	outman.UserMessage("#####%d total executions of the config file were requested######", numJobsTotal);
+	}
+  else{//wait a moment for proc 0 to output to the messages file, then attach to the stream
+	wait.tv_sec = 1;
+	wait.tv_nsec=0;
+	nanosleep(&wait, NULL);
+	outman.SetLogFileForAppend("mpi_messages.log");
+	}
+ 
+ 
+ //These barriers really shouldn't be necessary, but adding them seemed to resolve a weird issue that Jelesko
+ //was having where processes with rank >= 8 were hanging in the Bcast until some of the first 8 were completely 
+ //finished and returned from the job loop
+  //outman.UserMessage("#####Process %d approaching barrier 1 at %s######", rank, MyFormattedTime().c_str());
+  MPI_Barrier(comm);
+  //outman.UserMessage("#####Process %d passed barrier 1 at %s######", rank, MyFormattedTime().c_str());
+ 
+//send all of the processors the number of jobs total
+  MPI_Bcast(&numJobsTotal, 1, MPI_INT, 0, comm);
+
+//  outman.UserMessage("#####Process %d passed broadcast, approaching barrier 2 at %s######", rank, MyFormattedTime().c_str());
+  MPI_Barrier(comm);
+//  outman.UserMessage("#####Process %d passed barrier 2 at %s######", rank, MyFormattedTime().c_str());
+
+//DEBUG
+  //if startjob lockfiles exist at this point that must mean that a previous run bailed.  Remove them.
+  //Then processes will start those same runs and possibly restart from checkpoint (if any were being 
+  //written and restart=1 was specified).  Otherwise they will just start them over.
+  if(rank == 0){
+	for(int j = 0;j < numJobsTotal;j++){
+		char startfile[100], donefile[100];
+		sprintf(startfile, ".s-lock%d", j);
+		sprintf(donefile, ".d-lock%d", j);
+		if(FileExists(donefile)){
+			outman.UserMessage("It appears that run %d was completed in a previous MPI invocation.\n\tRun %d will not be re-run unless the hidden file \"%s\" and any checkpoint files for this run (if present) are deleted from this directory.", j, j, donefile);
+			}
+		else if(FileExists(startfile)){
+			outman.UserMessage("It appears that run %d was started but not completed in a previous MPI invocation.\n\tRun %d will either be re-run or restarted from a checkpoint (if restart = 1 was specified in the GARLI config file).", j, j);
+			remove(startfile);
+			}
+  		}
+	}
+
+  int jobsCompleted = jobloop(rank,nproc,mycomm,numJobsTotal);
+  outman.SetLogFileForAppend("mpi_messages.log");
+  if(jobsCompleted > -1){
+#ifdef OLD_SUBROUTINE_GARLI
+ 	outman.UserMessage("process %d finished, did %d run(s), no more configs to execute at %s. Waiting for other procs...", rank, jobsCompleted,  MyFormattedTime().c_str());
+#else
+ 	outman.UserMessage("process %d finished, did %d run(s), no further runs to do at %s. Waiting for other procs...", rank, jobsCompleted,  MyFormattedTime().c_str());
+#endif
+	}
+
+  MPI_Barrier(comm);
+  if(rank == 0)  outman.UserMessage("all processes completed at %s", MyFormattedTime().c_str());
+  else nanosleep(&wait, NULL);//this is just to keep proper ordering in the output file
+ 
+  outman.UserMessage("process %d terminating", rank);
+  
+//Not sure if deleting lock files should or should not be done.
+/*  if(rank == 0){
+	char temp[100];
+	for(int i=0;i<numJobsTotal;i++){
+		sprintf(temp, ".lock%d", i);
+		remove(temp);
+		}
+	}
+  */
+  MPI_Finalize();
+  return 0;
+}
+
+int jobloop(int mytid,int ntids,MPI_Comm comm, int numJobs){
+
+	//to start off with each process takes the run = to its tid
+	int jobNum=mytid;	
+	char temp[100];
+	int jobsCompleted = 0;
+
+#ifdef SUBROUTINE_GARLI
+	//this wait ensures that two runs don't start with the same seed
+	timespec wait;
+	wait.tv_sec = mytid * 2;
+	wait.tv_nsec=0;
+	nanosleep(&wait, NULL);
+#endif
+	while(jobNum < numJobs){
+		//DEBUG
+		//sprintf(temp, ".lock%d", jobNum);
+		ofstream lock;
+		char startfile[100], donefile[100];
+		sprintf(startfile, ".s-lock%d", jobNum);
+		sprintf(donefile, ".d-lock%d", jobNum);
+		//DEBUG
+		
+		if(FileExists(donefile) || FileExists(startfile)) jobNum++;
+		else{
+			lock.open(startfile);
+			lock.close();
+			outman.SetLogFileForAppend("mpi_messages.log");
+			outman.UserMessage("process %d starting run %d at %s", mytid, jobNum, MyFormattedTime().c_str());
+			int err = SubGarliMain(jobNum);
+			if(err){
+				outman.SetLogFileForAppend("mpi_messages.log");
+				outman.UserMessage("***process %d aborted run %d at %s", mytid, jobNum, MyFormattedTime().c_str());
+				outman.UserMessage("\tsee the <filename>.screen.log files for details on what went wrong");
+				return -1;
+				}
+			jobsCompleted++;
+			lock.open(donefile);
+			lock.close();
+			remove(startfile);
+			jobNum++;
+			}
+		}
+	return jobsCompleted;
+}
+
+#elif defined(__OLD_SUBROUTINE_GARLI)
+void jobloop(int, int, MPI_Comm, int numJobs=-1);
+
+int main(int argc,char **argv) {
+
+	MPI_Comm comm,mycomm; int ntids,mytid;
+	MPI_Init(&argc,&argv); comm = MPI_COMM_WORLD;
+	MPI_Comm_size(comm,&ntids); MPI_Comm_rank(comm,&mytid);
+	MPI_Comm_split(comm,mytid,mytid,&mycomm);
+	
+	if(mytid == 0){
+		outman.SetLogFile("mpi_messages.log");
+		outman.UserMessageNoCR("MPI Garli started with command line: ");
+		for(int i=0;i<argc;i++) outman.UserMessageNoCR("%s ", argv[i]);
+		outman.UserMessage("\n");
+		outman.UserMessage("This is the original batch MPI GARLI version.  It expects a series of configuration");
+		outman.UserMessage("files named \"run0.conf\", \"run1.conf\", etc.  If no number is passed on the command");
+		outman.UserMessage("line after the executable name, then it assumes that the # configs = # processors.");
+		outman.UserMessage("Otherwise it looks for the specified number of configs.");
+		}
+	else{
+	 	timespec wait;
+		wait.tv_sec = 2;
+		wait.tv_nsec=0;
+		nanosleep(&wait, NULL);
+		outman.SetLogFileForAppend("mpi_messages.log");
+		}
+
+	if(argc > 1){
+		if(! isdigit(argv[1][0])){
+			cout << "I'm confused.\nExpecting <exe> <total # jobs>\n  or\n<exe> <nothing>\nGot <exe> " << argv[1] << endl;
+			MPI_Finalize();
+			return 1;
+			}
+		jobloop(mytid,ntids,mycomm, atoi(argv[1]));
+		}
+	else jobloop(mytid, ntids, mycomm);
+	
+	MPI_Finalize();
+	return 0;
+	}
+
+void jobloop(int mytid,int ntids,MPI_Comm comm, int numJobs /*=-1*/){
+
+	if(numJobs < 0) numJobs=ntids;
+	int jobNum=mytid;	
+	cout << "total proc: " << ntids << " total jobs: " << numJobs << endl;
+	while(jobNum < numJobs){
+		timespec wait;
+		wait.tv_sec = mytid * 2;
+		wait.tv_nsec=0;
+		nanosleep(&wait, NULL);
+		SubGarliMain(jobNum);
+		jobNum += ntids;
+		}
+	return;
+	}
+#endif
+#endif
diff --git a/src/optimization.cpp b/src/optimization.cpp
new file mode 100644
index 0000000..d56d93d
--- /dev/null
+++ b/src/optimization.cpp
@@ -0,0 +1,3718 @@
+// GARLI version 2.1 source code
+// Copyright 2005-2014 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "defs.h"
+#include "tree.h"
+#include "model.h"
+#include "funcs.h"
+#include "outputman.h"
+
+//a bunch of functions from the Tree class, relating to optimization
+
+#include "utility.h"
+Profiler ProfIntDeriv ("IntDeriv      ");
+Profiler ProfTermDeriv("TermDeriv     ");
+Profiler ProfModDeriv ("ModDeriv      ");
+Profiler ProfNewton   ("Newton-Raphson");
+extern Profiler ProfEQVectors;
+
+#if !defined(STEP_TOL)
+	#ifdef SINGLE_PRECISION_FLOATS
+		#define STEP_TOL 1.0e-6
+	#else
+		#define STEP_TOL 1.0e-8
+	#endif
+#endif
+
+extern FLOAT_TYPE globalBest;
+
+extern int optCalcs;
+
+#define FOURTH_ROOT
+
+		#ifdef OPT_DEBUG
+			#include "optimizationinfo.h"
+			OptimizationInfo optInfo;
+			ofstream opt("optimization.log");
+			//ofstream der("derivs.log");
+			ofstream optsum("optsummary.log");
+			ofstream curves("curves.log");
+		#endif
+
+#ifdef FOURTH_ROOT
+#define effectiveMin 0.01
+#define effectiveMax 1.77827941
+#elif ROOT_OPT
+#define effectiveMin 0.0001
+#define effectiveMax 3.16227766
+#else
+#define effectiveMin=min_brlen
+#define effectiveMax=max_brlen
+#endif
+
+inline FLOAT_TYPE CallBranchLike(TreeNode *thisnode, Tree *thistree, FLOAT_TYPE blen, bool brak /*=false*/){
+	brak;
+
+#ifdef FOURTH_ROOT
+	thisnode->dlen=blen*blen*blen*blen;
+#elif ROOT_OPT
+	thisnode->dlen=blen*blen;
+#else
+	thisnode->dlen=blen;
+#endif
+	FLOAT_TYPE like=thistree->BranchLike(thisnode)*-1;
+	
+	optCalcs++;
+
+#ifdef OPT_DEBUG
+	if(brak) optInfo.BrakAdd(blen, like);
+	else optInfo.BrentAdd(blen, like);
+
+#endif
+
+	return like;
+	}
+
+void Tree::OptimizeBranchesInArray(int *nodes, int numNodes, FLOAT_TYPE optPrecision){
+	//this takes an array of nodeNums (branches) to be optimized and does so
+	for(int i=0;i<numNodes;i++){
+		BrentOptimizeBranchLength(optPrecision, allNodes[nodes[i]], true);
+		}	
+	}
+
+FLOAT_TYPE Tree::OptimizeAllBranches(FLOAT_TYPE optPrecision){
+	FLOAT_TYPE improve=ZERO_POINT_ZERO;
+	SetNodesUnoptimized();
+	improve = RecursivelyOptimizeBranches(root->left, optPrecision, 0, numNodesTotal, true, improve, true);
+	improve = RecursivelyOptimizeBranches(root->left->next, optPrecision, 0, numNodesTotal, true, improve, true);
+	improve = RecursivelyOptimizeBranches(root->right, optPrecision, 0, numNodesTotal, true, improve, true);
+
+	return improve;
+	}
+
+int Tree::PushBranchlengthsToMin(){
+	int num = 0;
+	pair<FLOAT_TYPE, FLOAT_TYPE> derivs;
+	for(int i=1;i < numNodesTotal;i++){
+		if(allNodes[i]->dlen < 1.0e-4 && !(FloatingPointEquals(allNodes[i]->dlen, min_brlen, 1e-9))){
+			if(useOptBoundedForBlen){
+				//in this case (mainly oriented gap) there is no deriv function, so just set the blens and
+				//count on them being re-optimized if wrong
+				SetBranchLength(allNodes[i], min_brlen);
+				num++;
+				}
+			else{
+				derivs = CalcDerivativesRateHet(allNodes[i]->anc, allNodes[i]);
+				if(derivs.first < ZERO_POINT_ZERO){
+					//outman.DebugMessage("(branch %d: %.9f -> %.9f", i, allNodes[i]->dlen, 1e-8);
+					SetBranchLength(allNodes[i], min_brlen);
+					num++;
+					}
+				else
+					outman.DebugMessage("pos d1\t%.9f\t%.9f", allNodes[i]->dlen, derivs.first);
+				}
+			}
+		}
+	return num;
+	}
+
+FLOAT_TYPE Tree::OptimizeTreeScale(FLOAT_TYPE optPrecision){
+	if(FloatingPointEquals(lnL, -ONE_POINT_ZERO, max(1.0e-8, GARLI_FP_EPS * 2.0))) Score();
+	Score();
+	FLOAT_TYPE start=lnL;
+	FLOAT_TYPE prev=lnL;
+	FLOAT_TYPE cur;
+	FLOAT_TYPE scale;
+	FLOAT_TYPE t;
+	FLOAT_TYPE lastChange=(FLOAT_TYPE)9999.9;
+	FLOAT_TYPE effectiveScale = ONE_POINT_ZERO; //this measures the change in scale relative to what it began at.
+	FLOAT_TYPE upperBracket = FLT_MAX;   //the smallest value we know of with a negative d1 (relative to inital scale of 1.0!)
+	FLOAT_TYPE lowerBracket = FLT_MIN;   //the largest value we know of with a positive d1 (relative to inital scale of 1.0!)
+	FLOAT_TYPE incr;
+
+#undef DEBUG_SCALE_OPT
+
+#ifdef DEBUG_SCALE_OPT
+	ofstream deb("scaleTrace.log");
+	deb.precision(20);
+	for(int s=0;s<50;s++){
+		FLOAT_TYPE scale=0.5 + s*.025;
+		ScaleWholeTree(scale);
+		Score();
+		deb << scale << "\t" << lnL << endl;
+		ScaleWholeTree(ONE_POINT_ZERO/scale);	
+		}
+	deb.close();
+#endif
+
+	while(1){
+		//reversed this now so the reduction in scale is done first when getting the 
+		//derivs.  This works better if some blens are at DEF_MAX_BLEN because the 
+		//scaling up causes them to hit the max and the relative blens to change
+
+#ifdef SINGLE_PRECISION_FLOATS
+		incr=0.005f;
+#else
+		incr=0.0001;
+#endif
+
+		scale=ONE_POINT_ZERO-incr;
+
+		ScaleWholeTree(scale);
+		Score();
+		cur=lnL;
+		ScaleWholeTree(ONE_POINT_ZERO/scale);//return the tree to its original scale	
+		FLOAT_TYPE d12=(cur-prev)/-incr;
+
+		scale=ONE_POINT_ZERO + incr;
+		ScaleWholeTree(scale);
+		Score();
+		cur=lnL;
+		ScaleWholeTree(ONE_POINT_ZERO/scale);//return the tree to its original scale
+		FLOAT_TYPE d11=(cur-prev)/incr;
+
+		FLOAT_TYPE d1=(d11+d12)*ZERO_POINT_FIVE;
+		FLOAT_TYPE d2=(d11-d12)/incr;
+		
+		FLOAT_TYPE est = -d1/d2;
+		FLOAT_TYPE estImprove = d1*est + d2*(est*est*ZERO_POINT_FIVE);
+
+		//return conditions.  Leave if the estimated improvement is < precision of if the points straddle the optimum 
+		if((d11 - d12) == ZERO_POINT_ZERO || (d11 > ZERO_POINT_ZERO && d12 < ZERO_POINT_ZERO) || (d11 < ZERO_POINT_ZERO && d12 > ZERO_POINT_ZERO) || (estImprove < optPrecision && d2 < ZERO_POINT_ZERO)){
+			lnL = prev;
+			return prev-start;
+			}
+		
+		if(d2 < ZERO_POINT_ZERO){
+			est = max(min((FLOAT_TYPE)0.1, est), (FLOAT_TYPE)-0.1);
+			t=ONE_POINT_ZERO + est;
+			}
+		else{//if we have lots of data, move
+			//very slowly here
+			//if(data->NInformative() > 500){
+			if(0){
+				if(d1 > ZERO_POINT_ZERO) t=(FLOAT_TYPE)1.01;
+				else t=(FLOAT_TYPE)0.99;
+				}
+			else{
+				if(d1 > ZERO_POINT_ZERO) t=(FLOAT_TYPE)1.05;
+				else t=(FLOAT_TYPE)0.95;
+				}
+			}
+		
+		//update the brackets
+		if(d1 <= ZERO_POINT_ZERO && effectiveScale < upperBracket)
+			upperBracket = effectiveScale;
+		else if(d1 > ZERO_POINT_ZERO && effectiveScale > lowerBracket)
+			lowerBracket = effectiveScale;
+
+		//if the surface is wacky and we are going to shoot past one of our brackets
+		//take evasive action by going halfway to the bracket
+		if((effectiveScale * t) <= lowerBracket){
+			t = (lowerBracket + effectiveScale) * ZERO_POINT_FIVE / effectiveScale;
+			}
+		else if((effectiveScale * t) >= upperBracket){
+			t = (upperBracket + effectiveScale) * ZERO_POINT_FIVE / effectiveScale;
+			}
+
+		scale=t;
+		effectiveScale *= scale;
+		ScaleWholeTree(scale);
+		Score();
+		cur=lnL;
+		lastChange = cur - prev;
+		prev=cur;
+		}
+	return -1;
+	}
+
+//The newer, more convoluted OptBounded from the trunk
+FLOAT_TYPE Tree::SetAndEvaluateParameter(int modnum, int which, FLOAT_TYPE val, FLOAT_TYPE &bestKnownScore, FLOAT_TYPE &bestKnownVal, void (Model::*SetParam)(int, FLOAT_TYPE)){
+	if(which > -1){
+		Model *mod = modPart->GetModel(modnum);	
+		CALL_SET_PARAM_FUNCTION(*mod, SetParam)(which, val);
+		MakeAllNodesDirty();
+		}
+	else{//A negative which means that this is a branchlength being set.  In that case the SetParam function is just a dummy function of Model
+		//that allow this function to be called
+		SetBranchLength(allNodes[-which], val);
+		}
+
+	Score();
+
+	if(lnL > bestKnownScore){
+		bestKnownVal = val;
+		bestKnownScore = lnL;
+		}
+	return lnL;
+	}
+
+//This checks whether bestVal is significantly better than the otherScore, and if so takes it.  Otherwise otherVal is taken,
+//which could represent the current value that the optimizer is at, or the initial value.
+//This is ONLY called when we are about to return from OptBounded and want to know whether we should take:
+//-A step to a bracket (best) that evals slightly higher than the initial (other and current) point (first optimization pass)
+//	In this case we want the best to be significantly better than the initial=current=other.  tolerance should be > 0
+//-Revert to the best known value if we took a step and ended up worsening the score.
+//	In this case we want to take best if it is at all better than the current. tolerance == 0
+bool Tree::CheckScoreAndRestore(int modnum, int which, void (Model::*SetParam)(int, FLOAT_TYPE), FLOAT_TYPE otherScore, FLOAT_TYPE otherVal, FLOAT_TYPE bestScore, FLOAT_TYPE bestVal, FLOAT_TYPE tolerance){
+	Model *mod = modPart->GetModel(modnum);	
+	bool restored = false;
+	if(otherScore + tolerance < bestScore){
+//		outman.DebugMessage("Rest %.12f", otherScore - bestScore);
+		if(which > -1)
+			CALL_SET_PARAM_FUNCTION(*mod, SetParam)(which, bestVal);
+		else{//A negative which means that this is a branchlength being set.  In that case the SetParam function is just a dummy function of Model
+			//that allow this function to be called
+			SetBranchLength(allNodes[-which], bestVal);
+			}
+		otherScore = bestScore;
+		restored = true;
+		}
+	else{
+		if(otherScore < bestScore)
+			outman.DebugMessage("Stay %.12f (would have gone)", otherScore - bestScore);
+/*		else 
+			outman.DebugMessage("Stay %.12f", otherScore - bestScore);
+*/
+		if(which > -1)
+			CALL_SET_PARAM_FUNCTION(*mod, SetParam)(which, otherVal);
+		else{//A negative which means that this is a branchlength being set.  In that case the SetParam function is just a dummy function of Model
+			//that allow this function to be called
+			SetBranchLength(allNodes[-which], otherVal);
+			}	
+		}
+	MakeAllNodesDirty();
+	lnL = otherScore;
+	return restored;
+	}
+
+void Tree::TraceLikelihoodForParameter(int modnum, int which, FLOAT_TYPE init, FLOAT_TYPE min, FLOAT_TYPE max, FLOAT_TYPE interval, void (Model::*SetParam)(int, FLOAT_TYPE), bool append){
+	Model *mod = modPart->GetModel(modnum);	
+
+	ofstream curves;
+	if(append)
+		curves.open("lcurve.log", ios::app);
+	else
+		curves.open("lcurve.log");
+
+	curves.precision(12);
+	curves << "\n";
+	FLOAT_TYPE dummy = -1;
+	FLOAT_TYPE dummy2 = -1;
+	for(double c = min; c <= max ; c += interval){
+		FLOAT_TYPE v = SetAndEvaluateParameter(modnum, which, c, dummy, dummy2, SetParam);
+		curves << c << "\t" << v << "\n";
+		}
+	curves.close();
+	if(which > -1){
+		CALL_SET_PARAM_FUNCTION(*mod, SetParam)(which, init);
+		MakeAllNodesDirty();
+		}
+	else{//A negative which means that this is a branchlength being set.  In that case the SetParam function is just a dummy function of Model
+		//that allow this function to be called
+		SetBranchLength(allNodes[-which], init);
+		}
+	Score();
+	}
+
+FLOAT_TYPE Tree::OptimizeBoundedParameter(int modnum, FLOAT_TYPE optPrecision, FLOAT_TYPE initialVal, int which, FLOAT_TYPE lowBound, FLOAT_TYPE highBound, void (Model::*SetParam)(int, FLOAT_TYPE), FLOAT_TYPE targetScoreDigits /* DP = 9, SP = 5 */){
+	if(FloatingPointEquals(lnL, -ONE_POINT_ZERO, max(1.0e-8, GARLI_FP_EPS * 2.0))) 
+		Score();
+
+#ifdef SINGLE_PRECISION_FLOATS
+	FLOAT_TYPE baseIncr = min(max(0.001*optPrecision, 1.0e-5f), initialVal * 0.01);
+#else
+	FLOAT_TYPE baseIncr = min(max(0.001*optPrecision, 1.0e-6), initialVal * 0.01);
+#endif
+	//DEBUG
+	//for blen opt (which < 0) super small incrs don't make sense.  If initialVal is at 1e-8
+	//it will get bumped below
+	if(which < 0){
+		baseIncr = max(baseIncr, min_brlen);
+		}
+
+	//this first bit of checking and bumping used to use epsilon rather than the default baseIncr
+	assert(initialVal > lowBound - baseIncr && initialVal < highBound + baseIncr);
+	FLOAT_TYPE curVal = initialVal;
+	FLOAT_TYPE initialScore, curScore;
+	initialScore = curScore = lnL;
+	FLOAT_TYPE bestKnownScore = initialScore;
+	FLOAT_TYPE bestKnownVal = initialVal;
+
+#ifdef NEW_BUMPING
+	FLOAT_TYPE requiredWindow = (baseIncr * 1.0001) * 2.0;
+	FLOAT_TYPE actualWindow = highBound - lowBound;
+	if(actualWindow < requiredWindow){
+	//if the bounds are so tight that we can't be > baseIncr * 1.0001 from both, exit
+		outman.DebugMessage("NEWER: OptimizeBoundedParameter: bounds fully constrain parameter %.6f <- %.6f -> %.6f, desired amount = %.6f", lowBound, curVal, highBound, requiredWindow);
+		//SetAndEvaluateParameter(which, initialVal, bestKnownScore, bestKnownVal, SetParam);
+		return 0.0;
+		}
+
+	//the new version
+	FLOAT_TYPE boundBumped = -1.0;
+	//if possible, bump enough that we could have two legal increases in incr below to allow sufficient lnL diffs
+	FLOAT_TYPE bumpAmt = baseIncr * 25.0001;
+	//if(initialVal - lowBound < bumpAmt){
+	if(lowBound + bumpAmt > initialVal){
+		//were closer than we'd like to be to the low bound
+		//but, if we bump what we would like we might go past the other bound, in that case decrease bump
+		if(lowBound + bumpAmt > highBound - bumpAmt){
+			bumpAmt = actualWindow / 2.0; 
+			outman.DebugMessage("halved: base = %.6f, ideal = %.6f, actual = %.6f", baseIncr, baseIncr * 25.0001, bumpAmt); 
+			}
+		boundBumped = fabs(curVal - (lowBound + bumpAmt));
+		curVal = lowBound + bumpAmt;
+		curScore = SetAndEvaluateParameter(modnum, which, curVal, bestKnownScore, bestKnownVal, SetParam);
+		}
+	else if(highBound - bumpAmt < initialVal){
+		if(highBound - bumpAmt < lowBound + bumpAmt){
+			bumpAmt = actualWindow / 2.0; 
+			outman.DebugMessage("halved: base = %.6f, ideal = %.6f, actual = %.6f", baseIncr, baseIncr * 25.0001, bumpAmt);
+			}
+		curVal = highBound - bumpAmt;
+		boundBumped = initialVal - curVal;
+		curScore = SetAndEvaluateParameter(modnum, which, curVal, bestKnownScore, bestKnownVal, SetParam);
+		}
+#else
+	//the older version
+	FLOAT_TYPE boundBumped = -1.0;
+	//if possible, bump enough that we could have one legal increase in incr below to allow sufficient lnL diffs
+	FLOAT_TYPE bumpAmt = baseIncr * 5.0001;
+	if(initialVal - lowBound < bumpAmt){
+		if(lowBound + bumpAmt > highBound)
+			bumpAmt = baseIncr * 1.0001;
+//		outman.DebugMessage("NEW: OptimizeBoundedParameter: value bumped off low bound %.6f -> %.6f", initialVal, lowBound + bumpAmt);
+		boundBumped = fabs(curVal - (lowBound + bumpAmt));
+		curVal = lowBound + bumpAmt;
+		if(curVal > highBound){
+			outman.DebugMessage("Bumped past other (high) bound!");
+			curVal = initialVal;
+			}
+		curScore = SetAndEvaluateParameter(modnum, which, curVal, bestKnownScore, bestKnownVal, SetParam);
+		}
+	else if(highBound - initialVal < bumpAmt){
+//		outman.DebugMessage("NEW: OptimizeBoundedParameter: value bumped off high bound %.6f -> %.6f", initialVal, highBound - bumpAmt);s
+		if(highBound - bumpAmt < lowBound)
+			bumpAmt = baseIncr * 1.0001;
+		boundBumped = fabs(curVal - (highBound - bumpAmt));
+		curVal = highBound - bumpAmt;
+		if(curVal < lowBound){
+			outman.DebugMessage("Bumped past other (low) bound!");
+			curVal = initialVal;
+			}
+		curScore = SetAndEvaluateParameter(modnum, which, curVal, bestKnownScore, bestKnownVal, SetParam);
+		}
+	//if the bounds are so tight that we can't be > baseIncr from both, exit
+	//If we were close to one bound we should have already been bumped off of it.  If we're still close to a bound then the bump must have pushed
+	//us too near the opposite bound.  give up in that case
+	if(curVal - lowBound < baseIncr || highBound - curVal < baseIncr){
+		outman.DebugMessage("NEW: OptimizeBoundedParameter: bounds fully constrain parameter %.6f <- %.6f -> %.6f, desired amount = %.6f", lowBound, curVal, highBound, bumpAmt * 2);
+		SetAndEvaluateParameter(modnum, which, initialVal, bestKnownScore, bestKnownVal, SetParam);
+		return 0.0;
+		}
+#endif
+
+	FLOAT_TYPE lowerEval, higherEval;
+	FLOAT_TYPE lowerEvalScore, higherEvalScore;
+	FLOAT_TYPE lastChange=(FLOAT_TYPE)9999.9;
+	FLOAT_TYPE upperBracket = highBound;   //the smallest value we know of with a negative d1, or the minimum allowed value
+	FLOAT_TYPE lowerBracket = lowBound;   //the largest value we know of with a positive d1 , or the maximum allowed value
+	FLOAT_TYPE incr, diffDigits = 100.0;
+	int lowBoundOvershoot = 0;
+	int upperBoundOvershoot = 0;
+	int positiveD2Num = 0;
+	int pass = 0, incrIncreases = 0;
+
+#ifdef OPT_BOUNDED_LOG
+//	ofstream log("optbounded.log", ios::app);
+//	log.precision(10);
+
+	char name[50];
+	sprintf(name, "%s.optbounded.log", ofprefix.c_str());
+	ofstream log(name, ios::app);
+	log.precision(10);
+#endif
+
+#ifdef OPT_BOUNDED_TRACE
+//	if(which > -1){
+	ofstream curves("lcurve.log", ios::app);
+	curves.precision(12);
+	curves << "\n";
+	ofprefix = "SLs";
+	string oname = ofprefix;
+	oname += ".sitelikes.log";
+	Model *mod = modPart->GetModel(modnum);
+	sitelikeLevel = 1;
+	double inc = curVal / 20.0;
+	for(double c = curVal / 20.0; c < curVal * 20.0 ; c += inc){
+		FLOAT_TYPE v = SetAndEvaluateParameter(modnum, which, c, bestKnownScore, bestKnownVal, SetParam);
+		curves << c << "\t" << v << "\n";
+		ofstream ordered(oname.c_str(), ios::app);
+		ordered.precision(10);
+		ordered << "1" << "\t" << -lnL << "\n";
+		ordered.close();
+
+		sitelikeLevel = -1;
+		}
+	curves.close();
+	sitelikeLevel = 0;
+	SetAndEvaluateParameter(modnum, which, curVal, bestKnownScore, bestKnownVal, SetParam);
+/*	ofstream ordered(oname.c_str(), ios::app);
+	ordered.precision(10);
+	ordered << "1" << "\t" << -lnL << "\n";
+	ordered.close();
+*/	//}
+#endif
+
+	FLOAT_TYPE incrLimit;
+	bool limited = false;
+	//we'll always know what the current score is at the top of this loop
+	while(1){
+		//baseIncr will be a sort of ideal increment, but it may be limited because of closeness
+		//to a min or max bracket
+		incrLimit = min(curVal - lowerBracket, upperBracket - curVal);
+		incr = baseIncr;
+		if(incr > incrLimit){
+			incr = incrLimit / 1.0001;
+			limited = true;
+			//outman.DebugMessage("OptimizeBoundedParameter: incr limited by bound.\n\tpass=%d initlnL=%.6f curlnL=%.6f initVal=%.6f curVal=%.6f lbound=%.6f hbound=%.6f incr=%.10f baseIncr=%.6f", pass, initialScore, lnL, initialVal, curVal, lowerBracket, upperBracket, incr, baseIncr);
+			if(baseIncr/incrLimit > 100.0)
+				outman.DebugMessage("OptimizeBoundedParameter: incr very limited by bound. Ratio is %.6f (curVal = %f)", baseIncr/incrLimit, curVal);
+			}
+		//evaluate a point just above the current value
+		higherEval = curVal+incr;
+		higherEvalScore = SetAndEvaluateParameter(modnum, which, higherEval, bestKnownScore, bestKnownVal, SetParam);
+
+#ifdef ADAPTIVE_BOUNDED_OPT
+		bool cont = false;
+		//There are a few things that could happen here
+		//1. The incr has already be limited by closeness to a bound above - move on
+		//2. Test lnL diffs.  
+		//	2a. The difference in lnLs values is sufficiently large for accurate derivatives - move on
+		//	2b. The difference in lnLs is not sufficient - increase incr
+		//		2b1. The increased incr is still within any bounds - go bck to 2
+		//		2b2. The increased incr is greater than allowed by one bound.  Limit it and break.
+		while(pass == 0 && !cont && !limited){
+			//we want differences in likelihood of greater than targetScoreDigits orders of magnitude
+			//less than the total likelihoods. The determination of this amount will be taken care
+			//of by the caller, and will vary by DP or SP (currently mostly 9 and 5) or the parameter
+			//begin optimized (lower for codon)
+			FLOAT_TYPE diff = fabs(curScore - higherEvalScore);
+			if(diff != ZERO_POINT_ZERO)//otherwise diffDigits has been initialized to 100 above to force incr increase
+				diffDigits = log10(-curScore / diff);
+			if(diffDigits > targetScoreDigits){
+				incrIncreases++;
+				baseIncr *= 5.0;
+				//if the increased increment would be greater than what we are allowed by our bound
+				//we'll have to use the limited incr.  We'll try the increased baseIncr on the next pass.
+				if(baseIncr > incrLimit){
+					incr = incrLimit / 1.0001;
+					cont = true;
+					outman.DebugMessage("OptimizeBoundedParameter: adaptive increase in incr limited by bound (%s).\n\tpass=%d initlnL=%.6f curlnL=%.6f initVal=%.6f curVal=%.6f incr=%.10f baseIncr=%.6f", (boundBumped > ZERO_POINT_ZERO ? "boundBumped" : "no boundBump"), pass, initialScore, curScore, initialVal, curVal, incr, baseIncr);
+					}
+				else 
+					incr = baseIncr;
+				//apply the new increment and check score difference again
+				higherEval = curVal+incr;
+				higherEvalScore = SetAndEvaluateParameter(modnum, which, higherEval, bestKnownScore, bestKnownVal, SetParam);
+				}
+			else cont = true;
+			}
+#endif
+		//we'll never move to a point closer than this (except maybe on exit)
+		//this ensures that we'll be able to have the low evaluation point just inside the bound
+		//without limiting incr
+		FLOAT_TYPE veryCloseToBound = baseIncr * 1.0001;
+		//we'll exit if closer than this, and will take the point with the best known score, which
+		//could be much closer yet
+		FLOAT_TYPE closeToBound = baseIncr * 1.0002;
+
+		//evaluate a point just below the current value
+		lowerEval = curVal-incr;
+		lowerEvalScore = SetAndEvaluateParameter(modnum, which, lowerEval, bestKnownScore, bestKnownVal, SetParam);
+
+		FLOAT_TYPE d11=(higherEvalScore-curScore)/incr;
+		FLOAT_TYPE d12=(lowerEvalScore-curScore)/-incr;
+		FLOAT_TYPE d1=(d11+d12)*ZERO_POINT_FIVE;
+		FLOAT_TYPE d2=(d11-d12)/incr;
+		FLOAT_TYPE est=-d1/d2;
+		FLOAT_TYPE proposed = curVal + est;
+
+#ifdef OPT_BOUNDED_LOG
+		log << pass << "\t" << incr << "\t" << incrIncreases << "\t" << diffDigits << "\t";
+		log << lowBound << "\t" << lowerBracket << "\t" << lowerEval << "\t" << curVal << "\t" << higherEval << "\t" << upperBracket << "\t" << highBound << "\t";
+		log << lowerEvalScore << "\t" << curScore << "\t" << higherEvalScore << "\t";
+		log << d1 << "\t" << d2 << "\t" << est << "\t" << proposed << "\t";
+#endif
+
+		//if the two derivative estimates are equal d2 is zero or undefined and bad things happen.  This is a bit of a hack, but works since it kicks in the pos d2 machinery 
+		if(d11 - d12 == 0){ 
+			d2 = 42.0;
+//			outman.DebugMessage("***equal d1's: %.4f", d11);
+			}
+
+		if(d1 == ZERO_POINT_ZERO){
+			outman.DebugMessage("****d1 is zero! d11=%.4f d12=%.4f", d11, d12);
+			}
+
+		//if the evaluation points straddle the optimum (or minimum), leave now
+		//in cases where the likelihood is unstable we can apparently straddle but end up with a worse likelihood
+		//than what we had initially.  In that case there isn't a lot we can do.  Restore the initial value and exit.
+		//occasionally d1 can also end up 0, so behave the same then.
+		if((d11 * d12 < ZERO_POINT_ZERO) || (d1 == ZERO_POINT_ZERO)){
+			if(d11 > 0.0){
+				outman.DebugMessage("MINIMUM! %.6f %.6f %.6f", lowerEvalScore, curScore, higherEvalScore);
+				//TraceLikelihoodForParameter(which, curVal, curVal-(baseIncr * 5), curVal+(baseIncr * 5), 1e-5, SetParam, false);
+				}
+			//on the first pass here the curVal will be the best val, so this won't do anything
+			//on later passes it should also be the best, unless there are weird stability issues
+			bool restored = CheckScoreAndRestore(modnum, which, SetParam, curScore, curVal, bestKnownScore, bestKnownVal, ZERO_POINT_ZERO);
+//			if(restored) outman.DebugMessage("took best: init=%.6f cur=%.6f best=%.6f initV=%.6f curV=%.6f bestV=%.6f", initialScore, curScore, bestKnownScore, initialVal, curVal, bestKnownVal);
+//			else outman.DebugMessage("took current: init=%.6f cur=%.6f best=%.6f initV=%.6f curV=%.6f bestV=%.6f", initialScore, curScore, bestKnownScore, initialVal, curVal, bestKnownVal);
+#ifdef OPT_BOUNDED_LOG
+			log << "\t" << bestKnownVal << "\treturn1" << (restored ? "_best" : "") << endl; log.close();
+#endif
+			return lnL-initialScore;
+			}
+
+#ifdef OPT_BOUNDED_LOG
+		if(boundBumped > ZERO_POINT_ZERO)
+			log << "BB-";
+		if(d2 < ZERO_POINT_ZERO)
+			log << "NR-";
+#endif
+
+		//second derivative is positive, so can't use NR.  Bump the value arbitrarily.
+		//if this overshoots a bound it will be dealt with below
+		if(d2 > ZERO_POINT_ZERO){
+			positiveD2Num++;
+			FLOAT_TYPE amtToBump;
+			if(d1 > ZERO_POINT_ZERO){
+				if((positiveD2Num + 1) % 3 == 0){
+					amtToBump = ((upperBracket + curVal) * ZERO_POINT_FIVE) - curVal;
+#ifdef OPT_BOUNDED_LOG
+					log << "B1/2";
+#endif
+					}
+				else{
+					//proposed=curVal*(FLOAT_TYPE)(ONE_POINT_ZERO+0.02*positiveD2Num);
+					amtToBump = max(closeToBound, (curVal * (FLOAT_TYPE)(0.02*positiveD2Num)));
+#ifdef OPT_BOUNDED_LOG
+					log << "B2P";
+#endif
+					}
+				proposed = curVal + amtToBump;
+				}
+			else {//cycle through a number of arbitrary value changes here
+				if(positiveD2Num % 3 == 0 || (pass == 0 && boundBumped > ZERO_POINT_ZERO)){
+					amtToBump = (curVal - (lowerBracket + veryCloseToBound));
+#ifdef OPT_BOUNDED_LOG
+					log << "BtoB";
+#endif
+					}
+				else if((positiveD2Num + 2) % 3 == 0){
+					amtToBump = (curVal * (FLOAT_TYPE)(0.02*positiveD2Num));
+#ifdef OPT_BOUNDED_LOG
+					log << "B2P";
+#endif
+					}
+				else if((positiveD2Num + 1) % 3 == 0){
+					amtToBump = curVal - ((curVal + lowerBracket) * ZERO_POINT_FIVE);
+#ifdef OPT_BOUNDED_LOG
+					log << "B1/2";
+#endif
+					}
+
+				//SHOULD THIS BE ctb or vctb?
+				amtToBump = max(veryCloseToBound, amtToBump);
+				proposed = curVal - amtToBump;
+				}
+			}
+
+		//we're proposing below the bound
+		if(d1 < ZERO_POINT_ZERO && proposed < lowerBracket + veryCloseToBound){
+			//if we're already very close to that bound, exit
+			//if(prevVal - lowerBracket - epsilon < epsilon * ZERO_POINT_FIVE){
+			if(curVal - (lowerBracket + closeToBound) <= ZERO_POINT_ZERO){
+				bool restored = CheckScoreAndRestore(modnum, which, SetParam, curScore, curVal, bestKnownScore, bestKnownVal, (pass > 0 ? ZERO_POINT_ZERO : STEP_TOL));
+/*
+				if(restored) outman.DebugMessage("LOW:took bestKnown: init=%.6f cur=%.6f best=%.6f initV=%.6f curV=%.6f bestV=%.6f", initialScore, curScore, bestKnownScore, initialVal, curVal, bestKnownVal);
+				else outman.DebugMessage("LOW:took current: init=%.6f cur=%.6f best=%.6f initV=%.6f curV=%.6f bestV=%.6f", initialScore, curScore, bestKnownScore, initialVal, curVal, bestKnownVal);
+*/
+#ifdef OPT_BOUNDED_LOG
+				log << "\t" << bestKnownVal << "\treturn2" << (restored ? "_best" : "") << endl; log.close();
+#endif
+				return lnL-initialScore;
+				}
+			lowBoundOvershoot++;
+			//The previous behavior for low/high bracket overshooting caused rare problems because it automatically
+			//tried a value just inside the bracket if it was more than the first overshoot.  If the derivs at both
+			//the low and high brackets propose a value past the other, this can ping-pong back and forth making only
+			//very tiny moves inward, and crap out once 1000 reps have been completed.  Now just try near the bound once
+			if(lowBoundOvershoot == 2 || (lowBoundOvershoot == 1 && boundBumped > ZERO_POINT_ZERO)){
+				//this used to jump to 1/2 * baseIncr from bound
+				proposed = lowerBracket + veryCloseToBound;
+#ifdef OPT_BOUNDED_LOG
+				log << "LtoB";
+#endif
+				}
+			else{//jump halfway to bound, unless that is too close
+				FLOAT_TYPE delta = curVal - (curVal + lowerBracket) * ZERO_POINT_FIVE;
+				delta = max(veryCloseToBound, delta);
+				proposed = curVal - delta;
+#ifdef OPT_BOUNDED_LOG
+				log << "L1/2";
+#endif
+				}
+			}
+		//we're proposing above the bound
+		else if(d1 > ZERO_POINT_ZERO && proposed > upperBracket - veryCloseToBound){
+			//if we're already very close to that bound, exit
+			if(upperBracket - closeToBound - curVal <= ZERO_POINT_ZERO){
+				bool restored = CheckScoreAndRestore(modnum, which, SetParam, curScore, curVal, bestKnownScore, bestKnownVal, (pass > 0 ? ZERO_POINT_ZERO : STEP_TOL));
+//				if(restored) outman.DebugMessage("HIGH:took bestKnown: init=%.6f cur=%.6f best=%.6f initV=%.6f curV=%.6f bestV=%.6f", initialScore, curScore, bestKnownScore, initialVal, curVal, bestKnownVal);
+//				else outman.DebugMessage("HIGH:took current: init=%.6f cur=%.6f best=%.6f initV=%.6f curV=%.6f bestV=%.6f", initialScore, curScore, bestKnownScore, initialVal, curVal, bestKnownVal);
+#ifdef OPT_BOUNDED_LOG
+				log << "\t" << bestKnownVal << "\treturn3" << (restored ? "_best" : "") << endl; log.close();
+#endif
+				return lnL-initialScore;
+				}
+			upperBoundOvershoot++;
+			if(upperBoundOvershoot == 2 || (upperBoundOvershoot == 1 && boundBumped > ZERO_POINT_ZERO)){
+				proposed = upperBracket - veryCloseToBound;
+#ifdef OPT_BOUNDED_LOG
+				log << "LtoB";
+#endif
+				}
+			else{
+				FLOAT_TYPE delta = (curVal + upperBracket) * ZERO_POINT_FIVE - curVal;
+				delta = max(veryCloseToBound, delta);
+				proposed = curVal + delta;
+#ifdef OPT_BOUNDED_LOG
+				log << "L1/2";
+#endif
+				}
+			}
+
+		FLOAT_TYPE estImprove;
+		if(d2 < ZERO_POINT_ZERO) 
+			estImprove = d1*(proposed - curVal) + (d2 * (proposed - curVal) * (proposed - curVal)) * ZERO_POINT_FIVE;
+		else estImprove = 9999.9;
+
+		//The expected amount of improvement from an NR move is low
+		//require that we didn't significantly worsen the likelihood overall or on the last pass
+		if(estImprove < optPrecision && curScore >= initialScore - 1.0e-6 && lastChange > -1.0e-6){
+			bool restored = CheckScoreAndRestore(modnum, which, SetParam, curScore, curVal, bestKnownScore, bestKnownVal, (pass > 0 ? ZERO_POINT_ZERO : STEP_TOL));
+/*			if(bestKnownScore > curScore)
+				outman.DebugMessage("IMPROVE:took best: init=%.6f cur=%.6f best=%.6f initV=%.6f curV=%.6f bestV=%.6f", initialScore, curScore, bestKnownScore, initialVal, curVal, bestKnownVal);
+			else
+				outman.DebugMessage("IMPROVE:took current: init=%.6f cur=%.6f best=%.6f initV=%.6f curV=%.6f bestV=%.6f", initialScore, curScore, bestKnownScore, initialVal, curVal, bestKnownVal);
+*/
+#ifdef OPT_BOUNDED_LOG
+			log << "\t" << bestKnownVal << "\treturn4" << (restored ? "_best" : "") << endl; log.close();			
+#endif
+			return lnL-initialScore;
+			}
+
+		//don't allow infinite looping if something goes wrong
+		if(pass > 1000){
+			//bool restored = CheckScoreAndRestore(which, SetParam, curScore, curVal, initialScore, initialVal);
+			bool worsened = !CheckScoreAndRestore(modnum, which, SetParam, initialScore, initialVal, bestKnownScore, bestKnownVal, ZERO_POINT_ZERO);
+			if(worsened){
+				outman.UserMessage("OptimizeBoundedParameter: 1000 passes, but score worsened.\n\tpass=%d initlnL=%.6f curlnL=%.6f initVal=%.6f curVal=%.6f d11=%.6f d12=%.6f incr=%.10f baseIncr=%.10f", pass, initialScore, curScore, initialVal, curVal, d11, d12, incr, baseIncr);
+				outman.UserMessage("****Please report this message to garli.support at gmail.com****");
+				}
+			else{
+				outman.UserMessage("OptimizeBoundedParameter: 1000 passes without termination.\n\tpass=%d initlnL=%.6f curlnL=%.6f initVal=%.6f curVal=%.6f d11=%.6f d12=%.6f incr=%.10f baseIncr=%.10f", pass, initialScore, curScore, initialVal, curVal, d11, d12, incr, baseIncr);
+				outman.UserMessage("****Please report this message to garli.support at gmail.com****");
+				}
+			return lnL-initialScore;
+			}
+
+		assert(proposed >= lowerBracket && proposed <= upperBracket);
+
+		if((lowerBracket + closeToBound > proposed) && (upperBracket - closeToBound < proposed)){
+			//this means the point we moved to isn't > closeToBound from both bounds
+			bool restored = CheckScoreAndRestore(modnum, which, SetParam, curScore, curVal, bestKnownScore, bestKnownVal, (pass > 0 ? ZERO_POINT_ZERO : STEP_TOL));
+#ifdef OPT_BOUNDED_LOG
+				log << "\t" << bestKnownVal << "\treturn5" << (restored ? "_best" : "") << endl; log.close();
+#endif
+			return lnL-initialScore;
+			}
+
+		//update the brackets and take the move
+		if(d1 <= ZERO_POINT_ZERO && curVal < upperBracket)
+			upperBracket = curVal;
+		else if(d1 > ZERO_POINT_ZERO && curVal > lowerBracket)
+			lowerBracket = curVal;
+#ifdef OPT_BOUNDED_LOG
+		log << "\t" << estImprove << "\t" << proposed << endl;
+#endif
+		FLOAT_TYPE proposedScore = SetAndEvaluateParameter(modnum, which, proposed, bestKnownScore, bestKnownVal, SetParam);
+		lastChange = proposedScore - curScore;
+		curScore = proposedScore;
+		curVal = proposed;
+		pass++;
+		}
+	return -1;
+	}
+
+
+
+FLOAT_TYPE Tree::OptimizeBranchLength(FLOAT_TYPE optPrecision, TreeNode *nd, bool goodGuess){
+	nd->alreadyOptimized=true;
+	FLOAT_TYPE improve;
+	
+#ifdef OPT_DEBUG
+	optsum << nd->nodeNum << "\t" << nd->dlen << "\t";
+#endif
+		
+#ifdef BRENT
+	improve = BrentOptimizeBranchLength(optPrecision, nd, goodGuess);
+#else
+
+	//don't optimize the length of the entirely missing dummy branch
+	if(rootWithDummy && nd->nodeNum == numTipsTotal)
+		return 0.0;
+
+	//improve = NewtonRaphsonOptimizeBranchLength(optPrecision, nd, goodGuess);
+	//abandoning use of goodGuess.  Doesn't seem to be reducing opt passes, which
+	//was the point.
+	ProfNewton.Start();
+	if(useOptBoundedForBlen){
+		double before = nd->dlen;
+#ifdef OPT_BOUNDED_LOG
+		char name[50];
+		sprintf(name, "%s.optbounded.log", ofprefix.c_str());
+		ofstream log(name, ios::app);
+		log << -nd->nodeNum << "\n";
+		log.close();
+#endif
+		//the first argument here is the modnum, which doesn't matter for this hack way of optimizing blens 
+		//improve = OptimizeBoundedParameter(0, optPrecision, nd->dlen, -nd->nodeNum, min_brlen, max_brlen, &Model::SetBranchlengthDummy);
+		//bounds will be 1/10th of current blen or min_brlen on the low side, and 10x the current or 1e-4 if it is less than that 
+		improve = OptimizeBoundedParameter(0, optPrecision, nd->dlen, -nd->nodeNum, max(nd->dlen * 0.1, min_brlen), min(max(nd->dlen * 10.0, 1.0e-4), max_brlen), &Model::SetBranchlengthDummy);
+		//outman.UserMessage("%d\t%f -> %f", nd->nodeNum, before, nd->dlen);
+		}
+	else{
+		improve = NewtonRaphsonOptimizeBranchLength(optPrecision, nd, true);
+		}
+	ProfNewton.Stop();
+#endif
+
+#ifdef OPT_DEBUG
+	optsum << nd->dlen << "\t" << improve << "\t" << lnL << endl;
+	
+/*	ofstream opttrees;
+	if(num == 1) opttrees.open("everyTree.tre");
+	else opttrees.open("everyTree.tre", ios::app);
+	char treeString[20000];
+	root->MakeNewick(treeString, false, true);
+	opttrees <<  "utree tree" << num++ << "_" << nd->nodeNum << "=" << treeString << ";" << endl;
+	opttrees.close();
+*/
+
+#endif
+
+	return improve;
+	}
+
+void Tree::SetNodesUnoptimized(){
+	root->left->SetUnoptimized();
+	root->left->next->SetUnoptimized();
+	root->right->SetUnoptimized();
+	}
+
+void Tree::OptimizeBranchesWithinRadius(TreeNode *nd, FLOAT_TYPE optPrecision, int subtreeNode, TreeNode *prune){
+	nodeOptVector.clear();
+	SetNodesUnoptimized();
+
+#ifdef EQUIV_CALCS
+	if(dirtyEQ){
+		ProfEQVectors.Start();
+		root->SetEquivalentConditionalVectors(data);
+		ProfEQVectors.Stop();
+		dirtyEQ=false;
+		}
+#endif
+
+	FLOAT_TYPE totalIncrease=ZERO_POINT_ZERO, prunePointIncrease=ZERO_POINT_ZERO, thisIncr, pruneRadIncrease=ZERO_POINT_ZERO;
+	
+	//for codon models, numerical instability can cause problems if a 
+	//branch length is super short and its MLE is large.  This is very
+	//rare, but hard to detect when it is happening.  So, raise the blens
+	//before all of the optimization if they are very small
+	//PARTITION - I guess this needs to happen if any of the subsets are codon
+	//and the subset mult should be figured in
+	for(int m = 0;m < modSpecSet.NumSpecs();m++){
+		if(modSpecSet.GetModSpec(m)->IsCodon()){
+			FLOAT_TYPE subsRate = modPart->SubsetRate(m);
+			if(nd->left->dlen * subsRate < 1e-4) SetBranchLength(nd->left, 1e-4 / subsRate);
+			if(nd->right->dlen * subsRate < 1e-4) SetBranchLength(nd->right, 1e-4 / subsRate);
+			if(nd->dlen * subsRate < 1e-4) SetBranchLength(nd, 1e-4 / subsRate);
+			}
+		}
+
+#ifdef CHECK_LNL_BEFORE_RAD
+	FLOAT_TYPE leftIncrease=ZERO_POINT_ZERO, rightIncrease=ZERO_POINT_ZERO, ancIncrease=ZERO_POINT_ZERO;
+	leftIncrease = OptimizeBranchLength(optPrecision, nd->left, false);
+	ancIncrease = OptimizeBranchLength(optPrecision, nd, false);
+	rightIncrease = OptimizeBranchLength(optPrecision, nd->right, false);	
+
+	if(leftIncrease > ZERO_POINT_ZERO) nodeOptVector.push_back(nd->left);
+	if(ancIncrease > ZERO_POINT_ZERO) nodeOptVector.push_back(nd);
+	if(rightIncrease > ZERO_POINT_ZERO) nodeOptVector.push_back(nd->right);
+	totalIncrease = leftIncrease + rightIncrease + ancIncrease;
+#else
+	totalIncrease += OptimizeBranchLength(optPrecision, nd->left, false);
+	totalIncrease+= OptimizeBranchLength(optPrecision, nd, false);
+	totalIncrease += OptimizeBranchLength(optPrecision, nd->right, false);	
+
+	nodeOptVector.push_back(nd->left);
+	nodeOptVector.push_back(nd);
+	nodeOptVector.push_back(nd->right);
+
+#endif
+
+	if(prune!=NULL){
+		prunePointIncrease = OptimizeBranchLength(optPrecision, prune, true);
+		if(prunePointIncrease > ZERO_POINT_ZERO) nodeOptVector.push_back(prune);
+		totalIncrease+=prunePointIncrease;
+
+		#ifdef OPT_DEBUG
+		optsum << "prune total\t" << prunePointIncrease << endl;
+		#endif
+		}
+
+	#ifdef OPT_DEBUG
+	optsum << "3/4 branch total\t" << totalIncrease << endl;
+	if(lnL < globalBest - treeRejectionThreshold)
+		optsum << "bailing early\t";
+	optsum << "Scores:" << globalBest << "\t" << lnL << "\t" << globalBest-lnL << endl;
+	#endif
+
+#ifdef CHECK_LNL_BEFORE_RAD
+	bool fullOpt = false;
+	if(lnL > globalBest){
+		fullOpt = true;
+		}
+#endif
+	assert(!FloatingPointEquals(lnL, -1.0, 1e-8));
+	if(lnL < globalBest - treeRejectionThreshold){
+		return;
+		}
+
+	//now spread out
+	int rad=10;
+
+	if(rad>0){
+#ifdef CHECK_LNL_BEFORE_RAD
+		if(((rightIncrease > ZERO_POINT_ZERO) || fullOpt) && nd->right->left!=NULL && nd->right->left->alreadyOptimized==false) totalIncrease += RecursivelyOptimizeBranches(nd->right->left, optPrecision, subtreeNode, rad, false, ZERO_POINT_ZERO);
+		if(((leftIncrease > ZERO_POINT_ZERO) || fullOpt) && nd->left->left!=NULL && nd->left->left->alreadyOptimized==false) totalIncrease += RecursivelyOptimizeBranches(nd->left->left, optPrecision, subtreeNode, rad, false, ZERO_POINT_ZERO);
+		if(((ancIncrease > ZERO_POINT_ZERO)) || fullOpt){
+#else
+		if(nd->right->left!=NULL && nd->right->left->alreadyOptimized==false) totalIncrease += RecursivelyOptimizeBranches(nd->right->left, optPrecision, subtreeNode, rad, false, ZERO_POINT_ZERO);
+		if(nd->left->left!=NULL && nd->left->left->alreadyOptimized==false) totalIncrease += RecursivelyOptimizeBranches(nd->left->left, optPrecision, subtreeNode, rad, false, ZERO_POINT_ZERO);
+		if(1){
+#endif
+			if(nd->anc!=root && nd->anc->alreadyOptimized==false) totalIncrease += RecursivelyOptimizeBranchesDown(nd->anc, nd, optPrecision, subtreeNode, rad, ZERO_POINT_ZERO);
+			else{
+				if(root->left != nd && root->left->alreadyOptimized==false) totalIncrease +=  RecursivelyOptimizeBranches(root->left, optPrecision, subtreeNode, rad, true, ZERO_POINT_ZERO);
+				if(root->left->next != nd && root->left->next->alreadyOptimized==false) totalIncrease +=  RecursivelyOptimizeBranches(root->left->next, optPrecision, subtreeNode, rad, true, ZERO_POINT_ZERO);
+				if(root->right != nd && root->right->alreadyOptimized==false) totalIncrease +=  RecursivelyOptimizeBranches(root->right, optPrecision, subtreeNode, rad, true, ZERO_POINT_ZERO);
+				}
+			}
+		
+		if(prunePointIncrease > ZERO_POINT_ZERO){//now doing a radius opt at the prune point starting from the 4 branches attached to that branch
+			//in other words, this is no longer centered on a node, but on a branch
+			if(prune->left != NULL){
+				if(prune->right->alreadyOptimized==false) pruneRadIncrease += RecursivelyOptimizeBranches(prune->right, optPrecision, subtreeNode, rad, true, ZERO_POINT_ZERO);
+				if(prune->left->alreadyOptimized==false) pruneRadIncrease += RecursivelyOptimizeBranches(prune->left, optPrecision, subtreeNode, rad, true, ZERO_POINT_ZERO);
+				}
+			if(prune == root){
+				assert(0);
+				//pruneRadIncrease += RecursivelyOptimizeBranches(prune->left->next, optPrecision, subtreeNode, rad, false, ZERO_POINT_ZERO);
+				}
+			else{//this RecursivelyOptimizeBranchesDown will implicitly also optimize prune's next or prev
+				if(prune->anc!=root){
+					pruneRadIncrease += RecursivelyOptimizeBranchesDown(prune->anc, prune, optPrecision, subtreeNode, rad, ZERO_POINT_ZERO);
+					}
+				else{
+					if(root->left != prune && root->left->alreadyOptimized==false) totalIncrease +=  RecursivelyOptimizeBranches(root->left, optPrecision, subtreeNode, rad, true, ZERO_POINT_ZERO);
+					if(root->left->next != prune && root->left->next->alreadyOptimized==false) totalIncrease +=  RecursivelyOptimizeBranches(root->left->next, optPrecision, subtreeNode, rad, true, ZERO_POINT_ZERO);
+					if(root->right != prune && root->right->alreadyOptimized==false) totalIncrease +=  RecursivelyOptimizeBranches(root->right, optPrecision, subtreeNode, rad, true, ZERO_POINT_ZERO);
+					}
+				}
+//				if(prune->next != NULL) pruneRadIncrease += RecursivelyOptimizeBranches(prune->next, optPrecision, subtreeNode, rad, true, ZERO_POINT_ZERO);
+//				if(prune->prev != NULL) pruneRadIncrease += RecursivelyOptimizeBranches(prune->prev, optPrecision, subtreeNode, rad, true, ZERO_POINT_ZERO);
+//				}
+			/*
+			if(prune->right->left!=NULL) totalIncrease += RecursivelyOptimizeBranches(prune->right->left, optPrecision, subtreeNode, rad, false, ZERO_POINT_ZERO);
+			if(prune->left->left!=NULL) totalIncrease += RecursivelyOptimizeBranches(prune->left->left, optPrecision, subtreeNode, rad, false, ZERO_POINT_ZERO);
+			if(prune==root){
+				if(prune->left->next->left!=NULL) totalIncrease += RecursivelyOptimizeBranches(prune->left->next->left, optPrecision, subtreeNode, rad, false, ZERO_POINT_ZERO);
+				}
+			else{
+				if(prune->anc!=root) totalIncrease += RecursivelyOptimizeBranchesDown(prune->anc, prune, optPrecision, subtreeNode, rad, ZERO_POINT_ZERO);
+				else{
+					if(prune->nodeNum!=subtreeNode){
+						if(root->left != prune) totalIncrease +=  RecursivelyOptimizeBranches(root->left, optPrecision, subtreeNode, rad, true, ZERO_POINT_ZERO);
+						if(root->left->next != prune) totalIncrease +=  RecursivelyOptimizeBranches(root->left->next, optPrecision, subtreeNode, rad, true, ZERO_POINT_ZERO);
+						if(root->right != prune) totalIncrease +=  RecursivelyOptimizeBranches(root->right, optPrecision, subtreeNode, rad, true, ZERO_POINT_ZERO);
+						}
+					}
+				}
+			*/
+			totalIncrease += pruneRadIncrease;
+			#ifdef OPT_DEBUG
+			optsum << "pruneRadOpt total\t" << pruneRadIncrease << endl;
+			#endif
+			}
+		}
+#ifdef OPT_DEBUG
+optsum << "radiusopt intial pass total\t" << totalIncrease << endl;
+#endif
+
+	FLOAT_TYPE postIncr=ZERO_POINT_ZERO;
+	TreeNode *finalNode;
+
+	//no longer need to do this because checking if nodes have already been optimized before doing it again
+/*		if(nodeOptVector.empty()==false && prune != NULL){//remove any duplicate entries caused by an overlaping radius around connector and prune
+			for(list<TreeNode*>::iterator fir=nodeOptVector.begin();fir!=nodeOptVector.end();fir++){
+				list<TreeNode*>::iterator sec=fir;
+				sec++;
+				if(sec==nodeOptVector.end()) break;
+				for(;sec!=nodeOptVector.end();){
+					if(*fir == *sec){
+						list<TreeNode*>::iterator del=sec;
+						if(sec != nodeOptVector.end()) sec++;
+						nodeOptVector.erase(del);
+						}
+					else 
+						if(sec != nodeOptVector.end()) sec++;
+					}
+				}
+			}
+*/	
+	if(nodeOptVector.empty()) finalNode = nd->right;
+	else{
+		while(nodeOptVector.empty() == false){
+			list<TreeNode*>::iterator it=nodeOptVector.begin();
+			while(it!=nodeOptVector.end()){
+				if(nodeOptVector.size() == 1) finalNode=*it;
+				thisIncr=OptimizeBranchLength(optPrecision, *(it), true);
+				postIncr+= thisIncr;
+				if(!(thisIncr > optPrecision)){
+					list<TreeNode*>::iterator del=it;
+					it++;
+					nodeOptVector.erase(del);
+					}
+				else it++;
+				}
+			}
+		}
+
+	assert(!FloatingPointEquals(lnL, -1.0, 1e-8));
+	totalIncrease += postIncr;
+
+//	if(fourBranchTot > treeRejectionThreshold ) cout << "r\t" << (totalIncrease - fourBranchTot) << endl;
+//	else if(treeRejectionThreshold < (totalIncrease - fourBranchTot)) cout << (totalIncrease - fourBranchTot) << endl;
+
+#ifdef OPT_DEBUG
+optsum << "postopt total\t" << postIncr << endl;
+optsum << "total\t" << totalIncrease << endl;
+#endif
+	}
+
+FLOAT_TYPE Tree::RecursivelyOptimizeBranches(TreeNode *nd, FLOAT_TYPE optPrecision, int subtreeNode, int radius, bool dontGoNext, FLOAT_TYPE scoreIncrease, bool ignoreDelta/*=false*/){
+	FLOAT_TYPE delta = ZERO_POINT_ZERO;
+
+	if(nd->alreadyOptimized == false) delta = OptimizeBranchLength(optPrecision, nd, true);
+	scoreIncrease += delta;
+	
+	if(!(delta < optPrecision))
+		nodeOptVector.push_back(nd);
+//	if(radius==0) cout << "hit max radius!" <<endl;
+	if(nd->left!=NULL && radius>1 && (!(delta < optPrecision) || ignoreDelta == true)){
+		/*if(nd->left->alreadyOptimized == false)*/ scoreIncrease += RecursivelyOptimizeBranches(nd->left, optPrecision, subtreeNode, radius-1, false, 0, ignoreDelta);
+		}
+	if(nd->next!=NULL && dontGoNext==false){
+		if(nd->next->alreadyOptimized == false) scoreIncrease += RecursivelyOptimizeBranches(nd->next, optPrecision, subtreeNode, radius, false, 0, ignoreDelta);
+		}
+	if(memLevel > 1) RemoveTempClaReservations();
+	return scoreIncrease;
+	}
+
+FLOAT_TYPE Tree::RecursivelyOptimizeBranchesDown(TreeNode *nd, TreeNode *calledFrom, FLOAT_TYPE optPrecision, int subtreeNode, int radius, FLOAT_TYPE scoreIncrease){
+		
+	FLOAT_TYPE delta = ZERO_POINT_ZERO;
+	if(nd->alreadyOptimized==false)//because the next or prev of calledFrom could be unoptimized
+		//even if nd has been, this check needs to be done here, rather than before calling this func
+		delta = OptimizeBranchLength(optPrecision, nd, true);
+	scoreIncrease += delta;
+
+	if(nd->nodeNum == subtreeNode){
+		return scoreIncrease;
+		}
+
+	if(!(delta < optPrecision))
+		nodeOptVector.push_back(nd);
+//	if(radius==0) cout << "hit max radius!" <<endl;
+	if(nd->left!=NULL && nd->left!=calledFrom && radius>1){
+		if(nd->left->alreadyOptimized == false) scoreIncrease += RecursivelyOptimizeBranches(nd->left, optPrecision, subtreeNode, radius, true, 0);
+		}
+	else if(radius>1 && nd->left->next->alreadyOptimized == false) scoreIncrease += RecursivelyOptimizeBranches(nd->left->next, optPrecision, subtreeNode, radius, false, 0);
+	if(nd->anc!=root && radius>1 && !(delta < optPrecision)){
+		if(nd->anc->alreadyOptimized == false) scoreIncrease += RecursivelyOptimizeBranchesDown(nd->anc, nd, optPrecision, subtreeNode, radius-1, 0);
+		}
+	if(nd->anc==root){
+		if(radius>1 && !(delta < optPrecision)){
+			if(nd->next!=NULL){
+				if(nd->next->alreadyOptimized == false) scoreIncrease += RecursivelyOptimizeBranches(nd->next, optPrecision, subtreeNode, radius-1, true, 0);
+				}
+			else if(nd->prev->prev->alreadyOptimized == false) scoreIncrease += RecursivelyOptimizeBranches(nd->prev->prev, optPrecision, subtreeNode, radius-1, true, 0);
+			if(nd->prev!=NULL){
+				if(nd->prev->alreadyOptimized == false) scoreIncrease += RecursivelyOptimizeBranches(nd->prev, optPrecision, subtreeNode, radius-1, true, 0);
+				}
+			else if(nd->next->next->alreadyOptimized == false) scoreIncrease += RecursivelyOptimizeBranches(nd->next->next, optPrecision, subtreeNode, radius-1, true, 0);
+			}
+		}
+	if(memLevel > 1) RemoveTempClaReservations();
+	return scoreIncrease;
+	}
+
+pair<FLOAT_TYPE, FLOAT_TYPE> Tree::CalcDerivativesRateHet(TreeNode *nd1, TreeNode *nd2){
+	//nd1 and nd2 are the nodes on either side of the branch of interest
+	//nd1 will always be the "lower" one, and will always be internal, while
+	//nd2 can be internal or terminal
+	CondLikeArray *claOne=NULL, *claTwo=NULL;
+	CondLikeArraySet *setOne=NULL, *setTwo=NULL;
+	if(nd1->left == nd2)
+		setOne=GetClaUpLeft(nd1, true);
+	else if(nd1->right == nd2)
+		setOne=GetClaUpRight(nd1, true);
+	else //nd1 must be the root, and nd2 it's middle des
+		setOne=GetClaDown(nd1, true);
+	
+	//this must happen BEFORE the derivs are calced, or the prmat won't be current for this branch!
+	if(nd2->left != NULL)
+		setTwo=GetClaDown(nd2, true);
+
+	FLOAT_TYPE ***deriv1, ***deriv2, ***prmat;
+
+	FLOAT_TYPE d1=ZERO_POINT_ZERO, d2=ZERO_POINT_ZERO, d1tot=ZERO_POINT_ZERO, d2tot=ZERO_POINT_ZERO;
+
+	//zero out lnL here, since the looping over the various models below will just add to it
+	lnL = ZERO_POINT_ZERO;
+	for(vector<ClaSpecifier>::iterator specs = claSpecs.begin();specs != claSpecs.end();specs++){
+		Model *mod = modPart->GetModel((*specs).modelIndex);
+		
+		ProfModDeriv.Start();
+		mod->CalcDerivatives(nd2->dlen * modPart->SubsetRate((*specs).dataIndex), prmat, deriv1, deriv2);
+		ProfModDeriv.Stop();
+		claOne = setOne->GetCLA((*specs).claIndex);
+		if(setTwo != NULL)
+			claTwo = setTwo->GetCLA((*specs).claIndex);
+
+		bool isNucleotide = mod->IsNucleotide();
+
+		if(nd2->left == NULL){
+			char *childData=nd2->tipData[(*specs).dataIndex];
+			ProfTermDeriv.Start();
+
+			if(isNucleotide == false){
+				if(mod->NRateCats() > 1)
+					GetDerivsPartialTerminalNStateRateHet(claOne, **prmat, **deriv1, **deriv2, childData, d1, d2, (*specs).modelIndex, (*specs).dataIndex);
+				else
+					GetDerivsPartialTerminalNState(claOne, **prmat, **deriv1, **deriv2, childData, d1, d2, (*specs).modelIndex, (*specs).dataIndex);
+				}
+			else {
+	#ifdef OPEN_MP	
+				assert(nd2->ambigMap.size() > (*specs).dataIndex);
+				assert(nd2->ambigMap[(*specs).dataIndex] != NULL);
+			
+				GetDerivsPartialTerminal(claOne, **prmat, **deriv1, **deriv2, childData, d1, d2, (*specs).modelIndex, (*specs).dataIndex, nd2->ambigMap[(*specs).dataIndex]);
+//				GetDerivsPartialTerminal(claOne, **prmat, **deriv1, **deriv2, childData, d1, d2, modIndex, nd2->ambigMap, (*specs).modelIndex, (*specs).dataIndex);
+	#else
+				GetDerivsPartialTerminal(claOne, **prmat, **deriv1, **deriv2, childData, d1, d2, (*specs).modelIndex, (*specs).dataIndex);
+	#endif
+				}
+			assert(d1 == d1);
+			ProfTermDeriv.Stop();
+			}
+		else {
+			ProfIntDeriv.Start();
+	#ifdef EQUIV_CALCS
+			GetDerivsPartialInternalEQUIV(claOne, claTwo, **prmat, **deriv1, **deriv2, d1, d2, nd2->tipData, (*specs).modelIndex, (*specs).dataIndex);
+	#else
+			if(isNucleotide == false){
+				if(mod->NRateCats() > 1)
+					GetDerivsPartialInternalNStateRateHet(claOne, claTwo, **prmat, **deriv1, **deriv2, d1, d2, (*specs).modelIndex, (*specs).dataIndex);
+				else
+					GetDerivsPartialInternalNState(claOne, claTwo, **prmat, **deriv1, **deriv2, d1, d2, (*specs).modelIndex, (*specs).dataIndex);
+				}
+			else
+				GetDerivsPartialInternal(claOne, claTwo, **prmat, **deriv1, **deriv2, d1, d2, (*specs).modelIndex, (*specs).dataIndex);
+	#endif
+			ProfIntDeriv.Stop();
+			}
+		assert(d1 == d1);
+		//account for the different rate scaling factors here
+//		d1tot += d1 ;
+//		d2tot += d2;
+		d1tot += d1 * modPart->SubsetRate((*specs).dataIndex);
+		d2tot += d2 * modPart->SubsetRate((*specs).dataIndex) * modPart->SubsetRate((*specs).dataIndex);
+		}
+
+	assert(d1 == d1);
+	assert(d2 == d2);
+	return pair<FLOAT_TYPE, FLOAT_TYPE>(d1tot, d2tot);
+}
+
+FLOAT_TYPE Tree::BranchLike(TreeNode *optNode){
+
+	bool scoreOK=true;
+	do{
+		try{
+			if(optNode->anc->left==optNode){
+				optNode->anc->claIndexDown = claMan->SetDirty(optNode->anc->claIndexDown);
+				optNode->anc->claIndexUR = claMan->SetDirty(optNode->anc->claIndexUR);		
+				GetClaUpLeft(optNode->anc);
+				}
+			else if(optNode->anc->right==optNode){
+				optNode->anc->claIndexDown = claMan->SetDirty(optNode->anc->claIndexDown);
+				optNode->anc->claIndexUL = claMan->SetDirty(optNode->anc->claIndexUL);
+				GetClaUpRight(optNode->anc);
+				}
+			else {
+				optNode->anc->claIndexUL = claMan->SetDirty(optNode->anc->claIndexUL);
+				optNode->anc->claIndexUR = claMan->SetDirty(optNode->anc->claIndexUR);
+				GetClaDown(optNode->anc);
+				}
+			
+			//now sum as if this were the root
+			ConditionalLikelihoodRateHet(ROOT, optNode->anc);
+			return lnL;
+			}
+		catch(int){
+			scoreOK=false;
+			MakeAllNodesDirty();
+			rescaleEvery -= 2;
+			ofstream resc("rescale.log", ios::app);
+			resc << "rescale reduced to " << rescaleEvery << endl;
+			resc.close();
+			if(rescaleEvery<2) rescaleEvery=2;
+			}			
+		}while(scoreOK==false);
+	return 0;
+	}
+
+void Tree::SampleBlenCurve(TreeNode *nd, ofstream &out){
+	
+	FLOAT_TYPE initialLen=nd->dlen;
+	Score();
+	
+	out << nd->dlen << "\t" << lnL << "\n";
+	
+	SetBranchLength(nd, (FLOAT_TYPE)1e-4);
+	for(int i=0;i<15;i++){
+		Score();
+		out << nd->dlen << "\t" << lnL << "\n";
+		SetBranchLength(nd, nd->dlen * (FLOAT_TYPE)2.0);	
+		}
+	SetBranchLength(nd, initialLen);	
+	} 
+
+void Tree::CalcEmpiricalDerivatives(TreeNode *nd, FLOAT_TYPE &D1, FLOAT_TYPE &D2){
+	FLOAT_TYPE start_blen = nd->dlen;
+
+	FLOAT_TYPE incr;
+	FLOAT_TYPE blen_used = start_blen;
+
+	//derivs will be too small to avoid floating point error
+	//REMEMBER THAT THIS IS NOT ALWAYS ENOUGH THOUGH, AND ESPECIALLY THE 
+	//SEC DERIV CAN STILL BE FAIRLY WRONG
+	double precCompensationFactor = 1.0;
+	double digits = ceil(log10(-lnL));
+	if(digits > 4) precCompensationFactor = pow(10.0, digits - 4);
+
+	if(blen_used > 1e-6){
+		incr = blen_used * 0.001 * precCompensationFactor;
+		blen_used = max(min(start_blen, max_brlen - incr), min_brlen + incr);
+		SetBranchLength(nd, blen_used);
+		}
+	else if(blen_used > min_brlen + 1.0e-8) incr = blen_used * 0.01 * precCompensationFactor; 
+	else{
+/*		ofstream deb("bcurve.log");
+		deb.precision(14);
+		SampleBlenCurve(nd, deb);
+		deb.close();
+*/
+		incr =1.0e-8 * precCompensationFactor * 10;
+		blen_used = max(start_blen, min_brlen * 2.0 + incr);
+		SetBranchLength(nd, blen_used);
+		}
+	
+	MakeAllNodesDirty();
+	Score();
+	FLOAT_TYPE start=lnL;
+
+/*	ofstream deb;
+	deb.open("clas.log");
+	OutputNthClaAcrossTree(deb, root, 274);
+	deb.close();
+*/
+	SetBranchLength(nd, blen_used + incr);
+//	MakeAllNodesDirty();
+	Score();
+
+/*	deb.open("clas.log");
+	OutputNthClaAcrossTree(deb, root, 274);
+	deb.close();
+*/
+	FLOAT_TYPE empD11= (lnL - start)/incr;
+
+//	SetBranchLength(nd, prevDLen);
+//	Score();
+
+	SetBranchLength(nd, blen_used - incr);
+//	MakeAllNodesDirty();
+	Score();
+
+/*	
+	deb.open("clas.log");
+	OutputNthClaAcrossTree(deb, root, 274);
+	deb.close();
+*/
+	FLOAT_TYPE empD12 = (lnL - start)/-incr;
+
+	D1=(empD11+empD12)*.5;
+	D2=(empD11-empD12)/incr;
+
+	SetBranchLength(nd, start_blen);
+//	MakeAllNodesDirty();
+	//Note that setting this isn't important except for proper score output when OPT_DEBUG is on
+	lnL = start;
+	}
+
+#ifdef SPOOF_NEWTON_RAPHSON
+//this allows the ability to play with optimization without actually disrupting program flow
+FLOAT_TYPE Tree::NewtonRaphsonOptimizeBranchLength(FLOAT_TYPE precision1, TreeNode *nd, bool goodGuess){
+	FLOAT_TYPE origLen =  nd->dlen;
+	Score();
+	FLOAT_TYPE origScore = lnL;
+
+	FLOAT_TYPE estNRImprove = NewtonRaphsonSpoof(precision1, nd, goodGuess);
+
+	FLOAT_TYPE nrLen = nd->dlen;
+	Score();
+	FLOAT_TYPE nrScore = lnL;
+
+
+	SetBranchLength(nd, origLen);
+	FLOAT_TYPE estBestImprove = NewtonRaphsonSpoof(0.0001, nd, goodGuess);
+
+	FLOAT_TYPE bestLen = nd->dlen;
+	Score();
+	FLOAT_TYPE bestScore = lnL;
+	
+	FLOAT_TYPE trueNRImprove = nrScore - origScore;
+	FLOAT_TYPE trueBestImprove = bestScore - origScore;
+
+	SetBranchLength(nd, nrLen);
+
+	ofstream spoof("optspoof.log", ios::app);
+	spoof << nd->nodeNum << "\t" << origLen << "\t" << origScore << "\t" << goodGuess << "\n";
+	spoof << "\t" << nrLen << "\t" << nrScore << "\t" << estNRImprove << "\t" << trueNRImprove << "\n";
+	spoof << "\t" << bestLen << "\t" << bestScore << "\t" << estBestImprove << "\t" << trueBestImprove << "\n";
+	spoof.close();
+
+	return estNRImprove;
+}
+
+FLOAT_TYPE Tree::NewtonRaphsonSpoof(FLOAT_TYPE precision1, TreeNode *nd, bool goodGuess){
+#else
+ FLOAT_TYPE Tree::NewtonRaphsonOptimizeBranchLength(FLOAT_TYPE precision1, TreeNode *nd, bool goodGuess){
+#endif
+/*	if(goodGuess==false && (nd->dlen < 0.0001 || nd->dlen > .1)){
+		SetBranchLength(nd, (FLOAT_TYPE).001);
+		}
+*/
+//if(nd->dlen==min_brlen){
+#ifdef OPT_DEBUG
+/*
+if(nd->nodeNum == 8){
+	ofstream scr("NRcurve.log");
+	scr.precision(20);
+	assert(scr.good());
+	scr.precision(15);
+	FLOAT_TYPE initDlen = nd->dlen;
+	for(FLOAT_TYPE d=1e-8;d<.5;d*=1.33){
+		nd->dlen = d;
+		SweepDirtynessOverTree(nd);
+		Score();
+		scr << d << "\t" << lnL << endl;
+		}
+	nd->dlen=initDlen;
+	SweepDirtynessOverTree(nd);
+	scr.close();
+	}	
+*/
+#endif
+//	nd->dlen=.3254;
+//	SweepDirtynessOverTree(nd);
+/*
+	if(nd->nodeNum==67){	
+		ofstream deb("curves.log");
+		SampleBlenCurve(nd, deb);
+		deb.close();
+		}
+*/	
+
+//	MakeAllNodesDirty();
+/*	FLOAT_TYPE start, empD11, empD12, empD1, empD2;
+	 if(nd->nodeNum == 4 && nd->dlen < 1e-7 && nd->anc->nodeNum==12 && nd->next != NULL && nd->next->nodeNum==10){
+	 //if(0){
+		SetBranchLength(nd, 1.0e-5);
+		MakeAllNodesDirty();
+		Score();
+		 }
+*/
+
+#ifdef OPT_DEBUG
+//	ofstream log("optimization.log", ios::app);
+//	log.precision(10);
+
+	opt.precision(8);
+	opt << nd->nodeNum << "\t" << nd->dlen << "\t" << lnL <<endl;
+	
+//	ofstream scr("impVSd1.log", ios::app);
+
+/*	if(lnL > -2){
+		Score(nd->anc->nodeNum);
+		}
+	FLOAT_TYPE poo = lnL;
+
+	MakeAllNodesDirty();
+	Score(nd->anc->nodeNum);
+	assert(FloatingPointEquals(poo, lnL, 1e-4));
+*/
+	FLOAT_TYPE delta;
+	
+#endif
+	FLOAT_TYPE totalEstImprove=ZERO_POINT_ZERO;
+	int iter=0;
+	FLOAT_TYPE abs_d1_prev=FLT_MAX;
+	const FLOAT_TYPE v_onEntry=nd->dlen;
+	FLOAT_TYPE v=nd->dlen;
+	FLOAT_TYPE v_prev = nd->dlen;				/* in case we don't like the new value (see below) */
+	bool moveOn = false;
+	FLOAT_TYPE prevScore=lnL;
+	FLOAT_TYPE curScore=lnL;
+	int negProposalNum=0;
+	FLOAT_TYPE knownMin=min_brlen, knownMax=max_brlen;
+	FLOAT_TYPE d1, d2, estScoreDelta, estDeltaNR;
+
+	FLOAT_TYPE initialL;
+
+	do{
+		bool scoreOK;
+		int sweeps=0;
+#undef EMPERICAL_DERIVS
+
+#ifndef EMPERICAL_DERIVS
+		pair<FLOAT_TYPE, FLOAT_TYPE> derivs;
+		do{		//this part just catches the exception that could be thrown by the rescaling 
+				//function if it decides that the current rescaleEvery is too large
+			try{
+				scoreOK=true;
+				derivs = CalcDerivativesRateHet(nd->anc, nd);
+				if(iter == 0) initialL = lnL;
+				optCalcs++;
+				}catch(int err){
+				scoreOK=false;
+				if(err==1){
+					MakeAllNodesDirty();
+					rescaleEvery -= 2;
+					ofstream resc("rescale.log", ios::app);
+					resc << "rescale reduced to " << rescaleEvery << endl;
+					resc.close();
+					if(rescaleEvery<2) throw(ErrorException("Problem with rescaling in branchlength optimization.\nPlease report this error (and the details of your analysis) to garli.support at gmail.com."));
+					}
+				else if(err==2){
+					//this is necessary because rarely it is possible that attempted optimization at nodes
+					//across the tree causes more than a single set of clas to be in use, which can cause 
+					//clas to run out if we are in certain memory situations
+					assert(sweeps==0);
+					SweepDirtynessOverTree(nd);
+					sweeps++;
+					}
+				}
+			}while(scoreOK==false);		
+		
+		d1=derivs.first;
+		d2=derivs.second;
+#else
+		if(iter == 0){
+			if(lnL > -2)
+				Score(nd->anc->nodeNum);
+			initialL = lnL;
+			}
+		CalcEmpiricalDerivatives(nd, d1, d2);
+#endif
+
+#ifdef OPT_DEBUG
+		FLOAT_TYPE empD1, empD2;
+//		if(nd->nodeNum == 67 && nd->anc->nodeNum==96){// && nd->anc->nodeNum==12 && nd->next != NULL && nd->next->nodeNum==10){
+//			SetBranchLength(nd, 0.01);
+//			CalcEmpiricalDerivatives(nd, empD1, empD2);
+//			opt << empD1 << "\t" << empD2 << "\t" << nd->dlen + (-empD1/empD2) << "\t";
+//			d1 = empD1;
+//			d2 = empD2;
+//			}
+#endif
+
+		estDeltaNR=-d1/d2;
+		//estimated change in score by a Taylor series
+		estScoreDelta = d1*estDeltaNR + (d2 * estDeltaNR * estDeltaNR * ZERO_POINT_FIVE);
+
+		if(d1 <= ZERO_POINT_ZERO && nd->dlen < knownMax) knownMax = nd->dlen;
+		else if(d1 > ZERO_POINT_ZERO && nd->dlen > knownMin) knownMin = nd->dlen;
+
+														#ifdef OPT_DEBUG			
+														opt << nd->dlen << "\t" << lnL << "\t" << d1 << "\t" << d2 << "\t" << estScoreDelta << "\t";		
+														#endif
+		FLOAT_TYPE abs_d1 = fabs(d1);
+		if (d2 >= ZERO_POINT_ZERO){//curvature is wrong for NR use 
+			//this does NOT only happen when the peak is at the min, as I used to think
+														#ifdef OPT_DEBUG			
+														opt << "d2 > 0\t";				
+														#endif
+			//Not allowing this escape anymore
+			if(fabs(d1) < ONE_POINT_ZERO){//don't bother doing anything if the surface is this flat
+														#ifdef OPT_DEBUG			
+														opt << "very small d1.\t";				
+														#endif				
+//				return totalEstImprove;
+				}
+
+			if(d1 <= ZERO_POINT_ZERO){//if d1 is negative, try shortening arbitrarily, or go halfway to the knownMin
+				FLOAT_TYPE proposed;
+#ifdef SINGLE_PRECISION_FLOATS
+				if(FloatingPointEquals(nd->dlen, min_brlen, 1.0e-8f)){
+					#ifdef OPT_DEBUG
+					opt << "already at min, return\n"; 
+					#endif
+					return totalEstImprove;
+					}
+					
+				if(knownMin == min_brlen){
+					if(nd->dlen <= 1.0e-4f) proposed = min_brlen;
+					else if(nd->dlen <= 0.005f) proposed = 1.0e-4f;
+					else if(nd->dlen <= 0.05f) proposed = nd->dlen * 0.1f;
+					else proposed = nd->dlen * 0.25f;
+					}
+#else
+				if(FloatingPointEquals(nd->dlen, min_brlen, 1.0e-8)){
+//DEBUG
+					if(lnL < initialL - pow(10.0, -6.0+ceil(log10(-lnL)))){
+						outman.DebugMessage("Score worsened by %.6f, restoring blen, exiting", initialL - lnL);
+						SetBranchLength(nd, v_onEntry);
+						//9/25/13 There was a dumb bug here where even if the blen was reset a positive 
+ 						//improvement could be returned.  This code only gets executed very infrequently, 
+ 						//and the bug only caused issues under very specific and even more rare conditions.
+ 						//e.g., when only this branch was in the optimize queue
+						totalEstImprove = ZERO_POINT_ZERO;
+						Score();
+						}
+					assert(lnL >= initialL - pow(10.0, -6.0+ceil(log10(-lnL))));
+					#ifdef OPT_DEBUG
+					opt << "already at min, return\n"; 
+					#endif
+					return totalEstImprove;
+					}
+
+				if(knownMin == min_brlen){
+					if(nd->dlen <= 1.0e-4) proposed = min_brlen;
+					else if(nd->dlen <= 0.005) proposed = 1.0e-4;
+					else if(nd->dlen <= 0.05) proposed = nd->dlen * 0.1;
+					else proposed = nd->dlen * 0.25;
+					}
+#endif
+				else proposed = (knownMin + nd->dlen) * ZERO_POINT_FIVE;
+
+				if(iter > 0 || proposed == min_brlen){//don't let this bail out on the first iteration based on the estimated
+					//change if we are jumping to an arbitrary point, because we are just trying to get to a point
+					//where we can actually trust the derivs
+					FLOAT_TYPE estImp = d1*(proposed - nd->dlen) + (d2 * (proposed - nd->dlen) * (proposed - nd->dlen) * ZERO_POINT_FIVE);
+					if(estImp < precision1){
+						//DEBUG - this shouldn't really be bailing because of low potential improvement
+						//unless the likelihood is at least as good as it was coming in
+						if(lnL >= initialL - 1.0e-4){
+														#ifdef OPT_DEBUG
+														opt << "imp to proposed " << proposed << " < prec, return\n";
+														#endif
+							return totalEstImprove;
+							}
+														#ifdef OPT_DEBUG
+														else opt << "don't return!";
+														#endif
+						}
+					}
+				v=proposed;
+				totalEstImprove += precision1;
+				}
+
+			else{//d1 > 0.0, try increasing the blen by 10 or 2 if knownMax==max_brlen, otherwise try a step half-way to the knownMax
+				FLOAT_TYPE proposed;
+				if(knownMax == max_brlen){
+#ifdef SINGLE_PRECISION_FLOATS
+					if(nd->dlen < 0.1f) proposed = nd->dlen * 10.0f;
+					else proposed = min(nd->dlen * 2.0f, max_brlen);
+#else
+					if(nd->dlen < 0.1) proposed = nd->dlen * 10.0;
+					else proposed = min(nd->dlen * 2.0, max_brlen);
+#endif
+				}
+				else proposed = (knownMax + nd->dlen) * ZERO_POINT_FIVE;
+
+				if(iter > 0){//don't let this bail out on the first iteration based on the estimated
+					//change if we are jumping to an arbitrary point, because we are just trying to get to a point
+					//where we can actually trust the derivs
+					FLOAT_TYPE estImp = d1*(proposed - nd->dlen) + (d2 * (proposed - nd->dlen) * (proposed - nd->dlen) * ZERO_POINT_FIVE);
+					if(estImp < precision1){
+						//DEBUG - this shouldn't really be bailing because of low potential improvement
+						//unless the likelihood is at least as good as it was coming in
+						if(lnL >= initialL - 1.0e-4){
+														#ifdef OPT_DEBUG
+														opt << "imp to prop < prec, return\n";
+														#endif
+							return totalEstImprove;
+							}
+														#ifdef OPT_DEBUG
+														else opt << "don't return!";
+														#endif
+						}
+					}
+				v=proposed;
+				totalEstImprove += precision1;				
+				}
+			}
+		else{//trying NR is feasible
+
+			if(d1 < ZERO_POINT_ZERO && FloatingPointEquals(nd->dlen, min_brlen, 1.0e-8)){
+														#ifdef OPT_DEBUG
+														opt << "already at min, return\n"; 
+														#endif
+				return totalEstImprove;
+				}
+			if(d1 > ZERO_POINT_ZERO && FloatingPointEquals(nd->dlen, max_brlen, 1.0e-8)){
+														#ifdef OPT_DEBUG
+														opt << "already at max, return\n"; 
+														#endif
+				return totalEstImprove;
+				}
+			
+			//12/9/07 now requiring the actual likelihood to improve.  Single optimization passes with AA and Codon
+			//models were fairly often moving to worse likelihoods but indicating that the function should return
+			//since the deriv calculations are now calculating the true likelihood, this has no real overhead		
+#ifdef NR_EXIT_96
+			if(estScoreDelta < precision1 && (iter == 0 || lnL >= initialL)){
+#elif defined(NR_EXIT_R340)
+			if(estScoreDelta < precision1 && (iter == 0 || lnL + 1.0e-8 >= initialL)){
+#elif defined(NR_EXIT_R343)
+			if(estScoreDelta < precision1 && (iter == 0 || lnL + max(1.0e-7, GARLI_FP_EPS * 10.0) >= initialL)){
+#else
+			//this will gradually increase the tolerated amount of score worsening (due to floating point imprecision)
+			//as the iterations go on.  If possible we'd still like to see very close scores, but if we're having
+			//trouble getting close after many iterations we don't want to terminate the program.  If something is
+			//horribly wrong with the scores this will still cause termination.
+			if(estScoreDelta < precision1 && (iter == 0 || lnL + ((iter < 10 ? 1 : iter) * max(1.0e-7, GARLI_FP_EPS * 10.0)) >= initialL)){
+#endif
+														#ifdef OPT_DEBUG			
+														opt << "delta < prec, return\n";
+														if(curScore==-ONE_POINT_ZERO){
+															Score(nd->anc->nodeNum);
+															}		
+														#endif
+				return totalEstImprove;
+				}
+			else{/* Take the Newton-Raphson step */
+				bool noNR = false;
+				if(iter > 10) {
+					//If we've taken a lot of NR steps without bracketing the peak (diagnosed by
+					//the knownMax or knownMin being equal to the max or min brlen), make 
+					//some agresssive moves.  This is often useful when the tree/branch lengths are
+					//terrible and numerical instability creeps into the derivative and likelihood
+					//calculations, which can cause the NR moves based on the derivs to be extremely
+					//conservative.  That only really seems to be an issue in codon models
+					if(d1 > ZERO_POINT_ZERO){
+						if(FloatingPointEquals(knownMax, max_brlen, 1e-8)){
+							if((iter > 20) && (nd->dlen > (max_brlen/2.0)))
+								v = max_brlen;
+							else{
+								if(v < 0.2)
+									v = min((v + max_brlen)*0.5, v*5.0);
+								else 
+									v = min((v + max_brlen)*0.5, v*2.0);
+								}
+							noNR = true;
+														#ifdef OPT_DEBUG			
+														opt << "IgnoreNRUp\t";
+														#endif
+							}
+						else if(((iter - 20) > 0) && ((iter - 20) % 10 == 0)){
+							//another annoying special case (only for codon models I think)
+							//it is possible for the derivs to apparently be
+							//correct but for the NR estimate to still be so conservative that it takes forever
+							//to converge.  The above code can take care of that if we've never been to the right
+							//of the peak (knownMax == max_brlen), but this can also happen if we were to right 
+							//of the peak at one point and jumped all the way to the min length.  In that case,
+							//try a jump to the midpoint of the bracket or 100x the current length,
+							//whichever is less
+							v = min((v + knownMax)*0.5, v*100.0);
+														#ifdef OPT_DEBUG
+														opt << "IgnoreNRUp2\t";
+														#endif
+							}
+						}
+					else{
+						if(FloatingPointEquals(knownMin, min_brlen, 1e-8)){
+							if(iter > 20)
+								v = min_brlen;
+							else
+								v = (v + min_brlen)*0.5;
+							noNR = true;
+														#ifdef OPT_DEBUG			
+														opt << "IgnoreNRDown\t";
+														#endif
+							}
+						}
+					}
+				if(noNR == false)
+					v += estDeltaNR;
+
+														#ifdef OPT_DEBUG
+														opt << v << "\t";			
+														#endif
+
+				}
+			if ((iter != 0) && (abs_d1 > abs_d1_prev)){
+				//not doing anything special here.  This generally means that we overshot the peak, but
+				//should get it from the other side
+														#ifdef OPT_DEBUG			
+														opt << "d1 increased!\t";	
+														#endif
+				}
+			if (v <= knownMin){
+				negProposalNum++;
+				if(knownMin == min_brlen){
+					FLOAT_TYPE deltaToMin=min_brlen-nd->dlen;
+					FLOAT_TYPE scoreDeltaToMin = (deltaToMin * d1 + (deltaToMin*deltaToMin*d2*ZERO_POINT_FIVE));
+					if(scoreDeltaToMin < precision1){
+													#ifdef OPT_DEBUG
+													opt << "imp to MIN < prec, return\n";			
+													#endif
+						return totalEstImprove;
+						}
+#ifdef SINGLE_PRECISION_FLOATS
+					else if(negProposalNum==1 && nd->dlen > 1e-4f && v_prev != 1e-4f){
+						//try a somewhat smaller length before going all the way to the min
+						if(nd->dlen < .005f ) v = 1e-4f;
+						else if(nd->dlen < 0.05f) v = nd->dlen * 0.1f;
+						else v = nd->dlen * .25f;
+#else
+					else if(negProposalNum==1 && nd->dlen > 1e-4 && v_prev != 1e-4){
+						//try a somewhat smaller length before going all the way to the min
+						if(nd->dlen < .005 ) v = 1e-4;
+						else if(nd->dlen < 0.05) v = nd->dlen * 0.1;
+						else v = nd->dlen * 0.25;
+#endif
+						FLOAT_TYPE delta=v - nd->dlen;
+						totalEstImprove += (delta * d1 + (delta*delta*d2*ZERO_POINT_FIVE));
+						}
+					else{
+						v = min_brlen;
+						totalEstImprove += scoreDeltaToMin;
+						}
+					}
+				else{//knownMin is > absolute min, so we must already have a better guess
+					//go half way to that guess
+					FLOAT_TYPE proposed = (knownMin + nd->dlen) * ZERO_POINT_FIVE;
+					FLOAT_TYPE deltaToMin=proposed-nd->dlen;
+					FLOAT_TYPE scoreDeltaToMin = (deltaToMin * d1 + (deltaToMin*deltaToMin*d2*ZERO_POINT_FIVE));
+
+#ifdef ALT_NR_BAIL
+					//For exit, this used to not require that the lnL had improved from the starting value, only that the expected improvement
+					//for the next jump was small.  Now require improvement, but with a bit of scoring error tolerance.  This will probbably
+					//only come up with SP, in which case the max number of passes will be taken and then the initial blen will be restored below
+					if(scoreDeltaToMin < precision1){
+//						outman.DebugMessage("would have bailed\t%.6f\t%.6f\t%.6f\t%.6f\t%.6f", lnL, knownMin, nd->dlen, scoreDeltaToMin, (lnL - initialL));
+						#ifdef OPT_DEBUG		
+							opt << "would have bailed\t" <<  scoreDeltaToMin << "\t" << (lnL - initialL);
+						#endif
+						}
+					if(scoreDeltaToMin < precision1 &&  lnL + ((iter < 10 ? 1 : iter) * max(1.0e-7, GARLI_FP_EPS * 10.0)) >= initialL){
+#else
+					if(scoreDeltaToMin < precision1){
+#endif
+						#ifdef OPT_DEBUG
+						opt << "imp to knownMIN < prec, return\n";
+						#endif
+						return totalEstImprove;
+						}
+					v=proposed;
+					totalEstImprove += scoreDeltaToMin;				
+					}
+				}
+			
+			else if (v >= knownMax){
+				if(knownMax == max_brlen){
+					FLOAT_TYPE deltaToMax=max_brlen - nd->dlen;
+					FLOAT_TYPE scoreDeltaToMax = (deltaToMax * d1 + (deltaToMax*deltaToMax*d2*ZERO_POINT_FIVE));
+					if(scoreDeltaToMax < precision1){
+						#ifdef OPT_DEBUG
+						opt << "imp to MAX < prec, return\n";
+						#endif
+						return totalEstImprove;
+						}
+					else{
+						v = max_brlen;
+						totalEstImprove += scoreDeltaToMax;
+						}
+					}
+				else{//knownMax is < absolute max, so we must already have a better guess
+					//go half way to that guess
+					FLOAT_TYPE proposed = (knownMax + nd->dlen) * ZERO_POINT_FIVE;
+					FLOAT_TYPE deltaToMax=proposed-nd->dlen;
+					FLOAT_TYPE scoreDeltaToMax = (deltaToMax * d1 + (deltaToMax*deltaToMax*d2*ZERO_POINT_FIVE));
+#ifdef ALT_NR_BAIL
+					//For exit, this used to not require that the lnL had improved from the starting value, only that the expected improvement
+					//for the next jump was small.  Now require improvement, but with a bit of scoring error tolerance.  This will probbably
+					//only come up with SP, in which case the max number of passes will be taken and then the initial blen will be restored below
+					if(scoreDeltaToMax < precision1){
+//						outman.DebugMessage("would have bailed\t%.6f\t%.6f\t%.6f\t%.6f\t%.6f", lnL, knownMin, nd->dlen, scoreDeltaToMax, (lnL - initialL));
+						#ifdef OPT_DEBUG		
+							opt << "would have bailed\t" <<  scoreDeltaToMax << "\t" << (lnL - initialL);
+						#endif
+						}	
+					if(scoreDeltaToMax < precision1 &&  lnL + ((iter < 10 ? 1 : iter) * max(1.0e-7, GARLI_FP_EPS * 10.0)) >= initialL){
+#else
+					if(scoreDeltaToMax < precision1){
+#endif
+						#ifdef OPT_DEBUG
+						opt << "imp to knownMAX < prec, return\n";
+						#endif
+						return totalEstImprove;
+						}
+					v=proposed;
+					totalEstImprove += scoreDeltaToMax;
+					}
+				}
+			else totalEstImprove += estScoreDelta;
+
+			abs_d1_prev = abs_d1;
+			}
+		assert(v >= min_brlen);
+		assert(v >= knownMin);
+		assert(v <= knownMax);
+
+		SetBranchLength(nd, v);
+
+#ifdef OPT_DEBUG
+		//Score(nd->anc->nodeNum);
+
+		if(curScore != -ONE_POINT_ZERO){
+			if(lnL < curScore){
+				cout << lnL << "\t" << curScore << endl;
+				if(curScore - lnL < .005){
+					//don't want to have different logic when OPT_DEBUG is on
+//					SetBranchLength(nd, v_prev);
+//					Score(nd->anc->nodeNum);
+//					return lnL;
+					}
+				else {//assert(0);
+					FLOAT_TYPE poo=lnL;
+					SetBranchLength(nd, v_prev);
+					MakeAllNodesDirty();
+					Score(nd->anc->nodeNum);
+					assert(fabs(prevScore - lnL) < .01);
+					
+					SetBranchLength(nd, v);
+					MakeAllNodesDirty();
+					Score(nd->anc->nodeNum);
+					assert(fabs(poo - lnL) < .01);
+					}
+				}
+			}
+				
+		curScore=lnL;	
+		delta=prevScore - lnL;
+
+opt << v << "\t" << "\n";
+opt.flush();
+#endif
+
+		prevScore=lnL;
+		v_prev=v;
+		
+		iter++;
+		if(iter>50){
+/*			ofstream deb("optdeb.log");
+			deb << "initial length " << v_onEntry << endl;
+			deb << "current length " << nd->dlen << endl;
+			deb << "prev length " << v_prev << endl;
+			deb << "d1 " << d1 << " d2 " << d2 << endl;
+			deb << "neg proposal num " << negProposalNum << endl;			
+			deb.close();
+*/
+
+			if(iter > 100){
+				outman.DebugMessage("100 passes in NR!");
+
+				Score(nd->anc->nodeNum);
+				//now going to allow escape after 100 passes in all SP runs, and in DP codon runs.  This should only happen due to numerical problems, and these
+				//are situations where numerical problems are known to occur.
+				//Update - when blen MLE is very large I've found cases where there are true multiple blen optima for a single blen trace.  So, allowing an
+				//exemption in that case if the lnL loss was minor.
+#ifndef SINGLE_PRECISION_FLOATS		
+				bool someCodon = false;
+				for(int m = 0;m < modSpecSet.NumSpecs();m++){
+					if(modSpecSet.GetModSpec(m)->IsCodon()){
+						someCodon = true;
+						}
+					}		
+				//DEBUG PART - not sure how to transfer this from trunk
+				if(someCodon == false && (nd->dlen < 0.5 && v_onEntry < 0.5) && (initialL > lnL + 0.1)) 
+					throw(ErrorException("Problem with branchlength optimization.  Please report this error (and the details of your analysis) to garli.support at gmail.com.\n"));
+				else 
+				if(nd->dlen < 0.5 && v_onEntry < 0.5)
+					outman.UserMessage("Notice: possible problem with branchlength optimization.\nIf you see this message frequently, please report it (and the details of your analysis) to garli.support at gmail.com.\nIf you only see it once, you may ignore it.\n");
+				else
+					outman.DebugMessage("NOTE 100 passes in NR, long blens involved. \nDetails: nd=%d init=%f cur=%f prev=%d d1=%f d2=%f neg=%d", nd->nodeNum, v_onEntry, v_prev, nd->dlen, d1, d2, negProposalNum);
+#endif
+
+				outman.DebugMessage(">>>>%.6f  %.6f <<<<", initialL, lnL);
+				if(lnL > initialL){
+					outman.DebugMessage("Score improved by %.6f, exiting", initialL - lnL);
+#ifdef OPT_DEBUG
+					opt << "100 passes, score improved, keeping blen " << v << endl;
+#endif
+					return totalEstImprove;
+					}
+				else{
+					outman.DebugMessage("Score worsened by %.6f, restoring blen, exiting", initialL - lnL);
+#ifdef OPT_DEBUG
+					opt << "100 passes, score worsened, restoring initial blen " << v_onEntry << endl;
+#endif
+					SetBranchLength(nd, v_onEntry);
+					Score();
+					return ZERO_POINT_ZERO;
+					}
+				}
+
+/*
+				ofstream scr("NRcurve.log");
+				scr.precision(20);
+				assert(scr.good());
+				scr.precision(15);
+				FLOAT_TYPE initDlen = nd->dlen;
+				for(FLOAT_TYPE d=1e-8;d<.5;d*=1.33){
+					nd->dlen = d;
+					SweepDirtynessOverTree(nd);
+					Score();
+					scr << d << "\t" << lnL << endl;
+					}
+				nd->dlen=initDlen;
+				SweepDirtynessOverTree(nd);
+				scr.close();
+
+			bool poo=true;
+			outman.UserMessage("long opt: %d", iter);
+			ofstream deb("longopt.log", ios::app);
+			deb << iter << "\t" << precision1 << "\t" << nd->nodeNum << "\t" << v_onEntry << "\t" << nd->dlen << "\t" << d1 << "\t" << d2 << "\t" << estDeltaNR << "\t" << estScoreDelta << "\t" << negProposalNum << "\n";
+			deb.close();
+*/
+//			while(poo){
+//				opt.close();
+//				}
+			//assert(iter<=50);
+			}		
+		}while(moveOn==false);
+#ifdef OPT_DEBUG
+	opt << "final\t" << nd->dlen << "\t" << lnL << endl;
+#endif
+	assert(0);//shouldn't be exiting this way
+	return totalEstImprove;
+	}
+/*
+void Tree::RecursivelyOptimizeBranches(TreeNode *nd, FLOAT_TYPE optPrecision, int subtreeNode, int radius, int centerNode, bool dontGoNext){
+	FLOAT_TYPE prevScore=lnL;
+#ifdef BRENT	
+	BrentOptimizeBranchLength(optPrecision, nd, false);
+	FLOAT_TYPE delta=lnL - prevScore;
+	bool continueOpt=(delta*2.0 > optPrecision ? true : false);
+#else
+	bool continueOpt = NewtonRaphsonOptimizeBranchLength(optPrecision, nd);
+//	continueOpt=true;
+#endif
+	
+	if(nd->left!=NULL && radius>1 && continueOpt) RecursivelyOptimizeBranches(nd->left, optPrecision, subtreeNode, radius-1, centerNode, false);
+	if(nd->next!=NULL && dontGoNext==false){
+		RecursivelyOptimizeBranches(nd->next, optPrecision, subtreeNode, radius, centerNode, false);
+		}
+	}
+
+void Tree::RecursivelyOptimizeBranchesDown(TreeNode *nd, TreeNode *calledFrom, FLOAT_TYPE optPrecision, int subtreeNode, int radius, int ){
+	FLOAT_TYPE prevScore=lnL;
+#ifdef BRENT	
+	BrentOptimizeBranchLength(optPrecision, nd, false);
+	FLOAT_TYPE delta=lnL - prevScore;
+	bool continueOpt=(delta*2.0 > optPrecision ? true : false); 
+#else
+	bool continueOpt = NewtonRaphsonOptimizeBranchLength(optPrecision, nd);
+//	continueOpt=true;
+#endif
+	
+	if(nd->left!=NULL && nd->left!=calledFrom && radius>1) RecursivelyOptimizeBranches(nd->left, optPrecision, subtreeNode, radius, 0, true);
+	else if(radius>1) RecursivelyOptimizeBranches(nd->left->next, optPrecision, subtreeNode, radius, 0, false);
+	if(nd->anc!=root && radius>1 && continueOpt){
+		RecursivelyOptimizeBranchesDown(nd->anc, nd, optPrecision, subtreeNode, radius-1, 0);
+		}
+	if(nd->anc==root){
+		if(radius>1 && continueOpt){
+			if(nd->next!=NULL) RecursivelyOptimizeBranches(nd->next, optPrecision, subtreeNode, radius-1, 0, true);
+			else RecursivelyOptimizeBranches(nd->prev->prev, optPrecision, subtreeNode, radius-1, 0, true);
+			if(nd->prev!=NULL) RecursivelyOptimizeBranches(nd->prev, optPrecision, subtreeNode, radius-1, 0, true);
+			else RecursivelyOptimizeBranches(nd->next->next, optPrecision, subtreeNode, radius-1, 0, true);
+			}
+		}
+	}
+*/
+/*
+void Tree::OptimizeBranchesAroundNode(TreeNode *nd, FLOAT_TYPE optPrecision, int subtreeNode){
+	//this function will optimize the three branches (2 descendents and one anc) connecting
+	//to it.  It assumes that everything that is dirty has been marked so.
+	//by default there is only a single optimization pass over the three nodes
+	FLOAT_TYPE precision1, precision2;
+
+	if(subtreeNode==0) SetAllTempClasDirty();
+	
+	precision1=optPrecision;// * 0.5;
+	if(optPrecision > .2) precision2=0.0;
+	else precision2=precision1 * 0.5;
+	
+	if(nd != root){
+		BrentOptimizeBranchLength(precision1, nd, false);
+		BrentOptimizeBranchLength(precision1, nd->left, false);
+		BrentOptimizeBranchLength(precision1, nd->right, false);
+		}
+	else{
+		BrentOptimizeBranchLength(precision1, nd->left, false);
+		BrentOptimizeBranchLength(precision1, nd->left->next, false);
+		BrentOptimizeBranchLength(precision1, nd->right, false);	
+		}
+
+	
+	if(precision2 > 0){
+		//if were're doing multiple optimization passes, only this stuff needs to be set dirty
+		claMan->SetDirty(nd->nodeNum, nd->claIndex, true);
+		claMan->SetTempDirty(nd->nodeNum, true);
+		if(nd != root) claMan->SetTempDirty(nd->anc->nodeNum, true);
+
+		if(nd != root){
+			BrentOptimizeBranchLength(precision2, nd, false);
+			BrentOptimizeBranchLength(precision2, nd->left, false);
+			BrentOptimizeBranchLength(precision2, nd->right, false);
+			}
+		else {
+			BrentOptimizeBranchLength(precision2, nd->left, false);
+			BrentOptimizeBranchLength(precision2, nd->left->next, false);
+			BrentOptimizeBranchLength(precision2, nd->right, false);			
+			}
+		}
+		
+	//these must be called after all optimization passes are done around this node
+	TraceDirtynessToRoot(nd);
+	if(subtreeNode==0)
+		SetAllTempClasDirty();
+	else SetTempClasDirtyWithinSubtree(subtreeNode);
+	}
+*/
+
+/*
+inline FLOAT_TYPE CallBranchLike(TreeNode *thisnode, Tree *thistree, FLOAT_TYPE blen){
+	thisnode->dlen=exp(blen);
+	return thistree->BranchLike(thisnode)*-1;
+	}
+	
+inline FLOAT_TYPE CallBranchLikeRateHet(TreeNode *thisnode, Tree *thistree, FLOAT_TYPE blen){
+
+	thisnode->dlen=blen;
+	FLOAT_TYPE like=thistree->BranchLikeRateHet(thisnode)*-1;
+
+#ifdef OPT_DEBUG
+	ofstream opt("optimization.log" ,ios::app);
+	opt.precision(11);	
+	opt << thisnode->dlen << "\t" << like << "\n\t";
+	opt.close();
+
+	ofstream opttrees("opttrees.tre", ios::app);
+		char treeString[20000];
+		thistree->root->MakeNewick(treeString, false);
+		opttrees <<  "utree tree1=" << treeString << ";" << endl;
+		opttrees.close();
+	//if(thisnode->left!=NULL) thistree->TraceDirtynessToRoot(thisnode);
+	
+	ofstream scr("optscores.log", ios::app);
+	scr.precision(10);
+	scr << like << "\t" << blen << endl;
+	scr.close(); 
+#endif
+
+	thistree->RerootHere(thisnode->nodeNum);
+	thistree->MakeAllNodesDirty();
+	thistree->Score(thistree->data);
+	
+	return like;
+	}
+
+FLOAT_TYPE Tree::BrentOptimizeBranchLength(FLOAT_TYPE accuracy_cutoff, TreeNode *here, bool firstPass){
+	//we pass the node whose branch length whose blen we want to optimize, but note that the
+	//calculations occur at the node below that
+	//if firstPass is true, we have no idea what a reasonable value for the blen is, so
+	//use a wide bracket.  If it is false, try a fairly tight bracket around the current val
+	FLOAT_TYPE a, b, c, fa, fb, fc, minimum, minScore=0.0;
+	FLOAT_TYPE blen=here->dlen;
+
+	assert(blen>=min_brlen);
+
+	if(here->anc){
+		if(firstPass){
+			if(blen<1e-6){
+				a=min_brlen;
+				if(blen!=min_brlen){
+					b=blen;
+					}
+				else{
+					b=min_brlen*100;
+					lnL=-1;
+					}
+				c=min_brlen*10000.0;
+				}				
+			else{
+				if(blen<.0001){
+					a=.000001;
+					b=blen;
+					c=.01;
+					}
+				else if(blen<.1){
+					a=.0001;
+					b=blen;
+					c=.1;
+					}
+				else {
+					a=.1;
+					b=blen;
+					c=.75;					
+					}
+
+		}
+			}
+		else{
+			//tighter 
+			if(blen > 1e-6){
+				a=blen*.66;
+				b=blen;
+				c=blen*1.5;
+				}
+			else{
+				a=min_brlen;
+				if(blen!=min_brlen){
+					b=blen;
+					}
+				else{
+					b=min_brlen*100;
+					lnL=-1;
+					}
+				c=min_brlen*10000.0;				
+				}			
+			}
+
+#ifdef OPT_DEBUG
+		ofstream opt("optimization.log" ,ios::app);
+		opt << "node " << here->nodeNum << "\t" << here->dlen  << "\n";
+//		opt << "\t" << a << "\t" << b << "\t" << c << "\n";
+#endif
+			
+		if(mod->NRateCats()==1){
+			mnbrak(&a, &b, &c, &fa, &fb, &fc, CallBranchLike, here, this);
+	//		opt << a << "\t" << b << "\t" << c << "\t";
+			brent(a, b, c, CallBranchLike, accuracy_cutoff, &minimum, here, this);
+			}
+		else{
+#ifdef OPT_DEBUG
+			opt << "brak\t";
+			opt.close();
+#endif
+			fb=lnL;
+			int zeroMLE = DZbrak(&a, &b, &c, &fa, &fb, &fc, CallBranchLikeRateHet, here, this);
+			
+			bool flatSurface=false;
+			if(fa-fb + fc-fb < .000001) flatSurface=true;
+			//braka=fa;
+			//brakb=fb;
+#ifdef OPT_DEBUG
+			ofstream opt("optimization.log" ,ios::app);
+//			opt << "bracket\t" << a << "\t" << fa << "\n\t" << b << "\t" << fb << "\n\t" << c << "\t" << fc << endl;
+			opt << "brent\t";
+			opt.close();
+#endif
+			if(zeroMLE==0 && flatSurface==false) //if the bracket suggests that the MLE is very near 0, don't bother calling brent
+				minScore=DZbrent(a, b, c, fa, fb, fc, CallBranchLikeRateHet, accuracy_cutoff, &minimum, here, this);
+			else if(zeroMLE==1){
+				minimum=(min_brlen);
+				if(a==min_brlen) minScore=fa;
+				else if(c==min_brlen) minScore=fc;
+				else minScore=-1;
+				}
+			else{
+				minimum=b;
+				minScore=fb;
+				}
+			}
+		FLOAT_TYPE min_len=minimum;		
+//		FLOAT_TYPE min_len=exp(minimum);
+		here->dlen = (min_len > min_brlen ? (min_len < max_brlen ? min_len : max_brlen) : min_brlen);
+		
+#ifdef OPT_DEBUG
+		opt.open("optimization.log" ,ios::app);
+		opt.precision(9);
+		opt << "final " << "\t" << minScore << "\t" << here->dlen << "\n";
+		opt.close();
+#endif
+	//	claMan->SetTempDirty(-1, true);
+
+/*		MakeAllNodesDirty();
+		SetAllTempClasDirty();
+	if(minScore!=0.0){
+//		TraceDirtynessToRoot(here);
+		Score(Tree::data);
+		assert(abs(lnL+minScore) <.001);
+		}
+	}
+
+	SweepDirtynessOverTree(here);
+	lnL=minScore;
+	return minScore;
+	}
+*/	
+
+FLOAT_TYPE Tree::BrentOptimizeBranchLength(FLOAT_TYPE accuracy_cutoff, TreeNode *here, bool goodGuess){
+	//we pass the node whose branch length whose blen we want to optimize, but note that the
+	//calculations occur at the node below that
+	//if firstPass is true, we have no idea what a reasonable value for the blen is, so
+	//use a wide bracket.  If it is false, try a fairly tight bracket around the current val
+	FLOAT_TYPE a, b, c, fa, fb, fc, minimum, minScore=ZERO_POINT_ZERO;
+	FLOAT_TYPE blen=here->dlen;
+	
+	FLOAT_TYPE min_len;
+	
+	assert(blen>=min_brlen);
+
+	FLOAT_TYPE initialScore;
+	fb=initialScore=CallBranchLike(here, this, sqrt(sqrt(here->dlen)), true);
+
+if(here->anc){
+#ifndef FOURTH_ROOT
+//	if(here->anc){
+		if(firstPass){
+			if(!(blen>1e-6)){
+				a=min_brlen;
+				if(blen!=min_brlen){
+					b=blen;
+					}
+				else{
+					b=min_brlen*100;
+					lnL=-1;
+					}
+				c=min_brlen*10000.0;
+				}				
+			else{
+				if((blen>0.0001)){
+					a=.000001;
+					b=blen;
+					c=.01;
+					}
+				else if(!(blen>0.1)){
+					a=.0001;
+					b=blen;
+		//			c=blen*2.0;
+					c=blen*16.0;
+					}
+				else {
+					a=.01;
+					b=blen;
+					c=blen*2.0;
+					//c=.75;					
+					}
+				}
+			}
+		else{
+			//tighter 
+			if(blen >= 1e-6){
+				a=blen*.66;
+				b=blen;
+				c=blen*1.5;
+				}
+			else{
+				a=min_brlen;
+				if(blen!=min_brlen){
+					b=blen;
+					}
+				else{
+					b=min_brlen*100;
+					lnL=-1;
+					}
+				c=min_brlen*10000.0;				
+				}			
+			}
+#endif
+#ifdef FOURTH_ROOT
+/*
+	if(blen < min_brlen*10){
+		a=.01;
+		b=a+.05;
+		fb=-1;
+		c=b+.05;
+		}
+	else{
+		b=sqrt(sqrt(blen));
+		if(goodGuess==false){
+			a=(b <= 0.06 ? .01 : b-0.05);
+			c=b+0.05;
+			}
+		else{
+			a=(b <= 0.026 ? .01 : b-0.025);
+			c=b+0.025;		
+			}
+		}
+*/
+#elif ROOT_OPT
+	a=sqrt(a);
+	b=sqrt(b);
+	c=sqrt(c);
+#endif
+
+#ifdef OPT_DEBUG
+	optInfo.Setup(here->nodeNum, blen, accuracy_cutoff, goodGuess, a, b, c);
+//	SampleBranchLengthCurve(CallBranchLike, here, this);
+	optInfo.Report(curves);
+	bool trueMin=optInfo.IsMinAtMinAllowableLength();
+	curves.flush();
+	optInfo.Setup(here->nodeNum, blen, accuracy_cutoff, goodGuess, a, b, c);
+
+#endif		
+		int zeroMLE = DZbrak(&a, &b, &c, &fa, &fb, &fc, CallBranchLike, here, this);
+		
+#ifdef OPT_DEBUG
+/*		if(trueMin != zeroMLE){
+			assert(0);
+			} */
+#endif
+		bool flatSurface=false;
+		if(fa-fb + fc-fb < .000001){
+			flatSurface=true;
+			}
+
+		if(zeroMLE==0 && flatSurface==false) //if the bracket suggests that the MLE is very near 0, don't bother calling brent
+			minScore=DZbrent(a, b, c, fa, fb, fc, CallBranchLike, accuracy_cutoff, &minimum, here, this);
+		else if(zeroMLE==1){
+#ifdef FOURTH_ROOT
+			assert(c==effectiveMin);
+			minimum=c;
+			minScore=fc;
+#elif ROOT_OPT
+			FLOAT_TYPE sqrtmin=sqrt(min_brlen);
+			minimum=sqrtmin;
+			if(a==sqrtmin) minScore=fa;
+			else if(c==sqrtmin) minScore=fc;
+			else minScore=-1;
+#else
+			minimum=(min_brlen);
+			if(a==min_brlen) minScore=fa;
+			else if(c==min_brlen) minScore=fc;
+			else minScore=-1;
+#endif
+			}
+		else{
+			minimum=b;
+			minScore=fb;
+			}
+
+#ifdef FOURTH_ROOT
+		min_len=minimum*minimum*minimum*minimum;
+#elif ROOT_OPT
+		if(zeroMLE)
+			min_len=minimum;
+		else 
+			min_len=minimum*minimum;
+#else
+		min_len=minimum;
+#endif	
+		}
+
+//	if(here->dlen != min_len){
+		here->dlen = (min_len > min_brlen ? (min_len < max_brlen ? min_len : max_brlen) : min_brlen);
+		SweepDirtynessOverTree(here);
+//		}
+	assert(minScore!=-1);
+/*	if(minScore == -1){
+		minScore=CallBranchLike(here, this, here->dlen, false);
+		}
+*/	lnL=-minScore;
+	
+	#ifdef OPT_DEBUG
+	optInfo.Report(opt);
+	opt << "final\t" << minimum << "\t" << minScore << endl;
+	
+//	optsum << here->nodeNum << "\t" << blen << "\t" << min_len << "\t" << initialScore - minScore << endl;
+	
+	#endif
+	
+	return initialScore - minScore;
+	}
+
+void Tree::GetDerivsPartialTerminal(const CondLikeArray *partialCLA, const FLOAT_TYPE *prmat, const FLOAT_TYPE *d1mat, const FLOAT_TYPE *d2mat, const char *Ldat, FLOAT_TYPE &d1Tot, FLOAT_TYPE &d2Tot, int modIndex, int dataIndex, const unsigned *ambigMap /*=NULL*/){
+	//this function assumes that the pmat is arranged with the 16 entries for the
+	//first rate, followed by 16 for the second, etc.
+	const FLOAT_TYPE *partial=partialCLA->arr;
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+	const int nchar=data->NChar();
+	const int nRateCats=mod->NRateCats();
+
+	const char *Ldata=Ldat;
+	const int *countit=data->GetCounts();
+	const FLOAT_TYPE *rateProb=mod->GetRateProbs();
+	const int lastConst=data->LastConstant();
+	const int *conBases=data->GetConstStates();
+	const FLOAT_TYPE prI=mod->PropInvar();
+
+	FLOAT_TYPE freqs[4];
+	for(int i=0;i<4;i++) 
+		freqs[i]=mod->StateFreq(i);
+
+#ifdef UNIX
+	posix_madvise((void*)partial, nchar*4*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+#endif
+
+	FLOAT_TYPE tot1=ZERO_POINT_ZERO, tot2=ZERO_POINT_ZERO, totL=ZERO_POINT_ZERO, grandSumL=ZERO_POINT_ZERO;//can't use d1Tot and d2Tot in OMP reduction because they are references
+
+	FLOAT_TYPE siteL, siteD1, siteD2;
+	FLOAT_TYPE La, Lc, Lg, Lt;
+	FLOAT_TYPE D1a, D1c, D1g, D1t;
+	FLOAT_TYPE D2a, D2c, D2g, D2t;
+	FLOAT_TYPE unscaledlnL;
+
+	vector<FLOAT_TYPE> siteLikes(nchar);
+#ifdef OUTPUT_SITEDERIVS
+	vector<FLOAT_TYPE> siteD1s(nchar);
+	vector<FLOAT_TYPE> siteD2s(nchar);
+#endif
+
+#ifdef OMP_TERMDERIV
+	#ifdef LUMP_LIKES
+		#pragma omp parallel for private(partial, Ldata, siteL, siteD1, siteD2, unscaledlnL, La, Lc, Lg, Lt, D1a, D1c, D1g, D1t, D2a, D2c, D2g, D2t) reduction(+ : tot1, tot2, totL, grandSumL)
+	#else
+		#pragma omp parallel for private(partial, Ldata, siteL, siteD1, siteD2, unscaledlnL, La, Lc, Lg, Lt, D1a, D1c, D1g, D1t, D2a, D2c, D2g, D2t) reduction(+ : tot1, tot2, totL)
+	#endif
+	for(int i=0;i<nchar;i++){
+		Ldata = &Ldat[ambigMap[i]];
+		partial = &partialCLA->arr[i*4*nRateCats];
+#else
+	for(int i=0;i<nchar;i++){
+#endif
+#ifdef USE_COUNTS_IN_BOOT
+		if(countit[i] > 0){
+#else
+		if(1){
+#endif
+			La=Lc=Lg=Lt=D1a=D1c=D1g=D1t=D2a=D2c=D2g=D2t=ZERO_POINT_ZERO;
+			if(*Ldata > -1){ //no ambiguity
+				for(int r=0;r<nRateCats;r++){
+					La  += prmat[(*Ldata)+16*r] * partial[0] * rateProb[r];
+					D1a += d1mat[(*Ldata)+16*r] * partial[0] * rateProb[r];
+					D2a += d2mat[(*Ldata)+16*r] * partial[0] * rateProb[r];
+					Lc  += prmat[(*Ldata+4)+16*r] * partial[1]* rateProb[r];
+					D1c += d1mat[(*Ldata+4)+16*r] * partial[1]* rateProb[r];
+					D2c += d2mat[(*Ldata+4)+16*r] * partial[1]* rateProb[r];
+					Lg  += prmat[(*Ldata+8)+16*r] * partial[2]* rateProb[r];
+					D1g += d1mat[(*Ldata+8)+16*r] * partial[2]* rateProb[r];
+					D2g += d2mat[(*Ldata+8)+16*r] * partial[2]* rateProb[r];
+					Lt  += prmat[(*Ldata+12)+16*r] * partial[3]* rateProb[r];
+					D1t += d1mat[(*Ldata+12)+16*r] * partial[3]* rateProb[r];
+					D2t += d2mat[(*Ldata+12)+16*r] * partial[3]* rateProb[r];
+					partial += 4;
+					}
+				Ldata++;
+				}
+				
+			else if(*Ldata == -4){ //total ambiguity
+				for(int r=0;r<nRateCats;r++){
+					La += partial[0]* rateProb[r];
+					Lc += partial[1]* rateProb[r];
+					Lg += partial[2]* rateProb[r];
+					Lt += partial[3]* rateProb[r];
+					partial += 4;
+					}
+				Ldata++;
+				}
+			else{ //partial ambiguity
+				int nstates=-1 * *(Ldata++);
+				for(int s=0;s<nstates;s++){
+					for(int r=0;r<nRateCats;r++){
+						La += prmat[(*Ldata)+16*r]  * partial[4*r]* rateProb[r];
+						D1a += d1mat[(*Ldata)+16*r] * partial[4*r]* rateProb[r];		
+						D2a += d2mat[(*Ldata)+16*r] * partial[4*r]* rateProb[r];
+											
+						Lc += prmat[(*Ldata+4)+16*r] * partial[1+4*r]* rateProb[r];
+						D1c += d1mat[(*Ldata+4)+16*r]* partial[1+4*r]* rateProb[r];
+						D2c += d2mat[(*Ldata+4)+16*r]* partial[1+4*r]* rateProb[r];
+											
+						Lg += prmat[(*Ldata+8)+16*r]* partial[2+4*r]* rateProb[r];
+						D1g += d1mat[(*Ldata+8)+16*r]* partial[2+4*r]* rateProb[r];
+						D2g += d2mat[(*Ldata+8)+16*r]* partial[2+4*r]* rateProb[r];
+						
+						Lt += prmat[(*Ldata+12)+16*r]* partial[3+4*r]* rateProb[r];
+						D1t += d1mat[(*Ldata+12)+16*r]* partial[3+4*r]* rateProb[r];
+						D2t += d2mat[(*Ldata+12)+16*r]* partial[3+4*r]* rateProb[r];
+						}
+					Ldata++;
+					}
+				partial+=4*nRateCats;
+				}
+			if((mod->NoPinvInModel() == false) && (i<=lastConst)){
+				FLOAT_TYPE btot=ZERO_POINT_ZERO;
+				if(conBases[i]&1) btot+=freqs[0];
+				if(conBases[i]&2) btot+=freqs[1];
+				if(conBases[i]&4) btot+=freqs[2];
+				if(conBases[i]&8) btot+=freqs[3];
+				//6-27-05 fixed this to calc derivs correctly if constant site has been rescaled
+				siteL  = ((La*freqs[0]+Lc*freqs[1]+Lg*freqs[2]+Lt*freqs[3]) + (prI*btot)*exp((FLOAT_TYPE)partialCLA->underflow_mult[i]));
+				}
+			else
+				siteL  = ((La*freqs[0]+Lc*freqs[1]+Lg*freqs[2]+Lt*freqs[3]));
+
+			assert(La >= 0.0f && Lc >= 0.0f && Lg >= 0.0f && Lt >= 0.0f);
+			assert(La < 1.0e30 && Lc < 1.0e30 && Lg < 1.0e30 && Lt < 1.0e30);
+
+			unscaledlnL = log(siteL) - partialCLA->underflow_mult[i];
+			totL += unscaledlnL * countit[i];
+			siteD1 = (((D1a*freqs[0]+D1c*freqs[1]+D1g*freqs[2]+D1t*freqs[3])) / siteL);
+			tot1+= siteD1 * countit[i];			
+			siteD2=((D2a*freqs[0]+D2c*freqs[1]+D2g*freqs[2]+D2t*freqs[3]) / siteL) - (siteD1 * siteD1);
+			tot2 += siteD2 * countit[i];
+			}
+#ifndef OMP_TERMDERIV
+		else{
+			//partial+=4*nRateCats;
+			if(!(*Ldata < 0)) Ldata++;
+			else if(*Ldata == -4) Ldata++;
+			else{
+				int nstates=-1 * *(Ldata++);
+				for(int s=0;s<nstates;s++) Ldata++;
+				}
+			}
+#endif
+		if(sitelikeLevel != 0){
+			siteLikes[i] = unscaledlnL;
+			}
+#ifdef OUTPUT_SITEDERIVS
+		siteD1s[i] = siteD1;
+		siteD2s[i] = siteD2;
+#endif
+#ifdef LUMP_LIKES
+		if((i + 1) % LUMP_FREQ == 0){
+			grandSumL += totL;
+			totL = ZERO_POINT_ZERO;
+			}
+		}
+	totL += grandSumL;
+#else
+		}
+#endif
+	if(sitelikeLevel != 0){
+		OutputSiteLikelihoods(dataIndex, siteLikes, partialCLA->underflow_mult, NULL);
+		}
+#ifdef OUTPUT_SITEDERIVS
+	ofstream ord("orderedSiteDerivs.term.log");
+	ofstream packed("packedSiteDerivs.term.log");
+	OutputSiteDerivatives(dataIndex, siteLikes, siteD1s, siteD2s, partialCLA->underflow_mult, NULL, ord, packed);
+	ord.close();
+	packed.close();		
+#endif
+
+	d1Tot = tot1;
+	d2Tot = tot2;
+	lnL += totL;
+
+/*	double poo = lnL;
+	MakeAllNodesDirty();
+	Score();
+	assert(FloatingPointEquals(lnL, poo, 1e-8));
+*/	}
+	
+void Tree::GetDerivsPartialTerminalNState(const CondLikeArray *partialCLA, const FLOAT_TYPE *prmat, const FLOAT_TYPE *d1mat, const FLOAT_TYPE *d2mat, const char *Ldat, FLOAT_TYPE &d1Tot, FLOAT_TYPE &d2Tot, int modIndex, int dataIndex){
+	//this function assumes that the pmat is arranged with nstates^2 entries for the
+	//first rate, followed by nstates^2 for the second, etc.
+	const FLOAT_TYPE *partial=partialCLA->arr;
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+	const int nRateCats=mod->NRateCats();
+
+	const int nchar = data->NChar();
+	const int *countit = data->GetCounts();
+	const int nstates = mod->NStates();
+	const char *Ldata = Ldat;
+
+	const FLOAT_TYPE *rateProb=mod->GetRateProbs();
+	const int lastConst=data->LastConstant();
+	const int *conStates=data->GetConstStates();
+	const FLOAT_TYPE prI=mod->PropInvar();
+	const int numCondPats = data->NumConditioningPatterns();
+
+	vector<FLOAT_TYPE> freqs(nstates);
+	for(int i=0;i<nstates;i++) 
+		freqs[i]=mod->StateFreq(i);
+
+#ifdef UNIX
+	posix_madvise((void*)partial, nchar*nstates*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+#endif
+
+	FLOAT_TYPE tot1=ZERO_POINT_ZERO, tot2=ZERO_POINT_ZERO, totL=ZERO_POINT_ZERO, grandSumL=ZERO_POINT_ZERO;//can't use d1Tot and d2Tot in OMP reduction because they are references
+	FLOAT_TYPE siteL, siteD1, siteD2;
+	FLOAT_TYPE unscaledlnL;
+	
+	FLOAT_TYPE logLikeConditioningFactor = ZERO_POINT_ZERO;
+	FLOAT_TYPE conditioningLikeSum = ZERO_POINT_ZERO;
+	FLOAT_TYPE conditioningD1Sum = ZERO_POINT_ZERO;
+	FLOAT_TYPE conditioningD2Sum = ZERO_POINT_ZERO;
+	FLOAT_TYPE probVariable = ZERO_POINT_ZERO;
+
+	vector<FLOAT_TYPE> siteLikes(nchar);
+#ifdef OUTPUT_SITEDERIVS
+	vector<FLOAT_TYPE> siteD1s(nchar);
+	vector<FLOAT_TYPE> siteD2s(nchar);
+#endif
+
+	if(nRateCats == 1){
+
+	#ifdef OMP_TERMDERIV_NSTATE
+		#ifdef LUMP_LIKES
+			#pragma omp parallel for if(numCondPats == 0) private(partial, Ldata, siteL, siteD1, siteD2, unscaledlnL) reduction(+ : tot1, tot2, totL, grandSumL)
+		#else
+			#pragma omp parallel for if(numCondPats == 0) private(partial, Ldata, siteL, siteD1, siteD2, unscaledlnL) reduction(+ : tot1, tot2, totL)
+		#endif
+		for(int i=0;i<nchar;i++){
+			Ldata = &Ldat[i];
+			partial = &partialCLA->arr[i*nstates*nRateCats];
+	#else
+		for(int i=0;i<nchar;i++){
+	#endif
+
+#ifdef USE_COUNTS_IN_BOOT
+			if((countit[i]) > 0){//this check speeds us up in the case of bootstrapping
+#else
+			if(1){
+#endif
+				siteL = siteD1 = siteD2 = ZERO_POINT_ZERO;
+				if(*Ldata != nstates){ //no ambiguity
+					for(int from=0;from<nstates;from++){
+						siteL += prmat[(*Ldata)+nstates*from] * partial[from] * freqs[from];
+						siteD1 += d1mat[(*Ldata)+nstates*from] * partial[from] * freqs[from];
+						siteD2 += d2mat[(*Ldata)+nstates*from] * partial[from] * freqs[from];
+						}
+					}
+					
+				else if(*Ldata == nstates){ //total ambiguity
+					for(int from=0;from<nstates;from++){
+						siteL += partial[from] * freqs[from];
+						}
+					}
+				else{ //partial ambiguity
+					assert(0);
+					}
+				siteL *= rateProb[0]; //multiply by (1-pinv)
+				siteD1 *= rateProb[0];
+				siteD2 *= rateProb[0];
+				
+				if((mod->NoPinvInModel() == false) && (i<=lastConst)){
+					siteL += (prI*freqs[conStates[i]] * exp((FLOAT_TYPE)partialCLA->underflow_mult[i]));
+					}
+
+				unscaledlnL=log(siteL) - partialCLA->underflow_mult[i];
+
+				if(numCondPats > 0){
+					assert(unscaledlnL < ZERO_POINT_ZERO);
+					if(i < numCondPats){
+						if(partialCLA->underflow_mult[i] == 0){
+							conditioningLikeSum += siteL;
+							conditioningD1Sum += siteD1;
+							conditioningD2Sum += siteD2;
+							}
+						else{
+							outman.DebugMessage("SCALED MKV SCALER = %d (%f)", partialCLA->underflow_mult[i], exp((double)partialCLA->underflow_mult[i]));
+							double unscaler = exp((double)(partialCLA->underflow_mult[i]));
+							//Guard against this over or underflowing, which I think are very unlikely. If it does, just ignore this site
+
+							if(unscaler == unscaler){
+								double unscaled = siteL / unscaler;
+								double unscaledD1 = siteD1 / unscaler;
+								double unscaledD2 = siteD2 / unscaler;
+								if(unscaled == unscaled){
+									conditioningLikeSum += unscaled;
+									assert(unscaledD1 == unscaledD1);
+									conditioningD1Sum += unscaledD1; 
+									assert(unscaledD2 == unscaledD2);
+									conditioningD2Sum += unscaledD2;
+									}
+								}
+							}
+						if(i == numCondPats - 1){
+							probVariable = (ONE_POINT_ZERO - conditioningLikeSum);
+							logLikeConditioningFactor = -log(probVariable);
+							}
+						//these are just for site deriv output
+						unscaledlnL = siteL;
+						siteD1 = siteD1;
+						siteD2 = siteD2;
+						}
+					else{ 
+						//condition the likelihood on variability
+						FLOAT_TYPE condlnL = unscaledlnL + logLikeConditioningFactor;
+						assert(condlnL < ZERO_POINT_ZERO);
+						totL += condlnL * countit[i];
+
+						//condition the first deriv
+						FLOAT_TYPE condD1 = (siteD1 + ((siteL * conditioningD1Sum) / probVariable)) / siteL; 
+
+						//condition the second
+						FLOAT_TYPE t1 = conditioningLikeSum - ONE_POINT_ZERO;
+						FLOAT_TYPE condD2 = ((-siteD1 * siteD1 * t1 * t1) + siteL * ((t1 * t1 * siteD2) + siteL * (conditioningD1Sum * conditioningD1Sum - t1 * conditioningD2Sum))) / (siteL * siteL * t1 * t1);
+
+						tot1 += countit[i] * condD1;
+						tot2 += countit[i] * condD2;
+						assert(tot1 == tot1);
+						assert(tot2 == tot2);
+						//these are just for site deriv output
+						unscaledlnL = condlnL;
+						siteD1 = condD1;
+						siteD2 = condD2;
+						}
+					}
+
+				else if(unscaledlnL < ZERO_POINT_ZERO){
+					totL += unscaledlnL * countit[i];
+					siteD1 /= siteL;
+					tot1 += countit[i] * siteD1;
+					tot2 += countit[i] * ((siteD2 / siteL) - siteD1*siteD1);
+					assert(tot1 == tot1);
+					assert(tot2 == tot2);
+					}
+				Ldata++;
+				partial+=nstates*nRateCats;
+				}
+			else{
+#ifdef OPEN_MP
+				//this is a little strange, but the arrays needs to be advanced in the case of OMP (if this function is not OMP enabled)
+				//because sections of the CLAs corresponding to sites with count=0 are skipped
+				//over in OMP instead of being eliminated
+				partial+=nstates*nRateCats;
+#endif
+				Ldata++;
+				}
+			if(sitelikeLevel != 0){
+				siteLikes[i] = unscaledlnL;
+				}
+#ifdef OUTPUT_SITEDERIVS
+			siteD1s[i] = siteD1;
+			siteD2s[i] = siteD2;
+#endif
+#ifdef LUMP_LIKES
+			if((i + 1) % LUMP_FREQ == 0){
+				grandSumL += totL;
+				totL = ZERO_POINT_ZERO;
+				}
+			}
+		totL += grandSumL;
+#else
+			}
+#endif
+		if(sitelikeLevel != 0){
+			OutputSiteLikelihoods(dataIndex, siteLikes, partialCLA->underflow_mult, NULL);
+			}
+#ifdef OUTPUT_SITEDERIVS
+		ofstream ord("orderedSiteDerivs.term.log");
+		ofstream packed("packedSiteDerivs.term.log");
+		OutputSiteDerivatives(dataIndex, siteLikes, siteD1s, siteD2s, partialCLA->underflow_mult, NULL, ord, packed);
+		ord.close();
+		packed.close();
+#endif
+		}
+	else{
+		//I don't think that this is being used, as there is a separate function for PartialTermNStateRateHet
+		assert(0);
+/*
+#ifdef OMP_TERMDERIV_NSTATE
+		#pragma omp parallel for private(partial, Ldata, siteL, siteD1, siteD2) reduction(+ : tot1, tot2, totL)
+		for(int i=0;i<nchar;i++){
+			Ldata = &Ldat[i];
+			partial = &partialCLA->arr[i*nstates*nRateCats];
+#else
+		for(int i=0;i<nchar;i++){
+#endif
+#ifdef USE_COUNTS_IN_BOOT
+			if((countit[i]) != 0){//this check speeds us up in the case of bootstrapping
+#else
+			if(1){
+#endif
+
+				siteL = siteD1 = siteD2 = ZERO_POINT_ZERO;
+				if(*Ldata < nstates){ //no ambiguity
+					for(int rate=0;rate<nRateCats;rate++){
+						const int rateOffset = rate * nstates * nstates;
+						for(int from=0;from<nstates;from++){
+							const int offset = from * nstates;
+							siteL += prmat[rateOffset + offset + (*Ldata)] * partial[from] * rateProb[rate] * freqs[from];
+							siteD1 += d1mat[rateOffset + offset + (*Ldata)] * partial[from] * rateProb[rate] * freqs[from];
+							siteD2 += d2mat[rateOffset + offset + (*Ldata)] * partial[from] * rateProb[rate] * freqs[from];
+							}
+						partial += nstates;
+						}
+					}
+					
+				else{ //total ambiguity
+					for(int rate=0;rate<nRateCats;rate++){
+						for(int from=0;from<nstates;from++){
+							siteL += partial[from] * rateProb[rate] * freqs[from];
+							}
+						partial += nstates;
+						}
+					}
+				Ldata++;
+
+				if((mod->NoPinvInModel() == false) && (i<=lastConst)){
+					siteL += (prI*freqs[conStates[i]] * exp((FLOAT_TYPE)partialCLA->underflow_mult[i]));
+					}
+				FLOAT_TYPE unscaledlnL=log(siteL) - partialCLA->underflow_mult[i];
+
+				if(unscaledlnL < ZERO_POINT_ZERO){
+					totL += unscaledlnL * countit[i];
+					siteD1 /= siteL;
+					tot1 += countit[i] * siteD1;
+					tot2 += countit[i] * ((siteD2 / siteL) - siteD1*siteD1);
+					assert(tot1 == tot1);
+					assert(tot2 == tot2);
+					}
+				}
+			else{
+#ifdef OPEN_MP	//this needs to be advanced in the case of openmp, regardless of whether
+				//this function actually has OMP enabled or not.
+				partial += nstates * nRateCats;
+#endif
+				Ldata++;
+				}
+			}
+*/		}
+
+	d1Tot = tot1;
+	d2Tot = tot2;
+	lnL += totL;
+	}
+
+void Tree::GetDerivsPartialTerminalNStateRateHet(const CondLikeArray *partialCLA, const FLOAT_TYPE *prmat, const FLOAT_TYPE *d1mat, const FLOAT_TYPE *d2mat, const char *Ldat, FLOAT_TYPE &d1Tot, FLOAT_TYPE &d2Tot, int modIndex, int dataIndex){
+	//this function assumes that the pmat is arranged with nstates^2 entries for the
+	//first rate, followed by nstates^2 for the second, etc.
+	const FLOAT_TYPE *partial=partialCLA->arr;
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+	const int nRateCats=mod->NRateCats();
+
+	const int nchar = data->NChar();
+	const int *countit = data->GetCounts();
+	const int nstates = mod->NStates();
+	const char *Ldata = Ldat;
+
+	const FLOAT_TYPE *rateProb=mod->GetRateProbs();
+	const int lastConst=data->LastConstant();
+	const int *conStates=data->GetConstStates();
+	const FLOAT_TYPE prI=mod->PropInvar();
+	const int numCondPats = data->NumConditioningPatterns();
+
+	vector<FLOAT_TYPE> freqs(nstates);
+	for(int i=0;i<nstates;i++) 
+		freqs[i]=mod->StateFreq(i);
+
+#ifdef UNIX
+	posix_madvise((void*)partial, nchar*nstates*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+#endif
+
+	FLOAT_TYPE tot1=ZERO_POINT_ZERO, tot2=ZERO_POINT_ZERO, totL=ZERO_POINT_ZERO, grandSumL=ZERO_POINT_ZERO;//can't use d1Tot and d2Tot in OMP reduction because they are references
+
+	FLOAT_TYPE siteL, siteD1, siteD2;
+	FLOAT_TYPE rateL, rateD1, rateD2;
+	FLOAT_TYPE unscaledlnL;
+	
+	FLOAT_TYPE logLikeConditioningFactor = ZERO_POINT_ZERO;
+	FLOAT_TYPE conditioningLikeSum = ZERO_POINT_ZERO;
+	FLOAT_TYPE conditioningD1Sum = ZERO_POINT_ZERO;
+	FLOAT_TYPE conditioningD2Sum = ZERO_POINT_ZERO;
+	FLOAT_TYPE probVariable = ZERO_POINT_ZERO;
+
+	vector<FLOAT_TYPE> siteLikes(nchar);
+#ifdef OUTPUT_SITEDERIVS
+	vector<FLOAT_TYPE> siteD1s(nchar);
+	vector<FLOAT_TYPE> siteD2s(nchar);
+#endif
+
+#ifdef OMP_TERMDERIV_NSTATE
+	#ifdef LUMP_LIKES
+		#pragma omp parallel for if(numCondPats == 0) private(partial, Ldata, siteL, siteD1, siteD2, rateL, rateD1, rateD2, unscaledlnL) reduction(+ : tot1, tot2, totL, grandSumL)
+	#else
+		#pragma omp parallel for if(numCondPats == 0) private(partial, Ldata, siteL, siteD1, siteD2, rateL, rateD1, rateD2, unscaledlnL) reduction(+ : tot1, tot2, totL)
+	#endif
+		for(int i=0;i<nchar;i++){
+			Ldata = &Ldat[i];
+			partial = &partialCLA->arr[i*nstates*nRateCats];
+#else
+		for(int i=0;i<nchar;i++){
+#endif
+#ifdef USE_COUNTS_IN_BOOT
+			if((countit[i]) != 0){//this check speeds us up in the case of bootstrapping
+#else
+			if(1){
+#endif
+				siteL = siteD1 = siteD2 = ZERO_POINT_ZERO;
+				if(*Ldata < nstates){ //no ambiguity
+					for(int rate=0;rate<nRateCats;rate++){
+						rateL = rateD1 = rateD2 = ZERO_POINT_ZERO;
+						const int rateOffset = rate * nstates * nstates;
+						for(int from=0;from<nstates;from++){
+							const int offset = from * nstates;
+							rateL += prmat[rateOffset + offset + (*Ldata)] * partial[from] * freqs[from];
+							rateD1 += d1mat[rateOffset + offset + (*Ldata)] * partial[from] * freqs[from];
+							rateD2 += d2mat[rateOffset + offset + (*Ldata)] * partial[from] * freqs[from];
+							}
+						siteL += rateL * rateProb[rate];
+						siteD1 += rateD1 * rateProb[rate];
+						siteD2 += rateD2 * rateProb[rate];
+						partial += nstates;
+						}
+					}
+				else{ //total ambiguity
+					for(int rate=0;rate<nRateCats;rate++){
+						rateL = rateD1 = rateD2 = ZERO_POINT_ZERO;
+						for(int from=0;from<nstates;from++){
+							rateL += partial[from] * freqs[from];
+							}
+						siteL += rateL * rateProb[rate];
+						partial += nstates;
+						}
+					}
+				Ldata++;
+
+				if((mod->NoPinvInModel() == false) && (i<=lastConst)){
+					siteL += (prI*freqs[conStates[i]] * (exp((FLOAT_TYPE)partialCLA->underflow_mult[i])));
+					}
+
+				unscaledlnL=log(siteL) - partialCLA->underflow_mult[i];
+
+				if(numCondPats > 0){
+					//CONDITIONING HERE HAS NEVER BEEN TESTED, SINCE NO STANDARD DATA AND RATE HET
+					assert(unscaledlnL < ZERO_POINT_ZERO);
+					if(i < numCondPats){
+						if(partialCLA->underflow_mult[i] == 0){
+							conditioningLikeSum += siteL;
+							conditioningD1Sum += siteD1;
+							conditioningD2Sum += siteD2;
+							}
+						else{
+							outman.DebugMessage("SCALED MKV SCALER = %d (%f)", partialCLA->underflow_mult[i], exp((double)(partialCLA->underflow_mult[i])));
+							double unscaler = exp((double)(partialCLA->underflow_mult[i]));
+							//Guard against this over or underflowing, which I think are very unlikely. If it does, just ignore this site
+							if(unscaler == unscaler){
+								double unscaled = siteL / unscaler;
+								double unscaledD1 = siteD1 / unscaler;
+								double unscaledD2 = siteD2 / unscaler;
+								if(unscaled == unscaled){
+									conditioningLikeSum += unscaled;
+									assert(unscaledD1 == unscaledD1);
+									conditioningD1Sum += unscaledD1; 
+									assert(unscaledD2 == unscaledD2);
+									conditioningD2Sum += unscaledD2;
+									}
+								}
+							}
+						if(i == numCondPats - 1){
+							probVariable = (ONE_POINT_ZERO - conditioningLikeSum);
+							logLikeConditioningFactor = -log(probVariable);
+							}
+						}
+					else{ 
+						//condition the likelihood on variability
+						FLOAT_TYPE condlnL = unscaledlnL + logLikeConditioningFactor;
+						assert(condlnL < ZERO_POINT_ZERO);
+						totL += condlnL * countit[i];
+
+						//condition the first deriv
+						FLOAT_TYPE condD1 = (siteD1 + ((siteL * conditioningD1Sum) / probVariable)) / siteL; 
+
+						//condition the second
+						FLOAT_TYPE t1 = conditioningLikeSum - ONE_POINT_ZERO;
+						FLOAT_TYPE condD2 = ((-siteD1 * siteD1 * t1 * t1) + siteL * ((t1 * t1 * siteD2) + siteL * (conditioningD1Sum * conditioningD1Sum - t1 * conditioningD2Sum))) / (siteL * siteL * t1 * t1);
+
+						tot1 += countit[i] * condD1;
+						tot2 += countit[i] * condD2;
+						assert(tot1 == tot1);
+						assert(tot2 == tot2);
+						//these are just for site deriv output
+						unscaledlnL = condlnL;
+						siteD1 = condD1;
+						siteD2 = condD2;
+						}
+					}
+				else if(unscaledlnL < ZERO_POINT_ZERO){
+					totL += unscaledlnL * countit[i];
+					siteD1 /= siteL;
+					tot1 += countit[i] * siteD1;
+					siteD2 = ((siteD2 / siteL) - siteD1*siteD1);
+					tot2 += countit[i] * siteD2;
+					assert(siteL == siteL);
+					assert(totL == totL);
+					assert(tot1 == tot1);
+					assert(tot2 == tot2);
+					}
+				}
+			else{
+#ifdef OPEN_MP	//this needs to be advanced in the case of openmp, regardless of whether
+				//this function actually has OMP enabled or not.
+				partial += nstates * nRateCats;
+#endif
+				Ldata++;
+				}
+			if(sitelikeLevel != 0){
+				siteLikes[i] = unscaledlnL;
+				}
+#ifdef OUTPUT_SITEDERIVS
+			siteD1s[i] = siteD1;
+			siteD2s[i] = siteD2;
+#endif
+#ifdef LUMP_LIKES
+			if((i + 1) % LUMP_FREQ == 0){
+				grandSumL += totL;
+				totL = ZERO_POINT_ZERO;
+				}
+			}
+		totL += grandSumL;
+#else
+			}
+#endif
+		if(sitelikeLevel != 0){
+			OutputSiteLikelihoods(dataIndex, siteLikes, partialCLA->underflow_mult, NULL);
+			}
+#ifdef OUTPUT_SITEDERIVS
+		ofstream ord("orderedSiteDerivs.term.log");
+		ofstream packed("packedSiteDerivs.term.log");
+		OutputSiteDerivatives(dataIndex, siteLikes, siteD1s, siteD2s, partialCLA->underflow_mult, NULL, ord, packed);
+		ord.close();
+		packed.close();
+#endif
+
+	d1Tot = tot1;
+	d2Tot = tot2;
+	lnL += totL;
+	}
+
+void Tree::GetDerivsPartialInternal(const CondLikeArray *partialCLA, const CondLikeArray *childCLA, const FLOAT_TYPE *prmat, const FLOAT_TYPE *d1mat, const FLOAT_TYPE *d2mat, FLOAT_TYPE &d1Tot, FLOAT_TYPE &d2Tot, int modIndex, int dataIndex){
+	//this function assumes that the pmat is arranged with the 16 entries for the
+	//first rate, followed by 16 for the second, etc.
+	const FLOAT_TYPE *CL1=childCLA->arr;
+	const FLOAT_TYPE *partial=partialCLA->arr;
+
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+
+	const int nchar=data->NChar();
+	const int nRateCats=mod->NRateCats();
+
+	const int *countit=data->GetCounts();
+	const FLOAT_TYPE *rateProb=mod->GetRateProbs();
+		
+	const int lastConst=data->LastConstant();
+	const int *conBases=data->GetConstStates();
+	const FLOAT_TYPE prI=mod->PropInvar();	
+
+	FLOAT_TYPE freqs[4];
+	for(int i=0;i<4;i++) 
+		freqs[i]=mod->StateFreq(i);
+
+#ifdef UNIX
+	posix_madvise((void*)partial, nchar*4*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+	posix_madvise((void*)CL1, nchar*4*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+#endif
+
+	FLOAT_TYPE tot1=ZERO_POINT_ZERO, tot2=ZERO_POINT_ZERO, totL=ZERO_POINT_ZERO, grandSumL=ZERO_POINT_ZERO;//can't use d1Tot and d2Tot in OMP reduction because they are references
+
+	FLOAT_TYPE siteL, siteD1, siteD2;
+	FLOAT_TYPE La, Lc, Lg, Lt;
+	FLOAT_TYPE D1a, D1c, D1g, D1t;
+	FLOAT_TYPE D2a, D2c, D2g, D2t;
+	FLOAT_TYPE Ra, Rc, Rg, Rt;
+	FLOAT_TYPE unscaledlnL=ZERO_POINT_ZERO;
+
+	vector<FLOAT_TYPE> siteLikes(nchar);
+#ifdef OUTPUT_SITEDERIVS
+	vector<FLOAT_TYPE> siteD1s(nchar);
+	vector<FLOAT_TYPE> siteD2s(nchar);
+#endif
+
+#ifdef OMP_INTDERIV
+	#ifdef LUMP_LIKES
+		#pragma omp parallel for private(partial, CL1, siteL, siteD1, siteD2, unscaledlnL, La, Lc, Lg, Lt, D1a, D1c, D1g, D1t, D2a, D2c, D2g, D2t, Ra, Rc, Rg, Rt) reduction(+ : tot1, tot2, totL, grandSumL)
+	#else
+		#pragma omp parallel for private(partial, CL1, siteL, siteD1, siteD2, unscaledlnL, La, Lc, Lg, Lt, D1a, D1c, D1g, D1t, D2a, D2c, D2g, D2t, Ra, Rc, Rg, Rt) reduction(+ : tot1, tot2, totL)
+	#endif
+	for(int i=0;i<nchar;i++){
+		partial = &(partialCLA->arr[4*i*nRateCats]);
+		CL1		= &(childCLA->arr[4*i*nRateCats]);
+#else
+	for(int i=0;i<nchar;i++){
+#endif
+#ifdef USE_COUNTS_IN_BOOT
+		if(countit[i] > 0){
+#else
+		if(1){
+#endif
+			La=Lc=Lg=Lt=D1a=D1c=D1g=D1t=D2a=D2c=D2g=D2t=ZERO_POINT_ZERO;
+			for(int r=0;r<nRateCats;r++){
+				int rOff=r*16;
+
+/*				Ra = partial[0] * rateProb[r];
+				Rc = partial[1] * rateProb[r];
+				Rg = partial[2] * rateProb[r];
+				Rt = partial[3] * rateProb[r];
+
+				La += ( prmat[rOff ]*CL1[0]+prmat[rOff + 1]*CL1[1]+prmat[rOff + 2]*CL1[2]+prmat[rOff + 3]*CL1[3]) * Ra;
+				Lc += ( prmat[rOff + 4]*CL1[0]+prmat[rOff + 5]*CL1[1]+prmat[rOff + 6]*CL1[2]+prmat[rOff + 7]*CL1[3]) * Rc;
+				Lg += ( prmat[rOff + 8]*CL1[0]+prmat[rOff + 9]*CL1[1]+prmat[rOff + 10]*CL1[2]+prmat[rOff + 11]*CL1[3]) * Rg;
+				Lt += ( prmat[rOff + 12]*CL1[0]+prmat[rOff + 13]*CL1[1]+prmat[rOff + 14]*CL1[2]+prmat[rOff + 15]*CL1[3]) * Rt;
+				
+				D1a += ( d1mat[rOff ]*CL1[0]+d1mat[rOff + 1]*CL1[1]+d1mat[rOff + 2]*CL1[2]+d1mat[rOff + 3]*CL1[3]) * Ra;
+				D1c += ( d1mat[rOff + 4]*CL1[0]+d1mat[rOff + 5]*CL1[1]+d1mat[rOff + 6]*CL1[2]+d1mat[rOff + 7]*CL1[3]) * Rc;
+				D1g += ( d1mat[rOff + 8]*CL1[0]+d1mat[rOff + 9]*CL1[1]+d1mat[rOff + 10]*CL1[2]+d1mat[rOff + 11]*CL1[3]) * Rg;
+				D1t += ( d1mat[rOff + 12]*CL1[0]+d1mat[rOff + 13]*CL1[1]+d1mat[rOff + 14]*CL1[2]+d1mat[rOff + 15]*CL1[3]) * Rt;
+
+				D2a += ( d2mat[rOff ]*CL1[0]+d2mat[rOff + 1]*CL1[1]+d2mat[rOff + 2]*CL1[2]+d2mat[rOff + 3]*CL1[3]) * Ra;
+				D2c += ( d2mat[rOff + 4]*CL1[0]+d2mat[rOff + 5]*CL1[1]+d2mat[rOff + 6]*CL1[2]+d2mat[rOff + 7]*CL1[3]) * Rc;
+				D2g += ( d2mat[rOff + 8]*CL1[0]+d2mat[rOff + 9]*CL1[1]+d2mat[rOff + 10]*CL1[2]+d2mat[rOff + 11]*CL1[3]) * Rg;
+				D2t += ( d2mat[rOff + 12]*CL1[0]+d2mat[rOff + 13]*CL1[1]+d2mat[rOff + 14]*CL1[2]+d2mat[rOff + 15]*CL1[3]) * Rt;
+*/
+				
+				La += ( prmat[rOff ]*CL1[0]+prmat[rOff + 1]*CL1[1]+prmat[rOff + 2]*CL1[2]+prmat[rOff + 3]*CL1[3]) * partial[0] * rateProb[r];
+				Lc += ( prmat[rOff + 4]*CL1[0]+prmat[rOff + 5]*CL1[1]+prmat[rOff + 6]*CL1[2]+prmat[rOff + 7]*CL1[3]) * partial[1] * rateProb[r];
+				Lg += ( prmat[rOff + 8]*CL1[0]+prmat[rOff + 9]*CL1[1]+prmat[rOff + 10]*CL1[2]+prmat[rOff + 11]*CL1[3]) * partial[2] * rateProb[r];
+				Lt += ( prmat[rOff + 12]*CL1[0]+prmat[rOff + 13]*CL1[1]+prmat[rOff + 14]*CL1[2]+prmat[rOff + 15]*CL1[3]) * partial[3] * rateProb[r];
+				
+				D1a += ( d1mat[rOff ]*CL1[0]+d1mat[rOff + 1]*CL1[1]+d1mat[rOff + 2]*CL1[2]+d1mat[rOff + 3]*CL1[3]) * partial[0] * rateProb[r];
+				D1c += ( d1mat[rOff + 4]*CL1[0]+d1mat[rOff + 5]*CL1[1]+d1mat[rOff + 6]*CL1[2]+d1mat[rOff + 7]*CL1[3]) * partial[1] * rateProb[r];
+				D1g += ( d1mat[rOff + 8]*CL1[0]+d1mat[rOff + 9]*CL1[1]+d1mat[rOff + 10]*CL1[2]+d1mat[rOff + 11]*CL1[3]) * partial[2] * rateProb[r];
+				D1t += ( d1mat[rOff + 12]*CL1[0]+d1mat[rOff + 13]*CL1[1]+d1mat[rOff + 14]*CL1[2]+d1mat[rOff + 15]*CL1[3]) * partial[3] * rateProb[r];		
+
+				D2a += ( d2mat[rOff ]*CL1[0]+d2mat[rOff + 1]*CL1[1]+d2mat[rOff + 2]*CL1[2]+d2mat[rOff + 3]*CL1[3]) * partial[0] * rateProb[r];
+				D2c += ( d2mat[rOff + 4]*CL1[0]+d2mat[rOff + 5]*CL1[1]+d2mat[rOff + 6]*CL1[2]+d2mat[rOff + 7]*CL1[3]) * partial[1] * rateProb[r];
+				D2g += ( d2mat[rOff + 8]*CL1[0]+d2mat[rOff + 9]*CL1[1]+d2mat[rOff + 10]*CL1[2]+d2mat[rOff + 11]*CL1[3]) * partial[2] * rateProb[r];
+				D2t += ( d2mat[rOff + 12]*CL1[0]+d2mat[rOff + 13]*CL1[1]+d2mat[rOff + 14]*CL1[2]+d2mat[rOff + 15]*CL1[3]) * partial[3] * rateProb[r];
+
+				partial+=4;
+				CL1+=4;
+				}
+			if((mod->NoPinvInModel() == false) && (i<=lastConst)){
+				FLOAT_TYPE	btot=ZERO_POINT_ZERO;
+				if(conBases[i]&1) btot+=freqs[0];
+				if(conBases[i]&2) btot+=freqs[1];
+				if(conBases[i]&4) btot+=freqs[2];
+				if(conBases[i]&8) btot+=freqs[3];
+				//6-27-05 fixed this to calc derivs correctly if constant site has been rescaled
+				siteL  = ((La*freqs[0]+Lc*freqs[1]+Lg*freqs[2]+Lt*freqs[3]) + (prI*btot)*exp((FLOAT_TYPE)childCLA->underflow_mult[i]+partialCLA->underflow_mult[i]));
+				}
+			else
+				siteL  = ((La*freqs[0]+Lc*freqs[1]+Lg*freqs[2]+Lt*freqs[3]));
+
+			assert(La >= 0.0f && Lc >= 0.0f && Lg >= 0.0f && Lt >= 0.0f);
+			assert(La < 1.0e30 && Lc < 1.0e30 && Lg < 1.0e30 && Lt < 1.0e30);
+
+			siteD1 = (((D1a*freqs[0]+D1c*freqs[1]+D1g*freqs[2]+D1t*freqs[3])) / siteL);
+
+			unscaledlnL = log(siteL) - childCLA->underflow_mult[i] - partialCLA->underflow_mult[i];
+			totL += unscaledlnL * countit[i];
+			tot1+= countit[i] * siteD1;			
+			siteD2=((D2a*freqs[0]+D2c*freqs[1]+D2g*freqs[2]+D2t*freqs[3]) / siteL) - (siteD1 * siteD1);
+			tot2 += countit[i] * siteD2;
+			assert(d2Tot == d2Tot);
+//			assert(tot1 < 1.0e10 && tot2 < 1.0e10);
+			}
+#ifndef OMP_INTDERIV
+		else{
+	//		partial+=4*nRateCats;
+	//		CL1+=4*nRateCats;			
+			}
+#endif
+		if(sitelikeLevel != 0){
+			siteLikes[i] = unscaledlnL;
+			}
+#ifdef OUTPUT_SITEDERIVS
+		siteD1s[i] = siteD1;
+		siteD2s[i] = siteD2;
+#endif
+#ifdef LUMP_LIKES
+		if((i + 1) % LUMP_FREQ == 0){
+			grandSumL += totL;
+			totL = ZERO_POINT_ZERO;
+			}
+		}
+	totL += grandSumL;
+#else
+		}
+#endif
+	if(sitelikeLevel != 0){
+		OutputSiteLikelihoods(dataIndex, siteLikes, childCLA->underflow_mult, partialCLA->underflow_mult);
+		}
+#ifdef OUTPUT_SITEDERIVS
+	ofstream ord("orderedSiteDerivs.term.log");
+	ofstream packed("packedSiteDerivs.term.log");
+	OutputSiteDerivatives(dataIndex, siteLikes, siteD1s, siteD2s, partialCLA->underflow_mult, NULL, ord, packed);
+	ord.close();
+	packed.close();
+#endif
+
+	d1Tot = tot1;
+	d2Tot = tot2;
+	lnL += totL;
+	}
+
+void Tree::GetDerivsPartialInternalNStateRateHet(const CondLikeArray *partialCLA, const CondLikeArray *childCLA, const FLOAT_TYPE *prmat, const FLOAT_TYPE *d1mat, const FLOAT_TYPE *d2mat, FLOAT_TYPE &d1Tot, FLOAT_TYPE &d2Tot, int modIndex, int dataIndex){
+	//this function assumes that the pmat is arranged with the nstates^2 entries for the
+	//first rate, followed by nstates^2 for the second, etc.
+	const FLOAT_TYPE *CL1=childCLA->arr;
+	const FLOAT_TYPE *partial=partialCLA->arr;
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+
+	const int nchar = data->NChar();
+	const int *countit = data->GetCounts();
+	const int nstates = mod->NStates();
+	const int nRateCats = mod->NRateCats();
+
+	const FLOAT_TYPE *rateProb=mod->GetRateProbs();
+
+	const int lastConst=data->LastConstant();
+	const int *conStates=data->GetConstStates();
+	const FLOAT_TYPE prI=mod->PropInvar();	
+	const int numCondPats = data->NumConditioningPatterns();
+
+	vector<FLOAT_TYPE> freqs(nstates);
+	for(int i=0;i<nstates;i++) 
+		freqs[i]=mod->StateFreq(i);
+
+#ifdef UNIX
+	posix_madvise((void*)partial, nchar*nstates*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+	posix_madvise((void*)CL1, nchar*nstates*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+#endif
+
+	FLOAT_TYPE tot1=ZERO_POINT_ZERO, tot2=ZERO_POINT_ZERO, totL = ZERO_POINT_ZERO, grandSumL = ZERO_POINT_ZERO;//can't use d1Tot and d2Tot in OMP reduction because they are references
+	
+	FLOAT_TYPE siteL, siteD1, siteD2;
+	FLOAT_TYPE tempL, tempD1, tempD2;
+	FLOAT_TYPE rateL, rateD1, rateD2;
+	FLOAT_TYPE unscaledlnL;
+
+	FLOAT_TYPE logLikeConditioningFactor = ZERO_POINT_ZERO;
+	FLOAT_TYPE conditioningLikeSum = ZERO_POINT_ZERO;
+	FLOAT_TYPE conditioningD1Sum = ZERO_POINT_ZERO;
+	FLOAT_TYPE conditioningD2Sum = ZERO_POINT_ZERO;
+	FLOAT_TYPE probVariable = ZERO_POINT_ZERO;
+
+	vector<FLOAT_TYPE> siteLikes(nchar);
+#ifdef OUTPUT_SITEDERIVS
+	vector<FLOAT_TYPE> siteD1s(nchar);
+	vector<FLOAT_TYPE> siteD2s(nchar);
+#endif
+
+#ifdef OMP_INTDERIV_NSTATE
+	#ifdef LUMP_LIKES
+		#pragma omp parallel for if(numCondPats == 0) private(partial, CL1, siteL, siteD1, siteD2, unscaledlnL, tempL, tempD1, tempD2, rateL, rateD1, rateD2) reduction(+ : tot1, tot2, totL, grandSumL)
+	#else
+		#pragma omp parallel for if(numCondPats == 0) private(partial, CL1, siteL, siteD1, siteD2, unscaledlnL, tempL, tempD1, tempD2, rateL, rateD1, rateD2) reduction(+ : tot1, tot2, totL)
+	#endif	
+	for(int i=0;i<nchar;i++){
+		partial = &(partialCLA->arr[nRateCats * nstates * i]);
+		CL1		= &(childCLA->arr[nRateCats * nstates * i]);
+#else
+	for(int i=0;i<nchar;i++){
+#endif
+#ifdef USE_COUNTS_IN_BOOT
+		if(countit[i] > 0){//this check speeds us up in the case of bootstrapping
+#else
+		if(1){
+#endif
+			siteL = siteD1 = siteD2 = ZERO_POINT_ZERO;
+			for(int rate=0;rate<nRateCats;rate++){
+				rateL = rateD1 = rateD2 = ZERO_POINT_ZERO;
+				int rateOffset = rate*nstates*nstates;
+				for(int from=0;from<nstates;from++){
+					tempL = tempD1 = tempD2 = ZERO_POINT_ZERO;
+					int offset = from * nstates;
+					for(int to=0;to<nstates;to++){
+						tempL += prmat[rateOffset + offset + to]*CL1[to];
+						tempD1 += d1mat[rateOffset + offset + to]*CL1[to];
+						tempD2 += d2mat[rateOffset + offset + to]*CL1[to];
+						}
+					rateL += tempL * partial[from] * freqs[from];
+					rateD1 += tempD1 * partial[from] * freqs[from];
+					rateD2 += tempD2 * partial[from] * freqs[from];
+					}
+				siteL += rateL * rateProb[rate];
+				siteD1 += rateD1 * rateProb[rate];
+				siteD2 += rateD2 * rateProb[rate];
+				partial += nstates;
+				CL1 += nstates;
+				}
+
+			if((mod->NoPinvInModel() == false) && (i<=lastConst)){
+				siteL += (prI*freqs[conStates[i]] * exp((FLOAT_TYPE)partialCLA->underflow_mult[i])  *  exp((FLOAT_TYPE)childCLA->underflow_mult[i]));
+				}
+
+			unscaledlnL=log(siteL) - partialCLA->underflow_mult[i] - childCLA->underflow_mult[i];
+			
+			if(numCondPats > 0){
+				//CONDITIONING HERE HAS NEVER BEEN TESTED, SINCE NO STANDARD DATA AND RATE HET
+				assert(unscaledlnL < ZERO_POINT_ZERO);
+				if(i < numCondPats){
+					if(partialCLA->underflow_mult[i] + childCLA->underflow_mult[i] == 0){
+						conditioningLikeSum += siteL;
+						conditioningD1Sum += siteD1;
+						conditioningD2Sum += siteD2;
+						}
+					else{
+						outman.DebugMessage("SCALED MKV SCALER = %d (%f)", partialCLA->underflow_mult[i] + childCLA->underflow_mult[i], exp((double)(partialCLA->underflow_mult[i] + childCLA->underflow_mult[i])));
+						double unscaler = exp((double)(partialCLA->underflow_mult[i] + childCLA->underflow_mult[i]));
+						//Guard against this over or underflowing, which I think are very unlikely. If it does, just ignore this site
+						if(unscaler == unscaler){
+							double unscaled = siteL / unscaler;
+							double unscaledD1 = siteD1 / unscaler;
+							double unscaledD2 = siteD2 / unscaler;
+							if(unscaled == unscaled){
+								conditioningLikeSum += unscaled;
+								assert(unscaledD1 == unscaledD1);
+								conditioningD1Sum += unscaledD1; 
+								assert(unscaledD2 == unscaledD2);
+								conditioningD2Sum += unscaledD2;
+								}
+							}
+						}
+					if(i == numCondPats - 1){
+						probVariable = (ONE_POINT_ZERO - conditioningLikeSum);
+						logLikeConditioningFactor = -log(probVariable);
+						}
+					//these are just for site deriv output
+					unscaledlnL = siteL;
+					siteD1 = siteD1;
+					siteD2 = siteD2;
+					}
+				else{ 
+					//condition the likelihood on variability
+					FLOAT_TYPE condlnL = unscaledlnL + logLikeConditioningFactor;
+					assert(condlnL < ZERO_POINT_ZERO);
+					totL += condlnL * countit[i];
+
+					//condition the first deriv
+					FLOAT_TYPE condD1 = (siteD1 + ((siteL * conditioningD1Sum) / probVariable)) / siteL; 
+
+					//condition the second
+					FLOAT_TYPE t1 = conditioningLikeSum - ONE_POINT_ZERO;
+					FLOAT_TYPE condD2 = ((-siteD1 * siteD1 * t1 * t1) + siteL * ((t1 * t1 * siteD2) + siteL * (conditioningD1Sum * conditioningD1Sum - t1 * conditioningD2Sum))) / (siteL * siteL * t1 * t1);
+
+					tot1 += countit[i] * condD1;
+					tot2 += countit[i] * condD2;
+					assert(tot1 == tot1);
+					assert(tot2 == tot2);
+					//these are just for site deriv output
+					unscaledlnL = condlnL;
+					siteD1 = condD1;
+					siteD2 = condD2;
+					}
+				}
+			else if(unscaledlnL < ZERO_POINT_ZERO){
+				totL += unscaledlnL * countit[i];
+				siteD1 /= siteL;
+				tot1 += countit[i] * siteD1;
+				siteD2 = ((siteD2 / siteL) - siteD1*siteD1);
+				tot2 += countit[i] * siteD2;
+				assert(tot1 == tot1);
+				assert(tot2 == tot2);
+				}
+			}
+		if(sitelikeLevel != 0){
+			siteLikes[i] = unscaledlnL;
+			}
+#ifdef OUTPUT_SITEDERIVS
+		siteD1s[i] = siteD1;
+		siteD2s[i] = siteD2;
+#endif
+#ifdef LUMP_LIKES
+		if((i + 1) % LUMP_FREQ == 0){
+			grandSumL += totL;
+			totL = ZERO_POINT_ZERO;
+			}
+		}
+	totL += grandSumL;
+#else
+		}
+#endif
+	if(sitelikeLevel != 0){
+		OutputSiteLikelihoods(dataIndex, siteLikes, childCLA->underflow_mult, partialCLA->underflow_mult);
+		}
+#ifdef OUTPUT_SITEDERIVS
+	ofstream ord("orderedSiteDerivs.log");
+	ofstream packed("packedSiteDerivs.log");
+	OutputSiteDerivatives(dataIndex, siteLikes, siteD1s, siteD2s, childCLA->underflow_mult, NULL, ord, packed);
+	ord.close();
+	packed.close();
+#endif
+
+	d1Tot = tot1;
+	d2Tot = tot2;
+	lnL += totL;
+	}
+
+void Tree::GetDerivsPartialInternalNState(const CondLikeArray *partialCLA, const CondLikeArray *childCLA, const FLOAT_TYPE *prmat, const FLOAT_TYPE *d1mat, const FLOAT_TYPE *d2mat, FLOAT_TYPE &d1Tot, FLOAT_TYPE &d2Tot, int modIndex, int dataIndex){
+	//this function assumes that the pmat is arranged with the nstates^2 entries for the
+	//first rate, followed by nstates^2 for the second, etc.
+	const FLOAT_TYPE *CL1=childCLA->arr;
+	const FLOAT_TYPE *partial=partialCLA->arr;
+
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+
+	const int nchar = data->NChar();
+	const int *countit = data->GetCounts();
+	const int nstates = mod->NStates();
+	const int nRateCats = mod->NRateCats();
+
+	const FLOAT_TYPE *rateProb=mod->GetRateProbs();
+
+	const int lastConst=data->LastConstant();
+	const int *conStates=data->GetConstStates();
+	const FLOAT_TYPE prI=mod->PropInvar();
+	const int numCondPats = data->NumConditioningPatterns();
+
+	vector<FLOAT_TYPE> freqs(nstates);
+	for(int i=0;i<nstates;i++) 
+		freqs[i]=mod->StateFreq(i);
+
+#ifdef UNIX
+	posix_madvise((void*)partial, nchar*nstates*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+	posix_madvise((void*)CL1, nchar*nstates*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+#endif
+
+	FLOAT_TYPE tot1=ZERO_POINT_ZERO, tot2=ZERO_POINT_ZERO, totL = ZERO_POINT_ZERO, grandSumL = ZERO_POINT_ZERO;//can't use d1Tot and d2Tot in OMP reduction because they are references
+
+	FLOAT_TYPE siteL, siteD1, siteD2;
+	FLOAT_TYPE tempL, tempD1, tempD2;
+	FLOAT_TYPE unscaledlnL;
+
+	FLOAT_TYPE logLikeConditioningFactor = ZERO_POINT_ZERO;
+	FLOAT_TYPE conditioningLikeSum = ZERO_POINT_ZERO;
+	FLOAT_TYPE conditioningD1Sum = ZERO_POINT_ZERO;
+	FLOAT_TYPE conditioningD2Sum = ZERO_POINT_ZERO;
+	FLOAT_TYPE probVariable = ZERO_POINT_ZERO;
+
+	vector<FLOAT_TYPE> siteLikes(nchar);
+#ifdef OUTPUT_SITEDERIVS
+	vector<FLOAT_TYPE> siteD1s(nchar);
+	vector<FLOAT_TYPE> siteD2s(nchar);
+#endif
+
+#ifdef OMP_INTDERIV_NSTATE
+	#ifdef LUMP_LIKES
+		#pragma omp parallel for if(numCondPats == 0) private(partial, CL1, siteL, siteD1, siteD2, unscaledlnL, tempL, tempD1, tempD2) reduction(+ : tot1, tot2, totL, grandSumL)
+	#else
+		#pragma omp parallel for if(numCondPats == 0) private(partial, CL1, siteL, siteD1, siteD2, unscaledlnL, tempL, tempD1, tempD2) reduction(+ : tot1, tot2, totL)
+	#endif
+	for(int i=0;i<nchar;i++){
+		partial = &(partialCLA->arr[nstates*i]);
+		CL1		= &(childCLA->arr[nstates*i]);
+#else
+	for(int i=0;i<nchar;i++){
+#endif
+#ifdef USE_COUNTS_IN_BOOT
+		if(countit[i] > 0){//this check speeds us up in the case of bootstrapping
+#else
+		if(1){
+#endif
+			siteL = siteD1 = siteD2 = ZERO_POINT_ZERO;
+			for(int from=0;from<nstates;from++){
+				tempL = tempD1 = tempD2 = ZERO_POINT_ZERO;
+				for(int to=0;to<nstates;to++){
+					tempL += prmat[from*nstates + to]*CL1[to];
+					tempD1 += d1mat[from*nstates + to]*CL1[to];
+					tempD2 += d2mat[from*nstates + to]*CL1[to];
+					}
+				siteL += tempL * partial[from] * freqs[from];
+				siteD1 += tempD1 * partial[from] * freqs[from];
+				siteD2 += tempD2 * partial[from] * freqs[from];
+				}
+			siteL *= rateProb[0]; //multiply by (1-pinv)
+			siteD1 *= rateProb[0];
+			siteD2 *= rateProb[0];
+
+			if((mod->NoPinvInModel() == false) && (i<=lastConst)){
+				siteL += (prI*freqs[conStates[i]] * exp((FLOAT_TYPE)partialCLA->underflow_mult[i]) * exp((FLOAT_TYPE)childCLA->underflow_mult[i]));
+				}
+
+			unscaledlnL = log(siteL) - partialCLA->underflow_mult[i] - childCLA->underflow_mult[i];
+
+			if(numCondPats > 0){
+				assert(unscaledlnL < ZERO_POINT_ZERO);
+				if(i < numCondPats){
+					if(partialCLA->underflow_mult[i] + childCLA->underflow_mult[i] == 0){
+						conditioningLikeSum += siteL;
+						conditioningD1Sum += siteD1;
+						conditioningD2Sum += siteD2;
+						}
+					else{
+						outman.DebugMessage("SCALED MKV SCALER = %d (%f)", partialCLA->underflow_mult[i] + childCLA->underflow_mult[i], exp((double)(partialCLA->underflow_mult[i] + childCLA->underflow_mult[i])));
+						double unscaler = exp((double)(partialCLA->underflow_mult[i] + childCLA->underflow_mult[i]));
+						//Guard against this over or underflowing, which I think are very unlikely. If it does, just ignore this site
+						if(unscaler == unscaler){
+							double unscaled = siteL / unscaler;
+							double unscaledD1 = siteD1 / unscaler;
+							double unscaledD2 = siteD2 / unscaler;
+							if(unscaled == unscaled){
+								conditioningLikeSum += unscaled;
+								assert(unscaledD1 == unscaledD1);
+								conditioningD1Sum += unscaledD1; 
+								assert(unscaledD2 == unscaledD2);
+								conditioningD2Sum += unscaledD2;
+								}
+							}
+						}
+					if(i == numCondPats - 1){
+						probVariable = (ONE_POINT_ZERO - conditioningLikeSum);
+						logLikeConditioningFactor = -log(probVariable);
+						}
+					//these are just for site deriv output
+					unscaledlnL = siteL;
+					siteD1 = siteD1;
+					siteD2 = siteD2;
+					}
+				else{ 
+					//condition the likelihood on variability
+					FLOAT_TYPE condlnL = unscaledlnL + logLikeConditioningFactor;
+					assert(condlnL < ZERO_POINT_ZERO);
+					totL += condlnL * countit[i];
+
+					//condition the first deriv
+					FLOAT_TYPE condD1 = (siteD1 + ((siteL * conditioningD1Sum) / probVariable)) / siteL; 
+
+					//condition the second
+					FLOAT_TYPE t1 = conditioningLikeSum - ONE_POINT_ZERO;
+					FLOAT_TYPE condD2 = ((-siteD1 * siteD1 * t1 * t1) + siteL * ((t1 * t1 * siteD2) + siteL * (conditioningD1Sum * conditioningD1Sum - t1 * conditioningD2Sum))) / (siteL * siteL * t1 * t1);
+
+					tot1 += countit[i] * condD1;
+					tot2 += countit[i] * condD2;
+					assert(tot1 == tot1);
+					assert(tot2 == tot2);
+					//these are just for site deriv output
+					unscaledlnL = condlnL;
+					siteD1 = condD1;
+					siteD2 = condD2;
+					}
+				}
+			else if(unscaledlnL < ZERO_POINT_ZERO){
+				totL += unscaledlnL * countit[i];
+				siteD1 /= siteL;
+				tot1 += countit[i] * siteD1;
+				siteD2 = ((siteD2 / siteL) - siteD1*siteD1);
+				tot2 += countit[i] * siteD2;
+				assert(tot1 == tot1);
+				assert(tot2 == tot2);
+				}
+			partial += nstates;
+			CL1 += nstates;
+			}
+		if(sitelikeLevel != 0){
+			siteLikes[i] = unscaledlnL;
+			}
+#ifdef OUTPUT_SITEDERIVS
+		siteD1s[i] = siteD1;
+		siteD2s[i] = siteD2;
+#endif
+#ifdef LUMP_LIKES
+		if((i + 1) % LUMP_FREQ == 0){
+			grandSumL += totL;
+			totL = ZERO_POINT_ZERO;
+			}
+		}
+	totL += grandSumL;
+#else
+		}
+#endif
+	if(sitelikeLevel != 0){
+		OutputSiteLikelihoods(dataIndex, siteLikes, childCLA->underflow_mult, partialCLA->underflow_mult);
+		}
+#ifdef OUTPUT_SITEDERIVS
+	ofstream ord("orderedSiteDerivs.int.log");
+	ofstream packed("packedSiteDerivs.int.log");
+	OutputSiteDerivatives(dataIndex, siteLikes, siteD1s, siteD2s, partialCLA->underflow_mult, childCLA->underflow_mult, ord, packed);
+	ord.close();
+	packed.close();
+#endif
+
+	d1Tot = tot1;
+	d2Tot = tot2;
+	lnL += totL;
+	}
+
+void Tree::GetDerivsPartialInternalEQUIV(const CondLikeArray *partialCLA, const CondLikeArray *childCLA, const FLOAT_TYPE *prmat, const FLOAT_TYPE *d1mat, const FLOAT_TYPE *d2mat, FLOAT_TYPE &d1Tot, FLOAT_TYPE &d2Tot, char *equiv, int modIndex, int dataIndex){
+	//this function assumes that the pmat is arranged with the 16 entries for the
+	//first rate, followed by 16 for the second, etc.
+
+	//this needs to be updated before the Equiv calcs will work
+	assert(0);
+	FLOAT_TYPE *CL1=childCLA->arr;
+	FLOAT_TYPE *partial=partialCLA->arr;
+
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+	
+	const int nchar=data->NChar();
+	const int nRateCats=mod->NRateCats();
+
+#ifdef UNIX
+	posix_madvise((void*)partial, nchar*4*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+	posix_madvise((void*)CL1, nchar*4*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+#endif
+
+	FLOAT_TYPE siteL;
+	FLOAT_TYPE La, Lc, Lg, Lt;
+	FLOAT_TYPE D1a, D1c, D1g, D1t;
+	FLOAT_TYPE D2a, D2c, D2g, D2t;
+
+	FLOAT_TYPE eLa, eLc, eLg, eLt;
+	FLOAT_TYPE eD1a, eD1c, eD1g, eD1t;
+	FLOAT_TYPE eD2a, eD2c, eD2g, eD2t;
+
+	FLOAT_TYPE tot1=ZERO_POINT_ZERO, tot2=ZERO_POINT_ZERO;//can't use d1Tot and d2Tot in OMP reduction because they are references
+	
+	const int *countit=data->GetCounts();
+	const FLOAT_TYPE *rateProb=mod->GetRateProbs();
+	assert(nRateCats  == 1);
+
+	const int lastConst=data->LastConstant();
+	const int *conBases=data->GetConstStates();
+	const FLOAT_TYPE prI=mod->PropInvar();	
+
+	FLOAT_TYPE freqs[4];
+	for(int i=0;i<4;i++) 
+		freqs[i]=mod->StateFreq(i);
+
+	int rOff =0;
+	for(int i=0;i<nchar;i++){
+		if((countit[i]) != 0){
+			if(equiv[i] == false){
+				eLa = ( prmat[rOff ]*CL1[0]+prmat[rOff + 1]*CL1[1]+prmat[rOff + 2]*CL1[2]+prmat[rOff + 3]*CL1[3])  * rateProb[0];
+				eLc = ( prmat[rOff + 4]*CL1[0]+prmat[rOff + 5]*CL1[1]+prmat[rOff + 6]*CL1[2]+prmat[rOff + 7]*CL1[3])  * rateProb[0];
+				eLg = ( prmat[rOff + 8]*CL1[0]+prmat[rOff + 9]*CL1[1]+prmat[rOff + 10]*CL1[2]+prmat[rOff + 11]*CL1[3])  * rateProb[0];
+				eLt = ( prmat[rOff + 12]*CL1[0]+prmat[rOff + 13]*CL1[1]+prmat[rOff + 14]*CL1[2]+prmat[rOff + 15]*CL1[3])  * rateProb[0];
+				
+				eD1a = ( d1mat[rOff ]*CL1[0]+d1mat[rOff + 1]*CL1[1]+d1mat[rOff + 2]*CL1[2]+d1mat[rOff + 3]*CL1[3])  * rateProb[0];
+				eD1c = ( d1mat[rOff + 4]*CL1[0]+d1mat[rOff + 5]*CL1[1]+d1mat[rOff + 6]*CL1[2]+d1mat[rOff + 7]*CL1[3])  * rateProb[0];
+				eD1g = ( d1mat[rOff + 8]*CL1[0]+d1mat[rOff + 9]*CL1[1]+d1mat[rOff + 10]*CL1[2]+d1mat[rOff + 11]*CL1[3])  * rateProb[0];
+				eD1t = ( d1mat[rOff + 12]*CL1[0]+d1mat[rOff + 13]*CL1[1]+d1mat[rOff + 14]*CL1[2]+d1mat[rOff + 15]*CL1[3])  * rateProb[0];		
+
+				eD2a = ( d2mat[rOff ]*CL1[0]+d2mat[rOff + 1]*CL1[1]+d2mat[rOff + 2]*CL1[2]+d2mat[rOff + 3]*CL1[3])  * rateProb[0];
+				eD2c = ( d2mat[rOff + 4]*CL1[0]+d2mat[rOff + 5]*CL1[1]+d2mat[rOff + 6]*CL1[2]+d2mat[rOff + 7]*CL1[3])  * rateProb[0];
+				eD2g = ( d2mat[rOff + 8]*CL1[0]+d2mat[rOff + 9]*CL1[1]+d2mat[rOff + 10]*CL1[2]+d2mat[rOff + 11]*CL1[3])  * rateProb[0];
+				eD2t = ( d2mat[rOff + 12]*CL1[0]+d2mat[rOff + 13]*CL1[1]+d2mat[rOff + 14]*CL1[2]+d2mat[rOff + 15]*CL1[3])  * rateProb[0];
+				}
+			La = eLa * partial[0];
+			Lc = eLc * partial[1];
+			Lg = eLg * partial[2];
+			Lt = eLt * partial[3];
+
+			D1a = eD1a * partial[0];
+			D1c = eD1c * partial[1];
+			D1g = eD1g * partial[2];
+			D1t = eD1t * partial[3];
+
+			D2a = eD2a * partial[0];
+			D2c = eD2c * partial[1];
+			D2g = eD2g * partial[2];
+			D2t = eD2t * partial[3];
+
+			partial+=4;
+			CL1+=4;
+			
+			if((mod->NoPinvInModel() == false) && (i<=lastConst)){
+				FLOAT_TYPE	btot=ZERO_POINT_ZERO;
+				if(conBases[i]&1) btot+=freqs[0];
+				if(conBases[i]&2) btot+=freqs[1];
+				if(conBases[i]&4) btot+=freqs[2];
+				if(conBases[i]&8) btot+=freqs[3];
+				//6-27-05 fixed this to calc derivs correctly if constant site has been rescaled
+				siteL  = ((La*freqs[0]+Lc*freqs[1]+Lg*freqs[2]+Lt*freqs[3]) + (prI*btot)*exp((FLOAT_TYPE)childCLA->underflow_mult[i]+partialCLA->underflow_mult[i]));
+				}
+			else
+				siteL  = ((La*freqs[0]+Lc*freqs[1]+Lg*freqs[2]+Lt*freqs[3]));
+			FLOAT_TYPE tempD1 = (((D1a*freqs[0]+D1c*freqs[1]+D1g*freqs[2]+D1t*freqs[3])) / siteL);
+#ifdef SINGLE_PRECISION_FLOATS
+			if(fabs(tempD1) < 1.0e8f){
+				assert(d1Tot == d1Tot);
+				FLOAT_TYPE siteD2=((D2a*freqs[0]+D2c*freqs[1]+D2g*freqs[2]+D2t*freqs[3]));
+				tot1 += countit[i] * tempD1;
+				tot2 += countit[i] * ((siteD2 / siteL) - tempD1*tempD1);
+				}
+#else
+			assert(d1Tot == d1Tot);
+			FLOAT_TYPE siteD2=((D2a*freqs[0]+D2c*freqs[1]+D2g*freqs[2]+D2t*freqs[3]));
+			tot1 += countit[i] * tempD1;
+			tot2 += countit[i] * ((siteD2 / siteL) - tempD1*tempD1);
+#endif
+			assert(d2Tot == d2Tot);
+//			assert(tot1 < 1.0e10 && tot2 < 1.0e10);
+			}
+		else{
+			partial+=4*nRateCats;
+			CL1+=4*nRateCats;			
+			}
+		}
+	d1Tot = tot1;
+	d2Tot = tot2;
+	}
diff --git a/src/optimizationinfo.h b/src/optimizationinfo.h
new file mode 100644
index 0000000..21c3ea2
--- /dev/null
+++ b/src/optimizationinfo.h
@@ -0,0 +1,88 @@
+// GARLI version 2.0 source code
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#ifndef OPTIMIZATION_INFO
+#define OPTIMIZATION_INFO
+
+typedef pair<FLOAT_TYPE, FLOAT_TYPE> pd;
+
+bool IsEvalLess(pd lhs, pd rhs){
+	return lhs.second < rhs.second;
+	}
+
+
+class OptimizationInfo{
+	
+	int node;
+	FLOAT_TYPE initLen;
+	FLOAT_TYPE precision;
+	bool goodGuess;
+	
+	FLOAT_TYPE initBracket[3];
+	
+	vector<pd> brakEvals;
+	vector<pd> brentEvals;
+	
+	public:
+	OptimizationInfo(){};
+	void Setup(int n, FLOAT_TYPE len, FLOAT_TYPE prec, bool gg, FLOAT_TYPE low, FLOAT_TYPE mid, FLOAT_TYPE high){
+		
+		brakEvals.clear();
+		brentEvals.clear();
+		
+		node=n;
+		initLen=len;
+		precision=prec;
+		goodGuess=gg;
+		
+		initBracket[0]=low;
+		initBracket[1]=mid;
+		initBracket[2]=high;
+		}
+	void Report(ofstream &out){
+		out.precision(12);
+		out << "node\t" << node << "\tlen\t" << initLen << "\tprecision\t" << precision;
+		if(goodGuess==true) out << "\t(good guess)\n";
+		else out << "\t(weak guess)\n";
+		out << "init Bracket\t" << initBracket[0] << "\t" << initBracket[1] << "\t" << initBracket[2] << "\n";
+		out << "brak";
+		for(vector<pd>::iterator it=brakEvals.begin();it!=brakEvals.end();it++){
+			out << "\t"<< (*it).first << "\t"  << (*it).second << "\n";
+			}
+		if(brentEvals.empty() == false)		{
+			out << "brent";
+			for(vector<pd>::iterator it=brentEvals.begin();it!=brentEvals.end();it++){
+				out << "\t"<< (*it).first << "\t" << (*it).second << "\n";
+				}		
+			}
+		}
+	void BrakAdd(FLOAT_TYPE val, FLOAT_TYPE score){
+		brakEvals.push_back(make_pair(val, score));
+		}
+
+	void BrentAdd(FLOAT_TYPE val, FLOAT_TYPE score){
+		brentEvals.push_back(make_pair(val, score));
+		}
+	
+	bool IsMinAtMinAllowableLength(){
+		vector<pd>::iterator minEval = min_element(brakEvals.begin(),brakEvals.end(), IsEvalLess);
+		return FloatingPointEquals((*minEval).first, 0.01, 1e-10);
+		}
+	};
+	
+
+#endif
+
diff --git a/src/outputman.h b/src/outputman.h
new file mode 100644
index 0000000..1847197
--- /dev/null
+++ b/src/outputman.h
@@ -0,0 +1,343 @@
+// GARLI version 2.1 source code
+// Copyright 2005-2014 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef OUTPUTMANAGER
+#define OUTPUTMANAGER
+
+#include <stdarg.h>
+#include <ostream>
+#include <fstream>
+#include <iostream>
+//#include <xiosbase>
+
+using namespace std;
+
+class fmtflags;
+
+#define BUFFER_LENGTH 500
+
+class OutputManager{
+	char message[BUFFER_LENGTH+1];
+	ostream *defaultOut;
+	ofstream logOut;
+	bool noOutput;
+	bool log;
+
+	public:
+		OutputManager(){
+			noOutput=false;
+			log=false;
+			defaultOut=&cout;
+			}
+			
+		~OutputManager(){
+			if(log==true) logOut.close();
+			}
+
+		bool IsLogSet(){
+			return (log == true);
+			}
+
+		void SetOutputStream(ostream &out){
+			defaultOut=&out;
+			}
+
+		void SetLogFile(const char *logname){
+			log=true;
+			if(logOut.is_open()){
+				logOut.close();
+				logOut.clear();
+				}
+			logOut.open(logname);
+			}
+
+		ofstream *GetLogStream(){
+			if(log == true) return &logOut;
+			else return NULL;
+			}
+
+		ostream *GetOutputStream(){
+			if(noOutput) return NULL;
+			else return defaultOut;
+			}
+
+		void SetLogFileForAppend(const char *logname){
+			log=true;
+			if(logOut.is_open()){
+				logOut.close();
+				logOut.clear();
+				}
+			logOut.open(logname, ios::app);
+			}
+
+		void CloseLogFile(){
+			logOut.close();
+			}
+
+		void SetNoOutput(bool o){
+			noOutput=o;	
+			}
+
+		void precision(const int p){
+			defaultOut->precision(p);
+			if(log==true) logOut.precision(p);
+			}
+
+		void setf(const std::ios_base::fmtflags &flags){
+			defaultOut->setf(flags);
+			if(log==true) logOut.setf(flags);				
+			}
+
+		void unsetf(const std::ios_base::fmtflags &flags){
+			defaultOut->unsetf(flags);
+			if(log==true) logOut.unsetf(flags);				
+			}
+
+		void UserMessage(const char *fmt, ...){
+			va_list vl;
+			
+			va_start(vl, fmt);
+			int len = vsnprintf(message, BUFFER_LENGTH, fmt, vl);
+			va_end(vl);
+
+			if(len > -1 && len < BUFFER_LENGTH){
+				Print(*defaultOut);
+				}
+			else{//default buffer is not long enough or there was an error
+				char *longmessage = NULL;
+				if(len > -1){//on unix systems vsnprintf returns the required length.  There is some
+					//some ambiguity about whether it includes the null termination or not, but
+					//the number passed to vsnprintf should definitely include it.
+						
+					longmessage = new char[len+2];
+					va_start(vl, fmt);
+					vsnprintf(longmessage, len+1, fmt, vl);
+					va_end(vl);
+					}
+				else{
+#if defined(_MSC_VER)
+					//on windows a negative value means that the length wasn't engough
+					int len2 = BUFFER_LENGTH * 2;
+					longmessage = new char[len2+1];
+					va_start(vl, fmt);
+					while(vsnprintf(longmessage, len2, fmt, vl) < 0){
+						delete []longmessage;
+						len2 *= 2;
+						longmessage = new char[len2+1];
+						va_end(vl);
+						va_start(vl, fmt);
+						}
+					va_end(vl);
+#else
+					//otherwise negative means a formatting error
+					Print(*defaultOut, "(problem formatting some program output...)");
+					if(longmessage) delete []longmessage;
+					return;
+#endif
+					}
+				Print(*defaultOut, longmessage);
+				if(longmessage) delete []longmessage;
+				}
+			}
+
+		void UserMessageNoCR(const char *fmt, ...){
+			va_list vl;
+
+			va_start(vl, fmt);	
+			int len = vsnprintf(message, BUFFER_LENGTH, fmt, vl);
+			va_end(vl);
+
+			if(len > -1 && len < BUFFER_LENGTH){
+				PrintNoCR(*defaultOut);
+				}
+			else{//default buffer is not long enough or there was an error
+				char *longmessage = NULL;
+				if(len > -1){//on unix systems vsnprintf returns the required length.  There is some
+					//some ambiguity about whether it includes the null termination or not, but
+					//the number passed to vsnprintf should definitely include it.
+					longmessage = new char[len+2];
+					va_start(vl, fmt);
+					vsnprintf(longmessage, len+1, fmt, vl);
+					va_end(vl);
+					}
+				else{
+#if defined(_MSC_VER)
+					//on windows a negative value means that the length wasn't engough
+					int len2 = BUFFER_LENGTH * 2;
+					longmessage = new char[len2+1];
+					va_start(vl, fmt);
+					while(vsnprintf(longmessage, len2, fmt, vl) < 0){
+						delete []longmessage;
+						len2 *= 2;
+						longmessage = new char[len2+1];
+						va_end(vl);
+						va_start(vl, fmt);
+						}
+					va_end(vl);
+#else
+					//otherwise negative means a formatting error
+					Print(*defaultOut, "(problem formatting some program output...)");
+					if(longmessage) delete []longmessage;
+					return;
+#endif
+					}
+				PrintNoCR(*defaultOut, longmessage);
+				if(longmessage) delete []longmessage;
+				}
+			}
+
+		void DebugMessage(const char *fmt, ...){
+#ifdef DEBUG_MESSAGES
+			va_list vl;
+			
+			va_start(vl, fmt);
+			int len = vsnprintf(message, BUFFER_LENGTH, fmt, vl);
+			va_end(vl);
+
+			if(len > -1 && len < BUFFER_LENGTH){
+				Print(*defaultOut);
+				}
+			else{//default buffer is not long enough or there was an error
+				char *longmessage = NULL;
+				if(len > -1){//on unix systems vsnprintf returns the required length.  There is some
+					//some ambiguity about whether it includes the null termination or not, but
+					//the number passed to vsnprintf should definitely include it.
+						
+					longmessage = new char[len+2];
+					va_start(vl, fmt);
+					vsnprintf(longmessage, len+1, fmt, vl);
+					va_end(vl);
+					}
+				else{
+#if defined(_MSC_VER)
+					//on windows a negative value means that the length wasn't engough
+					int len2 = BUFFER_LENGTH * 2;
+					longmessage = new char[len2+1];
+					va_start(vl, fmt);
+					while(vsnprintf(longmessage, len2, fmt, vl) < 0){
+						delete []longmessage;
+						len2 *= 2;
+						longmessage = new char[len2+1];
+						va_end(vl);
+						va_start(vl, fmt);
+						}
+					va_end(vl);
+#else
+					//otherwise negative means a formatting error
+					Print(*defaultOut, "(problem formatting some program output...)");
+					if(longmessage) delete []longmessage;
+					return;
+#endif
+					}
+				Print(*defaultOut, longmessage);
+				if(longmessage) delete []longmessage;
+				}
+#endif
+			}
+
+		void DebugMessageNoCR(const char *fmt, ...){
+#ifdef DEBUG_MESSAGES
+			va_list vl;
+
+			va_start(vl, fmt);	
+			int len = vsnprintf(message, BUFFER_LENGTH, fmt, vl);
+			va_end(vl);
+
+			if(len > -1 && len < BUFFER_LENGTH){
+				PrintNoCR(*defaultOut);
+				}
+			else{//default buffer is not long enough or there was an error
+				char *longmessage = NULL;
+				if(len > -1){//on unix systems vsnprintf returns the required length.  There is some
+					//some ambiguity about whether it includes the null termination or not, but
+					//the number passed to vsnprintf should definitely include it.
+					longmessage = new char[len+2];
+					va_start(vl, fmt);
+					vsnprintf(longmessage, len+1, fmt, vl);
+					va_end(vl);
+					}
+				else{
+#if defined(_MSC_VER)
+					//on windows a negative value means that the length wasn't engough
+					int len2 = BUFFER_LENGTH * 2;
+					longmessage = new char[len2+1];
+					va_start(vl, fmt);
+					while(vsnprintf(longmessage, len2, fmt, vl) < 0){
+						delete []longmessage;
+						len2 *= 2;
+						longmessage = new char[len2+1];
+						va_end(vl);
+						va_start(vl, fmt);
+						}
+					va_end(vl);
+#else
+					//otherwise negative means a formatting error
+					Print(*defaultOut, "(problem formatting some program output...)");
+					if(longmessage) delete []longmessage;
+					return;
+#endif
+					}
+				PrintNoCR(*defaultOut, longmessage);
+				if(longmessage) delete []longmessage;
+				}
+#endif
+			}
+
+/*		void UserMessageNoCR(const char *fmt, ...){
+			va_list vl;
+			va_start(vl, fmt);
+			vsprintf(message, fmt, vl);
+			va_end(vl);
+			PrintNoCR(*defaultOut);
+			}
+*/
+		void UserMessage(const string &mess){
+			Print(*defaultOut, mess);
+			}
+
+		void UserMessageNoCR(const string &mess){
+			PrintNoCR(*defaultOut, mess);
+			}
+
+		void flush(){
+			if(noOutput == false) defaultOut->flush();
+			if(log==true) logOut.flush();	
+			}
+
+		void Print(ostream &out){
+			if(noOutput == false) out << message << endl;
+			if(log==true) logOut << message << endl;
+			}
+
+		void PrintNoCR(ostream &out){
+			if(noOutput == false) out << message;
+			if(log==true) logOut << message;
+			}
+
+		void Print(ostream &out, const string &mess){
+			if(noOutput == false) out << mess << endl;
+			if(log==true) logOut << mess << endl;
+			}
+
+		void PrintNoCR(ostream &out, const string &mess){
+			if(noOutput == false) out << mess;
+			if(log==true) logOut << mess;
+			}
+	};
+	
+#endif
+
diff --git a/src/population.cpp b/src/population.cpp
new file mode 100644
index 0000000..a68a577
--- /dev/null
+++ b/src/population.cpp
@@ -0,0 +1,7970 @@
+// GARLI version 2.1 source code
+// Copyright 2005-2014 Derrick J. Zwickl
+// email garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+//	NOTE: Portions of this source adapted from GAML source, written by Paul O. Lewis
+
+#ifdef MPI_VERSION
+	#include <mpi.h>
+#endif
+#include <vector>
+#include <set>
+#include <string>
+#include <algorithm>
+#include <cmath>
+#include <iomanip>
+#include <fstream>
+#include <signal.h>
+
+using namespace std;
+
+#ifdef WIN32
+#include <conio.h>
+#include <windows.h>
+#endif
+
+#ifdef MAC_FRONTEND
+#import <Foundation/Foundation.h>
+#import "MFEInterfaceClient.h"
+#endif
+
+#include "defs.h"
+#include "population.h"
+#include "individual.h"
+#include "sequencedata.h"
+#include "tree.h"
+#include "funcs.h"
+#include "clamanager.h"
+#include "stopwatch.h"
+#include "bipartition.h"
+#include "adaptation.h"
+#include "errorexception.h"
+#include "outputman.h"
+#include "model.h"
+#include "garlireader.h"
+
+#ifdef ENABLE_CUSTOM_PROFILER
+#include "utility.h"
+extern Profiler ProfIntInt;
+extern Profiler ProfIntTerm;
+extern Profiler ProfTermTerm;
+extern Profiler ProfRescale;
+extern Profiler ProfScoreInt;
+extern Profiler ProfScoreTerm;
+extern Profiler ProfIntDeriv;
+extern Profiler ProfTermDeriv;
+extern Profiler ProfCalcPmat;
+extern Profiler ProfCalcEigen;
+extern Profiler ProfModDeriv;
+extern Profiler ProfNewton;
+extern Profiler ProfEQVectors;
+#endif
+
+extern OutputManager outman;
+extern bool interactive;
+bool swapBasedTerm = false;
+
+int memLevel;
+int calcCount=0;
+int optCalcs;
+
+ModelSpecificationSet modSpecSet;
+
+ofstream outf, paupf;
+int tempGlobal=1;
+bool uniqueSwapTried;
+
+FLOAT_TYPE globalBest;
+
+#undef PERIODIC_SCORE_DEBUG
+
+#undef NNI_SPECTRUM
+
+#undef MASTER_DOES_SUBTREE
+
+bool output_tree=false;
+
+int CheckRestartNumber(const string str);
+int debug_mpi(const char* fmt, ...);
+int QuitNow();
+void InterruptMessage( int );
+void ClearDebugLogs();
+
+int askQuitNow = 0;
+
+int QuitNow()
+{
+	char ch = '?';
+	cerr << endl << "Quit? (y/n) -->";
+	do {
+		cin.get(ch);
+	} while( ch != 'y' && ch != 'n' );
+
+        if( ch == 'n' ) askQuitNow = 0;
+
+	return ( ch == 'y' ? 1 : 0 );
+}
+
+#ifdef WIN32
+// A function to get a single character from the windows console.  Provided by POL.
+// Prompts user with string s, then returns the first character typed. If any problems arise
+// (e.g. cannot obtain handle to console input buffer), bails out by returning the null
+// character (i.e. '\0').
+char AskUser(std::string s)
+   {
+   HANDLE h;
+   DWORD num_chars_read, new_console_mode, prev_console_mode;
+   char char_buffer[2]; // may be able to get away with [1]
+
+   // Output the prompt string
+   std::cerr << s << std::endl;
+
+   // Get handle to console input buffer
+   h = GetStdHandle(STD_INPUT_HANDLE);
+   if (h == INVALID_HANDLE_VALUE)
+       return '\0';
+
+   // Save the current input mode (will restore it before we leave this function)
+   if (!GetConsoleMode(h, &prev_console_mode) )
+       return '\0';
+
+   // Set new console mode. There are five mode flags defined in wincon.h (ENABLE_LINE_INPUT, ENABLE_ECHO_INPUT,
+   // ENABLE_PROCESSED_INPUT, ENABLE_WINDOW_INPUT and ENABLE_MOUSE_INPUT), only ENABLE_PROCESSED_INPUT is useful
+   // to us, and we specifically want to avoid ENABLE_LINE_INPUT because it requires the user to press the enter
+   // key before ReadConsole returns (much better to have this function return the instant the user presses any
+   // key).
+   new_console_mode = ENABLE_PROCESSED_INPUT;
+   if (!SetConsoleMode(h, new_console_mode))
+       return '\0';
+
+   // Read 1 character and place it in char_buffer. num_chars_read should be 1 afterwards. Note that
+   // the last argument is reserved and must be NULL.
+   if (!ReadConsole(h, char_buffer, 1, &num_chars_read, NULL))
+       return '\0';
+
+   // Be nice and return console mode to its previous value
+   if (!SetConsoleMode(h, prev_console_mode))
+       return '\0';
+
+   return char_buffer[0];
+   }
+#endif
+
+void InterruptMessage( int )
+{
+	askQuitNow = 1;
+}
+
+void TurnOnSignalCatching()
+{//if SIGINT (generally Ctrl-C) isn't already set to be ignored, set it to the custom handler 
+	if( signal( SIGINT, SIG_IGN ) != SIG_IGN ){
+		signal( SIGINT, InterruptMessage );
+		}
+}
+
+void TurnOffSignalCatching()
+{//if SIGINT (generally Ctrl-C) isn't already set to be ignored, set it back to the default
+	if( signal( SIGINT, SIG_IGN ) != SIG_IGN ){
+		signal( SIGINT, SIG_DFL );
+		}
+}
+
+bool CheckForUserSignal(){
+	//this will be set if the user raises a signal with ctrl-C
+	if(askQuitNow == 1){
+		char c;
+		if(interactive == false){
+			//The run will begin terminating gracefully after this returns, but turn off further catching
+			//in case the user wants to fully kill the run fully
+			TurnOffSignalCatching();
+			return true;
+			}
+		else{
+#if defined (WIN32)
+			c = AskUser("Perform final branch-length optimization and terminate now? (y/n)");
+	#else
+			outman.UserMessage("Perform final branch-length optimization and terminate now? (y/n)");
+	#ifdef MAC_FRONTEND
+			NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+			BOOL shouldQuit = [[MFEInterfaceClient sharedClient] programShouldTerminate];
+			c = shouldQuit ? 'y' : 'n';
+			[pool release];
+	#else
+			c = getchar();
+	#endif
+	#endif
+			if(c=='y'){
+				//as above, give up further catching
+				TurnOffSignalCatching();
+	#ifdef MAC
+				cin.get();
+	#endif   
+				return true;
+				}
+			else{
+				//the user changed their mind
+				askQuitNow = 0;
+				TurnOnSignalCatching();
+				outman.UserMessage("continuing ...");
+	#ifndef MAC_FRONTEND
+	#ifndef WIN32
+				cin.get();
+	#endif
+	#endif
+				return false;
+				}
+			}
+		}
+	return false;
+	}
+
+//
+//
+// Methods for class Population
+//
+//
+
+void ClearDebugLogs(){
+	//most of the debug logs just append to the current log, so clear them out here
+	#ifndef NDEBUG
+
+//	ofstream pert("pertreport.log");
+//	pert.close();
+
+#ifdef MPI_VERSION
+	ofstream subrec("subrec.log");
+	subrec.close();
+	ofstream optp("partscores.log");
+	optp.close();
+#endif
+/*	ofstream brak("brakdebug.log");
+	brak.close();
+	ofstream brak2("brakmiss.log");
+	brak2.close();
+	ofstream opt("optimization.log");
+	opt.close();
+	ofstream optt("opttrees.tre");
+	optt.close();
+	ofstream opts("optscores.log");
+	opts.close();
+
+	ofstream optb("blendeb.log");
+	optb.close();
+*/
+#endif
+	}
+
+Population::~Population()
+{
+	if(indiv != NULL){
+		for (unsigned i = 0; i < total_size; ++i)	{
+			for (unsigned j = 0; j < total_size; ++j)	{
+				if (newindiv[i].treeStruct == indiv[j].treeStruct)	{
+					newindiv[i].treeStruct = NULL;
+					break;
+					}
+				}
+			}
+		}
+	
+	if( indiv!=NULL )
+		MEM_DELETE_ARRAY(indiv); // indiv has length params.nindivs
+
+	if( newindiv!=NULL )
+		MEM_DELETE_ARRAY(newindiv); // newindiv has length params.nindivs
+
+	ClearStoredTrees();
+
+	if( cumfit!=NULL ) {
+		for( unsigned i = 0; i < total_size; i++ )
+			MEM_DELETE_ARRAY(cumfit[i]); // cumfit[i] has length 2
+		MEM_DELETE_ARRAY(cumfit); // cumfit has length params.nindivs
+	}
+
+	if( treeString!=NULL)
+		MEM_DELETE_ARRAY(treeString);
+
+	for(vector<Tree*>::iterator vit=unusedTrees.begin();vit!=unusedTrees.end();vit++){
+		delete *vit;
+		}
+	unusedTrees.clear();
+
+	if(claMan!=NULL){
+		delete claMan;
+		}
+	
+	if(paraMan!=NULL){
+		delete paraMan;
+		}	
+#ifdef INCLUDE_PERTURBATION
+	if(pertMan!=NULL){
+		delete pertMan;
+		}
+#endif
+
+	if(Bipartition::str!=NULL) delete []Bipartition::str;
+	
+	for(vector<Tree*>::iterator delit=unusedTrees.begin();delit!=unusedTrees.end();delit++)
+		delete *delit;
+		
+	if(adap!=NULL) delete adap;
+
+	Tree::attemptedSwaps.ClearAttemptedSwaps();
+
+//This shouldn't have been getting deleted.  It was created as a local in main and then just
+//aliased in Population
+//	if(rawPart != NULL)
+//		rawPart->Delete();
+		
+}
+
+void Population::ErrorMsg( char* msgstr, int len )
+{
+	switch( error )
+	{
+		case nomem:
+			strncpy( msgstr, "not enough memory", len );
+			break;
+		case nofile:
+			strncpy( msgstr, "parameter file not found", len );
+			break;
+		case baddimen:
+			strncpy( msgstr, "bad dimensions specified", len );
+			break;
+		default:
+			strncpy( msgstr, "undocumented error", len );
+	}
+}
+
+void Population::CheckForIncompatibleConfigEntries(){
+	//DEBUG - fill this in better
+
+	//PARTITION - disallow a number of things that aren't implemented/tested with partitioned models
+	if(dataPart->NumSubsets() > 1){
+		if(conf->linkModels && modSpecSet.GetModSpec(0)->IsEmpiricalStateFrequencies())
+			throw ErrorException("Sorry, empirical state frequencies can't be used with partitioned models when models are linked");
+		}
+
+	for(int ms = 0;ms < modSpecSet.NumSpecs();ms++){
+		ModelSpecification *modSpec = modSpecSet.GetModSpec(ms);
+		//if no model mutations will be performed, parameters cannot be estimated.
+		if(conf->modWeight == ZERO_POINT_ZERO){
+			if(modSpec->fixStateFreqs == false) 
+				throw(ErrorException("if model mutation weight is set to zero,\nstatefrequencies cannot be set to estimate!"));
+			if(modSpec->includeInvariantSites == true && modSpec->fixInvariantSites == false) 
+				throw(ErrorException("if model mutation weight is set to zero,\ninvariantsites cannot be set to estimate!"));
+			if(modSpec->IsAminoAcid() == false && modSpec->Nst() > 1 && modSpec->fixRelativeRates == false) 
+				throw(ErrorException("if model mutation weight is set to zero, ratematrix\nmust be fixed or 1rate!"));
+			if((modSpec->numRateCats > 1 && modSpec->IsFlexRateHet() == false && modSpec->fixAlpha == false && modSpec->IsCodon() == false) || (modSpec->IsCodon() && !modSpec->fixOmega)) 
+				throw(ErrorException("if model mutation weight is set to zero,\nratehetmodel must be set to gammafixed, nonsynonymousfixed or none!"));
+			}
+		if((modSpec->IsNStateV() || modSpec->IsOrderedNStateV() || modSpec->IsBinaryNotAllZeros() || modSpec->IsOrientedGap()) && (_stricmp(conf->streefname.c_str(), "stepwise") == 0))
+			throw ErrorException("Sorry, stepwise addition starting trees currently cannot be used when\n\ta conditioned model (datatype = standardvariable,\n\tstandardvariableordered, binarynotallzeros or indelmixturemodel)\n\tis used for any data.\n\tTry streefname = random, or provide your own starting tree.");
+		if(conf->inferInternalStateProbs && ! (modSpec->IsNucleotide() || modSpec->IsAminoAcid() || modSpec->IsCodon()))
+			throw ErrorException("Sorry, internal states can currently only be inferred for nucleotide, amino acid and codon models");
+		}
+
+	if(conf->inferInternalStateProbs && conf->bootstrapReps > 0) 
+		throw(ErrorException("You cannont infer internal states during a bootstrap run!"));
+	if(conf->outputSitelikelihoods > 0 && conf->bootstrapReps > 0) 
+		throw(ErrorException("You cannont output site likelihoods during a bootstrap run!"));
+	if(conf->startOptPrec < conf->minOptPrec)
+		throw ErrorException("startoptprec must be equal to or greater than minoptprec");
+
+	if(!conf->checkpoint && conf->workPhaseDivision)
+		throw ErrorException("workphasedivision mode only makes sense if checkpoints are written (writecheckpoints = 1)");
+	}
+
+void Population::Setup(GeneralGamlConfig *c, DataPartition *d, DataPartition *rawD, int nprocs, int r){
+	bool validateMode = false;
+	if(r < 0){
+		validateMode = true;
+		r = 0;
+		}
+	stopwatch.Start();
+
+	//most of the allocation occurs here or in children
+	//set various things
+	rank=r;
+	conf=c;
+	dataPart = d;
+	rawPart = rawD;
+
+	subtreeNode=0;
+
+	CheckForIncompatibleConfigEntries();
+
+	//put info that was read from the config file in its place
+
+	if(rank == 0) total_size = conf->nindivs + nprocs-1;
+	else total_size = conf->nindivs;
+	swapTermThreshold = conf->swapTermThreshold;
+	if(swapTermThreshold != 0)
+		//this is a global that Tree needs access to
+		swapBasedTerm = true;
+	else 
+		swapBasedTerm = false;
+
+	//set two model statics
+	Model::mutationShape = conf->gammaShapeModel;
+
+	//check and warn if different codes have been selected for different subsets - this is experimental
+	for(vector<ClaSpecifier>::iterator c = claSpecs.begin();c != claSpecs.end();c++){
+		if(modSpecSet.GetModSpec((*c).modelIndex)->IsCodon()){
+			for(vector<ClaSpecifier>::iterator c2 = c+1;c2 != claSpecs.end();c2++){
+				if(modSpecSet.GetModSpec((*c2).modelIndex)->IsCodon()){
+					if(modSpecSet.GetModSpec((*c).modelIndex)->geneticCode != modSpecSet.GetModSpec((*c2).modelIndex)->geneticCode){
+						outman.UserMessage("\n################\nWARNING: Different genetic codes have been specified among partition subsets.");
+						outman.UserMessage("This is experimental - check your results carefully!!!\n################\n");
+						}
+					}
+				}
+			}
+		}
+
+#ifdef INPUT_RECOMBINATION
+	total_size = conf->nindivs + NUM_INPUT;
+#endif
+
+	adap=new Adaptation(conf);
+
+#ifdef INCLUDE_PERTURBATION
+	pertMan = new PerturbManager(conf);
+#endif
+
+	//instantiate the ParallelManager
+	if(rank==0){
+		MasterGamlConfig *mastConf = (MasterGamlConfig*) (conf);
+		paraMan = new ParallelManager(dataPart->NTax(), nprocs, mastConf);
+		}
+	
+	//use RTTI to check if the data subsets are nuclotide, and if so make ambig strings
+	for(int ds = 0;ds < dataPart->NumSubsets();ds++){
+		NucleotideData *nuc = dynamic_cast<NucleotideData *>(dataPart->GetSubset(ds));
+		if(nuc != NULL)
+			nuc->MakeAmbigStrings();
+		}
+		
+	//allocate the treeString
+	//remember that we also encode internal node numbers sometimes
+	FLOAT_TYPE taxsize=log10((FLOAT_TYPE) ((FLOAT_TYPE)dataPart->NTax())*dataPart->NTax()*2);
+	stringSize=(int)((dataPart->NTax()*2)*(10+DEF_PRECISION)+taxsize);
+	treeString=new char[stringSize];
+	treeString[stringSize - 1]='\0';
+
+	//allocate the indiv array
+	indiv = new Individual[total_size];
+	newindiv = new Individual[total_size];
+
+	for (unsigned i = conf->nindivs; i < total_size; i++)	{
+		indiv[i].reproduced = indiv[i].willreproduce = 1;
+		newindiv[i].reproduced = newindiv[i].willreproduce = 1;
+		indiv[i].parent=i;
+		newindiv[i].parent=i;	
+		}
+
+	cumfit = new FLOAT_TYPE*[total_size];
+	for(unsigned i = 0; !error && i < total_size; i++ )
+		cumfit[i] = new FLOAT_TYPE[2];
+
+	//instantiate the clamanager and figure out how much memory to snatch
+	FLOAT_TYPE memToUse;
+	//this gives a bit of leeway in normal runs, when total mem usage may get significantly higher than the actual CLA usage
+	//but not much is used when just scoring/optimizing one tree
+	FLOAT_TYPE memUsageMult = ((conf->scoreOnly || conf->optimizeInputOnly) ? 1.05 : 1.25);
+	outman.UserMessage("NOTE: Unlike many programs, the amount of system memory that Garli will\nuse can be controlled by the user.");
+	if(conf->availableMemory > 0){
+		outman.UserMessage("(This comes from the availablememory setting in the configuration file.");
+		outman.UserMessage("Availablememory should NOT be set to more than the actual amount of ");
+		outman.UserMessage("physical memory that your computer has installed)");
+		memToUse=(FLOAT_TYPE)(1.0/memUsageMult)*conf->availableMemory;
+		}
+	else{
+		outman.UserMessage("\nMemory to be used for conditional likelihood arrays specified as %.1f MB", conf->megsClaMemory);
+		memToUse=conf->megsClaMemory;
+		}
+		
+	const int KB = 1024;
+	double claSizePerNodeKB = indiv[0].modPart.CalcRequiredCLAsizeKB(dataPart);
+	int numNodesPerIndiv = dataPart->NTax()-2;
+	int idealClas =  3 * total_size * numNodesPerIndiv;
+	int maxClas = (int)((memToUse*KB)/ claSizePerNodeKB);
+	int numClas;	
+
+	int L0=(int) (numNodesPerIndiv * total_size * 2);//a downward and one upward set for each tree
+	int L1=(int) (numNodesPerIndiv * total_size + 2*total_size + numNodesPerIndiv); //at least a downward set and a full root set for every tree, plus one other set
+	int L2=(int) (numNodesPerIndiv * 2.0 + 2*total_size);//a downward set for the best, one other full set and enough for each root direction
+	int L3;
+	if(conf->scoreOnly || conf->optimizeInputOnly){
+		L3=(int) (numNodesPerIndiv * 1.0 + 2);//one full set plus a few extra
+		}
+	else{
+		L3=(int) (numNodesPerIndiv * 1.5 - 2 + 2*total_size);//one full set, enough to reserve at least all of the full internals of the 
+															 //best indiv and enough for each root
+		}
+
+	if(maxClas >= L0){
+		numClas = min(maxClas, idealClas);
+		memLevel = 0;		
+		}
+	else{
+		numClas=maxClas;
+	 	if(maxClas >= L1) memLevel = 1;
+	 	else if(maxClas >= L2) memLevel = 2;
+	 	else if(maxClas >= L3) memLevel = 3;
+	 	else memLevel=-1;
+		}
+
+	outman.precision(4);
+	outman.UserMessage("\nFor this dataset:");
+	outman.UserMessage(" Mem level		availablememory setting");
+	outman.UserMessage("  great			    >= %.0f MB", ceil(L0 * (claSizePerNodeKB/(FLOAT_TYPE)KB)) * memUsageMult);
+	outman.UserMessage("  good			approx %.0f MB to %.0f MB", ceil(L0 * ((FLOAT_TYPE)claSizePerNodeKB/KB)) * memUsageMult - 1, ceil(L1 * ((FLOAT_TYPE)claSizePerNodeKB/KB)) * memUsageMult);
+	outman.UserMessage("  low			approx %.0f MB to %.0f MB", ceil(L1 * ((FLOAT_TYPE)claSizePerNodeKB/KB)) * memUsageMult - 1, ceil(L2 * ((FLOAT_TYPE)claSizePerNodeKB/KB)) * memUsageMult);
+	outman.UserMessage("  very low		approx %.0f MB to %.0f MB", ceil(L2 * ((FLOAT_TYPE)claSizePerNodeKB/KB)) * memUsageMult - 1, ceil(L3 * ((FLOAT_TYPE)claSizePerNodeKB/KB)) * memUsageMult);
+	outman.UserMessage("the minimum required availablememory is %.0f MB", ceil(L3 * ((FLOAT_TYPE)claSizePerNodeKB/KB)) * memUsageMult );
+
+	if(conf->scoreOnly || conf->optimizeInputOnly){
+		outman.UserMessage("\nNOTE: Less memory is required when scoring or optimizing fixed trees.\n\tminimum of %.0f availablememory would be required to search\n", ceil(((int) (numNodesPerIndiv * 1.5 - 2 + 2*total_size)) * ((FLOAT_TYPE)claSizePerNodeKB/KB)) * 1.25);
+		}
+
+	outman.UserMessage("\nYou specified that Garli should use at most %.1f MB of memory.", conf->availableMemory);
+
+	outman.UserMessage("\nGarli will actually use approx. %.1f MB of memory", memUsageMult*(FLOAT_TYPE)numClas*(FLOAT_TYPE)claSizePerNodeKB/(FLOAT_TYPE)KB);
+
+	if( ! (conf->scoreOnly || conf->optimizeInputOnly)){
+		if(memLevel == 0)
+			outman.UserMessage("**Your memory level is: great (you don't need to change anything)**");
+		else if(memLevel == 1)
+			outman.UserMessage("**Your memory level is: good (you don't need to change anything)**");
+		else if(memLevel == 2)
+			outman.UserMessage("**Your memory level is: low\n\t(you may want to increase the availablememory setting)**");
+		else if(memLevel == 3)
+			outman.UserMessage("**Your memory level is: very low\n\t(if possible, you should increase the availablememory setting)**");
+		else if(memLevel == -1)
+			outman.UserMessage("**NOT ENOUGH MEMORY\n\t(you must increase the availablememory setting)**");
+		}
+	outman.UserMessage("\n#######################################################");
+/*
+	outman.precision(4);
+	outman.UserMessage("allocating memory...\nusing %.1f MB for conditional likelihood arrays.  Memlevel= %d", (FLOAT_TYPE)numClas*(FLOAT_TYPE)claSizePerNode/(FLOAT_TYPE)MB, memLevel);
+	outman.UserMessage("For this dataset:");
+	outman.UserMessage("level 0: >= %.0f megs", ceil(L0 * (claSizePerNode/(FLOAT_TYPE)MB)));
+	outman.UserMessage("level 1: %.0f megs to %.0f megs", ceil(L0 * ((FLOAT_TYPE)claSizePerNode/MB))-1, ceil(L1 * ((FLOAT_TYPE)claSizePerNode/MB)));
+	outman.UserMessage("level 2: %.0f megs to %.0f megs", ceil(L1 * ((FLOAT_TYPE)claSizePerNode/MB))-1, ceil(L2 * ((FLOAT_TYPE)claSizePerNode/MB)));
+	outman.UserMessage("level 3: %.0f megs to %.0f megs", ceil(L2 * ((FLOAT_TYPE)claSizePerNode/MB))-1, ceil(L3 * ((FLOAT_TYPE)claSizePerNode/MB)));
+	outman.UserMessage("not enough mem: <= %.0f megs\n", ceil(L3 * ((FLOAT_TYPE)claSizePerNode/MB))-1);
+*/
+	if(memLevel==-1 && !validateMode) 
+		throw ErrorException("Not enough memory specified in config file (availablememory)!");
+
+	//increasing this more to allow for the possiblility of needing a set for all nodes for both the indiv and newindiv arrays
+	//if we do tons of recombination 
+	idealClas *= 2;
+	if(!validateMode)
+		claMan=new ClaManager(dataPart->NTax()-2, numClas, idealClas, &indiv[0].modPart, dataPart);
+
+	//setup the bipartition statics
+	Bipartition::SetBipartitionStatics(dataPart->NTax());
+
+	//set the tree statics
+	Tree::SetTreeStatics(claMan, dataPart, conf);
+
+	//load any constraints
+	GetConstraints();
+
+	//try to get nexus starting tree/trees from file, which we don't want to do within the PerformSearch loop
+	if((_stricmp(conf->streefname.c_str(), "random") != 0)  && (_stricmp(conf->streefname.c_str(), "stepwise") != 0))
+		if(FileIsNexus(conf->streefname.c_str())){
+			LoadNexusStartingConditions();
+			}
+	}
+
+void Population::LoadNexusStartingConditions(){
+	GarliReader & reader = GarliReader::GetInstance();
+	NxsTaxaBlock *tax = NULL;
+	NxsTreesBlock *treesblock = NULL;
+
+	if(reader.GetNumTaxaBlocks() == 1)
+		tax = reader.GetTaxaBlock(0);
+	else //I think this check happens in NCL as well, but best to be safe
+		throw ErrorException("multiple non-identical taxa blocks have been read");
+	//this actually is also checked in SetTreeStatics
+	if(Tree::rootWithDummy && !tax->IsAlreadyDefined("ROOT")){
+		string n = "ROOT";
+		tax->AppendNewLabel(n);
+		}
+	if(usedNCL && strcmp(conf->streefname.c_str(), conf->datafname.c_str()) == 0){
+		//in this case we should have already read in the tree when getting the data, so check that we have either one
+		//trees block for this taxa block or a garli block
+		if(reader.GetNumTreesBlocks(tax) == 0 && reader.FoundModelString() == false)
+			throw ErrorException("No nexus trees block or Garli block was found in file %s,\n     which was specified as source of starting tree and/or model", conf->streefname.c_str());
+		else if(reader.GetNumTreesBlocks(tax) > 1)
+			throw ErrorException("Expecting only one trees block in file %s (not sure which to use)", conf->streefname.c_str());
+		else if(reader.GetNumTreesBlocks(tax) == 1)
+			startingTreeInNCL = true;
+		else startingTreeInNCL = false;
+		}
+	else{
+		//use NCL to get trees from the specified file
+		outman.UserMessage("Loading starting model and/or tree from file %s", conf->streefname.c_str());
+		//it isn't easy to remove a previous trees block in factory mode, so we need to do this
+		int initNumTreesBlocks = reader.GetNumTreesBlocks(tax);
+		try{
+		reader.ReadFilepath(conf->streefname.c_str(), MultiFormatReader::NEXUS_FORMAT);
+			}
+		catch (const NxsException & x){
+			throw ErrorException("%s", x.msg.c_str());
+			}
+		int afterNumTreesBlocks = reader.GetNumTreesBlocks(tax);;
+		if(afterNumTreesBlocks - initNumTreesBlocks > 1){//we added more than one trees block
+			throw ErrorException("Expecting only one trees block in file %s (not sure which to use)", conf->streefname.c_str());
+			}
+		//otherwise we want the last one because others may have been read with the data
+		else if(afterNumTreesBlocks == initNumTreesBlocks)//we didnt' add any tree blocks
+			startingTreeInNCL = false;
+		else //we found exactly one trees block.  WE NEED TO BE SURE THAT WE USE THE LATEST ONE LATER in SeeedPop
+			startingTreeInNCL = true;
+
+		//we read the file, but didn't find either
+		if(startingTreeInNCL == false && reader.FoundModelString() == false)
+			throw ErrorException("No nexus trees block or Garli block was found in file %s,\n     which was specified as the source of starting model and/or tree", conf->streefname.c_str());
+		}
+	if(reader.FoundModelString()) 
+		startingModelInNCL = true;
+	}
+
+//return population more or less to what it looked like just after Setup()
+void Population::Reset(){
+	if(adap != NULL) delete adap;
+	adap=new Adaptation(conf);
+	lastTopoImprove = lastPrecisionReduction = gen = 0;
+	//conf->restart indicates whether the current rep was restarted, so if we complete one rep and then
+	//move on to another it should be false
+	conf->restart = false;
+	finishedRep = false;
+	finishedGenerations = false;
+	genTermination = false;
+	bestFitness = prevBestFitness = -(FLT_MAX);
+	initialRefinePass = finalRefinePass = 0;
+
+	for(unsigned i=0;i<total_size;i++){
+		if(indiv[i].treeStruct != NULL){
+			indiv[i].treeStruct->RemoveTreeFromAllClas();
+			for(unsigned j=0;j<total_size;j++)//because indivs and newindivs can share 
+				//tree structures in some situations, this check is necessary to avoid double deletion
+				if(newindiv[j].treeStruct == indiv[i].treeStruct) newindiv[j].treeStruct=NULL;
+			delete indiv[i].treeStruct;
+			indiv[i].treeStruct=NULL;
+			}
+		}
+	for(unsigned i=0;i<total_size;i++){
+		if(newindiv[i].treeStruct != NULL){
+			newindiv[i].treeStruct->RemoveTreeFromAllClas();
+			delete newindiv[i].treeStruct;
+			newindiv[i].treeStruct=NULL;
+			}
+		}
+	Tree::attemptedSwaps.ClearAttemptedSwaps();
+	}
+
+void Population::ApplyNSwaps(int numSwaps){
+
+	Individual *ind0 = &newindiv[0];
+
+	ind0->GetStartingConditionsFromFile(conf->streefname.c_str(), 0, dataPart->NTax());
+	ind0->treeStruct->modPart = &ind0->modPart;
+	//ind0->GetStartingConditionsFromNCL(	File(conf->streefname.c_str(), 0, data->NTax());
+	
+	Individual *repResult = new Individual(ind0);
+	storedTrees.push_back(repResult);
+	for(int s=0;s<numSwaps;s++){
+		ind0->treeStruct->TopologyMutator(0.01, 10, 0);
+		ind0->SetDirty();
+		ind0->CalcFitness(0);
+		Individual *repResult = new Individual(ind0);
+		storedTrees.push_back(repResult);
+		}
+
+	WriteStoredTrees("swapped.tre");		
+	}
+
+void Population::SwapToCompletion(FLOAT_TYPE optPrecision){
+	SeedPopulationWithStartingTree(currentSearchRep);
+	InitializeOutputStreams();
+
+	if(conf->runmode == 2)
+		indiv[0].treeStruct->DeterministicSwapperByDist(&indiv[0], optPrecision, conf->limSPRrange, false);
+	else if(conf->runmode == 3)
+		indiv[0].treeStruct->DeterministicSwapperByCut(&indiv[0], optPrecision, conf->limSPRrange, false);
+	else if(conf->runmode == 4)
+		indiv[0].treeStruct->DeterministicSwapperRandom(&indiv[0], optPrecision, conf->limSPRrange);
+	else if(conf->runmode == 5)
+		indiv[0].treeStruct->DeterministicSwapperByDist(&indiv[0], optPrecision, conf->limSPRrange, true);
+	else if(conf->runmode == 6)
+		indiv[0].treeStruct->DeterministicSwapperByCut(&indiv[0], optPrecision, conf->limSPRrange, true);
+	else if(conf->runmode == 13)
+		indiv[0].treeStruct->GenerateTopologiesAtSprDistance(&indiv[0], optPrecision, conf->limSPRrange);
+
+	bestIndiv = 0;
+	FinalOptimization();
+	WriteTreeFile(besttreefile.c_str(), -1);
+/*	double imp = 999.9;
+	do{
+		imp = indiv[0].treeStruct->OptimizeAllBranches(optPrecision);
+		optPrecision /= 1.5;
+		}while(imp > 0.0);
+*/	outman.UserMessage("final score: %f, %d sec", indiv[0].treeStruct->lnL, stopwatch.SplitTime());
+	}
+
+//this is mainly for debugging purposes, to ensure that we are able to make all trees or all trees 
+//compatible with any constraints
+void Population::GenerateTreesOnly(int nTrees){
+	SeedPopulationWithStartingTree(1);
+	InitializeOutputStreams();
+	if((_stricmp(conf->streefname.c_str(), "random") == 0)){
+		outman.UserMessageNoCR("Making random trees compatible with constraints... ");
+		for(int i=0;i<nTrees;i++){
+			indiv[0].MakeRandomTree(dataPart->NTax());
+			AppendTreeToTreeLog(-1, 0);
+			indiv[0].treeStruct->RemoveTreeFromAllClas();
+			delete indiv[0].treeStruct;
+			indiv[0].treeStruct=NULL;
+			if(!(i % 100)) outman.UserMessageNoCR("%d ", i);
+			}
+		}
+	else if((_stricmp(conf->streefname.c_str(), "stepwise") == 0)){
+		outman.UserMessageNoCR("Making stepwise trees compatible with constraints... ");
+		for(int i=0;i<nTrees;i++){
+			indiv[0].MakeStepwiseTree(dataPart->NTax(), conf->attachmentsPerTaxon, adap->branchOptPrecision);
+			AppendTreeToTreeLog(-1, 0);
+			indiv[0].treeStruct->RemoveTreeFromAllClas();
+			delete indiv[0].treeStruct;
+			indiv[0].treeStruct=NULL;
+			if(!(i % 100)) outman.UserMessageNoCR("%d ", i);
+			}
+		}
+	FinalizeOutputStreams(0);
+	}
+
+void Population::RunTests(){
+	//test a number of functions to ensure that any code changes haven't broken anything
+	//it assumes that Setup has been called
+	SeedPopulationWithStartingTree(1);
+//	InitializeOutputStreams();
+
+#ifdef NDEBUG
+	outman.UserMessage("WARNING: You are running internal tests with NDEBUG defined!\nIt should not be defined for full error checking.");
+#endif
+
+	if(conf->bootstrapReps > 0){
+		outman.UserMessage("\nBootstrap reweighting...");
+		//if this is the first rep
+		if(nextBootstrapSeed == 0)
+			nextBootstrapSeed = rnd.seed();
+		lastBootstrapSeed = nextBootstrapSeed;
+		nextBootstrapSeed = dataPart->BootstrapReweight(lastBootstrapSeed, conf->resampleProportion);
+		}
+
+
+	//DEBUG
+//	Individual *ind0 = &newindiv[0];
+//	Individual *ind1 = &newindiv[1];
+	Individual *ind0 = &indiv[0];
+	Individual *ind1 = &indiv[1];
+	Tree *tree0 = ind0->treeStruct;
+	Tree *tree1 = ind1->treeStruct;
+
+	//ind0->MakeRandomTree(data->NTax());
+	//ind0->MakeStepwiseTree(dataPart->NTax(), conf->attachmentsPerTaxon, adap->branchOptPrecision);
+	//ind0->treeStruct->modPart=&ind0->modPart;
+
+#ifdef SINGLE_PRECISION_FLOATS
+	int sigFigs = ceil(log10(-tree0->lnL));
+	double tol = pow(10.0f, sigFigs-7) * 2.0;
+#else
+	double tol = 0.001;
+#endif
+
+	//check that the score was correct coming out of MakeStepwiseTree
+	FLOAT_TYPE scr = tree0->lnL;
+	tree0->MakeAllNodesDirty();
+	ind0->SetDirty();
+	ind0->CalcFitness(0);
+
+	//this only really tests for major scoring problems in the optimization functions
+	scr = tree0->lnL;
+	tree0->OptimizeAllBranches(adap->branchOptPrecision);
+	assert(tree0->lnL + tol > scr);
+	assert(tree0->lnL * 2 < scr);
+
+	//test rescaling
+	scr = tree0->lnL;
+	int r = Tree::rescaleEvery;
+	Tree::rescaleEvery = 2;
+	tree0->MakeAllNodesDirty();
+	ind0->SetDirty();
+	ind0->CalcFitness(0);
+
+	if(FloatingPointEquals(ind0->Fitness(), scr, tol) == false){
+		throw ErrorException("Failed rescaling test: freq %d=%f, freq 2=%f", r, scr, ind0->Fitness());
+		}
+	
+	Tree::rescaleEvery = r;
+
+	tree1=new Tree();
+	ind1->CopySecByRearrangingNodesOfFirst(tree1, ind0);
+	tree1->modPart=&ind1->modPart;
+
+	ind0->SetDirty();
+	ind0->CalcFitness(0);
+
+	ind1->SetDirty();
+	ind1->CalcFitness(0);
+
+	assert(ind0->Fitness() == ind1->Fitness());
+	tree0->MakeAllNodesDirty();
+	tree1->MakeAllNodesDirty();
+
+	for(int i=0;i<100;i++){
+		tree0->RerootHere(tree0->GetRandomInternalNode());
+		tree1->RerootHere(tree1->GetRandomInternalNode());
+
+		tree0->CalcBipartitions(true);
+		tree1->CalcBipartitions(true);
+
+		//check rerooting and bipartition comparisons
+		assert(tree0->IdenticalTopologyAllowingRerooting(tree1->root));
+
+		ind0->SetDirty();
+		ind1->SetDirty();
+
+		//check minimal recalculation scoring (proper readjustment of CLAs during rerooting)
+		tree0->Score(tree0->GetRandomInternalNode());
+		tree1->Score(tree1->GetRandomInternalNode());
+
+		if(FloatingPointEquals(tree0->lnL, tree1->lnL, tol) == false){
+			throw ErrorException("failed min recalc test: %f diff vs %f allowed",  tree0->lnL - tree1->lnL, tol);
+			}
+
+		//check full rescoring from arbitrary nodes in the trees		
+		tree0->MakeAllNodesDirty();
+		tree1->MakeAllNodesDirty();
+		tree0->Score(tree0->GetRandomInternalNode());
+		tree1->Score(tree1->GetRandomInternalNode());
+
+		if(FloatingPointEquals(tree0->lnL, tree1->lnL, tol) == false){
+			throw ErrorException("failed score at arbitrary node test: %f diff vs %f allowed",  tree0->lnL - tree1->lnL, tol);
+			}
+
+		//check that the derivative funcs are outputing the correct score
+		TreeNode *nd = tree0->allNodes[tree0->GetRandomNonRootNode()];
+		tree0->CalcDerivativesRateHet(nd->anc, nd);
+		nd = tree1->allNodes[tree1->GetRandomNonRootNode()];
+		tree1->CalcDerivativesRateHet(nd->anc, nd);
+
+		if(FloatingPointEquals(tree0->lnL, tree1->lnL, tol) == false){
+			throw ErrorException("failed derivative scoring test: %f diff vs %f allowed",  tree0->lnL - tree1->lnL, tol);
+			}
+		}
+	}
+
+void Population::ResetMemLevel(int numNodesPerIndiv, int numClas){
+	assert(0);
+	//Deprecated
+/*
+	const int KB = 1024;
+	const int MB = KB*KB;
+	
+	int claSizePerNode = (4 * modSpec.numRateCats * data->NChar() * sizeof(FLOAT_TYPE)) + (data->NChar() * sizeof(int));
+	int sizeOfIndiv = claSizePerNode * numNodesPerIndiv;
+	int idealClas =  3 * total_size * numNodesPerIndiv;
+
+	int L0=(int) (numNodesPerIndiv * total_size * 2);//a downward and one upward set for each tree
+	int L1=(int) (numNodesPerIndiv * total_size + 2*total_size + numNodesPerIndiv); //at least a downward set and a full root set for every tree, plus one other set
+	int L2=(int) (numNodesPerIndiv * 2.0 + 2*total_size);//a downward set for the best, one other full set and enough for each root direction
+	int L3=(int) (numNodesPerIndiv * 1.5 - 2 + 2*total_size);//one full set, enough to reserve at least all of the full internals of the 
+													 //best indiv and enough for each root	
+	
+	if(numClas >= L0) memLevel = 0;
+	else if(numClas >= L1) memLevel = 1;
+	else if(numClas >= L2) memLevel = 2;
+	else if(numClas >= L3) memLevel = 3;
+	else memLevel=-1;
+	assert(memLevel >= 0);
+*/
+	}
+
+
+void Population::GetConstraints(){
+	//first see if there are any constraints
+	if((strlen(conf->constraintfile.c_str()) != 0) && (_stricmp(conf->constraintfile.c_str(), "none") != 0)){
+		if(FileIsNexus(conf->constraintfile.c_str())) throw ErrorException("Sorry, Garli doesn't allow constraint trees in Nexus format.\n     See the manual for proper constraint format.");
+		ifstream con(conf->constraintfile.c_str());
+		if(con.good() == false) throw ErrorException("Could not open constraint file %s!", conf->constraintfile.c_str());
+		if(con.good()){
+			outman.UserMessage("Loading constraints from file %s", conf->constraintfile.c_str());
+			Tree::LoadConstraints(con, dataPart->NTax());
+			}
+		}
+	}
+
+
+//This is a stripped down version of SeedPopWithStartingTree that loads and validates
+//starting conditions but doesn't score or require CLAs to have been allocated
+void Population::ValidateInput(int rep){
+
+	//create the first indiv, and then copy the tree and clas
+
+	//this is really annoying and hacky - the maxPinv value is held by each model, and is data dependent (maxPinv can't be > obs pinv)
+	//But, since a single model may apply to multiple data, need to be sure that the maxPinv is > the highest obs pinv of any of them
+	//now always setting the model default for each data subset (which due to linkage might reset the model several times), but this 
+	//shouldn't be problematic.  Note that the other data dependent model thing is empirical base freqs, but that will be disallowed
+	//elsewhere when there is linkage.
+	FLOAT_TYPE maxPinv = ZERO_POINT_ZERO;
+	for(vector<ClaSpecifier>::iterator c = claSpecs.begin();c != claSpecs.end();c++){
+		for(int m = 0;m < indiv[0].modPart.NumModels();m++){
+			if((*c).modelIndex == m){
+				indiv[0].modPart.GetModel(m)->SetDefaultModelParameters(dataPart->GetSubset((*c).dataIndex));
+				if(indiv[0].modPart.GetModel(m)->MaxPinv() > maxPinv) maxPinv = indiv[0].modPart.GetModel(m)->MaxPinv();
+				}
+			}
+		}
+	//we should only need to do this crap if the models are linked, but not currently allowing linking of some models but not others
+	if(conf->linkModels && modSpecSet.GetModSpec(0)->includeInvariantSites == true){
+		assert(indiv[0].modPart.NumModels() == 1);
+		if(maxPinv > ZERO_POINT_ZERO == false) throw ErrorException("invariantsites = estimate was specified, but no data subsets contained constant characters!");
+		indiv[0].modPart.GetModel(0)->SetMaxPinv(maxPinv);
+		indiv[0].modPart.GetModel(0)->SetPinv(maxPinv * 0.25, false);
+		}
+
+	//DEBUG - need to stick this in somewhere more natural so that it gets reset after a rep completes
+	indiv[0].modPart.Reset();
+
+	//This is getting very complicated.  Here are the allowable combinations.
+	//streefname not specified (random or stepwise)
+		//Case 1 - no gblock in datafile	
+		//Case 2 - found gblock in datafile
+	//streefname specified
+		//specified file is same as datafile
+			//Case 3 - Found trees block only
+			//Case 4 - Found gblock only (create random tree)
+			//Case 5 - Found both
+		//specified file not same as datafile
+			//NOTE that all of these are also possible with a gblock found in the datafile
+			//3/25/08 Change - a second gblock is not allowed (it will throw an exception
+			//upon reading the second in GarliReader::EnteringBlock), nor are both a garli block
+			//with the data and model params in the old format in the streefname
+			//specified streefname is Nexus
+				//Case 6 - Found trees block only
+				//Case 7 - Found gblock only (create random tree) (if a gblock was already read it will crap out)
+				//Case 8 - Found both (if a gblock was already read it will crap out)
+			//specified streefname is not Nexus
+				//Case 9 - found a tree
+				//Case 10 - found a model (create random tree) (if a gblock was already read it will crap out)
+				//Case 11 - found both (if a gblock was already read it will crap out)
+
+	GarliReader & reader = GarliReader::GetInstance();
+
+#ifdef INPUT_RECOMBINATION
+	if(0)
+#else
+	if((_stricmp(conf->streefname.c_str(), "random") != 0) && (_stricmp(conf->streefname.c_str(), "stepwise") != 0))
+		//some starting file has been specified - Cases 3-11
+#endif
+	{
+		//we already checked in Setup whether NCL has trees for us.  A starting model in Garli block will
+		//be handled below, although both a garli block (in the data) and an old style model specification
+		//are not allowed
+		if(startingTreeInNCL){//cases 3, 5, 6 and 8
+			//CAREFUL here - we may have more than one trees block because a tree could appear with the
+			//dataset and in a different starting tree file.  The factory api allows this fine, so we
+			//need to be sure to grab the last trees block.  Checking for whether the starting tree
+			//file contained multiple trees blocks was already done in LoadNexusStartingConditions
+			const NxsTreesBlock *treesblock = reader.GetTreesBlock(reader.GetTaxaBlock(0), reader.GetNumTreesBlocks(reader.GetTaxaBlock(0)) - 1);
+			assert(treesblock != NULL);
+			//this should verify some aspects of the tree description and change everything to taxon numbers
+			treesblock->ProcessAllTrees();
+			int numTrees = treesblock->GetNumTrees();
+			if(numTrees > 0){
+				int treeNum = (rank+rep-1) % numTrees;
+				indiv[0].GetStartingTreeFromNCL(treesblock, treeNum, dataPart->NTax());
+				outman.UserMessage("Obtained starting tree %d from Nexus", treeNum+1);
+				}
+			else throw ErrorException("Problem getting tree(s) from NCL!");
+			}
+		else if(strcmp(conf->streefname.c_str(), conf->datafname.c_str()) != 0 && !FileIsNexus(conf->streefname.c_str())){
+			//cases 9-11 if the streef file is not the same as the datafile, and it isn't Nexus
+			//use the old garli starting model/tree format
+			outman.UserMessage("Obtaining starting conditions from file %s", conf->streefname.c_str());
+			indiv[0].GetStartingConditionsFromFile(conf->streefname.c_str(), rank + rep - 1, dataPart->NTax());
+			}
+		indiv[0].SetDirty();
+		}
+
+	if(reader.FoundModelString()) 
+		startingModelInNCL = true;
+
+	if(startingModelInNCL || conf->parameterValueString.length() > 0){
+		//crap out if we already got some parameters above in an old style starting conditions file
+#ifndef SUBROUTINE_GARLI
+		if(modSpecSet.GotAnyParametersFromFile() && (currentSearchRep == 1 && (conf->bootstrapReps == 0 || currentBootstrapRep == 1)))
+			throw ErrorException("Found model parameters specified in a Nexus GARLI block with the dataset,\n\tand in the starting condition file (streefname).\n\tPlease use one or the other.");
+#endif
+		if(startingModelInNCL && conf->parameterValueString.length() > 0)
+			throw ErrorException("Found model parameters specified in the configuration file and in the dataset or starting condition file (streefname).\n\tPlease use one or the other.");
+		//model string from garli block, which could have come either in starting condition file
+		//or in file with Nexus dataset.  Cases 2, 4, 5, 7 and 8 come through here.
+
+		string modString;
+		if(startingModelInNCL)
+			modString = reader.GetModelString();
+		else
+			modString = conf->parameterValueString;
+
+		if(modString.length() > 0)
+			indiv[0].modPart.ReadGarliFormattedModelStrings(modString);
+
+		if(startingModelInNCL)
+			outman.UserMessage("Obtained starting or fixed model parameter values from Nexus:");
+		else
+			outman.UserMessage("Obtained starting or fixed model parameter values from configuration file:");
+		}
+
+	//The model params should be set to their initial values by now, so report them
+	if(conf->bootstrapReps == 0 || (currentBootstrapRep == 1 && currentSearchRep == 1)){
+		outman.UserMessage("MODEL REPORT - Parameters are at their INITIAL values (not yet optimized)");
+		indiv[0].modPart.OutputHumanReadableModelReportWithParams();
+		}
+
+	outman.UserMessage("Starting with seed=%d\n", rnd.seed());
+
+	//Here we'll error out if something was fixed but didn't appear
+	for(int ms = 0;ms < modSpecSet.NumSpecs();ms++){
+		const ModelSpecification *modSpec = modSpecSet.GetModSpec(ms);
+		if((_stricmp(conf->streefname.c_str(), "random") == 0) || (_stricmp(conf->streefname.c_str(), "stepwise") == 0)){
+			//if no streefname file was specified, the param values should be in a garli block with the dataset
+			if(modSpec->IsNucleotide() && modSpec->IsUserSpecifiedStateFrequencies() && !modSpec->gotStateFreqsFromFile) 
+				throw(ErrorException("state frequencies specified as fixed, but no\n\tGarli block found in %s!!" , conf->datafname.c_str()));
+			else if(modSpec->fixAlpha && !modSpec->gotAlphaFromFile) 
+				throw(ErrorException("alpha parameter specified as fixed, but no\n\tGarli block found in %s!!" , conf->datafname.c_str()));
+			else if(modSpec->fixInvariantSites && !modSpec->gotPinvFromFile) 
+				throw(ErrorException("proportion of invariant sites specified as fixed, but no\n\tGarli block found in %s!!" , conf->datafname.c_str()));
+			else if(modSpec->IsUserSpecifiedRateMatrix() && !modSpec->gotRmatFromFile) 
+				throw(ErrorException("relative rate matrix specified as fixed, but no\n\tGarli block found in %s!!" , conf->datafname.c_str()));
+			else if(modSpec->IsCodon() && modSpec->fixOmega && !modSpec->gotOmegasFromFile) 
+				throw(ErrorException("rate het model set to nonsynonymousfixed, but no\n\tGarli block found in %s!!" , conf->datafname.c_str()));
+			}
+		else{
+			if((modSpec->IsNucleotide() || modSpec->IsAminoAcid()) && modSpec->IsUserSpecifiedStateFrequencies() && !modSpec->gotStateFreqsFromFile) 
+				throw ErrorException("state frequencies specified as fixed, but no\n\tparameter values found in %s or %s!", conf->streefname.c_str(), conf->datafname.c_str());
+			else if(modSpec->fixAlpha && !modSpec->gotAlphaFromFile) 
+				throw ErrorException("alpha parameter specified as fixed, but no\n\tparameter values found in %s or %s!", conf->streefname.c_str(), conf->datafname.c_str());
+			else if(modSpec->fixInvariantSites && !modSpec->gotPinvFromFile) 
+				throw ErrorException("proportion of invariant sites specified as fixed, but no\n\tparameter values found in %s or %s!", conf->streefname.c_str(), conf->datafname.c_str());
+			else if(modSpec->IsUserSpecifiedRateMatrix() && !modSpec->gotRmatFromFile) 
+				throw ErrorException("relative rate matrix specified as fixed, but no\n\tparameter values found in %s or %s!", conf->streefname.c_str(), conf->datafname.c_str());
+			else if(modSpec->IsCodon() && modSpec->fixOmega && !modSpec->gotOmegasFromFile) 
+				throw ErrorException("rate het model set to nonsynonymousfixed, but no\n\tparameter values found in %s or %s!", conf->streefname.c_str(), conf->datafname.c_str());
+			}
+		}
+
+	//the treestruct could be null if there was a start file that contained no tree
+	if((_stricmp(conf->streefname.c_str(), "random") != 0) && (_stricmp(conf->streefname.c_str(), "stepwise") != 0) && (indiv[0].treeStruct != NULL)){
+		bool foundPolytomies = indiv[0].treeStruct->ArbitrarilyBifurcate();
+		if(foundPolytomies) outman.UserMessage("WARNING: Polytomies found in start tree.  These were arbitrarily resolved.");
+	
+		indiv[0].treeStruct->root->CheckTreeFormation();
+		indiv[0].treeStruct->root->CheckforPolytomies();
+		}
+	
+	//if there are not mutable params in the model, remove any weight assigned to the model
+	if(indiv[0].modPart.NumMutableParams() == 0) {
+		if((conf->bootstrapReps == 0 && currentSearchRep == 1) || (currentBootstrapRep == 1 && currentSearchRep == 1))
+			outman.UserMessage("NOTE: Model contains no mutable parameters!\nSetting model mutation weight to zero.\n");
+		adap->modelMutateProb=ZERO_POINT_ZERO;
+		adap->UpdateProbs();
+		}
+	}
+
+void Population::SeedPopulationWithStartingTree(int rep){
+	for(unsigned i=0;i<total_size;i++){
+		if(indiv[i].treeStruct != NULL) indiv[i].treeStruct->RemoveTreeFromAllClas();
+		if(newindiv[i].treeStruct != NULL) newindiv[i].treeStruct->RemoveTreeFromAllClas();
+		}
+
+	//create the first indiv, and then copy the tree and clas
+
+	//this is really annoying and hacky - the maxPinv value is held by each model, and is data dependent (maxPinv can't be > obs pinv)
+	//But, since a single model may apply to multiple data, need to be sure that the maxPinv is > the highest obs pinv of any of them
+	//now always setting the model default for each data subset (which due to linkage might reset the model several times), but this 
+	//shouldn't be problematic.  Note that the other data dependent model thing is empirical base freqs, but that will be disallowed
+	//elsewhere when there is linkage.
+	FLOAT_TYPE maxPinv = ZERO_POINT_ZERO;
+	for(vector<ClaSpecifier>::iterator c = claSpecs.begin();c != claSpecs.end();c++){
+		for(int m = 0;m < indiv[0].modPart.NumModels();m++){
+			if((*c).modelIndex == m){
+				indiv[0].modPart.GetModel(m)->SetDefaultModelParameters(dataPart->GetSubset((*c).dataIndex));
+				if(indiv[0].modPart.GetModel(m)->MaxPinv() > maxPinv) maxPinv = indiv[0].modPart.GetModel(m)->MaxPinv();
+				}
+			}
+		}
+	//we should only need to do this crap if the models are linked, but not currently allowing linking of some models but not others
+	if(conf->linkModels && modSpecSet.GetModSpec(0)->includeInvariantSites == true){
+		assert(indiv[0].modPart.NumModels() == 1);
+		if(maxPinv > ZERO_POINT_ZERO == false) throw ErrorException("invariantsites = estimate was specified, but no data subsets contained constant characters!");
+		indiv[0].modPart.GetModel(0)->SetMaxPinv(maxPinv);
+		indiv[0].modPart.GetModel(0)->SetPinv(maxPinv * 0.25, false);
+		}
+
+	//DEBUG - need to stick this in somewhere more natural so that it gets reset after a rep completes
+	indiv[0].modPart.Reset();
+
+	//This is getting very complicated.  Here are the allowable combinations.
+	//streefname not specified (random or stepwise)
+		//Case 1 - no gblock in datafile	
+		//Case 2 - found gblock in datafile
+	//streefname specified
+		//specified file is same as datafile
+			//Case 3 - Found trees block only
+			//Case 4 - Found gblock only (create random tree)
+			//Case 5 - Found both
+		//specified file not same as datafile
+			//NOTE that all of these are also possible with a gblock found in the datafile
+			//3/25/08 Change - a second gblock is not allowed (it will throw an exception
+			//upon reading the second in GarliReader::EnteringBlock), nor are both a garli block
+			//with the data and model params in the old format in the streefname
+			//specified streefname is Nexus
+				//Case 6 - Found trees block only
+				//Case 7 - Found gblock only (create random tree) (if a gblock was already read it will crap out)
+				//Case 8 - Found both (if a gblock was already read it will crap out)
+			//specified streefname is not Nexus
+				//Case 9 - found a tree
+				//Case 10 - found a model (create random tree) (if a gblock was already read it will crap out)
+				//Case 11 - found both (if a gblock was already read it will crap out)
+
+	GarliReader & reader = GarliReader::GetInstance();
+
+#ifdef INPUT_RECOMBINATION
+	if(0)
+#else
+	if((_stricmp(conf->streefname.c_str(), "random") != 0) && (_stricmp(conf->streefname.c_str(), "stepwise") != 0))
+		//some starting file has been specified - Cases 3-11
+#endif
+	{
+		//we already checked in Setup whether NCL has trees for us.  A starting model in Garli block will
+		//be handled below, although both a garli block (in the data) and an old style model specification
+		//are not allowed
+		if(startingTreeInNCL){//cases 3, 5, 6 and 8
+			//CAREFUL here - we may have more than one trees block because a tree could appear with the
+			//dataset and in a different starting tree file.  The factory api allows this fine, so we
+			//need to be sure to grab the last trees block.  Checking for whether the starting tree
+			//file contained multiple trees blocks was already done in LoadNexusStartingConditions
+			const NxsTreesBlock *treesblock = reader.GetTreesBlock(reader.GetTaxaBlock(0), reader.GetNumTreesBlocks(reader.GetTaxaBlock(0)) - 1);
+			assert(treesblock != NULL);
+			//this should verify some aspects of the tree description and change everything to taxon numbers
+			treesblock->ProcessAllTrees();
+			int numTrees = treesblock->GetNumTrees();
+			if(numTrees > 0){
+				int treeNum = (rank+rep-1) % numTrees;
+				indiv[0].GetStartingTreeFromNCL(treesblock, treeNum, dataPart->NTax());
+				outman.UserMessage("Obtained starting tree %d from Nexus", treeNum+1);
+				}
+			else throw ErrorException("Problem getting tree(s) from NCL!");
+			}
+		else if(strcmp(conf->streefname.c_str(), conf->datafname.c_str()) != 0 && !FileIsNexus(conf->streefname.c_str())){
+			//cases 9-11 if the streef file is not the same as the datafile, and it isn't Nexus
+			//use the old garli starting model/tree format
+			outman.UserMessage("Obtaining starting conditions from file %s", conf->streefname.c_str());
+			indiv[0].GetStartingConditionsFromFile(conf->streefname.c_str(), rank + rep - 1, dataPart->NTax());
+			}
+		indiv[0].SetDirty();
+		}
+
+	if(reader.FoundModelString()) 
+		startingModelInNCL = true;
+
+	if(startingModelInNCL || conf->parameterValueString.length() > 0){
+		//crap out if we already got some parameters above in an old style starting conditions file
+#ifndef SUBROUTINE_GARLI
+		if(modSpecSet.GotAnyParametersFromFile() && (currentSearchRep == 1 && (conf->bootstrapReps == 0 || currentBootstrapRep == 1)))
+			throw ErrorException("Found model parameters specified in a Nexus GARLI block with the dataset,\n\tand in the starting condition file (streefname).\n\tPlease use one or the other.");
+#endif
+		if(startingModelInNCL && conf->parameterValueString.length() > 0)
+			throw ErrorException("Found model parameters specified in the configuration file and in the dataset or starting condition file (streefname).\n\tPlease use one or the other.");
+		//model string from garli block, which could have come either in starting condition file
+		//or in file with Nexus dataset.  Cases 2, 4, 5, 7 and 8 come through here.
+
+		string modString;
+		if(startingModelInNCL)
+			modString = reader.GetModelString();
+		else
+			modString = conf->parameterValueString;
+
+		if(modString.length() > 0)
+			indiv[0].modPart.ReadGarliFormattedModelStrings(modString);
+
+		if(startingModelInNCL)
+			outman.UserMessage("Obtained starting or fixed model parameter values from Nexus:");
+		else
+			outman.UserMessage("Obtained starting or fixed model parameter values from configuration file:");
+		}
+
+	//Here we'll error out if something was fixed but didn't appear
+	for(int ms = 0;ms < modSpecSet.NumSpecs();ms++){
+		const ModelSpecification *modSpec = modSpecSet.GetModSpec(ms);
+		if((_stricmp(conf->streefname.c_str(), "random") == 0) || (_stricmp(conf->streefname.c_str(), "stepwise") == 0)){
+			//if no streefname file was specified, the param values should be in a garli block with the dataset
+			if(modSpec->IsNucleotide() && modSpec->IsUserSpecifiedStateFrequencies() && !modSpec->gotStateFreqsFromFile) 
+				throw(ErrorException("state frequencies specified as fixed, but no\n\tGarli block found in %s!!" , conf->datafname.c_str()));
+			else if(modSpec->fixAlpha && !modSpec->gotAlphaFromFile) 
+				throw(ErrorException("alpha parameter specified as fixed, but no\n\tGarli block found in %s!!" , conf->datafname.c_str()));
+			else if(modSpec->fixInvariantSites && !modSpec->gotPinvFromFile) 
+				throw(ErrorException("proportion of invariant sites specified as fixed, but no\n\tGarli block found in %s!!" , conf->datafname.c_str()));
+			else if(modSpec->IsUserSpecifiedRateMatrix() && !modSpec->gotRmatFromFile) 
+				throw(ErrorException("relative rate matrix specified as fixed, but no\n\tGarli block found in %s!!" , conf->datafname.c_str()));
+			else if(modSpec->IsCodon() && modSpec->fixOmega && !modSpec->gotOmegasFromFile) 
+				throw(ErrorException("rate het model set to nonsynonymousfixed, but no\n\tGarli block found in %s!!" , conf->datafname.c_str()));
+			}
+		else{
+			if((modSpec->IsNucleotide() || modSpec->IsAminoAcid()) && modSpec->IsUserSpecifiedStateFrequencies() && !modSpec->gotStateFreqsFromFile) 
+				throw ErrorException("state frequencies specified as fixed, but no\n\tparameter values found in %s or %s!", conf->streefname.c_str(), conf->datafname.c_str());
+			else if(modSpec->fixAlpha && !modSpec->gotAlphaFromFile) 
+				throw ErrorException("alpha parameter specified as fixed, but no\n\tparameter values found in %s or %s!", conf->streefname.c_str(), conf->datafname.c_str());
+			else if(modSpec->fixInvariantSites && !modSpec->gotPinvFromFile) 
+				throw ErrorException("proportion of invariant sites specified as fixed, but no\n\tparameter values found in %s or %s!", conf->streefname.c_str(), conf->datafname.c_str());
+			else if(modSpec->IsUserSpecifiedRateMatrix() && !modSpec->gotRmatFromFile) 
+				throw ErrorException("relative rate matrix specified as fixed, but no\n\tparameter values found in %s or %s!", conf->streefname.c_str(), conf->datafname.c_str());
+			else if(modSpec->IsCodon() && modSpec->fixOmega && !modSpec->gotOmegasFromFile) 
+				throw ErrorException("rate het model set to nonsynonymousfixed, but no\n\tparameter values found in %s or %s!", conf->streefname.c_str(), conf->datafname.c_str());
+			}
+		if(conf->modWeight == ZERO_POINT_ZERO)
+			if(modSpec->IsCodon() && modSpec->gotOmegasFromFile == false) 
+				throw(ErrorException("sorry, to turn off model mutations you must provide omega values in a codon model.\nSet modweight to > 0.0 or provide omega values."));
+		}
+		
+	//The model params should be set to their initial values by now, so report them
+	if(conf->bootstrapReps == 0 || (currentBootstrapRep == 1 && currentSearchRep == 1)){
+		outman.UserMessage("MODEL REPORT - Parameters are at their INITIAL values (not yet optimized)");
+		indiv[0].modPart.OutputHumanReadableModelReportWithParams();
+		}
+
+	outman.UserMessage("Starting with seed=%d\n", rnd.seed());
+
+	//A random tree specified, or a starting file was specified but contained no tree
+	if(_stricmp(conf->streefname.c_str(), "stepwise") == 0){
+		if(Tree::constraints.empty()) outman.UserMessage("creating likelihood stepwise addition starting tree...");
+		else outman.UserMessage("creating likelihood stepwise addition starting tree (compatible with constraints)...");
+		//5/20/08 If we're making a stepwise tree, we depend on the extern globalBest being zero to keep the optimization
+		//during the stepwise creation to be localized to just the three branches (the radius optimization only happens if
+		//the lnL of created tree is within a threshold of the global best).  Having global best = zero effectively turns
+		//off all radius opt.  There was a bug here because it wasn't getting reset before starting search reps after the 
+		//first.  This caused the stepwise to be slow, and to not be reproducible when the seed from a rep > 1 was specified
+		//as the initial seed for a new run
+		globalBest = ZERO_POINT_ZERO;
+		//DEBUG - haven't worked this out with the rooted tree yet, since the fake root needs to be in the tree before it is scored
+		assert(!indiv[0].treeStruct->rootWithDummy);
+		indiv[0].MakeStepwiseTree(dataPart->NTax(), conf->attachmentsPerTaxon, adap->branchOptPrecision);
+		}
+	else if(_stricmp(conf->streefname.c_str(), "random") == 0 || indiv[0].treeStruct == NULL){
+		if(Tree::constraints.empty()) outman.UserMessage("creating random starting tree...");
+		else outman.UserMessage("creating random starting tree (compatible with constraints)...");
+		indiv[0].MakeRandomTree(dataPart->NTax());
+		indiv[0].SetDirty();
+		}
+
+	assert(indiv[0].treeStruct != NULL);
+	bool foundPolytomies = indiv[0].treeStruct->ArbitrarilyBifurcate();
+	if(foundPolytomies) outman.UserMessage("WARNING: Polytomies found in start tree.  These were arbitrarily resolved.");
+	
+	indiv[0].treeStruct->root->CheckTreeFormation();
+	indiv[0].treeStruct->root->CheckforPolytomies();
+
+	if(!indiv[0].treeStruct->rootWithDummy)
+		indiv[0].treeStruct->CheckBalance();
+	indiv[0].treeStruct->modPart=&indiv[0].modPart;
+	
+	try{
+		indiv[0].CalcFitness(0);
+		}
+	catch(UnscoreableException &ex){
+		throw ErrorException("Initial individual unscorable, perhaps due to poorness of starting tree.\n\tTry providing a tree if you previously tried random.");
+		}
+
+	//check the current likelihood now to know how accurate we can expect them to be later
+#ifdef SINGLE_PRECISION_FLOATS
+	Tree::expectedPrecision = pow(10.0, - (double) ((int) FLT_DIG - ceil(log10(-indiv[0].Fitness()))));
+#else
+	Tree::expectedPrecision = pow(10.0, - (double) ((int) DBL_DIG - ceil(log10(-indiv[0].Fitness()))));
+#endif
+//	outman.UserMessage("expected likelihood precision = %.4e", Tree::expectedPrecision);
+
+	//if there are not mutable params in the model, remove any weight assigned to the model
+	if(indiv[0].modPart.NumMutableParams() == 0) {
+		if((conf->bootstrapReps == 0 && currentSearchRep == 1) || (currentBootstrapRep == 1 && currentSearchRep == 1))
+			outman.UserMessage("NOTE: Model contains no mutable parameters!\nSetting model mutation weight to zero.\n");
+		adap->modelMutateProb=ZERO_POINT_ZERO;
+		adap->UpdateProbs();
+		}
+
+	outman.precision(10);
+	outman.UserMessage("Initial ln Likelihood: %.4f", indiv[0].Fitness());
+#ifdef MAC_FRONTEND
+	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+	[[MFEInterfaceClient sharedClient] didBeginInitializingSearch];
+	[pool release];
+#endif		
+
+	if(conf->refineStart==true && !conf->scoreOnly){
+		//12/26/07 now only passing the first argument here ("optModel") as false if no model muts are used
+		//if single parameters are fixed that will be checked in the Refine function itself
+		//5/15/14 Moved the initial refinement phase to the Population level, which makes more sense and
+		//mirrors the final optimization behavior
+		//indiv[0].RefineStartingConditions(adap->modWeight != ZERO_POINT_ZERO, adap->branchOptPrecision);
+		InitialOptimization(&indiv[0], adap->modWeight != ZERO_POINT_ZERO, adap->branchOptPrecision);
+		indiv[0].CalcFitness(0);
+		outman.UserMessage("lnL after optimization: %.4f", indiv[0].Fitness());
+		}	
+
+	globalBest=bestFitness=prevBestFitness=indiv[0].Fitness();
+
+	//don't bother allocating any further indivs if we will only use one
+	if(conf->optimizeInputOnly || conf->scoreOnly)
+		return;
+
+#ifndef INPUT_RECOMBINATION
+	for(unsigned i=1;i<total_size;i++){
+		if(indiv[i].treeStruct == NULL) 
+			indiv[i].treeStruct = new Tree();
+		indiv[i].CopySecByRearrangingNodesOfFirst(indiv[i].treeStruct, &indiv[0]);
+		indiv[i].treeStruct->modPart=&indiv[i].modPart;
+		}
+#else
+	for(unsigned i=1;i<conf->nindivs;i++){
+		if(indiv[i].treeStruct == NULL) 
+			indiv[i].treeStruct = new Tree();
+		indiv[i].CopySecByRearrangingNodesOfFirst(indiv[i].treeStruct, &indiv[0]);
+		indiv[i].treeStruct->modPart=&indiv[i].modPart;
+		}
+	
+	//string inputs="sphinx.input6000.goodmod.tre";
+	for(unsigned i=conf->nindivs;i<total_size;i++){
+		indiv[i].GetStartingConditionsFromFile(conf->streefname.c_str(), i-conf->nindivs, dataPart->NTax());
+		indiv[i].treeStruct->modPart=&indiv[i].modPart;
+		indiv[i].SetDirty();
+		//indiv[i].RefineStartingConditions((adap->modWeight == ZERO_POINT_ZERO || modSpec->fixAlpha == true) == false, adap->branchOptPrecision);
+		indiv[i].CalcFitness(0);
+		}
+#endif
+
+	CalcAverageFitness();
+	}
+
+//Copied almost exactly from Individual::RefineStartingConditions.  For various reasons it is easier 
+//to have it at the population level.
+void Population::InitialOptimization(Individual *ind, bool optModel, FLOAT_TYPE branchPrec){
+	bool optOmega, optAlpha, optFlex, optPinv, optFreqs, optRelRates, optSubsetRates;
+	optOmega = optAlpha = optFlex = optPinv = optFreqs = optRelRates = optSubsetRates = false;
+
+	bool optInsDel = false;
+
+	ModelPartition &modPart = ind->modPart;
+	Tree *treeStruct = ind->treeStruct;
+
+	if(optModel){
+		for(int modnum = 0;modnum < modPart.NumModels();modnum++){
+			Model *mod = modPart.GetModel(modnum);
+			const ModelSpecification *modSpec = mod->GetCorrespondingSpec();
+			if(modSpec->numRateCats > 1 && modSpec->IsNonsynonymousRateHet() == false && modSpec->IsFlexRateHet() == false && modSpec->fixAlpha == false) 
+				optAlpha = true;
+			if(modSpec->IsFlexRateHet()) 
+				optFlex = true;
+			if(modSpec->includeInvariantSites && modSpec->fixInvariantSites == false) 
+				optPinv = true;
+			if(modSpec->IsCodon() && !modSpec->fixOmega) 
+				optOmega = true;
+			if(modSpec->IsOrientedGap()) 
+				optInsDel = true;
+
+			if(modSpec->IsCodon() == false && modSpec->fixStateFreqs == false && modSpec->IsEqualStateFrequencies() == false && modSpec->IsEmpiricalStateFrequencies() == false)
+				optFreqs = true;
+			//this is the case of forced freq optimization with codon models.  For everything to work they must be set as both not fixed but empirical
+			if(modSpec->IsCodon() && modSpec->fixStateFreqs == false && modSpec->IsEqualStateFrequencies() == false && modSpec->IsEmpiricalStateFrequencies() == true)
+				optFreqs = true;
+			if(modSpec->fixRelativeRates == false && (modSpec->Nst() > 1 || modSpec->IsEstimateAAMatrix() || modSpec->IsTwoSerineRateMatrix()))
+				optRelRates = true;
+			}
+		//oops, bug fixed 10/2/12 - subset rates weren't getting opt in linked models
+		//modSpecSet.inferSubsetRates is already getting set only if conf.inferSubsetRates
+		//is true and there are multiple matrices, but not necessarily multiple models
+		//if(modSpecSet.InferSubsetRates() && modSpecSet.NumSpecs() > 1)
+		if(modSpecSet.InferSubsetRates())
+			optSubsetRates = true;
+		}
+
+	outman.UserMessageNoCR("optimizing: starting branch lengths");
+	if(optAlpha) outman.UserMessageNoCR(", alpha shape");
+	if(optPinv) outman.UserMessageNoCR(", prop. invar");
+	if(optRelRates) outman.UserMessageNoCR(", rel rates");
+	if(optFreqs) outman.UserMessageNoCR(", eq freqs");
+	if(optOmega) outman.UserMessageNoCR(", dN/dS (aka omega) parameters");
+	if(optInsDel){
+		outman.UserMessageNoCR(", ins rate");
+		outman.UserMessageNoCR(", del rate");
+		}
+	if(optSubsetRates) outman.UserMessageNoCR(", subset rates");
+	outman.UserMessage("...");
+	FLOAT_TYPE improve=(FLOAT_TYPE)999.9;
+	ind->CalcFitness(0);
+
+	assert(initialRefinePass < 1);
+	for(initialRefinePass = 1;improve > branchPrec;initialRefinePass++){
+		FLOAT_TYPE alphaOptImprove=0.0, pinvOptImprove = 0.0, omegaOptImprove = 0.0, flexOptImprove = 0.0, optImprove=0.0, scaleOptImprove=0.0, subsetRateImprove=0.0, rateOptImprove=0.0;
+		FLOAT_TYPE freqOptImprove=0.0, insDelImprove = 0.0;
+		
+		ind->CalcFitness(0);
+		FLOAT_TYPE passStart = ind->Fitness();
+		
+		optImprove=treeStruct->OptimizeAllBranches(branchPrec);
+		ind->CalcFitness(0);
+
+		FLOAT_TYPE trueImprove = ind->Fitness() - passStart;
+		assert(trueImprove >= -1.0);
+		if(trueImprove < ZERO_POINT_ZERO) trueImprove = ZERO_POINT_ZERO;
+
+		vector<FLOAT_TYPE> blens;
+		treeStruct->StoreBranchlengths(blens);
+		scaleOptImprove=treeStruct->OptimizeTreeScale(branchPrec);
+		ind->CalcFitness(0);
+		//if some of the branch lengths were at the minimum or maximum boundaries the scale optimization
+		//can actually worsen the score.  If so, return them to their original lengths.
+		if(scaleOptImprove < ZERO_POINT_ZERO){
+			treeStruct->RestoreBranchlengths(blens);
+			ind->CalcFitness(0);
+			scaleOptImprove = ZERO_POINT_ZERO;
+			}
+
+		ind->CalcFitness(0);
+		if(optModel){
+			for(int modnum = 0;modnum < modPart.NumModels();modnum++){
+				Model *mod = modPart.GetModel(modnum);
+				const ModelSpecification *modSpec = mod->GetCorrespondingSpec();
+				if(modSpec->IsCodon()){
+					if(!modSpec->fixOmega)
+						omegaOptImprove += treeStruct->OptimizeOmegaParameters(branchPrec, modnum);
+					}
+				else if(mod->NRateCats() > 1){
+					if(modSpec->IsFlexRateHet()){//Flex rates
+						//no longer doing alpha first, it was too hard to know if the flex rates had been partially optimized
+						//already during making of a stepwise tree
+						//if(i == 1) rateOptImprove = treeStruct->OptimizeAlpha(branchPrec);
+						//if(i == 1 && modSpec.gotFlexFromFile==false) rateOptImprove = treeStruct->OptimizeBoundedParameter(branchPrec, mod->Alpha(), 0, 1.0e-8, 999.9, &Model::SetAlpha);
+						flexOptImprove += treeStruct->OptimizeFlexRates(branchPrec, modnum);
+						}
+					else if(modSpec->fixAlpha == false){//normal gamma
+						//rateOptImprove = treeStruct->OptimizeAlpha(branchPrec);
+						//do NOT let alpha go too low here - on bad or random starting trees the branch lengths get crazy long
+						//rateOptImprove = treeStruct->OptimizeBoundedParameter(branchPrec, mod->Alpha(), 0, 1.0e-8, 999.9, &Model::SetAlpha);
+						//alphaOptImprove += treeStruct->OptimizeBoundedParameter(branchPrec, mod->Alpha(), 0, 0.05, 999.9, modnum, &Model::SetAlpha);
+						alphaOptImprove += treeStruct->OptimizeBoundedParameter(modnum, branchPrec, mod->Alpha(), 0, 0.05, 999.9, &Model::SetAlpha);
+						}
+					}
+				if(modSpec->includeInvariantSites && !modSpec->fixInvariantSites)
+					pinvOptImprove += treeStruct->OptimizeBoundedParameter(modnum, branchPrec, mod->PropInvar(), 0, 1.0e-8, mod->maxPropInvar, &Model::SetPinv);
+				if(modSpec->IsOrientedGap()){
+					insDelImprove += treeStruct->OptimizeInsertDeleteRates(branchPrec, modnum);
+					}
+				if(modSpec->IsCodon() == false && modSpec->fixStateFreqs == false && modSpec->IsEqualStateFrequencies() == false && modSpec->IsEmpiricalStateFrequencies() == false)
+					freqOptImprove += treeStruct->OptimizeEquilibriumFreqs(branchPrec, modnum);
+				if(modSpec->fixRelativeRates == false && (modSpec->Nst() > 1 || modSpec->IsEstimateAAMatrix() || modSpec->IsTwoSerineRateMatrix()))
+					rateOptImprove += treeStruct->OptimizeRelativeNucRates(branchPrec, modnum);
+				}
+			if(optSubsetRates){
+				subsetRateImprove += treeStruct->OptimizeSubsetRates(branchPrec);
+				}
+			}
+		improve=scaleOptImprove + trueImprove + alphaOptImprove + pinvOptImprove + flexOptImprove + omegaOptImprove + rateOptImprove + freqOptImprove + subsetRateImprove + insDelImprove;
+		outman.precision(8);
+		outman.UserMessageNoCR("pass%2d:+%9.3f (branch=%7.2f scale=%6.2f", initialRefinePass, improve, trueImprove, scaleOptImprove);
+		if(optOmega) outman.UserMessageNoCR(" omega=%6.2f", omegaOptImprove);
+		if(optAlpha) outman.UserMessageNoCR(" alpha=%6.2f", alphaOptImprove);
+
+		if(optFreqs) outman.UserMessageNoCR(" freqs=%6.2f", freqOptImprove);
+		if(optRelRates) outman.UserMessageNoCR(" rel rates=%6.2f", rateOptImprove);
+
+		if(optFlex) outman.UserMessageNoCR(" flex=%6.2f", flexOptImprove);
+		if(optPinv) outman.UserMessageNoCR(" pinv=%6.2f", pinvOptImprove);
+		if(optInsDel){
+			outman.UserMessageNoCR(" ins/del=%6.2f", insDelImprove);
+			}
+		if(optSubsetRates) outman.UserMessageNoCR(" subset rates=%6.2f", subsetRateImprove);
+		outman.UserMessageNoCR(")");
+		
+		UpdateFractionDone(1);
+		if(conf->reportRunProgress)
+			outman.UserMessageNoCR(" %14.2f %14.2f", 0.01 * (int) ceil(rep_fraction_done * 100), 0.01 * (int) ceil(tot_fraction_done * 100));
+		outman.UserMessage("");
+		}
+	initialRefinePass = -1;
+	treeStruct->nodeOptVector.clear();
+	}
+
+/* This is deprecated in favor of model based function
+void Population::OutputModelReport(){
+	//Report on the model setup
+	outman.UserMessage("MODEL REPORT:");
+	if(modSpec->IsCodon()){
+		if(modSpec->IsVertMitoCode()) outman.UserMessage("  Number of states = 60 (codon data, vertebrate mitochondrial code)");
+		else if(modSpec->IsInvertMitoCode()) outman.UserMessage("  Number of states = 62 (codon data, invertebrate mitochondrial code)");
+		else outman.UserMessage("  Number of states = 61 (codon data, standard code)");
+		}
+	else if(modSpec->IsAminoAcid())
+		outman.UserMessage("  Number of states = 20 (amino acid data)");
+	else 
+		outman.UserMessage("  Number of states = 4 (nucleotide data)");
+	
+	if(modSpec->IsAminoAcid() == false){
+		if(modSpec->IsCodon() && modSpec->numRateCats == 1) outman.UserMessageNoCR("  One estimated dN/dS ratio (aka omega)\n");
+		if(modSpec->IsCodon()) outman.UserMessageNoCR("  Nucleotide Relative Rate Matrix Assumed by Codon Model:\n     ");
+		else outman.UserMessageNoCR("  Nucleotide Relative Rate Matrix: ");
+		if(modSpec->Nst() == 6){
+			if(modSpec->IsArbitraryRateMatrix()) outman.UserMessage("User specified matrix type: %s", modSpec->arbitraryRateMatrixString.c_str());
+			else outman.UserMessage("6 rates");
+			if(modSpec->fixRelativeRates == true) outman.UserMessage("values specified by user (fixed)");
+			}
+		else if(modSpec->Nst() == 2) outman.UserMessage("2 rates (transition and transversion)");
+		else outman.UserMessage("1 rate");
+		}
+	else{
+		outman.UserMessageNoCR("  Amino Acid Rate Matrix: ");
+		if(modSpec->IsJonesAAMatrix()) outman.UserMessage("Jones");
+		else if(modSpec->IsDayhoffAAMatrix()) outman.UserMessage("Dayhoff");
+		else if(modSpec->IsPoissonAAMatrix()) outman.UserMessage("Poisson");
+		else if(modSpec->IsWAGAAMatrix()) outman.UserMessage("WAG");
+		else if(modSpec->IsMtMamAAMatrix()) outman.UserMessage("MtMam");
+		else if(modSpec->IsMtRevAAMatrix()) outman.UserMessage("MtRev");
+		}
+
+	outman.UserMessageNoCR("  Equilibrium State Frequencies: ");
+	if(modSpec->IsEqualStateFrequencies()){
+		if(modSpec->IsCodon()){
+			if(modSpec->IsVertMitoCode()) outman.UserMessage("equal (1/60 = 0.01667, fixed)");
+			else if(modSpec->IsInvertMitoCode()) outman.UserMessage("equal (1/62 = 0.01613, fixed)");
+			else outman.UserMessage("equal (1/61 = 0.01639, fixed)");
+			}
+		else if(modSpec->IsAminoAcid())
+			outman.UserMessage("equal (0.05, fixed)");
+		else 
+			outman.UserMessage("equal (0.25, fixed)");
+		}
+	else if(modSpec->IsF3x4StateFrequencies()) outman.UserMessage("empirical values calculated by F3x4 method (fixed)");
+	else if(modSpec->IsF1x4StateFrequencies()) outman.UserMessage("empirical values calculated by F1x4 method (fixed)");
+	else if(modSpec->IsEmpiricalStateFrequencies()) outman.UserMessage("empirical values (fixed)");
+	else if(modSpec->IsJonesAAFreqs()) outman.UserMessage("Jones");
+	else if(modSpec->IsWAGAAFreqs()) outman.UserMessage("WAG");
+	else if(modSpec->IsMtMamAAFreqs()) outman.UserMessage("MtMam");
+	else if(modSpec->IsMtRevAAFreqs()) outman.UserMessage("MtRev");
+	else if(modSpec->IsDayhoffAAFreqs()) outman.UserMessage("Dayhoff");
+	else if(modSpec->IsUserSpecifiedStateFrequencies()) outman.UserMessage("specified by user (fixed)");
+	else outman.UserMessage("estimated");
+
+	outman.UserMessage("  Rate Heterogeneity Model:");
+	if(modSpec->numRateCats == 1){
+		if(modSpec->includeInvariantSites == false) outman.UserMessage("    no rate heterogeneity");
+		else{
+			if(modSpec->fixInvariantSites == true) outman.UserMessage("    only an invariant (invariable) site category,\n    proportion specified by user (fixed)");
+			else outman.UserMessage("    only an invariant (invariable) site category,\n    proportion estimated");
+			}
+		}
+	else{
+		outman.UserMessageNoCR("    %d ", modSpec->numRateCats);
+		if(modSpec->IsNonsynonymousRateHet()){
+			outman.UserMessage("nonsynonymous rate categories, rate and proportion of each estimated\n     (this is effectively the M3 model of PAML)");
+			}
+		else if(modSpec->IsFlexRateHet() == false){
+			if(modSpec->fixAlpha == true) outman.UserMessage("discrete gamma distributed rate cats,\n    alpha param specified by user (fixed)");
+			else outman.UserMessage("discrete gamma distributed rate cats, alpha param estimated");
+			if(modSpec->includeInvariantSites == true){
+				if(modSpec->fixInvariantSites == true) outman.UserMessage("    with an invariant (invariable) site category,\n    proportion specified by user (fixed)");				
+				else outman.UserMessage("    with an invariant (invariable) site category, proportion estimated");
+				}
+			}
+		else{
+			outman.UserMessage("FLEX rate categories, rate and proportion of each estimated");
+			if(modSpec->includeInvariantSites == true){
+				if(modSpec->fixInvariantSites == true) outman.UserMessage("    with an invariant (invariable) site category,\n    proportion specified by user (fixed)");				
+				else outman.UserMessage("    with an invariant (invariable) site category, proportion estimated");
+				}
+			}
+		}
+	outman.UserMessage("");
+	}
+*/
+	/*
+void Population::WriteStateFiles(){
+	char str[100];
+
+	//write the adaptation info checkpoint in binary format
+	sprintf(str, "%s.adap.check", conf->ofprefix.c_str());
+	ofstream out(str, ios::binary | ios::out);
+	adap->WriteToCheckpoint(out);
+	out.close();
+
+	//write the state of the population, including the seed, generation, elapsed time,
+	//lastTopoImprove and specifications of the current individuals
+	sprintf(str, "%s.pop.check", conf->ofprefix.c_str());
+	ofstream pout(str);
+	pout.precision(10);
+	WritePopulationCheckpoint(pout);
+	pout.close();
+
+	//if we are keeping track of swaps, write a checkpoint for that
+	if(conf->uniqueSwapBias != ONE_POINT_ZERO){
+		sprintf(str, "%s.swaps.check", conf->ofprefix.c_str());
+		ofstream sout(str);
+		Tree::attemptedSwaps.WriteSwapCheckpoint(sout);
+		sout.close();
+		}	
+	}
+*/
+
+//#define OLD_CHECK
+
+#ifdef OLD_CHECK
+void Population::WriteStateFiles(){
+	char name[100];
+
+	//write the adaptation info checkpoint in binary format
+	sprintf(name, "%s.adap.check", conf->ofprefix.c_str());
+#ifdef BOINC
+	char physical_name[256];
+	boinc_resolve_filename(name, physical_name, sizeof(physical_name));
+	MFILE out;
+	out.open(physical_name, "wb");
+#else
+	ofstream out(name, ios::out | ios::binary);
+#endif
+	adap->WriteToCheckpoint(out);
+	out.close();
+
+	//write the state of the population, including the seed, generation, elapsed time,
+	//lastTopoImprove and specifications of the current individuals
+	sprintf(name, "%s.pop.check", conf->ofprefix.c_str());
+#ifdef BOINC
+	MFILE pout;
+	boinc_resolve_filename(name, physical_name, sizeof(physical_name));
+	pout.open(physical_name, "wb");
+#else
+	ofstream pout(name, ios::out | ios::binary);
+#endif
+	WritePopulationCheckpoint(pout);
+	pout.close();
+
+	//if we are keeping track of swaps, write a checkpoint for that
+	if(conf->uniqueSwapBias != ONE_POINT_ZERO){
+		sprintf(name, "%s.swaps.check", conf->ofprefix.c_str());
+#ifdef BOINC
+		MFILE sout;
+		boinc_resolve_filename(name, physical_name, sizeof(physical_name));
+		sout.open(physical_name, "wb");
+#else
+		ofstream sout(name, ios::out | ios::binary);
+#endif
+		Tree::attemptedSwaps.WriteSwapCheckpoint(sout);
+		sout.close();
+		}
+	}
+
+#else
+void Population::WriteStateFiles(){
+	char aname[128];
+	char pname[128];
+	char sname[128];
+
+	sprintf(aname, "%s.adap.check", conf->ofprefix.c_str());
+	sprintf(pname, "%s.pop.check", conf->ofprefix.c_str());
+	sprintf(sname, "%s.swaps.check", conf->ofprefix.c_str());
+
+	//1. write the adaptation info checkpoint in binary format
+	//2. write the state of the population, including the seed, generation, elapsed time,
+	//	 lastTopoImprove and specifications of the current individuals
+	//3. if we are keeping track of swaps, write a checkpoint for that
+#ifdef BOINC
+	//The BOINC provided MFILE class handily allows writing to it before it is actually
+	//open and attached to any file.  It buffers the information, and flushes it upon closing
+	//of the file.  This is good, because all of the checkpoint information can be gathered
+	//and then written all at once, making it less likely that the checkpoint will be corrupted 
+	//by the program being terminated mid-checkpoint 
+	MFILE aout;
+	MFILE pout;
+	MFILE sout;
+
+	adap->WriteToCheckpoint(aout);
+	WritePopulationCheckpoint(pout);
+
+	if(conf->uniqueSwapBias != ONE_POINT_ZERO)
+		Tree::attemptedSwaps.WriteSwapCheckpoint(sout);
+	
+	char aphysical_name[512];
+	char pphysical_name[512];
+	char sphysical_name[512];
+	boinc_resolve_filename(aname, aphysical_name, sizeof(aphysical_name));
+	boinc_resolve_filename(pname, pphysical_name, sizeof(pphysical_name));
+	boinc_resolve_filename(sname, sphysical_name, sizeof(sphysical_name));
+
+	aout.open(aphysical_name, "wb");
+	aout.close();
+
+	pout.open(pphysical_name, "wb");
+	pout.close();
+
+	if(conf->uniqueSwapBias != ONE_POINT_ZERO){
+		sout.open(sphysical_name, "wb");
+		sout.close();
+		}
+
+	boinc_checkpoint_completed();
+#else
+	//it would be nice to be able to do something like what is done for BOINC above (buffering output and
+	//then writing all at once), maybe with a stringstream, but I couldn't get that to work
+	ofstream aout(aname, ios::out | ios::binary);
+	adap->WriteToCheckpoint(aout);
+	aout.close();
+	
+	ofstream pout(pname, ios::out | ios::binary);
+	WritePopulationCheckpoint(pout);
+	pout.close();
+
+	if(conf->uniqueSwapBias != ONE_POINT_ZERO){
+		ofstream sout(sname, ios::out | ios::binary);
+		Tree::attemptedSwaps.WriteSwapCheckpoint(sout);
+		sout.close();
+		}
+#endif
+	}
+#endif
+
+//Returns whether or not checkpoints were actually found and read
+bool Population::ReadStateFiles(){
+	char name[100];
+
+	//read the adaptation binary checkpoint
+	sprintf(name, "%s.adap.check", conf->ofprefix.c_str());
+	FILE *in;
+#ifdef BOINC
+	char physical_name[100];
+	boinc_resolve_filename(name, physical_name, sizeof(physical_name));
+	in = boinc_fopen(physical_name, "rb");
+
+#else
+	if(FileExists(name) == false){
+	#if defined(SUBROUTINE_GARLI) || defined(OLD_SUBROUTINE_GARLI)
+		//for the MPI version we don't care if checkpoint files weren't found
+		return false;
+	#else
+		throw(ErrorException("Could not find checkpoint file %s!\nEither the previous run was not writing checkpoints (checkpoint = 0),\nthe checkpoint files were moved/deleted or the ofprefix setting\nin the config file was changed.", name));
+	#endif
+		}
+	in = fopen(name, "rb");
+#endif
+	adap->ReadFromCheckpoint(in);
+	fclose(in);
+
+	//Read the population checkpoint
+	ReadPopulationCheckpoint();
+
+	//need to reset these here, although really only because asserts check that the values never decrease
+	rep_fraction_done = tot_fraction_done = 0.0;
+
+#ifdef BOINC
+	boinc_fraction_done(tot_fraction_done);
+#endif
+
+	//Read the swap checkpoint, if necessary
+	if(conf->uniqueSwapBias != ONE_POINT_ZERO){
+		sprintf(name, "%s.swaps.check", conf->ofprefix.c_str());
+		FILE *sin;
+#ifdef BOINC
+		boinc_resolve_filename(name, physical_name, sizeof(physical_name));
+		sin = boinc_fopen(physical_name, "rb");
+#else
+		if(FileExists(name) == false) 
+			throw(ErrorException("Could not find checkpoint file %s!\nEither the previous run was not writing checkpoints (checkpoint = 0),\nthe file was moved/deleted or the ofprefix setting\nin the config file was changed.", name));
+		sin = fopen(name, "rb");
+#endif
+		Tree::attemptedSwaps.ReadBinarySwapCheckpoint(sin);
+		fclose(sin);
+		}
+	return true;
+	}
+/*
+void Population::WritePopulationCheckpoint(ofstream &out) {
+	long currentSeed = rnd.seed();
+	out.write((char*) &currentSeed, sizeof(currentSeed));
+	long currentTime = stopwatch.SplitTime();
+	out.write((char*) &currentTime, sizeof(currentTime));
+
+	//7/13/07 changing this to calculate the actual size of the chunk of scalars
+	//(the number of bytes between the start of the object and the first nonscalar
+	//data member) rather than counting the number of each type and adding it up 
+	//manually.  This should make it work irrespective of things like memory padding
+	//for data member alignment, which could vary between platforms and compilers
+	intptr_t scalarSize = (intptr_t) &fraction_done - (intptr_t) this  + sizeof(fraction_done);
+	out.write((char*) this, (streamsize) scalarSize);
+		
+	for(unsigned i=0;i<total_size;i++){
+		assert(out.good());
+		indiv[i].mod->OutputBinaryFormattedModel(out);
+		indiv[i].treeStruct->OutputBinaryFormattedTree(out);
+		}
+	}
+*/
+
+void Population::WritePopulationCheckpoint(OUTPUT_CLASS &out) {
+	assert(!timeTermination && !userTermination);
+	long currentSeed = rnd.seed();
+	out.WRITE_TO_FILE(&currentSeed, sizeof(currentSeed), 1);
+	int currentTime = stopwatch.SplitTime();
+	out.WRITE_TO_FILE(&currentTime, sizeof(currentTime), 1);
+
+	//7/13/07 changing this to calculate the actual size of the chunk of scalars
+	//(the number of bytes between the start of the object and the first nonscalar
+	//data member) rather than counting the number of each type and adding it up 
+	//manually.  This should make it work irrespective of things like memory padding
+	//for data member alignment, which could vary between platforms and compilers
+	intptr_t scalarSize = (intptr_t) &rep_fraction_done - (intptr_t) this + sizeof(rep_fraction_done);
+	out.WRITE_TO_FILE(this, (streamsize) scalarSize, 1);
+
+	//save the current members of the population
+	for(unsigned i=0;i<total_size;i++){
+		indiv[i].modPart.WriteModelPartitionCheckpoint(out);
+		indiv[i].treeStruct->OutputBinaryFormattedTree(out);
+		}
+
+	//write any individuals that we may have stored from previous search reps
+	for(vector<Individual*>::iterator it = storedTrees.begin(); it != storedTrees.end() ; it++){
+		(*it)->modPart.WriteModelPartitionCheckpoint(out);
+		(*it)->treeStruct->OutputBinaryFormattedTree(out);
+		}
+	}
+
+
+void Population::ReadPopulationCheckpoint(){
+	char str[100];
+	sprintf(str, "%s.pop.check", conf->ofprefix.c_str());
+	if(FileExists(str) == false) throw(ErrorException("Could not find checkpoint file %s!\nEither the previous run was not writing checkpoints (checkpoint = 0),\nthe file was moved/deleted or the ofprefix setting\nin the config file was changed.", str));
+
+#ifdef BOINC
+	char physical_name[100];
+	boinc_resolve_filename(str, physical_name, sizeof(physical_name));
+	FILE *pin = boinc_fopen(physical_name, "rb");
+
+#else
+	FILE *pin = fopen(str, "rb");
+#endif
+
+	long seed;
+	fread((char *) &seed, sizeof(seed), 1, pin);
+	if(ferror(pin) || feof(pin)){//this mainly checks for a zero-byte file
+		throw ErrorException("Error reading checkpoint file %s.\n\tA problem may have occured writing the file to disk, or the file may have been overwritten or truncated.\n\tUnfortunately you'll need to start the run again from scratch.", str);
+		}
+	rnd.set_seed(seed);
+
+	int t;
+	fread((char *) &t, sizeof(t), 1, pin);
+	stopwatch.AddPreviousTime(t);
+
+	//7/13/07 changing this to calculate the actual size of the chunk of scalars
+	//(the number of bytes between the start of the object and the first nonscalar
+	//data member) rather than counting the number of each type and adding it up 
+	//manually.  This should make it work irrespective of things like memory padding
+	//for data member alignment, which could vary between platforms and compilers
+	intptr_t scalarSize = (intptr_t) &rep_fraction_done - (intptr_t) this + sizeof(rep_fraction_done);
+	fread(this, scalarSize, 1, pin);
+
+	//if were restarting a bootstrap run we need to change to the bootstrapped data
+	//now, so that scoring below is correct
+	if(conf->bootstrapReps > 0){
+		int s = dataPart->BootstrapReweight(lastBootstrapSeed, conf->resampleProportion);
+		//this should be the case because what was written to the checkpoint for nextBootstrapSeed
+		//should have come out of BootstrapReweight when it was originally called with lastBootstrapSeed
+		assert(s == nextBootstrapSeed);
+		}
+
+	for(unsigned i=0;i<total_size;i++){
+		assert(modSpecSet.NumSpecs() == indiv[i].modPart.NumModelSets());
+		for(int m = 0;m < modSpecSet.NumSpecs();m++){
+			//it would make more sense to have this happen at a lower level, but the data are needed
+			indiv[i].modPart.GetModelSet(m)->SetDefaultModelSetParameters(dataPart->GetSubset(m));
+			}
+		indiv[i].modPart.ReadModelPartitionCheckpoint(pin);
+
+		indiv[i].treeStruct = new Tree();
+		indiv[i].treeStruct->ReadBinaryFormattedTree(pin);
+		indiv[i].treeStruct->AssignCLAsFromMaster();
+		indiv[i].treeStruct->modPart=&indiv[i].modPart;
+		indiv[i].SetDirty();
+		indiv[i].treeStruct->root->CheckTreeFormation();
+		indiv[i].CalcFitness(0);
+		}
+
+	//if we are doing multiple reps, there should have been one tree per completed rep written to file
+	//remember that currentSearchRep starts at 1
+	for(int i=1;i<(finishedRep == false ? currentSearchRep : currentSearchRep+1);i++){
+		Individual *ind = new Individual;
+		for(int m = 0;m < modSpecSet.NumSpecs();m++){
+			//it would make more sense to have this happen at a lower level, but the data are needed
+			ind->modPart.GetModelSet(m)->SetDefaultModelSetParameters(dataPart->GetSubset(m));
+			}
+		ind->modPart.ReadModelPartitionCheckpoint(pin);
+
+		ind->treeStruct = new Tree();
+		ind->treeStruct->ReadBinaryFormattedTree(pin);
+		ind->treeStruct->AssignCLAsFromMaster();
+		ind->treeStruct->modPart=&ind->modPart;
+		ind->SetDirty();
+		ind->treeStruct->root->CheckTreeFormation();
+		ind->CalcFitness(0);
+		ind->treeStruct->RemoveTreeFromAllClas();
+		storedTrees.push_back(ind);
+		}
+
+	//as far as the TopologyList is concerned, each individual will be considered different
+	ntopos = total_size;
+	if(fabs(bestFitness - indiv[bestIndiv].Fitness()) > 0.01)
+		throw ErrorException("Problem reading checkpoint files.  Scores of stored trees don't match calculated scores.");
+	CalcAverageFitness();
+	globalBest = bestFitness;
+	}
+
+//Depending on the generation, output to various files during the GA search
+void Population::WriteGenerationOutput(){
+	if(conf->outputMostlyUselessFiles) 
+		OutputFate();
+	if(conf->logevery > 0 && !(gen % conf->logevery)) 
+		OutputLog();
+	if(conf->saveevery > 0 && !(gen % conf->saveevery)){
+		if(best_output & WRITE_CONTINUOUS){
+			string outname = besttreefile;
+			outname += ".current";
+			WriteTreeFile( outname.c_str(), -1);
+			}
+
+		outman.UserMessageNoCR("%-8d %-14.4f   %-9.3f  %6d ", gen, BestFitness(), adap->branchOptPrecision, lastTopoImprove);
+
+		if(swapBasedTerm)
+			outman.UserMessageNoCR("%14d ", indiv[bestIndiv].treeStruct->attemptedSwaps.GetUnique());
+
+		if(conf->reportRunProgress)
+			outman.UserMessageNoCR("%14.2f %14.2f", 0.01 * (int) ceil(rep_fraction_done * 100), 0.01 * (int) ceil(tot_fraction_done * 100));
+
+		outman.UserMessage("");
+		
+		if(conf->outputMostlyUselessFiles){
+			swapLog << gen << "\t";
+			indiv[bestIndiv].treeStruct->attemptedSwaps.SwapReport(swapLog);
+			}
+		}
+	}
+
+void Population::Run(){
+//	calcCount=0;
+	optCalcs=0;
+
+#ifdef VARIABLE_OPTIMIZATION
+//	var << "type\tdist\tinitlnL\tnoBail.01\tnoBail.5\t3B.01\t3B.5\tdef.01\tdefdef\n";
+#endif
+/*	if(conf->restart == false){
+		if(conf->bootstrapReps == 0) outman.UserMessage("Running Genetic Algorithm with initial seed=%d", rnd.init_seed());
+		}
+	else{
+		outman.UserMessage("Restarting Genetic Algorithm from checkpoint");
+		outman.UserMessage("generation %d, seed %d, best lnL %.3f", gen, rnd.init_seed(), BestFitness());
+		}
+*/
+#ifdef MAC_FRONTEND
+	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+	[[MFEInterfaceClient sharedClient] didBeginRun];
+	[pool release];
+#endif	
+	
+	CalcAverageFitness();
+
+	outman.precision(6);
+
+	outman.UserMessageNoCR("%-8s %-14s %-8s  %-14s ", "gen", "current_lnL", "precision", "last_tree_imp");
+
+	if(swapBasedTerm)
+		outman.UserMessageNoCR("%-14s ", "swaps_on_cur");
+
+	if(conf->reportRunProgress)
+		outman.UserMessageNoCR("%-14s %-14s", "rep_prop_done", "tot_prop_done");
+
+	outman.UserMessage("");
+
+	outman.UserMessageNoCR("%-8d %-14.4f   %-9.3f  %6d ", gen, BestFitness(), adap->branchOptPrecision, lastTopoImprove);
+
+	if(swapBasedTerm)
+		outman.UserMessageNoCR("%14d ", indiv[bestIndiv].treeStruct->attemptedSwaps.GetUnique());
+
+	if(finishedGenerations == false)
+		UpdateFractionDone(2);
+	if(conf->reportRunProgress)
+		outman.UserMessageNoCR("%14.2f %14.2f", 0.01 * (int) ceil(rep_fraction_done * 100), 0.01 * (int) ceil(tot_fraction_done * 100));
+
+	outman.UserMessage("");
+
+	OutputLog();
+	if(conf->outputMostlyUselessFiles) 
+		OutputFate();	
+
+	gen++;
+	for (; gen < conf->stopgen+1; ++gen){
+		//this is set true if the generation loop was exited normally but final optimization was not done
+		if(finishedGenerations)
+			break;
+
+		NextGeneration();
+		UpdateFractionDone(2);
+		if(swapBasedTerm){
+			if(uniqueSwapTried){
+				lastUniqueSwap = gen;
+				uniqueSwapTried = false;
+				}
+			}
+		keepTrack();
+		
+        WriteGenerationOutput();
+			
+#ifndef BOINC
+		userTermination = CheckForUserSignal();
+		if(userTermination){
+			outman.UserMessage("NOTE: ****Run terminated by user interuption ...");
+			break;
+			}
+#endif
+
+#ifdef PERIODIC_SCORE_DEBUG
+		if(gen % 500 == 0 ||gen==1)
+			OutputFilesForScoreDebugging(&indiv[bestIndiv], tempGlobal++);
+#endif
+
+#ifdef NNI_SPECTRUM
+		if(gen % 1000 == 0 || gen==1)
+			NNISpectrum(bestIndiv);
+#endif
+
+		if(!(gen%adap->intervalLength)){
+			outman.precision(10);
+			bool reduced=false;
+			if(gen-(max(lastTopoImprove, lastPrecisionReduction)) >= adap->intervalsToStore*adap->intervalLength){
+				//this allows the program to bail if numPrecReductions < 0, which can be handy to get to this point
+				//with checkpointing in and then restart from the same checkpoint with various values of numPrecReductions
+				if(adap->numPrecReductions < 0) return;
+				reduced=adap->ReducePrecision();
+				}
+			//optimize params if we just reduced prec or if we are at the min prec and we've run for a while since the last reduction
+			if(reduced || ((gen - lastPrecisionReduction >= (adap->intervalLength * 50)) && (gen % (adap->intervalLength * 50) == 0) && (FloatingPointEquals(adap->branchOptPrecision, conf->minOptPrec, 1.0e-8)))){
+				if(reduced){
+					lastPrecisionReduction=gen;
+					outman.UserMessage("Optimization precision reduced ");
+					}
+				//Added in this optimization of rate het params at prec reduction,
+				//mainly to help with optimization in partitioned models
+				FLOAT_TYPE improve = 0.0;
+				Tree *bestTree = indiv[bestIndiv].treeStruct;
+				for(int modnum = 0;modnum < indiv[bestIndiv].modPart.NumModels();modnum++){
+					Model *mod = indiv[bestIndiv].modPart.GetModel(modnum);
+					const ModelSpecification *modSpec = mod->GetCorrespondingSpec();
+					if(modSpec->IsCodon())//optimize omega even if there is only 1
+						improve += bestTree->OptimizeOmegaParameters(adap->branchOptPrecision, modnum);
+					else if(mod->NRateCats() > 1){
+						if(modSpec->IsFlexRateHet()){//Flex rates
+							improve += bestTree->OptimizeFlexRates(adap->branchOptPrecision, modnum);
+							}
+						else if(modSpec->fixAlpha == false){//normal gamma
+							improve += bestTree->OptimizeBoundedParameter(modnum, adap->branchOptPrecision, mod->Alpha(), 0, min(mod->Alpha(), 0.05), 999.9, &Model::SetAlpha);
+							}
+						}
+					if(modSpec->includeInvariantSites && !modSpec->fixInvariantSites)
+						improve += bestTree->OptimizeBoundedParameter(modnum, adap->branchOptPrecision, mod->PropInvar(), 0, min(mod->PropInvar(), 1.0e-8), mod->maxPropInvar, &Model::SetPinv);
+					if(modSpec->IsCodon() == false && modSpec->fixStateFreqs == false && modSpec->IsEqualStateFrequencies() == false && modSpec->IsEmpiricalStateFrequencies() == false){
+						FLOAT_TYPE paramOpt = bestTree->OptimizeEquilibriumFreqs(adap->branchOptPrecision, modnum);
+						if(paramOpt < ZERO_POINT_ZERO && paramOpt > -1e-8)//avoid printing very slightly negative values
+							paramOpt = ZERO_POINT_ZERO;
+						improve += paramOpt;
+						outman.DebugMessage("eq freq opt = %.4f", paramOpt);
+						}
+					if(modSpec->fixRelativeRates == false && modSpec->Nst() > 1 && modSpec->IsAminoAcid() == false){
+						FLOAT_TYPE paramOpt = bestTree->OptimizeRelativeNucRates(adap->branchOptPrecision, modnum);
+						if(paramOpt < ZERO_POINT_ZERO && paramOpt > -1e-8)//avoid printing very slightly negative values
+							paramOpt = ZERO_POINT_ZERO;
+						improve += paramOpt;
+						outman.DebugMessage("rel rates opt = %.4f", paramOpt);
+						}
+					if(modSpec->IsEstimateAAMatrix() || (modSpec->IsTwoSerineRateMatrix() && !modSpec->fixRelativeRates)){
+						FLOAT_TYPE paramOpt = bestTree->OptimizeRelativeNucRates(adap->branchOptPrecision, modnum);
+						if(paramOpt < ZERO_POINT_ZERO && paramOpt > -1e-8)//avoid printing very slightly negative values
+							paramOpt = ZERO_POINT_ZERO;
+						improve += paramOpt;
+						outman.DebugMessage("rel rates opt = %.4f", paramOpt);
+						}
+					if(modSpec->IsOrientedGap()){
+						FLOAT_TYPE paramOpt = bestTree->OptimizeInsertDeleteRates(adap->branchOptPrecision, modnum);
+						if(paramOpt < ZERO_POINT_ZERO && paramOpt > -1e-8)//avoid printing very slightly negative values
+							paramOpt = ZERO_POINT_ZERO;
+						improve += paramOpt;
+						outman.DebugMessage("ins/del opt = %.4f", paramOpt);
+						}
+					}
+				if(modSpecSet.InferSubsetRates()){
+					improve += bestTree->OptimizeSubsetRates(adap->branchOptPrecision);
+					}
+				if(!(FloatingPointEquals(adap->modWeight, 0.0, 1e-8)))
+					outman.UserMessage("   Optimizing parameters...    improved %8.3f lnL", improve);
+				/////
+
+				FLOAT_TYPE before=bestFitness;
+				//under some conditions (very steep lopsided likelihood curve for branch lengths)
+				//the blen opt can actually make the score worse
+				bestTree->OptimizeAllBranches(adap->branchOptPrecision);
+				indiv[bestIndiv].SetDirty();
+				CalcAverageFitness();
+				FLOAT_TYPE bImp = bestFitness - before - improve;
+				if(bImp < ZERO_POINT_ZERO && bImp > -1e-4)//avoid printing very slightly negative values
+					bImp = ZERO_POINT_ZERO;
+				outman.UserMessage("   Optimizing branchlengths... improved %8.3f lnL", bImp);
+				//This is important so that new better topos can be properly identified in the next gen!
+				adap->lastgenscore = BestFitness();
+				}
+
+			//automatic termination conditions
+			if(conf->enforceTermConditions == true){
+				if(swapBasedTerm && !FloatingPointEquals(adap->topoMutateProb, ZERO_POINT_ZERO, max(1.0e-8, GARLI_FP_EPS * 2.0))){
+					assert(swapTermThreshold != 0);
+					if(swapTermThreshold < 0 && (gen - lastUniqueSwap > abs(swapTermThreshold))){
+						break;
+						}
+					else {
+						if(swapTermThreshold > 0 && (gen - lastUniqueSwap > swapTermThreshold)
+						&& (gen-max(lastTopoImprove, lastPrecisionReduction) > conf->lastTopoImproveThresh || FloatingPointEquals(adap->topoMutateProb, ZERO_POINT_ZERO, max(1.0e-8, GARLI_FP_EPS * 2.0)))
+						&& (gen > adap->intervalsToStore * adap->intervalLength)
+						&& adap->improveOverStoredIntervals < conf->improveOverStoredIntervalsThresh
+						&& (FloatingPointEquals(adap->branchOptPrecision, adap->minOptPrecision, max(1.0e-8, GARLI_FP_EPS * 2.0)) || adap->numPrecReductions==0)){
+							if(adap->topoMutateProb > ZERO_POINT_ZERO) 
+								outman.UserMessage("Reached termination condition!\nlast topological improvement at gen %d", lastTopoImprove);
+							else 
+								outman.UserMessage("Reached termination condition!\n");
+							outman.UserMessage("Improvement over last %d gen = %.5f", adap->intervalsToStore*adap->intervalLength, adap->improveOverStoredIntervals);
+							outman.UserMessage("Last new topology swap at gen %d", lastUniqueSwap);
+							break;
+							}
+						}
+					}
+				else{
+					if((gen-max(lastTopoImprove, lastPrecisionReduction) > conf->lastTopoImproveThresh || FloatingPointEquals(adap->topoMutateProb, ZERO_POINT_ZERO, max(1.0e-8, GARLI_FP_EPS * 2.0)))
+					&& (gen > adap->intervalsToStore * adap->intervalLength)
+					&& (adap->improveOverStoredIntervals < conf->improveOverStoredIntervalsThresh)
+					&& (FloatingPointEquals(adap->branchOptPrecision, adap->minOptPrecision, max(1.0e-8, GARLI_FP_EPS * 2.0)) || adap->numPrecReductions==0)){
+						if(adap->topoMutateProb > ZERO_POINT_ZERO) 
+							outman.UserMessage("Reached termination condition!\nlast topological improvement at gen %d", lastTopoImprove);
+						else 
+							outman.UserMessage("Reached termination condition!\n");
+						outman.UserMessage("Improvement over last %d gen = %.5f", adap->intervalsToStore*adap->intervalLength, adap->improveOverStoredIntervals);
+						break;
+						}
+					}
+				}
+
+#ifdef INCLUDE_PERTURBATION
+			CheckPerturbSerial();
+#endif
+			}
+
+		if(ShouldCheckpoint(true) == true)
+			WriteStateFiles();
+
+		if(stopwatch.ThisExecutionSplitTime() > conf->stoptime){
+			outman.UserMessage("NOTE: ****Specified time limit (%d seconds) reached...", conf->stoptime);
+			//Time termination can be used a sort of "pause" along with checkpointing.  Checkpoints may be
+			//written very infrequently though (large saveevery), so spit one out now.
+			//Always do this in BOINC mode.	
+#ifndef BOINC
+			if(conf->checkpoint)
+#endif
+				WriteStateFiles();	
+			timeTermination = true;
+			break;
+			}
+		if(gen == conf->stopgen){
+			//stopgen is essentially a stopping condition, treated just like the flexible automated criterion.
+			outman.UserMessage("NOTE: ****Specified generation limit (%d) reached...", conf->stopgen);
+			genTermination = true;
+			}
+#ifdef INCLUDE_PERTURBATION
+		if(pertMan->pertAbandoned==true && pertMan->restartAfterAbandon==true && (gen - pertMan->lastPertGeneration > pertMan->gensBeforeRestart)){
+			params->starting_tree="";
+			pertMan->lastPertGeneration=gen;
+			pertMan->pertAbandoned=false;
+			pertMan->numPertsNoImprove=0;
+			bestSinceRestart.SetFitness(-1e100);
+			if(BestFitness() > allTimeBest.Fitness()) StoreAllTimeBest();
+			SeedPopulationWithStartingTree();
+			outman.UserMessage("restarting ....");
+			}
+#endif
+		}
+	//Allow killing during FinalOpt
+	TurnOffSignalCatching();
+
+	//checkpoint immediately before final opt, if finishedGenerations isn't set, which will
+	//indicate that we've already written and restarted from a checkpoint written here
+	if(!(finishedGenerations || timeTermination || userTermination)){
+		//this will indicate that we've finished the loop over generations through automatic means
+		//and that we are just before finalOpt (i.e., finishedGenerations is true but finishedRep is
+		//false).  This will be critical for restarting from a checkpoint written just before finalOpt
+		if(!(timeTermination || userTermination))
+			finishedGenerations = true;
+
+#ifndef BOINC
+		//non-BOINC checkpointing
+		if(ShouldCheckpoint(false))
+#endif
+			WriteStateFiles();
+		if(conf->workPhaseDivision){
+			//second workphasedivision exit
+			WriteStateFiles();
+			outman.UserMessage("\nNOTE: Terminating run before final optimization and writing checkpoint");
+			outman.UserMessage("because workphasedivision configuration entry was set.");
+			workPhaseTermination = true;
+			return;
+			}
+		}
+
+	//don't optimize if checkpointing is happening and the run was prematurely killed
+	if(conf->refineEnd && !(conf->checkpoint && (timeTermination || userTermination))){
+		UpdateFractionDone(3);
+		BetterFinalOptimization();
+		finishedRep = true;
+		//finishedRep must be true for the following two functions to output correctly
+		OutputLog();
+		if(conf->outputTreelog && treeLog.is_open())
+			AppendTreeToTreeLog(-1);
+		}
+
+	//outman.UserMessage("Maximum # clas used = %d out of %d", claMan->MaxUsedClas(), claMan->NumClas());
+	//outman.UserMessage("%d conditional likelihood calculations\n%d branch optimization passes", calcCount, optCalcs);
+	UpdateFractionDone(4);
+	}
+
+
+FLOAT_TYPE Population::GenerationFractionDone(){
+	//This just pulls out some complicated (and ad hoc) code out of UpdateFractionDone that assigns a proportion done 
+	//to a point during the search (generation) phase of a run.
+	bool willReduce = (FloatingPointEquals(adap->startOptPrecision, adap->minOptPrecision, 1e-6) == false) 
+		&& (adap->numPrecReductions > 0);
+	//the 0.45 here is for rounding purposes.  Don't want to round down if precReductionFactor ends up being 
+	//slightly more than the diff due to floating point rep
+	int reduction_number = willReduce ? (int) (0.45 + ((adap->startOptPrecision - adap->branchOptPrecision) / adap->precReductionFactor)) : 0;
+	int remaining_reductions = willReduce ? adap->numPrecReductions - reduction_number : 0;
+	double evalInterval = (adap->intervalLength * adap->intervalsToStore);
+
+	FLOAT_TYPE genProportionDone = 0.0;
+
+	//these should add up to one
+	const FLOAT_TYPE preReduceSplit = 0.2;
+	const FLOAT_TYPE duringReduceSplit = 0.5;
+	const FLOAT_TYPE postReduceSplit = 0.3;
+
+	if(willReduce && remaining_reductions == adap->numPrecReductions){
+		//We've done a decent number of gen, but haven't yet reduced the prec.  This will be linear until the minimum
+		//possible number of generations before a prec reduction could happen have passed, thereafter it will be asymptotic
+		FLOAT_TYPE linearProportion = 0.5;
+		if(gen <= evalInterval)
+			genProportionDone = preReduceSplit * linearProportion * (gen / evalInterval);
+		else
+			genProportionDone = preReduceSplit * (linearProportion + (1.0 - linearProportion) * (1.0 - (evalInterval / (FLOAT_TYPE) gen)));
+		}
+
+	else if(willReduce && remaining_reductions > 0){
+		//during reduction phase - divide evenly among the precision reductions
+		FLOAT_TYPE perReduction = duringReduceSplit / ((FLOAT_TYPE) adap->numPrecReductions - 1.0);
+		//between one reduction and the next, linear, then asymptotic
+		FLOAT_TYPE sinceLastReduction = gen - lastPrecisionReduction;
+		FLOAT_TYPE linearProportion = 0.5;
+		genProportionDone = preReduceSplit + (perReduction * (reduction_number - 1));
+		if(sinceLastReduction <= evalInterval)
+			//genProportionDone +=((reduction_number - 1) * perReduction) + (duringReduceSplit * perReduction * ((FLOAT_TYPE) sinceLastReduction / evalInterval));
+			genProportionDone += perReduction * linearProportion * ((FLOAT_TYPE) sinceLastReduction / evalInterval);
+		else
+			//genProportionDone += ((reduction_number - 1) * perReduction) + (duringReduceSplit * perReduction) + (1.0 - duringReduceSplit) * perReduction * (1.0 - (evalInterval / (FLOAT_TYPE) sinceLastReduction));
+			genProportionDone += perReduction * (linearProportion + (1.0 - linearProportion) * (1.0 - (evalInterval / (FLOAT_TYPE) sinceLastReduction)));
+		}
+
+	else if(remaining_reductions == 0){
+		//this is linear until we get past the absolute minimum point that the run could have finished
+		FLOAT_TYPE sinceLastReduction = gen - lastPrecisionReduction;
+		//the chance of going over the minimum # gen in the last phase is small with lower # of taxa, which makes for a big jump
+		//in proportion because the asymptotic phase isn't entered at all.  Scale the proportion where the asymp phase starts
+		//with the # of taxa
+		double linearProportion = max(0.5, 0.9 - 0.10 * (dataPart->NTax() / 50.0));
+		genProportionDone = preReduceSplit + duringReduceSplit;
+		if(sinceLastReduction <= conf->lastTopoImproveThresh){
+			genProportionDone += postReduceSplit * linearProportion * (sinceLastReduction / (FLOAT_TYPE) conf->lastTopoImproveThresh);
+			}
+		//thereafter it is conservatively asymptotic
+		else{
+			assert( (1.0 - (conf->lastTopoImproveThresh / (FLOAT_TYPE) sinceLastReduction)) >= 0.0);
+			genProportionDone += postReduceSplit * (linearProportion + (1.0 - linearProportion) * min(1.0, (1.0 - (conf->lastTopoImproveThresh / (FLOAT_TYPE) sinceLastReduction))));
+			}
+		}
+
+	assert(genProportionDone >= 0.0 && genProportionDone <= 1.0);
+	return genProportionDone;
+	}
+
+void Population::UpdateFractionDone(int phase){
+#ifndef BOINC
+	if(!conf->reportRunProgress)
+		return;
+#endif
+
+	//Update the proportion done.  This is mainly for BOINC, but might be used elsewhere.
+	//
+	//-This uses the "search phase" and other info to automatically determine the progress using a fairly arbitrary algorithm.
+	//-The fractions done are members of Population (rep_fraction_done and tot_fraction_done), so values will be maintained
+	//	until updated, and stored in checkpoints.
+	//-The fractions should never reduce during the course of a run, or after restarting from checkpoint.
+	//-It is generally not clear when various phases will end, so the intent is to have a portion of each phase increase the
+	//	fraction linearly, and then switch to an assymptotic approach to some value.
+	//-The searchphasedivision setting complicates things a bit.  In this case the run terms immediately after initial opt,
+	//	and immediately before final opt.  During the generation cycle it will generally be time limited, but doesn't need 
+	//	to be.  During each of those phases it will be assumed that the whole fraction done refers to just that phase, and 
+	//	that upon restarting from checkpoint the fraction done will reset, as opposed to continuing from the previous value.
+
+	//phases:
+	//0 - data has been read and everything allocated OR a search has just started a new replicate
+	//1 - during initial optimization, based on optimization pass
+	//2 - during generation cycle, this can be difficult, because no real a priori way to know if run will (or is intended to)
+	//		stop due to stoptime, stopgen or auto termination.  So, will use the max of those.
+	//		The calculations for fraction done assuming autotermination also define these phases:
+	//			pre-reduction - before first precision reduction
+	//			reduction - while reductions are happening
+	//			terminal - remaining gens after min prec reached
+	//3 - final opt, based on optimization pass
+	//4 - a replicate is entirely done
+
+	//Called from:
+	//0 - if not restart at start of loop over reps in PerformSearch (reset rep_fraction_done)
+	//1
+
+
+	FLOAT_TYPE afterSetup = 0.05;
+	FLOAT_TYPE beforeTerm = 0.95;
+	FLOAT_TYPE workDuration = beforeTerm - afterSetup;
+
+	//under normal conditions, these should add up to 1.0, and divide workDuration into sub-intervals
+	FLOAT_TYPE initialOptProportionOfWork = -1.0;
+	FLOAT_TYPE finalOptProportionOfWork = -1.0;
+	FLOAT_TYPE genProportionOfWork = -1.0;
+
+	if(conf->workPhaseDivision){
+		//because in this mode it stops right after initial opt, and starts right before final
+		initialOptProportionOfWork = finalOptProportionOfWork = genProportionOfWork = 1.0;
+		}
+	else{
+		initialOptProportionOfWork = 0.15;
+		finalOptProportionOfWork = 0.15;
+		genProportionOfWork = 1.0 - initialOptProportionOfWork - finalOptProportionOfWork;
+		}
+
+	FLOAT_TYPE newFract = -1.0;
+	FLOAT_TYPE newRepFract = -1.0;
+
+	if(phase == 0){
+		//This will reset for the start of a new rep.  The fraction of completion contibuted by previous finished reps
+		//will be included below.
+		//newFract = afterSetup;
+		rep_fraction_done = newRepFract = 0.0;
+		}
+	else if(phase == 1){
+		//during initial optimization
+		FLOAT_TYPE linearUntilPass = 10;
+		FLOAT_TYPE linearProportion = 0.5;
+		if(initialRefinePass < 0) //this means that initial opt has completed
+			newRepFract = initialOptProportionOfWork;
+		else if(initialRefinePass <= linearUntilPass)
+			newRepFract = initialOptProportionOfWork * linearProportion * min(1.0, (initialRefinePass / linearUntilPass));
+		else
+			newRepFract = initialOptProportionOfWork * (linearProportion + (1.0 - linearProportion) * max(0.0, 1.0 - linearUntilPass / (FLOAT_TYPE) initialRefinePass));
+		}
+	else if(phase == 2){
+		//during generations
+		newRepFract = conf->workPhaseDivision == true ? 0.0 : initialOptProportionOfWork;
+		//No real way of knowing what will cause termination of this run.  Choose the max.
+		//In the case of time term it will "reset" upon a restart from checkpoint, which might
+		//cause odd changes in the fraction done in some cases, but whatever. 
+		FLOAT_TYPE timeFract = min(1.0, (FLOAT_TYPE) stopwatch.ThisExecutionSplitTime() / conf->stoptime);
+		FLOAT_TYPE genLimitFract = min(1.0, (FLOAT_TYPE) gen / conf->stopgen);
+		FLOAT_TYPE genFract = conf->enforceTermConditions ? GenerationFractionDone() : 0.0;
+		
+		//An odd case can happen here, where the generation phase is nearly done (giving high fraction done) 
+		//but a run is likely to be time limited, and after a restart the generation fraction calculation 
+		//will still be very high.  That would make the fraction done immediately upon restart to be very high
+		//and to just hang there for a long time.  So, to be conservative downweight the generation fraction if the 
+		//stoptime is < 5 hr.
+		if(conf->stoptime < 5 * 60 * 60)
+			newRepFract += genProportionOfWork * max(max(timeFract, genLimitFract), genFract * 0.5);
+		else
+			newRepFract += genProportionOfWork * max(max(timeFract, genLimitFract), genFract);
+		}
+	else if(phase == 3){
+		//during final optimization
+		FLOAT_TYPE linearUntilPass = 20;
+		FLOAT_TYPE linearProportion = 0.5;
+		newRepFract = conf->workPhaseDivision == true ? 0.0 : initialOptProportionOfWork + genProportionOfWork;
+		if(finalRefinePass <= linearUntilPass)
+			newRepFract += finalOptProportionOfWork * linearProportion * min(1.0, finalRefinePass / linearUntilPass);
+		else
+			newRepFract += finalOptProportionOfWork * (linearProportion + (1.0 - linearProportion) * max(0.0, 1.0 - linearUntilPass / finalRefinePass));
+		}
+	else if(phase == 4){
+		newRepFract = 1.0;
+		}
+
+	//outman.DebugMessage("newrep, oldrep: %f, %f, %d", newRepFract, rep_fraction_done, phase);
+	assert(newRepFract >= 0.0 && newRepFract <= 1.0);
+	assert(newRepFract + 0.00001 >= rep_fraction_done);
+
+	//Now, prorate the newRepFract, which corresponds to the work portion of a rep and ranges from 0.0 to 1.0
+	if(newFract < 0.0){
+		//In searchphasereduction, don't prorate, since each segment makes up its own 0-1 fraction
+		if(conf->workPhaseDivision)
+			newFract = afterSetup + workDuration * newRepFract;
+		else{
+			int totSearches = conf->searchReps * (conf->bootstrapReps > 0 ? conf->bootstrapReps : 1);
+			int curSearch = currentSearchRep + (currentBootstrapRep > 0 ? currentBootstrapRep - 1 : 0) * conf->searchReps;
+			FLOAT_TYPE perRepProportion = 1.0 / totSearches;
+			FLOAT_TYPE completedRepProportion = (curSearch - 1.0) * perRepProportion;
+			newFract = afterSetup + workDuration * (completedRepProportion + (newRepFract * perRepProportion));
+			}
+		}
+
+	//outman.DebugMessage("newtot, oldtot: %f, %f, %d", newFract, tot_fraction_done, phase);
+	assert(newFract >= 0.0 && newFract <= 1.0);
+	assert(newFract + 0.00001 >= tot_fraction_done);
+	rep_fraction_done = newRepFract;
+	tot_fraction_done = newFract;
+
+#ifdef BOINC
+	boinc_fraction_done(tot_fraction_done);
+#endif
+	//outman.DebugMessage("newrep, newtot: %f, %f, %d", rep_fraction_done, tot_fraction_done, phase);
+	}
+
+//this is a final opt adapted from final opt of trunk version 1.0
+void Population::BetterFinalOptimization(){
+	outman.setf(ios::fixed);
+	outman.precision(5);
+	outman.UserMessage("Current score = %.4f", BestFitness());
+
+#ifdef INCLUDE_PERTURBATION
+	if(pertMan->ratcheted) TurnOffRatchet();
+
+	if(allTimeBest != NULL){
+		if(BestFitness() < allTimeBest->Fitness()){
+			RestoreAllTimeBest();
+			}
+		}
+#endif
+
+	//This was a little dangerous since any subsequent scoring of any of the trees would cause problems
+	//probably not that important anyway.
+/*	for(unsigned i=0;i<total_size;i++){
+		if(i != bestIndiv) indiv[i].treeStruct->RemoveTreeFromAllClas();
+		}
+*/
+	outman.UserMessage("Performing final optimizations...");
+#ifdef MAC_FRONTEND
+	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+	[[MFEInterfaceClient sharedClient] didBeginBranchOptimization];
+	[pool release];
+#endif
+	FLOAT_TYPE incr;
+
+	assert(finalRefinePass < 1);
+	finalRefinePass = 1;
+
+	double freqOptImprove, nucRateOptImprove, pinvOptImprove, alphaOptImprove, omegaOptImprove, flexOptImprove, subRateOpt, insDelOptImprove;
+	double paramOpt, blenOptImprove;
+	paramOpt = blenOptImprove = freqOptImprove = nucRateOptImprove = pinvOptImprove = alphaOptImprove = omegaOptImprove = flexOptImprove = subRateOpt = insDelOptImprove = ZERO_POINT_ZERO;
+
+	FLOAT_TYPE precThisPass = max(adap->branchOptPrecision * pow(ZERO_POINT_FIVE, finalRefinePass), (FLOAT_TYPE)1e-10);
+	FLOAT_TYPE paramPrecThisPass = max(adap->branchOptPrecision*0.1, 0.01);
+	bool optAnyModel = FloatingPointEquals(conf->modWeight, ZERO_POINT_ZERO, 1e-8) == false;
+	bool goingToExit;
+
+	Individual *optInd = &indiv[bestIndiv];
+	Tree *optTree = optInd->treeStruct;
+
+	adap->branchOptPrecision = min(adap->branchOptPrecision, 0.01);
+
+	string blenS;
+	do{
+		//during each pass we'll keep track of a few things
+		//  incr = total improvement this pass. this controls termination of opt
+		//  summed improvement for each param/blens since last output.  If not outputting
+		//    every pass it won't be zeroed and so will accumulate.  The output string
+		//    will be constructed each pass, but only output sometimes
+		precThisPass = max(adap->branchOptPrecision * pow(ZERO_POINT_FIVE, finalRefinePass), (FLOAT_TYPE)1e-10);
+		paramPrecThisPass = max(precThisPass, 1e-5);
+
+		string outString;
+		char temp[50];
+		FLOAT_TYPE passStart=optInd->Fitness();
+
+		//back up the current branch lengths in case something goes wrong in the blen optimization
+		vector<FLOAT_TYPE> blens;
+		optTree->StoreBranchlengths(blens);
+
+		//remember that what is returned from OptAllBranches isn't the true increase in score, just an estimate
+		incr=optTree->OptimizeAllBranches(precThisPass);
+		optInd->CalcFitness(0);
+
+		FLOAT_TYPE trueImprove= optInd->Fitness() - passStart;
+
+		//In very rare cases the score can come out very slightly worse (or apparently worse due to numerical instability issues) after
+		//optimizing all of the branches.  In general this is taken care of at a lower level, but if it percolates up to here we'll ignore
+		//the last set of changes and pretend they never happened.
+		if(trueImprove < ZERO_POINT_ZERO){
+			outman.DebugMessage("OptimizeAllBranches worsened score by %f.  Restoring previous branch lengths...", trueImprove);
+			optTree->RestoreBranchlengths(blens);
+			trueImprove = ZERO_POINT_ZERO;
+			optInd->SetDirty();
+			optInd->CalcFitness(0);
+			}
+
+		blenOptImprove += trueImprove;
+		incr = trueImprove;
+
+		sprintf(temp, "(branch= %4.4f", blenOptImprove);
+		blenS = temp;
+
+		optInd->CalcFitness(0);
+
+		//these strings will be overwritten each time one of the parameter types are optimized
+		//always with the sum total of improvement due to that param, be it over models, passes, etc.
+		//this means that each will only appear once, even in partitioned models
+		string omegaS, alphaS, flexS, pinvS, freqsS, relRatesS, insDelS, subsetS;
+		omegaS = alphaS = flexS = pinvS = freqsS = relRatesS = insDelS = subsetS = "";
+		for(int m = 0;m < indiv[bestIndiv].modPart.NumModels();m++){
+			Model *mod = indiv[bestIndiv].modPart.GetModel(m);
+			const ModelSpecification *modSpec = mod->GetCorrespondingSpec();
+
+			bool optOmega, optAlpha, optFlex, optPinv, optFreqs, optRelRates, optInsDel;
+			optOmega = optAlpha = optFlex = optPinv = optFreqs = optRelRates = optInsDel = false;
+
+			if(modSpec->IsCodon() && ! modSpec->fixOmega)
+				optOmega = true;
+			else if(modSpec->numRateCats > 1 && !modSpec->IsCodon()){
+				if(modSpec->IsFlexRateHet())
+					optFlex = true;
+				else if(modSpec->fixAlpha == false)
+					optAlpha = true;
+				}
+			if(modSpec->includeInvariantSites && !modSpec->fixInvariantSites)
+				optPinv = true;
+
+			if(modSpec->IsCodon() == false && modSpec->fixStateFreqs == false && modSpec->IsEqualStateFrequencies() == false && modSpec->IsEmpiricalStateFrequencies() == false)
+				optFreqs = true;
+			//this is the case of forced freq optimization with codon models.  For everything to work they must be set as both not fixed but empirical
+			if(modSpec->IsCodon() && modSpec->fixStateFreqs == false && modSpec->IsEqualStateFrequencies() == false && modSpec->IsEmpiricalStateFrequencies() == true)
+				optFreqs = true;
+			if((modSpec->fixRelativeRates == false) && ((modSpec->Nst() > 1 && modSpec->IsAminoAcid() == false) || modSpec->IsEstimateAAMatrix() || modSpec->IsTwoSerineRateMatrix()))
+				optRelRates = true;
+			if(modSpec->IsOrientedGap())
+				optInsDel = true;
+
+			//this is taken from the improved version in the trunk, and is a bit redundant in this context.  
+			//the output strings will be generated every time that any of the params are optimized, and will
+			//then be updated the next time the same parameter type is optimized in a different model.  The
+			//last model to optimize a given param will make the correct string that will eventually get output
+			if(optOmega) {
+				paramOpt = optTree->OptimizeOmegaParameters(paramPrecThisPass, m);
+				if(paramOpt < ZERO_POINT_ZERO && paramOpt > -1e-8)//avoid printing very slightly negative values
+					paramOpt = ZERO_POINT_ZERO;
+				omegaOptImprove += paramOpt;
+				sprintf(temp, "  omega= %4.4f", omegaOptImprove);
+				omegaS = temp;
+				incr += paramOpt;
+				}
+			if(optAlpha){
+				paramOpt = optTree->OptimizeBoundedParameter(m, paramPrecThisPass, mod->Alpha(), 0, min(0.05, mod->Alpha()), max(999.9, mod->Alpha()), &Model::SetAlpha);
+				if(paramOpt < ZERO_POINT_ZERO && paramOpt > -1e-8)//avoid printing very slightly negative values
+					paramOpt = ZERO_POINT_ZERO;
+				alphaOptImprove += paramOpt;
+				sprintf(temp, "  alpha= %4.4f", alphaOptImprove);
+				alphaS = temp;
+				incr += paramOpt;
+				}
+			if(optFlex){
+				//Flex opt is tough, give it more passes if they are helping
+				FLOAT_TYPE p = 0.0;
+				paramOpt = 0.0;
+				int innerPass = 0;
+				do{
+					p = optTree->OptimizeFlexRates(paramPrecThisPass, m);
+					paramOpt += p;
+					}while(p > trueImprove && innerPass++ < 5);
+				if(paramOpt < ZERO_POINT_ZERO && paramOpt > -1e-8)//avoid printing very slightly negative values
+					paramOpt = ZERO_POINT_ZERO;
+				flexOptImprove += paramOpt;
+				sprintf(temp, "  flex rates= %4.4f", flexOptImprove);
+				flexS = temp;
+				incr += paramOpt;
+				}
+			if(optPinv){
+				paramOpt = optTree->OptimizeBoundedParameter(m, paramPrecThisPass, mod->PropInvar(), 0, min(1.0e-8,mod->PropInvar()), mod->maxPropInvar, &Model::SetPinv);
+				if(paramOpt < ZERO_POINT_ZERO && paramOpt > -1e-8)//avoid printing very slightly negative values
+					paramOpt = ZERO_POINT_ZERO;
+				pinvOptImprove += paramOpt;
+				sprintf(temp, "  pinv= %4.4f", pinvOptImprove);
+				pinvS = temp;
+				incr += paramOpt;
+				}
+			if(optFreqs){
+				paramOpt = optTree->OptimizeEquilibriumFreqs(paramPrecThisPass, m);
+				if(paramOpt < ZERO_POINT_ZERO && paramOpt > -1e-8)//avoid printing very slightly negative values
+					paramOpt = ZERO_POINT_ZERO;
+				freqOptImprove += paramOpt;
+				sprintf(temp, "  eq freqs= %4.4f", freqOptImprove);
+				freqsS = temp;
+				incr += paramOpt;
+				}
+			if(optRelRates){
+				paramOpt = optTree->OptimizeRelativeNucRates(paramPrecThisPass, m);
+				if(paramOpt < ZERO_POINT_ZERO && paramOpt > -1e-8)//avoid printing very slightly negative values
+					paramOpt = ZERO_POINT_ZERO;
+				nucRateOptImprove += paramOpt;
+				sprintf(temp, "  rel rates= %4.4f", nucRateOptImprove);
+				relRatesS = temp;
+				incr += paramOpt;
+				}
+			if(optInsDel){
+				paramOpt = optTree->OptimizeInsertDeleteRates(paramPrecThisPass, m);
+				if(paramOpt < ZERO_POINT_ZERO && paramOpt > -1e-8)//avoid printing very slightly negative values
+					paramOpt = ZERO_POINT_ZERO;
+				insDelOptImprove += paramOpt;
+				sprintf(temp, "  ins/del rates= %4.4f", insDelOptImprove);
+				insDelS = temp;
+				incr += paramOpt;
+				}
+			
+			optInd->CalcFitness(0);
+			}
+		
+		if(modSpecSet.InferSubsetRates()){
+			paramOpt = indiv[bestIndiv].treeStruct->OptimizeSubsetRates(max(adap->branchOptPrecision*0.1, 0.001));
+			if(paramOpt < ZERO_POINT_ZERO && paramOpt > -1e-8)//avoid printing very slightly negative values
+				paramOpt = ZERO_POINT_ZERO;
+			subRateOpt += paramOpt;
+			sprintf(temp, "  subset rates= %4.4f", subRateOpt);
+			subsetS = temp;
+			paramOpt += subRateOpt;
+			}
+		optInd->CalcFitness(0);
+		
+		outString = blenS + omegaS + alphaS + flexS + pinvS + freqsS + relRatesS + insDelS + subsetS;
+		goingToExit = !(incr > 1.0e-5 || precThisPass > 1.0e-4 || finalRefinePass < 10);
+
+		UpdateFractionDone(3);
+		if(finalRefinePass < 20 || (finalRefinePass % 10 == 0) || goingToExit){
+			if(finalRefinePass > 20 && (goingToExit || (finalRefinePass % 10 == 0)))
+				outman.UserMessage(" optimization up to ...");
+			outman.UserMessageNoCR("pass %-2d: %.4f   %s)", finalRefinePass, optInd->Fitness(), outString.c_str());
+			if(conf->reportRunProgress)
+				outman.UserMessageNoCR(" %14.2f %14.2f", 0.01 * (int) ceil(rep_fraction_done * 100), 0.01 * (int) ceil(tot_fraction_done * 100));
+			outman.UserMessage("");
+			paramOpt = blenOptImprove = freqOptImprove = nucRateOptImprove = pinvOptImprove = alphaOptImprove = omegaOptImprove = flexOptImprove = subRateOpt = insDelOptImprove = ZERO_POINT_ZERO;
+			}
+
+		finalRefinePass++;
+		}while(!goingToExit);
+	finalRefinePass = -1;
+#ifdef PUSH_TO_MIN_BLEN
+	double init = indiv[bestIndiv].treeStruct->lnL;
+	int num = indiv[bestIndiv].treeStruct->PushBranchlengthsToMin();
+	indiv[bestIndiv].treeStruct->Score();
+	double aft = indiv[bestIndiv].treeStruct->lnL;
+	double imp=indiv[bestIndiv].treeStruct->OptimizeAllBranches(precThisPass);
+	indiv[bestIndiv].treeStruct->Score();
+	double fin = indiv[bestIndiv].treeStruct->lnL;
+	outman.UserMessage("Looking for minimum length branches...");
+	indiv[bestIndiv].CalcFitness(0);
+	outman.DebugMessage("%d branches pushed to min.\nScore after opt: %.9f\nScore after push: %.9f\nScore after reopt: %.9f", num, init, aft, fin);
+#endif
+
+	outman.UserMessage("Final score = %.4f", indiv[bestIndiv].Fitness());
+	unsigned totalSecs = stopwatch.SplitTime();
+	unsigned secs = totalSecs % 60;
+	totalSecs -= secs;
+	unsigned min = (totalSecs % 3600)/60;
+	totalSecs -= min * 60;
+	unsigned hours = totalSecs / 3600;
+	if(conf->searchReps == currentSearchRep && (conf->bootstrapReps == 0 || conf->bootstrapReps == currentBootstrapRep ))
+		outman.UserMessage("Time used = %d hours, %d minutes and %d seconds", hours, min, secs);
+	else
+		outman.UserMessage("Time used so far = %d hours, %d minutes and %d seconds", hours, min, secs);
+
+	log << "Score after final optimization: " << indiv[bestIndiv].Fitness() << endl;
+	//not sure how this would be done partitioned
+/*
+	if(modSpec.IsCodon()){
+		vector<FLOAT_TYPE> sProps;
+		indiv[bestIndiv].treeStruct->mod->CalcSynonymousBranchlengthProportions(sProps);
+		outman.UserMessage("Proportion of branchlengths that are Synonymous: %.5f", sProps[sProps.size()-1]); 
+		}
+*/
+#ifdef MAC_FRONTEND
+	pool = [[NSAutoreleasePool alloc] init];
+	[[MFEInterfaceClient sharedClient] reportFinalScore:BestFitness()];
+	[pool release];
+#endif
+
+	outman.unsetf(ios::fixed);
+
+	if(conf->outputTreelog && treeLog.is_open())
+		AppendTreeToTreeLog(-1);
+
+#ifdef ENABLE_CUSTOM_PROFILER
+	char fname[100];
+	sprintf(fname, "%s.profileresults.log", conf->ofprefix.c_str());
+#ifdef BOINC
+	char physical_name[100];
+	boinc_resolve_filename(fname, physical_name, sizeof(physical_name));
+	ofstream prof(physical_name);
+	//MFILE prof;
+	//prof.open(physical_name, "w");
+#else
+	ofstream prof(fname);
+#endif
+
+	/*
+//FROM WRITETREEFILE
+#ifdef BOINC
+	char physical_name[100];
+	boinc_resolve_filename(fname, physical_name, sizeof(physical_name));
+	MFILE outf;
+	outf.open(physical_name, "w");
+#else
+	ofstream outf;
+	outf.open( filename.c_str() );
+	outf.precision(8);
+#endif
+//...
+#ifdef BOINC
+	const char *s = trans.c_str();
+	outf.write(s, sizeof(char), trans.length());
+	s = str.c_str();
+	outf.write(s, sizeof(char), str.length());
+	theInd->treeStruct->root->MakeNewick(treeString, false, true);
+	size_t len = strlen(treeString);
+	outf.write(treeString, sizeof(char), len);
+	str = ";\nend;\n";
+	s = str.c_str();
+	outf.write(s, sizeof(char), str.length());
+#else
+	outf << trans;
+	outf << str;
+	outf.setf( ios::floatfield, ios::fixed );
+	outf.setf( ios::showpoint );
+	theInd->treeStruct->root->MakeNewick(treeString, false, true);
+	outf << treeString << ";\n";
+	outf << "end;\n";
+#endif	
+*/
+	char str[256];
+	sprintf(str, "dataset: %s\tstart:%s\n", conf->datafname.c_str(), conf->streefname.c_str());
+	
+	prof << "dataset: " << conf->datafname << "\t" << "start: " << conf->streefname << endl;
+	prof << "seed: " << conf->randseed << "\t" << "refine: " << (conf->refineStart == true) << endl;
+	prof << "start prec: " << conf->startOptPrec << "\t" << "final prec: " << adap->branchOptPrecision << endl;
+
+#ifdef SINGLE_PRECISION_FLOATS
+	prof << "Single precision\n";
+#else
+	prof << "Double precision\n";
+#endif
+	unsigned s = stopwatch.SplitTime();
+	prof << "Total Runtime: " << s << "\tnumgen: " << gen << "\tFinalScore: " << indiv[bestIndiv].Fitness() << "\n";
+	outman.SetOutputStream(prof);
+	indiv[bestIndiv].modPart.OutputHumanReadableModelReportWithParams();
+
+	prof << "Function\t\tcalls\ttime\tTperC\t%runtime" << endl;
+	ProfIntInt.Report(prof, s);
+	ProfIntTerm.Report(prof, s);
+	ProfTermTerm.Report(prof, s);
+	ProfRescale.Report(prof, s);
+	ProfScoreInt.Report(prof, s);
+	ProfScoreTerm.Report(prof, s);
+	ProfIntDeriv.Report(prof, s);
+	ProfTermDeriv.Report(prof, s);
+	ProfCalcPmat.Report(prof, s);
+	ProfCalcEigen.Report(prof, s);
+	ProfModDeriv.Report(prof, s);
+	ProfNewton.Report(prof, s);
+	ProfEQVectors.Report(prof, s);
+	prof.close();
+	outman.SetOutputStream(cout);
+#endif
+	/*	cout << "intterm calls " << inttermcalls << " time " << inttermtime/(double)(ticspersec.QuadPart) << endl;
+	cout << "termterm calls " << termtermcalls << " time " << termtermtime/(double)(ticspersec.QuadPart) << endl;
+	cout << "rescale calls " << rescalecalls << " time " << rescaletime/(double)(ticspersec.QuadPart) << " numrescales " << numactualrescales << endl;
+	cout << "totalopt calls " << totaloptcalls << " time " << totalopttime/(double)(ticspersec.QuadPart) << endl;
+	cout << "calcderiv calls " << calcderivcalls << " time " << calcderivtime/(double)(ticspersec.QuadPart) << endl;
+	cout << "derivgetclas calls " << derivgetclascalls << " time " << derivgetclastime/(double)(ticspersec.QuadPart) << endl;
+	cout << "derivint calls " << derivintcalls << " time " << derivinttime/(double)(ticspersec.QuadPart) << endl;
+	cout << "derivterm calls " << derivtermcalls << " time " << derivtermtime/(double)(ticspersec.QuadPart) << endl;
+	cout << "modderiv calls " << modderivcalls << " time " << modderivtime/(double)(ticspersec.QuadPart) << endl;
+	cout << "pmat calls " << pmatcalls << " time " << pmattime/(double)(ticspersec.QuadPart) << endl;
+*/	}
+
+//this is the original partitioned final opt
+void Population::FinalOptimization(){
+	//DEPRECATED in favor of BetterFinalOptimization
+	assert(0);
+
+	outman.setf(ios::fixed);
+	outman.precision(5);
+	outman.UserMessage("Current score = %.4f", BestFitness());
+	
+#ifdef INCLUDE_PERTURBATION
+	if(pertMan->ratcheted) TurnOffRatchet();
+	
+	if(allTimeBest != NULL){
+		if(BestFitness() < allTimeBest->Fitness()){
+			RestoreAllTimeBest();
+			}
+		}
+#endif
+
+	for(unsigned i=0;i<total_size;i++){
+		if(i != bestIndiv) indiv[i].treeStruct->RemoveTreeFromAllClas();
+		}
+	
+	outman.UserMessage("Performing final optimization...");
+#ifdef MAC_FRONTEND
+	NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+	[[MFEInterfaceClient sharedClient] didBeginBranchOptimization];
+	[pool release];
+#endif	
+	int pass=1;
+	FLOAT_TYPE incr;
+
+	double paramOpt, subRateOpt, paramTot;
+	paramTot = ZERO_POINT_ZERO;
+	do{
+		paramOpt = ZERO_POINT_ZERO;
+		for(int m = 0;m < indiv[bestIndiv].modPart.NumModels();m++){
+			const ModelSpecification *modSpec = indiv[bestIndiv].modPart.GetModel(m)->GetCorrespondingSpec();
+			if(modSpec->IsFlexRateHet()) paramOpt = indiv[bestIndiv].treeStruct->OptimizeFlexRates(max(adap->branchOptPrecision*0.1, 0.001), m);
+			else if(modSpec->IsCodon()) paramOpt = indiv[bestIndiv].treeStruct->OptimizeOmegaParameters(max(adap->branchOptPrecision*0.1, 0.001), m);
+			paramTot += paramOpt;
+			if(modSpec->IsFlexRateHet()){
+				outman.UserMessage("Flex optimization: %f", paramTot);
+				}
+			else if(modSpec->IsCodon()){
+				outman.UserMessage("Omega optimization: %f", paramTot);
+				}
+			}
+		if(modSpecSet.InferSubsetRates()){
+			subRateOpt = indiv[bestIndiv].treeStruct->OptimizeSubsetRates(max(adap->branchOptPrecision*0.1, 0.001));
+			outman.UserMessage("Subset rate optimization: %f", subRateOpt);
+			paramOpt += subRateOpt;
+			}
+		}while(paramOpt > ZERO_POINT_ZERO);
+
+	do{
+		incr=indiv[bestIndiv].treeStruct->OptimizeAllBranches(max(adap->branchOptPrecision * pow(ZERO_POINT_FIVE, pass), (FLOAT_TYPE)1e-10));
+
+		indiv[bestIndiv].CalcFitness(0);
+		outman.UserMessage("\tpass %d %.4f", pass++, indiv[bestIndiv].Fitness());
+		}while(incr > .00001 || pass < 10);
+	outman.UserMessage("Final score = %.4f", indiv[bestIndiv].Fitness());
+	unsigned totalSecs = stopwatch.SplitTime();
+	unsigned secs = totalSecs % 60;
+	totalSecs -= secs;
+	unsigned min = (totalSecs % 3600)/60;
+	totalSecs -= min * 60;
+	unsigned hours = totalSecs / 3600;
+	if(conf->searchReps == currentSearchRep && (conf->bootstrapReps == 0 || conf->bootstrapReps == currentBootstrapRep ))
+		outman.UserMessage("Time used = %d hours, %d minutes and %d seconds", hours, min, secs);
+	else 
+		outman.UserMessage("Time used so far = %d hours, %d minutes and %d seconds", hours, min, secs);
+		
+	log << "Score after final optimization: " << indiv[bestIndiv].Fitness() << endl;
+#ifdef MAC_FRONTEND
+	pool = [[NSAutoreleasePool alloc] init];
+	[[MFEInterfaceClient sharedClient] reportFinalScore:BestFitness()];
+	[pool release];
+#endif	
+
+	outman.unsetf(ios::fixed);
+	
+#ifdef ENABLE_CUSTOM_PROFILER
+	char fname[100];
+	sprintf(fname, "%s.profileresults.log", conf->ofprefix.c_str());
+	ofstream prof(fname);
+	prof << "dataset: " << conf->datafname << "\t" << "start: " << conf->streefname << endl;
+	prof << "seed: " << conf->randseed << "\t" << "refine: " << (conf->refineStart == true) << endl;
+	prof << "start prec: " << conf->startOptPrec << "\t" << "final prec: " << adap->branchOptPrecision << endl;
+
+#ifdef SINGLE_PRECISION_FLOATS
+	prof << "Single precision\n";
+#else
+	prof << "Double precision\n";
+#endif
+	unsigned s = stopwatch.SplitTime();
+	prof << "Total Runtime: " << s << "\tnumgen: " << gen << "\tFinalScore: " << indiv[bestIndiv].Fitness() << "\n";
+	outman.SetOutputStream(prof);
+	indiv[bestIndiv].modPart.OutputHumanReadableModelReportWithParams();
+
+	prof << "Function\t\tcalls\ttime\tTperC\t%runtime" << endl;
+	ProfIntInt.Report(prof, s);
+	ProfIntTerm.Report(prof, s);
+	ProfTermTerm.Report(prof, s);
+	ProfRescale.Report(prof, s);
+	ProfScoreInt.Report(prof, s);
+	ProfScoreTerm.Report(prof, s);
+	ProfIntDeriv.Report(prof, s);
+	ProfTermDeriv.Report(prof, s);
+	ProfCalcPmat.Report(prof, s);
+	ProfCalcEigen.Report(prof, s);
+	ProfModDeriv.Report(prof, s);
+	ProfNewton.Report(prof, s);
+	ProfEQVectors.Report(prof, s);
+	prof.close();
+	outman.SetOutputStream(cout);
+#endif
+	/*	cout << "intterm calls " << inttermcalls << " time " << inttermtime/(double)(ticspersec.QuadPart) << endl;
+	cout << "termterm calls " << termtermcalls << " time " << termtermtime/(double)(ticspersec.QuadPart) << endl;
+	cout << "rescale calls " << rescalecalls << " time " << rescaletime/(double)(ticspersec.QuadPart) << " numrescales " << numactualrescales << endl;
+	cout << "totalopt calls " << totaloptcalls << " time " << totalopttime/(double)(ticspersec.QuadPart) << endl;
+	cout << "calcderiv calls " << calcderivcalls << " time " << calcderivtime/(double)(ticspersec.QuadPart) << endl;
+	cout << "derivgetclas calls " << derivgetclascalls << " time " << derivgetclastime/(double)(ticspersec.QuadPart) << endl;
+	cout << "derivint calls " << derivintcalls << " time " << derivinttime/(double)(ticspersec.QuadPart) << endl;
+	cout << "derivterm calls " << derivtermcalls << " time " << derivtermtime/(double)(ticspersec.QuadPart) << endl;
+	cout << "modderiv calls " << modderivcalls << " time " << modderivtime/(double)(ticspersec.QuadPart) << endl;
+	cout << "pmat calls " << pmatcalls << " time " << pmattime/(double)(ticspersec.QuadPart) << endl;
+*/	}
+
+//figures out the best individual that has been stored and returns index, optionally summarizes the final trees/models that have been stored
+int Population::EvaluateStoredTrees(bool report){
+	double bestL=-FLT_MAX;
+	int bestRep;
+	if(report){
+		outman.UserMessage("\n#######################################################\n\nCompleted %d replicate search(es) (of %d).", storedTrees.size(), conf->searchReps);
+		if(conf->searchReps > 1 && (storedTrees.size() > 1))
+			outman.UserMessage("\nNOTE: Unless the following output indicates that search replicates found the\n\tsame topology, you should assume that they found different topologies.");
+		outman.UserMessage("Results:");
+		}
+	for(unsigned r=0;r<storedTrees.size();r++){
+		storedTrees[r]->treeStruct->CalcBipartitions(true);	
+		if(storedTrees[r]->Fitness() > bestL){
+			bestL = storedTrees[r]->Fitness();
+			bestRep = r;
+			}
+		}
+	if(report){
+		for(unsigned r=0;r<storedTrees.size();r++){
+			unsigned r2;
+			for(r2=0;r2<r;r2++){
+				if(conf->collapseBranches){
+/*					if(storedTrees[r]->treeStruct->IdenticalTopologyAllowingRerooting(storedTrees[r2]->treeStruct->root)
+						&& storedTrees[r2]->treeStruct->IdenticalTopologyAllowingRerooting(storedTrees[r]->treeStruct->root))
+						break;
+*/		
+					//This is where only collapsing branches upon output gets annoying.  We really want to check
+					//whether the collapsed trees are the same, but we're no longer storing them.  So, generate the collapsed
+					//trees and check.  A set of collapsed trees could be generated in adavance, so doing this every time is 
+					//a bit of extra work
+					Individual tempInd, tempInd2;
+					tempInd.DuplicateIndivWithoutCLAs(storedTrees[r]);
+					tempInd2.DuplicateIndivWithoutCLAs(storedTrees[r2]);
+					int num = 0;
+					tempInd.treeStruct->root->CollapseMinLengthBranches(num);
+					tempInd2.treeStruct->root->CollapseMinLengthBranches(num);
+					tempInd.treeStruct->CalcBipartitions(true);
+					tempInd2.treeStruct->CalcBipartitions(true);
+					if(tempInd.treeStruct->IdenticalTopologyAllowingRerooting(tempInd2.treeStruct->root)
+						&& tempInd2.treeStruct->IdenticalTopologyAllowingRerooting(tempInd.treeStruct->root))
+						break;
+					}
+				else
+					if(storedTrees[r]->treeStruct->IdenticalTopologyAllowingRerooting(storedTrees[r2]->treeStruct->root)) break;
+				}
+			if(r == bestRep && conf->searchReps > 1) 
+				outman.UserMessageNoCR("Replicate %d : %.4f (best)", r+1, storedTrees[r]->Fitness());
+			else 
+				outman.UserMessageNoCR("Replicate %d : %.4f       ", r+1, storedTrees[r]->Fitness());
+			if(r2 < r) 
+				outman.UserMessageNoCR(" (same topology as %d)", r2+1);
+			if((userTermination || timeTermination) && r == storedTrees.size() - 1)
+				outman.UserMessageNoCR(" (TERMINATED PREMATURELY) ", r2+1);
+			outman.UserMessage("");
+			}
+
+		if(conf->searchReps > 1)
+			outman.UserMessage("\nParameter estimates across search replicates:");
+		else 
+			outman.UserMessage("\nParameter estimates:");
+		for(int part = 0;part < storedTrees[0]->modPart.NumModels();part++){
+			if(storedTrees[0]->modPart.NumModels() > 1)
+				outman.UserMessage("\nPartition model subset %d:", part + 1);
+			Model *tree0mod = storedTrees[0]->modPart.GetModel(part);
+			if(tree0mod->GetMutableParameters()->size() > 0){
+				string s;
+				tree0mod->FillModelOrHeaderStringForTable(s, false);
+				outman.UserMessage("       %s", s.c_str());
+				for(unsigned i=0;i<storedTrees.size();i++){
+					storedTrees[i]->modPart.GetModel(part)->FillModelOrHeaderStringForTable(s, true);
+					outman.UserMessage("rep%2d: %s", i+1, s.c_str());
+					}
+				if(storedTrees[0]->modPart.GetModel(part)->GetModSpec()->IsOrientedGap()){
+					outman.UserMessage("\t **ins = proportion of columns that experienced an insertion");
+					outman.UserMessage("\t **del = deletion rate relative to nucleotide substitution rate");
+					}
+				}
+			else{
+				outman.UserMessage("\t Model contains no estimated parameters");
+				}
+			}
+		outman.UserMessageNoCR("\nTreelengths");
+		if(modSpecSet.InferSubsetRates())
+			outman.UserMessageNoCR(" and subset rate multipliers");
+		outman.UserMessage(":");
+		string line;
+		char cStr[100];
+		sprintf(cStr, " %4s ", "TL");
+		line = cStr;
+		if(modSpecSet.InferSubsetRates()){
+			for(int d = 0;d < dataPart->NumSubsets();d++){
+				char oStr[10];
+				sprintf(oStr, "R(%d)", d + 1);
+				sprintf(cStr, " %5s", oStr);
+				line += cStr;
+				}
+			}
+		outman.UserMessage("       %s", line.c_str());
+		for(unsigned i=0;i<storedTrees.size();i++){
+			sprintf(cStr, " %5.3f", storedTrees[i]->treeStruct->Treelength());
+			line = cStr;
+			if(modSpecSet.InferSubsetRates()){
+				for(int d = 0;d < dataPart->NumSubsets();d++){
+					sprintf(cStr, " %5.3f", storedTrees[i]->modPart.SubsetRate(d));
+					line += cStr;
+					}
+				}
+			outman.UserMessage("rep%2d: %s", i+1, line.c_str());
+			}
+		}
+
+	bool firstEstAArmat = true;
+	for(int part = 0;part < storedTrees[0]->modPart.NumModels();part++){
+		const Model *tree0mod = storedTrees[0]->modPart.GetModel(part);
+		const ModelSpecification *modSpec = tree0mod->GetCorrespondingSpec();
+
+		for(unsigned i=0;i<storedTrees.size();i++){
+			Model *treeImod = storedTrees[i]->modPart.GetModel(part);
+			if((modSpec->IsEstimateAAMatrix() || modSpec->IsTwoSerineRateMatrix()) && conf->bootstrapReps == 0){
+				string n = conf->ofprefix.c_str();
+				n += ".AArmatrix.dat";
+				ofstream mat;
+				if(firstEstAArmat){
+					mat.open(n.c_str());
+					treeImod->OutputAminoAcidRMatrixMessage(mat);
+					firstEstAArmat = false;
+					outman.UserMessage("Estimated amino acid rate matrix/matrices saved to %s.AArmatrix.dat", conf->ofprefix.c_str());
+					}
+				else
+					mat.open(n.c_str(), ios::app);
+				treeImod->OutputAminoAcidRMatrixArray(mat, part, i);
+				mat << endl;
+				mat.close();
+				}
+			}
+		}
+
+	return bestRep;
+	}
+
+void Population::ClearStoredTrees(){
+	for(vector<Individual*>::iterator it=storedTrees.begin();it!=storedTrees.end();it++){
+		delete (*it)->treeStruct;
+		(*it)->treeStruct=NULL;
+		delete (*it);
+		}
+	storedTrees.clear();
+	}
+
+void Population::Bootstrap(){
+
+	//if we're not restarting
+	if(conf->restart == false) 
+		currentBootstrapRep = 1;
+
+	for( ;currentBootstrapRep<=conf->bootstrapReps;currentBootstrapRep++){
+#ifdef MAC_FRONTEND
+		NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+		[[MFEInterfaceClient sharedClient] didBeginBootstrapReplicate:rep];
+		[pool release];
+#endif
+		if(conf->restart == false){
+			outman.UserMessage("\nBootstrap reweighting...");
+			//if this is the first rep use the bootstrapseed if one was specified,
+			//or the current seed (which could have come from a specified randseed or could have been generated randomly)
+			if(nextBootstrapSeed == 0){
+				assert(currentBootstrapRep == 1);
+				if(conf->bootstrapSeed > 0)
+					nextBootstrapSeed = conf->bootstrapSeed;
+				else
+					nextBootstrapSeed = rnd.seed();
+				}
+			lastBootstrapSeed = nextBootstrapSeed;
+			nextBootstrapSeed = dataPart->BootstrapReweight(lastBootstrapSeed, conf->resampleProportion);
+			}
+		
+		PerformSearch();
+		//In workphasedivision mode we could have gotten here because PerformSearch returned early after initial
+		//optimization, before final optimzation or after final optimization.  
+		//if(workPhaseTermination && !(currentSearchRep == conf->searchReps && (conf->bootstrapReps == 0 || currentBootstrapRep == conf->bootstrapReps)))
+		if(workPhaseTermination)
+			break;
+		Reset();
+		
+		if(!userTermination && !timeTermination){
+
+#ifdef MAC_FRONTEND
+			pool = [[NSAutoreleasePool alloc] init];
+			[[MFEInterfaceClient sharedClient] didCompleteBoostrapReplicate:rep];
+			[pool release];
+#endif		
+			}
+		else {
+			if(userTermination)
+				outman.UserMessage("abandoning bootstrap rep %d.... terminating\n", currentBootstrapRep);
+			break;
+			}
+		}
+	}
+
+/* OLD VERSION
+void Population::Bootstrap(){
+	
+	data->ReserveOriginalCounts();
+
+	stopwatch.Start();
+	CatchInterrupt();
+
+	for(int rep=1;rep <= (int) conf->bootstrapReps;rep++){
+		lastTopoImprove = lastPrecisionReduction = gen = 0;
+		outman.UserMessage("bootstrap replicate %d (seed %d)", rep, rnd.seed());
+#ifdef MAC_FRONTEND
+		NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+		[[MFEInterfaceClient sharedClient] didBeginBootstrapReplicate:rep];
+		[pool release];
+#endif				
+		data->BootstrapReweight();
+		
+		SeedPopulationWithStartingTree();
+		Run();
+		
+		if(userTermination == false){
+			adap->branchOptPrecision = adap->startOptPrecision;
+			FinishBootstrapRep(rep);
+			outman.UserMessage("finished with bootstrap rep %d\n", rep);
+#ifdef MAC_FRONTEND
+			pool = [[NSAutoreleasePool alloc] init];
+			[[MFEInterfaceClient sharedClient] didCompleteBoostrapReplicate:rep];
+			[pool release];
+#endif		
+			}
+		else {
+			outman.UserMessage("abandoning bootstrap rep %d ....terminating", rep);
+			break;
+			}
+		}
+	FinalizeOutputStreams();
+	}
+*/
+
+//this function manages multiple search replicates, setting up the population
+//and then calling Run().  It can be called either directly from main(), or 
+//from Bootstrap()
+void Population::PerformSearch(){
+	if(conf->restart == false)
+		currentSearchRep = 1;
+	else{
+		outman.UserMessage("\nRestarting from checkpoint...");
+		if(finishedRep == true){
+			//if we've restarted but the last checkpoint written apparently represents 
+			//the state of the population immediately after the completion of a replicate
+			currentSearchRep++;
+			if(currentSearchRep > conf->searchReps && (conf->bootstrapReps == 0 || currentBootstrapRep == conf->bootstrapReps)){
+				outman.UserMessage("The checkpoint loaded indicates that this run already completed.\nTo start a new run set restart to 0 and change the output\nfile prefix (ofprefix).");
+				restartedAfterTermination = true;
+				return;
+				}
+			else{//we need to initialize the output here, while the population still knows that this was a restart (before calling Reset)
+				InitializeOutputStreams();
+				Reset();
+				}
+			}
+		else
+			InitializeOutputStreams();
+		}
+
+	for(;currentSearchRep<=conf->searchReps;currentSearchRep++){
+		string s;
+		if(conf->restart == false){
+			//this will reset the rep_fraction_done at the start of each rep
+			UpdateFractionDone(0);
+			if(currentSearchRep > 1){
+				Reset();
+				//this just changes what the rng has stored as the init seed ix0, for output purposes
+				rnd.set_seed(rnd.seed());
+				}
+			}
+		
+		//ensure that the user can ctrl-c kill the program during creation of each stepwise addition tree
+		TurnOffSignalCatching();
+
+		GetRepNums(s);
+
+		if(conf->restart == false){
+			//the fraction done is set to 1% here, indicating the this rep is ready to go
+			//if we restarted, the fraction should already have been set when reading the state files
+			if(s.length() > 0) 
+				outman.UserMessage("\n>>>%s<<<", s.c_str());
+			SeedPopulationWithStartingTree(currentSearchRep);
+			//can't initialize output until after the pop is seeded, unless restarting (which happens above)
+			InitializeOutputStreams();
+			//write a checkpoint, since the refinement (and maybe making a stepwise tree) could have taken a good while
+#ifndef BOINC
+			//non-BOINC checkpointing
+			if(ShouldCheckpoint(false) == true)
+#endif
+				WriteStateFiles();
+			if(conf->workPhaseDivision){
+				WriteStateFiles();
+				//first workphasedivision exit point
+				outman.UserMessage("\nNOTE: Terminating run after initial optimization and writing");
+				outman.UserMessage("checkpoint because workphasedivision configuration entry was set.");
+				workPhaseTermination = true;
+				UpdateFractionDone(4);
+				break;
+				}
+			UpdateFractionDone(1);
+			}
+		else{
+			//in this case the progress should have been read from checkpoint and will maintain that value going forward
+			adap->SetChangeableVariablesFromConfAfterReadingCheckpoint(conf);
+			if(currentSearchRep > conf->searchReps) 
+				throw ErrorException("rep number in checkpoint (%d) is larger than total rep specified in config (%d)", currentSearchRep, conf->searchReps);
+			outman.UserMessage("%s generation %d, seed %d, best lnL %.3f", s.c_str(), gen, rnd.init_seed(), indiv[bestIndiv].Fitness());
+			}
+
+#ifndef BOINC
+		//Start catching Ctrl-C's
+		TurnOnSignalCatching();
+#endif				
+		if(!conf->scoreOnly)
+			Run();
+
+		//for most purposes, these two types of termination are premature and treated identically
+		//gen termination is treated as normal termination besides some warnings
+		//bool prematureTermination = (userTermination || timeTermination);
+		bool prematureTermination = conf->checkpoint ? genTermination : (genTermination | timeTermination || userTermination);
+
+		//if we're checkpointing and terminated prematurely just bail without doing anything else
+		if(conf->checkpoint && (userTermination || timeTermination || workPhaseTermination)){
+#ifndef BOINC
+			if(!workPhaseTermination){
+				outman.UserMessage("\nNOTE: A CHECKPOINTED RUN (writecheckpoints = 1) WAS PREMATURELY");
+				outman.UserMessage("TERMINATED.  OUTPUT FILES (tree files, etc.) WILL NOT BE" ); 
+				outman.UserMessage("FINALIZED SO THAT THE RUN CAN BE RESTARTED WHERE IT LEFT OFF");
+				outman.UserMessage("(set restart = 1 in the config file).  IF YOU WANT TO USE THE");
+				outman.UserMessage("PARTIAL OUTPUT FILES WITHOUT RESTARTING YOU WILL NEED TO MANUALLY");
+				outman.UserMessage("ADD \"end;\" TO THE TREE FILES.\n");
+				}
+#endif
+			UpdateFractionDone(4);
+			break;
+			}
+
+		outman.UserMessage("");
+		if(userTermination)
+			outman.UserMessage("MODEL REPORT - SEARCH TERMINATED BY USER");
+		else if(timeTermination)
+			outman.UserMessage("MODEL REPORT - SEARCH TERMINATED AFTER REACHING TIME LIMIT");
+		else if(genTermination)
+			outman.UserMessage("MODEL REPORT - SEARCH TERMINATED AFTER REACHING GENERATION LIMIT");
+		else
+			outman.UserMessage("MODEL REPORT - Parameter values are FINAL");
+		indiv[bestIndiv].modPart.OutputHumanReadableModelReportWithParams();
+
+		//this rep is over
+		//11/28/09 We will now always store the final individual in the stored trees array, 
+		//even if prematureTerm
+		if(Tree::outgroup != NULL) 
+			OutgroupRoot(&indiv[bestIndiv], bestIndiv);
+		//this individual will be stored in the storedTrees array until population deletes it much later,
+		Individual *repResult = new Individual(&indiv[bestIndiv]);
+		//Note that the collapsed individual is intentionally not stored here.  It will be re-collapsed on
+		//output to file, and the collapsing here is just for this message
+		if(conf->collapseBranches){
+			Individual repResultColl(&indiv[bestIndiv]);
+			int numCollapsed = 0;
+			repResultColl.treeStruct->root->CollapseMinLengthBranches(numCollapsed);
+			outman.UserMessage("NOTE: Collapsing of minimum length branches was requested (collapsebranches = 1)");\
+			if(numCollapsed == 0)
+				outman.UserMessage("    No branches were short enough to be collapsed.\n");
+			else 
+				outman.UserMessage("    %d branches were collapsed.\n", numCollapsed);
+			if(repResult->treeStruct->constraints.empty() == false){
+				for(vector<Constraint>::iterator con=repResult->treeStruct->constraints.begin();con!=repResult->treeStruct->constraints.end();con++){
+					if(con->IsPositive()){
+						outman.UserMessage("\nNOTE: If collapsing of minimum length branches is requested (collapsebranches = 1) in a run with\n\ta positive constraint, it is possible for a constrained branch itself to be collapsed.\n\tIf you care, be careful to check whether this has happened or turn off branch collapsing.\n");
+						break;
+						}
+					}
+				}
+			}
+		storedTrees.push_back(repResult);
+
+		//output site likelihoods if requested
+		if(conf->outputSitelikelihoods > 0){
+			outman.UserMessage("Saving site likelihoods to file %s.sitelikes.log ...", conf->ofprefix.c_str());
+			for( int set = 0;set < dataPart->NumSubsets();set++){ 
+				if( dataPart->GetSubset(set)->DidUseDefaultWeightsets() == true)
+					outman.UserMessage("WARNING: Site likelihoods are being output when wtset %s is in effect.\n Sites with weight > 1 will only be output once!", dataPart->GetSubset(set)->WeightsetName().c_str());
+				}
+			
+			if( (userTermination || timeTermination || genTermination) ){
+				outman.UserMessage("WARNING: Site likelihoods being output on prematurely terminated search ...");
+				}
+
+			//This has to work somewhat differently for partitioning.  As far as the tree functions know we will always
+			//be in append mode for the sitelike output (negative sitelike value).  The pop will have to nuke any 
+			//existing file here the first time through and put in the header
+			indiv[bestIndiv].treeStruct->sitelikeLevel = -(int) conf->outputSitelikelihoods;
+
+			ofstream ordered;
+			indiv[bestIndiv].treeStruct->ofprefix = conf->ofprefix;
+			string oname = indiv[bestIndiv].treeStruct->ofprefix + ".sitelikes.log";
+			if(currentSearchRep == 1){
+				ordered.open(oname.c_str());
+				ordered << "Tree\t-lnL\tSite\t-lnL";
+				if(conf->outputSitelikelihoods > 1) 
+					ordered << "\tunder1\tunder2";
+				ordered << "\n";
+				ordered.close();
+				}
+	
+			indiv[bestIndiv].treeStruct->Score();
+			ordered.open(oname.c_str(), ios::app);
+			ordered.precision(12);
+			ordered << currentSearchRep << "\t" << -indiv[bestIndiv].treeStruct->lnL << "\n";
+			ordered.close();
+			}
+
+		//warn if the normal auto-term conditions weren't used
+		if(userTermination || timeTermination || genTermination){
+			if(s.length() > 0 && (userTermination || timeTermination))
+				outman.UserMessage(">>>Terminated %s<<<", s.c_str());
+			outman.UserMessage("%s", TerminationWarningMessage().c_str());
+			}
+		else{
+			//I think that this should only be reported here if there is > 1 search rep per boot rep, since it should really be noting that
+			//a given rep has finished, and the overall boot rep doesn't really finish until after the summary across search reps
+			if(s.length() > 0 && (conf->bootstrapReps == 0 || (conf->bootstrapReps > 0 && conf->searchReps > 1)))
+				outman.UserMessage(">>>Completed %s<<<", s.c_str());
+			}
+
+		int best=0;
+		//If this is the last search of a run, bootstrap rep, or it was killed prematurely
+		//Note that EvaluateStoredTrees does some summary output for the model estimates from those trees
+		if((currentSearchRep == conf->searchReps) || prematureTermination){
+			if(storedTrees.size() > 0){
+				best=EvaluateStoredTrees(true);
+				//recombine final trees
+	/*			if(total_size > 2){
+					for(int i=0;i<storedTrees.size();i++)
+						if(storedTrees[i]->treeStruct->root->claIndexDown == -1)
+							storedTrees[i]->treeStruct->AssignCLAsFromMaster();
+					for(int i=0;i<this->total_size;i++){
+						//only the best indiv has clas assigned at this point
+						if(i != bestIndiv) indiv[i].CopySecByRearrangingNodesOfFirst(indiv[i].treeStruct, storedTrees[best], false);
+						else indiv[i].CopySecByRearrangingNodesOfFirst(indiv[i].treeStruct, storedTrees[best], true);
+						}
+					int holdover = 2;
+					for(int rounds=0;rounds<10;rounds++){
+						for(int i=holdover;i<total_size;i++){
+							int partner = rnd.random_int(storedTrees.size());
+							indiv[i].CrossOverWith(*storedTrees[partner], 0.01);
+							}
+						this->CalcAverageFitness();
+						for(int i=holdover;i<total_size;i++){
+							if(indiv[i].Fitness() > indiv[0].Fitness()){
+								indiv[1].CopySecByRearrangingNodesOfFirst(indiv[1].treeStruct, &indiv[0], true);
+								indiv[0].CopySecByRearrangingNodesOfFirst(indiv[0].treeStruct, &indiv[i], true);
+								}
+							else if(indiv[i].Fitness() > indiv[1].Fitness()){
+								indiv[1].CopySecByRearrangingNodesOfFirst(indiv[1].treeStruct, &indiv[i], true);
+								}
+							}
+						for(int i=holdover;i<total_size;i++){
+							int parent = rnd.random_int(holdover);
+							indiv[i].CopySecByRearrangingNodesOfFirst(indiv[i].treeStruct, &indiv[parent], true);
+							}
+						this->CalcAverageFitness();
+						}
+					}
+				string s = "recom.";
+				s += besttreefile;
+				this->WriteTreeFile(s.c_str());
+				Individual *repResult = new Individual(&indiv[0]);
+				storedTrees.push_back(repResult);
+				outman.UserMessage("Best topology created by recombination: %f", indiv[0].Fitness());
+				
+	*/			}
+			}
+
+		//write the best trees from all completed reps:
+		//at the end of each rep
+		//at the end of all reps
+		//if termination was premature and we're told to write in that case (the premature tree will be included)
+		if( ( (! prematureTermination) && (all_best_output & WRITE_REP_TERM)) ||
+			( (! prematureTermination) && (currentSearchRep == conf->searchReps) && (all_best_output & WRITE_REPSET_TERM)) ||
+			( (prematureTermination) && (storedTrees.size() > 1) && (all_best_output & WRITE_PREMATURE))){
+			if(storedTrees.size() > 0){
+				if(prematureTermination || currentSearchRep == conf->searchReps)//message only if last
+					outman.UserMessage("\nSaving final trees from all search reps to %s.all.tre", besttreefile.c_str());
+				WriteStoredTrees(besttreefile.c_str());
+				}
+			}
+
+		//write the best overall tree:
+		//at the end of each rep
+		//at the end of all reps
+		////if termination was premature and we're told to write in that case (the premature tree will be written if it is best)
+		if( ( (! prematureTermination) && (best_output & WRITE_REP_TERM)) ||
+			( (! prematureTermination) && (currentSearchRep == conf->searchReps) && (best_output & WRITE_REPSET_TERM)) ||
+			( (prematureTermination) && (best_output & WRITE_PREMATURE))){
+			//the first two options here write trees from the storedTrees array, the last writes the best from the current population
+			outman.UserMessage("\nSaving final tree from best search rep (#%d) to %s.tre", best + 1, besttreefile.c_str());
+			if(conf->searchReps > 1 && storedTrees.size() > 0){
+				WriteTreeFile(besttreefile.c_str(), best, conf->collapseBranches);
+				}
+			else if(storedTrees.size() == 1)
+				WriteTreeFile(besttreefile.c_str(), 0, conf->collapseBranches);
+			else
+				WriteTreeFile(besttreefile.c_str(), -1, conf->collapseBranches);
+			}
+		
+		if(conf->bootstrapReps > 0){
+			//write best boot tree if:
+			//end of single search rep of many, and we're supposed to (not normal)
+			//end of search rep set or single search
+			//premature termination and we're told to
+			//premature termination and we've already stored a tree (due to change, even a single termed run will now be in here)
+			if( ( (! prematureTermination) && (bootlog_output & WRITE_REP_TERM)) ||
+				( (! prematureTermination) && (currentSearchRep == conf->searchReps) && (bootlog_output & WRITE_REPSET_TERM)) ||
+				( (prematureTermination) && (bootlog_output & WRITE_PREMATURE)) ||
+				( (prematureTermination) && storedTrees.size() > 0)){
+				if(conf->searchReps > 1 && storedTrees.size() > 0){
+					//we're doing multiple searches per boot rep, and have successfully completed at least one replicate
+					//(although the present replicate could have been prematurely terminated)
+					char temp_buf[100];
+					char suffix[100];
+					sprintf(suffix, "boot.tre");
+					DetermineFilename(bootlog_output, temp_buf, suffix);
+					outman.UserMessage("\nSaving tree from best search rep (#%d) to bootstrap file %s\n", best+1, temp_buf);
+					if(prematureTermination && best == storedTrees.size() - 1)
+						outman.UserMessage("WARNING: Tree from prematurely terminated search saved to bootstrap file");
+					FinishBootstrapRep(storedTrees[best], currentBootstrapRep);
+					}
+
+				else if(storedTrees.size() == 1){
+					//We just successfully completed a one-search-rep bootstrap replicate 
+					FinishBootstrapRep(storedTrees[0], currentBootstrapRep);	
+					char temp_buf[100];
+					char suffix[100];
+					sprintf(suffix, "boot.tre");
+					DetermineFilename(bootlog_output, temp_buf, suffix);
+					outman.UserMessage("\nSaving best tree to bootstrap file %s\n", temp_buf);
+					if(prematureTermination)
+						outman.UserMessage("WARNING: Tree from prematurely terminated search saved to bootstrap file");
+					}
+				else //This rep was prematurely killed, but we're supposed to write it
+					FinishBootstrapRep(&indiv[bestIndiv], currentBootstrapRep);
+				if(!prematureTermination){
+					outman.UserMessage(">>>Completed Bootstrap rep %d<<<", currentBootstrapRep);
+					}
+				}
+			else{ 
+				if(prematureTermination && !(bootlog_output & WRITE_PREMATURE)) 
+					outman.UserMessage("Not saving search rep to bootstrap file due to early termination");
+				}
+			}
+
+		if(conf->inferInternalStateProbs == true){
+			//don't infer internals states unless at least one rep successfully completed
+			if((prematureTermination == false && currentSearchRep == conf->searchReps) || (prematureTermination && storedTrees.size() > 0)){
+				//this is important to ensure that there are enough free clas for a temp set to be allocated,
+				//since recycling won't happen in this usage (it could if implemented, but I don't see the benefit)
+				for(int i = 0;i < total_size;i++){
+					if(indiv[i].treeStruct != NULL)
+						indiv[i].treeStruct->MakeAllNodesDirty();
+					if(newindiv[i].treeStruct != NULL)
+						newindiv[i].treeStruct->MakeAllNodesDirty();
+					}
+				if(storedTrees.size() > 0){//careful here, the trees in the storedTrees array don't have clas assigned
+					outman.UserMessage("Inferring internal state probabilities on best tree... saving to file %s.internalstates.log\n", conf->ofprefix.c_str());
+					Individual *theInd;
+					Individual tempInd;
+					if(Tree::outgroup != NULL){
+						tempInd.DuplicateIndivWithoutCLAs(storedTrees[best]);
+						OutgroupRoot(&tempInd, -1);
+						theInd = &tempInd;
+						}
+					else
+						theInd = storedTrees[best];
+					//InferAllInternalStateProbs will deal with assigning clas, since neither the tree in storedTrees nor the potentially temp tree have them
+					theInd->treeStruct->InferAllInternalStateProbs(conf->ofprefix.c_str());
+					if(prematureTermination && best == storedTrees.size() - 1)
+						outman.UserMessage("WARNING: Internal states inferred on tree from prematurely terminated search\n");
+					}
+				}
+			else if(prematureTermination){
+				outman.UserMessage(">>>Internal state probabilities not inferred due to premature termination<<<\n");
+				}
+			}
+		//finalize anything that needs it at rep end
+		FinalizeOutputStreams(0);
+		//finalize anything that needs it at the end of the repset
+		if(currentSearchRep == conf->searchReps || prematureTermination) {
+			FinalizeOutputStreams(1);
+			outman.UserMessage("#######################################################");
+			}
+
+		if(userTermination == true || timeTermination == true) 
+			break;
+
+#ifndef BOINC
+		if(ShouldCheckpoint(false) == true || conf->workPhaseDivision )
+#endif
+			//write a checkpoint that will indicate that the rep is done and results have been written to file
+			//the gen will be UINT_MAX, as it is after a rep has terminated, which will tell the function that reads
+			//the checkpoint to set finishedrep = true.  This automatically happens in the BOINC case
+			WriteStateFiles();
+
+		if(conf->workPhaseDivision && !(currentSearchRep == conf->searchReps && (conf->bootstrapReps == 0 || currentBootstrapRep == conf->bootstrapReps))){
+			//third workphasedivision exit point - if this is the end of the whole run, don't do this.
+			outman.UserMessage("\nNOTE: Terminating run after final optimization and writing checkpoint");
+			outman.UserMessage("because workphasedivision configuration entry was set.");
+			workPhaseTermination = true;
+			UpdateFractionDone(4);
+			break;
+			}
+		//this needs to be set here so that the population is reset at the top of this loop before the next rep
+		conf->restart = false;
+		}
+
+	ClearStoredTrees();
+	}
+
+void Population::OptimizeInputAndWriteSitelikelihoods(){
+	log_output = fate_output = swaplog_output = treelog_output = problog_output = Population::DONT_OUTPUT;
+	InitializeOutputStreams();
+
+	//find out how many trees we have
+	GarliReader & reader = GarliReader::GetInstance();
+	const NxsTreesBlock *treesblock = reader.GetTreesBlock(reader.GetTaxaBlock(0), reader.GetNumTreesBlocks(reader.GetTaxaBlock(0)) - 1);
+	if(treesblock == NULL || !strcmp(conf->streefname.c_str(), "random") || !strcmp(conf->streefname.c_str(), "stepwise"))
+		throw ErrorException("You must specify a nexus treefile to use this runmode.");
+	int numTrees = treesblock->GetNumTrees();
+
+	string oname = conf->ofprefix + ".sitelikes.log";
+	ofstream ordered;
+	ordered.open(oname.c_str());
+	ordered << "Tree\t-lnL\tSite\t-lnL\n";
+	ordered.close();
+
+	bestIndiv = 0;
+	conf->searchReps = numTrees;
+	//loop over the trees
+	for(int t = 1;t <= numTrees;t++){
+		currentSearchRep = t;
+		if(!conf->scoreOnly){
+			outman.UserMessage("Optimizing tree %d ...", t);
+			SeedPopulationWithStartingTree(t);
+			bestIndiv = 0;
+			BetterFinalOptimization();
+			}
+		else
+			outman.UserMessage("Scoring tree %d ...", t);
+
+		outman.UserMessage("Writing site likelihoods for tree %d ...", t);
+		indiv[0].treeStruct->sitelikeLevel = - (max((int)conf->outputSitelikelihoods, 1));
+		indiv[0].treeStruct->ofprefix = conf->ofprefix;
+		indiv[0].treeStruct->Score();
+		
+		ordered.open(oname.c_str(), ios::app);
+		ordered.precision(10);
+		ordered << t << "\t" << -indiv[0].treeStruct->lnL << "\n";
+		ordered.close();
+
+		Individual *repResult = new Individual(&indiv[0]);
+		storedTrees.push_back(repResult);
+		Reset();
+		}
+	bool coll = conf->collapseBranches;
+	conf->collapseBranches = false;
+	EvaluateStoredTrees(true);
+	if(coll)
+		outman.UserMessage("\nNOTE: collapsebranches setting ignored when writing and comparing optimized trees...");
+	outman.UserMessage("\nWriting optimized trees and models to %s.all.tre", besttreefile.c_str());
+	WriteStoredTrees(besttreefile.c_str());
+	FinalizeOutputStreams(0);
+	FinalizeOutputStreams(1);
+	FinalizeOutputStreams(2);
+	}
+
+void Population::OptimizeInputAndWriteSitelikelihoodsAndTryRootings(){
+	log_output = fate_output = swaplog_output = treelog_output = problog_output = Population::DONT_OUTPUT;
+	//log_output = fate_output = swaplog_output = problog_output = Population::DONT_OUTPUT;
+	InitializeOutputStreams();	
+	//assert(Tree::someOrientedGap);
+	//find out how many trees we have
+	GarliReader & reader = GarliReader::GetInstance();
+	const NxsTreesBlock *treesblock = reader.GetTreesBlock(reader.GetTaxaBlock(0), reader.GetNumTreesBlocks(reader.GetTaxaBlock(0)) - 1);
+	if(treesblock == NULL || treesblock->GetNumTrees() > 1)
+		throw ErrorException("You must specify a treefile with exactly one tree to use this runmode.");
+//	int numTrees = treesblock->GetNumTrees();
+//	assert(numTrees == 1);
+
+	bestIndiv = 0;
+
+	//start the sitelike file
+	string oname = conf->ofprefix + ".sitelikes.log";
+	ofstream ordered;
+	ordered.open(oname.c_str());
+	ordered << "Tree\t-lnL\tSite\t-lnL\n";
+	ordered.close();
+
+	Tree::useOptBoundedForBlen = true;
+
+	currentSearchRep = 1;
+	outman.UserMessage("Optimizing tree %d ...", 1);
+
+	conf->refineStart = false;
+	SeedPopulationWithStartingTree(currentSearchRep);
+	bestIndiv = 0;
+
+	assert(indiv[0].treeStruct->dummyRoot);
+	//the number of branches on which the root could be attached
+	conf->searchReps = (dataPart->NTax() - 1) * 2 - 3;
+
+	double initIns = 0.05, initDel = 0.1;
+
+	for(int m = 0;m < indiv[0].modPart.NumModels();m++){
+		if(indiv[0].modPart.GetModel(m)->IsOrientedGap()){
+			initIns = indiv[0].modPart.GetModel(m)->InsertRate();
+			initDel = indiv[0].modPart.GetModel(m)->DeleteRate();
+			}
+		}
+#ifdef OPT_BOUNDED_LOG
+	char name[50];
+	sprintf(name, "%s.optbounded.log", conf->ofprefix.c_str());
+	ofstream log(name);
+	log.close();
+	indiv[0].treeStruct->ofprefix = conf->ofprefix;
+	indiv[1].treeStruct->ofprefix = conf->ofprefix;
+#endif
+	BetterFinalOptimization();
+	//this will stick the current tree into the treelog
+	conf->outputTreelog = true;
+	InitializeOutputStreams();
+
+	outman.UserMessage("Writing site likelihoods for tree %d ...", 1);
+	indiv[0].treeStruct->sitelikeLevel = -1;
+	indiv[0].treeStruct->ofprefix = conf->ofprefix;
+	indiv[0].treeStruct->Score();
+	
+	//put the score of the initial indiv in the file
+	ordered.open(oname.c_str(), ios::app);
+	ordered.precision(10);
+	ordered << "0\t" << -indiv[0].treeStruct->lnL << "\t";
+	indiv[0].treeStruct->root->MakeNewick(treeString, false, true, false);
+	ordered << treeString << "\n";
+	ordered.close();
+
+	//store the indiv 
+	Individual *repResult = new Individual(&indiv[0]);
+	storedTrees.push_back(repResult);
+
+	//return the rates to initial vals to have them reopt each time
+		bool resetInsDel = false;
+	if(resetInsDel){
+		for(int m = 0;m < indiv[0].modPart.NumModels();m++){
+			if(indiv[0].modPart.GetModel(m)->IsOrientedGap()){
+				indiv[0].modPart.GetModel(m)->SetInsertRate(0, initIns);
+				indiv[0].modPart.GetModel(m)->SetDeleteRate(0, initDel);
+				indiv[0].treeStruct->MakeAllNodesDirty();
+				}
+			}
+		}
+	else
+		indiv[0].treeStruct->MakeAllNodesDirty();
+	indiv[0].CalcFitness(0);
+
+	//copy the tree and model into indiv[1]
+	outman.UserMessage("Rooting at nodes across tree...");
+	Tree *indiv1Tree = indiv[1].treeStruct;
+	indiv[1].CopySecByRearrangingNodesOfFirst(indiv1Tree, &indiv[0]);
+
+	//get ready to swap on indiv[1]
+	indiv1Tree->GatherValidReconnectionNodes(99999, indiv1Tree->dummyRoot, NULL);
+	indiv1Tree->sprRang.SortByDist();
+
+	int tnum = 2;
+
+	for(listIt broken = indiv1Tree->sprRang.begin();broken != indiv1Tree->sprRang.end();broken++){
+		//try a reattachment point for the dummy root taxon
+		indiv1Tree->SPRMutate(indiv1Tree->dataPart->NTax(), &(*broken), 0.01, 0);
+		//optimize the result
+		bestIndiv = 1;
+		indiv[bestIndiv].CalcFitness(0);
+		bestFitness = indiv[bestIndiv].Fitness();
+
+		//this will make the various trees have different names when they are appended to the treelog
+		//in BetterFinalOpt
+		gen = tnum;
+		//AppendTreeToTreeLog(0, 1);
+		
+		BetterFinalOptimization();
+
+		outman.UserMessage("%d\tnode\t%d\tlnL\t%f", tnum, (*broken).nodeNum, indiv1Tree->lnL);
+
+		//output the sitelikes
+		indiv1Tree->ofprefix = conf->ofprefix;
+		indiv1Tree->sitelikeLevel = -1;
+		indiv1Tree->Score();
+
+		//add the total score and the tree
+		ordered.open(oname.c_str(), ios::app);
+		ordered.precision(10);
+		ordered << tnum << "\t" << -indiv1Tree->lnL << "\t";
+		indiv[1].treeStruct->root->MakeNewick(treeString, false, true, false);
+		ordered << treeString << "\n";
+		ordered.close();
+
+		//store the indiv and write the tree to file
+		repResult = new Individual(&indiv[1]);
+		storedTrees.push_back(repResult);
+
+		indiv[1].CopySecByRearrangingNodesOfFirst(indiv1Tree, &indiv[0], true);
+		tnum++;
+		}
+	bool coll = conf->collapseBranches;
+	conf->collapseBranches = false;
+	EvaluateStoredTrees(true);
+	if(coll)
+		outman.UserMessage("\nNOTE: collapsebranches setting ignored when writing and comparing optimized trees...");
+	outman.UserMessage("\nWriting optimized trees and models to %s.all.tre", besttreefile.c_str());
+	WriteStoredTrees(besttreefile.c_str());
+	FinalizeOutputStreams(0);
+	FinalizeOutputStreams(1);
+	FinalizeOutputStreams(2);
+	}
+
+void Population::VariableStartingTreeOptimization(bool reducing){
+	currentSearchRep = 1;
+	SeedPopulationWithStartingTree(currentSearchRep);
+	InitializeOutputStreams();
+	
+	string filename = conf->ofprefix + ".var.log";
+	ofstream out(filename.c_str());
+	out.precision(10);
+
+	filename = conf->ofprefix + ".randblens.tre";
+	ofstream randTrees(filename.c_str());
+	dataPart->BeginNexusTreesBlock(randTrees);
+
+	filename = conf->ofprefix + ".optblens.tre";
+	ofstream optTrees(filename.c_str());
+	dataPart->BeginNexusTreesBlock(optTrees);
+
+	typedef vector<double> doubvec;
+	//this is a vector of vectors, with each entry in the higher level vector being a vector
+	//with all of the final rep scores for a given precision 
+	vector<doubvec> finalScores;
+
+	typedef vector<int> intvec;
+	//vector of vectors, number of passes per rep per prec
+	vector<intvec> numPasses;
+
+	vector<intvec> numDerivCalcs;
+
+	//a triple vector, with the branch lengths for each branch, rep and prec
+	typedef vector<doubvec> doubdoubvec;
+	vector<doubdoubvec> allBlens;
+
+	vector<double> prec;
+
+	//get the precision values to use from the arbitrarystring entry in the config file
+	stringstream s;
+	s.str(conf->arbitraryString);
+	string p;
+	while(!s.eof()){
+		s >> p;
+		double x = atof(p.c_str());
+		prec.push_back(x);
+		}
+
+	int numReps = conf->searchReps;
+	double prec1;
+	int numNodes = indiv[0].treeStruct->getNumNodesTotal();
+	for(int rep = 0;rep < numReps;rep++){
+		//for each rep, rerandomize the branch lengths and output the tree
+		indiv[0].treeStruct->RandomizeBranchLengthsExponential(conf->gammaShapeBrlen);
+		indiv[0].treeStruct->root->MakeNewick(treeString, false, true, false);
+		randTrees << "tree r" << rep << " = [&U] " << treeString << ";\n";
+		//store this randomization
+		indiv[1].CopySecByRearrangingNodesOfFirst(indiv[1].treeStruct, &indiv[0], true);
+
+		indiv[0].SetDirty();
+		indiv[0].CalcFitness(0);
+		double imp = 999.9;
+		double prevScore = indiv[0].Fitness();
+//		outman.UserMessage("%f\t%f\t", prec[p], indiv[0].Fitness());
+
+		for(int precNum=0;precNum < prec.size() && (!reducing || (reducing && precNum < 1)) ;precNum++){
+			prec1 = prec[precNum];
+
+			int pass=0;
+			prevScore = indiv[0].Fitness();
+			outman.UserMessage("%f\t%d", indiv[0].Fitness(), pass);
+			do{
+				if(reducing) prec1 = prec[min(pass, (int)prec.size()-1)];
+				indiv[0].treeStruct->OptimizeAllBranches(prec1);
+				indiv[0].SetDirty();
+				indiv[0].CalcFitness(0);
+//				indiv[0].treeStruct->OptimizeTreeScale(prec1);
+
+				imp = indiv[0].Fitness() - prevScore;
+				prevScore = indiv[0].Fitness();
+				outman.UserMessage("%f\t%f\t%d", indiv[0].Fitness(), prec1, optCalcs);
+				pass++;
+				}while(imp > prec1 || pass < prec.size());
+			outman.UserMessage("%f\t%d\n", indiv[0].Fitness(), pass);
+			if(rep == 0){
+				doubvec scoreTemp;
+				scoreTemp.push_back(indiv[0].Fitness());
+				finalScores.push_back(scoreTemp);
+				intvec passTemp;
+				passTemp.push_back(pass);
+				numPasses.push_back(passTemp);
+				intvec calcsTemp;
+				calcsTemp.push_back(optCalcs);
+				numDerivCalcs.push_back(calcsTemp);
+				doubvec tempBlens;
+				doubdoubvec tempBlens2;
+				for(int b=1;b<numNodes;b++) tempBlens.push_back(indiv[0].treeStruct->allNodes[b]->dlen);
+				tempBlens2.push_back(tempBlens);
+				allBlens.push_back(tempBlens2);
+				}
+			else{
+				finalScores[precNum].push_back(indiv[0].Fitness());
+				numPasses[precNum].push_back(pass);
+				numDerivCalcs[precNum].push_back(optCalcs);
+				doubvec tempBlens;
+				for(int b=1;b<numNodes;b++) tempBlens.push_back(indiv[0].treeStruct->allNodes[b]->dlen);
+				allBlens[precNum].push_back(tempBlens);
+				}
+			indiv[0].treeStruct->root->MakeNewick(treeString, false, true, false);
+			optTrees << "tree p" << prec1 << ".r" << rep << " = [&U] " << treeString << ";\n";
+			//restore the randomization
+			indiv[0].CopySecByRearrangingNodesOfFirst(indiv[0].treeStruct, &indiv[1], true);
+			indiv[0].SetDirty();
+			indiv[0].CalcFitness(0);
+	//		scoresThisPrec.push_back(indiv[0].Fitness());
+//			passesThisPrec.push_back(pass);
+//			derivCalcsThisPrec.push_back(optCalcs);
+//			for(int b=1;b<numNodes;b++) blensThisRep.push_back(indiv[0].treeStruct->allNodes[b]->dlen);
+//			blensThisPrec.push_back(blensThisRep);
+//			blensThisRep.clear();
+			optCalcs = 0;
+			//indiv[0].CopySecByRearrangingNodesOfFirst(indiv[0].treeStruct, &tempIndiv, true);
+			}
+//		finalScores.push_back(scoresThisPrec);
+//		numPasses.push_back(passesThisPrec);
+//		numDerivCalcs.push_back(derivCalcsThisPrec);
+//		allBlens.push_back(blensThisPrec);
+//		AppendTreeToTreeLog(0, 0);
+//		scoresThisPrec.clear();
+//		passesThisPrec.clear();
+//		derivCalcsThisPrec.clear();
+//		blensThisPrec.clear();
+//		out << prec[p] << "\t";
+		}
+//	out << "\n";
+	for(int precNum = 0;precNum < finalScores.size();precNum++){
+		for(int rep = 0;rep < finalScores[precNum].size();rep++){
+//			for(vector<doubvec>::iterator it = finalScores.begin();it != scores.end();it++){
+			
+			out << prec[precNum] << "\t" << rep << "\t" << finalScores[precNum][rep] << "\t" << numPasses[precNum][rep] << "\t" << numDerivCalcs[precNum][rep] << endl;
+
+/*			for(vector<doubvec>::iterator it = scores.begin();it != scores.end();it++){
+				out << (*it)[rep] << "\t";
+				}
+			for(vector<intvec>::iterator it = passes.begin();it != passes.end();it++){
+				out << (*it)[rep] << "\t";
+				}
+			out << "\n";
+*/			}
+		}
+
+
+	ofstream blens;
+	for(int precNum = 0;precNum < finalScores.size();precNum++){
+		char filename[100];
+		if(reducing)
+			sprintf(filename, "blens.%s.final.log", conf->ofprefix.c_str());
+		else
+			sprintf(filename, "blens.%s.%f.log", conf->ofprefix.c_str(), prec[precNum]);
+		blens.open(filename);
+		blens << "branch#\tfullyOpt\treps...\n";
+		//careful here - the number of nodes includes the root, which has no blen and wasn't put into the 
+		//blen vector. So, the indexing is [actualNodeNum - 1]
+		for(int bnum=0;bnum<numNodes - 1;bnum++){
+			blens << bnum+1 << "\t";
+			//toss in the blens for one of the reps for the final prec, which we assume will be fully optimal
+			blens << allBlens[allBlens.size()-1][0][bnum] << "\t";
+			for(int rep = 0;rep < finalScores[precNum].size();rep++){
+				blens << allBlens[precNum][rep][bnum] << "\t";
+				}
+			blens << endl;
+			}
+		blens.close();
+		}
+
+	randTrees << "end;\n";
+	optTrees << "end;\n";
+	randTrees.close();
+	optTrees.close();
+
+	FinalizeOutputStreams(0);
+	FinalizeOutputStreams(1);
+	FinalizeOutputStreams(2);
+	}
+
+void Population::QuickSort( FLOAT_TYPE **scoreArray, int top, int bottom ){
+
+	int i = top;
+	int j = bottom;
+	FLOAT_TYPE x = scoreArray[ (top + bottom) / 2 ][1];
+	do {
+		while( scoreArray[i][1] < x  &&  i < bottom ) i++ ;
+		while( x < scoreArray[j][1]  &&  j > top  ) j-- ;
+
+		if( i <= j ) {
+			for( int k = 0; k < 2; k++ ) {
+				FLOAT_TYPE y = scoreArray[i][k];
+				scoreArray[i][k] = scoreArray[j][k];
+				scoreArray[j][k] = y;
+			}
+			i++;
+			if(j) j--;
+		}
+
+	} while( i <= j );
+
+	if( top  <    j    ) QuickSort( scoreArray, top, j );
+	if(  i   <  bottom ) QuickSort( scoreArray, i, bottom );
+}
+
+FLOAT_TYPE Population::CalcAverageFitness(){
+	FLOAT_TYPE total = ZERO_POINT_ZERO;
+	
+	for(unsigned i = 0; i < total_size; i++ ){
+		// evaluate fitness
+		if(indiv[i].IsDirty()){
+			indiv[i].CalcFitness(subtreeNode);
+			}
+		assert(indiv[i].Fitness() != 1);
+	
+		total += indiv[i].Fitness();
+		cumfit[i][0] = (FLOAT_TYPE)i;
+		cumfit[i][1] = indiv[i].Fitness();
+		}
+
+	FLOAT_TYPE avg = total / (FLOAT_TYPE)total_size;
+
+	// Sort fitnesses from low to high (bad to good)
+	QuickSort( cumfit, 0, total_size-1 );
+
+	// keep track of which individual is most fit each generation we've stored the 
+	//fitnesses as ln-likelihoods in cumfit, so cumfit[0] will be the _least_ fit individual
+	int mostFit = total_size-1;
+#ifndef NO_EVOLUTION
+	bestAccurateIndiv=bestIndiv = (int)cumfit[mostFit][0];
+#else
+	bestAccurateIndiv=bestIndiv = 0;
+#endif
+	//if subtree mode is active, we also want to find the best accurate indiv
+	if(rank==0){
+		while(paraMan->subtreeModeActive==true && indiv[bestAccurateIndiv].accurateSubtrees==false){
+			mostFit--;
+			bestAccurateIndiv=(int)cumfit[mostFit][0];
+			}
+		assert(mostFit>=0);
+		}
+	
+	// keep track of all-time best
+	if( indiv[bestIndiv].Fitness() > prevBestFitness ){
+		prevBestFitness = bestFitness;
+		globalBest = bestFitness = indiv[bestIndiv].Fitness();
+		}
+
+	if(memLevel>0){
+		//if we are at some level of memory restriction, mark the clas of the old best
+		//for reclamation, and protect those of the new best
+		SetNewBestIndiv(bestIndiv);
+		}
+
+	CalculateReproductionProbabilies(cumfit, conf->selectionIntensity, total_size);
+	return avg;
+	
+/*	Here's Paul's original selection criterion, based solely on rank
+	//	
+	// relative fitnesses are assigned based solely on position
+	// of individual in sorted array - we forget the likelihoods (or treelengths)
+	// at this point.  This allows the likelihoods to be close together
+	// and still get a healthy distribution of relative fitnesses so that
+	// there is real differential reproduction
+
+	FLOAT_TYPE n = (FLOAT_TYPE)total_size;
+	FLOAT_TYPE nn = n * ( n + 1.0 );
+	FLOAT_TYPE incr = 2.0 / nn;
+	FLOAT_TYPE cum = incr;
+
+	cumfit[0][1] = cum;
+	for( i = 1; i < total_size; i++ ) {
+		cum += incr;
+		cumfit[i][1] = cumfit[i-1][1] + cum;
+	}
+*/
+}
+
+void Population::CalculateReproductionProbabilies(FLOAT_TYPE **scoreArray, FLOAT_TYPE selectionIntensity, int indivsInArray){
+	//DJZ 2-28-06 Generalizing this so that it can be used in multiple places with different 
+	//subsets of individuals and selection intensities.  The 2-d array passed in (indivsInArray x 2)
+	//has the scores in the [x][1] slots, and the indiv numbers in the [x][0] slots, and should already
+	//be sorted from low to high (bad to good). The reproduction probs will be placed in the [x][1] before returning.
+
+	//Probability of reproduction based on more or less on AIC weights, although
+	//the strength of selection can be varied by changing the selectionIntensity
+	//A selectionIntensity of 0.5 makes this equivalent to AIC weights, while 
+	//smaller number makes the selection less severe
+	FLOAT_TYPE *deltaAIC=new FLOAT_TYPE[indivsInArray];
+	FLOAT_TYPE tot=ZERO_POINT_ZERO;
+
+	for(int i=0;i<indivsInArray-1;i++){
+		deltaAIC[i]=scoreArray[indivsInArray-1][1] - scoreArray[i][1];
+		deltaAIC[i]=exp(-selectionIntensity * deltaAIC[i]);
+		tot+=deltaAIC[i];
+		}
+
+	if(indivsInArray == total_size){
+		deltaAIC[indivsInArray-1]=conf->holdoverPenalty;
+		}
+	else deltaAIC[indivsInArray-1]=ZERO_POINT_ZERO;
+
+	deltaAIC[indivsInArray-1]=exp(-selectionIntensity * deltaAIC[indivsInArray-1]);
+	tot+=deltaAIC[indivsInArray-1];
+
+
+	for(int i=0;i<indivsInArray;i++)
+		deltaAIC[i] /= tot;
+	
+	FLOAT_TYPE cum=deltaAIC[0];
+	scoreArray[0][1] = cum;
+	for(int i = 1; i < indivsInArray; i++ ) {
+		cum += deltaAIC[i];
+		scoreArray[i][1] = cum;
+		}
+	delete []deltaAIC;
+	assert(abs(scoreArray[indivsInArray-1][1] - ONE_POINT_ZERO) < 0.001);
+}
+/*
+void Population::CreateGnuPlotFile()
+{
+	char tmpstr[51];
+
+	ofstream gnuf( params->gnufname );
+	assert( gnuf );
+
+	// set labels
+	gnuf << "set xlabel \"Generation\"" << endl;
+	gnuf << "set ylabel \"Fitness\"" << endl;
+	gnuf << "set title \"" << params->plottitle << "\"" << endl;
+
+	// alternate title containing config settings
+	gnuf << "#set title \"";
+	gnuf << "N=" << conf->nindivs;
+	gnuf << " h=" << params->holdover;
+	gnuf << " b=" << params->meanBrlenMuts;
+	gnuf << " s=" << params->gammaShapeBrlen;
+	gnuf << " seed=" << rnd.init_seed();
+	gnuf << '\"' << endl;
+
+	// make alternate output to mif file available
+	gnuf << "#set terminal mif" << endl;
+	gnuf << "#set output \"" << params->ofprefix << ".mif\"" << endl;
+
+	// place legend on graph
+	strcpy( tmpstr, "set key 5000,-45000.0" );
+	gnuf << tmpstr << endl;
+
+	// finally, the plot command
+	gnuf << "plot \"" << params->logfname;
+	if( params->fatlog ) {
+		gnuf << "\" using 1:3 title \"best\" with lines";
+		gnuf << ", \"" << params->logfname;
+		gnuf << "\" using 1:2 title \"average\" with lines" << endl;
+   }
+   else {
+		gnuf << "\" using 1:2 with lines" << endl;
+   }
+
+	gnuf << "pause -1" << endl;
+
+	gnuf.close();
+}
+*/
+void Population::DetermineParentage(){
+	//determine each individual's parentage
+	unsigned parent;
+	FLOAT_TYPE r;
+
+	for(unsigned i = 0; i < conf->nindivs; i++ ){
+
+#ifndef NO_EVOLUTION
+		if( i < conf->holdover ){// copy best individual's genotype to next generation
+			if(rank==0){
+				if(paraMan->subtreeModeActive==true) parent=bestAccurateIndiv;
+				else parent=bestIndiv;
+				}
+			else parent=bestIndiv;
+			}
+		else if(rank==0)
+			if(i==1 && rank==0 && indiv[bestIndiv].accurateSubtrees==true && paraMan->ReadyForSubtreeRecom(gen)){
+			//if subtree mode is on and we haven't tried a subtreeRecom in a while, set up an individual for that
+				parent=bestIndiv;
+				newindiv[i].mutation_type=Individual::subtreeRecom;
+				}
+			else {// find a parent
+				r = rnd.uniform();
+				for( parent = 0; parent < total_size; parent++ ){
+					if( r < cumfit[parent][1] ) break;
+					}
+				parent = (int)cumfit[parent][0];
+
+#ifdef INPUT_RECOMBINATION
+			
+			paraMan->maxRecomIndivs = 3;
+			paraMan->nremotes = NUM_INPUT;
+
+			if(rank==0 && paraMan->subtreeModeActive==false && i>= (conf->nindivs - paraMan->maxRecomIndivs)){
+/*				int *mates=new int[paraMan->nremotes];
+				for(int j=0;j<paraMan->nremotes;j++) mates[j]=conf->nindivs+j;
+				ScrambleArray(paraMan->nremotes, mates);
+*/
+				int foo=2;
+				FLOAT_TYPE **recomSelect=new FLOAT_TYPE *[paraMan->nremotes];
+				for(int q=0;q<paraMan->nremotes;q++)
+					recomSelect[q]=new FLOAT_TYPE[2];
+					
+				int potentialPartners=0;
+				for(int r=0;r<paraMan->nremotes;r++){
+					int ind=conf->nindivs+r;
+					recomSelect[r][0]=(FLOAT_TYPE)(ind);
+					if(ind==parent //don't recombine with your parent
+						|| (indiv[parent].topo == indiv[ind].topo) //don't recombine with another of the same topo	
+						|| (indiv[ind].willrecombine == true))//don't recombine with someone who is already doing so		
+						recomSelect[r][1]=-1e100;	
+					else{
+						recomSelect[r][1]=indiv[ind].Fitness();
+						potentialPartners++;
+						}
+					}
+				if(potentialPartners > 0){
+					QuickSort(recomSelect, 0, paraMan->nremotes-1);
+					CalculateReproductionProbabilies(recomSelect, 0.001, paraMan->nremotes);			
+									
+					int mateIndex;
+					int curMate;
+					// find someone else to recombine with
+
+					FLOAT_TYPE r=rnd.uniform();
+					for( mateIndex=0;mateIndex < paraMan->nremotes;mateIndex++)
+						if( r < recomSelect[mateIndex][1]) break;
+					curMate=recomSelect[mateIndex][0];
+
+
+					newindiv[i].recombinewith=curMate;
+					indiv[curMate].willrecombine=true;
+					//this will be a new topology, so mark it as topo -1.  This will be dealt with when we update the topolist
+					newindiv[i].topo=-1;
+					}
+				for(int q=0;q<paraMan->nremotes;q++)
+					delete []recomSelect[q];
+				delete []recomSelect;
+				}
+#endif
+
+#ifdef MPI_VERSION
+//new bipart recom conditions, 9-25-05
+
+//DJZ 2-28-06 making recombination partner weakly tied to fitness (selctionIntensity of 0.01) rather than random
+
+			if(rank==0 && paraMan->subtreeModeActive==false && i>= (conf->nindivs - paraMan->maxRecomIndivs)){
+/*				int *mates=new int[paraMan->nremotes];
+				for(int j=0;j<paraMan->nremotes;j++) mates[j]=conf->nindivs+j;
+				ScrambleArray(paraMan->nremotes, mates);
+*/
+				int foo=2;
+				FLOAT_TYPE **recomSelect=new FLOAT_TYPE *[paraMan->nremotes];
+				for(int q=0;q<paraMan->nremotes;q++)
+					recomSelect[q]=new FLOAT_TYPE[2];
+					
+				int potentialPartners=0;
+				for(int r=0;r<paraMan->nremotes;r++){
+					int ind=conf->nindivs+r;
+					recomSelect[r][0]=(FLOAT_TYPE)(ind);
+					if(ind==parent //don't recombine with your parent
+						|| (indiv[parent].topo == indiv[ind].topo) //don't recombine with another of the same topo	
+						|| (indiv[ind].willrecombine == true))//don't recombine with someone who is already doing so		
+						recomSelect[r][1]=-1e100;	
+					else{
+						recomSelect[r][1]=indiv[ind].Fitness();
+						potentialPartners++;
+						}
+					}
+				if(potentialPartners > 0){
+					QuickSort(recomSelect, 0, paraMan->nremotes-1);
+					CalculateReproductionProbabilies(recomSelect, 0.01, paraMan->nremotes);			
+									
+					int mateIndex;
+				int curMate;
+				// find someone else to recombine with
+
+					FLOAT_TYPE r=rnd.uniform();
+					for( mateIndex=0;mateIndex < paraMan->nremotes;mateIndex++)
+						if( r < recomSelect[mateIndex][1]) break;
+					curMate=recomSelect[mateIndex][0];
+
+
+					newindiv[i].recombinewith=curMate;
+					indiv[curMate].willrecombine=true;
+					//this will be a new topology, so mark it as topo -1.  This will be dealt with when we update the topolist
+					newindiv[i].topo=-1;
+					}
+				for(int q=0;q<paraMan->nremotes;q++)
+					delete []recomSelect[q];
+				delete []recomSelect;
+				}
+#endif
+		}
+#else //ifdef NO_EVOLUTION
+		parent = 0;
+#endif
+		
+		newindiv[i].parent=parent;
+		if(newindiv[i].mutation_type==Individual::subtreeRecom) newindiv[i].topo=-1; //VERIFY
+		else newindiv[i].topo=indiv[parent].topo;
+		indiv[ parent ].willreproduce=true;
+		}
+	}
+
+void Population::FindTreeStructsForNextGeneration(){
+	//find treestructs for all of the newindivs, either by getting an unused one from the previous
+	//generation or by getting one from the unusedTree stack
+	for(unsigned i = 0; i < total_size; i++ ){
+		//see if the parent indiv has already been used in the new generation, or if it will recombine
+		if( i < conf->nindivs && (indiv[newindiv[i].parent].reproduced||indiv[newindiv[i].parent].willrecombine )){	      
+			//use a tree from the unused Indiv stack.  If it is empty, create an extra indiv that will 
+			//eventually make it's way /back to that stack.  At most we should only ever have nindiv 
+			//trees in the unused stack
+			Tree *destPtr;
+			if(unusedTrees.empty()){//create a new tree
+				Tree *ttree=new Tree();
+				destPtr=ttree;
+				}
+			else{
+				destPtr=*(unusedTrees.end()-1);
+				unusedTrees.pop_back();
+				}
+			newindiv[i].CopySecByRearrangingNodesOfFirst(destPtr,&indiv[newindiv[i].parent]);
+			}
+		else{
+			//if the tree will not be used in recombination and has not already been used
+			newindiv[i].CopyByStealingTree(&indiv[newindiv[i].parent]);
+			indiv[ newindiv[i].parent].reproduced=true;
+			if(i>conf->nindivs) newindiv[i].mutation_type=indiv[i].mutation_type;
+			}
+		}
+	}
+	
+void Population::PerformMutation(int indNum){
+	Individual *ind=&newindiv[indNum];
+	Individual *par=&indiv[newindiv[indNum].parent];
+
+	//FLOAT_TYPE beforeScore;
+	bool recomPerformed;
+
+	switch(ind->mutation_type){
+/*		case Individual::exNNI: //exNNI and exlimSPR trump all other mutation types
+			beforeScore=par->Fitness();
+			NNIoptimization(indNum, 1);
+			if(beforeScore==ind->Fitness()){
+				topologies[ind->topo]->exNNItried=true;
+				}
+			//ind->accurateSubtrees=false;
+			break;
+		
+		case Individual::exlimSPR:
+			assert(0);
+			SPRoptimization(indNum);
+			ind->accurateSubtrees=false;
+			break;
+*/		
+
+		case Individual::subtreeRecom:
+			//perform subtree recom, which melds together the different subtrees worked on by the
+			//remote nodes
+			recomPerformed=SubtreeRecombination(indNum);
+			if(recomPerformed==false) ind->mutation_type=0;
+//			ind->treeStruct->calcs=calcCount;
+//			calcCount=0;
+			ind->CalcFitness(0);
+			break;
+			
+		default:
+			if(ind->recombinewith>-1){// perform recombination
+				Individual *recompar=&indiv[ind->recombinewith];
+				//don't want to standardize biparts anymore
+				ind->treeStruct->CalcBipartitions(false);
+				recompar->treeStruct->CalcBipartitions(false);
+				ind->CrossOverWith( *recompar, adap->branchOptPrecision);
+				ind->accurateSubtrees=false;
+//				ind->treeStruct->calcs=calcCount;
+//				calcCount=0;
+				}
+			if(ind->recombinewith==-1){//all types of "normal" mutation that occur at the inidividual level
+				if(rank==0){//if we are the master
+				 	if(ind->accurateSubtrees==false || paraMan->subtreeModeActive==false){
+
+			       		ind->Mutate(adap->branchOptPrecision, adap);
+
+						if(output_tree){
+							treeLog << "  tree gen" << gen <<  "." << indNum << "= [&U] [" << ind->Fitness() << "][ ";
+							string modstr;
+							ind->modPart.FillGarliFormattedModelStrings(modstr);
+							ind->treeStruct->root->MakeNewick(treeString, false, true);
+							treeLog << modstr.c_str() << "]" << treeString << ";" << endl;
+							output_tree=false;
+							}
+
+			       		//reclaim clas if the created tree has essentially no chance of reproducing
+			       		if(((ind->Fitness() - BestFitness()) < (-11.5/conf->selectionIntensity))){
+			       			ind->treeStruct->ReclaimUniqueClas();
+			       			}
+						}
+					else{
+						assert(0);//7/21/06 subtree mode would need to be updated to work again
+
+						//if subtree mode is on and we are the master, mutate one of the nodes
+						//that isn't in a subtree, or alternatively pick a subtree and mutate it
+/*					#ifndef MASTER_DOES_SUBTREE
+						if(paraMan->fewNonSubtreeNodes != true)
+							ind->NonSubtreeMutate(paraMan, adap->branchOptPrecision, adap);
+						else 
+							ind->SubtreeMutate(subtreeNode, adap->branchOptPrecision, subtreeMemberNodes, adap);
+					#else
+						ind->SubtreeMutate(subtreeNode, adap->branchOptPrecision, subtreeMemberNodes, adap);
+					#endif					
+*/						}
+					}
+				else{//if we are a remote node
+				 	if(subtreeNode==0) ind->Mutate(adap->branchOptPrecision, adap);
+					else{
+						assert(0);
+						//ind->SubtreeMutate(subtreeNode, adap->branchOptPrecision, subtreeMemberNodes, adap);
+						}
+					}
+				}
+			}
+		
+		//check the accuracy of the subtrees
+		#ifndef NDEBUG
+		if(rank==0 && ind->accurateSubtrees==true)
+			paraMan->CheckSubtreeAccuracy(ind->treeStruct);
+		#endif
+	}
+
+void Population::NextGeneration(){
+
+	DetermineParentage();
+
+	FindTreeStructsForNextGeneration();
+
+	//return any treestructs from the indivs that won't be used in recombination
+	//and weren't used to make the newindivs.  This is necessary to keep from having
+	//too many CLAs in use at any one time 
+	for(unsigned j=0;j<conf->nindivs;j++){
+		if(indiv[j].reproduced==false && indiv[j].willrecombine==false){
+			//this reclaims all indiv's treestructs who have no offspring and no recombination partner
+			indiv[j].treeStruct->RemoveTreeFromAllClas();
+			unusedTrees.push_back(indiv[j].treeStruct);
+			indiv[j].treeStruct=NULL;
+			}
+		}
+
+	//to simplify all of the scoring that will be coming up (without passing 
+	//a bunch of crap), set the models of the trees to correspond to that of the individuals
+	UpdateTreeModels();
+	
+	//this loop is only for mutation and recom, so start from holdover
+	for(unsigned indnum = conf->holdover; indnum < conf->nindivs; indnum++ ){
+		PerformMutation(indnum);
+		}
+
+	UpdateTreeModels();
+
+	//the only trees that we need to return at this point are ones that
+	//did not reproduce AND were used in recom.  Those that weren't used 
+	//in recom were already reclaimed above, and the treestructs set to NULL
+	for(unsigned j=0;j<conf->nindivs;j++){
+		if(indiv[j].reproduced==false && indiv[j].treeStruct!=NULL){
+			indiv[j].treeStruct->RemoveTreeFromAllClas();
+			unusedTrees.push_back(indiv[j].treeStruct);
+			}
+		//reset all of the individuals
+		indiv[j].ResetIndiv();
+		}
+
+	// swap newindiv and indiv
+	for(unsigned i=0;i<conf->nindivs;i++)
+		indiv[i].ResetIndiv();
+	for(unsigned i=conf->nindivs;i<total_size;i++)
+		indiv[i].willrecombine=false;
+
+	Individual* tmp = newindiv;
+	newindiv = indiv;
+	indiv = tmp;
+
+	CalcAverageFitness(); //score individuals that need it
+		
+	#ifdef DEBUG_SCORES
+	if(rank==0)	OutputFilesForScoreDebugging();
+	#endif
+	
+	}
+
+void Population::OutputFate(){
+	//output everything that happened to each indiv in this generation to file
+
+	for(unsigned i=0;i<total_size;i++){
+		fate << 	gen << "\t" << i << "\t" << indiv[i].parent << "\t";
+
+#ifdef MPI_VERSION
+		fate << indiv[i].recombinewith << "\t";	
+#endif
+		fate << indiv[i].Fitness() << "\t" << indiv[i].mutation_type << "\t" << indiv[i].mutated_brlen << "\t";
+#ifdef MPI_VERSION
+	    fate  << indiv[i].accurateSubtrees << "\t";
+#endif
+		
+	    fate << stopwatch.SplitTime() << "\t" << adap->branchOptPrecision;
+
+//some extra debugging info
+/*		fate << "\t" << indiv[i].topo << "\t";	
+	    fate << indiv[i].treeStruct->calcs << "\t";
+	    indiv[i].treeStruct->calcs=0;
+	    int c, tr, r;
+	    indiv[i].treeStruct->CountNumReservedClas(c, tr, r);
+	    fate << c << "\t" << tr << "\t" << r << "\t";
+//	    
+*/	    fate << "\n";
+		}
+//	fate << claMan->NumFreeClas() << "\n";
+	if(gen%20 ==0) fate.flush();
+	}
+
+void Population::OutputFilesForScoreDebugging(Individual *ind /*=NULL*/, int num){
+	//create three files, one with all of the trees in each gen in nexus format
+	//one with a paup block specifiying the scoring of the trees, and one containing 
+	//a list of the scores from GAML
+
+if(rank > 0) return;	
+
+//ofstream outf;
+//ofstream paupf;
+
+#ifdef NNI_SPECTRUM
+
+	char fname1[30];
+	char fname2[30];
+	sprintf(fname1, "toscore%d.tre", gen);
+	sprintf(fname2, "toscore%d.nex", gen);
+	if(num==1){
+		outf.open(fname1);
+		paupf.open(fname2);
+		}
+	else{
+		outf.open(fname1, ios::app);
+		paupf.open(fname2, ios::app);
+		}
+#endif
+
+	if(gen==1 && ind==NULL || num==1){
+		dataPart->BeginNexusTreesBlock(outf);
+		
+		paupf << "#nexus\n\n";
+		paupf << "begin paup;\n";
+		paupf << "set warnreset=no incr=auto;\n";
+		paupf << "execute " << conf->ofprefix.c_str() << ".nex;\n";
+#ifndef NNI_SPECTRUM
+		paupf << "gett file=toscore.tre storebr;" << endl;
+#else
+		paupf << "gett file=" << outf << " storebr;" << endl;
+#endif
+		}
+		
+	if(ind==NULL){
+		for(unsigned i=0;i<total_size;i++){
+			outf << "  utree " << gen << i << "= ";
+			indiv[i].treeStruct->root->MakeNewick(treeString, false, true, true);
+			outf << treeString << ";\n";
+			
+			paupf << "lset userbr ";
+			//DEBUG PARTITION
+/*			if(modSpec.Nst()==2) paupf << "nst=2 trat=" << indiv[i].mod->Rates(0) << " base=(" << indiv[i].mod->StateFreq(0) << " " << indiv[i].mod->StateFreq(1) << " " << indiv[i].mod->StateFreq(2) << ");\n" << "lsc " << (gen-1)*conf->nindivs+i+1;
+
+			else paupf << "nst=6 rmat=(" << indiv[i].mod->Rates(0) << " " << indiv[i].mod->Rates(1) << " " << indiv[i].mod->Rates(2) << " " << indiv[i].mod->Rates(3) << " " << indiv[i].mod->Rates(4) << ") " << " base=(" << indiv[i].mod->StateFreq(0) << " " << indiv[i].mod->StateFreq(1) << " " << indiv[i].mod->StateFreq(2) << ") ";
+			
+#ifdef FLEX_RATES			
+			paupf << "[FLEX RATES] ";
+#else
+			if(indiv[i].mod->NRateCats()>1) paupf << "rates=gamma shape=" << indiv[i].mod->Alpha() << " ";
+			paupf << "pinv=" << indiv[i].mod->PropInvar() << " "; 
+#endif
+
+*/
+			if(modSpecSet.GetModSpec(0)->Nst()==2) paupf << "nst=2 trat=" << indiv[i].modPart.GetModel(0)->Rates(0) << " base=(" << indiv[i].modPart.GetModel(0)->StateFreq(0) << " " << indiv[i].modPart.GetModel(0)->StateFreq(1) << " " << indiv[i].modPart.GetModel(0)->StateFreq(2) << ");\n" << "lsc " << (gen-1)*conf->nindivs+i+1;
+
+			else paupf << "nst=6 rmat=(" << indiv[i].modPart.GetModel(0)->Rates(0) << " " << indiv[i].modPart.GetModel(0)->Rates(1) << " " << indiv[i].modPart.GetModel(0)->Rates(2) << " " << indiv[i].modPart.GetModel(0)->Rates(3) << " " << indiv[i].modPart.GetModel(0)->Rates(4) << ") " << " base=(" << indiv[i].modPart.GetModel(0)->StateFreq(0) << " " << indiv[i].modPart.GetModel(0)->StateFreq(1) << " " << indiv[i].modPart.GetModel(0)->StateFreq(2) << ") ";
+			
+#ifdef FLEX_RATES			
+			paupf << "[FLEX RATES] ";
+#else
+			if(indiv[i].modPart.GetModel(0)->NRateCats()>1) paupf << "rates=gamma shape=" << indiv[i].modPart.GetModel(0)->Alpha() << " ";
+			paupf << "pinv=" << indiv[i].modPart.GetModel(0)->PropInvar() << " "; 
+#endif
+
+			if(gen==1 && i==0) paupf << ";\n" << "lsc " << (gen-1)*total_size+i+1 << "/scorefile=paupscores.txt replace;\n";
+			else paupf << ";\n" << "lsc " << (gen-1)*total_size+i+1 << "/scorefile=paupscores.txt append;\n";
+			}
+		}
+	else{
+		outf << "  utree " << num << "= ";
+		ind->treeStruct->root->MakeNewick(treeString, false, true);
+		outf << treeString << ";\n";
+
+		//DEBUG PARTITION
+/*		paupf << "lset userbr ";
+		if(modSpec->Nst()==2) paupf << "nst=2 trat=" << ind->mod->Rates(0) << " base=(" << ind->mod->StateFreq(0) << " " << ind->mod->StateFreq(1) << " " << ind->mod->StateFreq(2) << ");\nlsc ";
+		
+		else paupf << "nst=6 rmat=(" << ind->mod->Rates(0) << " " << ind->mod->Rates(1) << " " << ind->mod->Rates(2) << " " << ind->mod->Rates(3) << " " << ind->mod->Rates(4) << ") " << " base=(" << ind->mod->StateFreq(0) << " " << ind->mod->StateFreq(1) << " " << ind->mod->StateFreq(2) << ") ";
+
+#ifdef FLEX_RATES			
+			paupf << "[FLEX RATES] ";
+#else	
+		if(ind->mod->NRateCats()>1) paupf << "rates=gamma shape=" << ind->mod->Alpha() << " ";
+		paupf << "pinv=" << ind->mod->PropInvar() << " "; 
+#endif
+*/
+		paupf << "lset userbr ";
+		if(modSpecSet.GetModSpec(0)->Nst()==2) paupf << "nst=2 trat=" << ind->modPart.GetModel(0)->Rates(0) << " base=(" << ind->modPart.GetModel(0)->StateFreq(0) << " " << ind->modPart.GetModel(0)->StateFreq(1) << " " << ind->modPart.GetModel(0)->StateFreq(2) << ");\nlsc ";
+		
+		else paupf << "nst=6 rmat=(" << ind->modPart.GetModel(0)->Rates(0) << " " << ind->modPart.GetModel(0)->Rates(1) << " " << ind->modPart.GetModel(0)->Rates(2) << " " << ind->modPart.GetModel(0)->Rates(3) << " " << ind->modPart.GetModel(0)->Rates(4) << ") " << " base=(" << ind->modPart.GetModel(0)->StateFreq(0) << " " << ind->modPart.GetModel(0)->StateFreq(1) << " " << ind->modPart.GetModel(0)->StateFreq(2) << ") ";
+
+#ifdef FLEX_RATES			
+			paupf << "[FLEX RATES] ";
+#else	
+		if(ind->modPart.GetModel(0)->NRateCats()>1) paupf << "rates=gamma shape=" << ind->modPart.GetModel(0)->Alpha() << " ";
+		paupf << "pinv=" << ind->modPart.GetModel(0)->PropInvar() << " "; 
+#endif
+
+#ifndef NNI_SPECTRUM
+		if(num==1) paupf << ";\n" << "lsc " << num << "/scorefile=paupscores.txt replace;\n";
+		else paupf << ";\n" << "lsc " << num << "/scorefile=paupscores.txt append;\n";
+#else
+		if(num==1) paupf << ";\n" << "lsc " << num << "/scorefile=paupscores" << gen << ".txt replace;\n";
+		else paupf << ";\n" << "lsc " << num << "/scorefile=paupscores"  << gen << ".txt append;\n";
+#endif
+		}
+#ifdef NNI_SPECTRUM
+outf.close();
+paupf.close();		
+#endif
+	}	
+
+//this assumes that the tree to be appended is a member of the population
+//if indNum is -1, then the bestIndiv from the pop is used
+void Population::AppendTreeToTreeLog(int mutType, int indNum /*=-1*/){
+	
+	if(treeLog.is_open() == false || conf->outputTreelog==false) 
+		return;
+
+	const Individual *ind;
+	int i = (indNum >= 0 ? indNum : bestIndiv);
+
+	ind=&indiv[i];
+
+//	if(Tree::outgroup != NULL) 
+//		OutgroupRoot(ind, i);
+		
+	int num = 0;
+	Individual tempInd;
+	const Individual *theInd;
+	if(Tree::outgroup != NULL || conf->collapseBranches){
+		tempInd.DuplicateIndivWithoutCLAs(ind);
+		if(Tree::outgroup != NULL)
+			OutgroupRoot(&tempInd, -1);
+/*		//Can't decide if these should be collapsed or not here.  Thinking no.
+		if(conf->collapseBranches){
+			tempInd.treeStruct->root->CollapseMinLengthBranches(num);
+			outman.UserMessage("%d COLLAPSED", num);
+			}
+*/
+		theInd = &tempInd;
+		}
+	else
+		theInd = ind;
+
+	if(finishedRep)
+		treeLog << "  tree final= [&U] [" << theInd->Fitness() << "][ ";
+	else 
+		treeLog << "  tree gen" << gen <<  "= [&U] [" << theInd->Fitness() << "\tmut=" << mutType << "][ ";
+	string modstr;
+	ind->modPart.FillGarliFormattedModelStrings(modstr);
+	theInd->treeStruct->root->MakeNewick(treeString, false, true);
+	treeLog << modstr.c_str() << "]" << treeString << ";" << endl;
+	}
+
+
+void Population::FinishBootstrapRep(const Individual *ind, int rep){
+
+	if(bootLog.is_open() == false) 
+		return;
+
+	int num = 0;
+	Individual tempInd;
+	const Individual *theInd;
+	if(Tree::outgroup != NULL || conf->collapseBranches){
+		tempInd.DuplicateIndivWithoutCLAs(ind);
+		if(Tree::outgroup != NULL)
+			OutgroupRoot(&tempInd, -1);
+		if(conf->collapseBranches){
+			tempInd.treeStruct->root->CollapseMinLengthBranches(num);
+//			outman.UserMessage("%d COLLAPSED", num);
+			}
+		theInd = &tempInd;
+		}
+	else
+		theInd = ind;
+
+	bootLog << "  tree bootrep" << rep <<  "= [&U] [" << theInd->Fitness() << " ";
+	
+	string modstr;
+	theInd->modPart.FillGarliFormattedModelStrings(modstr);
+
+	theInd->treeStruct->root->MakeNewick(treeString, false, true);
+	bootLog << modstr.c_str() << "] " << treeString << ";" << endl;
+
+	if(conf->outputPhylipTree)
+		WritePhylipTree(bootLogPhylip);
+	}
+
+bool Population::OutgroupRoot(Individual *ind, int indnum){
+	//if indnum != -1 the individual is in the indiv array, and a few extra things need to be done 
+	ind->treeStruct->root->CheckforPolytomies();
+
+	ind->treeStruct->CalcBipartitions(true);
+	Bipartition b = *(Tree::outgroup);
+	b.Standardize();
+	TreeNode *r = ind->treeStruct->ContainsBipartitionOrComplement(b);
+	
+	if(r == NULL){
+		//this means that there isn't a bipartition separating the outgroup and ingroup
+		//so outgroup rooting is not possible
+		return false;
+		}
+	
+	TreeNode *temp = r;
+	while(temp->IsTerminal() == false) 
+		temp=temp->left;
+	if(Tree::outgroup->ContainsTaxon(temp->nodeNum) == false || r->IsTerminal()) 
+		r = r->anc;
+	if(r->IsNotRoot()){
+//		outman.UserMessage("REROOTED");
+		ind->treeStruct->RerootHere(r->nodeNum);
+		if(indnum != -1){
+			ind->SetDirty();
+			ind->CalcFitness(0);
+			}
+		return true;
+		}
+	else return false;
+	}
+
+void Population::WriteTreeFile( const char* treefname, int indnum, bool collapse /*=false*/ ){
+	assert( treefname );
+	string filename = treefname;
+	filename += ".tre";
+
+	//output an individual from the storedTrees if an indnum is passed in
+	//otherwise the best in the population
+	const Individual *ind;
+	if(indnum == -1){
+		ind = &indiv[bestIndiv];
+		}
+	else{
+		assert(indnum < storedTrees.size());
+		ind = storedTrees[indnum];
+		}
+
+	int num = 0;
+	Individual tempInd;
+	const Individual *theInd;
+	if(Tree::outgroup != NULL || (conf->collapseBranches && collapse)){
+		tempInd.DuplicateIndivWithoutCLAs(ind);
+		if(Tree::outgroup != NULL)
+			OutgroupRoot(&tempInd, -1);
+		if(conf->collapseBranches && collapse){
+			tempInd.treeStruct->root->CollapseMinLengthBranches(num);
+//			outman.UserMessage("%d COLLAPSED", num);
+			}
+		theInd = &tempInd;
+		}
+	else
+		theInd = ind;
+
+#ifdef INCLUDE_PERTURBATION
+	if(allTimeBest != NULL){
+		if(best->Fitness() < allTimeBest->Fitness() || pertMan->ratcheted==true) return;
+		}
+#endif
+
+#ifdef BOINC
+	char physical_name[100];
+	boinc_resolve_filename(filename.c_str(), physical_name, sizeof(physical_name));
+	MFILE outf;
+	outf.open(physical_name, "w");
+#else
+	ofstream outf;
+	outf.open( filename.c_str() );
+	outf.precision(8);
+#endif
+	string trans;
+	string str;
+	dataPart->BeginNexusTreesBlock(trans);
+	//data->BeginNexusTreesBlock(outf);
+	char temp[101];	
+	if(indnum == -1)
+		sprintf(temp, "tree best = [&U][!GarliScore %f][!GarliModel ", theInd->Fitness());
+	else
+		sprintf(temp, "tree bestREP%d = [&U][!GarliScore %f][!GarliModel ", indnum+1, theInd->Fitness());
+	str += temp;
+	string modstr;
+	ind->modPart.FillGarliFormattedModelStrings(modstr);
+	str += modstr;
+	str += "]";
+
+#ifdef BOINC
+	const char *s = trans.c_str();
+	outf.write(s, sizeof(char), trans.length());
+	s = str.c_str();
+	outf.write(s, sizeof(char), str.length());
+	theInd->treeStruct->root->MakeNewick(treeString, false, true);
+	size_t len = strlen(treeString);
+	outf.write(treeString, sizeof(char), len);
+	str = ";\nend;\n";
+	s = str.c_str();
+	outf.write(s, sizeof(char), str.length());
+#else
+	outf << trans;
+	outf << str;
+	outf.setf( ios::floatfield, ios::fixed );
+	outf.setf( ios::showpoint );
+	theInd->treeStruct->root->MakeNewick(treeString, false, true);
+	outf << treeString << ";\n";
+	outf << "end;\n";
+#endif	
+	//add a paup block setting the model params
+	str = "";
+	if(modSpecSet.GetModSpec(0)->IsNucleotide()){
+		if(ind->modPart.NumModels() == 1){
+			ind->modPart.GetModel(0)->FillPaupBlockStringForModel(str, filename.c_str());
+			}
+		else{
+			str += "[\n";
+			//modstr was already filled above
+			//ind->modPart.FillGarliFormattedModelStrings(modstr);
+			str += modstr;
+			str += "\n]\n";
+			modstr.clear();
+			}
+		}
+#ifdef BOINC
+	s = str.c_str();
+	outf.write(s, sizeof(char), str.length());
+	if((userTermination || timeTermination) && (indnum == storedTrees.size() - 1)){
+		//str = "[!****NOTE: GARLI Run was terminated before termination condition was reached!\nLikelihood scores, topologies and model estimates obtained may not be fully optimal!****\n]";
+		str = "[";
+		str += TerminationWarningMessage();
+		str += "]\n";
+		s = str.c_str();
+		outf.write(s, sizeof(char), str.length());
+		}
+#else
+	outf << str; 
+	//if(indnum < 0 && (userTermination || timeTermination))
+	if((userTermination || timeTermination) && (indnum == storedTrees.size() - 1))
+		outf << "[" << TerminationWarningMessage().c_str() << "]" << endl;
+#endif
+		
+	outf.close();
+	
+	if(conf->outputPhylipTree){//output a phylip formatted tree if desired
+		char phyname[85];
+		sprintf(phyname, "%s.phy", treefname);
+		ofstream phytree(phyname);
+		phytree.precision(8);
+		WritePhylipTree(phytree);
+		phytree.close();
+		}
+	}
+
+void Population::WriteStoredTrees( const char* treefname ){
+	assert( treefname );
+
+	string name;
+	name = treefname;
+	name += ".all.tre";
+	ofstream outf( name.c_str() );
+	outf.precision(8);
+
+	dataPart->BeginNexusTreesBlock(outf);
+
+	ofstream phytree;
+	if(conf->outputPhylipTree){
+		char phyname[85];
+		sprintf(phyname, "%s.all.phy", treefname);
+		phytree.open(phyname);
+		phytree.precision(8);
+		}
+
+	int bestRep = EvaluateStoredTrees(false);
+	
+	Individual tempInd;
+	for(unsigned r=0;r<storedTrees.size();r++){
+		const Individual *curInd;
+		if(Tree::outgroup != NULL || conf->collapseBranches){
+			tempInd.DuplicateIndivWithoutCLAs(storedTrees[r]);
+			if(Tree::outgroup != NULL)
+				OutgroupRoot(&tempInd, -1);
+			if(conf->collapseBranches){
+				int num = 0;
+				tempInd.treeStruct->root->CollapseMinLengthBranches(num);
+//				outman.UserMessage("%d COLLAPSED", num);
+				}
+			curInd = &tempInd;
+			}
+		else
+			curInd = storedTrees[r];
+		if(r == bestRep) 
+			outf << "tree rep" << r+1 << "BEST = [&U][!GarliScore " << curInd->Fitness() << "][!GarliModel ";
+		else 
+			outf << "tree rep" << r+1 << " = [&U][!GarliScore " << curInd->Fitness() << "][!GarliModel ";
+		string mods;
+		curInd->modPart.FillGarliFormattedModelStrings(mods);
+		outf << mods;
+		outf << "]";
+
+		outf.setf( ios::floatfield, ios::fixed );
+		outf.setf( ios::showpoint );
+		curInd->treeStruct->root->MakeNewick(treeString, false, true);
+		outf << treeString << ";\n";
+
+		if(conf->outputPhylipTree){//output a phylip formatted tree if requested
+			WritePhylipTree(phytree);
+			}
+		}
+
+/*
+	for(unsigned r=0;r<storedTrees.size();r++){
+		if(r == bestRep) 
+			outf << "tree rep" << r+1 << "BEST = [&U][!GarliScore " << storedTrees[r]->Fitness() << "][!GarliModel ";
+		else 
+			outf << "tree rep" << r+1 << " = [&U][!GarliScore " << storedTrees[r]->Fitness() << "][!GarliModel ";
+		storedTrees[r]->mod->OutputGarliFormattedModel(outf);
+		outf << "]";
+
+		outf.setf( ios::floatfield, ios::fixed );
+		outf.setf( ios::showpoint );
+		if(Tree::outgroup != NULL) 
+			OutgroupRoot(storedTrees[r], -1);
+		storedTrees[r]->treeStruct->root->MakeNewick(treeString, false, true);
+		outf << treeString << ";\n";
+
+		if(conf->outputPhylipTree){//output a phylip formatted tree if requested
+			WritePhylipTree(phytree);
+			}
+		}
+*/
+	outf << "end;\n";
+
+//	if(modSpecSet.GetModSpec(0)->IsNucleotide()){
+		//add a paup block setting the model params
+		//PARTITION
+		//storedTrees[bestRep]->mod->OutputPaupBlockForModel(outf, name.c_str());
+		if(storedTrees[bestRep]->modPart.NumModels() == 1 && storedTrees[bestRep]->modPart.GetModel(0)->IsNucleotide()){
+			storedTrees[bestRep]->modPart.GetModel(0)->OutputPaupBlockForModel(outf, name.c_str());
+			outf << "[!****NOTE: The model parameters loaded are the final model estimates****\n****from GARLI for the best scoring search replicate (#" << bestRep + 1 << ").****\n****The best model parameters for other trees may vary.****]" << endl;
+			}
+		else{
+			for(int m = 0;m < storedTrees[bestRep]->modPart.NumModels();m++){
+				//DEBUG
+				if(storedTrees[bestRep]->modPart.GetModel(m)->IsNucleotide()){
+					char mStr[20];
+					sprintf(mStr, "[M%d\n", m + 1);
+					outf << mStr;
+					storedTrees[bestRep]->modPart.GetModel(m)->OutputPaupBlockForModel(outf, name.c_str());
+					outf << "\n]\n";
+					}
+				}
+			}
+//		}
+	if(userTermination || timeTermination){
+		outf << "[" << TerminationWarningMessage().c_str() << "]";
+		}
+	outf.close();
+	if(conf->outputPhylipTree) phytree.close();
+	}
+
+//CAREFUL HERE!  This function assumes the the treestring was just
+//filled with MakeNewick, making a tree with taxon NUMBERS in the specification.
+//This function then just reads that treestring and translates to taxon NAMES
+//on the fly and outputs everything to the string passed in, which needs to 
+//be already open
+void Population::WritePhylipTree(ofstream &phytree){
+	char *loc=treeString;
+	NxsString temp;
+	while(*loc){
+		if(*loc == ':'){
+			temp += *loc++;
+			while(*loc != ',' && *loc != ')')
+				temp += *loc++;
+			phytree << temp.c_str();
+			temp="";				
+			}
+		if(isdigit(*loc) == false) phytree << *loc++;
+		else{
+			while(isdigit(*loc))
+				temp += *loc++;
+			//The stored taxon names will have been gotten with GetEscaped, and thus might
+			//have quotes around them if they have Nexus punctuation.  The quotes probably
+			//shouldn't appear in the phylip output.  However, if the names have three single
+			//quotes this corresponds to a single literal quote, in which case it will be output
+			NxsString pname = dataPart->TaxonLabel(atoi(temp.c_str())-1);
+			if(pname[0] == '\'' && pname[pname.size()-1] == '\''){
+				pname.erase(pname.end()-1);
+				pname.erase(pname.begin());
+				}
+			if(pname[0] == '\'' && pname[1] == '\'' ){
+				pname.erase(pname.end()-1);
+				pname.erase(pname.begin());
+				}
+			phytree << pname.c_str();
+			//phytree << data->TaxonLabel(atoi(temp.c_str())-1);
+			temp="";
+			}
+		}
+	phytree << ";" << endl;
+	}
+
+
+char * Population::MakeNewick(int i, bool internalNodes)
+{
+	indiv[i].treeStruct->root->MakeNewick(treeString, internalNodes, true);
+	assert(!treeString[stringSize-1]);
+	return treeString;
+}
+
+//DZ 7-7 This function will get rid of multiple references to the same treeStruct
+//from different individuals.  This keeps FLOAT_TYPE deletion from occuring in the destructor.
+//Not the most elegant, but it works.
+void Population::EliminateDuplicateTreeReferences(){
+
+	bool dupe;
+	vector<Tree *> tstructs;
+	
+	//go through the indiv array
+	for(unsigned i=0;i<conf->nindivs;i++){
+		//check if we have already encountered this treeStruct
+		dupe=false;
+		for(vector<Tree *>::iterator tit=tstructs.begin();tit!=tstructs.end();tit++){
+			if(indiv[i].treeStruct==(*tit)){
+				dupe=true;
+				indiv[i].treeStruct=NULL;
+				break;
+				}
+			}
+		if(dupe==false){
+			tstructs.push_back(indiv[i].treeStruct);
+			}
+		}
+	
+	//go through the newindiv array
+	for(unsigned i=0;i<conf->nindivs;i++){
+		//check if we have already encountered this treeStruct
+		dupe=false;
+		for(vector<Tree *>::iterator tit=tstructs.begin();tit!=tstructs.end();tit++){
+			if(newindiv[i].treeStruct==(*tit)){
+				dupe=true;
+				newindiv[i].treeStruct=NULL;
+				break;
+				}
+			}
+		if(dupe==false){
+			tstructs.push_back(newindiv[i].treeStruct);
+			}
+		}
+		
+	//go through the unusedTree vector
+	for(vector<Tree*>::iterator vit=unusedTrees.begin();vit!=unusedTrees.end();vit++){
+		dupe=false;
+		for(vector<Tree *>::iterator tit=tstructs.begin();tit!=tstructs.end();tit++){
+			if((*vit)==(*tit)){
+				dupe=true;
+				unusedTrees.erase(vit);
+				vit--;
+				break;
+				}
+			}
+		}
+
+	}
+
+void Population::CheckAllTrees(){//debugging function
+	for(unsigned i=0;i<conf->nindivs;i++){
+		//check that trees are properly formed
+		indiv[i].treeStruct->root->CheckforLeftandRight();
+		indiv[i].treeStruct->root->CheckforPolytomies();
+		indiv[i].treeStruct->root->CheckTreeFormation();
+		//check that no individuals point to the same treeStruct
+		for(unsigned j=i+1;j<conf->nindivs;j++)
+			assert(!(indiv[i].treeStruct==indiv[j].treeStruct));
+			}
+		}
+
+void Population::CheckTreesVsClaManager(){
+	//go through each node for each tree and make sure that the numbers in the assignedClaArray are correct
+/*	int numCopies=claMan->NumCopies();
+	int numNodes=claMan->NumNodes();
+	int count;
+	for(int n=0;n<numNodes;n++){
+		for(int c=0;c<numCopies;c++){
+			count=0;
+			for(int i=0;i<total_size;i++){	
+				if(indiv[i].treeStruct->allNodes[claMan->ReverseConvertNodeIndex(n)]->claIndex==c) count++;
+				}
+			claMan->CheckAssignedNumber(count, n, c);
+			}
+		}
+*/	}
+
+/*		
+int Population::SwapIndividuals(int n, const char* tree_strings_in, FLOAT_TYPE* kappa_probs_in, char** tree_strings_out_, FLOAT_TYPE** kappa_probs_out_)	{
+	char*& tree_strings_out = *tree_strings_out_;
+	FLOAT_TYPE*& kappa_probs_out = *kappa_probs_out_;
+	
+	int* indivs_to_send;
+	GetNRandomIndivIndices(&indivs_to_send, n);
+	GetSpecifiedTreeStrings(&tree_strings_out, n, indivs_to_send);
+	GetSpecifiedKappas(&kappa_probs_out, n, indivs_to_send);
+
+	
+	
+	// determine what to replace out (don't send out our best indiv!)
+	int* indivs_to_replace = new int[n];
+	for (int i = 0; i < n; ++i)	{
+		if (indivs_to_send[i] == (int)cumfit[current_size-1][0])	{
+			indivs_to_replace[i] = ((rand() % (current_size-1))+1 + indivs_to_send[i]) % current_size;
+			assert(indivs_to_replace[i] != (int)cumfit[current_size-1][0]);
+		}
+		else
+			indivs_to_replace[i] = indivs_to_send[i];
+	}
+	
+	EliminateDuplicateTreeReferences();
+	int x;
+	const char *p = tree_strings_in;
+	for (int i = 0; i < n; ++i)	{
+		x = indivs_to_replace[i];
+		assert(x != -1);  // make sure we're not at the end of the array
+		assert(x != (int)cumfit[current_size-1][0]);  // make sure we're not replacing best
+		// put in the new tree
+		indiv[x].treeStruct->RemoveTreeFromAllClas();
+		delete indiv[x].treeStruct;
+		indiv[x].treeStruct = new Tree(p, params->data, sharedcl);
+		indiv[x].treeStruct->AssignCLAsFromMaster();
+		// put in the kappa prob
+		indiv[x].kappa = kappa_probs_in[i];
+		// set some other stuff
+		indiv[x].SetDirty();
+		indiv[x].parent = -1;
+		p += strlen(p) + 1;
+	}
+
+	delete [] indivs_to_replace;
+	delete [] indivs_to_send;
+	return 0;
+}
+*/
+
+/* This is all old parallel stuff not currently being used
+int Population::ReplaceSpecifiedIndividuals(int count, int* which_array, const char* tree_strings, FLOAT_TYPE* model_string)	{
+	//assert(count < CountTreeStrings(tree_strings)); // sanity check
+	int which;
+	for (int i = 0; i < count; ++i)	{
+		which = which_array[i];
+		Individual *ind=&indiv[which];
+		ind->treeStruct->RemoveTreeFromAllClas();
+		topologies[ind->topo]->RemoveInd(which);
+		ind->topo=-1;
+		ind->mutation_type=-1;
+		
+		delete ind->treeStruct;
+		ind->treeStruct = new Tree(tree_strings, true);
+		ind->treeStruct->AssignCLAsFromMaster();
+		ind->mod->SetModel(model_string);
+		ind->treeStruct->modPart=&ind->modPart;
+
+		ind->SetDirty();
+		tree_strings += strlen(tree_strings)+1;
+		ind->treeStruct->modPart=&ind->modPart;
+		}
+	CompactTopologiesList();
+	UpdateTopologyList(indiv);
+	return 0;
+}
+
+int Population::GetNRandomIndivIndices(int** indiv_list, int n)	{
+	int* ar = new int[total_size];
+	for (unsigned i = 0; i < total_size; ++i)
+		ar[i] = i;
+	ScrambleArray<int>(total_size, ar);
+	*indiv_list = new int[n];
+	for (int i = 0; i < n; ++i)
+		(*indiv_list)[i] = ar[i];
+	delete [] ar;
+	return 0;
+}
+
+int Population::GetNBestIndivIndices(int** indiv_list, int n)	{
+	*indiv_list = new int[n];
+	for (int i = 0; i < n; ++i)
+		(*indiv_list)[i] = (int)cumfit[total_size-i-1][0];
+	return 0;
+}
+
+int Population::GetSpecifiedTreeStrings(char** tree_strings_, int n, int* indiv_list)	{
+	char*& tree_strings = *tree_strings_;
+	int buf_size = 0;
+	for (int i = 0; i < n; ++i)	// calc the buff size
+		buf_size += (int) strlen(MakeNewick(indiv_list[i], true)) + 1;
+	char* p = tree_strings = new char[buf_size+1];
+	for (int i = 0; i < n; ++i)
+		p += strlen(strcpy(p, MakeNewick(indiv_list[i], true))) + 1;
+	*p = 0;
+	assert(p-tree_strings == buf_size);
+	return 0;
+}
+
+int Population::GetSpecifiedModels(FLOAT_TYPE** model_string, int n, int* indiv_list){
+	FLOAT_TYPE *&model = *model_string;
+	int string_size=0;
+	//first calculate the appropriate size of the string and allocate it
+	int nrates=modSpec->Nst()-1;
+	string_size+=n*nrates;
+	string_size+=n*4;//the pi's
+	if(indiv[indiv_list[0]].mod->NRateCats()>1) string_size+=1*n;
+#ifdef FLEX_RATES
+	assert(0);
+#else
+	if(indiv[indiv_list[0]].mod->PropInvar()!=ZERO_POINT_ZERO) string_size+=1*n;
+#endif
+	model=new FLOAT_TYPE[string_size];
+	
+	int slot=0;
+	for (int i = 0; i < n; ++i){
+		//get the rates
+		for(int r=0;r<nrates;r++)
+			model[slot++] = indiv[indiv_list[i]].mod->Rates(r);	
+		
+		//get the pi's
+		for(int b=0;b<4;b++)
+			model[slot++] = indiv[indiv_list[i]].mod->StateFreq(b);
+		
+#ifdef FLEX_RATES
+	assert(0);
+#else
+		//get alpha if we are using rate het
+		if(indiv[indiv_list[0]].mod->NRateCats()>1)
+			model[slot++] = indiv[indiv_list[i]].mod->Alpha();
+		
+		//get pinv if we are using invariant sites
+		if(indiv[indiv_list[0]].mod->PropInvar()!=ZERO_POINT_ZERO)
+			model[slot++] = indiv[indiv_list[i]].mod->PropInvar();		
+#endif
+		}
+	return slot;
+	}
+*/
+
+void Population::OutputLog()	{
+	//log << gen << "\t" << bestFitness << "\t" << stopwatch.SplitTime() << "\t" << adap->branchOptPrecision << endl;
+	if(!finishedRep) {
+		log << gen << "\t" << BestFitness() << "\t" << stopwatch.SplitTime() << "\t" << adap->branchOptPrecision;
+		if(conf->reportRunProgress)
+			log << "\t" << 0.01 * (int) ceil(rep_fraction_done * 100) << "\t" << 0.01 * (int) ceil(tot_fraction_done * 100);
+
+		log << endl;
+#ifdef MAC_FRONTEND
+		NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+		NSDictionary *progressDict = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:gen], @"generation", [NSNumber numberWithDouble:BestFitness()], @"likelihood", [NSNumber numberWithInt:stopwatch.SplitTime()], @"time", [NSNumber numberWithDouble:adap->branchOptPrecision], @"precision", [NSNumber numberWithInt:lastTopoImprove], @"lastImprovement", nil];
+		[[MFEInterfaceClient sharedClient] reportProgress:progressDict];
+		[pool release];
+#endif		
+	}
+	else{
+		CalcAverageFitness();
+		log << "Final\t" << BestFitness() << "\t" << stopwatch.SplitTime() << "\t" << adap->branchOptPrecision << endl;
+		}
+	}
+/*
+int Population::ReplicateSpecifiedIndividuals(int count, int* which, const char* tree_string, FLOAT_TYPE *model_string){
+	assert(count > 0 && count <= (int)total_size);
+	for (int i = 0; i < count; ++i)	{
+		indiv[which[i]].treeStruct->RemoveTreeFromAllClas();
+		delete indiv[which[i]].treeStruct;
+		indiv[which[i]].treeStruct = new Tree(tree_string, true);
+		indiv[which[i]].treeStruct->AssignCLAsFromMaster();
+		indiv[which[i]].mod->SetModel(model_string);
+		indiv[which[i]].treeStruct->modPart=&indiv[which[i]].modPart;
+		indiv[which[i]].SetDirty();
+		indiv[which[i]].treeStruct->modPart=&indiv[which[i]].modPart;
+		}
+	return 0;
+}
+*/
+void Population::UpdateTreeModels(){
+	for(unsigned ind=0;ind<total_size;ind++){
+		newindiv[ind].treeStruct->modPart=&newindiv[ind].modPart;
+//		indiv[ind].treeStruct->mod=indiv[ind].mod;
+		}
+	}
+
+FLOAT_TYPE Population::IndivFitness(int i) {
+	return indiv[i].Fitness();
+	}
+
+void Population::OutputModelAddresses(){
+	ofstream mods("modeldeb.log", ios::app);
+	
+	for(unsigned i=0;i<total_size;i++){
+		mods << "indiv " << i << "\t" << &indiv[i].modPart << "\t" << indiv[i].treeStruct->modPart << "\n";
+		mods << "newindiv " << i << "\t" << &newindiv[i].modPart << "\t" << newindiv[i].treeStruct->modPart << "\n";
+		}
+	mods << endl;
+	}
+
+bool Population::NNIoptimization(unsigned indivIndex, int steps){
+	Individual  currentBest;
+	Individual  tempIndiv1, tempIndiv2, *best;
+	int beginNode, endNode, optiNode;
+	FLOAT_TYPE bestNNIFitness; 
+	FLOAT_TYPE startingFitness;
+	bool betterScore=false;
+	
+//	ofstream outf("nnidebug.tre");
+//	ofstream scr("nniscores.tre");
+	ofstream out;
+	
+	beginNode = newindiv[indivIndex].treeStruct->getNumTipsTotal() + 1;
+	endNode = beginNode * 2 - 5;
+	startingFitness = indiv[newindiv[indivIndex].parent].Fitness();
+	bestNNIFitness = -FLT_MAX;
+	
+	steps = min(max(0,steps),newindiv[indivIndex].treeStruct->getNumTipsTotal()-3);
+	indivIndex = min(max(0,(int)indivIndex),(int)conf->nindivs-1);
+
+	//DJZ
+	while(unusedTrees.size()<3){
+		Tree *temp=new Tree();
+		unusedTrees.push_back(temp);
+		}
+	
+	tempIndiv1.treeStruct=*(unusedTrees.end()-1);
+	unusedTrees.pop_back();
+	tempIndiv2.treeStruct=*(unusedTrees.end()-1);
+	unusedTrees.pop_back();
+	currentBest.treeStruct=*(unusedTrees.end()-1);
+	unusedTrees.pop_back();	
+	//
+
+	tempIndiv1.CopySecByRearrangingNodesOfFirst(tempIndiv1.treeStruct, &newindiv[indivIndex]);
+	tempIndiv2.CopySecByRearrangingNodesOfFirst(tempIndiv2.treeStruct, &newindiv[indivIndex]);
+	currentBest.CopySecByRearrangingNodesOfFirst(currentBest.treeStruct, &newindiv[indivIndex]);
+
+	for(int i =0;i<steps;i++){
+	  /*  debug information
+	    cout <<"Begin exNNI mutation " <<subtreeM emberNodes.size()<<endl;
+	    cout <<"Subtree node " << subtreeNode <<endl;
+	    cout <<beginNode << "<->"  << endNode<<endl;
+	    for(int i=0;i<subtreeM emberNodes.size() ;i++)cout << subtreeM emberNodes[i]<< "| " ;
+	    cout <<endl;
+	  */
+	  assert(0);
+/*	  
+#ifdef MPI_VERSION
+		for(int i=0;i<(subtreeMemberNodes.size()/2-1);i++)
+		  {
+		    optiNode = subtreeMemberNodes[i];
+#else
+		    for(optiNode=beginNode;optiNode<=endNode;optiNode++)
+		      {
+#endif
+*/
+		for(optiNode=beginNode;optiNode<=endNode;optiNode++){
+			tempIndiv1.treeStruct->NNIMutate(optiNode,0, adap->branchOptPrecision, 0);
+			tempIndiv2.treeStruct->NNIMutate(optiNode,1, adap->branchOptPrecision, 0);
+
+			//newindiv[0].treeStruct->SetAllTempClasDirty();
+
+			tempIndiv1.SetDirty();
+			tempIndiv2.SetDirty();
+			
+			tempIndiv1.CalcFitness(0);
+			tempIndiv2.CalcFitness(0);
+			
+			FLOAT_TYPE improvement = (FLOAT_TYPE)0.01;
+			improvement = adap->recTopImproveSize;
+
+			if(tempIndiv1.Fitness() > (bestNNIFitness) || tempIndiv2.Fitness() > (bestNNIFitness)){
+				if(tempIndiv1.Fitness() > tempIndiv2.Fitness()) best=&tempIndiv1;
+				else best=&tempIndiv2;
+				
+				bestNNIFitness = best->Fitness();
+			
+				currentBest.CopySecByRearrangingNodesOfFirst(currentBest.treeStruct, best, true);
+				if(bestNNIFitness > startingFitness) betterScore=true;
+				}
+		
+			//if the best tree we've found by NNI is better than what we started with, use it
+			//for successive NNI attempts in this function
+			if(bestNNIFitness > startingFitness){
+			tempIndiv1.CopySecByRearrangingNodesOfFirst(tempIndiv1.treeStruct, &currentBest, true);
+			tempIndiv2.CopySecByRearrangingNodesOfFirst(tempIndiv2.treeStruct, &currentBest, true);
+				}
+			else{//otherwise, revert to the starting tree
+				tempIndiv1.CopySecByRearrangingNodesOfFirst(tempIndiv1.treeStruct, &newindiv[indivIndex], true);
+				tempIndiv2.CopySecByRearrangingNodesOfFirst(tempIndiv2.treeStruct, &newindiv[indivIndex], true);								
+				}
+			} //end of loop through all possible NNIs 
+		
+	//copy the best tree that we found back into the population, whether or not it was better than what we
+	//started with
+	newindiv[indivIndex].CopySecByRearrangingNodesOfFirst(newindiv[indivIndex].treeStruct, &currentBest, true);
+	} //end of loop through steps
+	
+	//Return the treestructs that we used temporarily back to the unused tree vector
+	tempIndiv1.treeStruct->RemoveTreeFromAllClas();
+	unusedTrees.push_back(tempIndiv1.treeStruct);
+	tempIndiv1.treeStruct=NULL;
+
+	tempIndiv2.treeStruct->RemoveTreeFromAllClas();
+	unusedTrees.push_back(tempIndiv2.treeStruct);
+	tempIndiv2.treeStruct=NULL;
+
+	currentBest.treeStruct->RemoveTreeFromAllClas();
+	unusedTrees.push_back(currentBest.treeStruct);
+	currentBest.treeStruct=NULL;
+	
+//	newindiv[indivIndex].treeStruct->SetAllTempClasDirty();
+//	newindiv[indivIndex].mutation_type |= Individual::exNNI;
+
+	return betterScore;
+}
+
+/* End of methods added by Yufeng Zhang*/
+
+void Population::NNISpectrum(int sourceInd){
+	Individual  tempIndiv1, tempIndiv2;
+	int optiNode;
+	FLOAT_TYPE previousFitness; 
+	FLOAT_TYPE scorediff=ZERO_POINT_ZERO;
+	//FLOAT_TYPE thresh=pertMan->nniAcceptThresh;
+
+	int numNodes=indiv[sourceInd].treeStruct->getNumTipsTotal()-3;
+	int *nodeArray=new int[numNodes];
+	
+	for(int i=0;i<numNodes;i++){
+		//get all of the nodes, in order
+		nodeArray[i]=numNodes+i+4;
+		}
+
+	previousFitness = indiv[sourceInd].Fitness();
+
+	//DJZ
+	while(unusedTrees.size()<3){
+		Tree *temp=new Tree();
+		unusedTrees.push_back(temp);
+		}
+	
+	tempIndiv1.treeStruct=*(unusedTrees.end()-1);
+	unusedTrees.pop_back();
+	tempIndiv2.treeStruct=*(unusedTrees.end()-1);
+	unusedTrees.pop_back();
+
+	tempIndiv1.CopySecByRearrangingNodesOfFirst(tempIndiv1.treeStruct, &indiv[sourceInd]);
+	tempIndiv2.CopySecByRearrangingNodesOfFirst(tempIndiv2.treeStruct, &indiv[sourceInd]);
+
+	//make all the nodes dirty of all of the trees in the actual population, since they 
+	//will be replaced by the perturbed individual and will take up valuable clas
+	for(unsigned i=0;i<total_size;i++)
+		indiv[i].treeStruct->MakeAllNodesDirty();
+
+	tempGlobal=1;
+	OutputFilesForScoreDebugging(&tempIndiv1, tempGlobal++);
+	FLOAT_TYPE localprec;
+	FLOAT_TYPE prec[7]={(FLOAT_TYPE).5, (FLOAT_TYPE).25, (FLOAT_TYPE).1, (FLOAT_TYPE).05, (FLOAT_TYPE).01, (FLOAT_TYPE).005, (FLOAT_TYPE).001};
+	for(int q=0;q<7;q++){
+		localprec=prec[q];
+
+		char filename[50];
+	//	sprintf(filename, "%d.%.4fscores.log", gen, localprec);
+		ofstream temp(filename);
+		temp.precision(12);
+		temp << "start\t" << BestFitness() << "\n";
+
+
+		for(int i=0;i<numNodes;i++){
+
+			optiNode=nodeArray[i];
+
+			tempIndiv1.treeStruct->NNIMutate(optiNode,0, localprec, 0);
+			tempIndiv2.treeStruct->NNIMutate(optiNode,1, localprec, 0);
+
+	//		tempIndiv1.SetDirty();
+	//		tempIndiv2.SetDirty();
+			
+			tempIndiv1.SetFitness(tempIndiv1.treeStruct->lnL);
+			tempIndiv2.SetFitness(tempIndiv2.treeStruct->lnL);
+
+
+			temp << tempIndiv1.Fitness() << "\n" << tempIndiv2.Fitness() << "\n";
+			if(q==0){
+				OutputFilesForScoreDebugging(&tempIndiv1, tempGlobal++);
+				OutputFilesForScoreDebugging(&tempIndiv2, tempGlobal++);
+				}
+			FLOAT_TYPE diff1=tempIndiv1.Fitness() - previousFitness;
+			FLOAT_TYPE diff2=tempIndiv2.Fitness() - previousFitness;
+
+			tempIndiv1.CopySecByRearrangingNodesOfFirst(tempIndiv1.treeStruct, &indiv[sourceInd], true);
+			tempIndiv2.CopySecByRearrangingNodesOfFirst(tempIndiv2.treeStruct, &indiv[sourceInd], true);
+			}		
+		temp.close();
+		}
+	
+	//Return the treestructs that we used temporarily back to the unused tree vector
+	tempIndiv1.treeStruct->RemoveTreeFromAllClas();
+	unusedTrees.push_back(tempIndiv1.treeStruct);
+	tempIndiv1.treeStruct=NULL;
+
+	tempIndiv2.treeStruct->RemoveTreeFromAllClas();
+	unusedTrees.push_back(tempIndiv2.treeStruct);
+	tempIndiv2.treeStruct=NULL;
+
+	delete []nodeArray;
+}
+
+#ifdef INCLUDE_PERTURBATION
+void Population::NNIPerturbation(int sourceInd, int indivIndex){
+	Individual  currentBest;
+	Individual  tempIndiv1, tempIndiv2, *best;
+	int optiNode;
+	FLOAT_TYPE previousFitness; 
+//	bool betterScore=false;
+	FLOAT_TYPE scorediff=ZERO_POINT_ZERO;
+	FLOAT_TYPE thresh=pertMan->nniAcceptThresh;
+	int nummoves=0;
+	
+	ofstream out;
+	
+//	int numNodes=indiv[indivIndex].treeStruct->getNumTipsTotal()-3;
+//	int *nodeArray=new int[numNodes];
+/*	
+	for(int i=0;i<numNodes;i++){
+		nodeArray[i]=indiv[indivIndex].treeStruct->GetRandomInternalNode();
+		//get all of the nodes, in order
+//		nodeArray[i]=numNodes+i+4;
+		}
+*/
+//	ScrambleArray(numNodes, nodeArray);
+
+	previousFitness = indiv[sourceInd].Fitness();
+
+	//DJZ
+	while(unusedTrees.size()<3){
+		Tree *temp=new Tree();
+		unusedTrees.push_back(temp);
+		}
+	
+	tempIndiv1.treeStruct=*(unusedTrees.end()-1);
+	unusedTrees.pop_back();
+	tempIndiv2.treeStruct=*(unusedTrees.end()-1);
+	unusedTrees.pop_back();
+	currentBest.treeStruct=*(unusedTrees.end()-1);
+	unusedTrees.pop_back();	
+	//
+
+	tempIndiv1.CopySecByRearrangingNodesOfFirst(tempIndiv1.treeStruct, &indiv[sourceInd]);
+	tempIndiv2.CopySecByRearrangingNodesOfFirst(tempIndiv2.treeStruct, &indiv[sourceInd]);
+	currentBest.CopySecByRearrangingNodesOfFirst(currentBest.treeStruct, &indiv[sourceInd]);
+
+	int n=2;
+	
+	//make all the nodes dirty of all of the trees in the actual population, since they 
+	//will be replaced by the perturbed individual and will take up valuable clas
+	for(unsigned i=0;i<total_size;i++)
+		indiv[i].treeStruct->MakeAllNodesDirty();
+
+	char filename[50];
+	if(rank < 10)
+		sprintf(filename, "pertreport0%d.log", rank);
+	else 
+		sprintf(filename, "pertreport%d.log", rank);
+	ofstream pert(filename, ios::app);
+	pert.precision(10);
+	pert << "gen\t" << gen << "\tstart\t" << BestFitness() << "\n";
+
+	outman.UserMessage("Performing NNI Perturbation.  Starting score= %.4f", BestFitness());
+
+	
+/*	char filename[50];
+	FLOAT_TYPE localprec=.5;
+	sprintf(filename, "%d.%.4fscores.log", gen, localprec);
+	ofstream temp(filename);
+	temp.precision(12);
+	temp << "start\t" << BestFitness() << "\n";
+*/
+
+//	for(int i=0;i<numNodes;i++){
+	int attempts, accepts;
+	for(accepts=0, attempts=0;(accepts<pertMan->nniTargetAccepts) && (attempts <= pertMan->nniMaxAttempts);){
+		if(! (attempts++ % (pertMan->nniMaxAttempts/20))) outman.UserMessage(".");
+		outman.flush();
+
+		optiNode=indiv[indivIndex].treeStruct->GetRandomInternalNode();
+//		optiNode=nodeArray[i];
+
+//		tempIndiv1.treeStruct->NNIMutate(optiNode,0, localprec, 0);
+//		tempIndiv2.treeStruct->NNIMutate(optiNode,1, localprec, 0);
+
+		tempIndiv1.treeStruct->NNIMutate(optiNode,0, adap->branchOptPrecision, 0);
+		tempIndiv2.treeStruct->NNIMutate(optiNode,1, adap->branchOptPrecision, 0);
+
+//		tempIndiv1.SetDirty();
+//		tempIndiv2.SetDirty();
+		
+		tempIndiv1.SetFitness(tempIndiv1.treeStruct->lnL);
+		tempIndiv2.SetFitness(tempIndiv2.treeStruct->lnL);
+
+
+//		temp << tempIndiv1.Fitness() << "\n" << tempIndiv2.Fitness() << "\n";
+
+		FLOAT_TYPE diff1=tempIndiv1.Fitness() - previousFitness;
+		FLOAT_TYPE diff2=tempIndiv2.Fitness() - previousFitness;
+
+		//ignore NNI's that improve the fitness, because they are probably just undoing a previous NNI
+//		if(((diff1 < ZERO_POINT_ZERO) && (diff1 + thresh > ZERO_POINT_ZERO)) || ((diff2 < ZERO_POINT_ZERO) && (diff2 + thresh > ZERO_POINT_ZERO))){
+//			if((diff1 < ZERO_POINT_ZERO) && ((diff1 > diff2) || (diff2 >= ZERO_POINT_ZERO))) best=&tempIndiv1;
+		if(diff1 < ZERO_POINT_ZERO || diff2 < ZERO_POINT_ZERO){
+			if((diff1 < ZERO_POINT_ZERO) && ((diff1 > diff2) || (diff2 >= ZERO_POINT_ZERO))) best=&tempIndiv1;
+			else best=&tempIndiv2;
+			
+			FLOAT_TYPE acceptanceProb=exp(-conf->selectionIntensity * (previousFitness - best->Fitness()));
+			if(rnd.uniform() < acceptanceProb){
+				FLOAT_TYPE thisdiff=best->Fitness() - previousFitness;
+				assert(thisdiff < 0);
+				scorediff += thisdiff;
+				accepts++;
+				previousFitness = best->Fitness();
+				pert << accepts << "\t" << optiNode << "\t" << thisdiff << "\n";
+			
+				currentBest.CopySecByRearrangingNodesOfFirst(currentBest.treeStruct, best, true);
+				}
+			}
+
+		tempIndiv1.CopySecByRearrangingNodesOfFirst(tempIndiv1.treeStruct, &currentBest, true);
+		tempIndiv2.CopySecByRearrangingNodesOfFirst(tempIndiv2.treeStruct, &currentBest, true);
+		}
+		
+	indiv[indivIndex].CopySecByRearrangingNodesOfFirst(indiv[indivIndex].treeStruct, &currentBest, true);
+	
+	//Return the treestructs that we used temporarily back to the unused tree vector
+	tempIndiv1.treeStruct->RemoveTreeFromAllClas();
+	unusedTrees.push_back(tempIndiv1.treeStruct);
+	tempIndiv1.treeStruct=NULL;
+
+	tempIndiv2.treeStruct->RemoveTreeFromAllClas();
+	unusedTrees.push_back(tempIndiv2.treeStruct);
+	tempIndiv2.treeStruct=NULL;
+
+	currentBest.treeStruct->RemoveTreeFromAllClas();
+	unusedTrees.push_back(currentBest.treeStruct);
+	currentBest.treeStruct=NULL;
+	
+  	UpdateTopologyList(indiv);
+	indiv[indivIndex].SetDirty();
+	indiv[indivIndex].CalcFitness(0);
+	AssignNewTopology(indiv, indivIndex);
+	UpdateTopologyList(indiv);
+	
+	SetNewBestIndiv(indivIndex);
+	indiv[indivIndex].treeStruct->calcs=calcCount;
+	calcCount=0;
+	indiv[indivIndex].mutation_type=-1;
+	pert << "end\t" << indiv[indivIndex].Fitness() << "\n";
+	
+	outman.UserMessage("Completed Perturbation.\n  %d NNI's accepted in %d attempts. Current score= %.4f", accepts, attempts, BestFitness());
+	
+//	delete []nodeArray;
+}
+
+void Population::TurnOffRatchet(){
+	data->RestoreOriginalCounts();
+	pertMan->ratcheted=false;
+	
+	claMan->MakeAllHoldersDirty();
+	for(unsigned i=0;i<total_size;i++) indiv[i].SetDirty();
+	CalcAverageFitness();
+	bestFitness=BestFitness();
+	pertMan->lastPertGeneration=gen;
+	adap->reset=true;
+	outman.UserMessage("Returning to normal character weighting...");
+	char filename[50];
+	if(rank < 10)
+		sprintf(filename, "pertreport0%d.log", rank);
+	else 
+		sprintf(filename, "pertreport%d.log", rank);
+	ofstream pert(filename, ios::app);
+	pert << "Returning to normal character weighting..." << endl;
+	pert.close();
+	}
+
+void Population::RestoreAllTimeBest(){
+	UpdateTopologyList(indiv);
+	topologies[indiv[0].topo]->RemoveInd(0);
+	CompactTopologiesList();
+	indiv[0].CopySecByRearrangingNodesOfFirst(indiv[0].treeStruct, allTimeBest, true);
+	indiv[0].treeStruct->AssignCLAsFromMaster();
+	AssignNewTopology(indiv, 0);
+	indiv[0].CalcFitness(0);
+	SetNewBestIndiv(0);
+	FillPopWithClonesOfBest();
+	CalcAverageFitness();
+	}
+
+void Population::RestoreBestForPert(){
+	UpdateTopologyList(indiv);
+	topologies[indiv[0].topo]->RemoveInd(0);
+	CompactTopologiesList();
+	indiv[0].CopySecByRearrangingNodesOfFirst(indiv[0].treeStruct, bestSinceRestart, true);
+	indiv[0].treeStruct->AssignCLAsFromMaster();
+	AssignNewTopology(indiv, 0);
+	indiv[0].CalcFitness(0);
+	SetNewBestIndiv(0);
+	FillPopWithClonesOfBest();
+	CalcAverageFitness();
+	char filename[50];
+	if(rank < 10)
+		sprintf(filename, "pertreport0%d.log", rank);
+	else 
+		sprintf(filename, "pertreport%d.log", rank);
+	ofstream pert(filename, ios::app);
+	pert.precision(10);
+	pert << "restoring best individual with score of " << indiv[0].Fitness() << "\n";
+	pert.close();
+	outman.UserMessage("restoring best individual with score of %.4f\n %d perturbation(s) performed without improvement.", bestSinceRestart->Fitness(), pertMan->numPertsNoImprove);
+	}
+
+void Population::StoreBestForPert(){
+	if(BestFitness() > allTimeBest->Fitness()) StoreAllTimeBest();
+	
+	if(bestSinceRestart->treeStruct==NULL){
+		if(unusedTrees.empty()){
+			Tree *temp=new Tree();
+			unusedTrees.push_back(temp);
+			}					
+		bestSinceRestart->treeStruct=*(unusedTrees.end()-1);
+		unusedTrees.pop_back();
+		}
+	bestSinceRestart->CopySecByRearrangingNodesOfFirst(bestSinceRestart->treeStruct, &indiv[bestIndiv]);
+	bestSinceRestart->topo=-1;
+	//need to do this to be sure that the bestSinceRestart isn't tying up clas
+	bestSinceRestart->treeStruct->RemoveTreeFromAllClas();
+	
+	char filename[50];
+	if(rank < 10)
+		sprintf(filename, "pertreport0%d.log", rank);
+	else 
+		sprintf(filename, "pertreport%d.log", rank);
+	ofstream pert(filename, ios::app);
+	pert.precision(10);
+	pert << "storing best individual with score of " << bestSinceRestart->Fitness() << "\n";
+	pert.close();
+	outman.UserMessage("storing best individual with score of %.4f", bestSinceRestart->Fitness());
+	}
+
+void Population::StoreAllTimeBest(){
+	WriteTreeFile(besttreefile);
+	if(allTimeBest->treeStruct==NULL){
+		if(unusedTrees.empty()){
+			Tree *temp=new Tree();
+			unusedTrees.push_back(temp);
+			}					
+		allTimeBest->treeStruct=*(unusedTrees.end()-1);
+		unusedTrees.pop_back();
+		}
+	allTimeBest->CopySecByRearrangingNodesOfFirst(allTimeBest->treeStruct, &indiv[bestIndiv]);
+	allTimeBest->topo=-1;
+	//need to do this to be sure that the alltimebest isn't tying up clas
+	allTimeBest->treeStruct->RemoveTreeFromAllClas();
+	}
+#endif
+
+void Population::keepTrack(){
+
+	if(((gen-1)%adap->intervalLength)==0){
+		if(gen>1) adap->PrepareForNextInterval();
+		}
+
+	//remember that the indiv and newindiv arrays have already been switched, so the newindivs are the parents of the indivs
+
+	//adap->reset will be true if we've Ratcheted, in which case the scores will be noncomparable
+	//so reset these values
+	if(adap->reset==true){
+		adap->laststepscore=BestFitness();
+		adap->lastgenscore=BestFitness();
+		adap->reset=false;
+		}
+	
+	if(gen==1)
+		adap->lastgenscore = adap->laststepscore = newindiv[0].Fitness();
+		
+	adap->improvetotal[0] = BestFitness() - adap->laststepscore;
+
+	for(unsigned i=0;i<conf->nindivs;i++){
+//		FLOAT_TYPE scoreDif=indiv[i].Fitness() - newindiv[indiv[i].parent].Fitness();
+		FLOAT_TYPE scoreDif=indiv[i].Fitness() - adap->lastgenscore;
+		int typ = indiv[i].mutation_type;
+		if(typ > 0){
+			if(scoreDif>0){
+	//			if(i==bestIndiv){
+					//keep track of when the last significant beneficial topo mutation occured
+					//this will be used for the stopping criterion, precision reduction and update reduction in the parallel version
+#ifndef NO_EVOLUTION
+
+#ifdef IGNORE_SMALL_TOPO_IMP
+					if(typ&Individual::anyTopo){
+						if(i == bestIndiv && scoreDif > significantTopoChange){
+							indiv[0].treeStruct->attemptedSwaps.ClearAttemptedSwaps();
+							indiv[0].treeStruct->CalcBipartitions(true);
+							indiv[i].treeStruct->CalcBipartitions(true);
+							if(indiv[0].treeStruct->IdenticalTopology(indiv[i].treeStruct->root)==false){
+								lastTopoImprove=gen;
+								if(i == bestIndiv){
+									AppendTreeToTreeLog(indiv[bestIndiv].mutation_type);
+									}
+								}
+							}
+						else{//just ignore this small improvement.  Kill the individual's chance							
+							//of reproducing
+							FLOAT_TYPE scr=indiv[i].Fitness();
+							indiv[i].SetFitness(-FLT_MAX);
+							indiv[i].treeStruct->lnL = -FLT_MAX;
+							CalcAverageFitness();
+							bestIndiv=(int) cumfit[3][0];
+							indiv[i].SetFitness(scr);
+							}
+						}
+
+#else
+					if(typ&Individual::anyTopo || adap->topoWeight==ZERO_POINT_ZERO){
+						//clearing of the swaps records needs to be done for _any_ new best topo, not
+						//just ones that are significantly better
+						indiv[0].treeStruct->CalcBipartitions(true);
+						indiv[i].treeStruct->CalcBipartitions(true);
+						bool sameTopo = indiv[0].treeStruct->IdenticalTopologyAllowingRerooting(indiv[i].treeStruct->root);
+						//if this is a new best and isn't the same topology, clear the swaplist
+						if(i == bestIndiv && sameTopo == false)
+							indiv[0].treeStruct->attemptedSwaps.ClearAttemptedSwaps();
+
+						if(scoreDif > conf->significantTopoChange){
+							//if this is a new best, it is a different topology and it is significantly better 
+							//update the lastTopoImprove
+							if(sameTopo == false){
+								lastTopoImprove=gen;
+								if(i == bestIndiv){
+									AppendTreeToTreeLog(indiv[bestIndiv].mutation_type);
+									}
+								}
+							else if(adap->topoWeight==ZERO_POINT_ZERO){
+								if(i == bestIndiv){
+									AppendTreeToTreeLog(indiv[bestIndiv].mutation_type);
+									}
+								}
+							}
+					}
+#endif
+#endif
+					
+					if(typ&(Individual::randNNI)){
+						adap->randNNI[0] += scoreDif;
+						}
+//					if(typ&(Individual::exNNI)) 		adap->exNNI[0] += scoreDif;
+					if(typ&(Individual::randSPR)) 	adap->randSPR[0] += scoreDif;
+					if(typ&(Individual::limSPR)) 		adap->limSPR[0] += scoreDif;
+//					if(typ&(Individual::exlimSPR)) 	 	adap->exlimSPR[0] += scoreDif;
+	#ifdef GANESH
+					if(typ&(Individual::randPECR)) 	 	adap->randPECR[0] += scoreDif;
+	#endif
+		//			if(typ&(Individual::taxonSwap)) 	adap->taxonSwap[0] += scoreDif; 
+					if(typ == (Individual::brlen)) 		adap->onlyBrlen[0] += scoreDif;
+					if(typ&(Individual::bipartRecom)) adap->bipartRecom[0] += scoreDif;
+					if(typ&(Individual::randRecom)) 	adap->randRecom[0] += scoreDif;
+					if(typ&(Individual::anyModel)) 	adap->anyModel[0] += scoreDif;
+					
+	#ifdef MPI_VERSION
+					if(scoreDif > adap->branchOptPrecision){
+						if(typ&(Individual::bipartRecom)) adap->bestFromRemote[0] += scoreDif;
+						if(typ&(Individual::bipartRecom)) adap->bestFromRemoteNum[0] ++;
+						if(typ&(Individual::subtreeRecom)) adap->bestFromRemote[0] += scoreDif;
+						if(typ&(Individual::subtreeRecom)) adap->bestFromRemoteNum[0] ++;
+						}
+	#endif
+	//				}
+				}
+			if(typ&(Individual::randNNI)) 	adap->randNNInum[0]++;
+//			if(typ&(Individual::exNNI)) 	 	adap->exNNInum[0]++;
+			if(typ&(Individual::randSPR)) 	adap->randSPRnum[0]++;
+			if(typ&(Individual::limSPR))	 	adap->limSPRnum[0]++;
+//			if(typ&(Individual::exlimSPR)) 	adap->exlimSPRnum[0]++;
+	#ifdef GANESH
+			if(typ&(Individual::randPECR)) 	adap->randPECRnum[0]++;
+	#endif
+		//	if(typ&(Individual::taxonSwap)) 	adap->taxonSwapnum[0]++;
+			if(typ == (Individual::brlen)) 	adap->onlyBrlennum[0]++;
+			if(typ&(Individual::bipartRecom)) adap->bipartRecomnum[0]++;
+			if(typ&(Individual::randRecom)) 	adap->randRecomnum[0]++;
+			if(typ&(Individual::anyModel))		adap->anyModelnum[0]++;
+			}
+		}
+
+	adap->lastgenscore=BestFitness();
+
+	//things to do on the final generation of an interval	
+	if(gen%adap->intervalLength==0){
+		//improveOverStoredIntervals is only used on generations that are multiples of intervalLength
+		//so it won't contain the improvement in the latest interval until it's end
+		adap->improveOverStoredIntervals=ZERO_POINT_ZERO;
+		for(unsigned i=0;i<adap->intervalsToStore;i++)
+			adap->improveOverStoredIntervals += adap->improvetotal[i];
+		if(adap->improveOverStoredIntervals < ZERO_POINT_ZERO) adap->improveOverStoredIntervals = ZERO_POINT_ZERO;
+		//update the mutation probailities
+		if(gen>=(adap->intervalLength*adap->intervalsToStore*ZERO_POINT_FIVE)){
+			adap->UpdateProbs();
+			if(conf->outputMostlyUselessFiles) adap->OutputProbs(probLog, gen);
+			}
+		adap->laststepscore=BestFitness();
+		}
+	}
+
+int ParallelManager::DetermineSubtrees(Tree *tr, ofstream &scr){
+	//Determine what the best node we could choose to be the root would be in terms of 
+	//the partitioning efficiency
+
+	TreeNode *nd=tr->root;
+
+	int bestRoot=0, orphans=ntax;
+	bool done=false;
+	FLOAT_TYPE bestScore=ZERO_POINT_ZERO;
+	FLOAT_TYPE thisScore;
+
+	ClearSubtrees();
+	
+	//trying new partitioning function
+	int one=0, two=0, three=0;
+	vector<Subtree *> sub1, sub2, sub3;
+	if(nd->left->left) NewPartition(nd->left, one, sub1);
+	if(nd->left->next->left) NewPartition(nd->left->next, two, sub2);
+	if(nd->right->left) NewPartition(nd->right, three, sub3);
+	for(vector<Subtree*>::iterator it = sub1.begin();it!=sub1.end();it++){
+		bestScore += (*it)->score;
+		(*it)->Log(scr);
+		orphans -= (*it)->taxa;
+		delete *it;
+   		}
+	for(vector<Subtree*>::iterator it = sub2.begin();it!=sub2.end();it++){
+		bestScore += (*it)->score;
+		(*it)->Log(scr);
+		orphans -= (*it)->taxa;
+		delete *it;
+   		}
+	for(vector<Subtree*>::iterator it = sub3.begin();it!=sub3.end();it++){
+		bestScore += (*it)->score;
+		(*it)->Log(scr);
+		orphans -= (*it)->taxa;
+		delete *it;
+   		}
+   	bestScore += pow((FLOAT_TYPE)(orphans), orphanFactor);
+
+	scr << "root " << nd->nodeNum << " score " << bestScore << " orphans " << orphans << endl;
+   		
+   	sub1.clear();
+   	sub2.clear();
+	sub3.clear();
+	
+	nd=nd->left;
+
+	while(!done){
+
+		if(nd->CountTerminals(0) > minSubtreeSize){
+			orphans=ntax;
+			//ClearSubtrees();
+			if(nd->left->left) NewPartition(nd->left, one, sub1);
+			if(nd->right->left) NewPartition(nd->right, two, sub2);
+			NewPartitionDown(nd->anc, nd, three, sub3);
+			
+			thisScore=ZERO_POINT_ZERO;
+			for(vector<Subtree*>::iterator it = sub1.begin();it!=sub1.end();it++){
+				thisScore += (*it)->score;
+				(*it)->Log(scr);
+				orphans -= (*it)->taxa;
+				delete *it;
+		   		}
+			for(vector<Subtree*>::iterator it = sub2.begin();it!=sub2.end();it++){
+				thisScore += (*it)->score;
+				(*it)->Log(scr);
+				orphans -= (*it)->taxa;
+				delete *it;
+		   		}
+			for(vector<Subtree*>::iterator it = sub3.begin();it!=sub3.end();it++){
+				thisScore += (*it)->score;
+				(*it)->Log(scr);
+				orphans -= (*it)->taxa;		
+				delete *it;
+		   		}
+		   	thisScore+=pow((FLOAT_TYPE)(orphans), orphanFactor);
+		   	scr << "root " << nd->nodeNum << " score " << thisScore << " orphans " << orphans << endl;
+		   	sub1.clear();
+		   	sub2.clear();
+			sub3.clear();			
+		
+			if(thisScore < bestScore){
+				bestScore=thisScore;
+				bestRoot=nd->nodeNum;
+				}
+			}
+		
+		if(nd->left != NULL){
+			nd=nd->left;
+			}
+		else if(nd->next != NULL){
+			nd=nd->next;
+			}
+		else{
+			while(nd->anc!=NULL){
+				nd=nd->anc;
+				if(nd->next != NULL){
+					nd=nd->next;
+					break;
+					}
+				}
+			if(nd->anc==NULL){
+				done=true;
+				}
+			}
+		}
+	return bestRoot;
+/*	
+	if(nd->left->CountBranches(0)>1)
+		Partition(nd->left);
+	if(nd->left->next->CountBranches(0)>1)
+		Partition(nd->left->next);
+	if(nd->right->CountBranches(0)>1)
+		Partition(nd->right);
+	FLOAT_TYPE bestScore=ScorePartitioning(nd->nodeNum, pscores);	
+	FLOAT_TYPE thisScore;
+	
+	nd=nd->left;
+
+	while(!done){
+		if(nd->CountTerminals(0) > minSubtreeSize){
+			ClearSubtrees();
+			Partition(nd->left);		
+			Partition(nd->right);
+			PartitionDown(nd->anc, nd);
+				
+			thisScore=ScorePartitioning(nd->nodeNum, pscores);
+			
+			if(thisScore < bestScore){
+				bestScore=thisScore;
+				bestRoot=nd->nodeNum;
+				}
+			}
+		
+		if(nd->left != NULL){
+			nd=nd->left;
+			}
+		else if(nd->next != NULL){
+			nd=nd->next;
+			}
+		else{
+			while(nd->anc!=NULL){
+				nd=nd->anc;
+				if(nd->next != NULL){
+					nd=nd->next;
+					break;
+					}
+				}
+			if(nd->anc==NULL){
+				done=true;
+				}
+			}
+		}
+	return bestRoot;
+*/	}
+	
+	
+void Population::StartSubtreeMode(){
+	OutputFate();
+	gen++;
+
+	bool subtreesOK=false;
+	int attempt=1;
+	
+	int origMinSubtreeSize=paraMan->minSubtreeSize;
+	int origTargetSubtreeSize=paraMan->targetSubtreeSize;
+	FLOAT_TYPE origOrphanFactor=paraMan->orphanFactor;
+
+	ofstream pscores("partscores.log", ios::app);
+
+	do{
+		pscores << "gen " << gen << " attempt " <<  attempt << endl;
+		int bestRoot=paraMan->DetermineSubtrees(indiv[bestIndiv].treeStruct, pscores);	
+		//now we need to reroot to the best root found
+
+		pscores << "best root=" << bestRoot << "\n";
+
+		if(bestRoot!=0){
+			indiv[bestIndiv].treeStruct->RerootHere(bestRoot);
+			}
+
+		//mark all of the trees inaccurate
+		for(unsigned i=0;i<total_size;i++){
+			indiv[i].accurateSubtrees=false;
+			newindiv[i].accurateSubtrees=false;
+			}
+
+		indiv[bestIndiv].accurateSubtrees=true;
+		FillPopWithClonesOfBest();
+
+		TreeNode *nd=indiv[bestIndiv].treeStruct->root;
+
+		int orphans=paraMan->ntax;
+		bool done=false;
+		FLOAT_TYPE bestScore=ZERO_POINT_ZERO;
+
+		//trying new partitioning function
+		int one=0, two=0, three=0;
+		vector<Subtree *> sub1, sub2, sub3;
+		if(nd->left->left) paraMan->NewPartition(nd->left, one, sub1);
+		if(nd->left->next->left) paraMan->NewPartition(nd->left->next, two, sub2);
+		if(nd->right->left) paraMan->NewPartition(nd->right, three, sub3);
+		for(vector<Subtree*>::iterator it = sub1.begin();it!=sub1.end();it++){
+			bestScore += (*it)->score;
+			orphans -= (*it)->taxa;
+			paraMan->subtrees.push_back(*it);
+	   		}
+		for(vector<Subtree*>::iterator it = sub2.begin();it!=sub2.end();it++){
+			bestScore += (*it)->score;
+			orphans -= (*it)->taxa;
+			paraMan->subtrees.push_back(*it);
+	   		}
+		for(vector<Subtree*>::iterator it = sub3.begin();it!=sub3.end();it++){
+			bestScore += (*it)->score;
+			orphans -= (*it)->taxa;
+			paraMan->subtrees.push_back(*it);
+	   		}
+	   		
+	   	sub1.clear();
+	   	sub2.clear();
+		sub3.clear();
+		
+		if((int)paraMan->subtrees.size() > paraMan->nremotes){
+			paraMan->targetSubtreeSize = (int) (paraMan->targetSubtreeSize * 1.05);
+			attempt++;
+			pscores << "too many subtrees, increasing target size to paraMan->targetSubtreeSize..." << endl;
+			}
+		else subtreesOK=true;
+		}while(subtreesOK==false);
+	
+	//set these back to their original values
+	paraMan->minSubtreeSize=origMinSubtreeSize;
+	paraMan->targetSubtreeSize=origTargetSubtreeSize;
+	paraMan->orphanFactor=origOrphanFactor;	
+	
+	paraMan->PrepareForSubtreeMode(&indiv[bestIndiv], gen);
+	
+	if(paraMan->fewNonSubtreeNodes==true) AssignSubtree(paraMan->ChooseSubtree(), bestIndiv);
+
+	#ifdef MASTER_DOES_SUBTREE
+	AssignSubtree(paraMan->subtrees[(int)(rnd.uniform()*paraMan->subtrees.size())]->nodeNum, bestIndiv);
+	#endif
+	}
+
+void Population::StopSubtreeMode(){
+	paraMan->subtreeModeActive=false;
+	paraMan->subtreeDefGeneration = gen;
+	for(unsigned i=0;i<total_size;i++){
+		indiv[i].accurateSubtrees=false;
+		newindiv[i].accurateSubtrees=false;
+		}
+		
+	#ifdef MASTER_DOES_SUBTREE
+	AssignSubtree(0, bestIndiv);
+	#endif
+	}
+
+
+void ParallelManager::PrepareForSubtreeMode(Individual *ind, int gen){
+	needUpdate=false;
+	beforeFirstSubtree=false;
+	
+	for(int i=1;i<nremotes+1;i++){
+		remoteSubtreeAssign[i]=0;
+		localSubtreeAssign[i]=0;
+		}
+	subtreeDefNumber++;
+	subtreeDefGeneration=lastFullRecom=gen;
+
+	//put the nodes that aren't in any of the subtrees into a vector 
+	//that is a member of subMan, so that the master can work on
+	//them itself
+	nonSubtreeNodesforNNI.clear();
+	nonSubtreeNodesforSPR.clear();
+	FindNonSubtreeNodes(ind->treeStruct->root);
+	sort(nonSubtreeNodesforNNI.begin(), nonSubtreeNodesforNNI.end());
+	sort(nonSubtreeNodesforSPR.begin(), nonSubtreeNodesforSPR.end());
+
+	if(nonSubtreeNodesforSPR.size() < 20) fewNonSubtreeNodes=true;
+
+	subtreeDefScore=ind->Fitness();
+	}
+
+//Partition with loose lower bound and upper bound
+
+void ParallelManager::Partition(TreeNode *pointer){
+
+  if(pointer->left==NULL) return;
+
+  int largestOrphan=5;
+//  int min=20;
+//  int min = ntax < 100 ? 10 : 20;
+  //int target=params->data->NTax()/subMan->nremotes;
+  
+	int n1 = pointer->left->CountTerminals(0);
+	int n2 = pointer->right->CountTerminals(0);
+	int n  = n1 + n2;
+	if(n<minSubtreeSize) return;
+	if( (n1>largestOrphan && n1<minSubtreeSize) || (n2>largestOrphan && n2<minSubtreeSize) || (n<targetSubtreeSize && n>=minSubtreeSize)){
+ 		Subtree *st = new Subtree(pointer->nodeNum, n, pointer->dlen, ZERO_POINT_ZERO);
+		subtrees.push_back(st);
+  		}
+	else{
+    	if(n1>=minSubtreeSize) Partition(pointer->left);
+	    if(n2>=minSubtreeSize) Partition(pointer->right);
+  		}
+	}
+
+void ParallelManager::NewPartition(TreeNode *pointer, int &orphans, vector<Subtree*> &subtreesAbove){
+	vector<Subtree*> subtreesUpLeft, subtreesUpRight;
+	FLOAT_TYPE scoreAbove=ZERO_POINT_ZERO;
+	int orphansHere=0, orphansLeft=0, orphansRight=0;
+	
+	int n1 = pointer->left->CountTerminals(0);
+	int n2 = pointer->right->CountTerminals(0);
+	int n  = n1 + n2;
+	if(n<minSubtreeSize) return;
+
+   	if(n1>=minSubtreeSize){
+		NewPartition(pointer->left, orphansLeft, subtreesUpLeft);
+   		for(vector<Subtree*>::iterator it = subtreesUpLeft.begin();it!=subtreesUpLeft.end();it++){
+   			subtreesAbove.push_back(*it);
+   			scoreAbove += (*it)->score;
+   			}
+   		subtreesUpLeft.clear();
+   		}
+   	else orphansHere += n1;
+    if(n2>=minSubtreeSize){
+    	NewPartition(pointer->right, orphansRight, subtreesUpRight);
+   		for(vector<Subtree*>::iterator it = subtreesUpRight.begin();it!=subtreesUpRight.end();it++){
+   			subtreesAbove.push_back(*it);
+   			scoreAbove += (*it)->score;
+   			}   			   			
+   		subtreesUpRight.clear();
+   		}
+   	else orphansHere += n2;
+   	
+   	orphans=orphansLeft+orphansRight+orphansHere;   	
+	scoreAbove += pow((FLOAT_TYPE)orphans, orphanFactor);
+	
+	FLOAT_TYPE scoreHere = pow((FLOAT_TYPE)(targetSubtreeSize-n), 2);
+	
+	if(scoreAbove > scoreHere){
+		for(vector<Subtree*>::iterator it = subtreesAbove.begin();it!=subtreesAbove.end();it++){
+			Subtree *del=*it;
+			delete del;
+			}
+		subtreesAbove.clear();
+		Subtree *poo=new Subtree(pointer->nodeNum, n, pointer->dlen, pow((FLOAT_TYPE)(targetSubtreeSize-n), 2));
+		subtreesAbove.push_back(poo);
+		orphans=0;
+		}
+	}
+
+void ParallelManager::NewPartitionDown(TreeNode *pointer, TreeNode *calledFrom, int &orphans, vector<Subtree*> &subtreesAbove){
+	int n, n1, n2;
+	TreeNode *sib, *anc;
+	vector<Subtree*> subtreesUpLeft, subtreesUpRight;
+	FLOAT_TYPE scoreAbove=ZERO_POINT_ZERO;
+	int orphansHere=0, orphansLeft=0, orphansRight=0;
+
+	if(pointer->nodeNum != 0){
+	  if(pointer->left==calledFrom) sib=pointer->right;
+	  else sib=pointer->left;
+	  anc=pointer->anc;
+
+	  n1 = sib->CountTerminals(0);
+	  n2 = anc->CountTerminalsDown(0, pointer);
+	  n  = n1 + n2;
+	  if(n<minSubtreeSize) return;
+	  
+	   	if(n1>=minSubtreeSize){
+			NewPartition(sib, orphansLeft, subtreesUpLeft);
+	   		for(vector<Subtree*>::iterator it = subtreesUpLeft.begin();it!=subtreesUpLeft.end();it++){
+	   			subtreesAbove.push_back(*it);
+	   			scoreAbove += (*it)->score;
+	   			}
+	   		subtreesUpLeft.clear();
+	   		}
+	   	else orphansHere += n1;
+	    if(n2>=minSubtreeSize){
+	    	NewPartitionDown(anc, pointer, orphansRight, subtreesUpRight);
+	   		for(vector<Subtree*>::iterator it = subtreesUpRight.begin();it!=subtreesUpRight.end();it++){
+	   			subtreesAbove.push_back(*it);
+	   			scoreAbove += (*it)->score;
+	   			}   			   			
+	   		subtreesUpRight.clear();
+	   		}
+	   	else orphansHere += n2;
+	   	orphans=orphansLeft+orphansRight+orphansHere;   	
+		scoreAbove += pow((FLOAT_TYPE)orphans, orphanFactor);
+		
+		}
+	else{
+		TreeNode *nd1, *nd2;
+	
+		if(pointer->left==calledFrom){
+			nd1=pointer->left->next;
+			nd2=pointer->right;
+			}
+		else if(pointer->left->next==calledFrom){
+			nd1=pointer->left;
+			nd2=pointer->right;
+			}
+		else {
+			nd1=pointer->left;
+			nd2=pointer->left->next;
+			}
+		
+	  n1 = nd1->CountTerminals(0);
+	  n2 = nd2->CountTerminals(0);
+	  n  = n1 + n2;
+	  if(n<minSubtreeSize) return;
+	  	
+	   	if(n1>=minSubtreeSize){
+			NewPartition(nd1, orphansLeft, subtreesUpLeft);
+	   		for(vector<Subtree*>::iterator it = subtreesUpLeft.begin();it!=subtreesUpLeft.end();it++){
+	   			subtreesAbove.push_back(*it);
+	   			scoreAbove += (*it)->score;
+	   			}
+	   		subtreesUpLeft.clear();
+	   		}
+	   	else orphansHere += n1;
+	    if(n2>=minSubtreeSize){
+	    	NewPartition(nd2, orphansRight, subtreesUpRight);
+	   		for(vector<Subtree*>::iterator it = subtreesUpRight.begin();it!=subtreesUpRight.end();it++){
+	   			subtreesAbove.push_back(*it);
+	   			scoreAbove += (*it)->score;
+	   			}   			   			
+	   		subtreesUpRight.clear();
+	   		}
+	   	else orphansHere += n2;
+	   	orphans=orphansLeft+orphansRight+orphansHere;   	
+		scoreAbove += pow((FLOAT_TYPE)orphans, orphanFactor);
+		}			
+
+	FLOAT_TYPE scoreHere = (FLOAT_TYPE)(targetSubtreeSize-n)*(targetSubtreeSize-n);
+	
+	if(scoreAbove > scoreHere){
+		for(vector<Subtree*>::iterator it = subtreesAbove.begin();it!=subtreesAbove.end();it++){
+			delete *it;
+			}
+		subtreesAbove.clear();
+		Subtree *poo=new Subtree(pointer->nodeNum, n, calledFrom->dlen, pow((FLOAT_TYPE)(targetSubtreeSize-n), 2));
+		subtreesAbove.push_back(poo);
+		orphans=0;
+		}
+	}
+
+void ParallelManager::PartitionDown(TreeNode *pointer, TreeNode *calledFrom){
+
+//  int min=20;
+  int min = ntax < 100 ? 10 : 20;
+  int largestOrphan=5;
+//  int target=params->data->NTax()/subMan->nremotes;
+#ifdef MPI_VERSION
+	int target=2*ntax/nremotes;
+#else
+	int target=2*ntax/9;
+#endif
+  TreeNode *sib, *anc;
+  
+  if(pointer->nodeNum != 0){
+	  
+	  if(pointer->left==calledFrom) sib=pointer->right;
+	  else sib=pointer->left;
+	  anc=pointer->anc;
+	    
+	  int n1 = sib->CountTerminals(0);
+	  int n2 = anc->CountTerminalsDown(0, pointer);
+	  int n  = n1 + n2;
+	  
+	  if(n<min) return;
+	  
+
+	if( (n1>largestOrphan && n1<min) || (n2>largestOrphan && n2<min) || (n<target && n>=min)){
+	 	Subtree *st = new Subtree(pointer->nodeNum, n, calledFrom->dlen, ZERO_POINT_ZERO);
+ 		subtrees.push_back(st);
+		}
+	  else{
+	    if(n1>=min) Partition(sib);
+	    if(n2>=min) PartitionDown(anc, pointer);
+	  }
+	}
+
+	else{
+		TreeNode *nd1, *nd2;
+	
+		if(pointer->left==calledFrom){
+			nd1=pointer->left->next;
+			nd2=pointer->right;
+			}
+		else if(pointer->left->next==calledFrom){
+			nd1=pointer->left;
+			nd2=pointer->right;
+			}
+		else {
+			nd1=pointer->left;
+			nd2=pointer->left->next;
+			}
+		
+	  int n1 = nd1->CountTerminals(0);
+	  int n2 = nd2->CountTerminals(0);
+	  int n  = n1 + n2;
+	  if(n<min) return;
+	  
+	if( (n1>largestOrphan && n1<min) || (n2>largestOrphan && n2<min) || (n<target && n>=min)){
+	 	Subtree *st = new Subtree(pointer->nodeNum, n, calledFrom->dlen, ZERO_POINT_ZERO);
+	 	subtrees.push_back(st);
+	  }
+	  else{
+	    if(n1>=min) Partition(nd1);
+	    if(n2>=min) Partition(nd2);
+	  }	
+	}
+}
+
+/* End of methods added by Yufeng Zhang*/
+
+void Population::CheckSubtrees(){
+	//this function will determine whether the subtree mode should be turned on or off
+	//and whether the subtrees should be recalculated
+	
+	//if subtrees are currently active, see how many trees we have that have accurate subtrees
+	//also include any remotes that we have assigned a subtree to, since the next time we 
+	//communicate with them we will get a tree that has accurate subtrees		
+	
+	if(paraMan->subtreeModeActive==true){
+		int count=0;
+		for(unsigned i=0;i<total_size;i++){
+			if(indiv[i].accurateSubtrees==true){
+			    if(i<conf->nindivs) count++;
+//				if(indiv[i].Fitness() > subMan->currentBest) subMan->currentBest=indiv[i].Fitness();
+				}
+			}
+/*		for(int j=1;j<=paraMan->nremotes;j++)
+			if(paraMan->remoteSubtreeAssign[j] > 0) count++;
+		if(count==0){  //if nothing is accurate, we obviously need to recalc the subtrees
+			paraMan->needUpdate=true;
+			}
+		if(count>=total_size) subMan->perturb=false;
+*/	
+		//other conditions for recalcing the subtrees can be put here.
+/*		if((bestFitness - paraMan->subtreeDefScore) > paraMan->recalcThresh){
+			paraMan->needUpdate=true;
+			}
+*/		}
+	
+	if(paraMan->subtreeModeActive==false){
+		//determine some conditions for starting/restarting subtree mode here
+		//this should probably depend at least partially on the master's score
+		//having settled down and model mutations not helping much
+
+		if((int)gen - paraMan->subtreeDefGeneration > paraMan->subtreeInterval && adap->improveOverStoredIntervals < paraMan->subtreeStartThresh){
+			paraMan->subtreeModeActive=true;
+			paraMan->needUpdate=true;
+			}
+		}
+	
+	if(paraMan->subtreeModeActive==true && paraMan->needUpdate==true){
+		StartSubtreeMode();
+		}
+
+	if(paraMan->subtreeModeActive==true){
+		//determine some conditions for stopping subtree mode here
+		if((int)gen - paraMan->subtreeDefGeneration > paraMan->subtreeInterval){
+			StopSubtreeMode();
+			}
+		}
+	}
+
+void Population::FillPopWithClonesOfBest(){
+	Individual *best=&indiv[bestIndiv];
+	best->treeStruct->modPart=&best->modPart;
+	for(unsigned i=0;i<conf->nindivs;i++){
+		if(&indiv[i]!=best){
+			indiv[i].treeStruct->RemoveTreeFromAllClas();
+			indiv[i].CopySecByRearrangingNodesOfFirst(indiv[i].treeStruct,best);
+			indiv[i].mutation_type=-1;
+			}
+		indiv[i].treeStruct->modPart=&indiv[i].modPart;
+		}
+	CalcAverageFitness();
+	}
+
+void Population::AssignSubtree(int st, int indNum){
+	subtreeNode=st;
+
+	//we'll do all of this stuff if we are assigning a new subtree or if 
+	//we are assigning 0 (turning off subtree mode)
+	for(unsigned i=0;i<conf->nindivs;i++){
+	    indiv[i].accurateSubtrees=false;
+		newindiv[i].accurateSubtrees=false;
+		indiv[i].treeStruct->UnprotectClas();
+		}
+	ResetMemLevel(dataPart->NTax()-2,claMan->NumClas());
+	indiv[bestIndiv].treeStruct->ProtectClas();
+
+	subtreeMemberNodes.clear();
+	//add all of the nodenums in the subtree into the subtreeMemberNodes
+	//note that the subtree node itself is not added
+	if(subtreeNode!=0){
+		if(rank==0) assert(indiv[indNum].accurateSubtrees==true);
+		indiv[indNum].treeStruct->allNodes[subtreeNode]->left->AddNodesToList(subtreeMemberNodes);
+	
+		sort(subtreeMemberNodes.begin(),subtreeMemberNodes.end());
+		reverse(subtreeMemberNodes.begin(),subtreeMemberNodes.end());
+		for(unsigned i=0;i<conf->nindivs;i++){
+		    indiv[i].accurateSubtrees=true;
+		    newindiv[i].accurateSubtrees=true;
+			}
+			
+		indiv[indNum].SetDirty();
+		indiv[indNum].CalcFitness(subtreeNode);
+
+		if(rank!=0){//if we are the master and are going to choose a subtree, don't do this
+			indiv[indNum].treeStruct->SetupClasForSubtreeMode(subtreeNode);	
+
+			int nodesNeedingClas=((int)subtreeMemberNodes.size())/2+2;//the nodes in the subtree, plus the subnode itself and it's anc
+			ResetMemLevel(nodesNeedingClas,claMan->NumClas());
+			}
+		}
+/*	else{
+	//	subMan->active=false;
+		for(int i=0;i<conf->nindivs;i++){
+		    indiv[i].accurateSubtrees=false;
+			newindiv[i].accurateSubtrees=false;
+			indiv[i].treeStruct->UnprotectClas();
+			}
+		ResetMemLevel(params->data->NTax()-2,claMan->NumClas());
+		indiv[bestIndiv].treeStruct->ProtectClas();
+		}
+*/	}
+
+bool Population::SubtreeRecombination(int indivIndex){
+	//try recombining the trees from the remotes working on different subtrees
+	//in various combinations to give the optimal recombinant
+
+	Individual  currentBest;
+	Individual  tempIndiv1;
+	bool betterScore=false;
+
+	//DJZ
+	while(unusedTrees.size()<2){
+		Tree *temp=new Tree();
+		unusedTrees.push_back(temp);
+		}
+	
+	tempIndiv1.treeStruct=*(unusedTrees.end()-1);
+	unusedTrees.pop_back();
+	currentBest.treeStruct=*(unusedTrees.end()-1);
+	unusedTrees.pop_back();	
+
+	bool *recomEligable=new bool[total_size];
+
+#undef FAKE_PARALLEL
+int poo=1;
+	
+#ifndef FAKE_PARALLEL	
+	int count=0;
+	for(unsigned i=conf->nindivs;i<total_size;i++){
+		if(indiv[i].accurateSubtrees==true && (paraMan->localSubtreeAssign[i-conf->nindivs+1] > 0)){
+			paraMan->CheckSubtreeAccuracy(indiv[i].treeStruct);
+	       	recomEligable[i]=true;
+			if(i>=conf->nindivs)count++;
+			}
+		else recomEligable[i]=false;
+		}
+	if(count < (paraMan->nremotes)/2){
+	    delete []recomEligable;
+	    return false;
+		}
+#else
+	int count=0;
+	for(int i=0;i<total_size;i++){
+		if(newindiv[i].accurateSubtrees==true && i!=indivIndex){
+#ifndef NDEBUG
+			paraMan->CheckSubtreeAccuracy(newindiv[i].treeStruct);
+#endif
+	       	recomEligable[i]=true;
+			}
+		else recomEligable[i]=false;
+		}
+#endif
+
+	ofstream subrec("subrec.log", ios::app);
+	subrec.precision(10);
+	
+	subrec << "Subdef " << paraMan->subtreeDefNumber <<  ", " << (int)paraMan->subtrees.size() << " subtrees, defined gen " << paraMan->subtreeDefGeneration << "\n";
+	subrec << "Last full recom gen " << paraMan->lastFullRecom <<"\n";
+	subrec << "nodenum\tsize\tpriority\tassigned\tbrlen\n";
+	int totnode=0;
+	for(vector<Subtree*>::iterator it=paraMan->subtrees.begin();it!=paraMan->subtrees.end();it++){
+		subrec << (*it)->nodeNum << "\t" << (*it)->taxa << "\t" <<  (*it)->priority << "\t" << (*it)->numAssigned << "\t" << (*it)->blen << "\n";
+		totnode+=(*it)->taxa;
+		}
+	subrec << totnode << " taxa are in a subtree\nremote\tlocalnode\tassignednode\tscore\n";
+	for(int p=1;p<paraMan->nremotes+1;p++){
+		subrec << p << "\t" << paraMan->localSubtreeAssign[p] << "\t" << paraMan->remoteSubtreeAssign[p] << "\t" << indiv[p+conf->nindivs-1].Fitness() << "\n";
+		}
+
+	subrec << "gen\t" << gen << "\nstart\t" << indiv[newindiv[indivIndex].parent].Fitness() << "\n";
+
+	//this is important
+	newindiv[indivIndex].CalcFitness(0);
+	//we don't want to do this anymore
+//	newindiv[indivIndex].treeStruct->ProtectClas();
+	
+	tempIndiv1.CopySecByRearrangingNodesOfFirst(tempIndiv1.treeStruct, &newindiv[indivIndex]);
+	currentBest.CopySecByRearrangingNodesOfFirst(currentBest.treeStruct, &newindiv[indivIndex]);
+	recomEligable[indivIndex]=false;
+	
+#ifndef FAKE_PARALLEL
+	for(unsigned who=conf->nindivs;who<total_size;who++){
+#else
+	for(int who=0;who<total_size;who++){
+#endif
+		if(recomEligable[who]==true){
+
+#ifndef FAKE_PARALLEL
+			tempIndiv1.treeStruct->SubtreeBasedRecombination(indiv[who].treeStruct, paraMan->localSubtreeAssign[who - conf->nindivs + 1], false, adap->branchOptPrecision);
+#else
+			tempIndiv1.treeStruct->SubtreeBasedRecombination(newindiv[who].treeStruct, subtreeNode , tempIndiv1.mod->IsModelEqual(newindiv[who].mod), adap->branchOptPrecision);
+#endif		
+
+//			OutputFilesForScoreDebugging(&tempIndiv1, poo++);
+		//	paupf.flush();
+		//	outf.flush();
+
+			tempIndiv1.SetDirty();
+			tempIndiv1.CalcFitness(subtreeNode);
+			
+/*			ofstream poo("debug.log");
+			poo.precision(10);
+			tempIndiv1.treeStruct->OutputFirstClaAcrossTree(poo, tempIndiv1.treeStruct->root);
+			poo.close();
+*/			
+			subrec << "with " << who << "\t(node " << paraMan->localSubtreeAssign[who - conf->nindivs + 1] << ")\t" << tempIndiv1.Fitness() << "\n";
+			if(tempIndiv1.Fitness() > currentBest.Fitness()){
+				//if the recombinant we create is better, make it the current best, mark it as 
+				//ineligable so we don't try to add it again, and start back at the first eligable
+				//recominant
+				currentBest.CopySecByRearrangingNodesOfFirst(currentBest.treeStruct, &tempIndiv1, true);
+				recomEligable[who]=false;
+				//who=conf->nindivs-1;
+				}
+			else{
+			    tempIndiv1.CopySecByRearrangingNodesOfFirst(tempIndiv1.treeStruct, &currentBest, true);
+			    if(tempIndiv1.Fitness()==currentBest.Fitness()) recomEligable[who]=false;
+				}
+			}
+		}
+	newindiv[indivIndex].CopySecByRearrangingNodesOfFirst(newindiv[indivIndex].treeStruct, &currentBest, true);
+
+	subrec << "end\t" << currentBest.Fitness() <<  endl;
+	subrec.close();
+	
+	//Return the treestructs that we used temporarily back to the unused tree vector
+	tempIndiv1.treeStruct->RemoveTreeFromAllClas();
+	unusedTrees.push_back(tempIndiv1.treeStruct);
+	tempIndiv1.treeStruct=NULL;
+
+	currentBest.treeStruct->RemoveTreeFromAllClas();
+	unusedTrees.push_back(currentBest.treeStruct);
+	currentBest.treeStruct=NULL;
+	
+	delete []recomEligable;
+	paraMan->lastFullRecom=gen;
+	return true;
+	}
+
+
+FLOAT_TYPE ParallelManager::ScorePartitioning(int nodeNum, ofstream &pscores){
+	
+	int size=(int)subtrees.size();
+	
+	if(size<2 /*|| size>(nremotes-1)*/) return FLT_MAX;
+
+	FLOAT_TYPE blenScore=ZERO_POINT_ZERO, subScore=ZERO_POINT_ZERO, fosterScore=ZERO_POINT_ZERO;
+	int fosterTerms=ntax;
+	
+	int allots[1024];
+	
+#ifndef MPI_VERSION
+nremotes=9;
+#endif
+	
+	int a=0;
+	for(vector<Subtree*>::iterator it=subtrees.begin();it!=subtrees.end();it++){
+		blenScore -= log((FLOAT_TYPE)(*it)->blen);
+		subScore += (*it)->taxa * (*it)->taxa;
+		fosterTerms-=(*it)->taxa;
+		allots[a++]=(*it)->taxa;
+		(*it)->numAssigned=1;
+		}
+	
+	int left=nremotes-size;
+
+	while(left>0){
+		int maxnum=0, max=0;
+		for(int q=0;q<size;q++){
+			if(allots[q]>maxnum){
+				maxnum=allots[q];
+				max=q;				
+				}
+			}
+		subtrees[max]->numAssigned++;
+		allots[max]=subtrees[max]->taxa/subtrees[max]->numAssigned;
+		left--;
+		}
+	int maxallot=0;
+	for(int q=0;q<size;q++){
+		if(allots[q]>maxallot){
+			maxallot=allots[q];
+			}	
+		}
+	
+	subScore = sqrt(subScore);
+	if(fosterTerms> (ntax/20)) fosterScore = (FLOAT_TYPE)(fosterTerms-(ntax/20))*5;
+	else fosterScore=0;
+	blenScore*=2.0;
+	
+	FLOAT_TYPE tot= subScore + blenScore + fosterScore + maxallot;
+	
+	pscores << nodeNum << "\ts=" << size << "\tscr=" << tot << "\tfost=" << fosterTerms << "\tblenscr=" << blenScore << "\tsubscr=" << subScore << "\tallotscr" << maxallot << "\n";
+	for(vector<Subtree*>::iterator it=subtrees.begin();it!=subtrees.end();it++){
+		pscores << (*it)->nodeNum << "\t";
+		pscores << (*it)->taxa << "\t";
+		pscores << (*it)->blen << "\n";
+		}
+	pscores << "\n";
+	return tot;
+	}
+
+
+int ParallelManager::ChooseSubtree(){
+  /* subroutine to decide which sub tree to work on then.
+     currently we select subtree randomly, and the chance to select a specific subtree is depends on the 
+     size of the subtree and how many nodes it is assignged to
+  */
+  int totalsize = 0;
+  int temp = 0;
+  int size=(int)subtrees.size();
+  if(size<=0) return (0);
+
+  //DJZ see if any subtrees have not been assigned
+  bool allassigned=false;
+  int unassignedCount=0;
+
+  for(int q=0;q<size;q++) subtrees[q]->numAssigned=0;
+
+  for(int i=1;i<=nremotes;i++){
+	if(remoteSubtreeAssign[i]>0){
+		int j=0;
+		while(subtrees[j]->nodeNum!=remoteSubtreeAssign[i]) j++;
+		subtrees[j]->numAssigned++;
+		}
+	}
+
+  for(int i=0;i<size;i++){
+  	if(subtrees[i]->numAssigned==false) unassignedCount++;
+	}
+  if(unassignedCount==0) allassigned=true;
+  
+  int nd, max=0;
+  for(int i = 0;i<size;i++){
+	if(allassigned==true)
+		subtrees[i]->priority = subtrees[i]->taxa / subtrees[i]->numAssigned;
+	else if(subtrees[i]->numAssigned==0)
+	subtrees[i]->priority = subtrees[i]->taxa;
+	else subtrees[i]->priority = 0;
+	totalsize += subtrees[i]->priority;
+
+	if(subtrees[i]->priority>max){
+		nd=i;
+		max=subtrees[i]->priority;
+		}
+	}
+
+  //assign the node with the highest priority overall
+  //or the unassigned one with the highest priority
+	subtrees[nd]->numAssigned++;
+	return subtrees[nd]->nodeNum;
+
+/*//assign a node randomly in proportion to it's size and assignedness
+  for(int i=1;i<=size;i++)
+    {
+      if((randnum>=(temp*1.0/totalsize))&&(randnum<((temp+p[i])*1.0/totalsize))){
+		assigned[i]+=1;
+		return(node[i]);
+		}
+      else
+	temp += p[i];
+    }
+*/ 
+ //debug_mpi("problem in selectnode...");
+  return (subtrees[0]->nodeNum);
+
+}
+
+void ParallelManager::FindNonSubtreeNodes(TreeNode *nd){
+	bool subNode=false;
+	for(int i=0;i<(int)subtrees.size();i++)
+		if(nd->nodeNum==subtrees[i]->nodeNum) subNode=true;
+	
+	if(nd->nodeNum!=0){
+		nonSubtreeNodesforSPR.push_back(nd->nodeNum);
+		if(subNode==false && nd->nodeNum>ntax) nonSubtreeNodesforNNI.push_back(nd->nodeNum);
+		}
+	if(subNode==false){
+		if(nd->left) FindNonSubtreeNodes(nd->left);
+		if(nd->right) FindNonSubtreeNodes(nd->right);
+		if(nd->anc==NULL) FindNonSubtreeNodes(nd->left->next);
+		}
+	}
+
+void Population::GetRepNums(string &s){
+	char buf[100];
+	if(conf->bootstrapReps > 0){
+		sprintf(buf, "Bootstrap rep %d (of %d) ", currentBootstrapRep, conf->bootstrapReps);
+		s += buf;
+		}
+	if(conf->searchReps > 1){
+		sprintf(buf, "Search rep %d (of %d)", currentSearchRep, conf->searchReps);
+		s += buf;
+		}
+	}
+
+void Population::OutputRepNums(ofstream &out){
+	if(conf->bootstrapReps > 0 || conf->searchReps > 1){
+		if(conf->bootstrapReps > 0) out << "Bootstrap rep " << currentBootstrapRep << " (of " << conf->bootstrapReps << ") ";
+		if(conf->searchReps > 1) out << "Search rep " << currentSearchRep << " (of " << conf->searchReps <<  ")";
+		out << "\n";
+		}
+	}
+
+void Population::SetOutputDetails(){
+	/*
+		DONT_OUTPUT = 0,
+		REPLACE = 1,
+		APPEND = 2,
+		NEWNAME = 4,
+
+		WRITE_CONTINUOUS = 8,
+		WRITE_REP_TERM = 16,
+		WRITE_REPSET_TERM = 32,
+		WRITE_PREMATURE = 64,
+		
+		FINALIZE_REP_TERM = 128,
+		FINALIZE_REPSET_TERM = 256,
+		FINALIZE_FULL_TERM = 512,
+		FINALIZE_PREMATURE = 1024,
+
+		WARN_PREMATURE = 2048,
+		NEWNAME_PER_REP = 4096
+	*/
+	//not restarted from checkpoint
+	//-replace all files that will be output
+	if(conf->restart == false){
+		screen_output = (output_details) (REPLACE | WRITE_CONTINUOUS | WARN_PREMATURE);
+		log_output = (output_details) (REPLACE | WRITE_CONTINUOUS | WARN_PREMATURE);
+		if(conf->outputMostlyUselessFiles)
+			fate_output = problog_output = swaplog_output = (output_details) (REPLACE | WRITE_CONTINUOUS);
+		else
+			fate_output = problog_output = swaplog_output = (output_details) (DONT_OUTPUT);
+
+		//not bootstrap
+		if(conf->bootstrapReps == 0){
+			bootlog_output = (output_details) (DONT_OUTPUT);
+			best_output = (output_details) (REPLACE | WRITE_REPSET_TERM | WRITE_PREMATURE | WARN_PREMATURE);
+			if(conf->outputCurrentBestTopology) 
+				best_output = (output_details) (best_output | WRITE_CONTINUOUS);
+
+			//normal 1 rep
+			if(conf->searchReps == 1){
+				all_best_output = (output_details) DONT_OUTPUT;
+				treelog_output = (output_details) (conf->outputTreelog ? 
+					(REPLACE | WRITE_CONTINUOUS | FINALIZE_REP_TERM | FINALIZE_PREMATURE | WARN_PREMATURE) 
+					: DONT_OUTPUT);
+				}
+			//normal multirep run
+			else if(conf->searchReps > 1){
+				all_best_output = (output_details) (REPLACE | WRITE_REP_TERM | WRITE_PREMATURE | WARN_PREMATURE);
+				//treelog_output = (output_details) (conf->outputTreelog ? (REPLACE | WRITE_CONTINUOUS | FINALIZE_REP_TERM | FINALIZE_PREMATURE | WARN_PREMATURE | NEWNAME_PER_REP) : DONT_OUTPUT);
+				treelog_output = (output_details) (conf->outputTreelog ? 
+					(REPLACE | WRITE_CONTINUOUS | FINALIZE_REP_TERM | FINALIZE_PREMATURE | WARN_PREMATURE | NEWNAME_PER_REP) 
+					: DONT_OUTPUT);
+				}
+			if(conf->scoreOnly)
+				log_output = treelog_output = fate_output = problog_output = swaplog_output = (output_details) DONT_OUTPUT;
+			}
+		//bootstrapping
+		else {
+			best_output = all_best_output = treelog_output = (output_details) DONT_OUTPUT;
+			//bootstrap, 1 OR multiple search reps per bootstrap rep
+			//bootlog_output = (output_details) (REPLACE | WRITE_REPSET_TERM | FINALIZE_FULL_TERM | FINALIZE_PREMATURE);
+			//WORK - should this include WRITE)PREMATURE?
+			bootlog_output = (output_details) (REPLACE | WRITE_REPSET_TERM | FINALIZE_FULL_TERM | FINALIZE_PREMATURE);
+			}
+		}
+	else{//restarted 
+		screen_output = (output_details) (APPEND | WRITE_CONTINUOUS | WARN_PREMATURE);
+		log_output = (output_details) (APPEND | WRITE_CONTINUOUS | WARN_PREMATURE);
+		if(conf->outputMostlyUselessFiles)
+			fate_output = problog_output = swaplog_output = (output_details) (APPEND | WRITE_CONTINUOUS);
+		else
+			fate_output = problog_output = swaplog_output = (output_details) (DONT_OUTPUT);
+		//restarted, not bootstrap
+		if(conf->bootstrapReps == 0){
+			bootlog_output = (output_details) (DONT_OUTPUT);
+			best_output = (output_details) (REPLACE | WRITE_REPSET_TERM | WRITE_PREMATURE | WARN_PREMATURE);
+			if(conf->outputCurrentBestTopology) 
+				best_output = (output_details) (best_output | WRITE_CONTINUOUS);
+
+			//restarted 1 rep search
+			if(conf->searchReps == 1){
+				all_best_output = (output_details) DONT_OUTPUT;
+				treelog_output = (output_details) (conf->outputTreelog ? 
+					(APPEND | WRITE_CONTINUOUS | FINALIZE_REP_TERM | FINALIZE_PREMATURE | WARN_PREMATURE) 
+					: DONT_OUTPUT);
+				}
+			//restarted multirep run
+			else if(conf->bootstrapReps == 0 && conf->searchReps > 1){
+				all_best_output = (output_details) (REPLACE | WRITE_REP_TERM | WARN_PREMATURE);
+				treelog_output = (output_details) (conf->outputTreelog ? 
+					(APPEND | WRITE_CONTINUOUS | FINALIZE_REP_TERM | FINALIZE_PREMATURE | WARN_PREMATURE | NEWNAME_PER_REP) 
+					: DONT_OUTPUT);
+				}
+			}
+		else {//restarted bootstrap, 1 OR multiple search reps per bootstrap rep
+			bootlog_output = (output_details) (APPEND | WRITE_REPSET_TERM | FINALIZE_FULL_TERM | FINALIZE_PREMATURE);
+			best_output = all_best_output = treelog_output = (output_details) DONT_OUTPUT;
+			}
+		}
+	}
+
+void Population::DetermineFilename(output_details details, char *outname, string suffix){
+	char restartString[20];
+	char runString[20];
+
+	if(conf->restart && (details & NEWNAME)) sprintf(restartString, ".restart%d", CheckRestartNumber(conf->ofprefix));
+	else restartString[0]='\0';
+	if(conf->searchReps > 1 && (details & NEWNAME_PER_REP)) sprintf(runString, ".rep%d", currentSearchRep);
+	else runString[0]='\0';
+
+	sprintf(outname, "%s%s%s.%s", conf->ofprefix.c_str(), runString, restartString, suffix.c_str());
+	}
+
+void Population::InitializeOutputStreams(){
+	char temp_buf[100];
+
+	char suffix[100];
+	sprintf(suffix, "best");
+	DetermineFilename(best_output, temp_buf, suffix);
+
+	//sprintf(temp_buf, "%s%s.best", conf->ofprefix.c_str(), restartString);
+	besttreefile = temp_buf;
+
+	if(fate_output != DONT_OUTPUT){
+		//initialize the fate file
+		if(fate.is_open() == false){
+			char suffix[100];
+			sprintf(suffix, "fate0%d.log", rank);
+			DetermineFilename(fate_output, temp_buf, suffix);
+				
+			if(fate_output & APPEND)
+				fate.open(temp_buf, ios::app);
+			else 
+				fate.open(temp_buf);
+			fate.precision(10);
+			}
+		#ifdef MPI_VERSION
+		fate << "gen\tind\tparent\trecomWith\tscore\tMutType\t#brlen\taccurateSubtrees\tTime\tprecision\n";
+		#else
+		if(conf->restart) fate << "Restarting from checkpoint...\n";
+		OutputRepNums(fate);
+		fate << "gen\tind\tparent\tscore\tMutType\t#brlen\tTime\tprecision\n";
+		#endif	
+		}
+
+	if(problog_output != DONT_OUTPUT){
+		//initialize the problog
+		if(probLog.is_open() == false){
+			char suffix[100];
+			sprintf(suffix, "problog0%d.log", rank);
+			DetermineFilename(problog_output, temp_buf, suffix);
+
+			if(problog_output & APPEND)
+				probLog.open(temp_buf, ios::app);
+			else 
+				probLog.open(temp_buf);
+			if(!probLog.good()) throw ErrorException("problem opening problog");
+			}
+		if(conf->restart) probLog << "Restarting from checkpoint...\n";
+		OutputRepNums(probLog);
+		adap->BeginProbLog(probLog, gen);
+		}
+
+		//initialize the swaplog
+	if(swaplog_output != DONT_OUTPUT){
+		if(conf->uniqueSwapBias != 1.0){
+			if(swapLog.is_open() == false){
+				char suffix[100];
+				sprintf(suffix, "swaplog0%d.log", rank);
+				DetermineFilename(swaplog_output, temp_buf, suffix);
+
+				if(swaplog_output & APPEND)
+					swapLog.open(temp_buf, ios::app);
+				else 
+					swapLog.open(temp_buf);				
+				}
+			if(conf->restart) swapLog << "Restarting from checkpoint...\n";
+			OutputRepNums(swapLog);
+			swapLog << "gen\tuniqueSwaps\ttotalSwaps\n";
+			}
+		}
+
+	//initialize the log file
+	if(log_output != DONT_OUTPUT){
+		if(log.is_open() == false){
+			char suffix[100];
+			sprintf(suffix, "log0%d.log", rank);
+			DetermineFilename(log_output, temp_buf, suffix);
+
+			if(log_output & APPEND)
+				log.open(temp_buf, ios::app);
+			else 
+				log.open(temp_buf);		
+			log.precision(10);
+			}
+		OutputRepNums(log);
+		if(conf->restart == false)
+			log << "random seed = " << rnd.init_seed() << "\n";
+		else{
+			if(finishedRep == false) 
+				if(finishedGenerations == true)
+					log << "Restarting run before final optimization " << ", seed " << rnd.init_seed() << ", best lnL " << indiv[bestIndiv].Fitness() << endl;
+				else
+					log << "Restarting run at generation " << gen << ", seed " << rnd.init_seed() << ", best lnL " << indiv[bestIndiv].Fitness() << endl;
+			else
+				log << "Restarting from checkpoint...\n";
+			}
+
+		log << "gen\tbest_like\ttime\toptPrecision\n";
+		}
+
+	//initialize the treelog
+	if(treelog_output != DONT_OUTPUT){
+		if(treeLog.is_open() == false){
+			char suffix[100];
+			sprintf(suffix, "treelog0%d.tre", rank);
+			DetermineFilename(treelog_output, temp_buf, suffix);
+
+			if(treelog_output & APPEND)
+				treeLog.open(temp_buf, ios::app);
+			else 
+				treeLog.open(temp_buf);		
+			treeLog.precision(10);
+			}
+		treeLog.precision(10);
+		if((conf->restart == false && conf->searchReps == 1) ||
+			(conf->restart == false && (treelog_output & NEWNAME_PER_REP)) ||
+			(conf->restart && (treelog_output & NEWNAME)))
+			dataPart->BeginNexusTreesBlock(treeLog);
+		AppendTreeToTreeLog(-1, -1);
+		}
+	
+	//initialize the bootstrap tree file
+	if(bootlog_output != DONT_OUTPUT){
+		if(rank==0 && bootLog.is_open() == false){
+			char suffix[100];
+			sprintf(suffix, "boot.tre");
+			DetermineFilename(bootlog_output, temp_buf, suffix);
+			
+			if(bootlog_output & APPEND){
+				if(FileExists(temp_buf) && FileIsNexus(temp_buf)){
+					//this will verify whether we previously started a trees block in the bootstrap file
+					//if so, we shouldn't do so again.  If not, we need to start it now
+					bootLog.open(temp_buf, ios::app);
+					}
+				else{
+					bootLog.open(temp_buf, ios::app);
+					dataPart->BeginNexusTreesBlock(bootLog);
+					}
+				}
+			else{
+				bootLog.open(temp_buf);
+				dataPart->BeginNexusTreesBlock(bootLog);
+				}
+			bootLog.precision(10);
+			}
+		if(conf->outputPhylipTree){
+			if(!(bootLogPhylip.is_open())){
+				char suffix[100];
+				sprintf(suffix, "boot.phy");
+				DetermineFilename(bootlog_output, temp_buf, suffix);
+
+				if(bootlog_output & APPEND)
+					bootLogPhylip.open(temp_buf, ios::app);
+				else 
+					bootLogPhylip.open(temp_buf);		
+				bootLogPhylip.precision(10);
+				}	
+			}
+		}
+
+	ClearDebugLogs();
+	
+	#ifdef DEBUG_SCORES
+	outf.open("toscore.tre");
+	paupf.open("toscore.nex");
+	#endif
+
+	#ifdef VARIABLE_OPTIMIZATION
+	outf.open("toscore.tre");
+	paupf.open("toscore.nex");
+	#endif
+
+	#ifdef PERIODIC_SCORE_DEBUG
+	outf.open("toscore.tre");
+	paupf.open("toscore.nex");
+	#endif	
+	}
+
+/* OLD WAY
+void Population::InitializeOutputStreams(){
+	char temp_buf[100];
+	char restart[12];
+
+	if(conf->restart == true){
+		//check if this run has been restarted before.  If so, increment the restart number
+		sprintf(restart, ".restart%d", CheckRestartNumber(conf->ofprefix));
+		}
+	else restart[0]='\0';
+
+	sprintf(temp_buf, "%s%s.best.tre", conf->ofprefix.c_str(), restart);
+	besttreefile = temp_buf;
+
+	if(conf->outputMostlyUselessFiles){
+		//initialize the fate file
+		if (rank > 9)
+			sprintf(temp_buf, "%s%s.fate%d.log", conf->ofprefix.c_str(), restart, rank);
+		else
+			sprintf(temp_buf, "%s%s.fate0%d.log", conf->ofprefix.c_str(), restart, rank);
+		
+		fate.open(temp_buf);
+		fate.precision(10);
+		#ifdef MPI_VERSION
+		fate << "gen\tind\tparent\trecomWith\tscore\tMutType\t#brlen\taccurateSubtrees\tTime\tprecision\n";
+		#else
+		fate << "gen\tind\tparent\tscore\tMutType\t#brlen\tTime\tprecision\n";
+		#endif	
+
+		//initialize the problog
+		if (rank > 9)
+			sprintf(temp_buf, "%s%s.problog%d.log", conf->ofprefix.c_str(), restart, rank);
+		else
+			sprintf(temp_buf, "%s%s.problog0%d.log", conf->ofprefix.c_str(), restart, rank);
+		probLog.open(temp_buf);
+		if(!probLog.good()) throw ErrorException("problem opening problog");
+		adap->BeginProbLog(probLog, gen);
+
+		//initialize the swaplog
+		if(conf->uniqueSwapBias != ONE_POINT_ZERO){
+			sprintf(temp_buf, "%s%s.swap.log", conf->ofprefix.c_str(), restart);
+			swapLog.open(temp_buf);
+			swapLog << "gen\tuniqueSwaps\ttotalSwaps\n";
+			}
+		}
+
+	//initialize the log file
+	if (rank > 9)
+		sprintf(temp_buf, "%s%s.log%d.log", conf->ofprefix.c_str(), restart, rank);
+	else
+		sprintf(temp_buf, "%s%s.log0%d.log", conf->ofprefix.c_str(), restart, rank);
+	log.open(temp_buf);
+	log.precision(10);
+	if(conf->restart == false)
+		log << "random seed = " << rnd.init_seed() << "\n";
+	else log << "Restarting run at generation " << gen << ", seed " << rnd.init_seed() << ", best lnL " << BestFitness() << endl;
+
+	log << "gen\tbest_like\ttime\toptPrecision\n";
+
+	//initialize the treelog
+	if(conf->outputTreelog){
+		if (rank > 9)
+			sprintf(temp_buf, "%s%s.treelog%d.tre", conf->ofprefix.c_str(), restart, rank);
+		else
+			sprintf(temp_buf, "%s%s.treelog0%d.tre", conf->ofprefix.c_str(), restart, rank);
+
+		treeLog.open(temp_buf);
+		treeLog.precision(10);
+
+		data->BeginNexusTreesBlock(treeLog);
+		}
+	
+	//initialize the bootstrap tree file
+	if(conf->bootstrapReps > 0 && rank==0){
+		sprintf(temp_buf, "%s%s.boot.tre", conf->ofprefix.c_str(), restart);
+
+		bootLog.open(temp_buf);
+		bootLog.precision(10);
+
+		data->BeginNexusTreesBlock(bootLog);
+
+		if(conf->outputPhylipTree == true){
+			sprintf(temp_buf, "%s%s.boot.phy", conf->ofprefix.c_str(), restart);
+
+			bootLogPhylip.open(temp_buf);
+			bootLogPhylip.precision(10);
+			}	
+		}	
+
+	ClearDebugLogs();
+	
+	#ifdef DEBUG_SCORES
+	outf.open("toscore.tre");
+	paupf.open("toscore.nex");
+	#endif
+
+	#ifdef VARIABLE_OPTIMIZATION
+	outf.open("toscore.tre");
+	paupf.open("toscore.nex");
+	#endif
+
+	#ifdef PERIODIC_SCORE_DEBUG
+	outf.open("toscore.tre");
+	paupf.open("toscore.nex");
+	#endif	
+	
+	}
+*/
+
+void Population::SetNewBestIndiv(int indivIndex){
+	//this should be called when a new best individual is set outside of
+	//CalcAverageFitness.  Particularly important for parallel.
+	bestIndiv=indivIndex;
+	globalBest=bestFitness=prevBestFitness=BestFitness();
+	for(unsigned i=0;i<total_size;i++){
+		if(i != bestIndiv){
+			indiv[i].treeStruct->UnprotectClas();
+			}
+		}
+	indiv[bestIndiv].treeStruct->ProtectClas();
+	}
+
+void Population::FinalizeOutputStreams(int type){
+	/*the types are:
+		repTerm = 0
+		repsetTerm = 1
+		fullTerm = 2
+	*/
+
+	//things should already have been finalized at the end of the previous execution
+	if(restartedAfterTermination)
+		return;
+
+	bool prematureTermination = conf->checkpoint ? genTermination : (genTermination | timeTermination | userTermination);
+
+	if(prematureTermination && type == 0){
+		if(log_output & WARN_PREMATURE)
+			log << TerminationWarningMessage().c_str() << endl;
+		if(treelog_output & WARN_PREMATURE)
+			if(treeLog.is_open()) 
+				treeLog << TerminationWarningMessage().c_str() << endl;
+		}
+
+	//in these cases the termination is essentially a pause, so don't finalize or write anything
+	if(workPhaseTermination || (conf->checkpoint && (timeTermination || userTermination)))
+		return;
+
+	bool repTerm, repsetTerm, fullTerm;
+	if(prematureTermination){
+		fullTerm = false;
+		repsetTerm = false;
+		repTerm = false;		
+		}
+	else if(type == 2){
+		fullTerm = true;
+		repsetTerm = false;
+		repTerm = false;
+		}
+	else if(type == 1) {
+		fullTerm = false;
+		repsetTerm = true;
+		repTerm = false;
+		}
+	else {
+		fullTerm = false;
+		repsetTerm = false;
+		repTerm = true;
+		}
+
+	//if(((conf->bootstrapReps == 0 || currentBootstrapRep == conf->bootstrapReps) && (currentSearchRep == conf->searchReps)) || prematureTermination == true){
+	if(log.is_open()){
+		if((prematureTermination && (log_output & FINALIZE_PREMATURE)) ||
+			(!prematureTermination &&
+			   ((repTerm && (log_output & FINALIZE_REP_TERM)) || (repsetTerm && (log_output & FINALIZE_REPSET_TERM)) || (fullTerm && (log_output & FINALIZE_FULL_TERM))))
+			) 
+			log.close();
+		}
+
+	if(fate.is_open()){
+		if((prematureTermination && (fate_output & FINALIZE_PREMATURE)) ||
+			(!prematureTermination && 
+			   ((repTerm && (fate_output & FINALIZE_REP_TERM)) || (repsetTerm && (fate_output & FINALIZE_REPSET_TERM)) || (fullTerm && (fate_output & FINALIZE_FULL_TERM))))
+			) 
+			fate.close();
+		}
+
+	if(probLog.is_open()){
+		if((prematureTermination && (problog_output & FINALIZE_PREMATURE)) ||
+			(!prematureTermination && 
+				((repTerm && (problog_output & FINALIZE_REP_TERM)) || (repsetTerm && (problog_output & FINALIZE_REPSET_TERM)) || (fullTerm && (problog_output & FINALIZE_FULL_TERM))))
+			)
+			probLog.close();
+		}
+
+	if(swapLog.is_open()){
+		if((prematureTermination && (swaplog_output & FINALIZE_PREMATURE)) || 
+			(!prematureTermination &&
+				((repTerm && (swaplog_output & FINALIZE_REP_TERM)) || (repsetTerm && (swaplog_output & FINALIZE_REPSET_TERM)) || (fullTerm && (swaplog_output & FINALIZE_FULL_TERM))))
+			)
+			swapLog.close();
+		}
+
+	if(treeLog.is_open()){
+		if((prematureTermination && (treelog_output & FINALIZE_PREMATURE)) ||
+			(!prematureTermination &&
+				((repTerm && (treelog_output & FINALIZE_REP_TERM)) || (repsetTerm && (treelog_output & FINALIZE_REPSET_TERM)) || (fullTerm && (treelog_output & FINALIZE_FULL_TERM))))
+			){
+			treeLog << "end;\n";
+			treeLog.close();
+			}
+		}
+
+	if(bootLog.is_open()){
+		if((prematureTermination && (bootlog_output & FINALIZE_PREMATURE)) ||
+			(!prematureTermination && 
+			   ((repTerm && (bootlog_output & FINALIZE_REP_TERM)) || (repsetTerm && (bootlog_output & FINALIZE_REPSET_TERM)) || (fullTerm && (bootlog_output & FINALIZE_FULL_TERM))))
+			){
+			bootLog << "end;\n";
+			bootLog.close();
+			}
+		}
+
+	if(bootLogPhylip.is_open()){
+		if((prematureTermination && (bootlog_output & FINALIZE_PREMATURE)) ||
+			(!prematureTermination && 
+			   ((repTerm && (bootlog_output & FINALIZE_REP_TERM)) || (repsetTerm && (bootlog_output & FINALIZE_REPSET_TERM)) || (fullTerm && (bootlog_output & FINALIZE_FULL_TERM))))
+			)
+			bootLogPhylip.close();
+		}
+
+	#ifdef DEBUG_SCORES
+	outf << "end;\n";
+	outf.close();
+	paupf << "end;\n";
+	paupf.close();
+	#endif
+	}
+
+/* OLD WAY
+void Population::FinalizeOutputStreams(){
+	if(prematureTermination == true){
+		log << "***NOTE: Run was terminated before termination condition was reached!\nLikelihood scores, topologies and model estimates obtained may not be fully optimal!***" << endl;
+		if(treeLog.is_open()) treeLog << "[! ***NOTE: GARLI run was terminated before termination condition was reached!\nLikelihood scores, topologies and model estimates obtained may not be fully optimal!***]" << endl;
+		}
+	fate.close();
+	log.close();
+	if(treeLog.is_open()){
+		AppendTreeToTreeLog(-1);
+		treeLog << "end;\n";
+		treeLog.close();
+		}
+	if(bootLog.is_open()){
+		bootLog << "end;\n";
+		bootLog.close();
+		}
+	if(bootLogPhylip.is_open()) bootLogPhylip.close();
+	probLog.close();
+	if(swapLog.is_open()) swapLog.close();
+	
+	#ifdef DEBUG_SCORES
+	outf << "end;\n";
+	outf.close();
+	paupf << "end;\n";
+	paupf.close();
+	#endif
+	}
+*/
+
+void Population::FindLostClas(){
+	vector<CondLikeArraySet *> arr;
+	
+	for(unsigned i=0;i<total_size;i++){
+		Tree *t=indiv[i].treeStruct;
+		if(! (claMan->IsDirty(t->allNodes[0]->claIndexDown)))
+			arr.push_back(claMan->GetCla(t->allNodes[0]->claIndexDown));
+		if(! (claMan->IsDirty(t->allNodes[0]->claIndexUL)))
+			arr.push_back(claMan->GetCla(t->allNodes[0]->claIndexUL));			
+		if(! (claMan->IsDirty(t->allNodes[0]->claIndexUR)))
+			arr.push_back(claMan->GetCla(t->allNodes[0]->claIndexUR));
+		for(int n=t->getNumTipsTotal()+1;n<t->getNumNodesTotal();n++){
+			if(! (claMan->IsDirty(t->allNodes[n]->claIndexDown)))
+				arr.push_back(claMan->GetCla(t->allNodes[n]->claIndexDown));
+			if(! (claMan->IsDirty(t->allNodes[n]->claIndexUL)))
+				arr.push_back(claMan->GetCla(t->allNodes[n]->claIndexUL));			
+			if(! (claMan->IsDirty(t->allNodes[n]->claIndexUR)))
+				arr.push_back(claMan->GetCla(t->allNodes[n]->claIndexUR));
+			}
+		}
+	sort(arr.begin(), arr.end());
+	for(vector<CondLikeArraySet*>::iterator vit=arr.begin();vit!=arr.end();){
+		if(*(vit)==*(vit+1)) arr.erase(vit+1);
+		else vit++;
+		if((vit+1)==arr.end()){
+			break;
+			}
+		}
+	assert(arr.size() + claMan->NumFreeClas() == claMan->NumClas());
+	}
+
+void Population::LogNewBestFromRemote(FLOAT_TYPE scorediff, int ind){
+#ifdef MPI_VERSION
+        adap->bestFromRemoteNum[0]++;
+        adap->bestFromRemote[0]+=scorediff;
+        
+        indiv[0].treeStruct->CalcBipartitions(true);
+        indiv[ind].treeStruct->CalcBipartitions(true);
+        
+        //check if this is a new topology
+        if(indiv[0].treeStruct->IdenticalTopology(indiv[ind].treeStruct->root) == false){
+			debug_mpi("\ttopo different from prev best");
+			AppendTreeToTreeLog(-1, ind);
+			if(scorediff > significantTopoChange) lastTopoImprove=gen;
+			}
+		else{
+			debug_mpi("\ttopo same as prev best");
+//			AppendTreeToTreeLog(0, ind);
+			}
+        
+#endif
+        }
+
+void Population::CheckRemoteReplaceThresh(){
+#ifdef MPI_VERSION
+	if(gen < adap->intervalLength * adap->intervalsToStore) return;
+	FLOAT_TYPE totBestFromRemote=ZERO_POINT_ZERO;
+	int totBestFromRemoteNum=0;
+	for(int i=0;i<adap->intervalsToStore;i++){	
+	         totBestFromRemoteNum += adap->bestFromRemoteNum[i];
+        	 totBestFromRemote += adap->bestFromRemote[i];
+		}
+	if(totBestFromRemoteNum==0) paraMan->ReduceUpdateThresh();
+
+#endif
+}
+
+/* 7/21/06 needs to be updated
+void Population::SPRoptimization(int indivIndex){
+//	for(int i=0;i<conf->nindivs;i++)
+//		indiv[i].ResetIndiv();
+
+//	bool topoChange=false;
+
+	for(int reps=0;reps<1;reps++){
+		int cutnum = newindiv[indivIndex].treeStruct->GetRandomNonRootNode();
+		SPRoptimization(indivIndex, adap->limSPRrange, cutnum);
+		}
+	
+/*	if(topoChange==true){
+		if(topologies[indiv[bestIndiv].topo]->nInds>1){
+			topologies[indiv[bestIndiv].topo]->RemoveInd(bestIndiv);
+			indiv[bestIndiv].topo=ntopos++;
+			topologies[indiv[bestIndiv].topo]->AddInd(bestIndiv);
+			assert(topologies[indiv[bestIndiv].topo]->nInds==1);
+			}
+		topologies[indiv[bestIndiv].topo]->gensAlive=0;
+		TopologyList::ntoposexamined++;
+		UpdateTopologyList(indiv);
+		}	
+*/	
+//	CalcAverageFitness();
+//	OutputFilesForScoreDebugging();
+       
+//}
+
+/* 7/21/06 needs to be updated
+bool Population::SPRoptimization(int indivIndex, int range, int cutnum ){
+	//DJZ 1/23/04 this is based on the NNI optimization function by Alan (ie, exhaustive nnis)
+	//the main difference is that only one node will be used as the node to be cut off and
+	//reattached, but then all reattachment points within a radius will be tried.
+	//the marking of nodes as dirty is also necessarily different
+	subset sprRange;
+	
+	Individual  currentBest;
+	Individual  tempIndiv1;
+	FLOAT_TYPE bestSPRFitness; 
+	bool topoChange=false;
+	
+	ofstream outf("sprdebug.tre");
+	ofstream scr("sprscores.tre");
+	scr.precision(10);
+
+	//DJZ
+	while(unusedTrees.size()<2){
+		Tree *temp=new Tree();
+		unusedTrees.push_back(temp);
+		}
+
+	//bestSPRFitness = indiv[newindiv[indivIndex].parent].Fitness();
+	bestSPRFitness = -1e100;
+
+
+	tempIndiv1.treeStruct=*(unusedTrees.end()-1);
+	unusedTrees.pop_back();
+	currentBest.treeStruct=*(unusedTrees.end()-1);
+	unusedTrees.pop_back();	
+	//
+
+	tempIndiv1.CopySecByRearrangingNodesOfFirst(tempIndiv1.treeStruct, &newindiv[indivIndex]);
+	currentBest.CopySecByRearrangingNodesOfFirst(currentBest.treeStruct, &newindiv[indivIndex]);
+
+	TreeNode **thenodes=tempIndiv1.treeStruct->allNodes;
+
+	//choose the nodenum to be cut
+//	int cutnum = params->rnd.random_int(tempIndiv1.treeStruct->numNodesTotal -1 ) +1;
+	TreeNode *cutnode= thenodes[cutnum];
+	
+	//now determine the nodes that fall within the reattachment radius
+	//this is Alan's code for putting together the subset, with a bit of my alteration
+	//the subset will be centered on cutnode's anc, AKA connector
+	sprRange.setseed(cutnode->anc->nodeNum);
+	int connector=cutnode->anc->nodeNum;
+	
+    for(int i = 0;i<range;i++){
+		int j = sprRange.total;
+		for(int k=0; k < j; k++){
+			if(sprRange.front[k]==i){
+				TreeNode *cur=thenodes[sprRange.element[k]];
+				if(cur->left!=NULL) 
+						sprRange.addelement(cur->left->nodeNum, i+1, sprRange.pathlength[k]+cur->left->dlen);
+				if(cur->right!=NULL)
+						sprRange.addelement(cur->right->nodeNum, i+1, sprRange.pathlength[k]+cur->right->dlen);
+				if(cur->anc!=NULL) 
+						sprRange.addelement(cur->anc->nodeNum, i+1, sprRange.pathlength[k]+cur->dlen);
+				}// end of loop through element of current subset
+		    }// end of loop to findrange
+		}
+
+	if(cutnode->next != NULL) sprRange.elementremove(cutnode->next->nodeNum);
+	if(cutnode->prev != NULL) sprRange.elementremove(cutnode->prev->nodeNum);
+	sprRange.elementremove(connector); //connecting to the sib recreates the original tree
+	//remove the nodes that are actually part of the subtree being cut, starting with connector
+	thenodes[cutnum]->RemoveSubTreeFromSubset(sprRange, true);
+
+	sprRange.compact();
+
+	int broken=0;
+	while(sprRange.element[broken]!=0){
+
+		tempIndiv1.treeStruct->SPRMutate(cutnum, sprRange.element[broken++], adap->branchOptPrecision, 0, 0);
+		if(sprRange.element[broken]==0 && sprRange.element[broken+1]!=0) broken++;
+
+		//indiv[indivIndex].treeStruct->SetAllTempClasDirty();
+		//Because a large section of the tree will be shared between the different attachment
+		//points, we should see a decent savings by only making the temp clas dirty that we 
+		//know might change, which should only be those that are considered as reattachments.
+		//newindiv[indivIndex].treeStruct->SetSpecifiedTempClasDirty(sprRange.element);
+				
+		tempIndiv1.SetDirty();
+		
+		tempIndiv1.CalcFitness(0);
+		
+		//debug the scoring of the spr trees
+/*		outf << "  utree " << gen << sprRange.element[broken] << "= ";
+		tempIndiv1.treeStruct->root->MakeNewick(treeString);
+		outf << treeString << ";" << endl;
+
+		scr << tempIndiv1.Fitness() << endl;
+		//
+*/		
+//		if(tempIndiv1.Fitness() > (bestSPRFitness + 0.01))
+/*		if(tempIndiv1.Fitness() > bestSPRFitness)
+			{
+			bestSPRFitness = tempIndiv1.Fitness();
+			currentBest.CopySecByRearrangingNodesOfFirst(currentBest.treeStruct, &tempIndiv1, true);
+			topoChange=true;
+			}
+	
+		//make the tempIndiv equal to the starting tree
+		tempIndiv1.CopySecByRearrangingNodesOfFirst(tempIndiv1.treeStruct, &newindiv[indivIndex], true);
+		} //end of loop through all possible NNIs 
+		
+	if(topoChange==true){
+		newindiv[indivIndex].CopySecByRearrangingNodesOfFirst(newindiv[indivIndex].treeStruct, &currentBest, true);
+		}
+	
+	//Return the treestructs that we used temporarily back to the unused tree vector
+	tempIndiv1.treeStruct->RemoveTreeFromAllClas();
+	unusedTrees.push_back(tempIndiv1.treeStruct);
+	tempIndiv1.treeStruct=NULL;
+	currentBest.treeStruct->RemoveTreeFromAllClas();
+	unusedTrees.push_back(currentBest.treeStruct);
+	currentBest.treeStruct=NULL;	
+	
+//	newindiv[indivIndex].treeStruct->SetAllTempClasDirty();
+	newindiv[indivIndex].mutation_type |= Individual::exlimSPR;
+	return topoChange;
+}
+*/
+/* 7/21/06 needs to be update
+void Population::SPRPerturbation(int sourceInd, int indivIndex){
+	assert(0);
+	//7/21/06 needs to be fixed to deal with changes made in
+	//constraint implementation
+	
+	/*
+	Individual  currentBest;
+	Individual  tempIndiv1;
+	Individual *source=&indiv[sourceInd];
+	int range=pertMan->sprPertRange;
+	FLOAT_TYPE thresh=10000.0;
+
+	
+//	ofstream outf("sprdebug.tre");
+//	ofstream scr("sprscores.tre");
+//	scr.precision(10);
+
+	//DJZ
+	while(unusedTrees.size()<2){
+		Tree *temp=new Tree();
+		unusedTrees.push_back(temp);
+		}
+
+	tempIndiv1.treeStruct=*(unusedTrees.end()-1);
+	unusedTrees.pop_back();
+	currentBest.treeStruct=*(unusedTrees.end()-1);
+	unusedTrees.pop_back();	
+	
+
+	for(int cycle=0;cycle < pertMan->numSprCycles;cycle++){
+		FLOAT_TYPE previousFitness=source->Fitness();
+		FLOAT_TYPE bestDiff=-thresh;
+
+		if(cycle==0){
+			tempIndiv1.CopySecByRearrangingNodesOfFirst(tempIndiv1.treeStruct, source);
+			currentBest.CopySecByRearrangingNodesOfFirst(currentBest.treeStruct, source);
+			}
+		else{
+			tempIndiv1.CopySecByRearrangingNodesOfFirst(tempIndiv1.treeStruct, source, true);
+			currentBest.CopySecByRearrangingNodesOfFirst(currentBest.treeStruct, source, true);			
+			}
+
+		TreeNode **thenodes=tempIndiv1.treeStruct->allNodes;
+
+		//this is a little odd, but just call a normal SPRMutate with the proper range
+		//so that the possible reattachment points within that range are gathered properly
+		int cutnum=tempIndiv1.treeStruct->SPRMutate(range, adap->branchOptPrecision);
+
+		tempIndiv1.CopySecByRearrangingNodesOfFirst(tempIndiv1.treeStruct, source, true);
+
+		char filename[50];
+		sprintf(filename, "pertreport%d.log", rank);
+		ofstream pert(filename, ios::app);
+		pert.precision(10);
+	
+		subset *sprRange=&(tempIndiv1.treeStruct->sprRange);
+		
+		pert.precision(10);
+	//	pert2.precision(10);
+		pert << "gen " << gen << " start " << source->Fitness() << "\t" << sprRange->total << " possible attachments\n";
+		
+		int bestDist=0;
+		int broken=sprRange->total-1;
+		while(broken>=0){
+			if(! (broken % (int)ceil((FLOAT_TYPE)sprRange->total/5))) outman.UserMessageNoCR(".");
+			outman.flush();
+
+			tempIndiv1.treeStruct->SPRMutate(cutnum, sprRange->element[broken--], adap->branchOptPrecision, 0, 0);
+			if(sprRange->element[broken]==0 && broken>0) broken--;
+
+			tempIndiv1.SetFitness(tempIndiv1.treeStruct->lnL);;
+
+			//divide the score difference by the square root of the node distance, to favor longer moves
+			FLOAT_TYPE diff=(tempIndiv1.Fitness()-previousFitness)/sqrt(sprRange->front[broken]+1.0);
+			if(diff>0) diff=(tempIndiv1.Fitness()-previousFitness)*(sprRange->front[broken]+1);
+	//		pert2 << "node=\t" << sprRange->element[broken] << "\tdist=\t" << sprRange->front[broken] << "\tscore=\t" << tempIndiv1.Fitness() << "\t" << diff << "\t" << tempIndiv1.Fitness()-previousFitness << "\n";
+			if(diff > bestDiff){
+				bestDiff=diff;
+				currentBest.CopySecByRearrangingNodesOfFirst(currentBest.treeStruct, &tempIndiv1, true);
+				bestDist=sprRange->front[broken];
+				pert << diff << "\t" << bestDist << "\n";
+				}
+			tempIndiv1.CopySecByRearrangingNodesOfFirst(tempIndiv1.treeStruct, source, true);
+			} 
+					
+		if(bestDiff>-thresh){
+			indiv[indivIndex].CopySecByRearrangingNodesOfFirst(indiv[indivIndex].treeStruct, &currentBest, true);
+			}
+		//set this tree up as the source for the next cycle
+		source=&indiv[indivIndex];
+
+		indiv[indivIndex].mutation_type |= Individual::exlimSPR;
+		pert << "end score=" << currentBest.Fitness() << endl;
+		
+		outman.UserMessage("Accepted SPR with range of %d.  Current score= %.4f", bestDist, indiv[indivIndex].Fitness());
+		}
+
+	
+	//Return the treestructs that we used temporarily back to the unused tree vector
+	tempIndiv1.treeStruct->RemoveTreeFromAllClas();
+	unusedTrees.push_back(tempIndiv1.treeStruct);
+	tempIndiv1.treeStruct=NULL;
+	currentBest.treeStruct->RemoveTreeFromAllClas();
+	unusedTrees.push_back(currentBest.treeStruct);
+	currentBest.treeStruct=NULL;
+	}
+*/
+
+/*
+void Population::CheckPerturbParallel(){
+	if(paraMan->perturbModeActive==true){
+		if(paraMan->allSent == false){
+			for(int i=1;i<=paraMan->nremotes;i++){
+				if(paraMan->needToSend[i]==true) break;
+				if(i==paraMan->nremotes) paraMan->allSent=true;
+				}		
+			if(paraMan->allSent==true){
+				//the pert generation is recorded as when we sent our last message
+				pertMan->lastPertGeneration=gen;
+				}
+			}
+		//keep the perturbModeActive flag true for a while so the master doesn't replace the remotes perturbed trees
+		if(gen - pertMan->lastPertGeneration > pertMan->minPertInterval){
+			paraMan->perturbModeActive=false;
+//			pertMan->lastPertGeneration=gen;
+			}
+		}
+	else if(pertMan->pertAbandoned==false && (gen - pertMan->lastPertGeneration) >= pertMan->minPertInterval
+		&& (adap->improveOverStoredIntervals < pertMan->pertThresh)/* && (adap->branchOptPrecision == adap->minOptPrecision)*/ /*){
+/*		for(int i=1;i<=paraMan->nremotes;i++){
+			paraMan->needToSend[i]=true;
+			}
+		paraMan->perturbModeActive=true;
+		paraMan->allSent=false;
+		pertMan->lastPertGeneration=gen;
+		}	
+	}
+*/
+
+/* 7/21/06 needs to be updated
+void Population::CheckPerturbSerial(){
+
+	if(pertMan->pertType < 3 ){
+	 	if(pertMan->pertType==1 && (gen - pertMan->lastPertGeneration) >= pertMan->minPertInterval/2 
+	 		&& adap->randNNIweight != adap->origRandNNIweight){
+			adap->randNNIweight=adap->origRandNNIweight;
+//			pertMan->lastPertGeneration=gen;
+			}
+
+
+		if(pertMan->pertAbandoned==false && (gen - pertMan->lastPertGeneration) >= pertMan->minPertInterval 
+			&& (adap->improveOverStoredIntervals < pertMan->pertThresh) /*&& (adap->branchOptPrecision == adap->minOptPrecision)*/ /*){
+			if(pertMan->numPertsNoImprove <= pertMan->maxPertsNoImprove){
+				if(BestFitness() > bestSinceRestart.Fitness()){
+					StoreBestForPert();
+					pertMan->numPertsNoImprove=0;
+					}
+				else{
+					//if we haven't done better than the best we had before the previous perturbation, restore to 
+					//that point and perturb again
+					pertMan->numPertsNoImprove++;
+					RestoreBestForPert();
+					//abandoning perturbations
+					if(pertMan->numPertsNoImprove > pertMan->maxPertsNoImprove){
+						pertMan->pertAbandoned=true;
+						pertMan->lastPertGeneration=gen;
+						return;
+						}
+					}
+												
+				if(pertMan->pertType==1){
+					int indToReplace = (bestIndiv==0 ? 1 : 0);
+					NNIPerturbation(bestIndiv, indToReplace);
+					SetNewBestIndiv(indToReplace);
+					FillPopWithClonesOfBest();
+					AppendTreeToTreeLog(-1, bestIndiv);
+					//try disallowing NNIs immediately after the perturbation
+					adap->randNNIweight=0.0;
+					adap->randNNIprob=0.0;
+					}
+				else if(pertMan->pertType==0){
+					//branch length perturbation
+					int indToReplace = (bestIndiv==0 ? 1 : 0);
+					indiv[indToReplace].treeStruct->PerturbAllBranches();
+					indiv[indToReplace].SetDirty();
+					indiv[indToReplace].CalcFitness(0);
+					SetNewBestIndiv(indToReplace);
+					FillPopWithClonesOfBest();
+					}
+				else{
+					FLOAT_TYPE startscore=BestFitness();
+					FLOAT_TYPE curscore;
+//					do{
+					int indToReplace = (bestIndiv==0 ? 1 : 0);
+					int source=bestIndiv;
+					outman.UserMessage("Performing SPR Perturbation.  Starting score=%.4f", BestFitness());
+					SPRPerturbation(source, indToReplace);
+					indiv[indToReplace].CalcFitness(0);
+					SetNewBestIndiv(indToReplace);
+					FillPopWithClonesOfBest();
+					curscore=indiv[indToReplace].Fitness();
+					AppendTreeToTreeLog(-1, bestIndiv);
+					}
+				pertMan->lastPertGeneration=gen;
+				adap->reset=true;
+				gen++;
+				OutputFate();
+				}
+			}
+		}
+
+	else if(pertMan->pertType==3){
+		if(pertMan->ratcheted==false){
+			if(pertMan->pertAbandoned==false && (gen - pertMan->lastPertGeneration) >= pertMan->minPertInterval && adap->improveOverStoredIntervals < pertMan->pertThresh){
+				if(BestFitness() > bestSinceRestart.Fitness()){
+					StoreBestForPert();
+					pertMan->numPertsNoImprove=0;
+					}
+				else{
+					//if we haven't done better than the best we had before the previous perturbation, restore to 
+					//that point and reweight again
+					RestoreBestForPert();
+					pertMan->numPertsNoImprove++;
+
+					//abandoning perturbations
+					if(pertMan->numPertsNoImprove > pertMan->maxPertsNoImprove){
+						pertMan->pertAbandoned=true;
+						return;
+						}
+					}
+				pertMan->ratcheted=true;
+				params->data->ReserveOriginalCounts();
+				params->data->Reweight(pertMan->ratchetProportion);
+			
+				claMan->MakeAllHoldersDirty();
+				for(int i=0;i<total_size;i++) indiv[i].SetDirty();
+				CalcAverageFitness();
+				bestFitness=BestFitness();
+				pertMan->lastPertGeneration=gen;
+				pertMan->scoreAfterRatchet=BestFitness();
+				adap->reset=true;
+				gen++;
+				OutputFate();
+				outman.UserMessage("Performing ratcheting: reweighting %.1f percent of characters.", pertMan->ratchetProportion*100);
+				char filename[50];
+				if(rank < 10)
+					sprintf(filename, "pertreport0%d.log", rank);
+				else 
+					sprintf(filename, "pertreport%d.log", rank);
+				ofstream pert(filename, ios::app);
+				pert << "Performing ratcheting: reweighting " << pertMan->ratchetProportion*100 << " percent of characters." << endl; 
+				pert.close();
+				}
+			}
+
+		//turn ratchet off
+		else{
+			if((gen - pertMan->lastPertGeneration) >= pertMan->ratchetMaxGen || BestFitness() - pertMan->scoreAfterRatchet > pertMan->ratchetOffThresh){
+				TurnOffRatchet();
+				gen++;
+				OutputFate();
+				}
+			}
+		}
+	}
+*/
+
+//SINGLE SITE FUNCTIONS
+void Population::OptimizeSiteRates(){
+	SeedPopulationWithStartingTree(1);
+
+	const SequenceData *data = dataPart->GetSubset(0);
+
+	//store a backup of the exisiting tree and blens
+	Individual tempIndiv;
+	tempIndiv.treeStruct=new Tree();
+	tempIndiv.CopySecByRearrangingNodesOfFirst(tempIndiv.treeStruct, &indiv[0]);	
+
+	char filename[100];
+	sprintf(filename, "%s.siterates.log", conf->ofprefix.c_str());
+	ofstream out(filename);
+
+	Tree::min_brlen = 1.0e-20;
+	Tree::max_brlen = 1.0e10;
+
+	const int lastConst=data->LastConstant();
+
+	typedef pair<FLOAT_TYPE, FLOAT_TYPE> float_pair;
+	float_pair rateAndScore;
+	vector<float_pair> allRates;
+
+	for(int i=0;i<data->NChar();i++){
+		if(i <= lastConst) 
+			rateAndScore = pair<FLOAT_TYPE, FLOAT_TYPE>(ZERO_POINT_ZERO, indiv[0].modPart.GetModel(0)->StateFreq((data->GetConstStates())[i]));
+		else{
+			indiv[0].treeStruct->MakeAllNodesDirty();
+			Tree::siteToScore = i;
+			rateAndScore = indiv[0].treeStruct->OptimizeSingleSiteTreeScale(adap->branchOptPrecision);
+			//restore the original blens
+			indiv[0].CopySecByRearrangingNodesOfFirst(indiv[0].treeStruct, &tempIndiv, true);
+			}
+		allRates.push_back(rateAndScore);
+		}
+	out << "site#\tsiteRate\tsitelnL" << endl;
+	for(int i=0;i<data->GapsIncludedNChar();i++){
+		int packedColumn = data->Number(i);
+		assert(packedColumn < (int)allRates.size());
+		out << i+1 << "\t";
+		if(packedColumn == -1) out << "NA\tNA" << endl;
+		else out << allRates[packedColumn].first << "\t" << allRates[packedColumn].second << endl;
+		}
+	out.close();
+	outman.UserMessage("Site-rate estimation complete.");
+	}
diff --git a/src/population.h b/src/population.h
new file mode 100644
index 0000000..9041113
--- /dev/null
+++ b/src/population.h
@@ -0,0 +1,590 @@
+// GARLI version 2.1 source code
+// Copyright 2005-2014 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+//	NOTE: Portions of this source adapted from GAML source, written by Paul O. Lewis
+
+#ifndef POPULATION_H
+#define POPULATION_H
+
+#include <iostream>
+#include <vector>
+#include <cfloat>
+#include <cassert>
+
+using namespace std;
+
+#include "configoptions.h"
+#include "individual.h"
+#include "stopwatch.h"
+#include "errorexception.h"
+
+class CondLikeArray;
+class Tree;
+class ClaManager;
+class Adaptation;
+
+class Subtree{
+	public:
+	int nodeNum;
+	int taxa;
+	FLOAT_TYPE blen;
+	int numAssigned;
+	int priority;
+	FLOAT_TYPE score;
+	
+	Subtree(int nn, int t, FLOAT_TYPE b, FLOAT_TYPE s){
+		nodeNum=nn;
+		taxa=t;
+		priority=1;
+		numAssigned=0;
+		blen=b;
+		score=s;
+		}
+	void Log(ofstream &out){
+		out << nodeNum << "\t" << taxa << "\t" << score << "\n";
+		}
+	
+	};
+
+class ParallelManager{
+	public:
+	bool subtreeModeActive;
+	bool perturbModeActive;
+
+	int nremotes;
+	int ntax;
+
+	//variables related to subtree mode
+	int subtreeDefNumber;
+	int subtreeDefGeneration;
+	FLOAT_TYPE subtreeDefScore;	//the score of the tree that the subtrees were initially calculated on
+	int lastFullRecom; 		//the last time we tried a subtree based recombination
+	vector<Subtree *> subtrees;
+	bool fewNonSubtreeNodes;
+
+	int *remoteSubtreeAssign;  // which node the remote was most recently assigned
+	int *localSubtreeAssign;  // which node the remotes _were_ working on for the most recent tree received
+
+	bool needUpdate;			//this means that the subtrees determined are no longer guaranteed to be valid for any trees in the population
+	bool beforeFirstSubtree;
+
+	FLOAT_TYPE updateThresh;
+	FLOAT_TYPE startUpdateThresh;
+	FLOAT_TYPE minUpdateThresh;
+	FLOAT_TYPE updateReductionFactor;
+	
+	int subtreeInterval;
+	FLOAT_TYPE subtreeStartThresh;
+	int	minSubtreeSize;
+	int targetSubtreeSize;
+	FLOAT_TYPE orphanFactor;
+	
+	int maxRecomIndivs;
+
+//	FLOAT_TYPE recalcThresh;		//the score threshold for forcing a recalc of the subtrees
+//	FLOAT_TYPE subtreeThresh; 	//the score threshold for sending a remote a new tree if it 
+								//is currently working on a subtree
+//	FLOAT_TYPE nonSubtreeThresh;	//the score threshold for sending a remote a new tree if subtree
+								//mode is off
+ 	
+
+	bool perturb;
+	bool *needToSend;
+	bool allSent;
+
+	public:
+	vector<int> nonSubtreeNodesforNNI;
+	vector<int> nonSubtreeNodesforSPR;
+
+	void FindNonSubtreeNodes(TreeNode *nd);
+  	
+  	public:
+	ParallelManager(int _ntax, int nproc, const MasterGamlConfig *mc){
+		ntax=_ntax;
+		needUpdate=true;
+		subtreeModeActive=false;
+		perturbModeActive=false;
+		perturb=false;
+
+		subtreeDefGeneration =-1;
+		subtreeDefScore=-1;
+		subtreeDefNumber=0;
+		lastFullRecom=-1;
+
+		beforeFirstSubtree=true;
+
+		nremotes=nproc-1;
+		remoteSubtreeAssign=new int[nproc];
+		localSubtreeAssign=new int[nproc];
+		needToSend=new bool[nproc];
+
+		for(int i=0;i<nproc;i++){
+			remoteSubtreeAssign[i]=0;
+			localSubtreeAssign[i]=0;
+			needToSend[i]=false;
+			}
+		allSent=true;
+		
+//		recalcThresh = mc->subtreeRecalcThresh;
+		updateThresh = startUpdateThresh = mc->startUpdateThresh;
+		minUpdateThresh = mc->minUpdateThresh;
+		//DJZ 2/20/06
+		//making the reduction factor depend on the min and max updateThreshes
+		//and the number of reductions requested for the optprecision to 
+		//go from its start to min
+		//updateReductionFactor = mc->updateReductionFactor;
+		
+		updateReductionFactor=pow((FLOAT_TYPE) minUpdateThresh/startUpdateThresh, (FLOAT_TYPE) 1.0/ (mc->numPrecReductions));
+
+
+//		subtreeThresh = mc->subtreeUpdateThresh;
+//		nonSubtreeThresh = mc->nonsubtreeUpdateThresh;
+		subtreeInterval = mc->subtreeInterval;
+		subtreeStartThresh = mc->subtreeStartThresh;
+		minSubtreeSize=mc->minSubtreeSize;
+		targetSubtreeSize=mc->targetSubtreeSize;
+		orphanFactor=mc->orphanFactor;
+		
+		maxRecomIndivs=mc->maxRecomIndivs;
+		} 
+	
+	~ParallelManager(){
+		if(remoteSubtreeAssign != NULL) delete []remoteSubtreeAssign;
+		if(localSubtreeAssign != NULL) delete []localSubtreeAssign;
+		if(needToSend != NULL) delete []needToSend;
+		}
+	
+	bool ReadyForSubtreeRecom(int gen){
+		return (subtreeModeActive==true && (gen - lastFullRecom >= subtreeInterval/2));
+		}
+
+	void ReduceUpdateThresh(){
+		updateThresh *= updateReductionFactor;
+		if(updateThresh < minUpdateThresh) updateThresh=minUpdateThresh;
+		}
+
+	void CheckSubtreeAccuracy(const Tree *tr){
+		for(int i=0;i<(int)subtrees.size();i++){
+			int countnum= tr->allNodes[subtrees[i]->nodeNum]->CountTerminals(0);
+			assert(countnum== subtrees[i]->taxa);
+			}	
+		}
+	void ClearSubtrees(){
+		for(int i=0;i<(int)subtrees.size();i++){
+			delete subtrees[i];
+			}
+		subtrees.clear();
+		}
+	int DetermineSubtrees(Tree *tr, ofstream &);
+	void Partition(TreeNode *pointer);
+	void NewPartition(TreeNode *pointer, int &orphans, vector<Subtree*> &subtreesAbove);
+	void NewPartitionDown(TreeNode *pointer, TreeNode *calledFrom, int &orphans, vector<Subtree*> &subtreesAbove);
+	void PartitionDown(TreeNode *pointer, TreeNode *calledFrom);
+	FLOAT_TYPE ScorePartitioning(int nodeNum, ofstream &pscores);
+	void PrepareForSubtreeMode(Individual *ind, int gen);
+	int ChooseSubtree();
+			
+  };
+
+#ifdef INCLUDE_PERTURBATION
+class PerturbManager{
+	public:
+	int lastPertGeneration;
+	bool pertAbandoned;
+	int numPertsNoImprove;
+	FLOAT_TYPE prevPertScore;
+	FLOAT_TYPE scoreAfterRatchet;
+
+	int pertType;
+	FLOAT_TYPE pertThresh;
+	int minPertInterval;
+	int maxPertsNoImprove;
+	bool restartAfterAbandon;
+	int gensBeforeRestart;
+
+	FLOAT_TYPE ratchetProportion;
+	FLOAT_TYPE ratchetOffThresh;
+	int ratchetMaxGen;
+	bool ratcheted;
+
+	FLOAT_TYPE nniAcceptThresh;
+	int nniTargetAccepts;
+	int nniMaxAttempts;
+	
+	int numSprCycles;
+	int sprPertRange;
+	
+	public:
+	PerturbManager(){
+		pertAbandoned=true;
+		ratcheted=false;
+		pertThresh=0.0;
+		}
+	PerturbManager(const GeneralGamlConfig *conf){
+		lastPertGeneration=-1;
+		pertAbandoned=false;
+		numPertsNoImprove=0;
+		prevPertScore=-1;
+		scoreAfterRatchet=-1;
+
+		pertType = conf->pertType;
+		if(pertType!=1 && pertType!=3){
+			throw ErrorException("Sorry, only pertTypes 1 and 3 and currently supported!");
+			}
+		pertThresh = conf->pertThresh;
+		minPertInterval = conf->minPertInterval;
+		maxPertsNoImprove = conf->maxPertsNoImprove;
+		restartAfterAbandon = conf->restartAfterAbandon;
+		gensBeforeRestart = conf->gensBeforeRestart;
+				
+		nniTargetAccepts = conf->nniTargetAccepts;
+		nniMaxAttempts = conf->nniMaxAttempts;
+
+		ratchetProportion = conf->ratchetProportion;
+		ratchetOffThresh = conf->ratchetOffThresh;
+		ratchetMaxGen = conf->ratchetMaxGen;
+		ratcheted=false;
+
+		numSprCycles = conf->numSprCycles;
+		sprPertRange = conf->sprPertRange;
+		}
+	};
+#endif
+
+class Population{
+
+private: 
+	int rank;//denotes which processor this is.  0 if serial
+	int bestIndiv;
+	int bestAccurateIndiv;
+	int subtreeNode;
+	int subtreeDefNumber;
+
+	unsigned gen;
+	unsigned currentBootstrapRep;
+	int lastBootstrapSeed;
+	int nextBootstrapSeed;
+	unsigned currentSearchRep;
+	//termination related variables
+	unsigned lastTopoImprove;
+	unsigned lastPrecisionReduction;
+	unsigned lastUniqueSwap;
+	
+	unsigned total_size; //this will be equal to conf->nindiv, except in 
+					//the case of the parallel master
+	unsigned ntopos;
+
+	//this indicates that we've exited the generation loop in Run(), but if 
+	//finishedRep is false that means that we still have to do final opt.
+	bool finishedGenerations;
+	//when a single search replicate is finished (not a bootstrap rep)
+	bool finishedRep;
+
+	//These start at 0, are set to 1 when optimization starts, and when each pass ends they increment.  When a refine
+	//phase finishes it is set to -1.  Mainly important to report % done in boincWordDivision mode, but could in theory
+	//be adapted to checkpointing during initial/final optimization.  
+	int initialRefinePass;
+	int finalRefinePass;
+
+	FLOAT_TYPE bestFitness;
+	FLOAT_TYPE prevBestFitness;
+	FLOAT_TYPE tot_fraction_done;
+	FLOAT_TYPE rep_fraction_done;//make sure this remains the last scalar in the class for checkpointing to work
+
+public:
+	GeneralGamlConfig *conf;
+	ClaManager *claMan;
+	Adaptation *adap;
+	Individual* indiv;
+
+private:
+
+	Individual* newindiv;
+	vector<int> subtreeMemberNodes;
+
+#ifdef INCLUDE_PERTURBATION
+	PerturbManager *pertMan;
+#endif
+	ParallelManager *paraMan;
+		
+	//DJZ adding these streams directly to the class so that they can be opened once and left open
+	ofstream fate;
+	ofstream log;
+	ofstream treeLog;
+	ofstream probLog;
+	ofstream bootLog;
+	ofstream bootLogPhylip;
+	ofstream swapLog;
+
+	string besttreefile;
+	char *treeString;
+	int stringSize;
+
+	//if the user killed the run
+	bool userTermination;
+	//specified stoptime FOR THIS EXECUTION was reached.  
+	bool timeTermination;
+	//specified stopgen was reached.  Note that this is PER REP, so it can be reset.
+	bool genTermination;
+	//termination due to workphasedivision setting, i.e. after initial opt, before final opt
+	//and immediately after final opt
+	bool workPhaseTermination;
+	//This just means that the run was restarted but the checkpoint indicated that the run had
+	//actually finished.  The flag mainly ensures that output files are not finalized multiple 
+	//times (e.g., end; written to tree files)
+	bool restartedAfterTermination;
+
+	vector<Tree *> unusedTrees;
+	//trees that are being stored for some reason, for example the
+	//best from a number of reps
+	vector<Individual *> storedTrees;
+
+	public:
+		enum { nomem=1, nofile, baddimen };
+		int error;
+	bool usedNCL;
+	bool startingTreeInNCL;
+	bool startingModelInNCL;
+	//this is the number of generations that the run must continue without finding
+	//a new better swap to terminate, on top of other stopping conditions, default=0
+	//if it is NEGATIVE, then abs(this) superseeds all other term cond and only this 
+	//must be met. set in conf with swaptermthreshold = #
+	int swapTermThreshold;
+
+	enum output_details {
+		DONT_OUTPUT = 0,
+		REPLACE = 1,
+		APPEND = 2,
+		NEWNAME = 4,
+
+		WRITE_CONTINUOUS = 8,
+		WRITE_REP_TERM = 16,
+		WRITE_REPSET_TERM = 32,
+		WRITE_PREMATURE = 64,
+		
+		FINALIZE_REP_TERM = 128,
+		FINALIZE_REPSET_TERM = 256,
+		FINALIZE_FULL_TERM = 512,
+		FINALIZE_PREMATURE = 1024,
+
+		WARN_PREMATURE = 2048,
+		NEWNAME_PER_REP = 4096
+		};
+	
+	output_details screen_output;
+	output_details log_output;
+	output_details best_output;
+	output_details all_best_output;
+	output_details treelog_output;
+	output_details fate_output;
+	output_details problog_output;
+	output_details swaplog_output;
+	output_details bootlog_output;
+
+	FLOAT_TYPE** cumfit;//allocated in setup, deleted in dest
+		
+	DataPartition *dataPart;
+	DataPartition *rawPart;//this will hold the original data as read in, before it might be converted
+					//to codons or aminoacid
+
+	Stopwatch stopwatch;
+
+#ifdef INCLUDE_PERTURBATION
+	Individual *allTimeBest; //this is only used for perturbation or ratcheting
+	Individual *bestSinceRestart;
+#endif
+
+	public:	
+		Population() : error(0), conf(NULL), usedNCL(false), startingTreeInNCL(false), startingModelInNCL(false),
+			bestFitness(-(FLT_MAX)), bestIndiv(0), currentSearchRep(1), 
+			prevBestFitness(-(FLT_MAX)),indiv(NULL), newindiv(NULL),
+			cumfit(NULL), gen(0), paraMan(NULL), subtreeDefNumber(0), claMan(NULL), 
+			treeString(NULL), adap(NULL), rep_fraction_done(ZERO_POINT_ZERO), tot_fraction_done(ZERO_POINT_ZERO),
+			userTermination(false), timeTermination(false), genTermination(false), workPhaseTermination(false), restartedAfterTermination(false),
+			currentBootstrapRep(0), finishedRep(false), lastBootstrapSeed(0), nextBootstrapSeed(0), dataPart(NULL), rawPart(NULL), swapTermThreshold(0),
+			finishedGenerations(false), initialRefinePass(0), finalRefinePass(0)
+#ifdef INCLUDE_PERTURBATION			 
+			pertMan(NULL), allTimeBest(NULL), bestSinceRestart(NULL),
+#endif
+			{
+			lastTopoImprove = 0;
+			lastPrecisionReduction = 0;
+			}
+
+		~Population();
+
+		void QuickSort( FLOAT_TYPE **scoreArray, int top, int bottom );
+		FLOAT_TYPE BestFitness() {
+//			assert(bestFitness == indiv[bestIndiv].Fitness());
+			return bestFitness; 
+			}
+
+#if !defined( PARALLEL_MPI_VERSION )
+		void Run();
+#endif
+		void SetOutputDetails();
+		void DetermineFilename(output_details details, char *outname, string suffix);
+
+		//functions added for multiple replicate searches
+		void WriteStoredTrees( const char* treefname );
+		void OutputRepNums(ofstream &out);
+		void GetRepNums(string &s);
+		void PerformSearch();
+		int EvaluateStoredTrees(bool report);
+		void ClearStoredTrees();
+
+		char *TreeStructToNewick(int i);
+		char *MakeNewick(int, bool);
+		void CreateGnuPlotFile();
+		void WritePopulationCheckpoint(OUTPUT_CLASS &out) ;
+
+		void ReadPopulationCheckpoint();
+		void WriteStateFiles();
+		bool ReadStateFiles();
+		void GetConstraints();
+		void WriteTreeFile( const char* treefname, int indnum, bool collapse = false);
+		void WritePhylipTree(ofstream &phytree);
+
+		void Setup(GeneralGamlConfig *conf, DataPartition *, DataPartition *, int nprocs = 1, int rank = 0);
+		void Reset();
+		int Restart(int type, int rank, int nprocs, int restart_count);
+		void SeedPopulationWithStartingTree(int rep);//mult rep change
+		FLOAT_TYPE CalcAverageFitness();
+		void CalculateReproductionProbabilies(FLOAT_TYPE **scoreArray, FLOAT_TYPE selectionIntensity, int indivsInArray);
+		void NextGeneration();
+		void DetermineParentage();
+		void FindTreeStructsForNextGeneration();
+		void PerformMutation(int indNum);
+		void UpdateFractionDone(int phase);
+		FLOAT_TYPE GenerationFractionDone();
+		bool OutgroupRoot(Individual *ind, int indnum);
+		void LoadNexusStartingConditions();
+		void VariableStartingTreeOptimization(bool reducing);
+		void OptimizeSiteRates();
+		void OptimizeInputAndWriteSitelikelihoods();
+		void OptimizeInputAndWriteSitelikelihoodsAndTryRootings();
+
+		int IsError() const { return error; }
+		void ErrorMsg( char* msgstr, int len );
+		void CompactTopologiesList();
+		void EliminateDuplicateTreeReferences();
+		friend istream& operator >>( istream& inf, Population& p );
+		friend ostream& operator <<( ostream& outf, Population& p );
+
+		int ExtendPopulation(int, char*, FLOAT_TYPE*);
+		int ShrinkPopulation(int, char**, FLOAT_TYPE**);
+		int SwapIndividuals(int, const char*, FLOAT_TYPE*, char**, FLOAT_TYPE**);
+		int ReplaceSpecifiedIndividuals(int,  int*, const char*, FLOAT_TYPE*);
+		int ReplicateSpecifiedIndividuals(int, int*, const char*, FLOAT_TYPE *);
+		void FillPopWithClonesOfBest();
+		
+		int GetNRandomIndivIndices(int**, int);
+		int GetNBestIndivIndices(int**, int);
+		int GetSpecifiedTreeStrings(char**, int, int*);
+		int GetSpecifiedRates(FLOAT_TYPE**, int, int*);
+		int GetSpecifiedPis(FLOAT_TYPE**, int , int*);
+		int GetSpecifiedModels(FLOAT_TYPE** model_string, int n, int* indiv_list);
+		
+		void CheckAllTrees();
+		void CheckIndividuals();
+		void CheckTreesVsClaManager();
+		FLOAT_TYPE IndivFitness(int i);
+		
+		void NNIPerturbation(int sourceInd, int indivIndex);
+		void NNISpectrum(int sourceInd);
+
+		void NNIoptimization();
+//		void SPRoptimization(int indivIndex);
+		bool NNIoptimization(unsigned IndivIndex, int steps);
+//		bool SPRoptimization(int indivIndex, int range, int cutnum );
+		void SPRPerturbation(int sourceInd, int indivIndex);
+		void keepTrack();
+		void DetermineSubsets(int);
+		void Partition(TreeNode *pointer);
+		void PartitionDown(TreeNode *pointer, TreeNode *calledFrom);
+
+		void CheckPerturbSerial();
+		void CheckPerturbParallel();
+		void StoreBestForPert();
+		void StoreAllTimeBest();
+		void RestoreBestForPert();
+		void RestoreAllTimeBest();
+		void CheckSubtrees();
+		void AssignSubtree(int st, int indNum);
+		bool SubtreeRecombination(int);
+		void StartSubtreeMode();
+		void StopSubtreeMode();
+		
+	private:
+
+		int prResizeIndividualArray(int, char* = NULL, FLOAT_TYPE* = NULL);
+		int prResizeNewIndividualArray(int);
+		int prResizeTopologyListArray(int);
+		int prResizeCumFitArray(int);
+				
+	public:
+		void InitializeOutputStreams();
+		void FinalizeOutputStreams(int type);
+
+		void AppendTreeToTreeLog(int mutType, int indNum=-1);
+		void FinishBootstrapRep(const Individual *ind, int rep);
+		void UpdateTreeModels();
+		
+		void WriteGenerationOutput();
+		void OutputFate();
+		void OutputLog();
+		void OutputModelReport();
+
+		void OutputModelAddresses();
+		void OutputClaReport(Individual *arr);
+		void OutputFilesForScoreDebugging(Individual *ind=NULL, int num=0);
+		void RunTests();
+		void GenerateTreesOnly(int nTrees);
+		void ApplyNSwaps(int numSwaps);
+		void SwapToCompletion(FLOAT_TYPE optPrecision);
+		void CheckForIncompatibleConfigEntries();
+
+		void Bootstrap();
+		void FindLostClas();
+		void FinalOptimization();
+		void BetterFinalOptimization();
+		void InitialOptimization(Individual *ind, bool optModel, FLOAT_TYPE branchPrec);
+		void ResetMemLevel(int numNodesPerIndiv, int numClas);
+		void SetNewBestIndiv(int indivIndex);
+		void LogNewBestFromRemote(FLOAT_TYPE, int);
+		void CheckRemoteReplaceThresh();
+		void TurnOffRatchet();
+		unsigned Gen()const {return gen;}
+		void ValidateInput(int rep);
+		string TerminationWarningMessage(){
+			return string("\nNOTE: ***Search was terminated before full auto-termination condition was reached!\nLikelihood scores, topologies and model estimates obtained may not be fully optimal!***\n");
+			}
+		bool ShouldCheckpoint(bool checkGeneration) const{
+#ifndef BOINC
+			//non-BOINC checkpointing
+			if(conf->checkpoint == true && conf->scoreOnly == false && conf->optimizeInputOnly == false && (checkGeneration == false || (gen % conf->saveevery) == 0)) 
+				return true;
+#else
+			//BOINC checkpointing can occur whenever the BOINC client wants it to
+			if(boinc_time_to_checkpoint())
+				return true;
+#endif
+			return false;
+			}
+
+	};
+#endif
diff --git a/src/reconnode.h b/src/reconnode.h
new file mode 100644
index 0000000..5f3e29f
--- /dev/null
+++ b/src/reconnode.h
@@ -0,0 +1,544 @@
+// GARLI version 2.0 source code
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+#ifndef _RECONNODE_
+#define _RECONNODE_
+
+
+#include <list>
+#include <algorithm>
+#include <functional>
+#include "rng.h"
+#ifdef UNIX
+#include "unistd.h"
+#endif
+
+extern rng rnd;
+
+using namespace std;
+
+class ReconNode;
+
+typedef list<ReconNode>::iterator listIt;
+
+class ReconNode{
+	public:
+	unsigned short nodeNum;
+	unsigned short reconDist;
+	FLOAT_TYPE pathlength;
+	FLOAT_TYPE weight;
+	FLOAT_TYPE chooseProb;
+	bool withinCutSubtree;
+	
+	ReconNode(unsigned short nn, unsigned short rd, float pl, bool wcs=false) : nodeNum(nn), reconDist(rd), pathlength(pl), withinCutSubtree(wcs) {}
+	void Report(ofstream &deb){
+		deb << nodeNum << "\t" << reconDist << "\t" << pathlength << "\t" << weight << "\t" << chooseProb << "\t" << withinCutSubtree << "\n";
+		}
+
+	bool operator<(const ReconNode &rhs){
+		return reconDist < rhs.reconDist;
+		}
+	};
+
+class DistEquals:public binary_function<ReconNode, int, bool>{
+	public:
+	result_type operator()(first_argument_type i, second_argument_type j) const{
+		return (result_type) (i.reconDist==j);
+		}
+	};
+
+class DistEqualsWithinCutSubtree:public binary_function<ReconNode, int, bool>{
+	public:
+	result_type operator()(first_argument_type i, second_argument_type j) const{
+		return (result_type) (i.reconDist==j && i.withinCutSubtree==true);
+		}
+	};
+
+class NodeEquals:public binary_function<ReconNode, int, bool>{
+	public:
+	result_type operator()(first_argument_type i, second_argument_type j) const{
+		return (result_type) (i.nodeNum==j);
+		}
+	};
+
+class ReconList{
+	unsigned num;
+	list<ReconNode> l;
+
+	public:
+
+	ReconList(){
+		num = 0;
+		}
+
+	listIt begin(){
+		return l.begin();
+		}
+
+	listIt end(){
+		return l.end();
+		}
+
+	listIt GetFirstNodeAtDist(int Dist){
+		return find_if(l.begin(),l.end(),bind2nd(DistEquals(), Dist));
+		}
+
+	listIt GetFirstNodeAtDistWithinCutSubtree(int Dist){
+		return find_if(l.begin(),l.end(),bind2nd(DistEqualsWithinCutSubtree(), Dist));
+		}
+
+	void clear() {
+		l.clear();
+		num=0;
+		}
+	unsigned size() {
+		assert(num == l.size());
+		return num;
+		}
+		
+	void print(const char *fn){
+		ofstream out(fn);
+		for(listIt it=l.begin();it!=l.end();it++){
+			out << it->nodeNum << "\t" << it->reconDist << "\t" << it->pathlength << endl;			
+			}
+		out.close();
+		}
+
+	void CalcProbsFromWeights(){
+		//this just fills the chooseProb field by dividing the prob between the nodes in proportion to their weight
+		FLOAT_TYPE weightSum = 0.0, running = 0.0;
+		for(listIt it=l.begin();it!=l.end();it++){
+			weightSum += (*it).weight;
+			}
+			
+		for(listIt it=l.begin();it!=l.end();it++){
+			running += (*it).weight/weightSum;
+			(*it).chooseProb = (float) running;
+			}
+		}
+		
+	void RemoveNodesOfDist(int dist){
+		//remove_if(l.begin(), l.end(), bind2nd(DistEquals(), dist));
+		for(listIt it=l.begin();it!=l.end();){
+			if((*it).reconDist==dist){
+				it=l.erase(it);
+				num--;
+				}
+			else it++;
+			}
+		}
+		
+	listIt NthElement(int index){
+		listIt ret=l.begin();
+		int i=0;
+		while(i++<index){
+			ret++;
+			assert(ret != l.end());
+			}
+		return ret;
+		}
+	
+	listIt RemoveNthElement(int index){
+		listIt del=l.begin();
+		int i=0;
+		while(i++<index){
+			del++;
+			assert(del != l.end());
+			}
+		num--;
+		return l.erase(del);
+		}
+	
+	listIt RemoveElement(listIt del){
+		num--;
+		return l.erase(del);
+		}
+	
+	int RandomNodeNum(){
+		return (NthElement(rnd.random_int((int)l.size())))->nodeNum;
+		}
+
+	void Reverse(){
+		reverse(l.begin(), l.end());
+		}
+
+	ReconNode *RandomReconNode(){
+		return &(*(NthElement(rnd.random_int((int)l.size()))));
+		}
+		
+	ReconNode *ChooseNodeByWeight(){
+		FLOAT_TYPE prob = rnd.uniform();
+		 listIt it=l.begin();
+		 for(;it!=l.end();it++){
+			if(prob < (*it).chooseProb) return &(*it);
+			}
+		//we should only get here due to a little rounding error
+		it--;
+		return &(*it);
+		}
+	void AddNode(ReconNode &nd){
+		//this just duplicates the added ReconNode via the default copy constructor, assumably added from another list
+		l.push_back(nd);
+		num++;
+		}
+
+	void AddNode(int nn, int rd, float pl, bool withinCutSubtree=false){	
+		//first verify that we don't already have this node in the list
+		if(find_if(l.begin(),l.end(),bind2nd(NodeEquals(), nn)) != l.end()) return;	
+		l.push_back(ReconNode(nn, rd, pl, withinCutSubtree));
+		num++;
+		}	
+
+
+	void SortByDist(){
+		l.sort();
+		}
+
+	void DebugReport(){
+		ofstream deb("recons.log");
+		for(listIt it=l.begin();it!=l.end();it++){
+			(*it).Report(deb);
+			}
+		deb.close();
+		}
+
+	};
+
+class Swap;
+bool SwapLessThan(const Swap &lhs, const Swap &rhs);
+bool SwapLessThanDist(const Swap &lhs, const Swap &rhs);
+
+class Swap{
+	Bipartition b;
+	unsigned short count;
+	unsigned short cutnum;
+	unsigned short brokenum;
+	unsigned short reconDist;
+
+public:
+	//default constructor does not initialize the bipart, since there would be some overhead
+	Swap() : count(0), cutnum(0), brokenum(0), reconDist(0){}
+	Swap(Bipartition &swap, int cut, int broke, int dist){
+		b=&swap;
+		count=1;
+		cutnum=cut;
+		brokenum=broke;
+		reconDist=dist;
+		}
+	//copy constructor
+	Swap(const Swap &s){
+		b=s.b;
+		count=s.count;
+		cutnum=s.cutnum;
+		brokenum=s.brokenum;
+		reconDist=s.reconDist;
+		}
+	//this is just like the constructor, but doesn't require the bipartition
+	//to be allocated every time
+	void Setup(Bipartition &swap, int cut, int broke, int dist){
+		b=&swap;
+		count=1;
+		cutnum=cut;
+		brokenum=broke;
+		reconDist=dist;
+		}
+
+	Swap(FILE* &in){
+		b.BinaryInput(in);
+		intptr_t scalarSize = (intptr_t) &(reconDist) - (intptr_t) &(count) + sizeof(reconDist);
+		fread(&count, scalarSize, 1, in);
+		}
+
+	void Increment(){
+		count++;	
+		}
+
+	int Count()const {
+		return count;	
+		}
+
+	int ReconDist() const{
+		return reconDist;
+		}
+
+	void SetCount(int c){
+		count = c;
+		}
+
+	void Output(ofstream &out){
+		out << b.Output() << "\t" << count << "\t" << cutnum << "\t" << brokenum << "\t" << reconDist << endl;
+		}
+/*
+	void BinaryOutput(ofstream &out){
+		b.BinaryOutput(out);
+		intptr_t scalarSize = (intptr_t) &reconDist - (intptr_t) &count + sizeof(reconDist);
+		out.write((char*)&count, (streamsize) scalarSize);
+		}
+*/
+
+	void BinaryOutput(OUTPUT_CLASS &out){
+		b.BinaryOutput(out);
+		intptr_t scalarSize = (intptr_t) &reconDist - (intptr_t) &count + sizeof(reconDist);
+		out.WRITE_TO_FILE(&count, (streamsize) scalarSize, 1);
+		}
+
+	unsigned BipartitionBlock(int block) const{
+		return b.rep[block];	
+		}
+
+	bool operator<(const Swap &rhs){
+		//note that this is "less than" for sorting purposes, not in a subset sense
+		//it is a strict weak ordering, so it returns false in the case of possible equality
+		//ordering is based first on bip, then on reconDist
+		int i;
+		for(i=0;i<Bipartition::nBlocks-1;i++){
+			if(BipartitionBlock(i) > rhs.BipartitionBlock(i)) return false;
+			else if(BipartitionBlock(i) < rhs.BipartitionBlock(i)) return true;
+			}
+
+		if(((BipartitionBlock(i)) & Bipartition::partialBlockMask) < ((rhs.BipartitionBlock(i)) & Bipartition::partialBlockMask)) return true;
+		
+		else if(((BipartitionBlock(i)) & Bipartition::partialBlockMask) == ((rhs.BipartitionBlock(i)) & Bipartition::partialBlockMask)){
+			//bipartitions are equal
+			if(reconDist < rhs.reconDist) return true; //dists are not
+			else if(reconDist == rhs.reconDist)
+				if(cutnum < rhs.cutnum) return true;//cutnum is not
+			}
+		return false;
+		}
+
+	bool operator==(const Swap &rhs){
+		assert(rhs.b.ContainsTaxon(1));
+		bool bipEqual = b.EqualsEquals(rhs.b);
+		if(bipEqual == false) return false;
+		//if the bips are equal but the distances are different, the pre-swap topos must be different
+		//so we want to consider this a different swap
+		if(reconDist != rhs.reconDist) return false;
+		
+		if(reconDist == 1){//NNI's with different cuts and brokens can give the same topo
+			return true;
+			}
+		else if((cutnum == rhs.cutnum) && (brokenum == rhs.brokenum)){
+			return true;
+			}
+		return false;
+		}
+	};
+
+class AttemptedSwapList{
+	list<Swap> swaps;
+	list<list<Swap>::iterator> indeces;
+	unsigned unique;
+	unsigned total;
+	
+public:
+
+	AttemptedSwapList(){
+		unique=total=0;
+		}
+
+	int GetUnique() {return unique;}
+	int GetTotal() {return total;}
+
+	void ClearAttemptedSwaps(){
+		swaps.clear();
+		indeces.clear();
+		unique=total=0;
+		}
+
+	list<Swap>::iterator end(){
+		return swaps.end();
+		}
+/*
+	void WriteSwapCheckpoint(ofstream &out){
+		intptr_t scalarSize = (intptr_t) &total - (intptr_t) &unique + sizeof(total);
+		out.write((char*) &unique, (streamsize) scalarSize);
+		for(list<Swap>::iterator it=swaps.begin();it != swaps.end(); it++){
+			(*it).BinaryOutput(out);
+			}
+		}
+*/
+
+	void WriteSwapCheckpoint(OUTPUT_CLASS &out){
+		intptr_t scalarSize = (intptr_t) &total - (intptr_t) &unique + sizeof(total);
+		out.WRITE_TO_FILE(&unique, scalarSize, 1);
+		for(list<Swap>::iterator it=swaps.begin();it != swaps.end(); it++){
+			(*it).BinaryOutput(out);
+			}
+		}
+
+	void ReadBinarySwapCheckpoint(FILE* &in){
+		assert(ferror(in) == false);
+		intptr_t scalarSize = (intptr_t) &total - (intptr_t) &unique + sizeof(total);
+		fread(&unique, scalarSize, 1, in);
+		if(ferror(in) || feof(in)){//this mainly checks for a zero-byte file
+			throw ErrorException("Error reading checkpoint file <ofprefix>.swaps.check.\n\tA problem may have occured writing the file to disk, or the file may have been overwritten or truncated.\n\tUnfortunately you'll need to start the run again from scratch.");
+			}
+
+		for(unsigned i=0;i<unique;i++){
+			Swap s(in);
+			swaps.push_back(s);
+			}
+		IndexSwaps();
+
+		assert(swaps.size() == unique);
+		int tot=0;
+		for(list<Swap>::iterator it=swaps.begin();it != swaps.end(); it++) tot += (*it).Count();
+		if(tot != total) throw ErrorException("problem reading swap checkpoint!");
+		}
+
+	void ReadSwapCheckpoint(ifstream &in, int ntax){
+		assert(in.good());
+		Bipartition *b;
+		char *str=new char[ntax+2];
+		int count, cut, broke, dist;
+		in >> str;
+		while(in.good() && !in.eof()){
+			b=new Bipartition(str);
+			in >> count;
+			in >> cut;
+			in >> broke;
+			in >> dist;
+			Swap swap(*b, cut, broke, dist);
+			swap.SetCount(count);
+			unique++;
+			total+=count;
+			swaps.push_back(swap);
+			in >> str;
+			}
+		IndexSwaps();
+		delete []str;
+		}
+
+	void IndexSwaps(){
+		indeces.clear();
+		int increment=(int) sqrt((FLOAT_TYPE)unique);
+		int count=0;
+		for(list<Swap>::iterator it=swaps.begin();it != swaps.end(); it++){
+			if(count % increment == 0) indeces.push_back(it);
+			count++;
+			}
+		}
+
+	bool AddSwap(Bipartition &bip, int cut, int broke, int dist){
+		//see if the bipartition already exists in the list
+		//if so, increment the count, otherwise add it
+		assert(bip.ContainsTaxon(1));
+
+		Swap swap;
+		swap.Setup(bip, cut, broke, dist);
+
+		bool found;
+		list<Swap>::iterator it = FindSwap(swap, found);
+
+		if(found == false){
+			bool reindex=false;
+			//if we're adding this before the first index, be sure to reindex
+			if(it == swaps.begin() && indeces.empty()==false) reindex=true;
+			swaps.insert(it, swap);
+			unique++;
+			total++;
+			if(unique==100 || (unique % 1000)==0 || reindex==true) IndexSwaps(); 
+			}
+		else{
+			(*it).Increment();
+			total++;
+			}
+		assert(swaps.size() == unique);
+		return (found == false);//return value is true if the swap is _unique_
+		}
+
+	list<Swap>::iterator FindSwap(Swap &swap, bool &found){
+		//this function returns the matching swap if found in the list
+		//or the swap that would come immediately after it if not
+
+		list<Swap>::iterator start;
+
+		if(indeces.size() == 0) start=swaps.begin();
+		else{
+			for(list<list<Swap>::iterator>::iterator indexit=indeces.begin();;indexit++){
+				if(indexit == indeces.end()){
+					start = *(--indexit);
+					break;
+					}
+				else if(swap < (*(*indexit))){
+					if(indexit != indeces.begin()) start = *(--indexit);
+					else start = *(indeces.begin());
+					break;
+					}
+				}
+			}
+		
+		for(list<Swap>::iterator it = start;it != swaps.end();it++){
+			if(swap == (*it)){
+				found=true;
+				return it;
+				}
+			if(swap < (*it)){
+				found=false;
+				return it;
+				}
+			}
+
+/*
+		//a complete search from the start
+		for(list<Swap>::iterator it = swaps.begin();it != swaps.end();it++){
+			if(swap == (*it)){
+				found=true;
+				return it;
+				}
+			if(swap < (*it)){
+				found=false;
+				return it;
+				//return swaps.end();
+				}
+			}
+*/		found=false;
+		return swaps.end();
+		}
+	
+	void SwapReport(ofstream &swapLog){
+		unsigned int distTotCounts[200];
+		unsigned int distUniqueCounts[200];
+		for(int i=0;i<200;i++){
+			distTotCounts[i]=distUniqueCounts[i]=0;
+			}
+		for(list<Swap>::iterator it = swaps.begin();it != swaps.end();it++){
+			distUniqueCounts[(*it).ReconDist() - 1]++;
+			distTotCounts[(*it).ReconDist() - 1] += (*it).Count();
+			}
+
+		swapLog << "\t" << GetUnique() << "\t" << GetTotal() << "\t" ;
+		
+		for(int i=0;i<200;i++){
+			if(i > 5 && distUniqueCounts[i] == 0) break;
+			swapLog << distUniqueCounts[i] << "\t" << distTotCounts[i] << "\t";
+			}
+		swapLog << endl;
+		}
+
+	void AttemptedSwapDump(ofstream &deb){
+		deb << "\t" << GetUnique() << "\t" << GetTotal() << "\n" ;
+		for(list<Swap>::iterator it = swaps.begin();it != swaps.end();it++){
+			(*it).Output(deb);
+			}
+		}
+
+};
+
+#endif
diff --git a/src/rng.cpp b/src/rng.cpp
new file mode 100644
index 0000000..b1355ec
--- /dev/null
+++ b/src/rng.cpp
@@ -0,0 +1,659 @@
+// GARLI version 2.0 source code
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+//	NOTE: Portions of this source adapted from GAML source, written by Paul O. Lewis
+
+#include <math.h>
+#include <iostream>
+using namespace std;
+
+#include "defs.h"
+#include "rng.h"
+rng rnd;
+
+rng::rng() : ix0(1L), ix(1L), ifault(0)
+{
+	randomize();
+}
+
+void rng::dememorize( int spin /* = 100 */ )
+{
+        for( int k = 0; k < spin; k++ )
+                uniform();
+}
+
+void rng::randomize( int spin /* = 100 */ )
+{
+	time_t timer;
+	ix=ix0=(long) time(&timer);
+        dememorize( spin );
+}
+
+long rng::random_long(long max)
+{
+	if (max == 0)	return 0;
+
+	long return_val = max;
+
+	while( return_val == max )
+		return_val = (long)( (FLOAT_TYPE)max * uniform() );
+
+	return return_val;
+}
+
+int rng::random_int(int max)
+{
+	if (max == 0)	return 0;
+	int return_val = max;
+
+	while( return_val == max )
+		return_val = (int)( (FLOAT_TYPE)max * uniform() );
+
+	return return_val;
+}
+
+float rng::random_float(float max)	{
+	if (max == 0.0)
+		return 0.0;
+	float return_val = max;
+	
+	while (return_val == max)
+		return_val = (float)( (FLOAT_TYPE)max * uniform() );
+		
+	return return_val;
+}
+
+FLOAT_TYPE rng::random_FLOAT_TYPE(FLOAT_TYPE max)	{
+	if (max == 0.0)
+		return 0.0;
+	FLOAT_TYPE return_val = max;
+	
+	while (return_val == max)
+		return_val = max * uniform();
+		
+	return return_val;
+}
+
+FLOAT_TYPE rng::exponential(FLOAT_TYPE lambda)
+{
+	FLOAT_TYPE x = 0.0;
+
+	while( x <= 0.0 || x > 1.0 )
+		x = ONE_POINT_ZERO - uniform();
+	x = -log(x) / lambda;
+
+	return x;
+}
+
+FLOAT_TYPE rng::gamln( FLOAT_TYPE x )
+{
+    // ====================================================================== 
+    // NIST Guide to Available Math Software. 
+    // Source for module GAMLN from package CMLIB. 
+    // Retrieved from TIBER on Wed Apr 29 17:30:20 1998. 
+    // ====================================================================== 
+    //     WRITTEN BY D. E. AMOS, SEPTEMBER, 1977. 
+    //
+    //     REFERENCES 
+    //         SAND-77-1518 
+    //
+    //         COMPUTER APPROXIMATIONS BY J.F.HART, ET.AL., SIAM SERIES IN 
+    //         APPLIED MATHEMATICS, WILEY, 1968, P.135-136. 
+    //
+    //         NBS HANDBOOK OF MATHEMATICAL FUNCTIONS, AMS 55, BY 
+    //         M. ABRAMOWITZ AND I.A. STEGUN, DECEMBER. 1955, P.257. 
+    //
+    //     ABSTRACT 
+    //         GAMLN COMPUTES THE NATURAL LOG OF THE GAMMA FUNCTION FOR 
+    //         X.GT.0. A RATIONAL CHEBYSHEV APPROXIMATION IS USED ON 
+    //         8.LT.X.LT.1000., THE ASYMPTOTIC EXPANSION FOR X.GE.1000. AND 
+    //         A RATIONAL CHEBYSHEV APPROXIMATION ON 2.LT.X.LT.3. FOR 
+    //         0.LT.X.LT.8. AND X NON-INTEGRAL, FORWARD OR BACKWARD 
+    //         RECURSION FILLS IN THE INTERVALS  0.LT.X.LT.2 AND 
+    //         3.LT.X.LT.8. FOR X=1.,2.,...,100., GAMLN IS SET TO 
+    //         NATURAL LOGS OF FACTORIALS. 
+    //
+    //     DESCRIPTION OF ARGUMENTS 
+    //
+    //         INPUT 
+    //           X      - X.GT.0 
+    //
+    //         OUTPUT 
+    //           GAMLN  - NATURAL LOG OF THE GAMMA FUNCTION AT X 
+    //
+    //     ERROR CONDITIONS 
+    //         IMPROPER INPUT ARGUMENT - A FATAL ERROR 
+
+    static FLOAT_TYPE xlim1 = (FLOAT_TYPE)8.;
+    static FLOAT_TYPE xlim2 = (FLOAT_TYPE)1e3;
+    static FLOAT_TYPE rtwpil = (FLOAT_TYPE).918938533204673;
+    static FLOAT_TYPE p[5] = { (FLOAT_TYPE)7.66345188e-4,(FLOAT_TYPE)-5.9409561052e-4,(FLOAT_TYPE)
+	    7.936431104845e-4,(FLOAT_TYPE)-.00277777775657725,(FLOAT_TYPE)
+	    .0833333333333169 };
+    static FLOAT_TYPE q[2] = { (FLOAT_TYPE)-.00277777777777778,(FLOAT_TYPE).0833333333333333 }
+	    ;
+    static FLOAT_TYPE pcoe[9] = { (FLOAT_TYPE).00297378664481017,(FLOAT_TYPE)
+	    .0092381945590276,(FLOAT_TYPE).109311595671044,(FLOAT_TYPE).398067131020357,
+	    (FLOAT_TYPE)2.15994312846059,(FLOAT_TYPE)6.33806799938727,(FLOAT_TYPE)
+	    20.7824725317921,(FLOAT_TYPE)36.0367725300248,(FLOAT_TYPE)62.0038380071273 }
+	    ;
+    static FLOAT_TYPE qcoe[4] = { (FLOAT_TYPE)1.,(FLOAT_TYPE)-8.90601665949746,(FLOAT_TYPE)
+	    9.82252110471399,(FLOAT_TYPE)62.003838007127 };
+    static FLOAT_TYPE gln[100] = { (FLOAT_TYPE)0.,(FLOAT_TYPE)0.,(FLOAT_TYPE).693147180559945,(
+	    FLOAT_TYPE)1.79175946922806,(FLOAT_TYPE)3.17805383034795,(FLOAT_TYPE)
+	    4.78749174278205,(FLOAT_TYPE)6.5792512120101,(FLOAT_TYPE)8.52516136106541,(
+	    FLOAT_TYPE)10.6046029027453,(FLOAT_TYPE)12.8018274800815,(FLOAT_TYPE)
+	    15.1044125730755,(FLOAT_TYPE)17.5023078458739,(FLOAT_TYPE)19.9872144956619,(
+	    FLOAT_TYPE)22.5521638531234,(FLOAT_TYPE)25.1912211827387,(FLOAT_TYPE)
+	    27.8992713838409,(FLOAT_TYPE)30.6718601060807,(FLOAT_TYPE)33.5050734501369,(
+	    FLOAT_TYPE)36.3954452080331,(FLOAT_TYPE)39.3398841871995,(FLOAT_TYPE)
+	    42.3356164607535,(FLOAT_TYPE)45.3801388984769,(FLOAT_TYPE)48.4711813518352,(
+	    FLOAT_TYPE)51.6066755677644,(FLOAT_TYPE)54.7847293981123,(FLOAT_TYPE)
+	    58.0036052229805,(FLOAT_TYPE)61.261701761002,(FLOAT_TYPE)64.5575386270063,(
+	    FLOAT_TYPE)67.8897431371815,(FLOAT_TYPE)71.257038967168,(FLOAT_TYPE)
+	    74.6582363488302,(FLOAT_TYPE)78.0922235533153,(FLOAT_TYPE)81.557959456115,(
+	    FLOAT_TYPE)85.0544670175815,(FLOAT_TYPE)88.5808275421977,(FLOAT_TYPE)
+	    92.1361756036871,(FLOAT_TYPE)95.7196945421432,(FLOAT_TYPE)99.3306124547874,(
+	    FLOAT_TYPE)102.968198614514,(FLOAT_TYPE)106.631760260643,(FLOAT_TYPE)
+	    110.320639714757,(FLOAT_TYPE)114.034211781462,(FLOAT_TYPE)117.771881399745,(
+	    FLOAT_TYPE)121.533081515439,(FLOAT_TYPE)125.317271149357,(FLOAT_TYPE)
+	    129.123933639127,(FLOAT_TYPE)132.952575035616,(FLOAT_TYPE)136.802722637326,(
+	    FLOAT_TYPE)140.673923648234,(FLOAT_TYPE)144.565743946345,(FLOAT_TYPE)
+	    148.477766951773,(FLOAT_TYPE)152.409592584497,(FLOAT_TYPE)156.360836303079,(
+	    FLOAT_TYPE)160.331128216631,(FLOAT_TYPE)164.320112263195,(FLOAT_TYPE)
+	    168.327445448428,(FLOAT_TYPE)172.352797139163,(FLOAT_TYPE)176.395848406997,(
+	    FLOAT_TYPE)180.456291417544,(FLOAT_TYPE)184.533828861449,(FLOAT_TYPE)
+	    188.628173423672,(FLOAT_TYPE)192.739047287845,(FLOAT_TYPE)196.86618167289,(
+	    FLOAT_TYPE)201.009316399282,(FLOAT_TYPE)205.168199482641,(FLOAT_TYPE)
+	    209.342586752537,(FLOAT_TYPE)213.532241494563,(FLOAT_TYPE)217.736934113954,(
+	    FLOAT_TYPE)221.95644181913,(FLOAT_TYPE)226.190548323728,(FLOAT_TYPE)
+	    230.439043565777,(FLOAT_TYPE)234.701723442818,(FLOAT_TYPE)238.978389561834,(
+	    FLOAT_TYPE)243.268849002983,(FLOAT_TYPE)247.572914096187,(FLOAT_TYPE)
+	    251.890402209723,(FLOAT_TYPE)256.22113555001,(FLOAT_TYPE)260.564940971863,(
+	    FLOAT_TYPE)264.921649798553,(FLOAT_TYPE)269.29109765102,(FLOAT_TYPE)
+	    273.673124285694,(FLOAT_TYPE)278.067573440366,(FLOAT_TYPE)282.47429268763,(
+	    FLOAT_TYPE)286.893133295427,(FLOAT_TYPE)291.32395009427,(FLOAT_TYPE)
+	    295.766601350761,(FLOAT_TYPE)300.220948647014,(FLOAT_TYPE)304.686856765669,(
+	    FLOAT_TYPE)309.164193580147,(FLOAT_TYPE)313.652829949879,(FLOAT_TYPE)
+	    318.152639620209,(FLOAT_TYPE)322.663499126726,(FLOAT_TYPE)327.185287703775,(
+	    FLOAT_TYPE)331.717887196928,(FLOAT_TYPE)336.261181979198,(FLOAT_TYPE)
+	    340.815058870799,(FLOAT_TYPE)345.379407062267,(FLOAT_TYPE)349.95411804077,(
+	    FLOAT_TYPE)354.539085519441,(FLOAT_TYPE)359.134205369575 };
+
+    /* System generated locals */
+    long int i__1;
+    FLOAT_TYPE ret_val=0.0;
+
+    /* Local variables */
+    static FLOAT_TYPE dgam;
+    static long int i__;
+    static FLOAT_TYPE t, dx, px, qx, rx, xx;
+    static long int ndx, nxm;
+    static FLOAT_TYPE sum, rxx;
+
+    if ( x <= (FLOAT_TYPE)0.) {
+	goto L90;
+    } else {
+	goto L5;
+    }
+L5:
+    ndx = (long int)x;
+    t = x - (FLOAT_TYPE) ndx;
+    if (t == (FLOAT_TYPE)0.) {
+	goto L51;
+    }
+    dx = xlim1 - x;
+    if (dx < (FLOAT_TYPE)0.) {
+	goto L40;
+    }
+
+/*     RATIONAL CHEBYSHEV APPROXIMATION ON 2.LT.X.LT.3 FOR GAMMA(X) */
+
+    nxm = ndx - 2;
+    px = pcoe[0];
+    for (i__ = 2; i__ <= 9; ++i__) {
+/* L10: */
+	px = t * px + pcoe[i__ - 1];
+    }
+    qx = qcoe[0];
+    for (i__ = 2; i__ <= 4; ++i__) {
+/* L15: */
+	qx = t * qx + qcoe[i__ - 1];
+    }
+    dgam = px / qx;
+    if (nxm > 0) {
+	goto L22;
+    }
+    if (nxm == 0) {
+	goto L25;
+    }
+
+/*     BACKWARD RECURSION FOR 0.LT.X.LT.2 */
+
+    dgam /= t + (FLOAT_TYPE)1.;
+    if (nxm == -1) {
+	goto L25;
+    }
+    dgam /= t;
+    ret_val = log(dgam);
+    return ret_val;
+
+/*     FORWARD RECURSION FOR 3.LT.X.LT.8 */
+
+L22:
+    xx = t + (FLOAT_TYPE)2.;
+    i__1 = nxm;
+    for (i__ = 1; i__ <= i__1; ++i__) {
+	dgam *= xx;
+/* L24: */
+	xx += (FLOAT_TYPE)1.;
+    }
+L25:
+    ret_val = log(dgam);
+    return ret_val;
+
+/*     X.GT.XLIM1 */
+
+L40:
+    rx = (FLOAT_TYPE)1. / x;
+    rxx = rx * rx;
+    if (x - xlim2 < (FLOAT_TYPE)0.) {
+	goto L41;
+    }
+    px = q[0] * rxx + q[1];
+    ret_val = px * rx + (x - (FLOAT_TYPE).5) * log(x) - x + rtwpil;
+    return ret_val;
+
+/*     X.LT.XLIM2 */
+
+L41:
+    px = p[0];
+    sum = (x - (FLOAT_TYPE).5) * log(x) - x;
+    for (i__ = 2; i__ <= 5; ++i__) {
+	px = px * rxx + p[i__ - 1];
+/* L42: */
+    }
+    ret_val = px * rx + sum + rtwpil;
+    return ret_val;
+
+/*     TABLE LOOK UP FOR INTEGER ARGUMENTS LESS THAN OR EQUAL 100. */
+
+L51:
+    if (ndx > 100) {
+	goto L40;
+    }
+    ret_val = gln[ndx - 1];
+    return ret_val;
+L90:
+    cerr << "GAMLN  ARGUMENT IS LESS THAN OR EQUAL TO ZERO " << endl;
+    return ret_val;
+}
+
+#if 0
+//
+// Algorithm 291.  Pike, M. C., and I. D. Hill. 1966. Logarithm of the
+// gamma function. Commun. Ass. Comput. Mach. 9: 684.
+// (translated to C++ by Paul O. Lewis, November, 1996)
+//
+// This procedure evaluates the natural logarithm of gamma(x) for all x > 0,
+// accurate to 10 decimal places.  Stirling's formula is used for the central
+// polynomial part of the procedure
+//
+FLOAT_TYPE rng::loggamma( FLOAT_TYPE x )
+{
+        FLOAT_TYPE f = 0.0;
+        FLOAT_TYPE z;
+        if( x < 7.0 ) {
+                f = 1.0;
+                for( z = x - 1.0; z < 7.0; z += 1.0 ) {
+                        x = z;
+                        f *= z;
+                }
+		x += 1.0;
+                f -= log(f);
+        }
+        z = 1.0 / (x*x);
+        FLOAT_TYPE v1 = f + (x - 0.5)*log(x) - x + 0.918938533204673;
+
+        FLOAT_TYPE v2 = -0.000595238095238*z;
+        FLOAT_TYPE v3 = ( v2 - 0.000793650793651 )*z;
+        FLOAT_TYPE v4 = ( v3 - 0.0002777777777778 )*z;
+        FLOAT_TYPE v5 = ( v4 + 0.083333333333333 );
+        FLOAT_TYPE v6 = v5 / x;
+
+        return (v1 + v6);
+}
+#endif
+
+//
+// Algorithm AS 32.  Bhattacharjee, G. P. 1970. The incomplete gamma integral.
+// Appl. Statist. 19: 285-187.
+// (translated to C++ by Paul O. Lewis, November, 1996)
+//
+// Computes incomplete gamma ratio for positive values of
+// arguments x and p.  g must be supplied and should be equal to
+// ln( gamma(p) ).
+// ifault = 1 if p <= 0. ifault = 2 if x < 0 else ifault = 0
+// Uses series expansion if p > x or x <= 1, otherwise a
+// continued fraction approximation.
+//
+FLOAT_TYPE rng::gamain( FLOAT_TYPE x, FLOAT_TYPE p, FLOAT_TYPE g )
+{
+	FLOAT_TYPE pn[6];
+
+	// define accuracy and initialize
+	FLOAT_TYPE acu = (FLOAT_TYPE)1.0e-8;
+	const FLOAT_TYPE oflo = (FLOAT_TYPE)1.0e30;
+	FLOAT_TYPE gin = 0.0;
+	FLOAT_TYPE term;
+	FLOAT_TYPE rn;
+	ifault = 0;
+
+        // test for admissibility of arguments
+        if( p <= 0.0 ) ifault = 1;
+        if( x < 0.0 ) ifault = 2;
+        if( ifault > 0 || x == 0.0 )
+                return gin;
+        FLOAT_TYPE factor = exp( p * log(x) - x - g );
+        if( x > 1.0 && x >= p )
+                goto label30;
+
+        // calculation by series expansion
+        gin = 1.0;
+        term = 1.0;
+        rn = p;
+
+        for(;;) {
+                rn += 1.0;
+                term *= (x / rn);
+                gin += term;
+                if( term <= acu ) break;
+        }
+        gin *= ( factor / p );
+        return gin;
+
+        // calculation by continued fraction
+        FLOAT_TYPE a, b, an, dif;
+        int i;
+        label30:        // <<<<<<<<<<<<<<< label 30
+        a = ONE_POINT_ZERO - p;
+        b = a + x + ONE_POINT_ZERO;
+        term = 0.0;
+        pn[0] = 1.0;
+        pn[1] = x;
+        pn[2] = x + ONE_POINT_ZERO;
+        pn[3] = x*b;
+        gin = pn[2] / pn[3];
+
+        label32:        // <<<<<<<<<<<<<<< label 32
+        a += 1.0;
+        b += 2.0;
+        term += 1.0;
+        an = a * term;
+        pn[4] = b*pn[2] - an*pn[0];
+        pn[5] = b*pn[3] - an*pn[1];
+        if( pn[5] == 0.0 )
+                goto label35;
+        rn = pn[4] / pn[5];
+        dif = fabs( gin - rn );
+        if( dif > acu )
+                goto label34;
+        if( dif <= acu*rn ) {
+                gin = ONE_POINT_ZERO - factor*gin;
+                return gin;
+        }
+
+        label34:        // <<<<<<<<<<<<<<< label 34
+        gin = rn;
+
+        label35:        // <<<<<<<<<<<<<<< label 35
+        for( i = 0; i < 4; i++ )
+                pn[i] = pn[i+2];
+        if( fabs(pn[4]) < oflo )
+                goto label32;
+        for( i = 0; i < 4; i++ )
+                pn[i] /= oflo;
+        goto label32;
+}
+
+//
+// Algorithm AS 70. Odeh, R. E., and Evans, J. O. 1974. Percentage points
+// of the normal distribution. Appl. Statist. 23: 96-97.
+// (translated to C++ by Paul O. Lewis, November, 1996)
+//
+// gauinv finds percentage points of the normal distribution.
+//
+FLOAT_TYPE rng::gauinv( FLOAT_TYPE p )
+{
+#ifdef SINGLE_PRECISION_FLOATS
+	const FLOAT_TYPE zero = 0.0f;
+	const FLOAT_TYPE one = 1.0f;
+	const FLOAT_TYPE half = 0.5f;
+	const FLOAT_TYPE alimit = 1.0e-20f;
+	const FLOAT_TYPE p0 = -0.322232431088f;
+	const FLOAT_TYPE p1 = -1.0f;
+	const FLOAT_TYPE p2 = -0.342242088547f;
+	const FLOAT_TYPE p3 = -0.0204231210245f;
+	const FLOAT_TYPE p4 = -0.0000453642210148f;
+	const FLOAT_TYPE q0 = 0.099348462606f;
+	const FLOAT_TYPE q1 = 0.58858157495f;
+	const FLOAT_TYPE q2 = 0.531103462366f;
+	const FLOAT_TYPE q3 = 0.10353775285f;
+	const FLOAT_TYPE q4 = 0.0038560700634f;
+#else
+	const FLOAT_TYPE zero = 0.0;
+	const FLOAT_TYPE one = 1.0;
+	const FLOAT_TYPE half = 0.5;
+	const FLOAT_TYPE alimit = 1.0e-20;
+	const FLOAT_TYPE p0 = -0.322232431088;
+	const FLOAT_TYPE p1 = -1.0;
+	const FLOAT_TYPE p2 = -0.342242088547;
+	const FLOAT_TYPE p3 = -0.0204231210245;
+	const FLOAT_TYPE p4 = -0.0000453642210148;
+	const FLOAT_TYPE q0 = 0.099348462606;
+	const FLOAT_TYPE q1 = 0.58858157495;
+	const FLOAT_TYPE q2 = 0.531103462366;
+	const FLOAT_TYPE q3 = 0.10353775285;
+	const FLOAT_TYPE q4 = 0.0038560700634;
+#endif
+
+        ifault = 1;
+        FLOAT_TYPE ps = p;
+        if( ps > half )
+                ps = one - ps;
+        if( ps < alimit )
+                return zero;
+
+        ifault = 0;
+        if( ps == half )
+                return zero;
+        FLOAT_TYPE yi = sqrt( log( one / (ps*ps) ) );
+        FLOAT_TYPE retval = yi
+                + ((((yi*p4 + p3)*yi + p2)*yi + p1)*yi + p0)
+                / ((((yi*q4 + q3)*yi + q2)*yi + q1)*yi + q0);
+        if( p < half )
+                retval = -retval;
+
+        return retval;
+}
+#define A_A 16807L
+#define	B_B15 32768L
+#define		B_B16 65536L
+#define		P_P 2147483647L
+	
+FLOAT_TYPE rng::uniform()
+{
+	//long a, p, b15, b16, xhi, xalo, leftlo, fhi, k;
+	long xhi, xalo, leftlo, fhi, k;
+	//
+	// Uniform pseudorandom number generator
+	// Provided by J. Monahan, Statistics Dept., N.C. State University
+	//   From Schrage, ACM Trans. Math. Software 5:132-138 (1979)
+	// Translated to C by Paul O. Lewis, Dec. 10, 1992
+	//
+	xhi = ix / B_B16;
+	xalo = (ix - xhi * B_B16) * A_A;
+	leftlo = xalo / B_B16;
+	fhi = xhi * A_A + leftlo;
+	k = fhi / B_B15;
+	ix = (((xalo - leftlo * B_B16) - P_P) + (fhi - k * B_B15) * B_B16) + k;
+	if (ix < 0) ix += P_P;
+	return ix * (FLOAT_TYPE)4.6566128575e-10;
+}
+
+//
+// Algorithm AS 91.  Best, D. J., and D. E. Roberts. 1975. The percentage
+// points of the chi-square distribution. Appl. Statist. 24(3): 385-388.
+// (translated to C++ by Paul O. Lewis, November, 1996)
+//
+// To evaluate the percentage points of the chi-squared
+// probability distribuiton function.
+//   p must lie in the range 0.000002 to 0.999998
+//   v must be positive
+//   g must be supplied and should be equal to ln(gamma(v/2.0))
+//
+//   ifault values:
+//      0: everything went fine
+//      1: p was not in range 0.000002 to 0.999998
+//      2: v was not positive
+//      3:
+//
+FLOAT_TYPE rng::ppchi2( FLOAT_TYPE p, FLOAT_TYPE v )
+{
+#ifdef SINGLE_PRECISION_FLOATS
+	const FLOAT_TYPE e = 0.5e-4f;
+	const FLOAT_TYPE aa = 0.69314718f;
+#else
+	const FLOAT_TYPE e = 0.5e-6;
+	const FLOAT_TYPE aa = 0.6931471805;
+#endif
+
+	FLOAT_TYPE ch, a, b, q, p1, p2, t, x;
+    FLOAT_TYPE s1, s2, s3, s4, s5, s6;
+
+#if 0
+	FLOAT_TYPE g = gammln( v / 2.0 );
+#else
+	FLOAT_TYPE g = gamln( v / (FLOAT_TYPE)2.0 );
+#endif
+
+	// after defining accuracy and ln(2), test arguments and initialize
+	ifault = 1;
+	if( p < 0.000002 || p > 0.999998 ) return -1.0;
+
+	ifault = 2;
+	if( v <= 0.0 ) return -ONE_POINT_ZERO;
+
+	ifault = 0;
+	FLOAT_TYPE xx = (FLOAT_TYPE)0.5 * v;
+	FLOAT_TYPE c = xx - ONE_POINT_ZERO;
+
+        // starting approximation for small chi-squared
+        if( v >= -1.24 * log(p) )
+                goto label1;
+        ch = pow( (p * xx * exp( g + xx * aa)), (ONE_POINT_ZERO / xx) );
+        if( ch - e < 0.0 )
+                return ch;
+        else
+                goto label4;
+
+        // starting approximation for v less than or equal to 0.32
+	label1:
+        if( v > 0.32 ) goto label3;
+        ch = (FLOAT_TYPE)0.4;
+        a = log( ONE_POINT_ZERO - p );
+
+        label2:
+        q = ch;
+        p1 = ONE_POINT_ZERO + ch * ( (FLOAT_TYPE)4.67 + ch );
+        p2 = ch * ( (FLOAT_TYPE)6.73 + ch * ( (FLOAT_TYPE)6.66 + ch ));
+        t = (FLOAT_TYPE)-0.5 + ( (FLOAT_TYPE)4.67 + (FLOAT_TYPE)2.0*ch ) / p1 -
+                ( (FLOAT_TYPE)6.73 + ch*( (FLOAT_TYPE)13.32 + (FLOAT_TYPE)3.0*ch )) / p2;
+		ch -= ( ONE_POINT_ZERO - exp( a + g + (FLOAT_TYPE)0.5*ch + c*aa ) * p2 / p1 ) / t;
+        if( fabs( q/ch - 1.0 ) - 0.01 <= 0.0 )
+                goto label4;
+        else
+		goto label2;
+
+        // call to algorithm AS 70 - note that p has been tested above
+        label3:
+	x = gauinv( p );
+
+	// starting approximation using Wilson and Hilferty estimate
+        p1 = (FLOAT_TYPE) 0.222222 / v;
+        ch = v * pow( x*sqrt(p1) + ONE_POINT_ZERO - p1, 3 );
+
+        // starting approximation for p tending to 1
+        if( ch > 2.2 * v + 6.0 )
+                ch = (FLOAT_TYPE)-2.0 * ( log( ONE_POINT_ZERO - p ) - c * log((FLOAT_TYPE) 0.5 * ch ) + g );
+
+        // call to algorithm AS 32 and calculation of seven term Taylor series
+	label4:
+        q = ch;
+        p1 = (FLOAT_TYPE)0.5 * ch;
+	p2 = p - gamain( p1, xx, g );
+
+	if( ifault != 0 ) {
+		ifault = 3;
+                return -ONE_POINT_ZERO;
+	}
+
+        t = p2 * exp( xx*aa + g + p1 - c * log(ch) );
+        b = t / ch;
+#ifdef SINGLE_PRECISION_FLOATS
+        a = 0.5f*t - b*c;
+        s1 = ( 210.0f + a*( 140.0f + a*( 105.0f + a*(84.0f + a*( 70.0f + a*60.0f ))))) / 420.0f;
+        s2 = ( 420.0f + a*( 735.0f + a*( 966.0f + a*( 1141.0f + a*1278.0f)))) / 2520.0f;
+		s3 = ( 210.0f + a*( 462.0f + a*( 707.0f + a*932.0f))) / 2520.0f;
+        s4 = ( 252.0f + a*( 672.0f + a*1182.0f) + c*( 204.0f + a*( 889.0f + a*1740.0f))) / 5040.0f;
+        s5 = (  84.0f + a*264.0f + c*(175.0f + a*606.0f)) / 2520.0f;
+        s6 = ( 120.0f + c*( 346.0f + c*127.0f)) / 5040.0f;
+        ch += t*( 1.0f + 0.5f*t*s1 - b*c*( s1 - b*( s2 - b*( s3 - b*( s4 - b*( s5 - b*s6))))));
+#else
+        a = 0.5*t - b*c;
+        s1 = ( 210.0 + a*( 140.0 + a*( 105.0 + a*(84.0 + a*( 70.0 + a*60.0 ))))) / 420.0;
+        s2 = ( 420.0 + a*( 735.0 + a*( 966.0 + a*( 1141.0 + a*1278.0)))) / 2520.0;
+		s3 = ( 210.0 + a*( 462.0 + a*( 707.0 + a*932.0))) / 2520.0;
+        s4 = ( 252.0 + a*( 672.0 + a*1182.0) + c*( 204.0 + a*( 889.0 + a*1740.0))) / 5040.0;
+        s5 = (  84.0 + a*264.0 + c*(175.0 + a*606.0)) / 2520.0;
+        s6 = ( 120.0 + c*( 346.0 + c*127.0)) / 5040.0;
+        ch += t*( 1.0 + 0.5*t*s1 - b*c*( s1 - b*( s2 - b*( s3 - b*( s4 - b*( s5 - b*s6))))));
+#endif
+		
+//		cout << q << "\t" << ch  << "\t" << fabs( q/ch - ONE_POINT_ZERO ) << endl;
+        if( fabs( q/ch - ONE_POINT_ZERO ) > e )
+                goto label4;
+        return ch;
+}
+
+//this is from MB
+void rng::DirichletRandomVariable (FLOAT_TYPE *alp, FLOAT_TYPE *z, int n){
+	int		i;
+	FLOAT_TYPE	sum;
+
+	sum = 0.0;
+	for(i=0; i<n; i++)
+		{
+		z[i]=gamma( alp[i] );
+//		z[i] = RndGamma (alp[i]) / 1.0;
+		sum += z[i];
+		}
+	for(i=0; i<n; i++)
+		z[i] /= sum;
+	}
+
+
diff --git a/src/rng.h b/src/rng.h
new file mode 100644
index 0000000..85575f5
--- /dev/null
+++ b/src/rng.h
@@ -0,0 +1,127 @@
+// GARLI version 2.0 source code
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+//	NOTE: Portions of this source adapted from GAML source, written by Paul O. Lewis
+
+//
+// Some portions of the source code file for which this is
+// the header were written by others and thus no copyright
+// is claimed for those portions.  Methods derived from
+// other works include gamln, uniform, gamain, gauinv,
+// and ppchi2.
+//
+
+#ifndef __RNG_H
+#define __RNG_H
+
+#ifndef __TIME_H
+#	include <time.h>
+#endif
+#include <cmath>
+#include <cassert>
+#include <iostream>
+
+using namespace std;
+
+class rng
+{
+	protected:
+		long ix0, ix;
+		int ifault;
+
+	protected:
+		//FLOAT_TYPE loggamma( FLOAT_TYPE x );
+		FLOAT_TYPE gamln( FLOAT_TYPE x );
+		FLOAT_TYPE gauinv( FLOAT_TYPE p );
+		FLOAT_TYPE gamain( FLOAT_TYPE x, FLOAT_TYPE p, FLOAT_TYPE g );
+		FLOAT_TYPE ppchi2( FLOAT_TYPE p, FLOAT_TYPE v );
+
+	public:
+		rng();
+
+		long seed()		{ return ix;  }
+		long init_seed()	{ return ix0; }
+
+		void randomize( int spin = 100 );
+		void set_seed(long s) { ix = ix0 = s; }
+		void dememorize( int spin = 100 );
+
+		int		random_int(int);
+		long	random_long(long);
+		float	random_float(float);
+		FLOAT_TYPE	random_FLOAT_TYPE(FLOAT_TYPE);
+		FLOAT_TYPE  uniform();
+		FLOAT_TYPE  exponential(FLOAT_TYPE);
+		FLOAT_TYPE  gamma( FLOAT_TYPE shape ){
+			FLOAT_TYPE g=-1;
+			do{
+				g = (FLOAT_TYPE)( ppchi2( uniform(), (FLOAT_TYPE)2.0*shape ) / (FLOAT_TYPE)(2.0*shape) );
+				}while( g < 0.0);
+			assert(g > 0.0);
+			return g;
+			}
+		FLOAT_TYPE gamma_two_param(FLOAT_TYPE alpha, FLOAT_TYPE beta){
+			FLOAT_TYPE g=-1;
+			do{
+				g = (FLOAT_TYPE)( ppchi2( uniform(), (FLOAT_TYPE)2.0*alpha ) / (FLOAT_TYPE)(2.0*beta) );
+				}while( g < 0.0);
+			assert(g > 0.0);
+			return g;
+			}
+		//DZ 11-3-02 addition
+		int random_binomial(int n, FLOAT_TYPE p);
+		void DirichletRandomVariable (FLOAT_TYPE *alp, FLOAT_TYPE *z, int n);
+};
+
+//DJZ 11-3-02 Added by me.  Stolen from ProbabLib 1.0, by Antonio Larrosa
+//DJZ 3-29-04 Altering this to have the distribution mean specified, which 
+//should make picking a value for different datasets a bit easier
+
+inline int rng::random_binomial(int n, FLOAT_TYPE mean){
+	FLOAT_TYPE p=mean/n;
+	FLOAT_TYPE t=(FLOAT_TYPE) p/((FLOAT_TYPE)1.0-p);
+	FLOAT_TYPE u=uniform();
+	FLOAT_TYPE p0=pow((FLOAT_TYPE)((FLOAT_TYPE)1.0-p),n);
+	FLOAT_TYPE g=p0;
+	unsigned int k=0;
+	while (u>g){
+	    p0*=t*(n-k)/(FLOAT_TYPE)(k+1.0);
+	    g+=p0;
+	    k++;
+	    }
+	return k;
+	}
+
+
+/*inline int rng::random_binomial(int n, FLOAT_TYPE p){
+	FLOAT_TYPE t=p/(1.0-p);
+	FLOAT_TYPE u=uniform();
+	FLOAT_TYPE p0=pow((1.0-p),n);
+	FLOAT_TYPE g=p0;
+	unsigned int k=0;
+	while (u>g){
+	    p0*=t*(n-k)/(k+1.0);
+	    g+=p0;
+	    k++;
+	    }
+	return k;
+	}
+*/
+
+#endif
+
+
diff --git a/src/sequencedata.cpp b/src/sequencedata.cpp
new file mode 100644
index 0000000..dd6a3e5
--- /dev/null
+++ b/src/sequencedata.cpp
@@ -0,0 +1,1579 @@
+// GARLI version 2.0 source code
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+//	NOTE: Portions of this source adapted from GAML source, written by Paul O. Lewis
+
+#include "defs.h"
+#include "sequencedata.h"
+#include "garlireader.h"
+#include "rng.h"
+#include <iterator>
+
+extern rng rnd;
+extern OutputManager outman;
+extern bool FloatingPointEquals(const FLOAT_TYPE first, const FLOAT_TYPE sec, const FLOAT_TYPE epsilon);
+
+#undef DEBUG_CALCFREQ
+#undef DEBUG_CALCPRMATRIX
+#undef DEBUGGING_PRMATRICES
+#undef DEBUGGING_PATTERN_PROBS
+
+#if defined( DEBUGGING_PATTERN_PROBS )
+#	include <io.h>
+#endif
+
+//this depends on the fact that a spare taxon was allocated
+void SequenceData::AddDummyRootToExistingMatrix(){
+	assert(nTaxAllocated > nTax);
+
+	nTax++;
+	SetTaxonLabel( nTax - 1, "ROOT");
+	for(int c = 0;c < numPatterns;c++){	
+		SetMatrix( nTax - 1, c, maxNumStates);
+		}
+	}
+
+//this depends on the fact that a spare taxon was allocated
+void NucleotideData::AddDummyRootToExistingMatrix(){
+	assert(nTaxAllocated > nTax);
+
+	nTax++;
+	SetTaxonLabel( nTax - 1, "ROOT");
+	for(int c = 0;c < numPatterns;c++){	
+		SetMatrix( nTax - 1, c, 15);
+		}
+	}
+
+void NucleotideData::CalcEmpiricalFreqs(){
+
+	empStateFreqs=new FLOAT_TYPE[4];//this is a member of the class, and where the final freqs will be stored
+	empStateFreqs[0]=empStateFreqs[1]=empStateFreqs[2]=empStateFreqs[3]=0.0;
+	
+	//these are all temporary and local
+	FLOAT_TYPE freqSumNoAmbig[4] = {0.0, 0.0, 0.0, 0.0};
+	FLOAT_TYPE freqSumAmbig[4]  = {0.0, 0.0, 0.0, 0.0};
+	FLOAT_TYPE nonAmbigTotal = 0.0;
+	FLOAT_TYPE ambigTotal = 0.0;
+
+	vector<char> ambigStates;
+	vector<int> ambigCounts;
+	for( int i = 0; i < NTax(); i++ ) {
+		for( int j = 0; j < NChar(); j++ ) {
+			char thischar=(char) Matrix( i, j );
+			int nstates=0;
+			//first figure out how many states we've got
+			if(thischar & 1) nstates++;
+			if(thischar & 2) nstates++;
+			if(thischar & 4) nstates++;
+			if(thischar & 8) nstates++;			
+
+			if(nstates==1){
+				if(thischar & 1)
+					freqSumNoAmbig[0] += (FLOAT_TYPE) Count(j);
+				if(thischar & 2)
+					freqSumNoAmbig[1] += (FLOAT_TYPE) Count(j);
+				if(thischar & 4)
+					freqSumNoAmbig[2] += (FLOAT_TYPE) Count(j);
+				if(thischar & 8) 
+					freqSumNoAmbig[3] += (FLOAT_TYPE) Count(j);	
+				nonAmbigTotal += Count(j);
+				}
+			else if(nstates < 4){
+				//now divide the states up to the bases
+				//division will be equal for this pass, and refined below
+				if(thischar & 1)
+					freqSumAmbig[0] += (FLOAT_TYPE) Count(j)/nstates;
+				if(thischar & 2)
+					freqSumAmbig[1] += (FLOAT_TYPE) Count(j)/nstates;
+				if(thischar & 4)
+					freqSumAmbig[2] += (FLOAT_TYPE) Count(j)/nstates;
+				if(thischar & 8) 
+					freqSumAmbig[3] += (FLOAT_TYPE) Count(j)/nstates;
+				ambigTotal += Count(j);
+
+				//these will store a list of the ambiguous characters so that iterations
+				//below don't require going through the whole dataset again
+				ambigStates.push_back(thischar);
+				ambigCounts.push_back(Count(j));					
+				}
+			}
+		}
+
+	bool allPresent = true;
+	for(int j=0;j<4;j++){
+		if((freqSumNoAmbig[j] + freqSumAmbig[j]) == 0.0){
+			outman.UserMessage("WARNING: Not all nucleotides are observed in this subset of data!\nYou may have partitioned too finely or are analyzing very strange data.\nBeware!!!");
+			allPresent = false;
+			break;
+			}
+		}
+	if(!allPresent){
+		for(int j=0;j<4;j++) 
+			freqSumNoAmbig[j] += ONE_POINT_ZERO;
+		nonAmbigTotal += 4.0;
+		}
+
+	for(int j=0;j<4;j++){
+		empStateFreqs[j] = (freqSumNoAmbig[j] + freqSumAmbig[j]) / (nonAmbigTotal + ambigTotal);
+		}
+
+	//now iterate to refine the emp freqs to account for partial ambiguity
+	if(ambigStates.size() > 0){
+		bool continueIterations;
+		do{
+			continueIterations = false;
+			freqSumAmbig[0]=freqSumAmbig[1]=freqSumAmbig[2]=freqSumAmbig[3]=0.0;
+			for(unsigned i=0;i<ambigStates.size();i++){
+				FLOAT_TYPE fracSum = 0.0;
+				int nstates = 0;
+				char thischar = ambigStates[i];
+				
+				if(thischar & 1)
+					fracSum += empStateFreqs[0];
+				if(thischar & 2)
+					fracSum += empStateFreqs[1];
+				if(thischar & 4)
+					fracSum += empStateFreqs[2];
+				if(thischar & 8)
+					fracSum += empStateFreqs[3];
+				
+				//this time they are allocated to the bases in proportion to the total
+				//frequencies from the last iteration
+				if(thischar & 1)
+					freqSumAmbig[0] += (FLOAT_TYPE) ambigCounts[i] * (empStateFreqs[0]/fracSum);
+				if(thischar & 2)
+					freqSumAmbig[1] += (FLOAT_TYPE) ambigCounts[i] * (empStateFreqs[1]/fracSum);
+				if(thischar & 4)
+					freqSumAmbig[2] += (FLOAT_TYPE) ambigCounts[i] * (empStateFreqs[2]/fracSum);
+				if(thischar & 8) 
+					freqSumAmbig[3] += (FLOAT_TYPE) ambigCounts[i] * (empStateFreqs[3]/fracSum);
+				}
+			FLOAT_TYPE tempFreqs[4] = {0.0, 0.0, 0.0, 0.0};
+			for(int j=0;j<4;j++){
+				tempFreqs[j] = (freqSumNoAmbig[j] + freqSumAmbig[j]) / (nonAmbigTotal + ambigTotal);
+				if(fabs(tempFreqs[j] - empStateFreqs[j]) >  max(1.0e-8, GARLI_FP_EPS * 2.0)) continueIterations = true;
+				empStateFreqs[j] = tempFreqs[j];
+				}
+			}while(continueIterations);
+		}	
+	
+
+#if defined( DEBUG_CALCFREQ )
+	cerr << endl << "Frequency of A: " << p[0] << endl;
+	cerr << "Frequency of C: " << p[1] << endl;
+	cerr << "Frequency of G: " << p[2] << endl;
+	cerr << "Frequency of T: " << p[3] << endl;
+	cerr << "Total         : " << ( p[0] + p[1] + p[2] + p[3] ) << endl;
+
+	cerr << endl << "Program stopped after calculating base frequencies because" << endl;
+	cerr << "DEBUG_CALCFREQS was #define'd in source code file \"mlhky.cpp\" " << endl;
+
+	cerr << endl << "Press Enter key to continue..." << endl;
+	char ch = '\0';
+	cin.get(ch);
+	exit(0);
+#endif
+}
+
+void AminoacidData::CalcEmpiricalFreqs(){
+	empStateFreqs=new FLOAT_TYPE[maxNumStates];//this is a member of the class, and where the final freqs will be stored
+	
+	for(int i=0;i<maxNumStates;i++) empStateFreqs[i] = 0.0;
+	FLOAT_TYPE total = 0.0;
+	//for codons and aminoacids this will assume no ambiguity
+	
+	for( int i = 0; i < NTax(); i++ ) {
+		for( int j = 0; j < numPatterns; j++ ) {
+			char thischar= matrix[i][j];
+
+			if(thischar != maxNumStates){
+				assert(thischar > -1);
+				empStateFreqs[thischar] += (FLOAT_TYPE) Count(j);
+				total += (FLOAT_TYPE) Count(j);
+				}
+			}
+		}
+	//check whether this might be nucleotide data in disguise
+	if((empStateFreqs[0]+empStateFreqs[1]+empStateFreqs[5]+empStateFreqs[16])/total > 0.90) throw ErrorException("Model specified as aminoacid, but nucleotide data found!");
+		
+	FLOAT_TYPE freqTot = 0.0;
+	bool allPresent = true;
+	for(int j=0;j<maxNumStates;j++) if(empStateFreqs[j] == ZERO_POINT_ZERO) allPresent = false;
+	if(!allPresent){
+		outman.UserMessage("WARNING: Not all amino acids were observed in this dataset.\n\tOne pseudo-count will be added to each amino acid\n\tfor calculation of the empirical frequencies. You\n\tshould probably use a statefrequencies setting other \n\tthan emprical.\n");
+		for(int j=0;j<maxNumStates;j++) empStateFreqs[j] += ONE_POINT_ZERO;
+		total += (FLOAT_TYPE) maxNumStates;
+		}
+	for(int j=0;j<maxNumStates;j++){
+		empStateFreqs[j] /= total;
+		freqTot += empStateFreqs[j];
+		}
+	assert(fabs(freqTot - 1.0) < 1e-5);
+	}
+
+void CodonData::CalcEmpiricalFreqs(){
+	if(empType == NOT_EMPIRICAL) return;
+
+	empStateFreqs=new FLOAT_TYPE[maxNumStates];//this is a member of the class, and where the final freqs will be stored
+
+	if(empType == F1X4){
+		CalcF1x4Freqs();
+		BaseFreqXPositionReport();
+		return;
+		}
+	if(empType == F3X4){
+		CalcF3x4Freqs();
+		BaseFreqXPositionReport();
+		return;
+		}
+
+	//we must be using the actual observed frequencies
+	assert(empType == CODON_TABLE);
+	for(int i=0;i<maxNumStates;i++) empStateFreqs[i] = 0.0;
+	FLOAT_TYPE total = 0.0;
+	//for codons and aminoacids this will assume no ambiguity
+	
+	for( int i = 0; i < NTax(); i++ ) {
+		for( int j = 0; j < numPatterns; j++ ) {
+			char thischar= matrix[i][j];
+
+			if(thischar != maxNumStates){
+				assert(thischar > -1);
+				empStateFreqs[thischar] += (FLOAT_TYPE) Count(j);
+				total += (FLOAT_TYPE) Count(j);
+				}
+			}
+		}
+	FLOAT_TYPE freqTot = 0.0;
+
+	bool allPresent = true;
+	for(int j=0;j<maxNumStates;j++) if(empStateFreqs[j] == ZERO_POINT_ZERO) allPresent = false;
+	if(!allPresent){
+		outman.UserMessage("WARNING: Not all allowable codons were observed in this dataset.\n\tOne pseudo-count will be added to each codon for caluclation of the\n\tempirical frequencies. You should probably use\n\tstatefrequencies = f1x4 or f3x4 instead of empirical.\n");
+		for(int j=0;j<maxNumStates;j++) empStateFreqs[j] += ONE_POINT_ZERO;
+		total += (FLOAT_TYPE) maxNumStates;
+		}
+
+	for(int j=0;j<maxNumStates;j++){
+		empStateFreqs[j] /= total;
+		freqTot += empStateFreqs[j];
+		}
+	assert(fabs(freqTot - 1.0) < 1e-5);
+	}
+
+void NucleotideData::MakeAmbigStrings(){
+	//this will populate the ambigStrings vector with the data in the typical ambiguity format
+	
+	ambigStrings.reserve(NTax());
+
+	for(int i=0;i<NTax();i++){
+		unsigned char* thisdata=GetRow(i);
+		
+		//run through all the characters once just to see how many states we have so we can allocate
+		//the correct length of array to hold the string
+		int totalStates=0;
+		for(int j=0;j<NChar();j++){
+			char thisbase=thisdata[j];
+			int numstates=0;
+			if(thisbase&1){
+				numstates++;
+				}
+			if(thisbase&2){
+				numstates++;
+				}
+			if(thisbase&4){
+				numstates++;
+				}
+			if(thisbase&8){
+				numstates++;
+				}
+			if(numstates!=4) totalStates += numstates;
+			//remember that if we have ambiguity we need an extra character to hold the number of states
+			//and if we have total ambiguity (numstates=0) we also need a character to hold that
+			if(numstates>1 || numstates==0 || numstates==4) totalStates++;
+			}
+	
+		char *thisString=new char[totalStates];
+
+#ifdef OPEN_MP
+		unsigned *thisMap=new unsigned[NChar()];
+#endif
+
+		//now do it for real
+		int index=0;
+		for(int j=0;j<NChar();j++){
+
+#ifdef OPEN_MP
+			thisMap[j]=index;
+#endif
+			char thisbase=thisdata[j];
+			int numstates=0;
+			char thiscode;
+			if(thisbase&1){
+				numstates++;
+				thiscode=0;
+				}
+			if(thisbase&2){
+				numstates++;
+				thiscode=1;
+				}
+			if(thisbase&4){
+				numstates++;
+				thiscode=2;
+				}
+			if(thisbase&8){
+				numstates++;
+				thiscode=3;
+				}
+			
+			if(numstates==1){
+				thisString[index++]=thiscode;
+				}
+			else if(numstates==4||numstates==0){
+				thisString[index++] = -4;
+				}
+			else{
+				thisString[index++] = -numstates;
+				if(thisbase&1) thisString[index++] = 0;
+				if(thisbase&2) thisString[index++] = 1;
+				if(thisbase&4) thisString[index++] = 2;			
+				if(thisbase&8) thisString[index++] = 3;		
+				}
+			}
+		ambigStrings.push_back(thisString);
+#ifdef OPEN_MP
+		ambigToCharMap.push_back(thisMap);
+#endif
+		}
+	}
+
+void CodonData::FillCodonMatrixFromDNA(const NucleotideData *dnaData, bool ignoreStops){
+	//first we need to convert the nucleotide data to codons numbered 0-60 or 61 and assign them back to the terminals
+	//codons are ordered AAA, AAC, AAG, AAT, ACA, ... TTT
+	short pos1, pos2, pos3;
+
+	string defWtsName = dnaData->WeightsetName();
+	if(defWtsName.length() > 0 && useDefaultWeightsets)
+		outman.UserMessage("NOTE: Cannot use default wtsets with DNA to Codon translation! Wtset \"%s\" ignored.", defWtsName.c_str());  
+
+	nonZeroCharCount = numPatterns = dnaData->NChar()/3;
+	nTax = dnaData->NTax();
+	if(dnaData->NChar() % 3 != 0) throw ErrorException("Codon datatype specified, but number of nucleotides not divisible by 3!");  
+	NewMatrix(nTax, numPatterns);
+	patman.Initialize(nTax, maxNumStates);
+
+	//this will just map from the bitwise format to the index format (A, C, G, T = 0, 1, 2, 3)
+	//partial ambiguity is mapped to total ambiguity currently
+	short bitwiseToIndexFormat[16] = {15,0,1,15,2,15,15,15,3,15,15,15,15,15,15,15};
+
+	//keep track of the empirical base freqs at the codon positions, for possible use 
+	//in the F1x4 or F3x4 methods of calculating the equilibrium codon freqs
+	empBaseFreqsPos1[0]=empBaseFreqsPos1[1]=empBaseFreqsPos1[2]=empBaseFreqsPos1[3]=ZERO_POINT_ZERO;
+	empBaseFreqsPos2[0]=empBaseFreqsPos2[1]=empBaseFreqsPos2[2]=empBaseFreqsPos2[3]=ZERO_POINT_ZERO;
+	empBaseFreqsPos3[0]=empBaseFreqsPos3[1]=empBaseFreqsPos3[2]=empBaseFreqsPos3[3]=ZERO_POINT_ZERO;
+
+	FLOAT_TYPE total = ZERO_POINT_ZERO;
+
+	int tax=0, thisCodonNum;
+	for(int tax=0;tax<NTax();tax++){
+		bool firstAmbig = true;
+		for(int cod=0;cod<numPatterns;cod++){
+			short p1 = dnaData->Matrix(tax, cod*3);
+			short p2 = dnaData->Matrix(tax, cod*3+1);
+			short p3 = dnaData->Matrix(tax, cod*3+2);
+
+			pos1 = bitwiseToIndexFormat[p1];
+			pos2 = bitwiseToIndexFormat[p2];
+			pos3 = bitwiseToIndexFormat[p3];
+			
+			thisCodonNum=(pos1)*16 + (pos2)*4 + pos3;
+			
+			if(pos1==15||pos2==15||pos3==15){//check for gaps or ambiguity
+				if(pos1+pos2+pos3 != 45){
+					//warn about gaps or ambiguity in codons
+					if(firstAmbig){
+						outman.UserMessageNoCR("Gaps or ambiguity codes found within codon for taxon %s.\n\tCodons coded as missing for that taxon: ", dnaData->TaxonLabel(tax));
+						firstAmbig = false;
+						}
+					outman.UserMessageNoCR("%d ", cod+1);
+					}
+				thisCodonNum=64;
+				}
+			else{
+				empBaseFreqsPos1[pos1] += ONE_POINT_ZERO;
+				empBaseFreqsPos2[pos2] += ONE_POINT_ZERO;
+				empBaseFreqsPos3[pos3] += ONE_POINT_ZERO;
+				total += ONE_POINT_ZERO;
+				}
+
+			char prot;
+			//note that a return code of 20 from the codon lookup indicates a stop codon, but a protein code of 20 generally means total ambiguity
+			if(thisCodonNum != 64){
+				prot = code.CodonLookup(thisCodonNum);
+				if(prot == 20){
+					string c;
+					char b[4]={'A','C','G','T'};
+					c += b[pos1];
+					c += b[pos2];
+					c += b[pos3];
+					if(ignoreStops == true){
+						outman.UserMessage("Warning: stop codon %s found at codon site %d (nuc site %d) in taxon %s.\n\tTreating as missing data because ignorestopcodons = 1 is set in configuration file.", c.c_str(), cod+1, cod*3+1,  dnaData->TaxonLabel(tax));
+						thisCodonNum=64;
+						}
+					else
+						throw ErrorException("Stop codon %s found at codon site %d (nuc site %d) in taxon %s.  Bailing out.\nBe sure that your alignment is properly in frame, or set ignorestopcodons = 1 in the\n[general] section of your configuration file to treat as missing.", c.c_str(), cod+1, cod*3+1,  dnaData->TaxonLabel(tax));
+					}
+				}
+
+			if(thisCodonNum == 64)//missing or ambiguous 
+				matrix[tax][cod] = maxNumStates;
+			else 
+				matrix[tax][cod] = code.Map64stateToNonStops(thisCodonNum);
+			}
+		if(firstAmbig == false) outman.UserMessage("");
+		}
+	for(int b=0;b<4;b++){
+		empBaseFreqsAllPos[b] = (empBaseFreqsPos1[b] + empBaseFreqsPos2[b] + empBaseFreqsPos3[b]) / (3.0 * total);
+
+		empBaseFreqsPos1[b] /= total;
+		empBaseFreqsPos2[b] /= total;
+		empBaseFreqsPos3[b] /= total;
+		}
+	
+	//copy matrix into alternative PatternManager for pattern sorting
+	if(usePatternManager){
+		SitePattern thisPat;
+		for(int cod=0;cod<numPatterns;cod++){
+			for(int tax=0;tax<NTax();tax++){
+				thisPat.AddChar(matrix[tax][cod]);
+				}
+			//numbers directly copy over, and should actually be in 0->nchar order now anyway
+			thisPat.siteNumbers.push_back(number[cod]);
+			thisPat.SetCount(1);
+			patman.AddPattern(thisPat);
+			thisPat.Reset();
+			}
+		}
+	}
+
+void AminoacidData::FillAminoacidMatrixFromDNA(const NucleotideData *dnaData, GeneticCode *code, bool ignoreStops){
+	//first we need to convert the nucleotide data to codons, and then translate the codons to AA's
+	//codons are ordered AAA, AAC, AAG, AAT, ACA, ... TTT
+	short pos1, pos2, pos3;
+
+	string defWtsName = dnaData->WeightsetName();
+	if(defWtsName.length() > 0 && useDefaultWeightsets)
+		outman.UserMessage("NOTE: Cannot use default wtsets with DNA to Aminoacid translation! Wtset \"%s\" ignored.", defWtsName.c_str());  
+
+	nonZeroCharCount = numPatterns = dnaData->NChar()/3;
+	nTax = dnaData->NTax();
+	if(dnaData->NChar() % 3 != 0)
+		throw ErrorException("Codon to Aminoacid translation specified, but number of nucleotides not divisible by 3!");  
+	NewMatrix(nTax, numPatterns);
+	patman.Initialize(nTax, maxNumStates);
+
+	int tax=0, thisCodonNum;
+	for(int tax=0;tax<NTax();tax++){
+		vector<int> treatedAsMissing;
+		for(int cod = 0;cod < numPatterns;cod++){
+			int posArr[3] = {dnaData->Matrix(tax, cod*3), dnaData->Matrix(tax, cod*3+1), dnaData->Matrix(tax, cod*3+2)};
+			
+			int prot = -1;
+			bool breaker;
+			string stopString;
+			if(posArr[0] + posArr[1] + posArr[0] == 45)
+				//all positions missing
+				prot = maxNumStates;
+			else{
+				//All this determines what possible codons any ambiguity could resolve to, and whether those codons encode
+				//the same protein.  If so, use that protein.  If not, treat as N.
+				vector< vector<int> > allPos;
+				allPos.push_back(vector<int>());
+				allPos.push_back(vector<int>());
+				allPos.push_back(vector<int>());
+				
+				for(int pos = 0;pos < 3;pos++){
+					if(posArr[pos] & 1)
+						allPos[pos].push_back(0);
+					if(posArr[pos] & 2)
+						allPos[pos].push_back(1);
+					if(posArr[pos] & 4)
+						allPos[pos].push_back(2);
+					if(posArr[pos] & 8)
+						allPos[pos].push_back(3);
+					}
+				
+				breaker = false;
+				stopString.clear();
+				for(vector<int>::iterator fit = allPos[0].begin();fit != allPos[0].end();fit++){
+					for(vector<int>::iterator sit = allPos[1].begin();sit != allPos[1].end();sit++){
+						for(vector<int>::iterator tit = allPos[2].begin();tit != allPos[2].end();tit++){
+							int thisCodonResolution = (*fit)*16 + (*sit)*4 + *tit;
+							
+							//note that a return code of 20 (or 21 for the two serine model) from the codon lookup indicates a stop codon, but a protein code of 20 generally means total ambiguity
+							int thisResolutionProt = code->CodonLookup(thisCodonResolution);
+				
+							if(thisResolutionProt == maxNumStates){
+								char b[4]={'A','C','G','T'};
+								stopString += b[*fit];
+								stopString += b[*sit];
+								stopString += b[*tit];
+								if(ignoreStops == true){
+									outman.UserMessage("Warning: stop codon %s found at codon site %d (nuc site %d) in taxon %s.\n\tTreating as missing data because ignorestopcodons = 1 is set in configuration file.", stopString.c_str(), cod+1, cod*3+1,  dnaData->TaxonLabel(tax));
+									treatedAsMissing.push_back(cod+1);
+									prot = maxNumStates;
+									breaker = true;
+									break;
+									}
+								}
+							else if(prot < 0)
+								//translating the first (or only) codon resolution to amino acid 
+								prot = thisResolutionProt;
+							
+							else if(thisResolutionProt != prot){
+								//another resolution codes for a different AA
+								prot = maxNumStates;
+								treatedAsMissing.push_back(cod+1);
+								breaker = true;
+								break;
+								}
+							else{
+								outman.DebugMessage("Gaps or ambiguity codes found within codon at codon site %d (nuc site %d)\n\tfor taxon %s.\n\tResolutions of ambiguity encode a single aminoacid.", cod+1, cod*3+1, dnaData->TaxonLabel(tax));
+								}
+							}
+						if(breaker)
+							break;
+						}
+					if(breaker)
+						break;
+					}
+				}
+			if(stopString.length() > 0 && breaker == false){
+				//Some resolution of ambiguity resulted in a stop. If stops are being ignored, breaker would have been set above and this would already have been treated as missing.
+				if(prot < 0){
+					//Unambiguous stop found
+					throw ErrorException("Stop codon %s found at codon site %d (nuc site %d) in taxon %s.  Bailing out.\nBe sure that your alignment is properly in frame, or set ignorestopcodons = 1 in the\n[general] section of your configuration file to treat as missing.", stopString.c_str(), cod+1, cod*3+1,  dnaData->TaxonLabel(tax));
+					}
+				else{
+					//Could be a stop, but some ambiguity resolution results in a valid AA.  Treat as missing.
+					outman.UserMessage("Warning: a resolution of ambiguity results in a stop codon at codon site %d (nuc site %d) in taxon %s.\n\tTreating site as missing data.", cod+1, cod*3+1,  dnaData->TaxonLabel(tax));
+					prot = maxNumStates;
+					treatedAsMissing.push_back(cod+1);
+					}
+				}
+
+			matrix[tax][cod] = prot;
+			}
+		if(treatedAsMissing.size() > 0){
+			outman.UserMessageNoCR("Some sites treated as missing data for taxon %s due to ambiguity in translation.\n\tAminoacids coded as missing for that taxon: ", dnaData->TaxonLabel(tax));
+			for(vector<int>::iterator vit = treatedAsMissing.begin();vit != treatedAsMissing.end();vit++)
+				outman.UserMessageNoCR("%d ", *vit);
+			outman.UserMessage("\n");
+			}
+		}	
+
+	//copy matrix into alternative PatternManager for pattern sorting
+	if(usePatternManager){
+		SitePattern thisPat;
+		for(int cod=0;cod<numPatterns;cod++){
+			for(int tax=0;tax<NTax();tax++){
+				thisPat.AddChar(matrix[tax][cod]);
+				}
+			//numbers directly copy over, and should actually be in 0->nchar order now anyway
+			thisPat.siteNumbers.push_back(number[cod]);
+			thisPat.SetCount(1);
+			patman.AddPattern(thisPat);
+			thisPat.Reset();
+			}
+		}
+	}
+
+void CodonData::CalcF1x4Freqs(){
+	//this assumes that the empirical base freqs have already been calculated in FillCodonMatrixFromDNA
+	assert(fabs(empBaseFreqsAllPos[0] + empBaseFreqsAllPos[1] + empBaseFreqsAllPos[2] + empBaseFreqsAllPos[3] - 1.0) < 1.0e-4);
+
+	FLOAT_TYPE total = ZERO_POINT_ZERO;
+
+	int stops=0;
+	for(int base1=0;base1<4;base1++){
+		for(int base2=0;base2<4;base2++){
+			for(int base3=0;base3<4;base3++){
+				if(code.CodonLookup(base1*16+base2*4+base3) != 20){
+					empStateFreqs[base1*16+base2*4+base3 - stops] = empBaseFreqsAllPos[base1] * empBaseFreqsAllPos[base2] * empBaseFreqsAllPos[base3];
+					total += empStateFreqs[base1*16+base2*4+base3 - stops];
+					}
+				else stops++;
+				}
+			}
+		}
+	//now normalize, because the stop codons will make the total of the 60 or 61 allowed codons < 1.0
+	for(int s=0;s<maxNumStates;s++) empStateFreqs[s] /= total;
+	}
+
+void CodonData::CalcF3x4Freqs(){
+	//this assumes that the empirical base freqs have already been calculated in FillCodonMatrixFromDNA
+	assert(fabs(empBaseFreqsPos1[0] + empBaseFreqsPos1[1] + empBaseFreqsPos1[2] + empBaseFreqsPos1[3] - 1.0) < 1.0e-4);
+
+	if((empBaseFreqsPos1[0] == ZERO_POINT_ZERO) ||
+	   (empBaseFreqsPos1[1] == ZERO_POINT_ZERO) ||
+	   (empBaseFreqsPos1[2] == ZERO_POINT_ZERO) ||
+	   (empBaseFreqsPos1[3] == ZERO_POINT_ZERO) ||
+	   (empBaseFreqsPos2[0] == ZERO_POINT_ZERO) ||
+	   (empBaseFreqsPos2[1] == ZERO_POINT_ZERO) ||
+	   (empBaseFreqsPos2[2] == ZERO_POINT_ZERO) ||
+	   (empBaseFreqsPos2[3] == ZERO_POINT_ZERO) ||
+	   (empBaseFreqsPos3[0] == ZERO_POINT_ZERO) ||
+	   (empBaseFreqsPos3[1] == ZERO_POINT_ZERO) ||
+	   (empBaseFreqsPos3[2] == ZERO_POINT_ZERO) ||
+	   (empBaseFreqsPos3[3] == ZERO_POINT_ZERO)) throw ErrorException("All bases were not observed at all codon positions!\n\tYou probably shouldn't be using F3x4 to estimate equilibrium codon frequencies.\n\tUse F1x4 or equal state frequencies.");
+
+	FLOAT_TYPE total = ZERO_POINT_ZERO;
+	
+	int stops=0;
+	for(int base1=0;base1<4;base1++){
+		for(int base2=0;base2<4;base2++){
+			for(int base3=0;base3<4;base3++){
+				if(code.CodonLookup(base1*16+base2*4+base3) != 20){
+					empStateFreqs[base1*16+base2*4+base3 - stops] = empBaseFreqsPos1[base1] * empBaseFreqsPos2[base2] * empBaseFreqsPos3[base3];
+					total += empStateFreqs[base1*16+base2*4+base3 - stops];
+					}
+				else stops++;
+				}
+			}
+		}
+	//now normalize, because the stop codons will make the total of the 60 or 61 allowed codons < 1.0
+	for(int s=0;s<maxNumStates;s++) empStateFreqs[s] /= total;
+	}
+
+void CodonData::BaseFreqXPositionReport(){
+	//positional frequency report
+	outman.UserMessage("Base usage at codon positions:");
+	outman.UserMessage("       %10c%10c%10c%10c", 'A', 'C', 'G', 'T');
+	outman.UserMessage(" pos 1   %10.5f%10.5f%10.5f%10.5f", empBaseFreqsPos1[0], empBaseFreqsPos1[1], empBaseFreqsPos1[2], empBaseFreqsPos1[3]);
+	outman.UserMessage(" pos 2   %10.5f%10.5f%10.5f%10.5f", empBaseFreqsPos2[0], empBaseFreqsPos2[1], empBaseFreqsPos2[2], empBaseFreqsPos2[3]);
+	outman.UserMessage(" pos 3   %10.5f%10.5f%10.5f%10.5f", empBaseFreqsPos3[0], empBaseFreqsPos3[1], empBaseFreqsPos3[2], empBaseFreqsPos3[3]);
+	outman.UserMessage(" all pos %10.5f%10.5f%10.5f%10.5f\n", empBaseFreqsAllPos[0], empBaseFreqsAllPos[1], empBaseFreqsAllPos[2], empBaseFreqsAllPos[3]);
+	}
+
+unsigned char NucleotideData::CharToDatum( char ch ) const{
+	unsigned char datum=0;
+	switch(ch){
+		case 'A' : datum=1; break;
+    	case 'C' : datum=2; break;
+       	case 'G' : datum=4; break;
+       	case 'T' : datum=8; break;
+       	case 'U' : datum=8; break;
+       	case 'M' : datum=3; break;
+       	case 'R' : datum=5; break;
+       	case 'S' : datum=6; break;
+       	case 'V' : datum=7; break;
+       	case 'W' : datum=9; break;
+       	case 'Y' : datum=10; break;
+       	case 'H' : datum=11; break;
+      	case 'K' : datum=12; break;
+       	case 'D' : datum=13; break;
+       	case 'B' : datum=14; break;
+       	case 'N' : datum=15; break;
+
+		case 'a' : datum=1; break;
+    	case 'c' : datum=2; break;
+       	case 'g' : datum=4; break;
+       	case 't' : datum=8; break;
+		case 'u' : datum=8; break;
+       	case 'm' : datum=3; break;
+       	case 'r' : datum=5; break;
+       	case 's' : datum=6; break;
+       	case 'v' : datum=7; break;
+       	case 'w' : datum=9; break;
+       	case 'y' : datum=10; break;
+       	case 'h' : datum=11; break;
+      	case 'k' : datum=12; break;
+       	case 'd' : datum=13; break;
+       	case 'b' : datum=14; break;
+       	case 'n' : datum=15; break;
+       	case '-' : datum=15; break;
+  		case '?' : datum=15; break;
+       	default  : throw ErrorException("Unknown nucleotide %c!", ch);
+		}
+	return datum;
+	}
+
+unsigned char AminoacidData::CharToDatum(char ch) const{
+	char datum = 20;
+	switch(ch){
+		case'A'	: datum=	0	;break;
+		case'B' :{
+			outman.UserMessage("NOTE: unsupported amino acid abiguity code 'B' changed to full ambiguity");
+			datum=	20;
+			break;
+			}
+		case'C' : datum=	1	;break;
+		case'D' : datum=	2	;break;
+		case'E' : datum=	3	;break;
+		case'F' : datum=	4	;break;
+		case'G' : datum=	5	;break;
+		case'H' : datum=	6	;break;
+		case'I' : datum=	7	;break;
+		case'K' : datum=	8	;break;
+		case'L' : datum=	9	;break;
+		case'M' : datum=	10	;break;
+		case'N' : datum=	11	;break;
+		case'P' : datum=	12	;break;
+		case'Q' : datum=	13	;break;
+		case'R' : datum=	14	;break;
+		case'S' : datum=	15	;break;
+		case'T' : datum=	16	;break;
+		case'V'	: datum=	17	;break;
+		case'W'	: datum=	18	;break;
+		case'X' : datum=	20	;break;
+		case'Y' : datum=	19	;break;
+		case'Z' :{
+			outman.UserMessage("NOTE: unsupported amino acid abiguity code 'Z' changed to full ambiguity");
+			datum=	20;
+			break;
+			}
+		case'-'	: datum=   20  ;break;
+		case'?'	: datum=   20  ;break;
+		case'a'	: datum=	0	;break;
+		case'b' :{
+			outman.UserMessage("NOTE: unsupported amino acid abiguity code 'b' changed to full ambiguity");
+			datum=	20;
+			break;
+			}
+		case'c' : datum=	1	;break;
+		case'd' : datum=	2	;break;
+		case'e' : datum=	3	;break;
+		case'f' : datum=	4	;break;
+		case'g' : datum=	5	;break;
+		case'h' : datum=	6	;break;
+		case'i' : datum=	7	;break;
+		case'k' : datum=	8	;break;
+		case'l' : datum=	9	;break;
+		case'm' : datum=	10	;break;
+		case'n' : datum=	11	;break;
+		case'p' : datum=	12	;break;
+		case'q' : datum=	13	;break;
+		case'r' : datum=	14	;break;
+		case's' : datum=	15	;break;
+		case't' : datum=	16	;break;
+		case'v'	: datum=	17	;break;
+		case'w'	: datum=	18	;break;
+		case'x' : datum=	20	;break;
+		case'y' : datum=	19	;break;
+		case'z' :{
+			outman.UserMessage("NOTE: unsupported amino acid abiguity code 'z' changed to full ambiguity");
+			datum=	20;
+			break;
+			}
+		default : throw ErrorException("Unknown Amino Acid %c!", ch);
+		}
+	return datum;
+	}
+
+void NucleotideData::CreateMatrixFromNCL(const NxsCharactersBlock *charblock, NxsUnsignedSet &charset){
+	
+	if(charblock->GetDataType() != NxsCharactersBlock::dna 
+		&& charblock->GetDataType() != NxsCharactersBlock::rna 
+		&& charblock->GetDataType() != NxsCharactersBlock::nucleotide )
+		throw ErrorException("Tried to create nucleotide matrix from non-nucleotide data.\n\tCheck the datatype settings in your datafile in the characters\n\tor data block and the datatype setting in your Garli config file.");
+
+	int numOrigTaxa = charblock->GetNTax();
+	int numActiveTaxa = charblock->GetNumActiveTaxa();
+
+	if(charset.empty()){
+		//the charset was empty, implying that all characters in this block will go into a single matrix (actually, for nstate
+		//might be split anyway).  Create an effective charset that contains all of the characters, which will be filtered
+		//for exclusions and for the right number of max states
+		for(int i = 0;i < charblock->GetNumChar();i++)
+			charset.insert(i);
+		}
+
+	//deal with any exclusions
+	NxsUnsignedSet excluded = charblock->GetExcludedIndexSet();
+	const NxsUnsignedSet *realCharSet = & charset;
+	NxsUnsignedSet charsetMinusExcluded;
+	if (!excluded.empty()) {
+		int origSize = charset.size();
+		set_difference(charset.begin(), charset.end(), excluded.begin(), excluded.end(), inserter(charsetMinusExcluded, charsetMinusExcluded.begin()));
+		//only output a message about excluded characters if there is actually an intersection of the exset with the
+		//characters in this subset.  Otherwise multiple subsets in a partition will report the same exclusions.
+		//Also, if there are a ton of excluded chars, truncate the message.
+		if(charsetMinusExcluded.size() != origSize){
+			NxsUnsignedSet actuallyExcluded;
+			set_intersection(charset.begin(), charset.end(), excluded.begin(), excluded.end(), inserter(actuallyExcluded, actuallyExcluded.begin()));
+			NxsString exstr = NxsString(NxsSetReader::GetSetAsNexusString(actuallyExcluded).c_str()).ShortenTo(500);
+			outman.UserMessage("\tExcluded character numbers:%s\n\t", exstr.c_str());
+			}
+		realCharSet = &charsetMinusExcluded;
+	}
+
+	int numActiveChar = realCharSet->size();
+
+	if(numActiveChar == 0){
+		throw ErrorException("Sorry, fully excluded characters blocks or partition subsets are not currently supported.");
+		}
+
+	NewMatrix( numActiveTaxa, numActiveChar );
+	patman.Initialize(numActiveTaxa, maxNumStates);
+
+	//get weightset if one was specified
+	vector<int> charWeights;
+	if(useDefaultWeightsets){
+		wtsetName = GarliReader::GetDefaultIntWeightSet(charblock, charWeights);
+		if(charWeights.size() > 0){
+			assert(charWeights.size() == charblock->GetNumChar());
+			outman.UserMessage("\tFound wtset \"%s\" with data, applying...", wtsetName.c_str());
+			for(int i = 0;i < charWeights.size();i++){
+				if(charWeights[i] == 0){
+					throw ErrorException("Sorry, wtsets including sites with zero weight are not allowed in GARLI.\nTry using an exset to exclude the site.");
+					}
+				}
+			}
+		}
+
+	// read in the data, including taxon names
+	int i=0;
+	for( int origTaxIndex = 0; origTaxIndex < numOrigTaxa; origTaxIndex++ ) {
+		if(charblock->IsActiveTaxon(origTaxIndex)){
+			//Now storing names as escaped Nexus values - this means:
+			//if they have underscores - store with underscores
+			//if they have spaces within single quotes - store with underscores
+			//if they have punctuation within single parens (including spaces) - store with single quotes maintained
+			NxsString tlabel = charblock->GetTaxonLabel(origTaxIndex);
+			SetTaxonLabel(i, NxsString::GetEscaped(tlabel).c_str());
+			int j = 0;
+
+			for(NxsUnsignedSet::const_iterator cit = realCharSet->begin(); cit != realCharSet->end();cit++){	
+				if(i == 0)
+					SetOriginalDataNumber(j, *cit);
+				unsigned char datum = '\0';
+				if(charblock->IsGapState(origTaxIndex, *cit) == true) datum = 15;
+				else if(charblock->IsMissingState(origTaxIndex, *cit) == true) datum = 15;
+				else{
+					int nstates = charblock->GetNumStates(origTaxIndex, *cit);
+					for(int s=0;s<nstates;s++){
+						datum += CharToBitwiseRepresentation(charblock->GetState(origTaxIndex, *cit, s));
+						}
+					}
+				if(i == 0 && charWeights.size() > 0)
+					SetCount(j, charWeights[*cit]);
+				SetMatrix( i, j, datum );
+				j++;
+				}
+			i++;
+			}
+		}
+
+	if(usePatternManager){
+		//optionally also read into the alternative pattern manager, this is taxa loop inside char loop
+		bool haveWeights = !charWeights.empty();
+		SitePattern thisPat;
+		int charNum = 0;
+		for(NxsUnsignedSet::const_iterator cit = realCharSet->begin(); cit != realCharSet->end();cit++){	
+			int tax = 0;
+			for( int origTaxIndex = 0; origTaxIndex < numOrigTaxa; origTaxIndex++ ) {
+				if(charblock->IsActiveTaxon(origTaxIndex)){
+					unsigned char datum = '\0';
+					if(charblock->IsGapState(origTaxIndex, *cit) == true) datum = 15;
+					else if(charblock->IsMissingState(origTaxIndex, *cit) == true) datum = 15;
+					else{
+						int nstates = charblock->GetNumStates(origTaxIndex, *cit);
+						for(int s=0;s<nstates;s++){
+							datum += CharToBitwiseRepresentation(charblock->GetState(origTaxIndex, *cit, s));
+							}
+						}
+					thisPat.AddChar(datum);
+					}
+				}
+			thisPat.siteNumbers.push_back(charNum++);
+			thisPat.SetCount((haveWeights ? charWeights[*cit] : 1));
+			patman.AddPattern(thisPat);
+			thisPat.Reset();
+			}
+		}
+	}
+
+void AminoacidData::CreateMatrixFromNCL(const NxsCharactersBlock *charblock, NxsUnsignedSet &charset){
+
+	if(charblock->GetDataType() != NxsCharactersBlock::protein)
+		throw ErrorException("Tried to create amino acid matrix from non-amino acid data.\n\t(Did you mean to use datatype = codon-aminoacid?)");
+
+	int numOrigTaxa = charblock->GetNTax();
+	int numActiveTaxa = charblock->GetNumActiveTaxa();
+
+	if(charset.empty()){
+		//the charset was empty, implying that all characters in this block will go into a single matrix (actually, for nstate
+		//might be split anyway).  Create an effective charset that contains all of the characters, which will be filtered
+		//for exclusions and for the right number of max states
+		for(int i = 0;i < charblock->GetNumChar();i++)
+			charset.insert(i);
+		}
+
+	//deal with any exclusions
+	NxsUnsignedSet excluded = charblock->GetExcludedIndexSet();
+	const NxsUnsignedSet *realCharSet = & charset;
+	NxsUnsignedSet charsetMinusExcluded;
+	if (!excluded.empty()) {
+		string exsetName = NxsSetReader::GetSetAsNexusString(excluded);
+		outman.UserMessage("Excluded characters: %s\n\t", exsetName.c_str());
+		set_difference(charset.begin(), charset.end(), excluded.begin(), excluded.end(), inserter(charsetMinusExcluded, charsetMinusExcluded.begin()));
+		realCharSet = &charsetMinusExcluded;
+	}	
+
+	int numActiveChar = realCharSet->size();
+
+	if(numActiveChar == 0){
+		throw ErrorException("Sorry, fully excluded characters blocks or partition subsets are not currently supported.");
+		}
+
+	NewMatrix( numActiveTaxa, numActiveChar );
+	patman.Initialize(numActiveTaxa, maxNumStates);
+
+	//get weightset if one was specified
+	vector<int> charWeights;
+	if(useDefaultWeightsets){
+		wtsetName = GarliReader::GetDefaultIntWeightSet(charblock, charWeights);
+		if(charWeights.size() > 0){
+			assert(charWeights.size() == charblock->GetNumChar());
+			outman.UserMessage("\tFound wtset \"%s\" with data, applying...", wtsetName.c_str());
+			for(int i = 0;i < charWeights.size();i++){
+				if(charWeights[i] == 0){
+					throw ErrorException("Sorry, wtsets including sites with zero weight are not allowed in GARLI.\nTry using an exset to exclude the site.");
+					}
+				}
+			}
+		}
+
+	// read in the data, including taxon names
+	int i=0;
+	for( int origTaxIndex = 0; origTaxIndex < numOrigTaxa; origTaxIndex++ ) {
+		if(charblock->IsActiveTaxon(origTaxIndex)){
+			//Now storing names as escaped Nexus values - this means:
+			//if they have underscores - store with underscores
+			//if they have spaces within single quotes - store with underscores
+			//if they have punctuation within single parens (including spaces) - store with single quotes maintained
+			NxsString tlabel = charblock->GetTaxonLabel(origTaxIndex);
+			SetTaxonLabel(i, NxsString::GetEscaped(tlabel).c_str());
+			
+			int j = 0;
+			bool firstAmbig = true;
+			for(NxsUnsignedSet::const_iterator cit = realCharSet->begin(); cit != realCharSet->end();cit++){	
+				if(i == 0)
+					SetOriginalDataNumber(j, *cit);
+				unsigned char datum = '\0';
+				if(charblock->IsGapState(origTaxIndex, *cit) == true) datum = maxNumStates;
+				else if(charblock->IsMissingState(origTaxIndex, *cit) == true) datum = maxNumStates;
+				else{
+					int nstates = charblock->GetNumStates(origTaxIndex, *cit);
+					//need to deal with the possibility of multiple states represented in matrix
+					//just convert to full ambiguity
+					if(nstates == 1)
+						datum = CharToDatum(charblock->GetState(origTaxIndex, *cit, 0));
+					else{
+						if(firstAmbig){
+							outman.UserMessageNoCR("\tPart ambig. char's of taxon %s converted to full ambiguity:\n\t  char ", TaxonLabel(origTaxIndex));
+							firstAmbig = false;
+							}
+						outman.UserMessageNoCR(" %d ", *cit+1);
+						datum = CharToDatum('?');
+						}
+					}
+				if(i == 0 && charWeights.size() > 0)
+					SetCount(j, charWeights[*cit]);
+				SetMatrix( i, j, datum );
+				j++;
+				}
+			if(firstAmbig == false) outman.UserMessage("");
+			i++;
+			}
+		}
+	//read the same data into the alternate pattern sorting machinery, which only makes sense looping over tax within char
+	if(usePatternManager){
+		SitePattern thisPat;
+		bool haveWeights = !charWeights.empty();
+		int charNum = 0;
+		for(NxsUnsignedSet::const_iterator cit = realCharSet->begin(); cit != realCharSet->end();cit++){	
+			int tax = 0;
+			for( int origTaxIndex = 0; origTaxIndex < numOrigTaxa; origTaxIndex++ ) {
+				if(charblock->IsActiveTaxon(origTaxIndex)){
+					unsigned char datum = '\0';
+					if(charblock->IsGapState(origTaxIndex, *cit) == true) datum = maxNumStates;
+					else if(charblock->IsMissingState(origTaxIndex, *cit) == true) datum = maxNumStates;
+					else{
+						int nstates = charblock->GetNumStates(origTaxIndex, *cit);
+
+						//need to deal with the possibility of multiple states represented in matrix
+						//just convert to full ambiguity
+						if(nstates == 1)
+							datum = CharToDatum(charblock->GetState(origTaxIndex, *cit, 0));
+						else{
+							datum = CharToDatum('?');
+							}
+						}
+					thisPat.AddChar(datum);
+					}
+				}
+			thisPat.siteNumbers.push_back(charNum++);
+			thisPat.SetCount((haveWeights ? charWeights[*cit] : 1));
+			patman.AddPattern(thisPat);
+			thisPat.Reset();
+			}
+		}
+	}
+/*
+void BinaryData::CreateMatrixFromNCL(const NxsCharactersBlock *charblock, NxsUnsignedSet &origCharset){
+	if(charblock->GetDataType() != NxsCharactersBlock::standard)
+		throw ErrorException("Tried to create binary matrix from non-standard data.\n\t(Did you mean to use datatype = binary?)");
+
+	//this creates a copy of the charset that we can screw with here without hosing the one that was passed in,
+	//which might be needed elsewhere
+	NxsUnsignedSet charset = origCharset;
+
+	int numOrigTaxa = charblock->GetNTax();
+	int numActiveTaxa = charblock->GetNumActiveTaxa();
+
+	if(charset.empty()){
+		//the charset was empty, implying that all characters in this block will go into a single matrix (actually, for nstate
+		//might be split anyway).  Create an effective charset that contains all of the characters, which will be filtered
+		//for exclusions and for the right number of max states
+		for(int i = 0;i < charblock->GetNumIncludedChars();i++)
+			charset.insert(i);
+		}
+
+	NxsUnsignedSet excluded = charblock->GetExcludedIndexSet();
+	const NxsUnsignedSet *realCharSet = & charset;
+	NxsUnsignedSet charsetMinusExcluded;
+	if (!excluded.empty()) {
+		set_difference(charset.begin(), charset.end(), excluded.begin(), excluded.end(), inserter(charsetMinusExcluded, charsetMinusExcluded.begin()));
+		realCharSet = &charsetMinusExcluded;
+	}	
+
+	int numOrigChar = charset.size();
+	int numActiveChar = realCharSet->size();
+
+	if(numActiveChar == 0){
+		throw ErrorException("Sorry, fully excluded characters blocks or partition subsets are not currently supported.");
+		}
+
+	NewMatrix( numActiveTaxa, numActiveChar );
+
+	// read in the data, including taxon names
+	int i=0;
+	for( int origTaxIndex = 0; origTaxIndex < numOrigTaxa; origTaxIndex++ ) {
+		if(charblock->IsActiveTaxon(origTaxIndex)){
+			//store the taxon names based on NCL's "escaped" version, which will properly deal
+			//with whether quotes are necessary, etc.  No conversion needed at output.
+			NxsString tlabel = charblock->GetTaxonLabel(origTaxIndex);
+			SetTaxonLabel(i, NxsString::GetEscaped(tlabel).c_str());
+			
+			int j = 0;
+			bool firstAmbig = true;
+			for(NxsUnsignedSet::const_iterator cit = realCharSet->begin(); cit != realCharSet->end();cit++){
+				if(i == 0)
+					SetOriginalDataNumber(j, *cit);
+				unsigned char datum = '\0';
+				if(charblock->IsGapState(origTaxIndex, *cit) == true) datum = 2;
+				else if(charblock->IsMissingState(origTaxIndex, *cit) == true) datum = 2;
+				else{
+					int nstates = charblock->GetNumStates(origTaxIndex, *cit);
+					//need to deal with the possibility of multiple states represented in matrix
+					//just convert to full ambiguity
+					if(nstates == 1)
+						datum = CharToDatum(charblock->GetState(origTaxIndex, *cit, 0));
+					else{
+						if(firstAmbig){
+							outman.UserMessageNoCR("Partially ambiguous characters of taxon %s converted to full ambiguity:\n\t", TaxonLabel(origTaxIndex));
+							firstAmbig = false;
+							}
+						outman.UserMessageNoCR("%d ", *cit+1);
+						datum = CharToDatum('?');
+						}
+					}
+				SetMatrix( i, j++, datum );
+				}
+			if(firstAmbig == false) outman.UserMessage("");
+			i++;
+			}
+		}
+	}
+*/
+void NStateData::CreateMatrixFromNCL(const NxsCharactersBlock *charblock, NxsUnsignedSet &origCharset){
+	if(charblock->GetDataType() != NxsCharactersBlock::standard)
+		throw ErrorException("Tried to create n-state matrix from non-standard data.\n\t(Did you mean to use datatype = standard?)");
+
+	//this creates a copy of the charset that we can screw with here without hosing the one that was passed in,
+	//which might be needed elsewhere
+	NxsUnsignedSet charset = origCharset;
+
+	int numOrigTaxa = charblock->GetNTax();
+	int numActiveTaxa = charblock->GetNumActiveTaxa();
+
+	//Not allowing wtsets here, mainly due to lazyness
+	if(useDefaultWeightsets){
+		vector<int> charWeights;
+		string defWtsName = GarliReader::GetDefaultIntWeightSet(charblock, charWeights);
+		if(charWeights.size() > 0){
+			outman.UserMessage("NOTE: Default wtsets cannot currently be used with non-sequence data! Wtset \"%s\" ignored.", defWtsName.c_str()); 
+			}
+		}
+
+	if(charset.empty()){
+		//the charset was empty, implying that all characters in this block will go into a single matrix (actually, for nstate
+		//might be split anyway).  Create an effective charset that contains all of the characters, which will be filtered
+		//for exclusions and for the right number of max states
+		for(int i = 0;i < charblock->GetNumChar();i++)
+			charset.insert(i);
+		}
+
+
+	//deal with any exclusions
+	NxsUnsignedSet excluded = charblock->GetExcludedIndexSet();
+	NxsUnsignedSet *realCharSet = & charset;
+	NxsUnsignedSet charsetMinusExcluded;
+	if (!excluded.empty()) {
+		string exsetName = NxsSetReader::GetSetAsNexusString(excluded);
+		outman.UserMessage("Excluded characters: %s\n\t", exsetName.c_str());
+		set_difference(charset.begin(), charset.end(), excluded.begin(), excluded.end(), inserter(charsetMinusExcluded, charsetMinusExcluded.begin()));
+		realCharSet = &charsetMinusExcluded;
+	}	
+
+	int numActiveChar = realCharSet->size();
+
+	if(numActiveChar == 0){
+		throw ErrorException("Sorry, fully excluded characters blocks or partition subsets are not currently supported.");
+		}
+
+	//first count the number of characters with the number of observed states that was specified for
+	//this matrix, create a matrix with those dimensions  and grab them from the charblock and make a matrix.
+	//If not, just return and the function that called this should be able to check if any characters were actually read, and act accordingly
+	//remove_if(realCharSet->begin(), realCharSet->end(), charblock->GetObsNumStates);
+
+	NxsUnsignedSet consts;
+	NxsUnsignedSet missing;
+	for(NxsUnsignedSet::const_iterator cit = realCharSet->begin(); cit != realCharSet->end();){
+		unsigned num = *cit;
+		cit++;
+		//this gets the actual number of observed states, not including gaps or ?'s -,
+		//but, there are no gaps in standard data (or 0/1), so only options are #'s and ?'s
+		//ns = 1 are chars that are potentially constant (i.e., 0000, 1111, 000?, 111? etc)
+		int ns = charblock->GetObsNumStates(num, false);
+		if(ns == 1)
+			consts.insert(num);
+		//the maxNumStates == 2 part here is so that the message is only output when reading the first standard data matrix
+		else if(ns == 0 && maxNumStates == 2)
+			missing.insert(num);
+		if(datatype == BINARY || datatype == BINARY_NOT_ALL_ZEROS){
+			if(ns > 2){
+				throw ErrorException("More than two character states found in binary data (character %d)!", num + 1);  
+				}
+			}
+		//If not binary data, toss any char with #states not equal to the prespecified maxNumStates for this matrix.  
+		//For binary data accept all chars with any number of states, because any with > 2 should already have caused 
+		//an error above, and any with zero will be ignored for calculations but will matter for formatting of SL output
+		if(!(datatype == BINARY || datatype == BINARY_NOT_ALL_ZEROS)){
+			if(ns == 0 || ns != maxNumStates){
+				realCharSet->erase(num);
+				}
+			}
+		}
+	if(missing.size() > 0){
+		string str = NxsSetReader::GetSetAsNexusString(missing);
+		outman.UserMessage("\tNOTE: entirely missing characters removed from matrix: %s", str.c_str());
+		}
+
+	//verify that we're not breaking the assumptions of these datatypes.  Anything entering here
+	//is potentially constant, ignoring the effect of ambiguity.  This is never ok with Mkv, because
+	//we don't know how many states the ? might resolve to.  With binary no zeros this is ok if
+	//there is ambiguity, in which case minStates == 1 and maxStates == 2
+	if(consts.size() > 0 && (datatype == ONLY_VARIABLE || datatype == BINARY_NOT_ALL_ZEROS)){
+		string c = NxsSetReader::GetSetAsNexusString(consts);
+		if(datatype == BINARY_NOT_ALL_ZEROS){
+			for(NxsUnsignedSet::iterator cit = consts.begin(); cit != consts.end();){
+				int num = *cit;
+				cit++;
+				std::set<NxsDiscreteStateCell> minStates = charblock->GetNamedStateSetOfColumn(num);
+				std::set<NxsDiscreteStateCell> maxStates = charblock->GetMaximalStateSetOfColumn(num);
+				assert(minStates.size() == 1);
+				assert(maxStates.size() <= 2);
+				if(maxStates.find(1) != maxStates.end())
+					consts.erase(num);
+				}
+			if(consts.size() > 0){
+				string c = NxsSetReader::GetSetAsNexusString(consts);
+				throw ErrorException("Constant characters of state 0 are not allowed when using the binarynotallzeros datatype (as opposed to plain binary).\nChange to datatype = binary\n\tor exclude them by adding this to your nexus datafile:\nbegin assumptions;\nexset * const = %s;\nend;", c.c_str());  
+				}
+			}
+		else{
+			string c = NxsSetReader::GetSetAsNexusString(consts);
+			string title = charblock->GetTitle();
+			throw ErrorException("Constant characters are not allowed when using the Mkv model\n\t(as opposed to Mk), because it assumes that all characters\n\tare variable.  Ambiguity does not count as a state.\n\tChange to datatype = standard or exclude them by adding this\n\tto your nexus datafile:\nbegin assumptions;\nlink characters='%s';\nexset * const = %s;\nend;", title.c_str(), c.c_str());
+			}
+		}
+	//maxNumStates = 2 here is only so that the message is output when creating the first standard matrix
+	else if(consts.size() > 0 && !(datatype == BINARY) && maxNumStates == 2){
+		string c = NxsSetReader::GetSetAsNexusString(consts);
+		outman.UserMessage("\t****\n\tWARNING - Constant characters found in standard data matrix (sites %s)", c.c_str());
+		outman.UserMessage("\tCurrently these will be ignored because including them in the");
+		outman.UserMessage("\tlikelihood calculations would require knowledge of how many states");
+		outman.UserMessage("\twere possible for those columns (i.e., 1 state was observed, but ");
+		outman.UserMessage("\twas that out of 2 possible, or 3 or 4, etc)\n\t****");
+		}
+
+	if(realCharSet->size() == 0)
+		return;
+
+	//Make room for dummy conditioning (generally constant) character(s) here.
+	//For anything besides BINARY_NOT_ALL_ZEROS the # will be equal to maxNumStates
+	//although for symetrical Mkv that many are not needed because they are all equal
+	//it defaults to zero in the constructor
+	if(datatype == ONLY_VARIABLE || datatype == BINARY_NOT_ALL_ZEROS){
+		if(datatype == BINARY_NOT_ALL_ZEROS)
+			numConditioningPatterns = 1;
+		else
+			numConditioningPatterns = maxNumStates;
+		}
+
+	NewMatrix( numActiveTaxa, realCharSet->size() + numConditioningPatterns);
+
+	map<NxsDiscreteStateCell, int> nclStateIndexToGarliState;
+	vector< map<NxsDiscreteStateCell, int> > stateMaps;
+
+	bool recodeSkipped = false;
+	if(modeltype == UNORDERED && !(datatype == BINARY || datatype == BINARY_NOT_ALL_ZEROS))
+		recodeSkipped = true;
+
+	if(recodeSkipped){
+		//Recode characters that skip states (assuming numerical order of states) to not skip any.  i.e., recode a
+		//char with states 0 1 5 7 to 0 1 2 3 and assume that it has 4 states
+		//With assumptions block "options gapmode=newstate" things get even more confusing.  GetNamedStateSetOfColumn
+		//returns the gap as a code of -2, in which case the mapping would be -2 0 1 5 7 -> 0 1 2 3 4 5 
+		if(datatype == ONLY_VARIABLE)
+			//add in the conditioning patterns such that the character numbers match up later
+			for(int i = 0;i < numConditioningPatterns;i++)
+				stateMaps.push_back(nclStateIndexToGarliState);
+
+		for(NxsUnsignedSet::const_iterator cit = realCharSet->begin(); cit != realCharSet->end();cit++){
+			set<NxsDiscreteStateCell> stateSet = charblock->GetNamedStateSetOfColumn(*cit);
+			int myIndex = 0;
+			for(set<NxsDiscreteStateCell>::iterator sit = stateSet.begin();sit != stateSet.end();sit++){
+				nclStateIndexToGarliState.insert(pair<NxsDiscreteStateCell, int>(*sit, myIndex++));
+				}
+			stateMaps.push_back(nclStateIndexToGarliState);
+			nclStateIndexToGarliState.clear();
+			}
+		}
+	else{//for ordered data we don't want to remove unobserved states
+		if(charblock->GetGapModeSetting() == CharactersBlock::GAP_MODE_NEWSTATE){
+			throw ErrorException("Cannot use ordered Mk/Mkv data with gapmode=newstate. Recode the state or choose unordered.");
+			}
+		}
+
+	// read in the data, including taxon names
+	int effectiveTax=0;
+	for( int origTaxIndex = 0; origTaxIndex < numOrigTaxa; origTaxIndex++ ) {
+		if(charblock->IsActiveTaxon(origTaxIndex)){
+			//store the taxon names based on NCL's "escaped" version, which will properly deal
+			//with whether quotes are necessary, etc.  No conversion needed at output.
+			NxsString tlabel = charblock->GetTaxonLabel(origTaxIndex);
+			SetTaxonLabel(effectiveTax, NxsString::GetEscaped(tlabel).c_str());
+			
+			//this accounts for conditioning patterns
+			int effectiveChar = 0;
+			//For each taxon, add the dummy constant character(s).  This will be one of each possible constant
+			//state, except for BINARY_NOT_ALL_ZEROS, where it will be only state 0
+			//Since there is no correspondence btwn these characters and the original alignments, the origDataNumber
+			//is -1
+			if(numConditioningPatterns > 0){
+				for(int s = 0; s < (datatype == BINARY_NOT_ALL_ZEROS ? 1 : maxNumStates); s ++){
+					if(effectiveTax == 0)
+						SetOriginalDataNumber(s, -1);
+					SetMatrix( effectiveTax, effectiveChar++, s);
+					}
+				}
+
+			bool firstAmbig = true;
+			for(NxsUnsignedSet::const_iterator cit = realCharSet->begin(); cit != realCharSet->end();cit++){
+				if(effectiveTax == 0)
+					SetOriginalDataNumber(effectiveChar, *cit);
+				unsigned char datum = '\0';
+				if(charblock->IsGapState(origTaxIndex, *cit) == true){
+					if(datatype == BINARY || datatype == BINARY_NOT_ALL_ZEROS)
+						throw ErrorException("Cannot use gap characters with binary datatype.  Recode to 0 and 1");
+					//if gapmode=newstate is on (default is gapmode=missing) then need handle the gap properly
+					//changes in NCL should now have it correctly reporting the number of states with gaps {in, ex}cluded
+					if(charblock->GetGapModeSetting() == CharactersBlock::GAP_MODE_NEWSTATE){
+						if(recodeSkipped){
+							datum = stateMaps[effectiveChar][NXS_GAP_STATE_CODE];
+							}
+						else{
+							assert(0);
+							datum = maxNumStates - 1;
+							}
+						}
+					else{
+						datum = maxNumStates;
+						}
+					}
+				else if(charblock->IsMissingState(origTaxIndex, *cit) == true){
+					datum = maxNumStates;
+					}
+				else{
+					int nstates = charblock->GetNumStates(origTaxIndex, *cit);
+					//need to deal with the possibility of multiple states represented in matrix
+					//just convert to full ambiguity
+					if(nstates == 1){
+						NxsDiscreteStateCell nclIndex = charblock->GetStateIndex(origTaxIndex, *cit, 0);
+						if(recodeSkipped)
+							datum = stateMaps[effectiveChar][nclIndex];
+						else 
+							datum = nclIndex;
+						}
+					else{
+						if(firstAmbig){
+							outman.UserMessageNoCR("\tPart ambig. char's of taxon %s converted to full ambiguity:\n\t  char ", TaxonLabel(origTaxIndex));
+							firstAmbig = false;
+							}
+						outman.UserMessageNoCR(" %d ", *cit+1);
+						datum = maxNumStates;
+						}
+					}
+				SetMatrix( effectiveTax, effectiveChar++, datum);
+				}
+			if(firstAmbig == false) 
+				outman.UserMessage("");
+			effectiveTax++;
+			}
+		}
+	//verify that every allowed state was observed for each character
+#ifndef NDEBUG
+	bool found;
+	if(recodeSkipped){
+		for(int c = numConditioningPatterns;c < numPatterns;c++){
+			for(int s = 0;s < maxNumStates;s++){
+				found = false;
+				for(int t = 0;t < nTax;t++){
+					if(Matrix(t, c) == s){
+						found = true;
+						break;
+						}
+					}
+				if(!found){
+					outman.UserMessage("\nWARNING - some state in a %d-state character appeared only as part\n\tof an ambiguity code, e.g., a column with states 0, 1 and (12).", maxNumStates);
+					outman.UserMessage("\tThe ambiguity code will be treated as missing data,\n\tbut the character will still be considered to have %d states.\n", maxNumStates);
+					}
+				}
+			}
+		}
+#endif
+	}
+
+//this is a virtual overload for NState because it might have to deal with the dummy char, which shouldn't be included in the resampling
+int NStateData::BootstrapReweight(int seedToUse, FLOAT_TYPE resampleProportion){
+	//a seed is passed in and used for the reweighting - Either for restarting or not
+	//Either way we'll return the seed at the end of the reweighting, to be stored as the Population::nextBootstrapSeed
+
+	//which allows exactly the same bootstraped datasets to be used in multiple runs, but with different
+	//settings for the actual search
+	if(resampleProportion >= 5.0) outman.UserMessage("WARNING: The resampleproportion setting is the proportion to resample,\nNOT the percentage (1.0 = 100%%).\nThe value you specified (%.2f) is a very large proportion.", resampleProportion);
+
+	int originalSeed = rnd.seed();
+	rnd.set_seed(seedToUse);
+
+	//This is a little dumb, but since there are parallel counts and origCounts variables depending on whether the new PatternManager
+	//is being used, need to alias them so that the remainder of this function works unchanged
+	const int *origCountsAlias;
+	if(newOrigCounts.size() > 0){
+		origCountsAlias = &newOrigCounts[0];
+		}
+	else
+		origCountsAlias = origCounts;
+
+	int *countsAlias;
+	if(newCount.size() > 0){
+		countsAlias = &newCount[0];
+		}
+	else
+		countsAlias = count;
+
+	//for nstate data this will include the conditioning chars, but they will
+	//have a resample prob of zero
+	FLOAT_TYPE *cumProbs = new FLOAT_TYPE[numPatterns];
+	
+	assert(origCountsAlias[0] > 0 && origCountsAlias[1] > 0);
+
+	for(int i = 0;i < numConditioningPatterns;i++)
+		cumProbs[i] = ZERO_POINT_ZERO;
+	cumProbs[numConditioningPatterns]=(FLOAT_TYPE) origCountsAlias[numConditioningPatterns] / ((FLOAT_TYPE) numNonMissingRealCountsInOrigMatrix);
+	for(int i=numConditioningPatterns + 1;i<numPatterns;i++){
+		cumProbs[i] = cumProbs[i-1] + (FLOAT_TYPE) origCountsAlias[i] / ((FLOAT_TYPE) numNonMissingRealCountsInOrigMatrix);
+		assert(origCountsAlias[i] > 0);
+		}
+	for(int q=numConditioningPatterns;q<numPatterns;q++) 
+		countsAlias[q]=0;
+	assert(FloatingPointEquals(cumProbs[numPatterns-1], ONE_POINT_ZERO, 1e-6));
+	cumProbs[numPatterns-1] = ONE_POINT_ZERO;
+		
+	//ofstream deb("counts.log", ios::app);
+
+	//round to nearest int
+	int numToSample = (int) (((FLOAT_TYPE)numNonMissingRealCountsInOrigMatrix * resampleProportion) + 0.5);
+	if(numToSample != numNonMissingRealCountsInOrigMatrix) outman.UserMessage("Resampling %d characters (%.2f%%).\n", numToSample, resampleProportion*100);
+
+	for(int c=0;c<numToSample;c++){
+		FLOAT_TYPE p=rnd.uniform();
+		int pat=0; 
+		while(p > cumProbs[pat]) pat++;
+		countsAlias[pat]++;
+		}
+/*
+	for(int i = 0;i < numPatterns;i++)
+		deb << i << "\t" << cumProbs[i] << "\t" << origCountsAlias[i] << "\t" << countsAlias[i] <<  endl;
+*/
+	//take a count of the number of chars that were actually resampled
+	nonZeroCharCount = 0;
+	int numZero = 0;
+	int totCounts = 0;
+	for(int d = numConditioningPatterns;d < numPatterns;d++){
+		if(countsAlias[d] > 0) {
+			nonZeroCharCount++;
+			totCounts += countsAlias[d];
+			}
+		else 
+			numZero++;
+		}
+	if(datatype == ONLY_VARIABLE) 
+		assert(countsAlias[0] == 1);
+	assert(totCounts == numNonMissingRealCountsInOrigMatrix);
+	assert(nonZeroCharCount + numZero == numPatterns - numConditioningPatterns);
+
+	delete []cumProbs;
+	int nextSeed = rnd.seed();
+	rnd.set_seed(originalSeed);
+	return nextSeed;
+	}
+
+void OrientedGapData::CreateMatrixFromNCL(const NxsCharactersBlock *charblock, NxsUnsignedSet &origCharset){
+	if(charblock->GetDataType() != NxsCharactersBlock::standard)
+		throw ErrorException("Tried to create n-state matrix from non-standard data.\n\t(Did you mean to use datatype = nstate?)");
+
+	//this creates a copy of the charset that we can screw with here without hosing the one that was passed in,
+	//which might be needed elsewhere
+	NxsUnsignedSet charset = origCharset;
+
+	int numOrigTaxa = charblock->GetNTax();
+	int numActiveTaxa = charblock->GetNumActiveTaxa();
+
+	//Not allowing wtsets here, mainly due to lazyness
+	if(useDefaultWeightsets){
+		vector<int> charWeights;
+		string defWtsName = GarliReader::GetDefaultIntWeightSet(charblock, charWeights);
+		if(charWeights.size() > 0){
+			outman.UserMessage("NOTE: Default wtsets cannot currently be used with non-sequence data! Wtset \"%s\" ignored.", defWtsName.c_str()); 
+			}
+		}
+
+	if(charset.empty()){
+		//the charset was empty, implying that all characters in this block will go into a single matrix (actually, for nstate
+		//might be split anyway).  Create an effective charset that contains all of the characters, which will be filtered
+		//for exclusions and for the right number of max states
+		for(int i = 0;i < charblock->GetNumChar();i++)
+			charset.insert(i);
+		}
+
+	NxsUnsignedSet excluded = charblock->GetExcludedIndexSet();
+	NxsUnsignedSet *realCharSet = & charset;
+	NxsUnsignedSet charsetMinusExcluded;
+	if (!excluded.empty()) {
+		set_difference(charset.begin(), charset.end(), excluded.begin(), excluded.end(), inserter(charsetMinusExcluded, charsetMinusExcluded.begin()));
+		realCharSet = &charsetMinusExcluded;
+	}	
+
+	int numActiveChar = realCharSet->size();
+
+	if(numActiveChar == 0){
+		throw ErrorException("Sorry, fully excluded characters blocks or partition subsets are not currently supported.");
+		}
+
+	if(realCharSet->size() == 0)
+		return;
+
+//	the dummy root is now taken care of outside of here in a non-datatype specific way
+//	int myEffectiveTaxa = numActiveTaxa + 1;
+
+	bool allGapChar = true;
+
+	//Make room for dummy conditioning (all zero) character here.
+	//it defaults to zero in the constructor
+	if(datatype == ONLY_VARIABLE || allGapChar){
+		numConditioningPatterns = 1;
+		}
+
+	//make room for a dummy constant character here
+	NewMatrix( numActiveTaxa, realCharSet->size() + numConditioningPatterns);
+
+	// read in the data, including taxon names
+	int effectiveTax=0;
+	for( int origTaxIndex = 0; origTaxIndex < numOrigTaxa; origTaxIndex++ ) {
+		if(charblock->IsActiveTaxon(origTaxIndex)){
+			//store the taxon names based on NCL's "escaped" version, which will properly deal
+			//with whether quotes are necessary, etc.  No conversion needed at output.
+			NxsString tlabel = charblock->GetTaxonLabel(origTaxIndex);
+			SetTaxonLabel(effectiveTax, NxsString::GetEscaped(tlabel).c_str());
+			
+			int effectiveChar = 0;
+			//add the dummy character
+			if(numConditioningPatterns > 0){
+				if(effectiveTax == 0)
+					SetOriginalDataNumber(0, -1);
+				if(tlabel != "ROOT")
+					SetMatrix( effectiveTax, effectiveChar++, 0);
+				else
+					SetMatrix( effectiveTax, effectiveChar++, maxNumStates);
+				}
+
+			bool firstAmbig = true;
+			for(NxsUnsignedSet::const_iterator cit = realCharSet->begin(); cit != realCharSet->end();cit++){	
+				if(effectiveTax == 0)
+					SetOriginalDataNumber(effectiveChar, *cit);
+				unsigned char datum = '\0';
+				if(charblock->IsGapState(origTaxIndex, *cit) == true)
+					datum = 0;
+				else if(charblock->IsMissingState(origTaxIndex, *cit) == true){
+					datum = maxNumStates;
+					}
+				else{
+					int nstates = charblock->GetNumStates(origTaxIndex, *cit);
+					if(nstates == 1){
+						int nclIndex = charblock->GetStateIndex(origTaxIndex, *cit, 0);
+						datum = nclIndex;
+						}
+					else{
+						if(firstAmbig){
+							outman.UserMessageNoCR("\tPart ambig. char's of taxon %s converted to full ambiguity:\n\t  char ", TaxonLabel(origTaxIndex));
+							firstAmbig = false;
+							}
+						outman.UserMessageNoCR(" %d ", *cit+1);
+						datum = maxNumStates;
+						}
+					}
+				SetMatrix( effectiveTax, effectiveChar++, datum);
+				}
+			if(firstAmbig == false) outman.UserMessage("");
+			effectiveTax++;
+			}
+		}
+	}
diff --git a/src/sequencedata.h b/src/sequencedata.h
new file mode 100644
index 0000000..a529b72
--- /dev/null
+++ b/src/sequencedata.h
@@ -0,0 +1,959 @@
+// GARLI version 2.0 source code
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+//	NOTE: Portions of this source adapted from GAML source, written by Paul O. Lewis
+
+#ifndef _SEQUENCE_DATA_
+#define _SEQUENCE_DATA_
+
+#include <vector>
+using namespace std;
+
+#include "defs.h"
+#include "datamatr.h"
+//#include "model.h"
+
+class SequenceData : public DataMatrix{
+public:
+	SequenceData() : DataMatrix()
+		{ maxNumStates=4; strcpy( info, "DNA" ); empStateFreqs=NULL; numConditioningPatterns = 0;}
+	SequenceData( int ntax, int nchar ) : DataMatrix( ntax, nchar )
+		{ maxNumStates=4; strcpy( info, "DNA" ); empStateFreqs=NULL; numConditioningPatterns = 0;}
+	virtual ~SequenceData() {
+		if(empStateFreqs != NULL) delete []empStateFreqs;
+		}
+
+protected:
+	FLOAT_TYPE *empStateFreqs;
+	// overrides of base class's virtual fuctions
+	virtual unsigned char CharToDatum( char ch ) const = 0;
+	virtual unsigned char CharToBitwiseRepresentation( char ch ) const;
+	virtual char	DatumToChar( unsigned char d ) const;
+	virtual unsigned char	FirstState() const { return 0; }
+	virtual unsigned char	LastState() const { return 3; }
+	virtual int	NumStates(int) const { return 4; }
+
+public:
+	virtual void CreateMatrixFromNCL(const NxsCharactersBlock *, NxsUnsignedSet &charset) = 0;
+	virtual void CalcEmpiricalFreqs() = 0;
+	virtual void GetEmpiricalFreqs(FLOAT_TYPE *f) const{
+		assert(empStateFreqs);
+		for(int i=0;i<maxNumStates;i++) f[i]=empStateFreqs[i];
+		}
+	virtual void AddDummyRootToExistingMatrix();
+	};
+
+inline unsigned char SequenceData::CharToDatum( char ch ) const{
+	unsigned char datum;
+
+	if( ch == 'A' || ch == 'a' )
+		datum = 0;
+	else if( ch == 'C' || ch == 'c' )
+		datum = 1;
+	else if( ch == 'G' || ch == 'g' )
+		datum  = 2;
+	else if( ch == 'T' || ch == 't' )
+		datum = 3;
+	else if( ch == '?' || ch == '-' )
+		datum = MISSING_DATA;
+	else if( strchr( "rRyYmMkKsSwWhHbBvVdDnN", ch ) ) {
+		datum = MISSING_DATA;
+	}
+	else
+		throw ErrorException("Unknown character \"%c\" in SequenceData::CharToDatum", ch); 
+
+	return datum;
+}
+
+inline unsigned char SequenceData::CharToBitwiseRepresentation( char ch ) const{
+	unsigned char datum=0;
+	switch(ch){
+		case 'A' : datum=1; break;
+    	case 'C' : datum=2; break;
+       	case 'G' : datum=4; break;
+       	case 'T' : datum=8; break;
+       	case 'U' : datum=8; break;
+       	case 'M' : datum=3; break;
+       	case 'R' : datum=5; break;
+       	case 'S' : datum=6; break;
+       	case 'V' : datum=7; break;
+       	case 'W' : datum=9; break;
+       	case 'Y' : datum=10; break;
+       	case 'H' : datum=11; break;
+      	case 'K' : datum=12; break;
+       	case 'D' : datum=13; break;
+       	case 'B' : datum=14; break;
+       	case 'N' : datum=15; break;
+
+		case 'a' : datum=1; break;
+    	case 'c' : datum=2; break;
+       	case 'g' : datum=4; break;
+       	case 't' : datum=8; break;
+		case 'u' : datum=8; break;
+       	case 'm' : datum=3; break;
+       	case 'r' : datum=5; break;
+       	case 's' : datum=6; break;
+       	case 'v' : datum=7; break;
+       	case 'w' : datum=9; break;
+       	case 'y' : datum=10; break;
+       	case 'h' : datum=11; break;
+      	case 'k' : datum=12; break;
+       	case 'd' : datum=13; break;
+       	case 'b' : datum=14; break;
+       	case 'n' : datum=15; break;
+       	case '-' : datum=15; break;
+  		case '?' : datum=15; break;
+       	default  : throw ErrorException("Unknown nucleotide %c!", ch);
+		}
+	return datum;
+}
+
+inline char SequenceData::DatumToChar( unsigned char d ) const
+{
+	char ch;
+	switch(d){
+		case 1 : ch='A'; break;
+    	case 2 : ch='C'; break;
+       	case 4 : ch='G'; break;
+       	case 8 : ch='T'; break;
+ //      	case 8 : ch='U'; break;
+       	case 3 : ch='M'; break;
+       	case 5 : ch='R'; break;
+       	case 6 : ch='S'; break;
+       	case 7 : ch='V'; break;
+       	case 9 : ch='W'; break;
+       	case 10 : ch='Y'; break;
+       	case 11 : ch='H'; break;
+      	case 12 : ch='K'; break;
+       	case 13 : ch='D'; break;
+       	case 14 : ch='B'; break;
+       	case 15 : ch='?'; break;
+		default  : assert(0);
+		}
+	return ch;
+}
+
+class NucleotideData : public SequenceData{
+
+	vector<char*> ambigStrings;
+#ifdef OPEN_MP
+	vector<unsigned*> ambigToCharMap;
+#endif
+
+public:		
+	NucleotideData() : SequenceData() {fullyAmbigChar = 15;}
+	NucleotideData( int ntax, int nchar ) : SequenceData( ntax, nchar ) {fullyAmbigChar = 15;}
+	~NucleotideData() {
+		for(vector<char*>::iterator delit=ambigStrings.begin();delit!=ambigStrings.end();delit++)
+			delete [](*delit);
+#ifdef OPEN_MP
+		for(vector<unsigned*>::iterator delit=ambigToCharMap.begin();delit!=ambigToCharMap.end();delit++)
+			delete [](*delit);
+#endif
+		}
+
+	unsigned char CharToDatum(char d) const;
+	void CalcEmpiricalFreqs();
+	void CreateMatrixFromNCL(const NxsCharactersBlock *charblock, NxsUnsignedSet &charset);
+	void MakeAmbigStrings();
+	void AddDummyRootToExistingMatrix();
+	char *GetAmbigString(int i) const{
+		return ambigStrings[i];
+		}
+#ifdef OPEN_MP
+	unsigned *GetAmbigToCharMap(int i) const{
+		return ambigToCharMap[i];
+		}
+#endif
+	};
+
+class GeneticCode{
+	//mapping from codon number (ordered AAA, AAC, AAG, AAT, ACA, etc) to 
+	//amino acid number (0-19). Stop codons are 20.
+	//except for two-serine models, when they are 21 and the serine with two codons is state 20
+	int codonTable[64];
+	int map64toNonStops[64];
+	vector<int> stops;
+
+	//this holds the correspondence between the state indeces and actual codons
+	//for display purposes.  Stops are removed and thus any mapIndexToCodonDisplay[index]
+	//gives the codon for that index
+	vector<string> mapIndexToCodonDisplay;
+
+	public:
+	enum{
+		STANDARD= 0,
+		VERTMITO = 1,
+		INVERTMITO = 2,
+		STANDARDTWOSERINE = 3,
+		VERTMITOTWOSERINE = 4,
+		INVERTMITOTWOSERINE = 5
+		}codeName;
+	
+	GeneticCode(){
+		SetStandardCode();
+		}
+	void SetStandardCode(){
+		codonTable[ 0 ]= 8;
+		codonTable[ 1 ]= 11;
+		codonTable[ 2 ]= 8;
+		codonTable[ 3 ]= 11;
+		codonTable[ 4 ]= 16;
+		codonTable[ 5 ]= 16;
+		codonTable[ 6 ]= 16;
+		codonTable[ 7 ]= 16;
+		codonTable[ 8 ]= 14;
+		codonTable[ 9 ]= 15;
+		codonTable[ 10 ]= 14;
+		codonTable[ 11 ]= 15;
+		codonTable[ 12 ]= 7;
+		codonTable[ 13 ]= 7;
+		codonTable[ 14 ]= 10;
+		codonTable[ 15 ]= 7;
+		codonTable[ 16 ]= 13;
+		codonTable[ 17 ]= 6;
+		codonTable[ 18 ]= 13;
+		codonTable[ 19 ]= 6;
+		codonTable[ 20 ]= 12;
+		codonTable[ 21 ]= 12;
+		codonTable[ 22 ]= 12;
+		codonTable[ 23 ]= 12;
+		codonTable[ 24 ]= 14;
+		codonTable[ 25 ]= 14;
+		codonTable[ 26 ]= 14;
+		codonTable[ 27 ]= 14;
+		codonTable[ 28 ]= 9;
+		codonTable[ 29 ]= 9;
+		codonTable[ 30 ]= 9;
+		codonTable[ 31 ]= 9;
+		codonTable[ 32 ]= 3;
+		codonTable[ 33 ]= 2;
+		codonTable[ 34 ]= 3;
+		codonTable[ 35 ]= 2;
+		codonTable[ 36 ]= 0;
+		codonTable[ 37 ]= 0;
+		codonTable[ 38 ]= 0;
+		codonTable[ 39 ]= 0;
+		codonTable[ 40 ]= 5;
+		codonTable[ 41 ]= 5;
+		codonTable[ 42 ]= 5;
+		codonTable[ 43 ]= 5;
+		codonTable[ 44 ]= 17;
+		codonTable[ 45 ]= 17;
+		codonTable[ 46 ]= 17;
+		codonTable[ 47 ]= 17;
+		codonTable[ 48 ]= 20;
+		codonTable[ 49 ]= 19;
+		codonTable[ 50 ]= 20;
+		codonTable[ 51 ]= 19;
+		codonTable[ 52 ]= 15;
+		codonTable[ 53 ]= 15;
+		codonTable[ 54 ]= 15;
+		codonTable[ 55 ]= 15;
+		codonTable[ 56 ]= 20;
+		codonTable[ 57 ]= 1;
+		codonTable[ 58 ]= 18;
+		codonTable[ 59 ]= 1;
+		codonTable[ 60 ]= 9;
+		codonTable[ 61 ]= 4;
+		codonTable[ 62 ]= 9;
+		codonTable[ 63 ]= 4;
+		
+		map64toNonStops[0]=0;
+		map64toNonStops[1]=1;
+		map64toNonStops[2]=2;
+		map64toNonStops[3]=3;
+		map64toNonStops[4]=4;
+		map64toNonStops[5]=5;
+		map64toNonStops[6]=6;
+		map64toNonStops[7]=7;
+		map64toNonStops[8]=8;
+		map64toNonStops[9]=9;
+		map64toNonStops[10]=10;
+		map64toNonStops[11]=11;
+		map64toNonStops[12]=12;
+		map64toNonStops[13]=13;
+		map64toNonStops[14]=14;
+		map64toNonStops[15]=15;
+		map64toNonStops[16]=16;
+		map64toNonStops[17]=17;
+		map64toNonStops[18]=18;
+		map64toNonStops[19]=19;
+		map64toNonStops[20]=20;
+		map64toNonStops[21]=21;
+		map64toNonStops[22]=22;
+		map64toNonStops[23]=23;
+		map64toNonStops[24]=24;
+		map64toNonStops[25]=25;
+		map64toNonStops[26]=26;
+		map64toNonStops[27]=27;
+		map64toNonStops[28]=28;
+		map64toNonStops[29]=29;
+		map64toNonStops[30]=30;
+		map64toNonStops[31]=31;
+		map64toNonStops[32]=32;
+		map64toNonStops[33]=33;
+		map64toNonStops[34]=34;
+		map64toNonStops[35]=35;
+		map64toNonStops[36]=36;
+		map64toNonStops[37]=37;
+		map64toNonStops[38]=38;
+		map64toNonStops[39]=39;
+		map64toNonStops[40]=40;
+		map64toNonStops[41]=41;
+		map64toNonStops[42]=42;
+		map64toNonStops[43]=43;
+		map64toNonStops[44]=44;
+		map64toNonStops[45]=45;
+		map64toNonStops[46]=46;
+		map64toNonStops[47]=47;
+		map64toNonStops[48]=-1;
+		map64toNonStops[49]=48;
+		map64toNonStops[50]=-1;
+		map64toNonStops[51]=49;
+		map64toNonStops[52]=50;
+		map64toNonStops[53]=51;
+		map64toNonStops[54]=52;
+		map64toNonStops[55]=53;
+		map64toNonStops[56]=-1;
+		map64toNonStops[57]=54;
+		map64toNonStops[58]=55;
+		map64toNonStops[59]=56;
+		map64toNonStops[60]=57;
+		map64toNonStops[61]=58;
+		map64toNonStops[62]=59;
+		map64toNonStops[63]=60;
+
+		stops.clear();
+		stops.push_back(48);
+		stops.push_back(50);
+		stops.push_back(56);
+
+		FillIndexToCodonDisplayMap();
+		}
+		
+	void SetStandardTwoSerineCode(){
+		//because the stops don't change location, I don't think that anything else needs to be changed here
+
+		//the two lone serines become the 20th state
+		codonTable[ 9 ]= 20;  //AGC
+		codonTable[ 11 ]= 20; //AGT
+
+		//the three stop codons become the 21st state
+		codonTable[ 48 ]= 21;
+		codonTable[ 50 ]= 21;
+		codonTable[ 56 ]= 21;
+		}
+		
+	void SetVertMitoCode(){
+		SetStandardCode();
+		codonTable[56] = 18; //TGA
+		codonTable[8] = 20;  //AGA
+		codonTable[10] = 20;  //AGG
+		codonTable[12] = 10;  //ATA
+
+		map64toNonStops[0]=0;
+		map64toNonStops[1]=1;
+		map64toNonStops[2]=2;
+		map64toNonStops[3]=3;
+		map64toNonStops[4]=4;
+		map64toNonStops[5]=5;
+		map64toNonStops[6]=6;
+		map64toNonStops[7]=7;
+		map64toNonStops[8]=-1;
+		map64toNonStops[9]=8;
+		map64toNonStops[10]=-1;
+		map64toNonStops[11]=9;
+		map64toNonStops[12]=10;
+		map64toNonStops[13]=11;
+		map64toNonStops[14]=12;
+		map64toNonStops[15]=13;
+		map64toNonStops[16]=14;
+		map64toNonStops[17]=15;
+		map64toNonStops[18]=16;
+		map64toNonStops[19]=17;
+		map64toNonStops[20]=18;
+		map64toNonStops[21]=19;
+		map64toNonStops[22]=20;
+		map64toNonStops[23]=21;
+		map64toNonStops[24]=22;
+		map64toNonStops[25]=23;
+		map64toNonStops[26]=24;
+		map64toNonStops[27]=25;
+		map64toNonStops[28]=26;
+		map64toNonStops[29]=27;
+		map64toNonStops[30]=28;
+		map64toNonStops[31]=29;
+		map64toNonStops[32]=30;
+		map64toNonStops[33]=31;
+		map64toNonStops[34]=32;
+		map64toNonStops[35]=33;
+		map64toNonStops[36]=34;
+		map64toNonStops[37]=35;
+		map64toNonStops[38]=36;
+		map64toNonStops[39]=37;
+		map64toNonStops[40]=38;
+		map64toNonStops[41]=39;
+		map64toNonStops[42]=40;
+		map64toNonStops[43]=41;
+		map64toNonStops[44]=42;
+		map64toNonStops[45]=43;
+		map64toNonStops[46]=44;
+		map64toNonStops[47]=45;
+		map64toNonStops[48]=-1;
+		map64toNonStops[49]=46;
+		map64toNonStops[50]=-1;
+		map64toNonStops[51]=47;
+		map64toNonStops[52]=48;
+		map64toNonStops[53]=49;
+		map64toNonStops[54]=50;
+		map64toNonStops[55]=51;
+		map64toNonStops[56]=52;
+		map64toNonStops[57]=53;
+		map64toNonStops[58]=54;
+		map64toNonStops[59]=55;
+		map64toNonStops[60]=56;
+		map64toNonStops[61]=57;
+		map64toNonStops[62]=58;
+		map64toNonStops[63]=59;
+
+		stops.clear();
+		stops.push_back(8);
+		stops.push_back(10);
+		stops.push_back(48);
+		stops.push_back(50);
+
+		FillIndexToCodonDisplayMap();
+		}
+
+	//this should be called AFTER SetVertMitoCode()
+	void SetVertMitoTwoSerineCode(){
+		//because the stops don't change location, I don't think that anything else needs to be changed here
+
+		//the two lone serines become the 20th state
+		codonTable[ 9 ]= 20;  //AGC
+		codonTable[ 11 ]= 20; //AGT
+
+		//the four stop codons become the 21st state
+		codonTable[8] = 21;  //AGA
+		codonTable[10] = 21;  //AGG
+		codonTable[ 48 ]= 21;
+		codonTable[ 50 ]= 21;
+		}
+		
+	void SetInvertMitoCode(){
+		SetStandardCode();
+		codonTable[56] = 18; //TGA
+		codonTable[8] = 15;  //AGA
+		codonTable[10] = 15;  //AGG
+		codonTable[12] = 10;  //ATA
+
+		map64toNonStops[0]=0;
+		map64toNonStops[1]=1;
+		map64toNonStops[2]=2;
+		map64toNonStops[3]=3;
+		map64toNonStops[4]=4;
+		map64toNonStops[5]=5;
+		map64toNonStops[6]=6;
+		map64toNonStops[7]=7;
+		map64toNonStops[8]=8;
+		map64toNonStops[9]=9;
+		map64toNonStops[10]=10;
+		map64toNonStops[11]=11;
+		map64toNonStops[12]=12;
+		map64toNonStops[13]=13;
+		map64toNonStops[14]=14;
+		map64toNonStops[15]=15;
+		map64toNonStops[16]=16;
+		map64toNonStops[17]=17;
+		map64toNonStops[18]=18;
+		map64toNonStops[19]=19;
+		map64toNonStops[20]=20;
+		map64toNonStops[21]=21;
+		map64toNonStops[22]=22;
+		map64toNonStops[23]=23;
+		map64toNonStops[24]=24;
+		map64toNonStops[25]=25;
+		map64toNonStops[26]=26;
+		map64toNonStops[27]=27;
+		map64toNonStops[28]=28;
+		map64toNonStops[29]=29;
+		map64toNonStops[30]=30;
+		map64toNonStops[31]=31;
+		map64toNonStops[32]=32;
+		map64toNonStops[33]=33;
+		map64toNonStops[34]=34;
+		map64toNonStops[35]=35;
+		map64toNonStops[36]=36;
+		map64toNonStops[37]=37;
+		map64toNonStops[38]=38;
+		map64toNonStops[39]=39;
+		map64toNonStops[40]=40;
+		map64toNonStops[41]=41;
+		map64toNonStops[42]=42;
+		map64toNonStops[43]=43;
+		map64toNonStops[44]=44;
+		map64toNonStops[45]=45;
+		map64toNonStops[46]=46;
+		map64toNonStops[47]=47;
+		map64toNonStops[48]=-1;
+		map64toNonStops[49]=48;
+		map64toNonStops[50]=-1;
+		map64toNonStops[51]=49;
+		map64toNonStops[52]=50;
+		map64toNonStops[53]=51;
+		map64toNonStops[54]=52;
+		map64toNonStops[55]=53;
+		map64toNonStops[56]=54;
+		map64toNonStops[57]=55;
+		map64toNonStops[58]=56;
+		map64toNonStops[59]=57;
+		map64toNonStops[60]=58;
+		map64toNonStops[61]=59;
+		map64toNonStops[62]=60;
+		map64toNonStops[63]=61;
+
+		stops.clear();
+		stops.push_back(48);
+		stops.push_back(50);
+		
+		FillIndexToCodonDisplayMap();
+		}
+
+	//this should be called AFTER SetInvertMitoCode()
+	void SetInvertMitoTwoSerineCode(){
+		//because the stops don't change location, I don't think that anything else needs to be changed here
+
+		//the two lone serines become the 20th state
+		codonTable[ 9 ]= 20;  //AGC
+		codonTable[ 11 ]= 20; //AGT
+
+		//the two stop codons become the 21st state
+		codonTable[ 48 ]= 21;
+		codonTable[ 50 ]= 21;
+		}
+
+	int CodonLookup(int i){
+		assert(i >= 0 && i < 64);
+		return codonTable[i];
+		}
+	int Map64stateToNonStops(int i){
+		assert(i >= 0 && i < 64);
+		assert(map64toNonStops[i] != -1);
+		return map64toNonStops[i];
+		}
+	void FillIndexToCodonDisplayMap(){
+		//this assumes that the correct genetic code has already been set
+		mapIndexToCodonDisplay.clear();
+		char nucs[4] = {'A', 'C', 'G', 'T'};
+		//char cod[3];
+		char *cod = new char[4];
+		for(int f = 0;f < 4;f++){
+			for(int s = 0;s < 4;s++){
+				for(int t = 0;t < 4;t++){
+					if(CodonLookup(f * 16 + s * 4 + t) != 20){ 
+						sprintf(cod, "%c%c%c", nucs[f], nucs[s], nucs[t]);
+						mapIndexToCodonDisplay.push_back(cod);
+						}
+					}
+				}
+			}
+		delete []cod;
+		}
+	const string LookupCodonDisplayFromIndex(int index) const{
+		return mapIndexToCodonDisplay[index];
+		}
+
+	int NumStates() const {return mapIndexToCodonDisplay.size();}
+	};
+
+class CodonData : public SequenceData {
+
+	GeneticCode code;
+	//these are for use in the F1x4 or F3x4 methods of calculating the state freqs
+	FLOAT_TYPE empBaseFreqsPos1[4];
+	FLOAT_TYPE empBaseFreqsPos2[4];
+	FLOAT_TYPE empBaseFreqsPos3[4];
+
+	FLOAT_TYPE empBaseFreqsAllPos[4];
+	enum{ NOT_EMPIRICAL	= 0,
+		  CODON_TABLE	= 1,
+		  F1X4			= 2,
+		  F3X4			= 3
+		}empType;
+//	int empType; //codon table = 0
+				//F1x4 = 1
+				//F3x4 = 2
+
+public:
+	CodonData() : SequenceData(){
+		maxNumStates = 61;
+		code.SetStandardCode();
+		empType = NOT_EMPIRICAL;
+		fullyAmbigChar = maxNumStates;
+		}
+
+	CodonData(const NucleotideData *dat, int genCode, bool ignoreStops=false) : SequenceData(){
+		assert(dat->Dense() == false);
+		if(genCode == GeneticCode::STANDARD){
+			code.SetStandardCode();
+			maxNumStates = 61;
+			}
+		else if(genCode == GeneticCode::VERTMITO){
+			code.SetVertMitoCode();
+			maxNumStates = 60;
+			}
+		else if(genCode == GeneticCode::INVERTMITO){
+			code.SetInvertMitoCode();
+			maxNumStates = 62;
+			}
+		else{
+			throw ErrorException("Sorry, only the standard, vert mito and invert mito codes can be used with codon models");
+			}
+		usePatternManager = dat->GetUsePatternManager();
+		FillCodonMatrixFromDNA(dat, ignoreStops);
+		CopyNamesFromOtherMatrix(dat);
+		empType = NOT_EMPIRICAL;
+		fullyAmbigChar = maxNumStates;
+		}
+
+	~CodonData(){}
+
+	void FillCodonMatrixFromDNA(const NucleotideData *, bool ignoreStops);
+	unsigned char CharToDatum(char c) const{
+		//this shouldn't be getting called, as it makes no sense for codon data
+		assert(0);
+		return 0;
+		}
+
+	void CreateMatrixFromNCL(const NxsCharactersBlock *, NxsUnsignedSet &charset){
+		//this also should not be getting called.  The codon matrix
+		//is created from a DNA matrix that has been read in, possibly
+		//by the NCL
+		assert(0);
+		}
+	GeneticCode* GetCode() {return &code;}
+	//void SetEmpType(int t) {empType = t;}
+	void SetF1X4Freqs(){empType = F1X4;}
+	void SetF3X4Freqs(){empType = F3X4;}
+	void SetCodonTableFreqs(){empType = CODON_TABLE;}
+	void CalcEmpiricalFreqs();
+	void CalcF1x4Freqs();
+	void CalcF3x4Freqs();
+	void BaseFreqXPositionReport();
+	//int ComparePatterns( const int i, const int j ) const;
+	void SetVertMitoCode() {code.SetVertMitoCode();}
+	void SetInvertMitoCode() {code.SetInvertMitoCode();}
+};
+
+
+class AminoacidData : public SequenceData{
+
+public:
+	AminoacidData() : SequenceData(){
+		maxNumStates = 20;
+		fullyAmbigChar = maxNumStates;
+		}
+
+	AminoacidData(const NucleotideData *dat, int genCode, bool ignoreStops=false) : SequenceData(){
+		maxNumStates = 20;
+		GeneticCode c;
+		if(genCode == GeneticCode::STANDARD) c.SetStandardCode();
+		else if(genCode == GeneticCode::VERTMITO) c.SetVertMitoCode();
+		else if(genCode == GeneticCode::INVERTMITO) c.SetInvertMitoCode();
+		else{
+			if(genCode == GeneticCode::STANDARDTWOSERINE){
+				c.SetStandardTwoSerineCode();
+				}
+			else if(genCode == GeneticCode::VERTMITOTWOSERINE){
+				c.SetVertMitoCode();
+				c.SetVertMitoTwoSerineCode();
+				}
+			else if(genCode == GeneticCode::INVERTMITOTWOSERINE){
+				c.SetInvertMitoCode();
+				c.SetInvertMitoTwoSerineCode();
+				}
+			else assert(0);
+			maxNumStates = 21;	
+			}
+		usePatternManager = dat->GetUsePatternManager();
+		FillAminoacidMatrixFromDNA(dat, &c, ignoreStops);
+		CopyNamesFromOtherMatrix(dat);
+		fullyAmbigChar = maxNumStates;
+		}
+	void FillAminoacidMatrixFromDNA(const NucleotideData *dat, GeneticCode *code, bool ignoreStops);
+	void CalcEmpiricalFreqs();
+	unsigned char CharToDatum(char d) const;
+	void CreateMatrixFromNCL(const NxsCharactersBlock *, NxsUnsignedSet &charset);
+	};
+
+class DataPartition {
+private:
+	vector<SequenceData *> dataSubsets;
+	int nTax;
+public:
+	void AddSubset(SequenceData* sub){
+		dataSubsets.push_back(sub);
+		nTax = sub->NTax();
+		}
+	SequenceData *GetSubset(int num) const{
+		if(num < 0 || (num < dataSubsets.size()) == false) throw ErrorException("Tried to access invalid subset number");
+		return dataSubsets[num];
+		}
+	void Delete(){
+		for(vector<SequenceData *>::iterator it = dataSubsets.begin();it != dataSubsets.end(); it++)
+			delete *it;
+		dataSubsets.clear();
+		}
+	int NTax() const {return nTax;}
+	int NumSubsets() const {return dataSubsets.size();}
+	void BeginNexusTreesBlock(string &trans) const {dataSubsets[0]->BeginNexusTreesBlock(trans);}
+	void BeginNexusTreesBlock(ofstream &out) const {dataSubsets[0]->BeginNexusTreesBlock(out);}
+	NxsString TaxonLabel(int t) const {return dataSubsets[0]->TaxonLabel(t);}
+	int TaxonNameToNumber(NxsString name) const{return dataSubsets[0]->TaxonNameToNumber(name);}
+
+	void AddDummyRoots(){
+		nTax++;
+		for(int p = 0;p < NumSubsets();p++){
+			dataSubsets[p]->AddDummyRootToExistingMatrix();
+			assert(nTax == dataSubsets[p]->NTax());
+			}
+		}
+	int BootstrapReweight(int seedToUse, FLOAT_TYPE resampleProportion){
+		int nextSeed = seedToUse;
+		for(int p = 0;p < NumSubsets();p++){
+			outman.UserMessage("\tSubset %d: Random seed for bootstrap reweighting: %d", p + 1, nextSeed);
+			SequenceData *curData = GetSubset(p);
+			nextSeed = curData->BootstrapReweight(nextSeed, resampleProportion);
+			}
+		return nextSeed;
+		}
+	};
+
+class DataSubsetInfo{
+public:
+	int garliSubsetNum;
+	int charblockNum;
+	string charblockName;
+	int partitionSubsetNum;
+	string partitionSubsetName;
+	enum type{
+		NUCLEOTIDE = 0,
+		AMINOACID = 1,
+		CODON = 2, 
+		NSTATE= 3,
+		NSTATEV = 4,
+		ORDNSTATE = 5,
+		ORDNSTATEV = 6,
+		ORIENTEDGAP = 7,
+		BINARY = 8,
+		BINARY_NOT_ALL_ZEROS = 9
+		}readAs, usedAs;
+	int totalCharacters;
+	int uniqueCharacters;
+	string outputNames[10];//{"Nucleotide data", "Amino acid data", "Codon data"};
+	DataSubsetInfo(int gssNum, int cbNum, string cbName, int psNum, string psName, type rAs, type uAs) :
+		garliSubsetNum(gssNum), charblockNum(cbNum), charblockName(cbName), partitionSubsetNum(psNum), partitionSubsetName(psName), readAs(rAs), usedAs(uAs){
+			outputNames[NUCLEOTIDE]="Nucleotide data";
+			outputNames[AMINOACID]="Amino acid data";
+			outputNames[CODON]="Codon data";
+			outputNames[NSTATE]="Standard k-state data";
+			outputNames[NSTATEV]="Standard k-state data, variable only";
+			outputNames[ORDNSTATE]="Standard ordered k-state data";
+			outputNames[ORDNSTATEV]="Standard ordered k-state data, variable only";
+			outputNames[ORIENTEDGAP]="Gap-coded data, oriented with respect to time";
+			outputNames[BINARY]="Binary data";
+			outputNames[BINARY_NOT_ALL_ZEROS]="Binary data, no constant state 0 chars";
+			}
+	void Report(){
+		outman.UserMessage("GARLI data subset %d", garliSubsetNum+1);
+		outman.UserMessage("\tCHARACTERS block #%d (\"%s\")", charblockNum+1, charblockName.c_str());
+		if(partitionSubsetNum >= 0) outman.UserMessage("\tCHARPARTITION subset #%d (\"%s\")", partitionSubsetNum+1, partitionSubsetName.c_str());
+		outman.UserMessage("\tData read as %s,\n\tmodeled as %s", outputNames[readAs].c_str(), outputNames[usedAs].c_str());
+		}
+	};
+/*
+//
+// Mk type model, with binary data
+class BinaryData : public SequenceData{
+	public:
+		BinaryData() : SequenceData(){
+			maxNumStates = 2;
+			}
+
+		unsigned char CharToDatum(char d);
+		char DatumToChar( unsigned char d );
+		void CreateMatrixFromNCL(const NxsCharactersBlock *, NxsUnsignedSet &charset);
+		void CalcEmpiricalFreqs(){
+			//BINARY - this might actually make sense for gap encoding
+			}
+		//this is just a virtual overload that avoids doing anything if determine const is called with inappropriate data
+		void DetermineConstantSites(){};
+	};
+
+inline unsigned char BinaryData::CharToDatum( char ch ){
+	unsigned char datum;
+
+	if( ch == '0' || ch == '-' )
+		datum = 0;
+	else if( ch == '1' || ch == '+' )
+		datum = 1;
+	else if( ch == '?' )
+		datum = 2;
+	else
+      THROW_BADSTATE(ch);
+
+	return datum;
+	}
+
+inline char BinaryData::DatumToChar( unsigned char d ){
+	char ch = 'X';	// ambiguous
+
+	if( d == 2 )
+		ch = '?';
+	else if( d == 0 )
+		ch = '0';
+	else if( d == 1 )
+		ch = '1';
+
+	return ch;
+	}
+*/
+//
+// Mk or Mkv type model, with n-state data
+class NStateData : public SequenceData{
+	public:
+		enum{
+			ALL = 0,
+			ONLY_VARIABLE = 1,
+			ONLY_INFORM = 2,
+			BINARY = 3,
+			BINARY_NOT_ALL_ZEROS = 4
+			}datatype;
+		enum{
+			UNORDERED = 0,
+			ORDERED = 1
+			}modeltype;
+		NStateData() : SequenceData(){
+			maxNumStates = 99;
+			}
+		NStateData(int ns) : SequenceData(){
+			maxNumStates = ns;
+			}
+		//NStateData(int ns, bool isMkv, bool isOrdered) : SequenceData(){'
+		NStateData(int ns, bool isOrdered, bool isBinary, bool isConditioned) : SequenceData(){
+			if(isBinary){
+				if(isConditioned)
+					datatype = BINARY_NOT_ALL_ZEROS;
+				else
+					datatype = BINARY;
+				}
+			else if(isConditioned)
+				datatype = ONLY_VARIABLE;
+			else 
+				datatype = ALL;
+			if(isOrdered)
+				modeltype = ORDERED;
+			else
+				modeltype = UNORDERED;
+			maxNumStates = ns;
+			}
+		void SetNumStates(int ns){maxNumStates = ns;}
+
+		virtual unsigned char CharToDatum(char d) const;
+		virtual char DatumToChar( unsigned char d ) const;
+		virtual void CreateMatrixFromNCL(const NxsCharactersBlock *, NxsUnsignedSet &charset);
+		void CalcEmpiricalFreqs(){
+			//BINARY - this might actually make sense for gap encoding
+			}
+		//this is a virtual overload for NState because it might have to deal with the conditioning chars, which shouldn't be included in the resampling
+		int BootstrapReweight(int restartSeed, FLOAT_TYPE resampleProportion);
+		//this is just a virtual overload that avoids doing anything if determine const is called with inappropriate data
+		void DetermineConstantSites(){};
+	};
+
+inline unsigned char NStateData::CharToDatum( char ch ) const{
+	unsigned char datum;
+
+	if( ch == '0')
+		datum = 0;
+	else if( ch == '1')
+		datum = 1;
+	else if( ch == '2')
+		 datum = 2;
+	else if( ch == '3')
+		 datum = 3;
+	else if( ch == '4')
+		 datum = 4;
+	else if( ch == '5')
+		 datum = 5;
+	else if( ch == '6')
+		 datum = 6;
+	else if( ch == '7')
+		 datum = 7;
+	else if( ch == '8')
+		 datum = 8;
+	else if( ch == '9')
+		 datum = 9;
+	else if( ch == '?')
+		datum = 99;
+	else
+      throw ErrorException("Unknown character \"%c\" in NStateData::CharToDatum", ch); 
+
+	return datum;
+	}
+
+inline char NStateData::DatumToChar( unsigned char d ) const{
+	//NSTATE - not sure how this should work, but it isn't that important anyway
+	
+	char ch = 'X';	// ambiguous
+/*
+	if( d == 2 )
+		ch = '?';
+	else if( d == 0 )
+		ch = '0';
+	else if( d == 1 )
+		ch = '1';
+*/
+	return ch;
+	}
+
+class OrientedGapData : public NStateData{
+	public:
+		OrientedGapData() : NStateData(){
+			maxNumStates = 2;
+			}
+		OrientedGapData(int ns) : NStateData(){
+			assert(0);
+			}
+		OrientedGapData(int ns, bool isMkv) : NStateData(){
+			assert(0);
+			}
+		void SetNumStates(int ns){maxNumStates = ns;}
+
+		virtual void CreateMatrixFromNCL(const NxsCharactersBlock *, NxsUnsignedSet &charset);
+		void CalcEmpiricalFreqs(){
+			//BINARY - this might actually make sense for gap encoding
+			}
+		//this is just a virtual overload that avoids doing anything if determine const is called with inappropriate data
+		void DetermineConstantSites(){};
+	};
+
+
+#endif
+
+
diff --git a/src/set.cpp b/src/set.cpp
new file mode 100644
index 0000000..9322dbc
--- /dev/null
+++ b/src/set.cpp
@@ -0,0 +1,90 @@
+// set.h
+// Copyright � 1998 by Paul O. Lewis
+// All rights reserved.
+//
+// This code may be used and modified for non-commercial purposes
+// but redistribution in any form requires written permission.
+// Please contact:
+//
+//   Paul O. Lewis, Assistant Professor
+//   167 Castetter Hall
+//   Department of Biology
+//   The University of New Mexico
+//   Albuquerque, NM 87131-1091
+//   Phone: (505) 277-6681
+//   Fax: (505) 277-0304
+//   email: lewisp at unm.edu
+//   http://biology.unm.edu/~lewisp/pol.html
+//
+// Note: moving January 1, 1999, to the Department of Ecology and
+// Evolutionary Biology, University of Connecticut
+//
+// Associated source code file: "set.cpp"
+//
+
+#include <cstring>
+
+using namespace std;
+
+#include "defs.h"
+#include "set.h"
+
+DNASet& DNASet::operator|=( DNASet& b )
+{
+	set |= b.set;
+	return *this;
+}
+
+DNASet operator|( DNASet& a, DNASet& b )
+{
+	return DNASet( a.set | b.set );
+}
+
+DNASet& DNASet::operator&=( DNASet& b )
+{
+	set &= b.set;
+	return *this;
+}
+
+DNASet operator&( DNASet& a, DNASet& b )
+{
+	return DNASet( a.set & b.set );
+}
+
+Set::Set( int startsz ) : sz(startsz), next(0)
+{
+	arr=new int[startsz];
+}
+
+Set::~Set()
+{
+	delete []arr;
+}
+
+Set& Set::operator-=( const int i )
+{
+        for( int j = 0; j < next; j++ ) {
+                if( arr[j] != i ) continue;
+
+                // arr[j] equals i
+                arr[j] = arr[--next];
+                arr[next] = 0;
+                break;
+        }
+        return *this;
+}
+
+void Set::Realloc( int newsz )
+{
+        if( newsz <= sz ) return;
+        int* newarr;
+		newarr=new int[newsz];
+        memset( newarr, 0x00, newsz*sizeof(int) );
+        for( int i = 0; i < sz; i++ )
+                newarr[i] = arr[i];
+        delete []arr;
+		sz = newsz;
+        arr = newarr;
+}
+
+
diff --git a/src/set.h b/src/set.h
new file mode 100644
index 0000000..e320970
--- /dev/null
+++ b/src/set.h
@@ -0,0 +1,145 @@
+// set.h
+// Copyright � 1998 by Paul O. Lewis
+// All rights reserved.
+//
+// This code may be used and modified for non-commercial purposes
+// but redistribution in any form requires written permission.
+// Please contact:
+//
+//   Paul O. Lewis, Assistant Professor
+//   167 Castetter Hall
+//   Department of Biology
+//   The University of New Mexico
+//   Albuquerque, NM 87131-1091
+//   Phone: (505) 277-6681
+//   Fax: (505) 277-0304
+//   email: lewisp at unm.edu
+//   http://biology.unm.edu/~lewisp/pol.html
+//
+// Note: moving January 1, 1999, to the Department of Ecology and
+// Evolutionary Biology, University of Connecticut
+//
+// Associated source code file: "set.cpp"
+//
+
+#ifndef __SET_H
+#define __SET_H
+
+#include <assert.h>
+
+// Note: the data type unsigned char and the macro MISSING_DATA
+// should be defined here the same way they are defined
+// in the file "datamatr.h"
+
+#define MISSING_DATA	(0xf)		
+
+class Set
+{
+        int sz;
+        int next;
+	int* arr;
+
+	void Realloc( int newsz );
+
+	public:
+		Set() : sz(0), arr(0), next(0) {}
+		Set( int startsz );
+		~Set();
+
+		int Size() const { return next; }
+		int Empty() const { return (sz==0); }
+
+		Set& operator+=( const int i );
+		Set& operator-=( const int i );
+		int operator[]( const int i ) const;
+};
+
+class DNASet
+{
+	int set;
+
+	public:
+		enum {
+			BASE_A = 0x01,
+			BASE_C = 0x02,
+			BASE_G = 0x04,
+			BASE_T = 0x08,
+			BASE_MISSING = 0x0f
+		};
+
+		DNASet() : set(0) {}
+		DNASet( int s ) : set(s) {}
+
+		int Empty() const { return (set==0); }
+		void Flush() { set = 0; }
+
+		DNASet& operator=( const DNASet& d )
+			{ set = d.set; return *this; }
+		DNASet& operator+=( const unsigned char i );
+		DNASet& operator-=( const unsigned char i );
+
+		// set intersection is mapped to the bitwise AND operator
+		DNASet& operator|=( DNASet& b );
+		friend DNASet operator|( DNASet& a, DNASet& b );
+
+		// set union is mapped to the bitwise OR operator
+		DNASet& operator&=( DNASet& b );
+		friend DNASet operator&( DNASet& a, DNASet& b );
+};
+
+inline Set& Set::operator+=( const int i )
+{
+	if( next == sz ) Realloc( sz + 5 );
+	arr[next++] = i;
+	return *this;
+}
+
+inline int Set::operator[]( const int i ) const
+{
+	assert( i >= 0 );
+	assert( i < next );
+	return arr[i];
+}
+
+inline DNASet& DNASet::operator+=( const unsigned char i )
+{
+	// Note: this function is designed to take values of type unsigned char
+	// see file datamatr.h before changing the relationship between
+	// bases and unsigned char values, specifically the function SequenceData::DatumToChar
+	//
+	// BUGBUG: unsigned char should be defined in its own header file along with
+	// the necessary conversion functions such as DatumToChar and CharToDatum
+	if( i == 0 )
+		set |= BASE_A;
+	else if( i == 1 )
+		set |= BASE_C;
+	else if( i == 2 )
+		set |= BASE_G;
+	else if( i == 3 )
+		set |= BASE_T;
+	else if( i == MISSING_DATA )
+		set |= BASE_MISSING;
+
+	return *this;
+}
+
+inline DNASet& DNASet::operator-=( const unsigned char i )
+{
+	// Note: this function is designed to take values of type unsigned char
+	// see file datamatr.h before changing the relationship between
+	// bases and unsigned char values, specifically the function SequenceData::DatumToChar
+	if( i == 0 )
+		set &= ~BASE_A;
+	else if( i == 1 )
+		set &= ~BASE_C;
+	else if( i == 2 )
+		set &= ~BASE_G;
+	else if( i == 3 )
+		set &= ~BASE_T;
+	else if( i == MISSING_DATA )
+		set &= ~BASE_MISSING;	// this does nothing, but is aesthetically pleasing!
+
+	return *this;
+}
+
+#endif
diff --git a/src/stopwatch.h b/src/stopwatch.h
new file mode 100644
index 0000000..c2e03e4
--- /dev/null
+++ b/src/stopwatch.h
@@ -0,0 +1,93 @@
+// GARLI version 2.0 source code
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#ifndef STOPWATCH_H
+#define STOPWATCH_H
+
+
+#ifndef UNIX
+#include <time.h>
+#else
+#include <sys/time.h>
+#endif
+
+class Stopwatch	{
+
+	public:
+	
+		Stopwatch()	{
+			Restart();
+			}
+	
+		#ifndef UNIX
+		void Restart()	{
+			time(&start_time);
+			}
+		void Start()	{
+			time(&start_time);
+			this_execution_start_time = start_time;
+			}		
+		int SplitTime()	{
+			time(&end_time);
+			return (int)(end_time - start_time);		
+			}
+		int ThisExecutionSplitTime()	{
+			time(&end_time);
+			return (int)(end_time - this_execution_start_time);		
+			}
+		//this is for restarting
+		void AddPreviousTime(time_t t){
+			start_time -= t;
+			}
+		#else		
+		void Restart()	{
+			gettimeofday(&start_time, NULL);
+			}
+		void Start()	{
+			gettimeofday(&start_time, NULL);
+			this_execution_start_time = start_time;
+			}		
+		int SplitTime()	{
+			gettimeofday(&end_time, NULL);
+			return end_time.tv_sec - start_time.tv_sec;
+			}
+		int ThisExecutionSplitTime()	{
+			gettimeofday(&end_time, NULL);
+			return end_time.tv_sec - this_execution_start_time.tv_sec;
+			}
+		//this is for restarting
+		void AddPreviousTime(int t){
+			start_time.tv_sec -= t;
+			}
+		#endif
+
+
+	private:
+		#ifndef UNIX
+		//these are with respect to the entire run, summing across any possible restarts from checkpoint
+		time_t start_time, end_time;
+		//this is the time at which the binary was most recently started, possibly as a restart from checkpoint
+		//this can be used to interpret stoptime as a time since invocation, rather than the total amount of time
+		//used by the search, summed across restarts
+		time_t this_execution_start_time;
+		#else
+		timeval start_time, restart_time, end_time;
+		timeval this_execution_start_time;
+		#endif
+
+};
+
+#endif
diff --git a/src/threaddcls.h b/src/threaddcls.h
new file mode 100644
index 0000000..ef50d74
--- /dev/null
+++ b/src/threaddcls.h
@@ -0,0 +1,43 @@
+#ifndef THREADDCLS_H
+#define THREADDCLS_H
+
+#include <pthread.h>
+
+class MasterGamlConfig;
+class Population;
+
+struct transferred_data_t	{
+	char *tree_strings;
+	unsigned int ts_size;
+	double *kappas;
+	unsigned int k_size;
+	double score;
+	int tag;
+};
+
+struct thread_arg_t	{
+	int nprocs;
+	MasterGamlConfig *conf;
+	Population *pop;
+};
+
+extern transferred_data_t *node_results;
+extern pthread_mutex_t lock_pm;
+extern pthread_mutex_t lock_pop;
+extern pthread_cond_t cond_pm;
+extern bool g_quit_time;
+extern bool g_processing_message;
+
+void *master_poller(void *varg);
+void *thread_func2(void *varg);
+void purge_results(transferred_data_t *r);
+void copy_results(transferred_data_t *lhs, transferred_data_t rhs);
+bool valid_results(transferred_data_t r);
+void send_quit_messages(int);
+int process_message(char *buf, int size, int who, int tag, thread_arg_t *targ);
+void DoMasterSM(char *buf, int size, int who, int tag, thread_arg_t *targ);
+void DoMasterAMR(char *buf, int size, int who, int tag, thread_arg_t *targ);
+
+int DoMasterSW(char *buf, int size, int who, int tag, thread_arg_t *targ);
+
+#endif
diff --git a/src/threadfunc.cpp b/src/threadfunc.cpp
new file mode 100644
index 0000000..d1cc8da
--- /dev/null
+++ b/src/threadfunc.cpp
@@ -0,0 +1,499 @@
+
+// GARLI version 0.94 source code
+// Copyright  2005 by Derrick J. Zwickl
+// All rights reserved.
+//
+// This code may be used and modified for non-commercial purposes
+// but redistribution in any form requires written permission.
+// Please contact:
+//
+//  Derrick Zwickl
+//	Integrative Biology, UT
+//	1 University Station, C0930
+//	Austin, TX  78712
+//  email: garli.support at gmail.com
+//
+//	Note: In 2006  moving to NESCENT (The National
+//	Evolutionary Synthesis Center) for a postdoc
+
+// all of the mpi related code appears here or in mpifuncs.cpp
+
+#ifdef MPI_VERSION
+
+#include "defs.h"
+#include "threaddcls.h"
+#include "mpifuncs.h"
+#include "individual.h"
+
+// local vars
+transferred_data_t *node_results;
+pthread_mutex_t lock_pm;
+pthread_mutex_t lock_pop;
+pthread_cond_t cond_pm;
+bool g_quit_time;
+bool g_processing_message;
+int remote_types[32];
+
+#define AMR  1
+#define SM   2
+#define SW	 3
+
+extern int calcCount;
+
+void *thread_func2(void *varg)	{
+	int who, size, tag, quits = 0;
+	thread_arg_t *targs = (thread_arg_t*)varg;
+	
+	MasterGamlConfig *conf = targs->conf;
+	char *buf;
+
+	bool poo=true;
+//	while(poo);
+	
+	//initialize the array that shows what type of remote each node is
+	int method = 0, nprocs = targs->nprocs;
+	
+	for(who=0;who<nprocs;who++){
+		//make all remotes SubtreeWorkers
+		remote_types[who]=SW;
+		
+		/*if (conf->gc.method == "sm" || (conf->gc.method == "hybrid" && who <= (int) (conf->gc.hybridpercent*(nprocs -1))))
+			remote_types[who]=SM;
+		else if (conf->gc.method == "amr" || (conf->gc.method == "hybrid" && who > conf->gc.hybridpercent*(nprocs -1)))
+			remote_types[who]=AMR;
+		else
+			debug_mpi("ERROR: can't determine method proper type of remote, remote #%d", who);
+		*/
+		}
+	timespec sleepTime;
+	sleepTime.tv_nsec=50000000;
+	sleepTime.tv_sec=0;
+	int nextStart=1, nextRemote;
+	int maxNumReceives=2, numReceives;
+	while (quits < targs->nprocs-1)	{
+		nextRemote=nextStart;
+		bool checkedAll=false, received=false;
+		do{
+			who=nextRemote;
+			received=RecvMPIMessage(&buf, &size, who, &tag, false);
+			if(received==true) assert(tag==TAG_TREE_STRINGS || tag==TAG_QUIT);
+			nextRemote=(nextRemote<(targs->nprocs-1) ? nextRemote+1 : 1);
+			if(nextRemote==nextStart) checkedAll=true;
+			}while(received==false && checkedAll==false);
+		nextStart=(nextStart<(targs->nprocs-1) ? nextStart+1 : 1);
+		if(checkedAll==true) nanosleep(&sleepTime, NULL);
+		if(received==true){
+			if (tag == TAG_QUIT){
+				++quits;
+				debug_mpi("received quit message from %d.  %d quits received.", who, quits);
+				}
+			else	{
+				pthread_mutex_lock(&lock_pm);
+					g_processing_message = true;
+				pthread_mutex_unlock(&lock_pm);
+			
+				pthread_mutex_lock(&lock_pop);
+					quits += process_message(buf, size, who, tag, targs);
+				pthread_mutex_unlock(&lock_pop);
+			
+//				if(numReceives == maxNumReceives){
+					pthread_mutex_lock(&lock_pm);
+						g_processing_message = false;
+						pthread_cond_signal(&cond_pm);
+					pthread_mutex_unlock(&lock_pm);
+//					numReceives=0;
+//					}
+//				else numReceives++;
+				}
+			delete []buf;
+			numReceives++;
+			}
+		
+		if(g_quit_time == true){
+			send_quit_messages(nprocs);
+			break;
+			}
+
+/*		if((checkedAll==true && g_processing_message==true) || (received==true && numReceives >=  maxNumReceives)){
+			pthread_mutex_lock(&lock_pm);
+				g_processing_message = false;
+				pthread_cond_signal(&cond_pm);
+			pthread_mutex_unlock(&lock_pm);
+			numReceives=0;
+			}*/
+//		else numReceives++;
+		}
+	debug_mpi("thread terminating");
+	g_quit_time = true;
+}
+
+void send_quit_messages(int np){
+	for(int i=1;i<np;i++){
+		SendMPIMessage(NULL, 0, i, TAG_QUIT);
+		}
+	}
+
+int process_message(char *buf, int size, int who, int tag, thread_arg_t *targ)	{
+	MasterGamlConfig *conf = targ->conf;
+	Population *pop = targ->pop;
+	int method = 0, nprocs = targ->nprocs;
+	int foundQuit=0;
+
+	if(remote_types[who]==SM) DoMasterSM(buf, size, who, tag, targ);
+	else if(remote_types[who]==AMR) DoMasterAMR(buf, size, who, tag, targ);
+
+	else if(remote_types[who]==SW) foundQuit=DoMasterSW(buf, size, who, tag, targ);
+
+	else debug_mpi("ERROR: can't determine method to use in process_message(), remote #%d", who);
+
+	return foundQuit;
+}
+
+void DoMasterSM(char *buf, int size, int who, int tag, thread_arg_t *targ)	{
+	MasterGamlConfig *conf = targ->conf;
+	Population *pop = targ->pop;
+	int count, start_shield, *which = new int;//[conf->gc.numshields];
+	char *tree_strings;
+	double *models;
+
+	assert(tag == TAG_TREE_STRINGS);
+	tree_strings = buf;
+	count = CountTreeStrings(tree_strings);
+	
+	RecvMPIMessage(&buf, &size, who, &tag, true);
+	assert(tag == TAG_MODEL);
+	models=(double*)buf;
+
+	// print some messages
+	debug_mpi("SYNCHRONOUS COMMUNICATION (%d, SM)", who);
+	debug_mpi("\trecv: %d tree strings", count);
+	debug_mpi("\trecv: %d models", count);
+	
+	bool poo=true;
+	//while(poo);
+	
+	*which = start_shield = pop->params->nindivs + (who-1);
+//	for (int i = 0; i < conf->gc.numshields; ++i)
+//		which[i] = start_shield++;
+	pop->ReplaceSpecifiedIndividuals(count, which, tree_strings, models);
+	pop->CalcAverageFitness();
+	
+	delete [] which;
+	//this will be deleted back where the initial call to RecvMPIMessage was made
+	//delete [] tree_strings;
+	delete [] (char*)models;
+	
+	//under certain conditions, tell the remote to become an AMR node
+	if(((double)rand()/RAND_MAX)<.002){
+		debug_mpi("sent message to change to AMR to remote %d", who);
+		SendMPIMessage(NULL, 0, who, TAG_REMOTE_TYPE_SWITCH);
+		//get rid of any SM messages that might be waiting
+		while(RecvMPIMessage(&buf, &size, who, &tag, false)==true);
+		//update the remote_types array
+		remote_types[who]=AMR;
+	}
+}
+
+void DoMasterAMR(char *buf, int size, int who, int tag, thread_arg_t *targ)	{
+	MasterGamlConfig *conf = targ->conf;
+	Population *pop = targ->pop;
+	int count, start_shield, which;
+	char *tree_strings, *model_buf;
+	double *models, score;
+
+	assert(tag == TAG_SCORE);
+	memcpy(&score, buf, sizeof(double));
+	//delete [] buf;
+
+	// print some messages
+	debug_mpi("SYNCHRONOUS COMM (%d, AMR, %f)", who, pop->bestFitness);
+	debug_mpi("\trecv: score %f", score);
+
+	if (score > pop->bestFitness)	{
+		SendMPIMessage(NULL, 0, who, TAG_TREE_STRINGS_REQUEST);
+		debug_mpi("\tsent: TAG_TREE_STRINGS_REQUEST");
+		RecvMPIMessage(&buf, &size, who, &tag, true);
+		assert(tag == TAG_TREE_STRINGS);
+		tree_strings = buf;
+		debug_mpi("\trecv: %d tree strings", CountTreeStrings(tree_strings));
+
+		RecvMPIMessage(&buf, &size, who, &tag, true);
+		assert(tag == TAG_MODEL);
+		models=(double*)buf;
+		
+		which = pop->total_size-1;
+		pop->ReplaceSpecifiedIndividuals(1, &which, tree_strings, models);
+		pop->CalcAverageFitness();
+		debug_mpi("score sent: %f, score calced: %f", score, pop->IndivFitness(which));
+		//assert(abs(score -  pop->IndivFitness(which))<.00001);
+		}
+	else	{
+		which = (int)pop->cumfit[pop->total_size-1][0];
+		pop->GetSpecifiedTreeStrings(&tree_strings, 1, &which);
+		int model_size=pop->GetSpecifiedModels(&models, 1, &which);
+
+		SendMPIMessage(tree_strings, strlen2(tree_strings)+2, who, TAG_TREE_STRINGS);
+		debug_mpi("\tsent: %d tree strings", CountTreeStrings(tree_strings));
+
+		model_buf = (char*)models;
+		SendMPIMessage(model_buf, sizeof(double)*model_size, who, TAG_MODEL);
+		debug_mpi("\tsent: %d models", 1);
+		}
+	delete [] tree_strings;
+	delete [] models;
+	}
+
+int DoMasterSW(char *buf, int size, int who, int tag, thread_arg_t *targ)	{
+	MasterGamlConfig *conf = targ->conf;
+	Population *pop = targ->pop;
+	int count, start_shield, *which = new int;//[conf->gc.numshields];
+	char *tree_strings, *model_buf;
+	char *out_tree_strings;
+	char *defbuf, *subbuf;
+	double *out_models;
+	double *models;
+	int remoteSubtreeDef, remoteSubtreeNode;
+	ParallelManager *paraMan=(pop->paraMan);
+
+//first get the tree and model from the remote and include it in
+//the master population.  If there are multiple messages, chuck 
+//earlier ones and just get the most recent
+	bool firstmessage=true;
+	do{
+		debug_mpi("Remote %d", who);
+		assert(tag == TAG_TREE_STRINGS || tag == TAG_QUIT);
+		if(tag==TAG_QUIT) return 1;
+		tree_strings = buf;
+		count = CountTreeStrings(tree_strings);
+		
+//		debug_mpi("about to get model strings...");
+
+		RecvMPIMessage(&buf, &size, who, &tag, true);
+		assert(tag == TAG_MODEL);
+		models=(double*)buf;
+		
+//		debug_mpi("about to get subdef strings...");
+
+		//determine what the remote was doing when it sent this tree
+		RecvMPIMessage(&defbuf, &size, who, &tag, true);
+		assert(tag==TAG_SUBTREE_ITERATION);
+		remoteSubtreeDef=atoi(defbuf);
+		
+		if(remoteSubtreeDef>0){
+			RecvMPIMessage(&subbuf, &size, who, &tag, true);
+			assert(tag==TAG_SUBTREE_DEFINE);
+			remoteSubtreeNode=atoi(subbuf);
+			if(remoteSubtreeDef==paraMan->subtreeDefNumber)
+				paraMan->localSubtreeAssign[who]=remoteSubtreeNode;
+			else paraMan->localSubtreeAssign[who]=0;
+			delete []subbuf;
+			}
+		//DJZ 5-18-05
+		else {
+			paraMan->localSubtreeAssign[who]=0;
+			remoteSubtreeNode=0;
+			}
+		
+		double score;
+		char *scoreBuf;
+		RecvMPIMessage(&scoreBuf, &size, who, &tag, true);
+		assert(tag==TAG_SCORE);
+		memcpy(&score, scoreBuf, sizeof(double));
+//		debug_mpi("recieved score of %f", score);
+		delete []scoreBuf;
+		
+		if(firstmessage==false) debug_mpi("\tfound another tree from remote %d", who);
+
+		*which = start_shield = pop->params->nindivs + (who-1);
+		pop->ReplaceSpecifiedIndividuals(count, which, tree_strings, models);
+	
+		pop->indiv[*which].SetFitness(score);
+		if(firstmessage==false) delete []tree_strings;
+		delete [](char*)models;
+		delete []defbuf;
+
+		firstmessage=false;
+		}while(RecvMPIMessage(&buf, &size, who, &tag, false)==true);
+	
+	bool subtreesCurrent = ((remoteSubtreeDef == paraMan->subtreeDefNumber) && remoteSubtreeDef > 0);
+	
+	if(paraMan->subtreeModeActive==false || subtreesCurrent==false){
+		pop->indiv[*which].accurateSubtrees=false;
+		pop->newindiv[*which].accurateSubtrees=false;
+		}
+	else {
+		pop->indiv[*which].accurateSubtrees=true;
+		pop->newindiv[*which].accurateSubtrees=true;
+		}
+
+//	debug_mpi("about to CalcFitness...");
+	double prevBestScore=pop->BestFitness();
+//	pop->indiv[*which].CalcFitness(0);
+	pop->indiv[*which].treeStruct->calcs=calcCount;
+	pop->CalcAverageFitness();
+
+	//reclaim clas if the new tree has essentially no chance of reproducing
+	if(((pop->indiv[*which].Fitness() - pop->indiv[pop->bestIndiv].Fitness()) < (-11.5/pop->params->selectionIntensity))){
+//		debug_mpi("about to reclaim...");
+		pop->indiv[*which].treeStruct->ReclaimUniqueClas();
+		}
+	
+
+	//Now, take a look at what we got from the remote and decide what to do
+	double inscore=pop->indiv[*which].Fitness();
+	double scorediff=prevBestScore - inscore;
+	debug_mpi("\tnew ind - def %d - node %d - lnL: %f", remoteSubtreeDef, remoteSubtreeNode, inscore);
+	if(scorediff < 0) debug_mpi("\tPrev Best=%f, diff=%f (new best)", prevBestScore, scorediff);
+	else debug_mpi("\tPrev Best=%f, diff=%f", prevBestScore, scorediff);
+//	debug_mpi("\tbest=%d, bestAc=%d, bestlnL=%f, bestAcclnL=%f", pop->bestIndiv, pop->bestAccurateIndiv, pop->BestFitness(), pop->indiv[pop->bestAccurateIndiv].Fitness());
+
+	
+	bool recalcSubtrees=false;
+	if(scorediff < -0.01){
+		pop->LogNewBestFromRemote(-scorediff, *which);
+		}
+
+	int subtreeNum;
+	bool send=false;
+	
+	//there are really 8 possible cases here
+	//1. Subtree mode active, 	got accurate tree,	score good -> do nothing
+	//2. 											score bad  -> send best accurate tree
+	//3. 						inaccurate tree,	score good -> recalc subtrees, send?
+	//4.											score bad  -> send best accurate tree
+	//5. Subtree mode inactive, got accurate tree, 	score good -> send best tree
+	//6.											score bad  -> send best tree
+	//7.						inaccurate tree, 	score good -> do nothing
+	//8.											score bad  -> send best tree
+	//so, 2 "do nothings" 3 "send best", 2 "send best accurate" and 1 "subtree recalc"
+	
+//if subtree mode isn't active, send the remote our best tree if the
+//tree we got from it is worse by some amount, or if it is still working
+//on a subtree
+	
+	double updateThresh=paraMan->updateThresh;
+	if(paraMan->subtreeModeActive==false){
+		if((paraMan->perturbModeActive==false && (scorediff > updateThresh || remoteSubtreeDef>0))/* || (paraMan->needToSend[who]==true)*/){
+			debug_mpi("\tupdate thresh = %f, send indiv", updateThresh);
+			//cases 5, 6 and 8
+			*which = (int)pop->cumfit[pop->total_size-1][0];
+			subtreeNum=0;
+			send=true;
+			}
+		else debug_mpi("\tupdate thresh = %f", updateThresh);
+		}
+		
+	else if(paraMan->subtreeModeActive==true){
+		//cases 1-4
+		if((scorediff > updateThresh) || (subtreesCurrent==false)/* || paraMan->perturb==true*/){
+			//cases 2 and 4.  send the best accurate tree
+			*which=pop->bestAccurateIndiv;	
+			if(paraMan->remoteSubtreeAssign[who] != 0) subtreeNum=paraMan->remoteSubtreeAssign[who];
+			else subtreeNum=paraMan->ChooseSubtree();
+			debug_mpi("\tsend best accurate ind, %f (best=%f)", pop->indiv[*which].Fitness(), pop->bestFitness);
+//			debug_mpi("\tperturb=%d, bestFit=%f, indFit=%f", paraMan->perturb, pop->bestFitness, pop->indiv[*which].Fitness());
+			send=true;
+			}
+		else if(recalcSubtrees==true && subtreesCurrent==false){
+			//case 3
+			//if the new inaccurate tree that came in is better than what we have,
+			//recalcuate the subtrees, and send the same tree back, but with a 
+			//subtree asignment
+			pop->StartSubtreeMode();
+			debug_mpi("Recalculating subtrees");
+			subtreeNum=paraMan->ChooseSubtree();
+			send=true;
+			}
+		}
+
+	if(paraMan->needToSend[who]){
+		char pertbuf[5];
+		int perttype = (pop->pertMan->pertType > 0 ? pop->pertMan->pertType : (int)(rnd.uniform() * 2 + 1));
+		sprintf(pertbuf, "%d", perttype);
+		SendMPIMessage(pertbuf, strlen(pertbuf)+2, who, TAG_PERTURB);
+		debug_mpi("sending pertub message to %d, type %d", who, perttype);
+		paraMan->needToSend[who]=false;
+		}
+
+
+	if(send==true){
+		pop->GetSpecifiedTreeStrings(&out_tree_strings, 1, which);
+		
+		assert(*out_tree_strings == '(');
+		int model_size=pop->GetSpecifiedModels(&out_models, 1, which);
+		
+		SendMPIMessage(out_tree_strings, strlen2(out_tree_strings)+2, who, TAG_TREE_STRINGS);
+		SendMPIMessage((char*)out_models, sizeof(double)*model_size, who, TAG_MODEL);
+
+/*		if(paraMan->needToSend[who]){
+			char pertbuf[5];
+			int perttype = (pop->pertMan->pertType > 0 ? pop->pertMan->pertType : (rnd.uniform() * 2 + 1));
+			sprintf(pertbuf, "%d", subtreeNum);
+			SendMPIMessage(NULL, 0, who, TAG_PERTURB);
+			debug_mpi("sending pertub message to %d, type %d", who, perttype);
+			paraMan->needToSend[who]=false;
+			}
+*/			
+//		else{
+			char stn[5];
+			sprintf(stn, "%d", subtreeNum);
+			SendMPIMessage(stn, strlen(stn)+2, who, TAG_SUBTREE_DEFINE);
+			debug_mpi("\tsent ind %d, lnL %f", *which, pop->indiv[*which].Fitness());
+
+			if(subtreeNum > 0){
+				//if this node was already assigned a subtree, be sure to subtract the old one from the assigned array
+				sprintf(stn, "%d", paraMan->subtreeDefNumber);
+				debug_mpi("\tsubdef %d, node %d", paraMan->subtreeDefNumber, subtreeNum);
+				SendMPIMessage(stn, strlen(stn)+2, who, TAG_SUBTREE_ITERATION);
+				}
+			
+//			}
+		paraMan->remoteSubtreeAssign[who]=subtreeNum;
+		
+		delete []out_models;
+		delete []out_tree_strings;		
+		}
+#ifndef NDEBUG
+	if(paraMan->subtreeModeActive && paraMan->subtreeDefNumber==remoteSubtreeDef){
+        //if we think that this remote gave us a tree with accurate subtrees, check
+        paraMan->CheckSubtreeAccuracy(pop->indiv[which[0]].treeStruct);
+		}
+#endif
+	
+	//the tree_strings that were passed in will be deleted back
+	//where the initial call to RecvMPIMessage was made
+	delete [] which;
+
+	pop->CalcAverageFitness();
+	return 0;
+}
+
+void purge_results(transferred_data_t *r)	{
+	if (r->tree_strings)
+		delete [] r->tree_strings;
+	if (r->kappas)
+		delete [] r->kappas;
+	memset(r, 0, sizeof(transferred_data_t));
+}
+
+void copy_results(transferred_data_t *lhs, transferred_data_t rhs)	{
+	memcpy(lhs, &rhs, sizeof(transferred_data_t));
+	if (rhs.tree_strings)	{
+		lhs->tree_strings = new char[rhs.ts_size];
+		memcpy(lhs->tree_strings, rhs.tree_strings, rhs.ts_size);
+	}
+	if (rhs.kappas)	{
+		lhs->kappas = new double[rhs.k_size/sizeof(double)];
+		memcpy(lhs->kappas, rhs.kappas, rhs.k_size);
+	}
+}
+
+bool valid_results(transferred_data_t r)	{
+	if (r.tree_strings && r.kappas)
+		return true;
+	if (r.tag == TAG_SCORE)
+		return true;
+	return false;
+}
+
+#endif
\ No newline at end of file
diff --git a/src/translatetable.cpp b/src/translatetable.cpp
new file mode 100644
index 0000000..7c2b964
--- /dev/null
+++ b/src/translatetable.cpp
@@ -0,0 +1,89 @@
+// GARLI version 2.0 source code
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "defs.h"
+#include "translatetable.h"
+#include "datamatr.h"
+#include "sequencedata.h"
+
+
+void TranslateTable::SetTaxonName( int i, const char* s ){
+	assert( Check(i-1) );
+	assert( nTax );
+	SetName(i-1, s);
+	}
+
+TranslateTable::TranslateTable( SequenceData* d ) : nTax(0){
+	assert( d );
+	nTax = d->NTax();
+	Alloc();
+	for( int i = 0; i < nTax; i++ )
+		SetTaxonName( i+1, d->TaxonLabel(i) );
+	}
+
+void TranslateTable::Alloc(){
+	assert( nTax );
+	MEM_NEW_ARRAY(taxonName,char*,nTax);
+	for( int i = 0; i < nTax; i++ )
+	taxonName[i] = 0;
+	}
+
+void TranslateTable::Destroy(){
+	for( int i = 0; i < nTax; i++ ) {
+		int nmlen = (int)strlen( taxonName[i] );
+		assert(nmlen > 0);
+		MEM_DELETE_ARRAY(taxonName[i]); // taxonName[i] has length nmlen+1
+		}
+	MEM_DELETE_ARRAY(taxonName); // taxonName has length nTax
+	taxonName = 0;
+	nTax = 0;
+	}
+
+void TranslateTable::SetName( int i, const char* s ){
+	assert(s);
+	int nmlen;
+	if( taxonName[i] ) {
+		nmlen = (int)strlen( taxonName[i] );
+		MEM_DELETE_ARRAY(taxonName[i]); // taxonName[i] has length nmlen+1
+		}
+	nmlen = (int)strlen(s);
+	MEM_NEW_ARRAY(taxonName[i],char,nmlen+1);
+	assert( taxonName[i] );
+	strcpy( taxonName[i], s );
+	}
+
+int TranslateTable::Find( const char* s ){
+	assert(s);
+	int taxonNumber = 0;
+	for( int i = 0; i < nTax; i++ ) {
+		if( strcmp( taxonName[i], s ) == 0 ) {
+			taxonNumber = i+1;
+			break;
+			}
+		}
+	return taxonNumber;
+	}
+
+ostream& operator<<( ostream& out, TranslateTable& tt ){
+	out << "translate" << endl;
+	for( int i = 0; i < tt.nTax-1; i++ ) {
+		out << "  " << (i+1) << ' ' << tt.taxonName[i] << ',' << endl;
+		}
+	out << "  " << tt.nTax << ' ' << tt.taxonName[tt.nTax-1] << endl;
+	out << "  ;" << endl;
+	return out;
+	}
diff --git a/src/translatetable.h b/src/translatetable.h
new file mode 100644
index 0000000..71b5642
--- /dev/null
+++ b/src/translatetable.h
@@ -0,0 +1,58 @@
+// GARLI version 2.0 source code
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+//	NOTE: Portions of this source adapted from GAML source, written by Paul O. Lewis
+
+#ifndef _TRANSTABLE
+#define _TRANSTABLE
+
+#include <cassert>
+#include <string>
+#include <cstring>
+#include <iostream>
+
+using namespace std;
+
+class  SequenceData;
+
+class TranslateTable
+{
+	int nTax;
+	char** taxonName;
+
+	int Check( int i )
+		{ return (i >= 0 && i<nTax ? 1 : 0 ); }
+	void Alloc();
+	void Destroy();
+	void SetName( int i, const char* s );
+
+	public:
+		TranslateTable( int n ) : nTax(n) { Alloc(); }
+		TranslateTable( SequenceData* d );
+		~TranslateTable() { Destroy(); }
+
+		void SetTaxonName( int i, const char* s );
+		char* GetTaxonName( int i )
+			{ assert( Check(i-1) ); return taxonName[i-1]; }
+		int GetNameLength( int i )
+			{ assert( Check(i-1) ); return (int)strlen( taxonName[i-1] ); }
+		int Find( const char* s );
+
+		friend ostream& operator<<( ostream& out, TranslateTable& tt );
+};
+#endif
+
diff --git a/src/tree.cpp b/src/tree.cpp
new file mode 100644
index 0000000..a3f9906
--- /dev/null
+++ b/src/tree.cpp
@@ -0,0 +1,8597 @@
+// GARLI version 2.1 source code
+// Copyright 2005-2014 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+//	NOTE: Portions of this source adapted from GAML source, written by Paul O. Lewis
+
+#include <algorithm>
+#include <vector>
+#include <list>
+#include <cassert>
+#ifdef UNIX
+	#include <sys/mman.h>
+#endif
+
+using namespace std;
+
+#include "defs.h"
+#include "sequencedata.h"
+#include "clamanager.h"
+#include "funcs.h"
+#include "stopwatch.h"
+#include "model.h"
+#include "tree.h"
+#include "reconnode.h"
+#include "garlireader.h"
+
+#include "utility.h"
+Profiler ProfIntInt   ("ClaIntInt     ");
+Profiler ProfIntTerm  ("ClaIntTerm    ");
+Profiler ProfTermTerm ("ClaTermTerm   ");
+Profiler ProfRescale  ("Rescale       ");
+Profiler ProfScoreInt ("ScoreInt      ");
+Profiler ProfScoreTerm("ScoreTerm     ");
+Profiler ProfEQVectors("EQVectors     ");
+
+extern bool swapBasedTerm;
+
+/*
+FLOAT_TYPE precalcThresh[30];
+FLOAT_TYPE precalcMult[30];
+int precalcIncr[30] = {1, 3, 5, 7, 10, 12, 14, 17, 19, 21, 24, 26, 28, 30, 33, 35, 37, 40, 42, 44, 47, 49, 51, 53, 56, 58, 60, 63, 65, 67};
+*/
+
+extern rng rnd;
+extern bool output_tree;
+extern bool uniqueSwapTried;
+
+#ifdef VARIABLE_OPTIMIZATION
+ofstream var("variable.log");
+ofstream uni("unique.log");
+#endif
+
+#ifdef OUTPUT_UNIQUE_TREES
+ofstream uni("unique.log");
+#endif
+
+//external global variables
+extern int calcCount;
+extern int optCalcs;
+extern ofstream opt;
+extern ofstream optsum;
+extern int memLevel;
+extern vector<DataSubsetInfo> dataSubInfo;
+//extern ModelSpecification modSpec;
+
+//Tree static definitions
+FLOAT_TYPE Tree::meanBrlenMuts;
+FLOAT_TYPE Tree::alpha;
+FLOAT_TYPE Tree::min_brlen;	  // branch lengths never below this value
+FLOAT_TYPE Tree::max_brlen;	  
+FLOAT_TYPE Tree::exp_starting_brlen;    // expected starting branch length
+ClaManager *Tree::claMan;
+list<TreeNode *> Tree::nodeOptVector;
+const DataPartition *Tree::dataPart;
+unsigned Tree::rescaleEvery;
+FLOAT_TYPE Tree::rescaleBelow;
+FLOAT_TYPE Tree::reduceRescaleBelow;
+FLOAT_TYPE Tree::bailOutBelow;
+FLOAT_TYPE Tree::treeRejectionThreshold;
+vector<Constraint> Tree::constraints;
+AttemptedSwapList Tree::attemptedSwaps;
+FLOAT_TYPE Tree::uniqueSwapBias;
+FLOAT_TYPE Tree::distanceSwapBias;
+FLOAT_TYPE Tree::expectedPrecision;
+bool Tree::rootWithDummy;
+bool Tree::dummyRootBranchMidpoint;
+bool Tree::someOrientedGap;
+bool Tree::useOptBoundedForBlen;
+
+FLOAT_TYPE Tree::uniqueSwapPrecalc[500];
+FLOAT_TYPE Tree::distanceSwapPrecalc[1000];
+
+FLOAT_TYPE Tree::rescalePrecalcThresh[RESCALE_ARRAY_LENGTH];
+FLOAT_TYPE Tree::rescalePrecalcMult[RESCALE_ARRAY_LENGTH];
+int Tree::rescalePrecalcIncr[RESCALE_ARRAY_LENGTH];
+
+Bipartition *Tree::outgroup = NULL;
+
+int Tree::siteToScore = -1;
+
+void InferStatesFromCla(char *states, FLOAT_TYPE *cla, int nchar);
+FLOAT_TYPE CalculateHammingDistance(const char *str1, const char *str2, int nchar);
+void SampleBranchLengthCurve(FLOAT_TYPE (*func)(TreeNode*, Tree*, FLOAT_TYPE, bool), TreeNode *thisnode, Tree *thistree);
+FLOAT_TYPE CalculatePDistance(const char *str1, const char *str2, int nchar);
+inline FLOAT_TYPE CallBranchLike(TreeNode *thisnode, Tree *thistree, FLOAT_TYPE blen, bool brak);
+
+//basic function to deal with the odd data string format that I use for nuc data
+const char *AdvanceDataPointer(const char *arr, int num){
+	for(int a=0;a<num;a++){
+		if(*arr > -1 || *arr == -4) arr++;
+		else{
+			int states = -1 * *arr;
+			do{
+				arr++;
+				}while (states-- > 0);
+			}
+		}
+	return arr;
+	}
+
+void Tree::SetTreeStatics(ClaManager *claMan, const DataPartition *data, const GeneralGamlConfig *conf){
+	Tree::claMan=claMan;
+	Tree::dataPart=data;
+#ifdef SINGLE_PRECISION_FLOATS
+	Tree::rescaleEvery = 6;
+	Tree::rescaleBelow = exp(-1.0f); //this is 0.368
+	Tree::reduceRescaleBelow = 1.0e-30; 
+	Tree::bailOutBelow = 1.0e-30; 
+	FLOAT_TYPE maxMult = 1.0 / bailOutBelow;
+	for(int i=0;i<30;i++){
+		Tree::rescalePrecalcIncr[i] = i*3 - (int) log(rescaleBelow);
+		Tree::rescalePrecalcThresh[i] = exp((FLOAT_TYPE)(-rescalePrecalcIncr[i]));
+		Tree::rescalePrecalcMult[i] =  min(exp((FLOAT_TYPE)(rescalePrecalcIncr[i])), maxMult);
+		}
+		
+	FLOAT_TYPE minVal = 1.0e-10f;
+	FLOAT_TYPE maxVal = 1.0e10f;
+#else
+	Tree::rescaleEvery=16;
+	Tree::rescaleBelow = exp(-24.0); //this is 1.026e-10
+	Tree::reduceRescaleBelow = 1.0e-190; 
+	Tree::bailOutBelow = 1.0e-250;
+	FLOAT_TYPE maxMult = 1.0 / bailOutBelow;
+	for(int i=0;i<RESCALE_ARRAY_LENGTH;i++){
+		Tree::rescalePrecalcIncr[i] = i*7 - (int) log(rescaleBelow);
+		Tree::rescalePrecalcThresh[i] = exp((FLOAT_TYPE)(-rescalePrecalcIncr[i]));
+		Tree::rescalePrecalcMult[i] =  min(exp((FLOAT_TYPE)(rescalePrecalcIncr[i])), maxMult);
+		}	
+		
+	FLOAT_TYPE minVal = 1.0e-20;
+	FLOAT_TYPE maxVal = 1.0e20;
+#endif
+	Tree::uniqueSwapBias = conf->uniqueSwapBias;
+	Tree::distanceSwapBias = conf->distanceSwapBias;
+	for(int i=0;i<500;i++){
+		Tree::uniqueSwapPrecalc[i] = (FLOAT_TYPE) pow(Tree::uniqueSwapBias, i);
+		//if(Tree::uniqueSwapPrecalc[i] != Tree::uniqueSwapPrecalc[i]) Tree::uniqueSwapPrecalc[i]=0.0f;
+		if(Tree::uniqueSwapPrecalc[i] < minVal) Tree::uniqueSwapPrecalc[i] = minVal;
+		if(Tree::uniqueSwapPrecalc[i] > maxVal) Tree::uniqueSwapPrecalc[i] = maxVal;
+		}
+	for(int i=0;i<1000;i++){
+		Tree::distanceSwapPrecalc[i] = (FLOAT_TYPE) pow(Tree::distanceSwapBias, i);
+		//if(Tree::distanceSwapPrecalc[i] != Tree::distanceSwapPrecalc[i]) Tree::distanceSwapPrecalc[i]=0.0f;	
+		if(Tree::distanceSwapPrecalc[i] < minVal) Tree::distanceSwapPrecalc[i] = minVal;	
+		if(Tree::distanceSwapPrecalc[i] > maxVal) Tree::distanceSwapPrecalc[i] = maxVal;	
+		}
+
+	Tree::meanBrlenMuts	= conf->meanBrlenMuts;
+	Tree::alpha		= conf->gammaShapeBrlen;
+	Tree::treeRejectionThreshold = conf->treeRejectionThreshold;
+	Tree::min_brlen = conf->minBrlen;
+	Tree::max_brlen = conf->maxBrlen;
+	Tree::exp_starting_brlen = conf->startingBrlen;
+	
+	Tree::someOrientedGap = false;
+	for(vector<DataSubsetInfo>::iterator it = dataSubInfo.begin();it != dataSubInfo.end();it++){
+		if((*it).readAs == DataSubsetInfo::ORIENTEDGAP)
+			Tree::someOrientedGap = true;
+		}
+
+
+	string outString = conf->outgroupString;
+
+	if(someOrientedGap){
+		//Tree::rescaleEvery = 2;
+		Tree::rootWithDummy = true;
+		Tree::useOptBoundedForBlen = true;
+		Tree::dummyRootBranchMidpoint = conf->rootAtBranchMidpoint;
+		//set the dummy taxon as the effective outgroup
+		if(conf->outgroupString.length() > 0)
+			outman.UserMessage("WARNING - specified outgroup (%s) being ignored due to inference of a rooted true", conf->outgroupString.c_str());
+			
+		char num[10];
+		sprintf(num, "%d", data->NTax());
+		outString = num;
+		GarliReader &reader = GarliReader::GetInstance();
+		NxsTaxaBlock *tax = reader.GetTaxaBlock(0);
+		if(!tax->IsAlreadyDefined("ROOT")){
+			string n = "ROOT";
+			tax->AppendNewLabel(n);
+			}
+		}
+	else{
+		Tree::rootWithDummy = false;
+		Tree::useOptBoundedForBlen = conf->useOptBoundedForBlen;
+		}
+
+	//deal with the outgroup specification, if there is one
+	if(outString.length() > 0){
+		if(outgroup) outgroup->ClearBipartition();
+		else outgroup = new Bipartition();
+
+		GarliReader &reader = GarliReader::GetInstance();
+		if(reader.GetTaxaBlock(0)->GetNTax() > 0){
+			//now using NCL to much more rigorously and flexibly read the outgroup specification
+			NxsString tax(outString.c_str());
+			tax += ";";
+			std::istringstream s(tax);
+			NxsToken tok(s);
+			tok.GetNextToken();
+			NxsUnsignedSet iset;
+			try{
+				NxsSetReader::ReadSetDefinition(tok, *reader.GetTaxaBlock(0), "outgroup", "GARLI configuration", &iset);
+				if(!rootWithDummy)
+					outman.UserMessage("Found outgroup specification: %s", NxsSetReader::GetSetAsNexusString(iset).c_str());
+				}
+			catch (const NxsException & x){
+				throw ErrorException("%s", x.msg.c_str());
+				}
+
+			//the set has been read as indeces, so change to taxon numbers before passing to the bipart func
+			NxsUnsignedSet nset;
+			for(NxsUnsignedSet::const_iterator it = iset.begin();it != iset.end(); it++)
+				nset.insert(*it + 1);
+
+			outgroup->BipartFromNodenums(nset);
+			}
+		else{//the old half-assed outgroup reader
+			vector<int> nums;
+			unsigned pos1=0, pos2;
+			while(pos1 < outString.size()){
+				pos2 = outString.find(" ", pos1+1);
+				string tax = outString.substr(pos1, pos2 - pos1);
+				tax = NxsString::strip_whitespace(tax);
+				for(string::iterator it = tax.begin();it != tax.end();it++)
+					if(isdigit(*it) == false)
+						throw ErrorException("problem in outgroup specification.\nExpecting taxon numbers separated by spaces, found %s.", tax.c_str());
+				nums.push_back(atoi(tax.c_str()));
+				pos1 = pos2;
+				}
+			outman.UserMessageNoCR("Found outgroup specification: ");
+			for(vector<int>::iterator it = nums.begin();it != nums.end();it++)
+				outman.UserMessageNoCR("%d ", *it);
+			outman.UserMessage("\n");
+			outgroup->BipartFromNodenums(nums);
+			}
+		outman.UserMessage("\n#######################################################");
+		}
+	}
+		
+//this assumes that a tree string has been passed in with *s pointing to the first char of a blen
+//description, and reads and advances the string up to the next non-blen character.  The string that
+//was interpreted as the branch length is placed into the NxsString passed in
+double ReadBranchlength(const char *&s, NxsString &blen){
+	blen = "";
+	while(*(s+1) && *(s+1)!=')'&& *(s+1)!=',' && *(s+1)!=';'){
+		blen += *(s+1);
+		s++;
+		}
+	s++;
+	double len;
+	if(NxsString::to_double(blen.c_str(), &len) == false)
+		throw ErrorException("Problem reading tree description.  Illegal branch-length specification: \"%s\"", blen.c_str());
+	return len;
+	}
+
+//DJZ 4-28-04
+//adding the ability to read in treestrings in which the internal node numbers are specified.  I'd like to make the
+//internal numbers be specified the way that internal node labels are according to the newick format, ie directly after
+//the closing paren that represents the internal node.  But, that makes going from string -> tree annoying
+//because by the time the internal node number would be read the treeNode structure would have already been created.
+//So, the internal node numbers will go just BEFORE the opening paren that represents that node
+//Example:  50(1:.05, 2:.02):.1 signifies a node numbered 50 that is ancestral to 1 and 2.
+Tree::Tree(const char* s, bool numericalTaxa, bool allowPolytomies /*=false*/, bool allowMissingTaxa /*=false*/){
+	//if we are using this constructor, we can't guarantee that the tree will be specified unrooted (with 
+	//a trifurcating root), so use an allocation function that is guaranteed to have enough room and then
+	//trifurcate and delete if necessary
+	
+	//this should strip out any crap in the tree string, although much of it would be disregarded below anyway
+	string editedString = NxsString::strip_whitespace(s);
+	s = editedString.c_str();
+	
+	AllocateTree(true);
+	TreeNode *temp=root;
+	root->attached=true;
+	int current=numTipsTotal+1;
+	bool cont=false;
+	numBranchesAdded = 0;
+	while(*s){
+		cont = false;
+
+		if(*s == ';')
+			break;  // ignore semicolons
+		else if(*s == ' ' || *s == '\t')
+			s++;
+			//DEBUG
+			//break;  // ignore spaces
+		else if(*s == ')'){
+			//we're closing a paren, moving a node toward the root
+			assert(temp->anc);
+			if(!temp->anc) throw ErrorException("Problem reading tree description.  Mismatched parentheses?");
+			temp=temp->anc;
+			s++;
+			//while(*s && !isgraph(*s))
+			//an internal node label might appear here, so ignore anything up to one of these valid next characters
+			while(*s && (*s != ',') && (*s != ':') && (*s != ',') && (*s != ')') && (*s != ';'))
+						s++;
+			if(*s==':'){//adding a branch length
+				NxsString len;
+				temp->dlen = ReadBranchlength(s, len);
+				if(temp->dlen < min_brlen){
+					outman.UserMessage("->Branch of length %s is less than min of %.1e.  Setting to min.", len.c_str(), min_brlen);
+					temp->dlen = min_brlen;
+					}
+				else if (temp->dlen > max_brlen){
+					outman.UserMessage("->Branch of length %s is greater than max of %.0f.  Setting to max.", len.c_str(), max_brlen);
+					temp->dlen = max_brlen;
+					}
+				}
+			else if(*s==','||*s==')'){
+				temp->dlen=Tree::exp_starting_brlen;
+#ifdef STOCHASTIC_STARTING_BLENS
+				temp->dlen *= rnd.gamma(1.0);
+#endif
+				}
+			else
+				{
+				if(*s==';'){
+					s++;
+					while(*s){
+						if(*s != ' ' && *s != '\t')
+							outman.UserMessage("Warning: extraneous character (%c) found after ; in tree description", *s);
+						s++;
+						}
+					break;
+					}
+				else if(*s == ' ' || *s == '\t') s++;
+				else if(*s == '\0' || *s == '\n' || *s == '\r') break;
+				else throw ErrorException("Unexpected character found in tree description at this point: %s", s);
+	//			assert(!*s  || *s==';');
+				}
+			}
+		else if(*s == ','){
+			assert(temp->anc);
+			if(!temp->anc) throw ErrorException("Problem reading tree description.  Mismatched parentheses?");
+			temp=temp->anc;
+			if(*(s+1)!='(') {
+				s++;
+			}
+			cont = true;
+			}
+		if(*s == '(' || isdigit(*s) || cont==true){
+			//here we're about to add a node of some sort
+			if(*(s+1)=='('){//add an internal node
+				if(current >= numNodesTotal)
+					throw ErrorException("Problem reading tree description.  Extra taxa?");
+				temp=temp->AddDes(allNodes[current++]);
+				numBranchesAdded++;
+				numNodesAdded++;
+				s++;
+				}
+			else{
+				//this gets ugly.  At this point we could be adding an internal node with the internal node
+				//num specifed, or a terminal node.  Either way the next characters in the string will be
+				//digits.  We'll have to look ahead to see what the next non-digit character is.  If it's
+				//a '(', we know we are adding a prenumbered internal
+				if(*s=='(') {
+					s++;
+					}
+				int i=0;
+				bool term=true;
+				while(isdigit(*(s+i))) 
+					i++;
+				if(*(s+i) == '(') 
+					term=false;
+				
+				//add an internal node with the nodenum specified in the string - this is my non-standard hack
+				if(term == false){
+					NxsString num;
+					num = *s;
+					while(isdigit(*(s+1))){
+						assert(*s);
+						num += *++s;
+						}
+					int internalnodeNum = atoi( num.c_str() );
+	                temp=temp->AddDes(allNodes[internalnodeNum]);
+	               	numBranchesAdded++;
+					numNodesAdded++;
+	                s++;							
+					}
+				else{//add a terminal node
+					// read taxon name
+					NxsString name;
+					name = *s;
+					int taxonnodeNum;
+					if(numericalTaxa==true){
+						while(isdigit(*(s+1))){
+							assert(*s);
+							name += *++s;
+							}						
+						taxonnodeNum = atoi( name.c_str() );
+						if(taxonnodeNum == 0) throw ErrorException("Unexpected character(s) found in tree description \"%s!\"", name.c_str());
+						if(taxonnodeNum > numTipsTotal) throw ErrorException("Taxon number in tree description (%d) is greater than\n\tnumber of taxa in dataset!", taxonnodeNum);
+						}
+					else{
+						while(*(s+1) != ':' && *(s+1) != ',' && *(s+1) != ')'){
+							assert(*s);
+							name += *++s;
+							}
+						//This is a bit annoying.  If the tree string came directly from NCL then GetEscaped should get any
+						//names to match the names present in the datamatrix (whether Nexus or not).  But, if the tree string
+						//came from a start file with just a newick string there are various possibilities.  First try interpreting
+						//the name as-is.  If that doesn't work, try GetEscaped.  If that doesn't work, try removing quotes (if any)
+						//before calling GetEscaped
+						taxonnodeNum = dataPart->TaxonNameToNumber(name);
+						if(taxonnodeNum < 0){
+							NxsString esc = NxsString::GetEscaped(name).c_str();
+							taxonnodeNum = dataPart->TaxonNameToNumber(esc);
+							}
+						if(taxonnodeNum < 0){
+							if(name.c_str()[0] == '\'' && name.c_str()[name.size()-1] == '\''){
+								NxsString esc2;
+								for(int c=1;c<name.size()-1;c++){
+									esc2 += name[c];
+									}
+								NxsString esc = NxsString::GetEscaped(esc2).c_str();
+								taxonnodeNum = dataPart->TaxonNameToNumber(esc);
+								}
+						}
+						if(taxonnodeNum < 0){
+							throw ErrorException("Unknown taxon \"%s\" encountered in tree description!\nIf you have spaces in your taxon names, try replacing them with underscores.", name.c_str());
+							}
+						}
+					if(allNodes[taxonnodeNum]->attached == true)
+						throw ErrorException("Taxon \"%s\" seems to appear in the tree description twice!\nCheck the tree string.", name.c_str());
+					else{
+						temp=temp->AddDes(allNodes[taxonnodeNum]);
+						numBranchesAdded++;
+						numNodesAdded++;
+						numTipsAdded++;
+						}
+	                s++;
+					while(*s == ' ' || *s == '\t') s++;;//eat any spaces here
+					
+					if(*s!=':' && *s!=',' && *s!=')'){
+						throw ErrorException("Problem parsing tree string!  Expecting \":\" or \",\" or \")\", found %c", *s);
+						s--;	
+						ofstream str("treestring.log", ios::app);
+						str << s << endl;
+						str.close();
+						assert(0);
+						}
+						
+	                if(*s==':'){
+						NxsString len;
+						temp->dlen = ReadBranchlength(s, len);
+						if(temp->dlen < min_brlen){
+							outman.UserMessage("->Branch of length %s is less than min of %.1e.  Setting to min.", len.c_str(), min_brlen);
+							temp->dlen = min_brlen;
+							}
+						else if (temp->dlen > max_brlen){
+							outman.UserMessage("->Branch of length %s is greater than max of %.0f.  Setting to max.", len.c_str(), max_brlen);
+							temp->dlen = max_brlen;
+							}
+						}
+					else{
+						temp->dlen = Tree::exp_starting_brlen;
+#ifdef STOCHASTIC_STARTING_BLENS
+						temp->dlen *= rnd.gamma(1.0);
+#endif
+						}
+					}
+				}
+			}
+		}
+	//See if the fake ROOT taxon is in the tree, and place it if necessary. Note that the extra tip is 
+	//allNodes[numTipsTotal] (and numNodesTotal includes that extra tip) because allNodes[0] is the root, but 
+	//the extra connector is allNodes[numNodesTotal - 1], i.e., the last node allocated.  Note that during the run the dummy root 
+	//will always be the same node, but its anc (the dummy connector) won't be
+	if(rootWithDummy){
+		assert(dummyRoot);
+		SetBranchLength(dummyRoot, 0.01);
+		if(root->left->next == root->right){
+			//if the root only has two descendents (i.e., it is a rooted tree) then add the dummy root there
+			//there will be no connector, and all connectors should already have been used.
+			assert(numNodesAdded == numNodesTotal - 2);
+			root->AddDes(dummyRoot);
+			numBranchesAdded++;
+			numNodesAdded++;
+			numTipsAdded++;
+			}
+		//else if(numNodesAdded == numNodesTotal - 3){
+		else if( dummyRoot->attached == false ){
+			//tree didn't have dummy in it, nor was it rooted.  Toss in anywhere
+			//(numNodesTotal - 1) is the "extra" node allocated for possibly unrooted
+			//trees, which will be elminated below
+			int connector = numNodesTotal - 2;
+			assert(allNodes[connector]->attached == false);
+            if(constraints.size() == 0)
+			RandomlyAttachTip(numTipsTotal, connector);
+            else{
+                Bipartition mask;
+                vector<int> n;
+                for(int tax = 1;tax < numTipsTotal;tax++)
+                    n.push_back(tax);
+                mask.BipartFromNodenums(n);
+
+                RandomlyAttachTipWithConstraints(numTipsTotal, connector, &mask );
+                }
+			}
+		else//the input tree must have had the dummy in it already
+			assert(dummyRoot->attached == true);
+
+		if(dummyRootBranchMidpoint)
+			MoveDummyRootToBranchMidpoint();
+		}
+
+	if(root->left->next==root->right){
+		MakeTrifurcatingRoot(true, false);	
+		}
+	else	{
+		EliminateNode(2*dataPart->NTax()-2);
+		}
+	assert(root->left->next!=root->right);
+
+	if((allowMissingTaxa == false) && (numTipsAdded != numTipsTotal) && !rootWithDummy) 
+		throw ErrorException("Number of taxa in tree description (%d) not equal to number of taxa in dataset (%d)!", numTipsAdded, numTipsTotal);
+
+	root->CheckforLeftandRight();
+	if(allowPolytomies == false) root->CheckforPolytomies();
+	root->CheckTreeFormation();
+	bipartCond = DIRTY;
+	assert(numBranchesAdded == numNodesAdded - 1);
+	if(!allowMissingTaxa)
+		assert(numTipsAdded == numTipsTotal);
+	if(!allowPolytomies)
+		assert(numNodesAdded == numNodesTotal);
+	}  
+
+Tree::Tree(){
+	AllocateTree(false);
+	}
+
+//we might want the extra node here if we are reading in a user tree that could be rooted (with a basal bifurcation rather than trifurcation)
+//the standard Tree() constructor used to be hard coded to take care of the withExtraNode = no case, while AllocateTree did yes.  Otherwise
+//they were almost identical, so have been combined
+void Tree::AllocateTree(bool withExtraNode){
+	if(withExtraNode)
+		numNodesTotal = 2*dataPart->NTax()-1;
+	else 
+		numNodesTotal = 2*dataPart->NTax()-2;
+
+	allNodes=new TreeNode*[numNodesTotal];
+	for(int i=0;i<numNodesTotal;i++){
+		allNodes[i]=new TreeNode(i);
+		allNodes[i]->bipart=new Bipartition();
+		}
+	root=allNodes[0];
+	root->attached=true;
+
+	//PARTITION
+	modPart = NULL;
+
+	AssignDataToTips();
+	
+	numTipsAdded=0;
+	numNodesAdded=1;//root
+	numTipsTotal=dataPart->NTax();
+	lnL=0.0;
+
+	if(rootWithDummy)
+		dummyRoot = allNodes[numTipsTotal];
+	else
+		dummyRoot = NULL;
+
+	calcs=0;
+	sitelikeLevel = 0;
+	numBranchesAdded=0;
+	taxtags=new int[numTipsTotal+1];
+	bipartCond = DIRTY;
+
+#ifdef EQUIV_CALCS
+	//need to do the root too, since that node is sometimes stolen
+	allNodes[0]->tipData = new char[dataPart->NChar()];
+	for(int i=dataPart->NTax()+1;i<numNodesTotal;i++){
+		allNodes[i]->tipData = new char[data->NChar()];
+		}
+	dirtyEQ=true;
+#endif
+	}
+
+void Tree::AssignDataToTips(){
+	//TODO FOR MIXING - this assumes that 1 data subset = one cla
+	for(int c = 0;c < claSpecs.size();c++){
+		SequenceData *curData = dataPart->GetSubset(c);
+		for(int t=1;t<=dataPart->NTax();t++){
+			//if(isNucleotide){
+			if(modSpecSet.GetModSpec(claSpecs[c].modelIndex)->IsNucleotide()){
+				//allNodes[t]->tipData=static_cast<const NucleotideData *>(curData)->GetAmbigString(t-1);
+				allNodes[t]->tipData.push_back(static_cast<const NucleotideData *>(curData)->GetAmbigString(t-1));
+#ifdef OPEN_MP
+				//allNodes[t]->ambigMap=static_cast<const NucleotideData *>(curData)->GetAmbigToCharMap(t-1);
+				allNodes[t]->ambigMap.push_back(static_cast<const NucleotideData *>(curData)->GetAmbigToCharMap(t-1));
+#endif
+				}
+			else{
+				//allNodes[t]->tipData=(char *)(curData)->GetRow(t-1);
+				allNodes[t]->tipData.push_back((char *)(curData)->GetRow(t-1));
+	#ifdef OPEN_MP
+				//even though there is no ambig map for non-nuc data, we need to put a dummy into the vector
+				//so that the data index matches up with the correct element in the vector
+				allNodes[t]->ambigMap.push_back(NULL);
+	#endif
+				}
+			}
+		}
+	#ifdef OPEN_MP
+	assert(allNodes[1]->ambigMap.size() == claSpecs.size());
+	#endif
+	}
+
+Tree::~Tree(){
+	if(taxtags!=NULL) delete []taxtags;
+	if(allNodes!=NULL){
+		for(int x=0; x<numNodesTotal; x++){
+			delete *(allNodes+x);
+			}
+		delete []allNodes;
+		}
+	}
+
+int Tree::BrlenMutate(){
+	//random_binomial is now called with the mean number of blen muts, which is easiser to specify across datasets
+	//than is a per branch probability
+	int numBrlenMuts;
+	if(rnd.uniform() < 0.05){//do a whole tree rescale occasionally
+		ScaleWholeTree();
+		numBrlenMuts = numNodesTotal - 1;
+		}
+	else{
+		do{
+			numBrlenMuts=rnd.random_binomial(numNodesTotal-1, meanBrlenMuts);
+			}while(numBrlenMuts==0);
+		for(int i=0;i<numBrlenMuts;i++){
+			int branch=GetRandomNonRootNode();
+			allNodes[branch]->dlen*=rnd.gamma( Tree::alpha );
+			allNodes[branch]->dlen = (allNodes[branch]->dlen > min_brlen ? (allNodes[branch]->dlen < max_brlen ? allNodes[branch]->dlen : max_brlen) : min_brlen);
+			
+			SweepDirtynessOverTree(allNodes[branch]);
+			}
+		}
+	return numBrlenMuts;
+	}
+
+void Tree::PerturbAllBranches(){
+	for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+		allNodes[i]->dlen*=rnd.gamma(100);
+		}
+	MakeAllNodesDirty();
+	}
+
+void Tree::RandomizeBranchLengths(FLOAT_TYPE lowLimit, FLOAT_TYPE highLimit){
+	FLOAT_TYPE range = (highLimit - lowLimit);
+	for(int i=1;i<numNodesTotal;i++){
+		allNodes[i]->dlen = lowLimit + (rnd.uniform() * range);
+		}
+	MakeAllNodesDirty();
+	}
+
+void Tree::RandomizeBranchLengthsExponential(FLOAT_TYPE lambda){
+
+	for(int i=1;i<numNodesTotal;i++){
+		allNodes[i]->dlen = rnd.exponential(lambda);
+		}
+/*
+	FLOAT_TYPE low = log(lowLimit);
+	FLOAT_TYPE high = log(highLimit);
+	FLOAT_TYPE range = high - low;
+	for(int i=1;i<numNodesTotal;i++){
+		allNodes[i]->dlen = exp(low + rnd.uniform() * range);
+		}
+*/
+	MakeAllNodesDirty();
+	}
+
+void Tree::ScaleWholeTree(FLOAT_TYPE factor/*=-1.0*/){
+	if(factor==-1.0) factor = rnd.gamma( Tree::alpha );
+	//9-12-06 Stupid!  Why the hell was this only scaling the internals?
+	//for(int i=numTipsTotal;i<numNodesTotal;i++){
+	for(int i=1;i<numNodesTotal;i++){
+		allNodes[i]->dlen*=factor;
+		allNodes[i]->dlen = (allNodes[i]->dlen > min_brlen ? (allNodes[i]->dlen < max_brlen ? allNodes[i]->dlen : max_brlen) : min_brlen);
+		assert(!(allNodes[i]->dlen < min_brlen));
+		}
+	MakeAllNodesDirty();
+	lnL=-ONE_POINT_ZERO;
+	}
+
+//this returns the average tree length for the whole dataset, and might need to be scaled for a given subset if SSR is being used
+FLOAT_TYPE Tree::Treelength(){
+	FLOAT_TYPE tot = 0.0;
+	for(int i=1;i<numNodesTotal;i++){
+		if(allNodes[i] != dummyRoot) 
+			tot += allNodes[i]->dlen;
+		}
+	return tot;
+	}
+
+int Tree::BrlenMutateSubset(vector<int> const &subtreeMemberNodes){
+	int numBrlenMuts;
+	do{
+		numBrlenMuts=rnd.random_binomial((int)subtreeMemberNodes.size(), meanBrlenMuts);
+		}while(numBrlenMuts==0);
+	for(int i=0;i<numBrlenMuts;i++){
+		int branch=subtreeMemberNodes[(int)(rnd.uniform()*subtreeMemberNodes.size())];//can't mutate the root
+		allNodes[branch]->dlen*=rnd.gamma( Tree::alpha );
+		SweepDirtynessOverTree(allNodes[branch]);
+		allNodes[branch]->dlen = (allNodes[branch]->dlen > min_brlen ? (allNodes[branch]->dlen < max_brlen ? allNodes[branch]->dlen : max_brlen) : min_brlen);
+		}	
+	return numBrlenMuts;
+	}
+
+void Tree::MakeTrifurcatingRoot(bool reducenodes, bool clasAssigned ){
+	//reducenodes should only =1 if this function is called after generating a random tree
+	//or after reading in a tree with a bifurcating root.  DO NOT call with reducenodes=1 if
+	//this is being used after one of the initial root branches was pruned off
+
+	//clasAssigned should be true if the clas have been assigned to the nodes by the claManager.
+	//(ie, not right after tree creation)
+	TreeNode *t1, *removedNode;
+	vector<TreeNode *> rootDesc;
+	assert(root->left->next==root->right);
+
+	if(root->left->IsInternal()){
+		removedNode = root->left;
+		root->right->dlen += removedNode->dlen;
+		rootDesc.push_back(root->right);
+		}
+	else{
+		removedNode = root->right;
+		root->left->dlen += removedNode->dlen;
+		rootDesc.push_back(root->left);
+		}
+	if(clasAssigned){
+		removedNode->claIndexDown=claMan->SetDirty(removedNode->claIndexDown);
+		removedNode->claIndexUL=claMan->SetDirty(removedNode->claIndexUL);
+		removedNode->claIndexUR=claMan->SetDirty(removedNode->claIndexUR);			
+		}
+	t1 = removedNode->left;
+	while(t1){
+		rootDesc.push_back(t1);
+		t1 = t1->next;
+		}
+	//now we have all of the new desc of the root
+	//disconnect the old ones
+	root->left = root->right = NULL;
+	for(unsigned t=0;t<rootDesc.size();t++)
+		root->AddDes(rootDesc[t]);
+
+/*
+	if(root->left->IsInternal()){
+		removedNode=root->left;
+		t1=root->left->left;
+		t2=root->left->right;
+		l=root->left->dlen;
+		root->right->dlen+=l;
+		root->left->attached=false;
+		if(clasAssigned){
+			root->left->claIndexDown=claMan->SetDirty(root->left->claIndexDown);
+			root->left->claIndexUL=claMan->SetDirty(root->left->claIndexUL);
+			root->left->claIndexUR=claMan->SetDirty(root->left->claIndexUR);			
+			}
+		root->left=t1;
+		t1->next=t2;
+		t2->prev=t1;
+		t2->next=root->right;
+		root->right->prev=t2;
+		t1->anc=root;
+		t2->anc=root;
+		}
+	else {
+		removedNode=root->right;
+		t1=root->right->left;
+		t2=root->right->right;
+		l=root->right->dlen;
+		root->left->dlen+=l;
+	 	root->right->attached=false;
+		if(clasAssigned){
+			root->right->claIndexDown=claMan->SetDirty(root->right->claIndexDown);
+			root->right->claIndexUL=claMan->SetDirty(root->right->claIndexUL);
+			root->right->claIndexUR=claMan->SetDirty(root->right->claIndexUR);
+			}			
+	 	root->left->next=t1;
+	 	t1->prev=root->left;
+		t1->next=t2;
+		t2->prev=t1;
+		t2->next=NULL;
+		t1->anc=root;
+		t2->anc=root;
+	 	root->right=t2;
+		}
+*/	if(reducenodes==1){
+		//we need to permanently get rid of the node that was removed and decrement the nodeNums of those greater 
+		//than it.
+		SortAllNodesArray();
+		EliminateNode(removedNode->nodeNum);
+		numBranchesAdded--;
+		numNodesAdded--;
+		}
+	}
+
+bool Tree::ArbitrarilyBifurcate(){
+	//note that this assumes that the root has been already been made into at least a trichotomy
+	if(numNodesAdded == numNodesTotal) return false;
+	//first figure out which internal nodenums haven't been used yet
+	int placeInAllNodes=1;
+	while(allNodes[placeInAllNodes]->attached == true) placeInAllNodes++;
+	vector<TreeNode*> nodes;
+	TreeNode *curNode = root;
+	TreeNode *desNode;
+	bool goingDown = false;
+	bool polytomiesFound = false;
+	
+	while(numNodesAdded < numNodesTotal){
+		if(curNode->IsInternal() && !goingDown){
+			desNode = curNode->left;
+			nodes.push_back(desNode);
+			while(desNode->next){
+				desNode = desNode->next;
+				nodes.push_back(desNode);
+				}
+			if((curNode != root && nodes.size() > 2) || (curNode == root && nodes.size() > 3)){
+				polytomiesFound = true;
+				bipartCond = DIRTY;
+				int first = rnd.random_int(nodes.size());
+				int second;
+				do{
+					second = rnd.random_int(nodes.size());
+					}while(first == second);
+				TreeNode *move1 = nodes[first];
+				TreeNode *move2 = nodes[second];
+				TreeNode *nextInternal = allNodes[placeInAllNodes];
+				
+				curNode->RemoveDes(move1);
+				curNode->RemoveDes(move2);
+				nextInternal->AddDes(move1);
+				nextInternal->AddDes(move2);
+				curNode->AddDes(nextInternal);
+
+				nextInternal->dlen=Tree::exp_starting_brlen;
+#ifdef STOCHASTIC_STARTING_BLENS
+				nextInternal->dlen *= rnd.gamma(1.0);
+#endif
+				placeInAllNodes++;
+				numNodesAdded++;
+				}
+			else{
+				if(curNode->left && !goingDown){
+					curNode = curNode->left;
+					}
+				else if(curNode->next){
+					curNode = curNode->next;
+					goingDown = false;
+					}
+				else{
+					curNode = curNode->anc;
+					goingDown = true;
+					}
+				}				
+			}
+		else{
+			if(curNode->next){
+				curNode = curNode->next;
+				goingDown = false;
+				}
+			else{
+				curNode = curNode->anc;
+				goingDown = true;
+				}
+			}
+
+		nodes.clear();
+		}
+	assert(numNodesAdded == numNodesTotal);
+	return polytomiesFound;
+	}
+
+void Tree::RandomlyAttachTip(int nodenum , int &placeInAllNodes){
+	
+	assert(nodenum>0 && nodenum<=numTipsTotal);  //should be adding a terminal
+	TreeNode* nd=allNodes[nodenum];
+	nd->dlen = Tree::exp_starting_brlen;
+#ifdef STOCHASTIC_STARTING_BLENS
+	nd->dlen *= rnd.gamma(1.0);
+#endif
+	if(nd->dlen < min_brlen) nd->dlen = min_brlen;
+	else if(nd->dlen > max_brlen) nd->dlen = max_brlen;
+	
+	nd->next=nd->prev=NULL;//in case this node was connected in some other tree
+	
+	//Make sure that the root has 3 decendents
+	if(numBranchesAdded<3)
+		{root->AddDes(nd);
+		}
+	else
+		{// If we're not adding directly to the root node, then we will need
+		// a connector node and make the new terminal its left des
+		TreeNode* connector=allNodes[placeInAllNodes++];
+		numNodesAdded++;
+		connector->dlen = Tree::exp_starting_brlen;
+#ifdef STOCHASTIC_STARTING_BLENS
+		connector->dlen *= rnd.gamma(1.0);
+#endif
+		nd->dlen = (nd->dlen > min_brlen ? nd->dlen : min_brlen);
+		connector->left=connector->right=NULL;
+		connector->AddDes(nd);
+		
+		//select a branch to break with the connector
+		int k = rnd.random_int( numBranchesAdded ) + 1;
+		TreeNode* otherDes = root->FindNode( k );
+		assert(otherDes);
+
+		// replace puts connection in the tree where otherDes had been
+		otherDes->SubstituteNodeWithRespectToAnc(connector);
+		
+		//add otherDes back to the tree as the sister to the new tip
+		connector->AddDes(otherDes);
+		numBranchesAdded++;//numBranchesAdded needs to be incremented twice because a total of two branches have been added
+		}
+	numBranchesAdded++;
+	numNodesAdded++;
+	numTipsAdded++;
+	bipartCond = DIRTY;
+	}
+
+void Tree::RandomlyAttachTipWithConstraints(int nodenum, int &placeInAllNodes, Bipartition *mask){
+	//the trick here with the constraints is that only a subset of the taxa will be in the
+	//growing tree.  To properly determine bipartition comptability a mask consisting of only
+	//the present taxa will need to be used
+
+	assert(nodenum>0 && nodenum<=numTipsTotal);  //should be adding a terminal
+	TreeNode* nd=allNodes[nodenum];
+	Bipartition temp;
+	*mask += temp.TerminalBipart(nodenum);
+	nd->dlen = Tree::exp_starting_brlen;
+#ifdef STOCHASTIC_STARTING_BLENS
+	nd->dlen *= rnd.gamma(1.0);
+#endif
+	if(nd->dlen < min_brlen) nd->dlen = min_brlen;
+	else if(nd->dlen > max_brlen) nd->dlen = max_brlen;
+	
+	nd->next=nd->prev=NULL;//in case this node was connected in some other tree
+	
+	//Make sure that the root has 3 decendents
+	if(numBranchesAdded<3)
+		{root->AddDes(nd);
+		}
+	else
+		{// If we're not adding directly to the root node, then we will need
+		// a connector node and make the new terminal its left des
+		TreeNode* connector=allNodes[placeInAllNodes++];
+		numNodesAdded++;
+		connector->dlen = Tree::exp_starting_brlen;
+#ifdef STOCHASTIC_STARTING_BLENS
+		connector->dlen *= rnd.gamma(1.0);
+#endif
+		connector->dlen = (connector->dlen > min_brlen ? connector->dlen : min_brlen);
+		connector->left=connector->right=NULL;
+		connector->AddDes(nd);
+		
+		//select a branch to break with the connector
+		int k;
+		TreeNode *otherDes;
+		bool compat;
+		Bipartition proposed;
+		nd->CalcBipartition(false);
+
+		do{
+			k = rnd.random_int( numBranchesAdded ) + 1;
+			otherDes = root->FindNode( k );
+			compat=true;
+			CalcBipartitions(true);
+			proposed.FillWithXORComplement(*(nd->bipart), *(otherDes->bipart));
+
+			//6/23/09 This call was moved here from within SwapAllowedByConstraint.  This saves a lot
+			//of work when looping over many constraints for a single swap that really only requires a single adjustment.
+			//Doing the adjustment isn't necessary for positive non-backbone constraints with no mask (and isn't always
+			//necessary when there is a mask either), but there will always be a mask here since we're building a partial tree.
+			AdjustBipartsForSwap(nd->nodeNum, otherDes->nodeNum);
+
+			for(vector<Constraint>::iterator conit=constraints.begin();conit!=constraints.end();conit++){
+				//if the taxon being added isn't in the backbone, it can go anywhere
+				if(((*conit).IsBackbone() == false) || (*conit).GetBackboneMask()->ContainsTaxon(nd->nodeNum)){
+					ReconNode broken(otherDes->nodeNum, 0, 0.0, false);
+					compat = SwapAllowedByConstraint((*conit), nd, &broken, proposed, mask);
+					if(compat == false) break;
+					}
+				}
+			}while(compat == false);
+
+		// replace puts connection in the tree where otherDes had been
+		otherDes->SubstituteNodeWithRespectToAnc(connector);
+		
+		//add otherDes back to the tree as the sister to the new tip
+		connector->AddDes(otherDes);
+		numBranchesAdded++;//numBranchesAdded needs to be incremented twice because a total of two branches have been added
+		bipartCond = DIRTY;
+		}
+	numBranchesAdded++;
+	numNodesAdded++;
+	numTipsAdded++;
+	}
+
+void Tree::MimicTopologyButNotInternNodeNums(TreeNode *copySource,TreeNode *replicate,int &placeInAllNodes){
+	//used in recombine so internal node nodeNums don't have to match
+	TreeNode *tempno=copySource->left;
+	assert(copySource->left);
+	while(tempno)
+		{if(tempno->left)
+			{//tempno isn't a terminal
+			placeInAllNodes=FindUnusedNode(placeInAllNodes);
+			allNodes[placeInAllNodes]->dlen=tempno->dlen;
+//			allNodes[placeInAllNodes]->CopyOneClaIndex(copySource, claMan);
+			MimicTopologyButNotInternNodeNums(tempno,replicate->AddDes(allNodes[placeInAllNodes]),placeInAllNodes);
+			}
+		else
+			{allNodes[tempno->nodeNum]->dlen=tempno->dlen;
+			replicate->AddDes(allNodes[tempno->nodeNum]);
+			}
+		tempno=tempno->next;
+		}	
+	}
+	
+void Tree::RecombineWith( Tree *t, bool sameModel, FLOAT_TYPE optPrecision ){
+	//note that this function will loop infinately right now if the tree is too small
+	//(ie, there are no suitable nodes to choose to recombine with)
+
+	//mark all of the tags as present in this;
+	for(int i=1;i<=numTipsTotal;i++)
+		taxtags[i]=0;
+
+	// Pick a random internal node that is the source of the subtree that will be copied into both trees
+	int k;
+	TreeNode* cop;
+	bool sfound=false;
+	
+	while(!sfound){//find a non trivial clade to add to this
+		//k = rnd.random_int( t->numBranchesAdded-1);
+		//cop = t->root->FindNode( ++k);
+		//don't bother picking terminal nodes
+		k=t->GetRandomInternalNode();
+		cop=t->allNodes[k];
+		if(cop->left->left || cop->right->left){ // cop isn't a two node sub tree
+			if(cop->anc) //check to make sure there are at least 2 nodes "below"cop on the source tree
+					{if(cop->anc->anc)
+						sfound=true;
+					else
+						{if(t->root->left!=cop)
+							{if(t->root->left->left)
+								sfound=true;
+							}
+						if(!sfound && t->root->left->next!=cop)
+							{if(t->root->left->next->left)
+								sfound=true;
+							}
+						if(!sfound && t->root->right!=cop)
+							{if(t->root->right->left)
+								sfound=true;
+							}
+						}
+					}
+				}
+			}
+	//Prune terminals off of this to prepare for attachement of a copy of cop
+	cop->left->MarkTerminals(taxtags);
+	for(int i=1;i<=numTipsTotal;i++){
+		if(taxtags[i]){
+			//before removing the tip, trace dirtyness from its anc to the root
+			//make sure to set any
+			TraceDirtynessToRoot(allNodes[i]->anc);
+//			TraceDirtynessToRoot(allNodes[i]);
+			allNodes[i]->Prune();
+			if(root->left->next==root->right) MakeTrifurcatingRoot(false, true);
+			}
+		}
+	int numAttachedToRoot=root->CountBranches(0);
+	
+	//what we'd like to do now is make the nodeNums of the subtree that will be attached to this
+	//the same as they were in the source tree.  This will require swapping some nodes in the allNodes array,
+	//but will simplify other things, and allow us not to recalc some clas.  This is a bit dangerous though, as 
+	//the nodeNums in this that correspond to those in the cop subtree are now technically free, but are still
+	//marked as attached.  There should still be one node in this marked as unattached that will be used for
+	//the connector
+	SwapAndFreeNodes(cop);
+		
+	// Pick a random node whose branch we will bisected by the new subtree.
+	int n = rnd.random_int( numAttachedToRoot );
+	TreeNode* broken = root->FindNode( ++n );
+	assert(broken->anc);//broken can't be the root;
+	
+	//DZ 7-6 rewritting this so that broken keeps it's original dlen and connector has a new one
+	//generated.  Exactly how this would be best done is not clear.  For now picking uniform[0.05,0.2]
+	TreeNode *connector;
+	int nextUnconnectedNode=FindUnusedNode(numTipsTotal+1);
+	connector=allNodes[nextUnconnectedNode];
+	connector->left=connector->right=NULL;
+	broken->SubstituteNodeWithRespectToAnc(connector);
+	connector->AddDes(broken);
+	connector->AddDes(allNodes[cop->nodeNum]);
+	MimicTopo(cop, 1, sameModel);
+
+	//place connector midway along the broken branch
+	connector->dlen=broken->dlen*ZERO_POINT_FIVE;
+	broken->dlen-=connector->dlen;
+
+	TraceDirtynessToRoot(connector);
+	OptimizeBranchesAroundNode(connector, optPrecision, 0);
+	}
+
+TreeNode *Tree::ContainsBipartition(const Bipartition &bip){
+	//note that this doesn't work for terminals (but there's no reason to call for them anyway)
+	//find a taxon that appears "on" in the bipartition
+
+	//turning this back on
+	int tax=bip.FirstPresentTaxon();
+	
+	//now start moving down the tree from taxon 1 until a bipart that
+	//conflicts or a match is found
+	//TreeNode *nd=allNodes[1]->anc;
+	TreeNode *nd=allNodes[tax]->anc;
+	while(nd->anc){
+		if(nd->bipart->IsASubsetOf(bip) == false) return NULL;
+		else if(nd->bipart->EqualsEquals(bip)) return nd;
+		else nd=nd->anc;
+		}
+	return NULL;
+	}
+
+TreeNode *Tree::ContainsBipartitionOrComplement(const Bipartition &bip){
+	//this version will detect if the same bipartition exists in the trees, even
+	//if it is in different orientation, which could happen due to rooting
+	//differences
+	
+	//NOTE: This requires that the bipartitions are "standardized" meaning that
+	//the one bit is always "on".  In general in other places we do not need that
+	//to be the case
+	if(bipartCond != CLEAN_STANDARDIZED){
+		if(bipartCond == CLEAN_UNSTANDARDIZED)
+			root->StandardizeBipartition();
+		else
+			CalcBipartitions(true);		
+		}
+
+	//find a taxon that appears "on" in the bipartition
+	int tax=bip.FirstPresentTaxon();
+	
+	//now start moving down the tree from that taxon until a bipart that
+	//conflicts or a match is found
+	//7/17/07 changing this to start from the trivial terminal branch, rather
+	//then its anc
+	TreeNode *nd=allNodes[tax];
+	while(nd->anc){
+		if(nd->bipart->IsASubsetOf(bip) == false) break;
+		else if(nd->bipart->EqualsEquals(bip)) return nd;
+		else nd=nd->anc;
+		}
+		
+	//find a taxon that is NOT "on" in the bipartition
+	tax=bip.FirstNonPresentTaxon();
+	
+	//now start moving down the tree from that taxon until a bipart that
+	//conflicts or a match is found
+	//7/17/07 changing this to start from the trivial terminal branch, rather
+	//then its anc
+	nd=allNodes[tax];
+	while(nd->anc){
+		//if(nd->bipart->ComplementIsASubsetOf(bip) == false){
+		if(bip.IsASubsetOf(*nd->bipart) == false){
+			return NULL;
+			}
+		else if(nd->bipart->EqualsEquals(bip)) return nd;
+		else nd=nd->anc;
+		}
+		
+	return NULL;
+	}
+
+TreeNode *Tree::ContainsMaskedBipartitionOrComplement(const Bipartition &bip, const Bipartition &mask){
+	//as in ContainsMaskedBipartitionOrComplement, but bits not on in the
+	//mask are ignored
+
+	//NOTE: This requires that the bipartitions are "standardized" meaning that
+	//the one bit is always "on".  In general in other places we do not want that
+	//to be the case
+	if(bipartCond != CLEAN_STANDARDIZED){
+		if(bipartCond == CLEAN_UNSTANDARDIZED)
+			root->StandardizeBipartition();
+		else
+			CalcBipartitions(true);		
+		}
+
+	//find a taxon that appears "on" in the bipartition and is on in the mask
+	Bipartition temp = bip;
+	temp.AndEquals(mask);
+	int tax=temp.FirstPresentTaxon();
+	
+	//now start moving down the tree from that taxon until we find a
+	//match or reach the root
+	TreeNode *nd=allNodes[tax]->anc;
+	temp = bip;
+	temp.Complement();
+	while(nd->anc){
+		if(nd->bipart->MaskedEqualsEquals(bip, mask)) return nd;
+		if(nd->bipart->MaskedEqualsEquals(temp, mask)) return nd;
+		else nd=nd->anc;
+		}
+
+	//find a taxon that is NOT "on" in the bipartition
+	temp = bip;
+	temp.Complement();
+	temp.AndEquals(mask);
+	tax=temp.FirstPresentTaxon();
+	
+	//now start moving down the tree from that taxon until we find a
+	//match or reach the root
+	nd=allNodes[tax]->anc;
+	temp = bip;
+	temp.Complement();
+	while(nd->anc){
+		if(nd->bipart->MaskedEqualsEquals(bip, mask)) return nd;
+		if(nd->bipart->MaskedEqualsEquals(temp, mask)) return nd;
+		else nd=nd->anc;
+		}
+		
+	return NULL;
+	}
+
+int Tree::SubtreeBasedRecombination( Tree *t, int recomNodeNum, bool sameModel, FLOAT_TYPE optPrecision){
+	//this will work more or less like the normal bipartition based recombination, except
+	//that the node at which the recombination will occur will be passed in from the population
+	//which knows what subtree each remote is working on
+	
+	//we are assuming that the recomNodeNum represents the same bipartition (subtree) in each tree
+	
+	TreeNode *tonode=allNodes[recomNodeNum];
+	TreeNode *fromnode=t->allNodes[recomNodeNum];
+		
+	tonode->MarkUnattached(true);
+	SwapAndFreeNodes(fromnode);
+	//manually set up the base of the subtree in the totree and point tonode to it
+	TreeNode *tempanc=tonode->anc;
+	TreeNode *tempnext=tonode->next;
+	TreeNode *tempprev=tonode->prev;
+	if(tempanc->left==tonode){
+		tempanc->left=allNodes[fromnode->nodeNum];
+		tonode=tempanc->left;
+		}
+	else if(tempanc->right==tonode){
+		tempanc->right=allNodes[fromnode->nodeNum];
+		tonode=tempanc->right;			
+		}
+	else{
+		tempanc->left->next=allNodes[fromnode->nodeNum];
+		tonode=tempanc->left->next;				
+		}
+	tonode->anc=tempanc;
+	tonode->next=tempnext;
+	tonode->prev=tempprev;
+	if(tempnext) tempnext->prev=tonode;
+	if(tempprev) tempprev->next=tonode;
+	MimicTopo(fromnode, 1, sameModel);
+	if(sameModel==true) CopyClaIndecesInSubtree(fromnode, true);
+	else DirtyNodesInSubtree(tonode);
+	
+	SweepDirtynessOverTree(tonode);
+	
+	//try branch length optimization of tonode's branch, to make sure it fits in it's new tree background 
+	OptimizeBranchLength(optPrecision, tonode, true);
+	return 1;
+	}
+
+
+bool Tree::IdenticalSubtreeTopology(const TreeNode *other){
+	//This should not be called with the root, and only detects identical subtrees
+	//in the same orientation (ie rooting can fool it)
+	assert(other->IsNotRoot());
+	bool identical;
+	
+	if(other->IsRoot() == false){
+		if(other->IsTerminal()) return true;
+		identical=(ContainsBipartition(*other->bipart) != NULL);
+		if(identical==true){
+			identical=IdenticalSubtreeTopology(other->left);
+			if(identical==true)
+				identical=IdenticalSubtreeTopology(other->right);
+			}
+		}
+	
+	return identical;
+	}
+
+bool Tree::IdenticalTopology(const TreeNode *other){
+	//this is intitially called with the root, it will detect any difference in the 
+	//overall topology, but assumes the same rooting
+	bool identical;
+	//NOTE: This requires that the bipartitions are "standardized" meaning that
+	//the one bit is always "on".  In general in other places we do not need that
+	//to be the case
+	if(bipartCond != CLEAN_STANDARDIZED){
+		if(bipartCond == CLEAN_UNSTANDARDIZED)
+			root->StandardizeBipartition();
+		else
+			CalcBipartitions(true);		
+		}
+	
+	if(other->IsRoot() == false){
+		if(other->IsTerminal()) return true;
+		identical= (ContainsBipartition(*other->bipart) != NULL);
+		if(identical==true){
+			identical=IdenticalTopology(other->left);
+			if(identical==true)
+				identical=IdenticalTopology(other->right);
+			}
+		}
+	else{
+		TreeNode *nd=other->left;
+		while(nd != NULL){
+			identical=IdenticalTopology(nd);
+			if(identical == false){
+				return identical;
+				}
+			nd=nd->next;
+			}
+		}
+	return identical;
+	}
+
+//this is the corrected version from the trunk that accurately detects identical trees
+//with collapsed branches
+bool Tree::IdenticalTopologyAllowingRerooting(const TreeNode *other){
+	//this is intitially called with the root, it will detect any difference in the 
+	//overall topology
+	bool identical = true;
+	//NOTE: This requires that the bipartitions are "standardized" meaning that
+	//the one bit is always "on".  In general in other places we do not need that
+	//to be the case
+	if(bipartCond != CLEAN_STANDARDIZED){
+		if(bipartCond == CLEAN_UNSTANDARDIZED)
+			root->StandardizeBipartition();
+		else
+			CalcBipartitions(true);		
+		}
+
+	if(other->IsTerminal()) return true;
+	if(other->IsRoot() == false)
+		identical = (ContainsBipartitionOrComplement(*other->bipart) != NULL);
+	TreeNode *nd=other->left;
+	while(identical && nd != NULL){
+		identical = IdenticalTopologyAllowingRerooting(nd);
+		if(identical == false) break;
+		nd=nd->next;
+		}
+	return identical;
+/*
+	if(other->IsRoot() == false){
+		if(other->IsTerminal()) return true;
+		identical= (ContainsBipartitionOrComplement(*other->bipart) != NULL);
+		if(identical==true){
+			identical=IdenticalTopologyAllowingRerooting(other->left);
+			if(identical==true)
+				identical=IdenticalTopologyAllowingRerooting(other->right);
+			}
+		}
+	else{
+		TreeNode *nd=other->left;
+		while(nd != NULL){
+			identical=IdenticalTopologyAllowingRerooting(nd);
+			if(identical == false){
+				return identical;
+				}
+			nd=nd->next;
+			}
+		}
+	return identical;
+*/	}
+
+int Tree::BipartitionBasedRecombination( Tree *t, bool sameModel, FLOAT_TYPE optPrecision){
+	//find a bipartition that is shared between the trees
+	TreeNode *tonode, *fromnode;
+	bool found=false;
+	int tries=0;
+	CalcBipartitions(true);
+	t->CalcBipartitions(true);
+	while(!found && (++tries<50)){
+		int i;
+		do{
+			i=GetRandomInternalNode();
+			//WTF!!!  How did this work?
+			}while((allNodes[i]->left->IsTerminal() && allNodes[i]->right->IsTerminal()));
+			//}while((t->allNodes[i]->left->IsTerminal() && t->allNodes[i]->right->IsTerminal()));
+		//fromnode=t->ContainsBipartition(allNodes[i]->bipart);
+		//fromnode=t->ContainsBipartition(*allNodes[i]->bipart);
+		fromnode=t->ContainsBipartitionOrComplement(*allNodes[i]->bipart);
+		if(fromnode != NULL){
+			//OK the biparts match, but see if they share the same clas!!!!
+			//Not much point in scoring them then.
+			tonode=allNodes[i];
+			if(!((tonode->nodeNum == fromnode->nodeNum) && (tonode->claIndexDown == fromnode->claIndexDown))){
+				if(IdenticalSubtreeTopology(fromnode->left)==false) found=true;
+				if(found==false) if(IdenticalSubtreeTopology(fromnode->right)==false) found=true;
+				}
+			}
+		}
+		//sum the two subtrees as if they were the root to see which is better in score
+/*		if(found==true){
+			FLOAT_TYPE toscore, fromscore;
+			toscore=SubTreeScore(tonode);
+			fromscore=t->SubTreeScore(fromnode);
+		
+			if(fromscore > (toscore + .1)){
+				found=true;
+				break;
+				}
+			else found=false;
+			}
+*/	
+	if(found==true){
+		tonode->MarkUnattached(true);
+		SwapAndFreeNodes(fromnode);
+		//manually set up the base of the subtree in the totree and point tonode to it
+		TreeNode *tempanc=tonode->anc;
+		TreeNode *tempnext=tonode->next;
+		TreeNode *tempprev=tonode->prev;
+		if(tempanc->left==tonode){
+			tempanc->left=allNodes[fromnode->nodeNum];
+			tonode=tempanc->left;
+			}
+		else if(tempanc->right==tonode){
+			tempanc->right=allNodes[fromnode->nodeNum];
+			tonode=tempanc->right;			
+			}
+		else{
+
+			tempanc->left->next=allNodes[fromnode->nodeNum];
+			tonode=tempanc->left->next;				
+			}
+		tonode->anc=tempanc;
+		tonode->next=tempnext;
+		tonode->prev=tempprev;
+		if(tempnext) tempnext->prev=tonode;
+		if(tempprev) tempprev->next=tonode;
+		MimicTopo(fromnode, 1, sameModel);
+		if(sameModel==true) CopyClaIndecesInSubtree(fromnode, true);
+		else DirtyNodesInSubtree(tonode);
+		
+		//try branch length optimization of tonode's branch, to make sure it fits in it's new tree background 
+		SweepDirtynessOverTree(tonode);
+		//OptimizeBranchLength(optPrecision, tonode, true);
+		OptimizeBranchesWithinRadius(tonode, optPrecision, 0, NULL);
+
+		Score(tonode->nodeNum);
+		bipartCond = DIRTY;
+		}
+	else return -1;
+	return 1;
+	}
+	
+//this is essentially a version of TopologyMutator that goes through cut nodes in order
+//and for each cut node goes through the broken nodes in order.  The swaps are performed
+//on a temporary tree
+void Tree::DeterministicSwapperByCut(Individual *source, double optPrecision, int range, bool furthestFirst){
+
+	TreeNode *cut;
+	int swapNum=0;
+	
+	Individual tempIndiv;
+	tempIndiv.treeStruct=new Tree();
+	
+	tempIndiv.CopySecByRearrangingNodesOfFirst(tempIndiv.treeStruct, source);
+
+	//ensure that the starting tree is optimal up to the required precision
+	FLOAT_TYPE imp = 999.9;
+	do{
+		imp = tempIndiv.treeStruct->OptimizeAllBranches(optPrecision);
+		}while(imp > 0.0);
+
+	outman.UserMessage("starting score:%f", tempIndiv.treeStruct->lnL);
+
+	char str[50];
+	if(furthestFirst) sprintf(str, "determImpsCutR.%d.%f.tre", range, optPrecision);
+	else sprintf(str, "determImpsCut.%d.%f.tre", range, optPrecision);
+	ofstream better(str);
+	better.precision(9);
+	dataPart->BeginNexusTreesBlock(better);
+
+#ifdef OUTPUT_ALL
+	if(furthestFirst) 
+		sprintf(str, "determAllCutR.%d.%f.tre", range, optPrecision);
+	else 
+		sprintf(str, "determAllCut.%d.%f.tre", range, optPrecision);	
+	
+	ofstream all(str);
+	dataPart->BeginNexusTreesBlock(all);
+#endif
+
+	if(furthestFirst) 
+		sprintf(str, "determCutR%d.%f.log", range, optPrecision);
+	else 
+		sprintf(str, "determCut%d.%f.log", range, optPrecision);
+	FILE *log = fopen(str, "w");
+	
+	//allocate a treeString
+	double taxsize=log10((double) ((double)dataPart->NTax())*dataPart->NTax()*2);
+	int stringSize=(int)((dataPart->NTax()*2)*(10+DEF_PRECISION));
+	char *treeString=new char[stringSize];
+	stringSize--;
+	treeString[stringSize]='\0';
+	bool newBest=false;
+	attemptedSwaps.ClearAttemptedSwaps();
+	
+	int startC, c=1;
+		
+	int acceptedSwaps = 0;
+	startC = c;
+
+	while(1){
+		cut=tempIndiv.treeStruct->allNodes[c];
+		tempIndiv.treeStruct->GatherValidReconnectionNodes(range, cut, NULL);
+		tempIndiv.treeStruct->sprRang.SortByDist();
+		if(furthestFirst) 
+			tempIndiv.treeStruct->sprRang.Reverse();
+
+		for(list<ReconNode>::iterator b = tempIndiv.treeStruct->sprRang.begin();b != tempIndiv.treeStruct->sprRang.end();b++){
+			ReconNode *broken = &(*b);
+			
+			//log the swap about to be performed.  Although this func goes through the swaps in order,
+			//there will be duplication because of the way that NNIs are performed.  Two different cut
+			//nodes can be reconnected with an NNI such that the same topology results
+			bool unique=false;
+			Bipartition proposed;
+			CalcBipartitions(true);
+			proposed.FillWithXORComplement(*cut->bipart, *tempIndiv.treeStruct->allNodes[broken->nodeNum]->bipart);
+			unique = attemptedSwaps.AddSwap(proposed, cut->nodeNum, broken->nodeNum, broken->reconDist);
+
+			if(unique){
+				swapNum++;
+				if(swapNum %100 == 0) 
+					fprintf(log, "%d\t%d\t%f\n", swapNum, acceptedSwaps, lnL);
+				if(broken->withinCutSubtree == true){
+					tempIndiv.treeStruct->ReorientSubtreeSPRMutate(cut->nodeNum, broken, optPrecision);
+					}
+				else{
+					tempIndiv.treeStruct->SPRMutate(cut->nodeNum, broken, optPrecision, 0);
+					}
+
+#ifdef OUTPUT_ALL
+				tempIndiv.treeStruct->root->MakeNewick(treeString, false, true);
+				all << "tree " << c << "." << b->reconDist << "= [&U][" << lnL << "]" << treeString << ";" << endl;				
+#endif
+
+				if(tempIndiv.treeStruct->lnL > (lnL+optPrecision)){
+
+					outman.UserMessage("%f\t%f\t%d\t%d", tempIndiv.treeStruct->lnL, lnL - tempIndiv.treeStruct->lnL, c, b->reconDist);
+					source->CopySecByRearrangingNodesOfFirst(source->treeStruct, &tempIndiv, true);
+					lnL = tempIndiv.treeStruct->lnL;
+
+					tempIndiv.treeStruct->root->MakeNewick(treeString, false, true);
+					better << "tree " << c << "." << b->reconDist << "= [&U][" << lnL << "]" << treeString << ";" << endl;
+					newBest = true;
+					acceptedSwaps++;
+					attemptedSwaps.ClearAttemptedSwaps();
+					break;
+					}
+				else{
+					tempIndiv.CopySecByRearrangingNodesOfFirst(tempIndiv.treeStruct, source, true);
+					}
+				}
+			}
+		c++;
+		if(c == numNodesTotal) 
+			c = 1;
+		if(newBest == true){
+			startC = c;
+			newBest = false;
+			}
+		else if(c == startC){
+			outman.UserMessage("done. %d swaps, %d accepted", swapNum, acceptedSwaps);
+			break;
+			}
+		}
+
+	better << "end;";
+	better.close();
+	delete []treeString;
+	fclose(log);
+
+	tempIndiv.treeStruct->RemoveTreeFromAllClas();
+	delete tempIndiv.treeStruct;
+	tempIndiv.treeStruct=NULL;
+	}
+
+//this is essentially a version of TopologyMutator that goes through cut nodes in order
+//and for each cut node goes through the broken nodes in order.  It the swaps are performed
+//on a temporary tree
+void Tree::DeterministicSwapperByDist(Individual *source, double optPrecision, int range, bool furthestFirst){
+
+	TreeNode *cut;
+	int swapNum=0;
+	
+	Individual tempIndiv;
+	tempIndiv.treeStruct=new Tree();
+	
+	tempIndiv.CopySecByRearrangingNodesOfFirst(tempIndiv.treeStruct, source);
+
+	//ensure that the starting tree is optimal up to the required precision
+	FLOAT_TYPE imp = 999.9;
+	do{
+		imp = tempIndiv.treeStruct->OptimizeAllBranches(optPrecision);
+		}while(imp > 0.0);
+
+	outman.UserMessage("starting score:%f", tempIndiv.treeStruct->lnL);
+
+	char str[50];
+	if(furthestFirst) 
+		sprintf(str, "determImpsDistR.%d.%f.tre", range, optPrecision);
+	else 
+		sprintf(str, "determImpsDist.%d.%f.tre", range, optPrecision);
+
+	ofstream better(str);
+	better.precision(9);
+	dataPart->BeginNexusTreesBlock(better);
+
+#ifdef OUTPUT_ALL
+	if(furthestFirst) 
+		sprintf(str, "determAllDistR.%d.%f.tre", range, optPrecision);
+	else 
+		sprintf(str, "determAllDist.%d.%f.tre", range, optPrecision);	
+	
+	ofstream all(str);
+	dataPart->BeginNexusTreesBlock(all);
+#endif
+
+	if(furthestFirst) 
+		sprintf(str, "determDistR%d.%f.log", range, optPrecision);
+	else 
+		sprintf(str, "determDist%d.%f.log", range, optPrecision);
+	FILE *log = fopen(str, "w");
+	
+	//allocate a treeString
+	double taxsize=log10((double) ((double)dataPart->NTax())*dataPart->NTax()*2);
+	int stringSize=(int)((dataPart->NTax()*2)*(10+DEF_PRECISION));
+	char *treeString=new char[stringSize];
+	stringSize--;
+	treeString[stringSize]='\0';
+	bool newBest=false;
+	attemptedSwaps.ClearAttemptedSwaps();
+	int startC, c=1;
+
+	int currentDist;
+	if(furthestFirst) currentDist = range;
+	else currentDist = 1;
+	int acceptedSwaps = 0;
+	startC = c;
+	do{
+		cut=allNodes[c];
+		//outman.UserMessageNoCR("cut=%d ", c);
+		GatherValidReconnectionNodes(range, cut, NULL);
+		sprRang.SortByDist();
+
+		for(list<ReconNode>::iterator b = sprRang.GetFirstNodeAtDist(currentDist);b != sprRang.end() && b->reconDist == currentDist;b++){
+			ReconNode *broken = &(*b);
+			
+			//log the swap about to be performed.  Although this func goes through the swaps in order,
+			//there will be duplication because of the way that NNIs are performed.  Two different cut
+			//nodes can be reconnected with an NNI such that the same topology results
+			bool unique=false;
+			Bipartition proposed;
+			CalcBipartitions(true);
+			proposed.FillWithXORComplement(*cut->bipart, *allNodes[broken->nodeNum]->bipart);
+			unique = attemptedSwaps.AddSwap(proposed, cut->nodeNum, broken->nodeNum, broken->reconDist);
+
+			if(unique){
+				swapNum++;
+				if(broken->withinCutSubtree == true){
+					tempIndiv.treeStruct->ReorientSubtreeSPRMutate(cut->nodeNum, broken, optPrecision);
+					}
+				else{
+					tempIndiv.treeStruct->SPRMutate(cut->nodeNum, broken, optPrecision, 0);
+					}
+					
+#ifdef OUTPUT_ALL
+				tempIndiv.treeStruct->root->MakeNewick(treeString, false, true);
+				all << "tree " << c << "." << b->reconDist << "= [&U][" << lnL << "]" << treeString << ";" << endl;	
+#endif
+
+				if(tempIndiv.treeStruct->lnL > (lnL+optPrecision)){
+					outman.UserMessage("%f\t%f\t%d\t%d", tempIndiv.treeStruct->lnL, lnL - tempIndiv.treeStruct->lnL, c, b->reconDist);
+				
+					source->CopySecByRearrangingNodesOfFirst(source->treeStruct, &tempIndiv, true);
+					lnL = tempIndiv.treeStruct->lnL;
+
+					tempIndiv.treeStruct->root->MakeNewick(treeString, false, true);
+					better << "tree " << c << "." << b->reconDist << "= [&U][" << lnL << "]" << treeString << ";" << endl;
+					newBest = true;
+					acceptedSwaps++;
+					attemptedSwaps.ClearAttemptedSwaps();
+					break;
+					}
+				else{
+					tempIndiv.CopySecByRearrangingNodesOfFirst(tempIndiv.treeStruct, source, true);
+					}
+				if(swapNum %100 == 0) fprintf(log, "%d\t%d\t%f\n", swapNum, acceptedSwaps, lnL);
+				}
+			}
+		c++;
+		if(c == numNodesTotal) c = 1;
+		if(newBest == true){
+			startC = c;
+			if(furthestFirst)
+				currentDist = range;
+			else
+				currentDist = 1;
+			newBest = false;
+			}	
+		else if(c == startC){
+			if(furthestFirst) 
+				currentDist--;
+			else 
+				currentDist++;
+			outman.UserMessage("dist = %d", currentDist);
+			}
+		}while(currentDist <= range && currentDist > 0);
+
+	outman.UserMessage("done. %d swaps, %d accepted", swapNum, acceptedSwaps);
+
+	better << "end;";
+	better.close();
+	delete []treeString;
+	fclose(log);
+
+	tempIndiv.treeStruct->RemoveTreeFromAllClas();
+	delete tempIndiv.treeStruct;
+	tempIndiv.treeStruct=NULL;
+	}
+
+void Tree::FillAllSwapsList(ReconList *cuts, int reconLim){
+	CalcBipartitions(true);
+
+	for(int i=1;i<numNodesTotal;i++) 
+		cuts[i].clear();
+
+	for(int i=1;i<numNodesTotal;i++){
+		GatherValidReconnectionNodes(cuts[i], reconLim, allNodes[i], NULL);
+		}
+	}
+
+unsigned Tree::FillWeightsForAllSwaps(ReconList *cuts, double *cutWeights){
+	double tot = 0.0, runningTot = 0.0;
+	for(int i=1;i<numNodesTotal;i++)
+		tot += cuts[i].size();
+	for(int i=1;i<numNodesTotal;i++){
+		runningTot += (double) cuts[i].size() / tot;
+		cutWeights[i] = runningTot;
+		}
+	cutWeights[numNodesTotal] = 1.0;
+	return (unsigned) tot;
+	}
+
+//this is essentially a version of TopologyMutator that goes through cut nodes in order
+//and for each cut node goes through the broken nodes in some order. The swaps are performed
+//on a temporary tree
+void Tree::DeterministicSwapperRandom(Individual *source, double optPrecision, int range){
+
+	TreeNode *cut;
+	int swapNum=0;
+	
+	Individual tempIndiv;
+	tempIndiv.treeStruct=new Tree();
+	
+	tempIndiv.CopySecByRearrangingNodesOfFirst(tempIndiv.treeStruct, source);
+
+	//ensure that the starting tree is optimal up to the required precision
+	FLOAT_TYPE imp = 999.9;
+	do{
+		imp = tempIndiv.treeStruct->OptimizeAllBranches(optPrecision);
+		}while(imp > 0.0);
+
+	outman.UserMessage("starting score:%f", tempIndiv.treeStruct->lnL);
+
+	char str[50];
+	sprintf(str, "determImpsRand.%d.%f.tre", range, optPrecision);
+	ofstream better(str);
+	better.precision(9);
+	dataPart->BeginNexusTreesBlock(better);
+
+#ifdef OUTPUT_ALL
+	sprintf(str, "determAllRand.%d.%f.tre", range, optPrecision);	
+	
+	ofstream all(str);
+	dataPart->BeginNexusTreesBlock(all);
+#endif
+	
+	sprintf(str, "determRand%d.%f.log", range, optPrecision);
+	FILE *log = fopen(str, "w");
+
+	//allocate a treeString
+	double taxsize=log10((double) ((double)dataPart->NTax())*dataPart->NTax()*2);
+	int stringSize=(int)((dataPart->NTax()*2)*(10+DEF_PRECISION));
+	char *treeString=new char[stringSize];
+	stringSize--;
+	treeString[stringSize]='\0';
+	bool newBest=false;
+	attemptedSwaps.ClearAttemptedSwaps();
+	int c=1;
+
+	//zeroth element won't be used, for clarity of indexing
+	vector<ReconList> cuts(numNodesTotal+1);
+	vector<double> cutWeights(numNodesTotal+1);
+	tempIndiv.treeStruct->FillAllSwapsList(&cuts[0], range);
+	unsigned swapsLeft = tempIndiv.treeStruct->FillWeightsForAllSwaps(&cuts[0], &cutWeights[0]);
+
+	int acceptedSwaps = 0;
+	int swapsOnCurrent=0;
+	do{
+		double r = rnd.uniform();
+		c = 1;
+		while(cutWeights[c] < r) c++;
+		cut = tempIndiv.treeStruct->allNodes[c];
+		listIt b = cuts[c].NthElement(rnd.random_int(cuts[c].size()));
+		ReconNode *broken = &(*b);
+			
+		//log the swap about to be performed.  Although this func goes through the swaps in order,
+		//there will be duplication because of the way that NNIs are performed.  Two different cut
+		//nodes can be reconnected with an NNI such that the same topology results
+		bool unique=false;
+		newBest = false;
+		Bipartition proposed;
+		CalcBipartitions(true);
+		proposed.FillWithXORComplement(*(cut->bipart), *(tempIndiv.treeStruct->allNodes[broken->nodeNum]->bipart));
+		unique = attemptedSwaps.AddSwap(proposed, cut->nodeNum, broken->nodeNum, broken->reconDist);
+
+		if(unique){
+			swapNum++;
+			swapsOnCurrent++;
+			if(broken->withinCutSubtree == true){
+				tempIndiv.treeStruct->ReorientSubtreeSPRMutate(cut->nodeNum, broken, optPrecision);
+				}
+			else{
+				tempIndiv.treeStruct->SPRMutate(cut->nodeNum, broken, optPrecision, 0);
+				}
+#ifdef OUTPUT_ALL
+			tempIndiv.treeStruct->root->MakeNewick(treeString, false, true);
+			all << "tree " << c << "." << b->nodeNum << "." << b->reconDist << "." << swapsOnCurrent << " = [&U][" << lnL << "]" << treeString << ";" << endl;	
+#endif
+			
+			if(tempIndiv.treeStruct->lnL > (lnL+optPrecision)){
+				outman.UserMessage("%f\t%f\t%d\t%d", tempIndiv.treeStruct->lnL, lnL - tempIndiv.treeStruct->lnL, c, b->reconDist);
+				source->CopySecByRearrangingNodesOfFirst(source->treeStruct, &tempIndiv, true);
+				lnL = tempIndiv.treeStruct->lnL;
+
+				tempIndiv.treeStruct->root->MakeNewick(treeString, false, true);
+				better << "tree " << c << "." << b->nodeNum << "." << b->reconDist << "= [&U][" << lnL << "]" << treeString << ";" << endl;
+				newBest = true;
+				acceptedSwaps++;
+				outman.UserMessage("%d swaps before reset", swapsOnCurrent);
+				swapsOnCurrent = 0;
+				attemptedSwaps.ClearAttemptedSwaps();
+				tempIndiv.treeStruct->FillAllSwapsList(&cuts[0], range);
+				}
+			else{
+				tempIndiv.CopySecByRearrangingNodesOfFirst(tempIndiv.treeStruct, source, true);
+				}
+			}
+		else{
+			if(broken->reconDist != 1) throw ErrorException("nonunique swap > NNI found! %d %d %d", c, b->nodeNum, b->reconDist);
+			}
+		if(newBest == false)//if the swap either wasn't better or wasn't unique
+			cuts[c].RemoveElement(b);
+		if(swapNum %100 == 0) fprintf(log, "%d\t%d\t%f\n", swapNum, acceptedSwaps, lnL);
+		swapsLeft = tempIndiv.treeStruct->FillWeightsForAllSwaps(&cuts[0], &cutWeights[0]);
+		}while(swapsLeft);
+	
+	outman.UserMessage("%d swaps before completion", swapsOnCurrent);
+
+/*	while(1){
+		int attempts = 0;
+		do{
+			c = GetRandomNonRootNode();
+			if(attempts++ > numNodesTotal){
+				int n=1;
+				while(completed[n] && n < numNodesTotal) n++;
+				if(n == numNodesTotal){
+					outman.UserMessage("done. %d swaps, %d accepted", swapNum, acceptedSwaps);
+
+					better << "end;";
+					better.close();
+					delete []treeString;
+					fclose(log);
+
+					tempIndiv.treeStruct->RemoveTreeFromAllClas();
+					delete tempIndiv.treeStruct;
+					tempIndiv.treeStruct=NULL;
+					return;
+					}
+				}
+			}while(completed[c]);
+		cut=allNodes[c];
+		//outman.UserMessageNoCR("cut=%d ", c);
+		GatherValidReconnectionNodes(range, cut, NULL);
+
+		//for(list<ReconNode>::iterator b = sprRang.GetFirstNodeAtDist(currentDist);b != sprRang.end() && b->reconDist == currentDist;b++){
+		bool noSwapFound = true;
+		listIt b;
+		while(sprRang.size() > 0){
+			b = sprRang.NthElement(rnd.random_int(sprRang.size()));
+			ReconNode *broken = &(*b);
+			
+			//log the swap about to be performed.  Although this func goes through the swaps in order,
+			//there will be duplication because of the way that NNIs are performed.  Two different cut
+			//nodes can be reconnected with an NNI such that the same topology results
+			bool unique=false;
+			Bipartition proposed;
+			CalcBipartitions(true);
+			proposed.FillWithXORComplement(cut->bipart, allNodes[broken->nodeNum]->bipart);
+			unique = attemptedSwaps.AddSwap(proposed, cut->nodeNum, broken->nodeNum, broken->reconDist);
+
+			if(unique){
+				swapNum++;
+				if(broken->withinCutSubtree == true){
+					tempIndiv.treeStruct->ReorientSubtreeSPRMutate(cut->nodeNum, broken, optPrecision);
+					}
+				else{
+					tempIndiv.treeStruct->SPRMutate(cut->nodeNum, broken, optPrecision, 0);
+					}
+#ifdef OUTPUT_ALL
+				tempIndiv.treeStruct->root->MakeNewick(treeString, false, true);
+				all << "tree " << c << "." << b->reconDist << "= [&U][" << lnL << "]" << treeString << ";" << endl;	
+#endif
+				
+				if(tempIndiv.treeStruct->lnL > (lnL+optPrecision)){
+					outman.UserMessage("%f\t%f\t%d\t%d", tempIndiv.treeStruct->lnL, lnL - tempIndiv.treeStruct->lnL, c, b->reconDist);
+					source->CopySecByRearrangingNodesOfFirst(source->treeStruct, &tempIndiv, true);
+					lnL = tempIndiv.treeStruct->lnL;
+
+					tempIndiv.treeStruct->root->MakeNewick(treeString, false, true);
+					better << "tree " << c << "." << b->reconDist << "= [&U][" << lnL << "]" << treeString << ";" << endl;
+					newBest = true;
+					acceptedSwaps++;
+					attemptedSwaps.ClearAttemptedSwaps();
+					for(int i=0;i<numNodesTotal;i++) completed[i] = 0;
+					break;
+					}
+				else{
+					tempIndiv.CopySecByRearrangingNodesOfFirst(tempIndiv.treeStruct, source, true);
+					break;
+					}
+				}
+			else sprRang.RemoveElement(b);
+			}
+		if(swapNum %100 == 0) fprintf(log, "%d\t%d\t%f\n", swapNum, acceptedSwaps, lnL);
+		if(sprRang.size() == 0){
+			outman.UserMessage("completed %d", c);
+			completed[c] = 1;
+			}
+		}
+*/	}
+
+void Tree::GenerateTopologiesAtSprDistance(Individual *source, double optPrecision, int range){
+
+	TreeNode *cut;
+	int swapNum=0;
+	
+	Individual tempIndiv;
+	tempIndiv.treeStruct=new Tree();
+	
+	tempIndiv.CopySecByRearrangingNodesOfFirst(tempIndiv.treeStruct, source);
+
+	//ensure that the starting tree is optimal up to the required precision
+	FLOAT_TYPE imp = 999.9;
+	do{
+		imp = tempIndiv.treeStruct->OptimizeAllBranches(optPrecision);
+		}while(imp > 0.0);
+
+	outman.UserMessage("starting score:%f", tempIndiv.treeStruct->lnL);
+
+	char str[50];
+
+	sprintf(str, "allswaps.SPR%d.tre", range);	
+	ofstream all(str);
+	dataPart->BeginNexusTreesBlock(all);
+
+	sprintf(str, "allswaps.SPR%d.log", range);
+	FILE *log = fopen(str, "w");
+
+	//allocate a treeString
+	double taxsize=log10((double) ((double)dataPart->NTax())*dataPart->NTax()*2);
+	int stringSize=(int)((dataPart->NTax()*2)*(10+DEF_PRECISION));
+	char *treeString=new char[stringSize];
+	stringSize--;
+	treeString[stringSize]='\0';
+	//bool newBest=false;
+
+	int acceptedSwaps = 0;
+
+	tempIndiv.treeStruct->root->MakeNewick(treeString, false, true);
+	all << "tree start = [&U][" << lnL << "]" << treeString << ";" << endl;	
+
+	for(int cutnum=1;cutnum<numNodesTotal;cutnum++){
+		int swapsOnCurrent=0;
+		TreeNode *cut = tempIndiv.treeStruct->allNodes[cutnum];
+
+		tempIndiv.treeStruct->CalcBipartitions(true);
+		tempIndiv.treeStruct->GatherValidReconnectionNodes(range, cut, NULL);
+
+		//tempIndiv.treeStruct->FillAllSwapsList(range);
+		ReconList *cutSwapList = &tempIndiv.treeStruct->sprRang;
+		for(listIt b=cutSwapList->begin();b!=cutSwapList->end();b++){
+			//listIt b = cut.NthElement(rnd.random_int(cuts[c].size()));
+			ReconNode *broken = &(*b);
+			
+			//log the swap about to be performed.  Although this func goes through the swaps in order,
+			//there will be duplication because of the way that NNIs are performed.  Two different cut
+			//nodes can be reconnected with an NNI such that the same topology results
+			bool unique=false;
+			Bipartition proposed;
+			CalcBipartitions(true);
+			proposed.FillWithXORComplement(*(cut->bipart), *(tempIndiv.treeStruct->allNodes[broken->nodeNum]->bipart));
+			unique = attemptedSwaps.AddSwap(proposed, cut->nodeNum, broken->nodeNum, broken->reconDist);
+
+			if(unique){
+				swapNum++;
+				swapsOnCurrent++;
+				if(broken->withinCutSubtree == true){
+					tempIndiv.treeStruct->ReorientSubtreeSPRMutate(cut->nodeNum, broken, optPrecision);
+					}
+				else{
+					tempIndiv.treeStruct->SPRMutate(cut->nodeNum, broken, optPrecision, 0);
+					}
+				tempIndiv.treeStruct->root->MakeNewick(treeString, false, true);
+				all << "tree " << cutnum << "." << b->nodeNum << "." << b->reconDist << "." << swapsOnCurrent << " = [&U][" << lnL << "]" << treeString << ";" << endl;	
+				
+				tempIndiv.CopySecByRearrangingNodesOfFirst(tempIndiv.treeStruct, source, true);
+				}
+			else{
+				if(broken->reconDist != 1) 
+					throw ErrorException("nonunique swap > NNI found! %d %d %d", cutnum, b->nodeNum, b->reconDist);
+				}
+			//if(swapNum %100 == 0) 
+			fprintf(log, "%d\t%d\t%f\n", swapNum, acceptedSwaps, lnL);
+			}
+		}
+	
+	//outman.UserMessage("%d swaps before completion", swapsOnCurrent);
+	all << "end;" << endl;
+	}
+
+//this function now returns the reconnection distance, with it being negative if its a
+//subtree reorientation swap
+int Tree::TopologyMutator(FLOAT_TYPE optPrecision, int range, int subtreeNode){
+	//All topology mutations go through here now.  Range will be 1 in the case of NNI's
+	//Range will be some small number in the case of limSPR's and will be 999999 in the case
+	//of random SPR's
+	TreeNode *cut;
+	ReconNode *broken;
+	bool unique;
+
+#ifdef EQUIV_CALCS
+	dirtyEQ = true;
+#endif
+	
+	int err=0;
+	int ret=0;
+	int tryNum = 0;
+	do{
+		do{
+			cut=allNodes[GetRandomNonRootNode()];
+			GatherValidReconnectionNodes(range, cut, NULL);
+			}while(sprRang.size()==0);
+
+		if((FloatingPointEquals(uniqueSwapBias, 1.0, max(1.0e-8, GARLI_FP_EPS * 2.0)) && FloatingPointEquals(distanceSwapBias, 1.0, max(1.0e-8, GARLI_FP_EPS * 2))) || range < 0)
+			broken = sprRang.RandomReconNode();
+		else{//only doing this on limSPR and NNI
+			err = AssignWeightsToSwaps(cut);
+			err = err && (tryNum++ < 5);
+			if((!swapBasedTerm) || (swapBasedTerm && !err)){
+				//this was a stupid bug.  Err was being paid attention by looping over the 
+				//outer do loop because it was not being reset below when returning from ReorientSubtreeSPR
+				//as it is with normal SPR
+				if(!swapBasedTerm)
+					err = 0;
+				sprRang.CalcProbsFromWeights();
+				broken = sprRang.ChooseNodeByWeight();
+				}
+			}
+
+		if((!swapBasedTerm) || (swapBasedTerm && !err)){
+			//log the swap about to be performed
+			if( ! ((uniqueSwapBias == 1.0 && distanceSwapBias == 1.0) || range < 0)){
+				Bipartition proposed;
+				CalcBipartitions(true);
+				proposed.FillWithXORComplement(*(cut->bipart), *(allNodes[broken->nodeNum]->bipart));
+				unique = attemptedSwaps.AddSwap(proposed, cut->nodeNum, broken->nodeNum, broken->reconDist);
+				uniqueSwapTried = uniqueSwapTried || unique;
+				//uniqueSwapTried = uniqueSwapTried || attemptedSwaps.AddSwap(proposed, cut->nodeNum, broken->nodeNum, broken->reconDist);
+				}
+			//else if(! ((uniqueSwapBias == 1.0 && distanceSwapBias == 1.0) && range < 0)){
+			else{
+				//this means that we are doing an unlimited SPR, which we don't keep track of
+				unique = false;
+				}
+
+			if(broken->withinCutSubtree == true){
+				#ifdef OPT_DEBUG
+					optsum << "reorientSPR\t" << broken->reconDist << "\t" << range << "\n";
+				#endif
+				#ifdef VARIABLE_OPTIMIZATION
+					if(unique == true) ReorientSubtreeSPRMutateDummy(cut->nodeNum, broken, optPrecision);
+					else return broken->reconDist * -1;
+				#endif
+				ReorientSubtreeSPRMutate(cut->nodeNum, broken, optPrecision);	
+				ret=broken->reconDist * -1;
+				}
+			else{
+				#ifdef OPT_DEBUG
+					optsum << "SPR\t" << broken->reconDist << "\t" << range << "\n";
+				#endif
+				#ifdef VARIABLE_OPTIMIZATION
+					if(unique == true) err=SPRMutateDummy(cut->nodeNum, broken, optPrecision, subtreeNode);
+					else return broken->reconDist;
+				#endif
+				err=SPRMutate(cut->nodeNum, broken, optPrecision, subtreeNode);
+				ret=broken->reconDist;
+				}
+			#ifdef OUTPUT_UNIQUE_TREES
+			if(unique == true){
+				output_tree = true;
+				//uni.precision(9);
+				if(broken->withinCutSubtree == false) uni << "SPR" << "\t" << broken->reconDist << "\t" << lnL << "\t" << cut->nodeNum << "\t" << broken->nodeNum << "\n";
+				else uni << "reSPR" << "\t" << broken->reconDist << "\t" << lnL << "\t" << cut->nodeNum << "\t" << broken->nodeNum << "\n";
+				}
+			#endif
+			}
+		}while(err);
+
+#ifndef NDEBUG
+	for(vector<Constraint>::iterator conit=constraints.begin();conit!=constraints.end();conit++){
+		TreeNode *check = NULL;
+		if((*conit).IsBackbone())
+			check = ContainsMaskedBipartitionOrComplement(*(*conit).GetBipartition(), *(*conit).GetBackboneMask());
+		else
+			check = ContainsBipartitionOrComplement(*(*conit).GetBipartition());
+		if((*conit).IsPositive()) assert(check != NULL);
+		else assert(check == NULL);
+		}
+#endif
+	return ret;
+	}
+
+void Tree::GatherValidReconnectionNodes(int maxDist, TreeNode *cut, const TreeNode *subtreeNode, Bipartition *partialMask /*=NULL*/){
+	/* 7/11/06 making this function more multipurpose
+	It now assumes that the cut branch has NOT YET BEEN DETACHED. This is important so that
+	when branches are chosen without a viable reconnection due to a constraint another cut
+	can be chosen without having the put the tree back together again
+	1.	Gather all nodes within maxRange.  This can include nodes that are des of the 
+		cut node.  In this case the portion of the tree containing the root is considered
+		the subtree to be reattached, and the swap would be done by ReorientSubtreeSPRMutate
+	2.	Keep information on the potential reconnection nodes, including reconnection distance and
+		branchlength distance.  This allows for various schemes of differentially weighting the 
+		swaps.
+	3.	filter out reconnection nodes incompatible with constraints
+	*/
+	sprRang.clear();
+	const TreeNode *center=cut->anc;
+	
+	//add the descendent branches
+	if(center->left != cut) 
+		sprRang.AddNode(center->left->nodeNum, 0, (float) center->left->dlen);
+	if(center->left->next != cut) 
+		sprRang.AddNode(center->left->next-> nodeNum, 0, (float) center->left->next->dlen);
+	
+	//add either the center node itself or the third descendent in the case of the root
+	if(center->IsNotRoot()){
+		if(center->anc != subtreeNode)
+			sprRang.AddNode(center->nodeNum, 0, (float) center->dlen);
+		}
+	else{
+		if(center->left->next->next != cut)
+			sprRang.AddNode(center->left->next->next->nodeNum, 0, (float) center->left->next->next->dlen);
+		}
+	
+	assert(sprRang.size() == 2);
+	
+	for(int curDist = 0; curDist < maxDist || maxDist < 0; curDist++){
+		list<ReconNode>::iterator it=sprRang.GetFirstNodeAtDist(curDist);
+		if(it == sprRang.end()){
+			break; //need this to break out of loop when curDist exceeds any branches in the tree
+			}
+		for(; it != sprRang.end() && it->reconDist == curDist; it++){
+			TreeNode *cur=allNodes[it->nodeNum];
+			assert(cur->IsNotRoot());
+			
+			if(cur->left!=NULL && cur->left!=cut) 
+			    sprRang.AddNode(cur->left->nodeNum, curDist+1, (float) (it->pathlength + cur->left->dlen));
+			if(cur->right!=NULL && cur->right!=cut) 
+		    	sprRang.AddNode(cur->right->nodeNum, curDist+1, (float) (it->pathlength + cur->right->dlen));
+			if(cur->next!=NULL && cur->next!=cut){
+			    sprRang.AddNode(cur->next->nodeNum, curDist+1, (float) (it->pathlength + cur->next->dlen));
+			    if(cur->next->next!=NULL && cur->next->next!=cut){//if cur is the left descendent of the root
+			    	sprRang.AddNode(cur->next->next->nodeNum, curDist+1, (float) (it->pathlength + cur->next->next->dlen));
+			    	}
+			    }
+			if(cur->prev!=NULL && cur->prev!=cut){
+			    sprRang.AddNode(cur->prev->nodeNum, curDist+1, (float) (it->pathlength + cur->prev->dlen));
+			    if(cur->prev->prev!=NULL && cur->prev->prev!=cut){//if cur is the right descendent of the root
+			    	sprRang.AddNode(cur->prev->prev->nodeNum, curDist+1, (float) (it->pathlength + cur->prev->prev->dlen));
+			    	}
+			    }
+		    if(cur->anc->nodeNum != 0){//if the anc is not the root, add it.
+		    	if(cur->anc!=subtreeNode){
+			    	sprRang.AddNode(cur->anc->nodeNum, curDist+1, (float) (it->pathlength + cur->anc->dlen));
+			 		}
+			 	}
+		    }
+		}
+	
+	if(maxDist != 1 && cut->IsInternal()){
+		//Gather nodes within the cut subtree to allow SPRs in which the portion of the tree containing
+		//the root is considered the subtree to be reattached
+		//start by adding cut's left and right
+		sprRang.AddNode(cut->left->nodeNum, 0, (float) cut->left->dlen, true);
+		sprRang.AddNode(cut->right->nodeNum, 0, (float) cut->right->dlen, true);
+
+		for(int curDist = 0; curDist < maxDist || maxDist < 0; curDist++){
+			list<ReconNode>::iterator it=sprRang.GetFirstNodeAtDistWithinCutSubtree(curDist);	
+			if(it == sprRang.end()){
+				break; //need this to break out of loop when curDist exceeds any branches in the tree
+				}
+			for(; it != sprRang.end() && it->reconDist == curDist; it++){
+				TreeNode *cur=allNodes[it->nodeNum];
+				
+				if(cur->left!=NULL) 
+					sprRang.AddNode(cur->left->nodeNum, curDist+1, (float) (it->pathlength + cur->left->dlen), true);
+				if(cur->right!=NULL) 
+		    		sprRang.AddNode(cur->right->nodeNum, curDist+1, (float) (it->pathlength + cur->right->dlen), true);
+				if(cur->next!=NULL){
+					sprRang.AddNode(cur->next->nodeNum, curDist+1, (float) (it->pathlength + cur->next->dlen), true);
+					}
+				}
+			}
+		}
+
+    //remove general unwanted nodes from the subset
+	sprRang.RemoveNodesOfDist(0); //remove branches adjacent to cut
+//	if(maxDist != 1)
+//		sprRang.RemoveNodesOfDist(1); //remove branches equivalent to NNIs
+	
+	//now deal with constraints, if any
+	if(constraints.size() > 0){
+/*		int ok =0;
+		int bad = 0;
+		int calls = 0;
+		int attach = sprRang.size();
+*/		bool bypass = false;
+
+		//6/30/09 If all constraints are backbone on the same set of taxa, check that both sides of the split where the tree was broken
+		//actually appear in the backbone mask.  Otherwise the swap is always valid and we can skip the whole following loop.
+		//This is very helpful when, for example, a terminal taxon not in the backbone is cut.
+		CalcBipartitions(true);
+		if(Constraint::allBackbone && Constraint::sharedMask){
+			if(!(constraints[0].GetBackboneMask()->HasIntersection(*cut->bipart, NULL)) || !(constraints[0].GetBackboneMask()->HasIntersectionWithComplement(*cut->bipart, NULL))){
+				bypass = true;
+				}
+			}
+		if(!bypass && sprRang.size() != 0){
+			Bipartition proposed;
+			listIt it=sprRang.begin();
+			do{
+				TreeNode* broken=allNodes[it->nodeNum];
+				CalcBipartitions(true);
+				proposed.FillWithXORComplement(*(cut->bipart), *(allNodes[broken->nodeNum]->bipart));
+				bool allowed = true;
+				
+				//6/23/09 This call was moved here from within SwapAllowedByConstraint.  This saves a lot
+				//of work when looping over many constraints for a single swap that really only requires a single adjustment.
+				//Doing the adjustment isn't necessary for positive non-backbone constraints with no mask (and isn't always
+				//necessary when there is a mask either) so skip this if we can
+				if(it->withinCutSubtree == false && (partialMask || Constraint::anyBackbone || constraints[0].IsPositive() == false))
+					AdjustBipartsForSwap(cut->nodeNum, broken->nodeNum);
+
+				for(vector<Constraint>::iterator conit=constraints.begin();conit!=constraints.end();conit++){
+//					calls++;
+					allowed = SwapAllowedByConstraint((*conit), cut, &*it, proposed, partialMask); 
+					if(!allowed) break;
+					}
+//				if(allowed) ok++;
+//				else bad++;
+				if(!allowed) it=sprRang.RemoveElement(it);
+				else it++;
+				}while(it != sprRang.end());
+			}
+/*		if(bypass)
+			outman.UserMessage("%d max range, %d attach, %d calls, %d ok, %d bad, BYPASSED", maxDist, attach, calls, ok, bad);
+		else
+			outman.UserMessage("%d max range, %d attach, %d calls, %d ok, %d bad", maxDist, attach, calls, ok, bad);
+*/		}
+	}
+
+//same as the normal GatherValidReconnectionNodes, but fills ReconList passed in, not the normal tree one
+//6/23/09 I don't think that this has been updated for the most recent constraint implementation, so shouldn't be being used
+void Tree::GatherValidReconnectionNodes(ReconList &thisList, int maxDist, TreeNode *cut, const TreeNode *subtreeNode, Bipartition *partialMask /*=NULL*/){
+	assert(0);
+	const TreeNode *center=cut->anc;
+	
+	//add the descendent branches
+	if(center->left != cut) 
+		thisList.AddNode(center->left->nodeNum, 0, (float) center->left->dlen);
+	if(center->left->next != cut) 
+		thisList.AddNode(center->left->next-> nodeNum, 0, (float) center->left->next->dlen);
+	
+	//add either the center node itself or the third descendent in the case of the root
+	if(center->IsNotRoot()){
+		if(center->anc != subtreeNode)
+			thisList.AddNode(center->nodeNum, 0, (float) center->dlen);
+		}
+	else{
+		if(center->left->next->next != cut)
+			thisList.AddNode(center->left->next->next->nodeNum, 0, (float) center->left->next->next->dlen);
+		}
+	
+	assert(thisList.size() == 2);
+	
+	for(int curDist = 0; curDist < maxDist || maxDist < 0; curDist++){
+		//list<ReconNode>::iterator it=thisList.GetFirstNodeAtDist(curDist);
+		listIt it=thisList.GetFirstNodeAtDist(curDist);
+		if(it == thisList.end()){
+			break; //need this to break out of loop when curDist exceeds any branches in the tree
+			}
+		for(; it != thisList.end() && it->reconDist == curDist; it++){
+			TreeNode *cur=allNodes[it->nodeNum];
+			assert(cur->IsNotRoot());
+			
+			if(cur->left!=NULL && cur->left!=cut) 
+			    thisList.AddNode(cur->left->nodeNum, curDist+1, (float) (it->pathlength + cur->left->dlen));
+			if(cur->right!=NULL && cur->right!=cut) 
+		    	thisList.AddNode(cur->right->nodeNum, curDist+1, (float) (it->pathlength + cur->right->dlen));
+			if(cur->next!=NULL && cur->next!=cut){
+			    thisList.AddNode(cur->next->nodeNum, curDist+1, (float) (it->pathlength + cur->next->dlen));
+			    if(cur->next->next!=NULL && cur->next->next!=cut){//if cur is the left descendent of the root
+			    	thisList.AddNode(cur->next->next->nodeNum, curDist+1, (float) (it->pathlength + cur->next->next->dlen));
+			    	}
+			    }
+			if(cur->prev!=NULL && cur->prev!=cut){
+			    thisList.AddNode(cur->prev->nodeNum, curDist+1, (float) (it->pathlength + cur->prev->dlen));
+			    if(cur->prev->prev!=NULL && cur->prev->prev!=cut){//if cur is the right descendent of the root
+			    	thisList.AddNode(cur->prev->prev->nodeNum, curDist+1, (float) (it->pathlength + cur->prev->prev->dlen));
+			    	}
+			    }
+		    if(cur->anc->nodeNum != 0){//if the anc is not the root, add it.
+		    	if(cur->anc!=subtreeNode){
+			    	thisList.AddNode(cur->anc->nodeNum, curDist+1, (float) (it->pathlength + cur->anc->dlen));
+			 		}
+			 	}
+		    }
+		}
+	
+	if(maxDist != 1 && cut->IsInternal()){
+		//Gather nodes within the cut subtree to allow SPRs in which the portion of the tree containing
+		//the root is considered the subtree to be reattached
+		//start by adding cut's left and right
+		thisList.AddNode(cut->left->nodeNum, 0, (float) cut->left->dlen, true);
+		thisList.AddNode(cut->right->nodeNum, 0, (float) cut->right->dlen, true);
+
+		for(int curDist = 0; curDist < maxDist || maxDist < 0; curDist++){
+			//list<ReconNode>::iterator it=thisList.GetFirstNodeAtDistWithinCutSubtree(curDist);
+			listIt it=thisList.GetFirstNodeAtDistWithinCutSubtree(curDist);	
+			if(it == thisList.end()){
+				break; //need this to break out of loop when curDist exceeds any branches in the tree
+				}
+			for(; it != thisList.end() && it->reconDist == curDist; it++){
+				TreeNode *cur=allNodes[it->nodeNum];
+				
+				if(cur->left!=NULL) 
+					thisList.AddNode(cur->left->nodeNum, curDist+1, (float) (it->pathlength + cur->left->dlen), true);
+				if(cur->right!=NULL) 
+		    		thisList.AddNode(cur->right->nodeNum, curDist+1, (float) (it->pathlength + cur->right->dlen), true);
+				if(cur->next!=NULL){
+					thisList.AddNode(cur->next->nodeNum, curDist+1, (float) (it->pathlength + cur->next->dlen), true);
+					}
+				}
+			}
+		}
+
+    //remove general unwanted nodes from the subset
+	thisList.RemoveNodesOfDist(0); //remove branches adjacent to cut
+	//try removing nni's that would be dupes
+	for(listIt it = thisList.begin(); it != thisList.end();){
+		if(cut->nodeNum > (*it).nodeNum) it = thisList.RemoveElement(it);
+		else it++;
+		}
+
+	//now deal with constraints, if any
+	if(constraints.size() > 0){
+		Bipartition scratch;
+
+		for(vector<Constraint>::iterator conit=constraints.begin();conit!=constraints.end();conit++){
+			if(thisList.size() != 0){
+				listIt it=thisList.begin();
+				do{
+					//if(AllowedByConstraint(&(*conit), cut, broken, scratch) == false) it=thisList.RemoveElement(it);
+					if(SwapAllowedByConstraint((*conit), cut, &*it, scratch, partialMask) == false) it=thisList.RemoveElement(it);
+					else it++;
+					}while(it != thisList.end());
+				}
+			else return;
+			}
+		}
+	}
+
+bool Tree::AssignWeightsToSwaps(TreeNode *cut){
+	//Assign weights to each swap (reconnection node) based on 
+	//some criterion
+	CalcBipartitions(true);
+
+	Bipartition proposed;
+	list<Swap>::iterator thisSwap;
+	bool someUnique = false;
+
+	Swap tmp;
+
+	for(listIt it = sprRang.begin();it != sprRang.end();it++){
+		bool found;
+		CalcBipartitions(true);
+		proposed.FillWithXORComplement(*(cut->bipart), *(allNodes[(*it).nodeNum]->bipart));
+		tmp.Setup(proposed, cut->nodeNum, (*it).nodeNum, (*it).reconDist);
+		thisSwap = attemptedSwaps.FindSwap(tmp, found);
+
+		if(found == false){
+			someUnique = true;
+			if((*it).reconDist - 1 < 1000)
+				(*it).weight = distanceSwapPrecalc[(*it).reconDist - 1];
+			else 
+				(*it).weight = distanceSwapPrecalc[999];
+			}
+		else{
+			if((*thisSwap).Count() < 500)
+				(*it).weight = uniqueSwapPrecalc[(*thisSwap).Count()];
+			else 
+				(*it).weight = uniqueSwapPrecalc[499];
+			if((*it).reconDist - 1 < 1000)
+				(*it).weight *= distanceSwapPrecalc[(*it).reconDist - 1];
+			else 
+				(*it).weight *= distanceSwapPrecalc[999];
+/*			if((*it).reconDist - 1 < 1000 && (*thisSwap).Count() < 500)
+				(*it).weight = uniqueSwapPrecalc[(*thisSwap).Count()] * distanceSwapPrecalc[(*it).reconDist - 1];
+			else (*it).weight = 0.0;
+*/			}
+		}
+	return someUnique==false;
+	}
+
+int Tree::SPRMutateDummy(int cutnum, ReconNode *broke, FLOAT_TYPE optPrecision, int subtreeNode){
+	//this is just a spoof version of SPRMutate that will perform the same mutation
+	//several times with different optimiation settings, but will otherwise 
+	//maintain exactly the same program flow because it resets the seed
+
+#ifndef VARIABLE_OPTIMIZATION
+	assert(0);
+#else
+	Individual tempIndiv;
+	tempIndiv.treeStruct=new Tree();
+	
+	Individual sourceIndiv;
+	sourceIndiv.treeStruct=this;
+	sourceIndiv.mod->CopyModel(this->mod);
+		
+	int savedSeed;
+	
+	var.precision(10);
+	var << "SPR" << "\t" << broke->reconDist << "\t" << lnL << "\t";
+	
+	tempIndiv.CopySecByRearrangingNodesOfFirst(tempIndiv.treeStruct, &sourceIndiv);
+//	FLOAT_TYPE prec[5]={(FLOAT_TYPE).01, (FLOAT_TYPE).5, (FLOAT_TYPE).01, (FLOAT_TYPE).01, (FLOAT_TYPE).01};
+	FLOAT_TYPE origThresh = treeRejectionThreshold;
+/*	
+	treeRejectionThreshold = 10000;
+	for(int i=0;i<1;i++){
+		savedSeed = rnd.seed();
+		optCalcs = 0;
+		tempIndiv.treeStruct->SPRMutate(cutnum, broke, optPrecision, 0);
+		var << tempIndiv.treeStruct->lnL << "\t" << optCalcs << "\t";
+		optCalcs = 0;
+		rnd.set_seed(savedSeed);
+		tempIndiv.CopySecByRearrangingNodesOfFirst(tempIndiv.treeStruct, &sourceIndiv, true);
+		}
+	treeRejectionThreshold = -10000;
+	for(int i=0;i<1;i++){
+		savedSeed = rnd.seed();
+		optCalcs = 0;
+		tempIndiv.treeStruct->SPRMutate(cutnum, broke, optPrecision, 0);
+		var << tempIndiv.treeStruct->lnL << "\t" << optCalcs << "\t";
+		optCalcs = 0;
+		rnd.set_seed(savedSeed);
+		tempIndiv.CopySecByRearrangingNodesOfFirst(tempIndiv.treeStruct, &sourceIndiv, true);
+		}
+*/
+/*	for(int i=0;i<1;i++){
+		treeRejectionThreshold = origThresh;
+		savedSeed = rnd.seed();
+		optCalcs = 0;
+		tempIndiv.treeStruct->SPRMutate(cutnum, broke, optPrecision, 0);
+		var << tempIndiv.treeStruct->lnL << "\t" << optCalcs << "\t";
+		optCalcs = 0;
+		rnd.set_seed(savedSeed);
+		tempIndiv.CopySecByRearrangingNodesOfFirst(tempIndiv.treeStruct, &sourceIndiv, true);
+		}
+*/
+	treeRejectionThreshold = origThresh;
+	tempIndiv.treeStruct->RemoveTreeFromAllClas();
+	delete tempIndiv.treeStruct;
+	tempIndiv.treeStruct=NULL;
+	sourceIndiv.treeStruct=NULL;
+	optCalcs = 0;
+	SPRMutate(cutnum, broke, optPrecision, 0);
+	var << lnL << "\t" << optCalcs << "\n";
+	optCalcs = 0;
+#endif
+	return 1;
+	}
+
+
+// 7/21/06 This function is now called by TopologyMutator to actually do the rearrangement
+//It has the cut and broken nodenums passed in.  It also does NNI's
+int Tree::SPRMutate(int cutnum, ReconNode *broke, FLOAT_TYPE optPrecision, int subtreeNode){
+	//if the optPrecision passed in is < 0 it means that we're just trying to 
+	//make the tree structure for some reason, but don't have CLAs allocated
+	//and don't intend to do blen opt
+	bool createTopologyOnly=false;
+	if(optPrecision < 0.0) createTopologyOnly=true;
+
+	TreeNode* cut = allNodes[cutnum];
+	TreeNode *broken = allNodes[broke->nodeNum];
+	TreeNode *connector=NULL;
+	TreeNode *sib;
+	//note that this assignment of the sib can be overridden below if cut is attached to the root or the subtreeNode
+	if(cut->next!=NULL) sib=cut->next;
+	else sib=cut->prev;
+
+	//determine who the connector node will be.  It will be cut->anc unless that is the root
+	//if cut->anc is the root, connector will be one of cut's siblings, which is freed when
+	//the basal trichotomy is reestablished after removing cut.
+	if(cut->anc->IsNotRoot()){
+		if(cut->anc->nodeNum != subtreeNode){
+			connector=cut->anc;
+			}
+		else{
+			//cut is attached to the subtreeNode, so we will have to use it's sib as the connector
+			connector=sib;
+			sib=connector->left;
+			}
+		}
+	else{
+		if(root->left!=cut && root->left->IsInternal()) connector = root->left;
+		else if(root->left->next!=cut && root->left->next->IsInternal()) connector = root->left->next;
+		else if(root->right!=cut && root->right->IsInternal()) connector = root->right;
+		else{//this should be quite rare, and means that the three descendents of the root
+			//are cut and two terminals, so no viable swap exists, just try again
+			return -1;
+			}
+		}
+	
+	//all clas below cut will need to be recalced
+	if(createTopologyOnly == false) SweepDirtynessOverTree(cut);
+	TreeNode *replaceForConn;
+	if(cut->anc->anc){
+		if(cut->anc->nodeNum != subtreeNode){
+			//cut is not connected to the root, so we can steal it's ancestor as the new connector
+		   	if(cut==connector->left){
+		   		assert(cut->next==connector->right);
+				replaceForConn=connector->right;
+		   		}
+		   	else{
+		   		assert(cut==connector->right); 
+		   		replaceForConn=connector->left;
+		   		}
+			SetBranchLength(replaceForConn, min(max_brlen, replaceForConn->dlen+connector->dlen));
+			connector->SubstituteNodeWithRespectToAnc(replaceForConn);
+		   	}
+		else{//cut is attached to the subtreeNode, so we will have to use it's sib as the connector
+			//connector's two children become the subtreeNodes new children, and connector's dlen gets added to subtreeNodes
+			TreeNode *subnode=allNodes[subtreeNode];
+			SetBranchLength(subnode, min(max_brlen, subnode->dlen+connector->dlen));
+			SweepDirtynessOverTree(connector);
+			subnode->left=connector->left;
+			subnode->right=connector->right;
+			connector->left->anc=subnode;
+			connector->right->anc=subnode;
+			}
+		}
+	else{//cut is connected to the root so we need to steal a non terminal sib node as the connector
+		if(createTopologyOnly == false) MakeNodeDirty(root);
+		//Disconnect cut from the root
+		if(cut==root->left){
+			root->left=cut->next;
+			cut->next->prev=NULL;
+			}
+		else if(cut==root->right){
+			root->right=cut->prev;
+			cut->prev->next=NULL;
+			}
+		else{
+			assert(cut->prev==root->left && cut->next==root->right);//can only have a basal trifucation, or we're in trouble
+			cut->prev->next=cut->next;
+			cut->next->prev=cut->prev;
+			}
+		//root is now bifurcation
+		//preserve branch length info
+		if(root->right==connector){
+			SetBranchLength(root->left, min(max_brlen, root->left->dlen+connector->dlen));
+			sib=root->left;
+			}
+		else{
+			SetBranchLength(root->right, min(max_brlen, root->right->dlen+connector->dlen));
+			sib=root->right;
+			}
+			
+		//add the connectors two desccendants as descendants of the root
+		assert(connector->right==connector->left->next);
+		connector->SubstituteNodeWithRespectToAnc(connector->left);
+		root->AddDes(connector->right);
+		}
+	
+	//establish correct topology for connector and cut nodes
+	if(createTopologyOnly == false) MakeNodeDirty(connector);
+	cut->anc=connector;
+	connector->left=connector->right=cut;
+	connector->next=connector->prev=connector->anc=cut->next=cut->prev=NULL;
+
+	broken->SubstituteNodeWithRespectToAnc(connector);
+	connector->AddDes(broken);
+	assert(connector->right == broken);
+
+	SetBranchLength(connector, max(min_brlen, broken->dlen*ZERO_POINT_FIVE));
+	SetBranchLength(broken, connector->dlen);
+
+	if(createTopologyOnly == false){
+		SweepDirtynessOverTree(connector, cut);
+		if(broke->reconDist > 1)
+			OptimizeBranchesWithinRadius(connector, optPrecision, subtreeNode, sib);
+		else 
+			OptimizeBranchesWithinRadius(connector, optPrecision, subtreeNode, NULL);
+		}
+	bipartCond = DIRTY;
+
+//#ifdef EXTRA_ROOT_OPT
+	if(createTopologyOnly == false && cut == dummyRoot){
+		//do some extra optimization when the root branch is moved, since it is a tough move to accept
+		outman.DebugMessageNoCR("root move: %.4f ", lnL);
+		for(int modnum = 0;modnum < modPart->NumModels();modnum++){
+			const ModelSpecification *modSpec = modPart->GetModel(modnum)->GetCorrespondingSpec();
+			if(modSpec->IsOrientedGap()){
+				OptimizeInsertDeleteRates(optPrecision, modnum);
+				outman.DebugMessageNoCR("-> %.4f ", lnL);
+				OptimizeAllBranches(optPrecision);
+				}
+			}
+		outman.DebugMessage("-> %.4f", lnL);
+		}
+//#endif
+	return 0;
+}
+
+void Tree::ReorientSubtreeSPRMutateDummy(int oroot, ReconNode *nroot, FLOAT_TYPE optPrecision){
+	//this is just a spoof version of SPRMutate that will perform the same mutation
+	//several times with different optimiation settings, but will otherwise 
+	//maintain exactly the same program flow because it resets the seed
+#ifndef VARIABLE_OPTIMIZATION
+	assert(0);
+#else
+	Individual tempIndiv;
+	tempIndiv.treeStruct=new Tree();
+	
+	Individual sourceIndiv;
+	sourceIndiv.treeStruct=this;
+	sourceIndiv.mod->CopyModel(this->mod);
+		
+	int savedSeed;
+	var.precision(10);
+	var << "reSPR" << "\t" << nroot->reconDist << "\t" << lnL << "\t";
+	//FLOAT_TYPE prec[5]={(FLOAT_TYPE).01, (FLOAT_TYPE).5, (FLOAT_TYPE).01, (FLOAT_TYPE).01, (FLOAT_TYPE).01};
+	
+	tempIndiv.CopySecByRearrangingNodesOfFirst(tempIndiv.treeStruct, &sourceIndiv);
+	FLOAT_TYPE origThresh = treeRejectionThreshold;
+/*		
+	treeRejectionThreshold = 10000;
+
+	for(int i=0;i<1;i++){
+		savedSeed = rnd.seed();
+		optCalcs = 0;
+		tempIndiv.treeStruct->ReorientSubtreeSPRMutate(oroot, nroot, optPrecision);
+		var << tempIndiv.treeStruct->lnL << "\t" << optCalcs << "\t";
+		optCalcs = 0;
+		rnd.set_seed(savedSeed);
+		tempIndiv.CopySecByRearrangingNodesOfFirst(tempIndiv.treeStruct, &sourceIndiv, true);
+		}
+	treeRejectionThreshold = -10000;
+	for(int i=0;i<1;i++){
+		savedSeed = rnd.seed();
+		optCalcs = 0;
+		tempIndiv.treeStruct->ReorientSubtreeSPRMutate(oroot, nroot, optPrecision);
+		var << tempIndiv.treeStruct->lnL << "\t" << optCalcs << "\t";
+		optCalcs = 0;
+		rnd.set_seed(savedSeed);
+		tempIndiv.CopySecByRearrangingNodesOfFirst(tempIndiv.treeStruct, &sourceIndiv, true);
+		}
+*/
+		/*	for(int i=0;i<1;i++){
+		treeRejectionThreshold = origThresh;
+		savedSeed = rnd.seed();
+		optCalcs = 0;
+		tempIndiv.treeStruct->ReorientSubtreeSPRMutate(oroot, nroot, optPrecision);
+		var << tempIndiv.treeStruct->lnL << "\t" << optCalcs << "\t";
+		optCalcs = 0;
+		rnd.set_seed(savedSeed);
+		tempIndiv.CopySecByRearrangingNodesOfFirst(tempIndiv.treeStruct, &sourceIndiv, true);
+		}
+*/
+	treeRejectionThreshold = origThresh;
+	tempIndiv.treeStruct->RemoveTreeFromAllClas();
+	delete tempIndiv.treeStruct;
+	tempIndiv.treeStruct=NULL;
+	sourceIndiv.treeStruct=NULL;
+	optCalcs = 0;
+	ReorientSubtreeSPRMutate(oroot, nroot, optPrecision);
+	var << lnL << "\t" << optCalcs << "\n";
+	optCalcs = 0;
+#endif
+	}
+
+void Tree::ReorientSubtreeSPRMutate(int oroot, ReconNode *nroot, FLOAT_TYPE optPrecision){
+	//this is used to allow the other half of SPR rearrangements in which
+	//the part of the tree containing the root is considered the subtree
+	//to be attached.  Terminology is VERY confusing here. newRoot is the 
+	//branch to be bisected (rooted at).  oldRoot is the node that is at the 
+	//base of the subtree currently.  After the rearrangement it will still
+	//be at the base of the subtree, but in the middle of a different branch
+
+	//if the optPrecision passed in is < 0 it means that we're just trying to 
+	//make the tree structure for some reason, but don't have CLAs allocated
+	//and don't intend to do blen opt
+	bool createTopologyOnly=false;
+	if(optPrecision < 0.0) createTopologyOnly=true;
+
+	TreeNode *newroot=allNodes[nroot->nodeNum];
+	TreeNode *oldroot=allNodes[oroot];
+
+	//these are the only blens that need to be dealt with specially
+	FLOAT_TYPE fusedBlen = min(max_brlen, oldroot->left->dlen + oldroot->right->dlen);
+	FLOAT_TYPE dividedBlen = max(ZERO_POINT_FIVE * newroot->dlen, min_brlen);
+
+	//first detatch the subtree and make it free floating.  This will
+	//leave oroot in its place and fuse two branches in the subtree
+	//into a branch connecting one of oroots des to its other des
+	//This makes that des a tricotomy with a NULL anc.  Then the rotating 
+	//begins.
+	if(createTopologyOnly == false){
+		SweepDirtynessOverTree(oldroot->left);
+		SweepDirtynessOverTree(oldroot->right);
+		}
+	
+	TreeNode *prunePoint;
+	TreeNode *tempRoot;
+	if(oldroot->left->IsInternal()){
+		tempRoot=oldroot->left;
+		prunePoint=oldroot->right;
+		}
+	else{
+		tempRoot=oldroot->right;
+		prunePoint=oldroot->left;
+		}
+
+	tempRoot->AddDes(prunePoint);
+	//prunePoint->dlen=fusedBlen;
+	SetBranchLength(prunePoint, fusedBlen);
+	tempRoot->anc=NULL;
+
+	if(createTopologyOnly == false) MakeNodeDirty(tempRoot);
+	
+	//collect each of the nodes that will need to be flipped
+	vector<TreeNode *> path;
+	path.reserve(10);
+	TreeNode *tmp=newroot->anc;
+	while(tmp){
+		path.push_back(tmp);
+		tmp=tmp->anc;
+		}
+	reverse(path.begin(),path.end());
+
+	for(vector<TreeNode*>::iterator it=path.begin();(it+1)!=path.end();it++){
+		(*it)->MoveDesToAnc(*(it+1));
+		}
+
+	//now disconnect the oldroot
+	oldroot->left = NULL;
+	oldroot->right = NULL;
+	
+	//and add the new des
+	TreeNode *oldanc=newroot->anc;
+	oldanc->RemoveDes(newroot);
+	oldroot->AddDes(oldanc);
+	oldroot->AddDes(newroot);
+
+	SetBranchLength(oldroot->left, dividedBlen);
+	SetBranchLength(oldroot->right, dividedBlen);
+ 
+	if(createTopologyOnly == false){
+		SweepDirtynessOverTree(newroot);
+		SweepDirtynessOverTree(oldroot);
+		SweepDirtynessOverTree(tempRoot);
+		SweepDirtynessOverTree(prunePoint);
+		if(nroot->reconDist > 1) OptimizeBranchesWithinRadius(oldroot, optPrecision, 0, prunePoint);
+		else OptimizeBranchesWithinRadius(oldroot, optPrecision, 0, NULL);
+		}
+	bipartCond = DIRTY;
+	}
+
+void Tree::LoadConstraints(ifstream &con, int nTaxa){
+	string temp;//=new char[numTipsTotal + 100];
+	Constraint constr;
+	int conNum=0;
+	do{
+		temp.clear();
+		char c;
+		con.get(c);
+		do{
+			temp += c;
+			con.get(c);
+			}while(c != '\n' && c!= '\r' && con.eof() == false);
+		while((con.peek() == '\n' || con.peek() == '\r') && con.eof() == false){
+			con.get(c);
+			}
+
+		//getline works strangely on some compilers.  temp should end with ; or \0 , but 
+		//might end with \r or \n
+		size_t len=temp.length();
+		char last=temp.c_str()[len-1];
+		while(last == '\r' || last == '\n' || last == ' '){
+			temp.erase(len-1, 1);
+			len--;
+			last=temp.c_str()[len-1];
+			}
+		if(temp[0] != '\0'){
+			if(temp[0] != '+' && temp[0] != '-') throw ErrorException("constraint string must start with \'+\' (positive constraint) or \'-\' (negative constraint)");
+			if(temp[1] == '.' || temp[1] == '*'){//if individual biparts are specified in *. format
+				//while(temp[temp.length()-1] == ' ') temp.erase(temp.length()-1);//eat any spaces at the end
+				if(len != nTaxa+1) throw ErrorException("constraint # %d does not have the correct number of characters!\n(has %d) constraint strings must start with \n\'+\' (positive constraint) or \'-\' (negative constraint)\nfollowed by either a ...*** type specification\nor a constraint in newick format.  \nNote that backbone constraints cannot be specified in ...*** format.", conNum, len);
+				constr.ReadDotStarConstraint(temp.c_str());
+				constraints.push_back(constr);
+				conNum++;
+				}
+			else if(temp[1] == '('){//if a constraint tree in parenthetical notation is used
+				bool numericalTaxa=true;
+				for(unsigned i=0;i<len;i++){//see if we are dealing with a treestring with taxa as # or names
+					if(isalpha(temp[i])){
+						numericalTaxa=false;
+						break;
+						}
+					}
+				bool pos;
+				if(temp[0] == '+') pos=true;
+				else pos=false;
+				//this is rather silly, but because any call to the Tree constructor will generate random
+				//branch lengths (even though this tree is only temporary for the reading of the constraint),
+				//it will change the seed.  So, store and restore it
+				int seed = rnd.seed();
+				//the last two arguments here specify that both polytomies and missing taxa (for backbone constraints) should be allowed
+				Tree contree(temp.c_str()+1, numericalTaxa, true, true);
+				//check if the tree is completely constrained - users try to do that to optimize on a fixed
+				//topology, but that should be done by specifying a starting tree and a topoweight of zero
+				if(contree.numNodesAdded == contree.numNodesTotal)
+					throw ErrorException("Constraint represents a fully resolved tree!\nIf you would like to fix the tree topology during a run,\ndo so by specifying your tree as a starting tree and\nsetting topoweight to 0.0");
+
+				rnd.set_seed(seed);
+
+				contree.CalcBipartitions(true);
+				vector<Bipartition> bip;
+				contree.root->GatherConstrainedBiparitions(bip);
+				if(bip.size() == 0) throw ErrorException("Specified constraint does not constrain any relationships.\n\tSee manual for constraint format");
+				if(pos==false && (bip.size() > 1)) throw ErrorException("Sorry, GARLI can currently only handle a single negatively (conversely) constrainted branch (bipartition):-(");
+				//BACKBONE - see if all taxa appear in this constraint or if its a backbone
+				if(contree.numTipsAdded < contree.numTipsTotal){
+					Bipartition mask = *(contree.root->bipart);
+					//complement the mask if necessary
+					TreeNode *n=contree.root;
+					while(n->IsInternal()) n = n->left;
+					if(mask.ContainsTaxon(n->nodeNum) == false) mask.Complement();
+
+					for(vector<Bipartition>::iterator bit=bip.begin();bit!=bip.end();bit++){
+						constraints.push_back(Constraint(&(*bit), &mask, pos));
+						conNum++;
+						}					
+					}
+				else{
+					for(vector<Bipartition>::iterator bit=bip.begin();bit!=bip.end();bit++){
+						constraints.push_back(Constraint(&(*bit), pos));
+						conNum++;
+						}
+					}
+				}
+			else{
+				throw ErrorException("problem with constraint # %d\nconstraint strings must start with \n\'+\' (positive constraint) or \'-\' (negative constraint)\nfollowed by either a ...*** type specification\nor a constraint in newick format", conNum, len);
+				}
+			}
+		}while(con.eof() == false);
+
+	//make sure the constraints are compatible with each other!
+	bool allBackbone = true;
+	bool anyBackbone = false;
+	bool sameMask = true;
+	for(vector<Constraint>::iterator first=constraints.begin();first!=constraints.end();first++){
+		if(first->IsBackbone() == false){
+			allBackbone = false;
+			sameMask = false;
+			}
+		else 
+			anyBackbone = true;
+		for(vector<Constraint>::iterator sec=first+1;sec!=constraints.end();sec++){
+			if((*first).IsPositive() != (*sec).IsPositive()) 
+				throw ErrorException("cannot mix positive and negative constraints!");
+			if(((*first).IsPositive()==false) && ((*sec).IsPositive()==false)) 
+				throw ErrorException("Sorry, GARLI can currently only handle a single negatively (conversely) constrainted branch :-(");
+			if((*first).ConstraintIsCompatibleWithConstraint((*sec)) == false) 
+				throw ErrorException("constraints are not compatible with one another!");
+			if(allBackbone && sameMask && first->IsBackbone() && sec->IsBackbone() && first == constraints.begin()){
+				if(first->GetBackboneMask()->EqualsEquals(*sec->GetBackboneMask()) == false)
+					sameMask = false;
+		}
+		}
+	}
+	Constraint::SetConstraintStatics(allBackbone, anyBackbone, sameMask);
+	//summarize the constraint info to the screen
+	string str;
+	int num=1;
+
+	if(allBackbone){
+		outman.UserMessage("All constraints are backbone");
+		if(sameMask)
+			outman.UserMessage("All constraints involve the same backbone set of taxa");
+		else 
+			outman.UserMessage("Constraints involve differing sets of taxa");
+		}
+	else if(anyBackbone)
+		outman.UserMessage("Some constraints are backbone");
+	if(constraints[0].IsPositive()){
+		outman.UserMessage("Found %d positively constrained bipartition(s)", constraints.size());
+		for(vector<Constraint>::iterator first=constraints.begin();first!=constraints.end();first++){
+			(*first).NumericalOutput(str);
+			if((*first).IsBackbone()) outman.UserMessage("     Bipartition %d (backbone): %s", num, str.c_str());
+			else outman.UserMessage("     Bipartition %d: %s", num, str.c_str());
+			num++;
+			}
+		}
+	else{
+		outman.UserMessage("Found 1 negatively (conversely) constrained bipartition");
+		constraints[0].NumericalOutput(str);
+		if(constraints[0].IsBackbone()) outman.UserMessage("     Bipartition %d (backbone): %s", num, str.c_str());
+		else outman.UserMessage("     Bipartition %d: %s", num, str.c_str());
+		}
+	}
+
+//this just "fakes" the swapping of the subtree rooted at cut to a postition as the sister of broken by adjusting the 
+//biparts across the tree.  This should only be used for NORMAL SPR's not subtree reorient SPR's
+void Tree::AdjustBipartsForSwap(int cut, int broken){
+	//first be sure the biparts are current
+	CalcBipartitions(true);
+	if(allNodes[cut]->anc->IsNotRoot()) allNodes[cut]->anc->RecursivelyAddOrRemoveSubtreeFromBipartitions(*(allNodes[cut]->bipart));
+	if(allNodes[broken]->anc->IsNotRoot()) allNodes[broken]->anc->RecursivelyAddOrRemoveSubtreeFromBipartitions(*(allNodes[cut]->bipart));
+	bipartCond = TEMP_ADJUSTED;
+	}
+
+//test whether the attachment of branch "cut" (subtree or tip) to branch "broken" (subtree or tip) is allowed by
+//any constraints.  The general purpose Constraint::BipartitionIsCompatibleWithConstraint function (which takes care of
+//positive and negative constraints, backbone or not) is called to check if the bipartition created by the union
+//of cut and broken is itself allowable.  Depending on the type of constraint, other checks may also need to be done.
+bool Tree::SwapAllowedByConstraint(const Constraint &constr, TreeNode *cut, ReconNode *broken, const Bipartition &proposed, const Bipartition *partialMask) {
+	//for a normal positive constraint with no mask we only need to check the bipartition about to be created
+	if(constr.IsPositive() && !constr.IsBackbone() && partialMask==NULL)
+		return constr.BipartitionIsCompatibleWithConstraint(proposed, NULL);
+	else{
+		//otherwise we need to check bipartitions across the tree
+		bool compat;
+		/*(check for meaningful intersection of constraint and partial/backbone mask here)*/
+		Bipartition jointMask;
+		bool meaningfulIntersection = jointMask.MakeJointMask(constr, partialMask);
+		if(!meaningfulIntersection) 
+			return true;
+
+		if(!broken->withinCutSubtree){
+			//if this is a normal SPR swap in which the cut subtree has the same orientation after the swap then we can 
+			//check the bipartition about to be created, and if that passes then adjust the bipartitions across the tree and
+			//recursively check the rest of the tree
+			compat = constr.BipartitionIsCompatibleWithConstraint(proposed, &jointMask);
+			if(compat == false) return compat;
+
+			//6/23/09 This call was moved up one level, so that it MUST called in RandomlyAttachTipWithConstraints or GatherValidReconnectionNodes
+			//before calling SwapAllowedByConstraint.  This saves a lot of work when looping over many constraints for a single swap
+			//that really only requires a single adjustment
+			//AdjustBipartsForSwap(cut->nodeNum, broken->nodeNum);
+			
+			compat = RecursiveAllowedByConstraintWithMask(constr, &jointMask, root);
+			}
+		else{
+			Tree propTree;
+			propTree.MimicTopo(this);
+			propTree.ReorientSubtreeSPRMutate(cut->nodeNum, broken, -1.0);
+
+			compat = (constr.IsPositive()) == (propTree.ContainsMaskedBipartitionOrComplement(*constr.GetBipartition(), jointMask) != NULL);
+			}
+		return compat;
+		}
+	}
+/*
+bool Tree::TaxonAdditionAllowedByPositiveConstraintWithMask(Constraint *constr, Bipartition *mask, TreeNode *toAdd, TreeNode *broken){
+	Bipartition proposed;
+	proposed.FillWithXORComplement(toAdd->bipart, broken->bipart);
+
+	bool compat = constr->BipartitionIsCompatibleWithConstraint(&proposed, mask);
+
+	if(compat==false) return compat;
+	//This is a little sneaky here.  Cut has not been added to the tree, but since we are going up from broken
+	//and it is present in the mask it will effectively appear in biparts in that direction
+	else if(broken->IsInternal()){
+		compat=RecursiveAllowedByConstraintWithMask(constr, mask, broken);
+		}
+	return compat;
+	}
+
+bool Tree::TaxonAdditionAllowedByNegativeConstraintWithMask(Constraint *constr, Bipartition *mask, TreeNode *toAdd, TreeNode *broken){
+	Bipartition proposed;
+	proposed.FillWithXORComplement(toAdd->bipart, broken->bipart);
+
+	bool compat = constr->BipartitionIsCompatibleWithConstraint(&proposed, mask);
+	if(compat==true) return compat;
+	else if(broken->IsInternal()) compat=RecursiveAllowedByConstraintWithMask(constr, mask, broken);
+	return compat;
+	}
+
+bool Tree::TaxonAdditionAllowedByPositiveBackboneConstraintWithMask(Constraint *constr, Bipartition *mask, TreeNode *toAdd, TreeNode *broken){
+	Bipartition proposed;
+	proposed.FillWithXORComplement(toAdd->bipart, broken->bipart);
+
+	bool compat = constr->BipartitionIsCompatibleWithConstraint(&proposed, mask);
+	if(compat==false) return compat;
+	else{
+		if(broken->anc->IsNotRoot()) broken->anc->RecursivelyAddOrRemoveSubtreeFromBipartitions(toAdd->bipart);
+		bipartCond = TEMP_ADJUSTED;
+
+		compat = RecursiveAllowedByConstraintWithMask(constr, mask, root);
+		CalcBipartitions(false);
+		}
+	return compat;
+	}
+
+bool Tree::TaxonAdditionAllowedByNegativeBackboneConstraintWithMask(Constraint *constr, Bipartition *mask, TreeNode *toAdd, TreeNode *broken){
+	//	Bipartition jointMask=*(constr->GetBackboneMask());
+//	jointMask.AndEquals(mask);
+
+	Bipartition proposed;
+	proposed.FillWithXORComplement(toAdd->bipart, broken->bipart);
+	//bool compat = constr->IsCompatibleWithConstraintWithMask(&proposed, &jointMask);
+	bool compat = constr->BipartitionIsCompatibleWithConstraint(&proposed, mask);
+	if(compat==false) return compat;
+	else{
+		if(broken->anc->IsNotRoot()) broken->anc->RecursivelyAddOrRemoveSubtreeFromBipartitions(toAdd->bipart);
+		bipartCond = TEMP_ADJUSTED;
+
+		compat = RecursiveAllowedByConstraintWithMask(constr, mask, root);
+		CalcBipartitions(false);
+		}
+	return compat;
+	}
+*/
+//This can be called with the root, and it then recurces through the tree until it finds a bipartition that conflicts
+//with the constraint.  Unlike the ContainsBipartition functions, it doesn't actually require that the actual tree
+//to be checked has been made (i.e. that the swap has been done) - just that the bipartitions have been altered
+//as if it had.  It therefore has lower overhead when checking swaps and should be preferred.  The mask passed in should only be 
+//should include any backbone constraint and/or a mask containing those taxa present in a growing tree
+bool Tree::RecursiveAllowedByConstraintWithMask(const Constraint &constr, const Bipartition *jointMask, const TreeNode *nd){
+	bool compat = true;
+	if(nd->IsNotRoot())
+		compat = constr.BipartitionIsCompatibleWithConstraint(*nd->bipart, jointMask);
+	if(compat==false) return compat;
+
+	if(nd->left->IsInternal()) compat=RecursiveAllowedByConstraintWithMask(constr, jointMask, nd->left);
+	if(compat==false) return compat;
+
+	if(nd->left->next->IsInternal()) compat=RecursiveAllowedByConstraintWithMask(constr, jointMask, nd->left->next);
+	if(compat==false) return compat;
+
+	if(nd->left->next->next != NULL)//this would be the right dec of the root
+		if(nd->left->next->next->IsInternal())
+			compat=RecursiveAllowedByConstraintWithMask(constr, jointMask, nd->left->next->next);
+
+	return compat;
+	}
+
+//DJZ 8-11-04  This version is only for the master doing SPRs on nodes that aren't in a subtree when subtree
+//mode is on.  Basically the only difference is that if the ancestor of the cut node is the root, we need to 
+//choose one of the other nonSubtree nodes to make a connector to avoid screwing up the subtree partitioning
+void Tree::SPRMutate(int cutnum, int broknum, FLOAT_TYPE optPrecision, const vector<int> &nonSubNodes)
+{	assert( numBranchesAdded > 3 );
+	assert(0);//needst to be verified
+	TreeNode* cut = allNodes[cutnum];
+	assert(cut!=NULL);
+	SweepDirtynessOverTree(cut->anc);
+	TreeNode *connector;
+
+	if(cut->anc->IsNotRoot()){
+		connector=cut->anc;
+		}
+	else{
+		bool foundAConn=false;
+		connector=cut->prev;
+		while(connector && !foundAConn)//try previous sibs
+			{if(connector->left && find(nonSubNodes.begin(),nonSubNodes.end(),connector->nodeNum)!=nonSubNodes.end())//not a terminal
+				foundAConn=true;
+			else
+				connector=connector->prev;
+			}
+		if(!foundAConn)
+			{connector=cut->next;//that didn't work try the next sibs
+			while(connector && !foundAConn)//try previous sibs
+				{if(connector->left && find(nonSubNodes.begin(),nonSubNodes.end(),connector->nodeNum)!=nonSubNodes.end())//not a terminal
+					foundAConn=true;
+				else
+					connector=connector->next;
+				}
+			}
+		if(!foundAConn)
+			return;//oops by chance we picked a trivial branch to cut, so it goes (if you want to call SPRMutate again that would make sure the tree always changes topo
+		}
+	
+	SweepDirtynessOverTree(cut);
+	TreeNode *replaceForConn;
+	if(cut->anc->anc){
+		//cut is not connected to the root, so we can steal it's ancestor as the new connector
+	   	if(cut==connector->left){
+	   		replaceForConn=connector->right;
+	   		}
+	   	else{
+	   		replaceForConn=connector->left;
+	   		}
+		replaceForConn->dlen+=connector->dlen;
+	   	connector->SubstituteNodeWithRespectToAnc(replaceForConn);
+	   	}
+	else{//cut is connected to the root so we need to steal a non terminal sib node as the connector
+		//this makes the root totally dirty
+		MakeNodeDirty(root);
+		
+		//Disconnect cut from the root
+		if(cut==root->left){
+			root->left=cut->next;
+			cut->next->prev=NULL;
+			}
+		else if(cut==root->right){
+			root->right=cut->prev;
+			cut->prev->next=NULL;
+			}
+		else{
+			assert(cut->prev==root->left && cut->next==root->right);//can only have a basal trifucation, or we're in trouble
+			cut->prev->next=cut->next;
+			cut->next->prev=cut->prev;
+			}
+		//root is now bifurcation
+		//preserve branch length info
+		if(root->right==connector)
+			root->left->dlen+=	connector->dlen;
+		else
+			root->right->dlen+=	connector->dlen;
+		//add the connectors two desccendants as descendants of the root
+		assert(connector->right==connector->left->next);
+		connector->SubstituteNodeWithRespectToAnc(connector->left);
+		root->AddDes(connector->right);
+		MakeNodeDirty(connector);
+		}
+		
+	//establish correct topology for connector and cut nodes
+	cut->anc=connector;
+	connector->left=connector->right=cut;
+	connector->next=connector->prev=connector->anc=cut->next=cut->prev=NULL;
+		
+	TreeNode *broken=allNodes[broknum];
+
+	broken->SubstituteNodeWithRespectToAnc(connector);
+	connector->AddDes(broken);
+
+
+
+	double len = max(broken->dlen*ZERO_POINT_FIVE, min_brlen);
+	SetBranchLength(connector, len);
+	SetBranchLength(broken, len);
+
+	SweepDirtynessOverTree(connector, cut);
+	MakeNodeDirty(connector);
+	
+#ifdef OPT_DEBUG
+	opt << "SPR\n";
+#endif
+	OptimizeBranchesWithinRadius(connector, optPrecision, 0, NULL);
+	bipartCond = DIRTY;
+	}
+
+void Tree::MimicTopo(const Tree *source){
+//DZ 10-25-02 This should be much easier and faster using the allnodes array rather
+//than being recursive.  Notice that even if the allNodes array of source is not
+//ordered according to nodeNum, the new tree will be.
+	TreeNode **allNs=source->allNodes;
+	for(int i=0;i<source->numNodesTotal;i++){
+		if(allNs[i]->anc!=NULL)
+			allNodes[i]->anc=allNodes[allNs[i]->anc->nodeNum];
+		else allNodes[i]->anc=NULL;
+		if(allNs[i]->left!=NULL){
+			allNodes[i]->left=allNodes[allNs[i]->left->nodeNum];
+			allNodes[i]->right=allNodes[allNs[i]->right->nodeNum];
+			}
+		else{
+			allNodes[i]->left=NULL;
+			allNodes[i]->right=NULL;
+			}
+		if(allNs[i]->next!=NULL)
+			allNodes[i]->next=allNodes[allNs[i]->next->nodeNum];
+		else allNodes[i]->next=NULL;
+		if(allNs[i]->prev!=NULL)
+			allNodes[i]->prev=allNodes[allNs[i]->prev->nodeNum];
+		else allNodes[i]->prev=NULL;
+		allNodes[i]->dlen=allNs[i]->dlen;
+		allNodes[i]->attached=true;
+		}
+	numNodesTotal=source->numNodesTotal;
+	numNodesAdded=source->numNodesAdded;
+	numTipsAdded=source->numTipsAdded;
+	numBranchesAdded=source->numBranchesAdded;
+	bipartCond = DIRTY;
+	}
+
+//this version is used for just copying a subtree,
+//but assumes that the nodenums will match.  Automatically
+//copys the cla indeces too
+void Tree::MimicTopo(TreeNode *nd, bool firstNode, bool sameModel){
+	//firstNode will be true if this is the base of the subtree to be copied.
+	//if it is true, the anc, next and prev should not be copied for that node 
+	//Above the firstNode, nodes will be assumed to be the same nodenum in both trees.  This 
+	//allows replicating nodeNums from a certain subtree up, but not in the rest of the tree
+	//The cla info will only be copied if the models are identical for the individuals (sameModel==true)
+	//otherwise the replicated nodes will be marked as dirty
+	TreeNode *mnd;
+	mnd=allNodes[nd->nodeNum];
+	mnd->attached=true;
+	if(!firstNode){
+		//stuff that should not be done for the root of the subtree
+		if(nd->anc){
+			mnd->anc=allNodes[nd->anc->nodeNum];
+			}
+		else{
+			mnd->anc=NULL;
+			}
+		if(nd->next){
+			mnd->next=allNodes[nd->next->nodeNum];
+				MimicTopo(nd->next, false, sameModel);
+			}
+		else 
+			mnd->next=NULL;
+		if(nd->prev){
+			mnd->prev=allNodes[nd->prev->nodeNum];
+			}
+		else 
+			mnd->prev=NULL;
+		}
+	//this should apply to all nodes
+	if(nd->left){ //if this is not a terminal
+		mnd->left=allNodes[nd->left->nodeNum];
+		mnd->right=allNodes[nd->right->nodeNum];
+		MimicTopo(nd->left, false, sameModel);
+		}
+	else
+		mnd->right=mnd->left=NULL;;
+
+	//the clas are now taken care of back where this was called	
+/*	if(nd->left){
+		if(sameModel==true)
+			mnd->CopyOneClaIndex(nd, claMan, DOWN);
+		else mnd->claIndexDown=claMan->SetDirty(mnd->claIndexDown);
+		}
+*/
+	mnd->dlen=nd->dlen;
+	bipartCond = DIRTY;
+}
+
+void Tree::CopyClaIndecesInSubtree(const TreeNode *from, bool remove){
+	//the bool argument "remove" designates whether the tree currently has cla arrays
+	//assigned to it or not (if not, it must have come from the unused tree vector)
+	//note that we assume that the node numbers and topologies match within the subtree
+	assert(from->anc);
+
+	//do the clas down
+	if(remove) claMan->DecrementCla(allNodes[from->nodeNum]->claIndexDown);
+	allNodes[from->nodeNum]->claIndexDown=from->claIndexDown;
+	if(allNodes[from->nodeNum]->claIndexDown != -1) claMan->IncrementCla(allNodes[from->nodeNum]->claIndexDown);
+	
+	//do the clas up left
+	if(remove) claMan->DecrementCla(allNodes[from->nodeNum]->claIndexUL);
+	allNodes[from->nodeNum]->claIndexUL=from->claIndexUL;
+	if(allNodes[from->nodeNum]->claIndexUL != -1) claMan->IncrementCla(allNodes[from->nodeNum]->claIndexUL);
+	
+	//do the clas up right
+	if(remove) claMan->DecrementCla(allNodes[from->nodeNum]->claIndexUR);
+	allNodes[from->nodeNum]->claIndexUR=from->claIndexUR;
+	if(allNodes[from->nodeNum]->claIndexUR != -1) claMan->IncrementCla(allNodes[from->nodeNum]->claIndexUR);
+	
+	if(from->left->IsInternal()) CopyClaIndecesInSubtree(from->left, remove);
+	if(from->right->IsInternal()) CopyClaIndecesInSubtree(from->right, remove);
+	}
+
+void Tree::DirtyNodesInSubtree(TreeNode *nd){
+	
+	MakeNodeDirty(nd);
+	if(nd->left->IsInternal()) DirtyNodesInSubtree(nd->left);
+	if(nd->right->IsInternal()) DirtyNodesInSubtree(nd->right);
+	
+	}
+
+void Tree::RescaleRateHet(CondLikeArray *destCLA, int dataIndex){
+
+		SequenceData *curData = dataPart->GetSubset(dataIndex);
+
+		FLOAT_TYPE *destination=destCLA->arr;
+		int *underflow_mult=destCLA->underflow_mult;
+		const int *c= curData->GetCounts();
+		const int nsites = destCLA->NChar();
+		const int nRateCats = destCLA->NRateCats();
+
+		//check if any clas are getting close to underflow
+#ifdef UNIX
+		posix_madvise(destination, sizeof(FLOAT_TYPE)*4*nRateCats*nsites, POSIX_MADV_SEQUENTIAL);
+		posix_madvise(underflow_mult, sizeof(int)*nsites, POSIX_MADV_SEQUENTIAL);
+#endif
+		FLOAT_TYPE large1 = 0.0, large2 = 0.0;
+		for(int i=0;i<nsites;i++){
+#ifdef USE_COUNTS_IN_BOOT
+			if(c[i] > 0){
+#else
+			if(1){
+#endif
+//for some reason optimzation in gcc 2.95 breaks the more optimal version of this code
+//this version is safer
+#if defined(__GNUC__) && __GNUC__ < 3 
+				small1 = FLT_MAX;
+				large1 = FLT_MIN;
+				for(int r=0;r<nRateCats;r++){
+					large2= max(destination[4*r+0] , destination[4*r+1]);
+					large2 = max(large2 , destination[4*r+2]);
+					large2 = max(large2 , destination[4*r+3]);
+					large1 = max(large1, large2);
+					}
+
+#else
+	#if (defined(_MSC_VER) || defined(__INTEL_COMPILER)) && !defined(SINGLE_PRECISION_FLOATS)
+			//This is a neat trick for quickly finding the approximately largest
+			//value of an array of doubles, but it only works on littleendian
+			//systems.  There's no easy way of detecting endianness at compile
+			//time that I've been able to find, but since x86 machines are always
+			//littleendian, this should be safe
+				int size = 4 * nRateCats;
+				unsigned int absvalue, largest_abs = 0;
+				for (int j = 0; j < size; j++) {
+					// Get upper 32 bits of a[i] and shift out sign bit:
+					absvalue = *((unsigned int*)&destination[j] + 1) * 2;
+					// Find numerically largest element (approximately):
+					if (absvalue > largest_abs) {
+						largest_abs = absvalue;
+						large1 = destination[j];
+						}
+					}
+	#else
+				large1= (destination[0] > destination[2] ? destination[0] : destination[2]);
+				large2= (destination[1] > destination[3] ? destination[1] : destination[3]);
+				large1= (large1 > large2 ? large1 : large2);
+
+				for(int r=1;r<nRateCats;r++){
+					large2= (destination[0 + r*4] > destination[2 + r*4] ? destination[0 + r*4] : destination[2 + r*4]);
+					large1= (large1 > large2 ? large1 : large2);				
+					large2= (destination[1 + r*4] > destination[3 + r*4] ? destination[1 + r*4] : destination[3 + r*4]);
+					large1= (large1 > large2 ? large1 : large2);	
+					}
+	#endif
+#endif
+
+				if(large1 < rescaleBelow){
+					//we aren't rescaling enough
+					if(large1 < reduceRescaleBelow){
+						//but the frequency can be increased.  throw out of here, reduce the rescaleEvery and try scoring again
+						if(rescaleEvery > 2){
+							outman.UserMessage("WARNING: Increasing rescaling frequency (site = %d L = %g data = %d)", i, large1, dataIndex);
+							throw(1);
+							}
+						//uh oh, we must have already reduced rescale as far as possible, and it still isn't enough.  Bail out.
+						else if(large1 < bailOutBelow){
+							outman.UserMessage("Can't rescale sufficiently, exiting (site = %d L = %g data = %d)", i, large1, dataIndex);
+							outman.UserMessage("You might try providing a better starting tree, or checking the accuracy of your alignment");
+							throw(1);
+							}
+						//we can't rescale any more frequently, but we're not yet at critical levels
+						else{
+							outman.UserMessage("WARNING: Can't increase rescaling further (site = %d L = %g data = %d)", i, large1, dataIndex);
+							}
+						}
+						
+					int index = 0;
+					while(((index + 1) < RESCALE_ARRAY_LENGTH) && (Tree::rescalePrecalcThresh[index + 1] > large1)){
+						index++;
+						}
+					int incr = Tree::rescalePrecalcIncr[index];
+					underflow_mult[i]+=incr;
+					FLOAT_TYPE mult=Tree::rescalePrecalcMult[index];
+					assert(large1 * mult < 1.0);
+					
+					for(int r=0;r<nRateCats;r++){
+						for(int q=0;q<4;q++){
+							destination[r*4 + q]*=mult;
+							assert(destination[r*4 +q] == destination[r*4 +q]);
+							assert(destination[r*4 +q] < 1e50);
+							}
+						}
+					}
+
+				destination+= 4*nRateCats;
+	#ifdef ALLOW_SINGLE_SITE
+				if(siteToScore > -1) break;
+	#endif
+				}
+			else{
+	#ifdef OPEN_MP
+			//this is a little strange, but dest only needs to be advanced in the case of OMP
+			//because sections of the CLAs corresponding to sites with count=0 are skipped
+			//over in OMP instead of being eliminated
+				destination += 4 * nRateCats;
+	#endif
+				}
+			}
+
+		destCLA->rescaleRank=0;
+		}
+
+void Tree::RescaleRateHetNState(CondLikeArray *destCLA, int dataIndex){
+	SequenceData *curData = dataPart->GetSubset(dataIndex);
+
+	FLOAT_TYPE *destination=destCLA->arr;
+	int *underflow_mult=destCLA->underflow_mult;
+
+	const int nsites = destCLA->NChar();
+	const int nstates = destCLA->NStates();
+	const int nRateCats = destCLA->NRateCats();
+	const int *c = curData->GetCounts();
+
+	//check if any clas are getting close to underflow
+#ifdef UNIX
+	posix_madvise(destination, sizeof(FLOAT_TYPE)*nstates*nRateCats*nsites, POSIX_MADV_SEQUENTIAL);
+	posix_madvise(underflow_mult, sizeof(int)*nsites, POSIX_MADV_SEQUENTIAL);
+#endif
+	FLOAT_TYPE large1 = 0.0;
+	for(int i=0;i<nsites;i++){
+#ifdef USE_COUNTS_IN_BOOT
+		if(c[i] > 0){
+#else
+		if(1){
+#endif
+
+#if (defined(_MSC_VER) || defined(__INTEL_COMPILER)) && !defined(SINGLE_PRECISION_FLOATS)
+			//This is a neat trick for quickly finding the approximately largest
+			//value of an array of doubles, but it only works on littleendian
+			//systems.  There's no easy way of detecting endianness at compile
+			//time that I've been able to find, but since x86 machines are always
+			//littleendian, this should be safe
+			int size = nstates * nRateCats;
+			unsigned int absvalue, largest_abs = 0;
+			for (int j = 0; j < size; j++) {
+				// Get upper 32 bits of a[i] and shift out sign bit:
+				absvalue = *((unsigned int*)&destination[j] + 1) * 2;
+				// Find numerically largest element (approximately):
+				if (absvalue > largest_abs) {
+					largest_abs = absvalue;
+					large1 = destination[j];
+					}
+				}
+			assert(largest_abs > 0);
+#else
+			
+			large1 = (destination[0] > destination[1]) ? destination[0] :  destination[1];
+			for(int s=2;s<nstates*nRateCats;s++){
+				large1 = (destination[s] > large1) ? destination[s] : large1;
+				}
+#endif
+
+			if(large1 < rescaleBelow){
+				//we aren't rescaling enough
+				if(large1 < reduceRescaleBelow){
+					 //but the frequency can be increased.  throw out of here, reduce the rescaleEvery and try scoring again
+					if(rescaleEvery > 2){
+						outman.UserMessage("WARNING: Increasing rescaling frequency (site = %d L = %g data = %d)", i, large1, dataIndex);
+						throw(1);
+						}
+					//uh oh, we must have already reduced rescale as far as possible, and it still isn't enough.  Bail out.
+					else if(large1 < bailOutBelow){
+						//poor blens can very rarely kill a gap model
+						if(someOrientedGap)
+							throw(UnscoreableException());
+						else{
+							outman.UserMessage("Can't rescale sufficiently, exiting (site = %d L = %g data = %d)", i, large1, dataIndex);
+							outman.UserMessage("You might try providing a better starting tree, or checking the accuracy of your alignment");
+							throw(1);
+							}
+						}
+					//we can't rescale any more frequently, but we're not yet at critical levels
+					else{
+						outman.UserMessage("WARNING: Can't increase rescaling further (site = %d L = %g data = %d)", i, large1, dataIndex);
+						}
+					}
+					
+				int index = 0;
+				while(((index + 1) < RESCALE_ARRAY_LENGTH) && (Tree::rescalePrecalcThresh[index + 1] > large1)){
+					index++;
+					}
+				int incr = Tree::rescalePrecalcIncr[index];
+				underflow_mult[i]+=incr;
+				FLOAT_TYPE mult=Tree::rescalePrecalcMult[index];
+				assert(large1 * mult < 1.0);
+
+				for(int q=0;q<nstates*nRateCats;q++){
+					destination[q]*=mult;
+					assert(destination[q] == destination[q]);
+					assert(destination[q] < 1.0e5);
+					}
+				}
+			destination+= nstates*nRateCats;
+#ifdef ALLOW_SINGLE_SITE
+			if(siteToScore > -1) break;
+#endif
+			}
+		else{
+#ifdef OPEN_MP
+			//this is a little strange, but dest only needs to be advanced in the case of OMP
+			//because sections of the CLAs corresponding to sites with count=0 are skipped
+			//over in OMP instead of being eliminated
+			destination += nstates * nRateCats;
+#endif
+			}
+		}
+
+	destCLA->rescaleRank=0;
+	}
+
+int Tree::ConditionalLikelihoodRateHet(int direction, TreeNode* nd, bool returnUnscaledSitePosteriors /*=false*/){
+	//note that fillFinalCLA just refers to whether we actually want to calc a CLA
+	//representing the contribution of the entire tree vs just calcing the score
+	//The only reason I can think of for doing that is to calc internal state probs
+	//the fuction will then return a pointer to the CLA
+
+	/*NOTE - if a dummy gap rooting is being used, it is assumed that this will be called with
+	nd = dummy->anc*/
+
+	assert(this != NULL);
+	calcCount++;
+
+	CondLikeArraySet *destCLA=NULL;
+
+	TreeNode* Lchild, *Rchild;
+	CondLikeArraySet *LCLA=NULL, *RCLA=NULL, *partialCLA=NULL;
+
+	//FLOAT_TYPE *Rprmat = NULL, *Lprmat = NULL;
+	FLOAT_TYPE blen1, blen2;
+
+	if(direction != ROOT){
+		//the only complicated thing here will be to set up the two children depending on the direction
+		//get all of the clas, underflow mults and pmat set up here, then the actual calc loops below 
+		//won't depend on direction
+		if(direction==DOWN){
+			Lchild=nd->left;
+			Rchild=nd->right;
+			
+			if(Lchild->IsInternal())
+				LCLA=GetClaDown(Lchild);
+			if(Rchild->IsInternal())
+				RCLA=GetClaDown(Rchild);
+			
+			blen1 = Lchild->dlen;
+			blen2 = Rchild->dlen;
+			}
+		else if(direction==UPRIGHT || direction==UPLEFT){
+			if(nd->anc){
+				Lchild=nd->anc;
+						
+				if(nd->anc->left==nd)
+					LCLA=GetClaUpLeft(Lchild);
+
+				else if(nd->anc->right==nd)
+					LCLA=GetClaUpRight(Lchild);
+
+				else//watch out here.  This is the case in which we want the cla at the root including the left
+					//and right, but not the middle.  We will confusingly store this in the root's DOWN cla
+					LCLA=GetClaDown(Lchild);
+
+				blen1 = nd->dlen;
+			
+				if(direction==UPRIGHT) Rchild=nd->left;
+				else Rchild=nd->right;
+				}
+			else{
+				if(direction==UPRIGHT){
+					Lchild=nd->left;
+					Rchild=nd->left->next;
+					}
+				else{
+					Lchild=nd->left->next;
+					Rchild=nd->right;
+					}
+				if(Lchild->IsInternal())
+					LCLA=GetClaDown(Lchild);
+
+				blen1 = Lchild->dlen;
+				}
+			
+			if(Rchild->IsInternal())
+				RCLA=GetClaDown(Rchild);
+			
+			blen2 = Rchild->dlen;
+			}
+
+		if(direction==DOWN) 
+			destCLA=GetClaDown(nd, false);
+		else if(direction==UPRIGHT) 
+			destCLA=GetClaUpRight(nd, false);
+		else if(direction==UPLEFT) 
+			destCLA=GetClaUpLeft(nd, false);
+
+		UpdateCLAs(destCLA, LCLA, RCLA, Lchild, Rchild, blen1, blen2);
+				}
+	
+	if(direction==ROOT){
+		//at the root we need to include the contributions of 3 branches.  Check if we have a
+		//valid CLA that already represents two of these three. If so we can save a bit of
+		//computation.  This will mainly be the case during blen optimization, when when we 
+		//only change one of the branches again and again.
+		TreeNode *child;
+		CondLikeArraySet *childCLA=NULL;
+
+		/*Here the dummy root (if used) needs to be the last taxon combined.
+		This rooting isn't currently necessary except in the case of oriented gap models.
+		Otherwise it becomes difficult to enforce the single-insert-on-tree rule.
+		Note that this assumes that this function was called with dummy->anc, so that it
+		must be one of the descendent taxa.*/
+		if(rootWithDummy){
+			if(nd->left == dummyRoot){
+				child=nd->left;
+				assert(!child->IsInternal());
+
+				partialCLA = GetClaUpLeft(nd, claMan->IsDirty(nd->claIndexUL));
+				}
+			else if(nd->right == dummyRoot){
+				child=nd->right;
+				assert(!child->IsInternal());
+
+				partialCLA = GetClaUpRight(nd, claMan->IsDirty(nd->claIndexUR));
+				}
+			else if(nd->left->next == dummyRoot){
+				child = nd->left->next;
+				assert(!child->IsInternal());
+
+				partialCLA = GetClaDown(nd, claMan->IsDirty(nd->claIndexDown));
+				}
+			else 
+				assert(0);
+			blen1 = child->dlen;
+			}
+		else{//not dummy rooting
+			if(claMan->IsDirty(nd->claIndexUL) == false){
+				partialCLA=GetClaUpLeft(nd, false);
+				child=nd->left;
+				if(child->IsInternal()){
+					childCLA=GetClaDown(child, true);
+					}
+				blen1 = child->dlen;
+				}
+			else if(claMan->IsDirty(nd->claIndexUR) == false){
+				partialCLA=GetClaUpRight(nd, false);
+				child=nd->right;
+				if(child->IsInternal()){
+					childCLA=GetClaDown(child, true);
+					}
+				blen1 = child->dlen;
+				}
+			else{//both of the UP clas must be dirty.  We'll use the down one as the 
+				//partial, and calc it now if necessary
+				if(claMan->IsDirty(nd->claIndexDown) == true)
+					partialCLA=GetClaDown(nd, true);
+				else partialCLA=GetClaDown(nd, false);
+				if(nd->anc!=NULL){
+					child=nd->anc;
+					if(child->left==nd){
+						childCLA=GetClaUpLeft(child, true);							
+						}
+					else if(child->right==nd){
+						childCLA=GetClaUpRight(child, true);
+						}
+					else{
+						//the node down that we want to get must be the root, and this
+						//node must be it's middle des.  Remember that the cla for that 
+						//direction is stored as the root DOWN direction
+						childCLA=GetClaDown(child);
+						}
+					blen1 = nd->dlen;
+					}
+				else{
+					child=nd->left->next;
+					if(child->IsInternal()){
+						childCLA=GetClaDown(child, true);
+						}
+					blen1 = child->dlen;
+					}
+				}
+			}
+		if(returnUnscaledSitePosteriors == false)
+			GetTotalScore(partialCLA, childCLA, child, blen1);
+		else
+			return FillStatewiseUnscaledPosteriors(partialCLA, childCLA, child, blen1);
+/*
+		mod->CalcPmats(blen1, -1.0, Lprmat, Rprmat);
+
+		if(fillFinalCLA==false){
+			if(childCLA!=NULL){//if child is internal
+				ProfScoreInt.Start();
+				if(modSpec.IsNucleotide())
+					lnL = GetScorePartialInternalRateHet(partialCLA, childCLA, &Lprmat[0]);
+				else
+					lnL = GetScorePartialInternalNState(partialCLA, childCLA, &Lprmat[0]);
+					
+				ProfScoreInt.Stop();
+				}	
+			else{
+				ProfScoreTerm.Start();
+				if(modSpec.IsNucleotide())
+					lnL = GetScorePartialTerminalRateHet(partialCLA, &Lprmat[0], child->tipData);
+				else
+					lnL = GetScorePartialTerminalNState(partialCLA, &Lprmat[0], child->tipData);
+
+				ProfScoreTerm.Stop();
+				}
+			}
+		
+		else{
+			//this is only for inferring internal states
+			//careful!  This will have to be returned manually!!
+			int wholeTreeIndex=claMan->AssignClaHolder();
+			claMan->FillHolder(wholeTreeIndex, ROOT);
+			claMan->ReserveCla(wholeTreeIndex);
+			if(childCLA!=NULL)//if child is internal
+				CalcFullCLAPartialInternalRateHet(claMan->GetCla(wholeTreeIndex), childCLA, &Lprmat[0], partialCLA);
+			else
+				CalcFullCLAPartialTerminalRateHet(claMan->GetCla(wholeTreeIndex), partialCLA, &Lprmat[0], child->tipData);
+				
+			return wholeTreeIndex;
+			}
+*/
+		}
+	return -1;
+	}
+
+void Tree::GetTotalScore(CondLikeArraySet *partialCLAset, CondLikeArraySet *childCLAset, TreeNode *child, FLOAT_TYPE blen1){
+
+	FLOAT_TYPE *Rprmat = NULL, *Lprmat = NULL;
+	CondLikeArray *partialCLA=NULL, *childCLA=NULL;
+	FLOAT_TYPE modlnL;
+	lnL = ZERO_POINT_ZERO;
+
+	//NOTE: for sitelike output the caller should already have set the sitelike mode on the tree and prepared
+	//the sitelike output file (ofprefix + ".sitelikes.log"), adding a header or clearing it out first.  The sitelike
+	//level should generally be negative when partitioned so that each subset appends on to the file.  See how
+	//this is done in PerformSearch.  This function IS responsible for resetting the sitelike level and turning off
+	//sitelike output for future scorings.
+
+	for(vector<ClaSpecifier>::iterator specs = claSpecs.begin();specs != claSpecs.end();specs++){
+		Model *mod = modPart->GetModel((*specs).modelIndex);
+		if(! mod->IsOrientedGap())//we don't actually use a pmat with final scoring in gap model, so no need to calc it here
+			mod->CalcPmats(blen1 * modPart->SubsetRate((*specs).dataIndex), -1.0, Lprmat, Rprmat);
+
+		partialCLA = partialCLAset->GetCLA((*specs).claIndex);
+
+		bool isNucleotide = mod->IsNucleotide();
+		if(childCLAset != NULL)
+			childCLA = childCLAset->GetCLA((*specs).claIndex);
+
+		if(childCLA!=NULL){//if child is internal
+			//when doing oriented gap we assume that the tree must be rooted, thus the child must be the dummy tip
+			assert(! mod->IsOrientedGap());
+			ProfScoreInt.Start();
+			if(isNucleotide)
+				modlnL = GetScorePartialInternalRateHet(partialCLA, childCLA, &Lprmat[0], (*specs).modelIndex, (*specs).dataIndex);
+			else
+				modlnL = GetScorePartialInternalNState(partialCLA, childCLA, &Lprmat[0], (*specs).modelIndex, (*specs).dataIndex);
+				
+			ProfScoreInt.Stop();
+			}	
+		else{
+			ProfScoreTerm.Start();
+			if(isNucleotide)
+				modlnL = GetScorePartialTerminalRateHet(partialCLA, &Lprmat[0], child->tipData[(*specs).dataIndex], (*specs).modelIndex, (*specs).dataIndex);
+			else if(mod->IsOrientedGap()){
+				modlnL = GetScorePartialTerminalOrientedGap(partialCLA, &Lprmat[0], child->tipData[(*specs).dataIndex], (*specs).modelIndex, (*specs).dataIndex);
+				}
+			else
+				modlnL = GetScorePartialTerminalNState(partialCLA, &Lprmat[0], child->tipData[(*specs).dataIndex], (*specs).modelIndex, (*specs).dataIndex);
+
+			ProfScoreTerm.Stop();
+			}
+		lnL += modlnL;
+		}
+	//sitelike output is non-persistent, so clear it out here
+	sitelikeLevel = 0;
+	}
+
+//this is more or less a clone of GetTotalScore that fills a cla set with the necessary values to calculate internal state reconstructions
+//and returns the corresponding cla index
+int Tree::FillStatewiseUnscaledPosteriors(CondLikeArraySet *partialCLAset, CondLikeArraySet *childCLAset, TreeNode *child, FLOAT_TYPE blen1){
+
+	FLOAT_TYPE *Rprmat = NULL, *Lprmat = NULL;
+	CondLikeArray *partialCLA=NULL, *childCLA=NULL, *destCLA=NULL;
+
+	//careful!  The cla will have to be returned manually by the caller
+	int posteriorClaIndex=claMan->AssignClaHolder();
+	claMan->FillHolder(posteriorClaIndex, ROOT);
+	claMan->ReserveCla(posteriorClaIndex);
+	CondLikeArraySet *destCLAset = claMan->GetCla(posteriorClaIndex);
+	//note that the NState functions are used here for both nuc and other datatypes
+
+	for(vector<ClaSpecifier>::iterator specs = claSpecs.begin();specs != claSpecs.end();specs++){
+		Model *mod = modPart->GetModel((*specs).modelIndex);
+		ModelSpecification *modSpec = modSpecSet.GetModSpec((*specs).modelIndex);
+
+		assert( modSpec->IsNucleotide() || modSpec->IsAminoAcid() || modSpec->IsCodon() );
+		mod->CalcPmats(blen1 * modPart->SubsetRate((*specs).dataIndex), -1.0, Lprmat, Rprmat);
+
+		partialCLA = partialCLAset->GetCLA((*specs).claIndex);
+		destCLA = destCLAset->GetCLA((*specs).claIndex);
+
+		if(childCLAset != NULL)
+			childCLA = childCLAset->GetCLA((*specs).claIndex);
+
+		if(childCLA!=NULL){//if child is internal
+			GetStatewiseUnscaledPosteriorsPartialInternalNState(destCLA, partialCLA, childCLA, &Lprmat[0], (*specs).modelIndex, (*specs).dataIndex);
+			}	
+		else{
+			GetStatewiseUnscaledPosteriorsPartialTerminalNState(destCLA, partialCLA, &Lprmat[0], child->tipData[(*specs).dataIndex], (*specs).modelIndex, (*specs).dataIndex);
+			}
+		}
+	return posteriorClaIndex;
+	}
+
+void Tree::UpdateCLAs(CondLikeArraySet *destCLAset, CondLikeArraySet *firstCLAset, CondLikeArraySet *secCLAset, TreeNode *firstChild, TreeNode *secChild, FLOAT_TYPE blen1, FLOAT_TYPE blen2){
+
+	FLOAT_TYPE *Rprmat = NULL, *Lprmat = NULL;
+	CondLikeArray *destCLA=NULL, *firstCLA=NULL, *secCLA=NULL;
+
+	for(vector<ClaSpecifier>::iterator specs = claSpecs.begin();specs != claSpecs.end();specs++){
+		Model *mod = modPart->GetModel((*specs).modelIndex);
+		mod->CalcPmats(blen1 * modPart->SubsetRate((*specs).dataIndex), blen2 * modPart->SubsetRate((*specs).dataIndex), Lprmat, Rprmat);
+
+		destCLA = destCLAset->GetCLA((*specs).claIndex);
+
+		bool isNucleotide = mod->IsNucleotide();
+		if(firstCLAset != NULL)
+			firstCLA = firstCLAset->GetCLA((*specs).claIndex);
+		if(secCLAset != NULL)
+			secCLA = secCLAset->GetCLA((*specs).claIndex);
+
+		if(firstCLAset!=NULL && secCLAset!=NULL){
+			//two internal children
+			ProfIntInt.Start();
+
+			if(isNucleotide)
+				CalcFullCLAInternalInternal(destCLA, firstCLA, secCLA, &Lprmat[0], &Rprmat[0], (*specs).modelIndex, (*specs).dataIndex);
+			else if(mod->IsOrientedGap())
+				CalcFullCLAOrientedGap(destCLA, &Lprmat[0], &Rprmat[0], firstCLA, secCLA, NULL, NULL, (*specs).modelIndex, (*specs).dataIndex);
+			else
+				CalcFullCLAInternalInternalNState(destCLA, firstCLA, secCLA, &Lprmat[0], &Rprmat[0], (*specs).modelIndex, (*specs).dataIndex);
+				
+			ProfIntInt.Stop();
+			}
+
+		else if(firstCLAset==NULL && secCLAset==NULL){
+			//two terminal children
+			ProfTermTerm.Start();
+			if(isNucleotide)
+				CalcFullCLATerminalTerminal(destCLA, &Lprmat[0], &Rprmat[0], firstChild->tipData[(*specs).dataIndex], secChild->tipData[(*specs).dataIndex], (*specs).modelIndex, (*specs).dataIndex);
+			else if(mod->IsOrientedGap())
+				CalcFullCLAOrientedGap(destCLA, &Lprmat[0], &Rprmat[0], NULL, NULL, firstChild->tipData[(*specs).dataIndex], secChild->tipData[(*specs).dataIndex], (*specs).modelIndex, (*specs).dataIndex);
+			else
+				CalcFullCLATerminalTerminalNState(destCLA, &Lprmat[0], &Rprmat[0], firstChild->tipData[(*specs).dataIndex], secChild->tipData[(*specs).dataIndex], (*specs).modelIndex, (*specs).dataIndex);
+			ProfTermTerm.Stop();
+			}
+
+		else{
+			//one terminal, one internal
+			ProfIntTerm.Start();
+
+			if(isNucleotide == false){
+				if(mod->IsOrientedGap()){
+					if(firstCLAset==NULL)
+						CalcFullCLAOrientedGap(destCLA, &Lprmat[0], &Rprmat[0], NULL, secCLA, firstChild->tipData[(*specs).dataIndex], NULL, (*specs).modelIndex, (*specs).dataIndex);
+					else
+						CalcFullCLAOrientedGap(destCLA, &Lprmat[0], &Rprmat[0], firstCLA, NULL, NULL, secChild->tipData[(*specs).dataIndex], (*specs).modelIndex, (*specs).dataIndex);
+					}
+				else{
+					if(firstCLAset==NULL)
+						CalcFullCLAInternalTerminalNState(destCLA, secCLA, &Rprmat[0], &Lprmat[0], firstChild->tipData[(*specs).dataIndex], (*specs).modelIndex, (*specs).dataIndex);
+					else 
+						CalcFullCLAInternalTerminalNState(destCLA, firstCLA, &Lprmat[0], &Rprmat[0], secChild->tipData[(*specs).dataIndex], (*specs).modelIndex, (*specs).dataIndex);
+					}
+				}
+			else{
+	#ifdef OPEN_MP
+				if(firstCLA==NULL){
+					assert(firstChild->ambigMap.size() > (*specs).dataIndex);
+					assert(firstChild->ambigMap[(*specs).dataIndex] != NULL);					
+					}
+				else{
+					assert(secChild->ambigMap.size() > (*specs).dataIndex);
+					assert(secChild->ambigMap[(*specs).dataIndex] != NULL);	
+					}
+
+				if(firstCLA==NULL)
+						CalcFullCLAInternalTerminal(destCLA, secCLA, &Rprmat[0], &Lprmat[0], firstChild->tipData[(*specs).dataIndex], firstChild->ambigMap[(*specs).dataIndex], (*specs).modelIndex, (*specs).dataIndex);
+					else
+						CalcFullCLAInternalTerminal(destCLA, firstCLA, &Lprmat[0], &Rprmat[0], secChild->tipData[(*specs).dataIndex], secChild->ambigMap[(*specs).dataIndex], (*specs).modelIndex, (*specs).dataIndex);
+				}
+	#else
+				if(firstCLA==NULL)
+					CalcFullCLAInternalTerminal(destCLA, secCLA, &Rprmat[0], &Lprmat[0], firstChild->tipData[(*specs).dataIndex], NULL, (*specs).modelIndex, (*specs).dataIndex);
+				else 
+					CalcFullCLAInternalTerminal(destCLA, firstCLA, &Lprmat[0], &Rprmat[0], secChild->tipData[(*specs).dataIndex], NULL, (*specs).modelIndex, (*specs).dataIndex);
+				}
+	#endif
+			ProfIntTerm.Stop();
+			}
+		if(destCLA->rescaleRank >= rescaleEvery){
+			ProfRescale.Start();
+			if(isNucleotide)
+				RescaleRateHet(destCLA, (*specs).dataIndex);
+			else
+				RescaleRateHetNState(destCLA, (*specs).dataIndex);
+
+			ProfRescale.Stop();
+			}
+		}
+	}
+
+int Tree::Score(int rootNodeNum /*=0*/){
+
+	TreeNode *rootNode=allNodes[rootNodeNum];
+
+#ifdef EQUIV_CALCS
+	if(dirtyEQ){
+		ProfEQVectors.Start();
+		root->SetEquivalentConditionalVectors(data);
+		ProfEQVectors.Stop();
+		dirtyEQ=false;
+		}
+#endif
+	bool scoreOK=true;
+	do{
+		try{
+			scoreOK=true;
+		
+			if(rootWithDummy){
+				assert(rootNodeNum == 0);
+				ConditionalLikelihoodRateHet( ROOT, dummyRoot->anc);
+				}
+			else
+				ConditionalLikelihoodRateHet( ROOT, rootNode);
+			}
+#if defined(NDEBUG)
+			catch(int){
+#else
+			catch(int err){
+#endif
+				assert(err==1);
+				scoreOK=false;
+				MakeAllNodesDirty();
+				rescaleEvery -= 2;
+				ofstream resc("rescale.log", ios::app);
+				resc << "rescale reduced to " << rescaleEvery << endl;
+				resc.close();
+				if(rescaleEvery<2) throw(ErrorException("Problem with rescaling during tree scoring.\nPlease report this error (and the details of your analysis) to garli.support at gmail.com."));
+				}
+		}while(scoreOK==false);
+
+	return 1;
+	}
+/*
+FLOAT_TYPE Tree::SubTreeScore( TreeNode *nd){
+	//calculates the likelihood of the tree above the node passed in
+	FLOAT_TYPE lnL = 0.0;
+	int nSites = data->NChar();
+	int ck;
+
+	if(claMan->IsDirty(nd->claIndexDown)){
+		if(mod->NRateCats()==1)
+		ConditionalLikelihood( DOWN, nd);
+		else
+			ConditionalLikelihoodRateHet(DOWN, nd);
+		}
+
+	FLOAT_TYPE *cla=claMan->GetCla(nd->claIndexDown)->arr;
+	int *underflow_mult=claMan->GetCla(nd->claIndexDown)->underflow_mult;
+
+	// loop over all patterns
+	long FLOAT_TYPE Lk;
+	FLOAT_TYPE siteL;
+	int ufcount=0;
+	const int *countit=data->GetCounts();
+	if(mod->PropInvar()==0.0){
+		if(mod->NRateCats()==1){//no invariants or gamma
+		for( int k = 0; k < nSites; k++ ){
+				Lk =  mod->Pi(0) * cla[0] + mod->Pi(1) * cla[1] + mod->Pi(2) * cla[2] + mod->Pi(3) * cla[3];
+				if(Lk<1e-300){
+					printf("Underflow! site %d, multiplier %d\n", k, underflow_mult[k]);
+					ufcount++;
+					}
+				cla+=4;
+				siteL = (log( Lk ) - underflow_mult[k]);
+				lnL += (  *countit++ *  siteL);
+				}
+			}
+		else{//gamma, no invariants
+			for( int k = 0; k < nSites; k++ ){
+				Lk =  mod->Pi(0) * cla[0] + mod->Pi(1) * cla[1] + mod->Pi(2) * cla[2] + mod->Pi(3) * cla[3];
+				Lk +=  mod->Pi(0) * cla[4] + mod->Pi(1) * cla[5] + mod->Pi(2) * cla[6] + mod->Pi(3) * cla[7];
+				Lk +=  mod->Pi(0) * cla[8] + mod->Pi(1) * cla[9] + mod->Pi(2) * cla[10] + mod->Pi(3) * cla[11];
+				Lk +=  mod->Pi(0) * cla[12] + mod->Pi(1) * cla[13] + mod->Pi(2) * cla[14] + mod->Pi(3) * cla[15];
+				if(Lk<1e-300){
+					printf("Underflow! site %d, multiplier %d\n", k, underflow_mult[k]);
+					ufcount++;
+					}
+				cla+=16;
+				//this is hard coded for 4 equal sized rate cats
+				siteL = (log( Lk*.25 ) - underflow_mult[k]);
+				lnL += (  *countit * siteL);
+				countit++;
+				}
+			}		
+		}
+	else {
+		FLOAT_TYPE prI=mod->PropInvar();
+		int lastConst=data->LastConstant();
+		const int *conBases=data->GetConstBases();
+		
+		if(mod->NRateCats()==1){//invariants without gamma
+	for( int k = 0; k < nSites; k++ ){
+		assert(0);
+		//this isn't valid :mod->Pi(conBases[k]), because the con bases are coded as 1 2 4 8 for amiguity
+		Lk =  mod->Pi(0) * cla[0] + mod->Pi(1) * cla[1] + mod->Pi(2) * cla[2] + mod->Pi(3) * cla[3];
+		if(Lk<1e-300){
+			printf("Underflow! site %d, multiplier %d\n", k, underflow_mult[k]);
+			ufcount++;
+			}
+		cla+=4;
+				if(k > lastConst){
+					siteL = log( Lk * (1.0-prI)) - underflow_mult[k];
+					lnL += ( *countit++ * siteL);
+					}
+				else{
+					siteL = log( Lk * (1.0-prI) + (prI * mod->Pi(conBases[k])) * exp((FLOAT_TYPE)underflow_mult[k]));
+					lnL += ( *countit++ * (siteL + underflow_mult[k]));
+					}
+				}
+			}
+		else{//gamma and invariants
+			FLOAT_TYPE scaledGammaProp=0.25 * (1.0-prI);
+			assert(0);
+			//this isn't valid :mod->Pi(conBases[k]), because the con bases are coded as 1 2 4 8 for amiguity
+			for( int k = 0; k < nSites; k++ ){
+				Lk =  mod->Pi(0) * cla[0] + mod->Pi(1) * cla[1] + mod->Pi(2) * cla[2] + mod->Pi(3) * cla[3];
+				Lk +=  mod->Pi(0) * cla[4] + mod->Pi(1) * cla[5] + mod->Pi(2) * cla[6] + mod->Pi(3) * cla[7];
+				Lk +=  mod->Pi(0) * cla[8] + mod->Pi(1) * cla[9] + mod->Pi(2) * cla[10] + mod->Pi(3) * cla[11];
+				Lk +=  mod->Pi(0) * cla[12] + mod->Pi(1) * cla[13] + mod->Pi(2) * cla[14] + mod->Pi(3) * cla[15];
+				if(Lk<1e-300){
+					printf("Underflow! site %d, multiplier %d\n", k, underflow_mult[k]);
+					ufcount++;
+					}
+				cla+=16;
+				if(k > lastConst){
+					siteL = log( Lk * scaledGammaProp) - underflow_mult[k];
+					lnL += ( *countit++ * siteL);
+					}
+				else{
+					siteL = log( Lk * scaledGammaProp + (prI * mod->Pi(conBases[k])) * exp((FLOAT_TYPE)underflow_mult[k]));
+					lnL += ( *countit++ * (siteL + underflow_mult[k]));
+					}
+				}
+			}
+		}
+	return lnL;
+	}
+*/
+/*
+FLOAT_TYPE Tree::SubTreeScoreRateHet( TreeNode *nd){
+	//calculates the likelihood of the tree above the node passed in
+	FLOAT_TYPE sublnL = 0.0;
+	int nSites = data->NChar();
+	int ck;
+
+	if(claMan->IsDirty(nd->claIndexDown))
+		ConditionalLikelihoodRateHet(DOWN, nd);
+
+
+	FLOAT_TYPE *cla=claMan->GetCla(nd->claIndexDown)->arr;
+	int *underflow_mult=claMan->GetCla(nd->claIndexDown)->underflow_mult;
+
+	// loop over all patterns
+	long FLOAT_TYPE Lk;
+	int ufcount=0;
+	const int *countit=data->GetCounts();
+	for( int k = 0; k < nSites; k++ ){
+		Lk =  mod->Pi(0) * cla[0] + mod->Pi(1) * cla[1] + mod->Pi(2) * cla[2] + mod->Pi(3) * cla[3];
+		Lk +=  mod->Pi(0) * cla[4] + mod->Pi(1) * cla[5] + mod->Pi(2) * cla[6] + mod->Pi(3) * cla[7];
+		Lk +=  mod->Pi(0) * cla[8] + mod->Pi(1) * cla[9] + mod->Pi(2) * cla[10] + mod->Pi(3) * cla[11];
+		Lk +=  mod->Pi(0) * cla[12] + mod->Pi(1) * cla[13] + mod->Pi(2) * cla[14] + mod->Pi(3) * cla[15];
+		if(Lk<1e-300){
+			printf("Underflow! site %d, multiplier %d\n", k, underflow_mult[k]);
+			ufcount++;
+			}
+		cla+=16;
+
+		sublnL += (  *countit * (log( Lk*.25 ) - underflow_mult[k]) );
+		countit++;
+		}
+	return sublnL;
+}
+*/
+void Tree::TraceDirtynessToRoot(TreeNode *nd){
+	SweepDirtynessOverTree(nd);
+
+/*	
+	while(nd){
+		if(nd->nodeNum==0 || nd->nodeNum>numTipsTotal) nd->claIndexDown=claMan->SetDirty(nd->claIndexDown, true);
+		nd=nd->anc;
+		}
+	
+*/	}
+
+void Tree::SweepDirtynessOverTree(TreeNode *nd, TreeNode *from/*=NULL*/){
+	lnL=-1;
+
+	//this will be the case if we are simply making the tree structure but
+	//never intend to score it
+	if(nd->IsInternal() && nd->claIndexDown == -1){
+		return;
+		}
+
+	if(from==NULL){
+		//if this is the branch where the dirtyness starts
+		if(nd->IsInternal()){
+			nd->claIndexUL=claMan->SetDirty(nd->claIndexUL);
+			nd->claIndexUR=claMan->SetDirty(nd->claIndexUR);
+			if(nd->left->IsInternal()) SweepDirtynessOverTree(nd->left, nd);
+			if(nd->right->IsInternal()) SweepDirtynessOverTree(nd->right, nd);
+			}
+		if(nd->anc!=NULL) SweepDirtynessOverTree(nd->anc, nd);	
+		}
+	else{
+	//if the change was below, invalidating clas above, also if the change
+	//was on the path connecting to the central des of the root
+		if(from==nd->anc || (nd->IsRoot() && from==nd->left->next)){
+			nd->claIndexUL=claMan->SetDirty(nd->claIndexUL);
+			nd->claIndexUR=claMan->SetDirty(nd->claIndexUR);
+			if(nd->left->IsInternal()) SweepDirtynessOverTree(nd->left, nd);
+			if(nd->right->IsInternal()) SweepDirtynessOverTree(nd->right, nd);
+			}
+		else if(from==nd->left){
+			nd->claIndexUR=claMan->SetDirty(nd->claIndexUR);
+			nd->claIndexDown=claMan->SetDirty(nd->claIndexDown);
+			if(nd->right->IsInternal()) SweepDirtynessOverTree(nd->right, nd);
+			if(nd->anc!=NULL) SweepDirtynessOverTree(nd->anc, nd);		
+			else if(nd->left->next->IsInternal()) SweepDirtynessOverTree(nd->left->next, nd);
+			}
+		else if(from==nd->right){
+			nd->claIndexUL=claMan->SetDirty(nd->claIndexUL);
+			nd->claIndexDown=claMan->SetDirty(nd->claIndexDown);
+			if(nd->left->IsInternal()) SweepDirtynessOverTree(nd->left, nd);
+			if(nd->anc!=NULL) SweepDirtynessOverTree(nd->anc, nd);		
+			else if(nd->left->next->IsInternal()) SweepDirtynessOverTree(nd->left->next, nd);
+			}
+		}
+	}
+
+void Tree::TraceDirtynessToNode(TreeNode *nd, int tonode){
+	if(nd->nodeNum==0 || nd->nodeNum>numTipsTotal) nd->claIndexDown=claMan->SetDirty(nd->claIndexDown);
+	while(nd->nodeNum!=tonode){
+		nd=nd->anc;
+		if(nd->nodeNum==0 || nd->nodeNum>numTipsTotal) nd->claIndexDown=claMan->SetDirty(nd->claIndexDown);
+		}
+	}
+
+void Tree::SortAllNodesArray(){
+	//this function will simply sort the nodes in the allNodes **TreeNode array by their nodeNum
+	//having the nodes always in order will make some other operations much simpler
+	//the root(nodenum=0) and terminals(nodenums=1->Ntax) should already be in order, so just sort
+	//starting at Ntax+1.  I'm making up a kind of wacky algorithm for this. DZ 10-30-02
+	for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+		if(allNodes[i]->nodeNum!=i){
+			while(allNodes[i]->nodeNum!=i){
+				TreeNode *toPlace=allNodes[i];
+				int rightPlace=toPlace->nodeNum;
+				TreeNode *temp=allNodes[rightPlace];//copy the node that is in toPlace's rightful place
+				allNodes[rightPlace]=allNodes[i];   //put toPlace where it belongs
+				allNodes[i]=temp;					//put the node that was moved in allNodes[i];
+				}
+			}
+		}
+	}
+
+void Tree::EliminateNode(int nn){
+	//DZ 10-30-02 this function will permenantly get rid of a node and correct all of the other nodeNums so that 
+	//there isn't a hole in the middle.  I think this just needs to be called when an inital tree is made trifrcating
+	//at the root.  This isn't the prettiest thing, but I can't think of an obvious way to make a tree that has 3 des
+	//from the root in the first place
+	delete allNodes[nn];
+	for(int i=nn;i<numNodesTotal-1;i++){
+		allNodes[i]=allNodes[i+1];
+		allNodes[i]->nodeNum=i;
+		}
+	allNodes[numNodesTotal-1]=NULL;
+	numNodesTotal--;
+
+	//now make a new allNodes array of the proper length
+	TreeNode **newNodes=new TreeNode*[numNodesTotal];
+	memcpy(newNodes, allNodes, sizeof(TreeNode*)*numNodesTotal);
+	delete []allNodes;
+	allNodes=newNodes;
+	}
+
+//CAREFUL!  This is called from CheckBalance and assumes that this tree 
+//does not share CLAs with any other.  
+void Tree::RotateNodesAtRoot(TreeNode *newroot){
+	//DZ 11-3-02 This can be used to rebalance the tree
+	//I'm assuming that this will be called with one of the des of the root;
+	assert(newroot->anc==root);
+	assert(newroot->IsInternal());
+	//detach the newroot from root, making it bifurcating
+	if(newroot==root->left){
+		root->left=newroot->next;
+		root->left->prev=NULL;
+		//DEBUG
+		int temp = root->claIndexDown;
+		root->claIndexDown = root->claIndexUL;
+		root->claIndexUL = temp;
+		}
+	else if(newroot==root->left->next){
+		root->left->next=root->right;
+		root->right->prev=root->left;
+		}
+	else{
+		root->right=root->left->next;
+		root->right->next=NULL;
+		//DEBUG
+		int temp = root->claIndexDown;
+		root->claIndexDown = root->claIndexUR;
+		root->claIndexUR = temp;
+		}
+	//now make the root the middle des of newroot and correct the dlens
+	root->anc=newroot;
+	newroot->left->next=root;
+	root->prev=newroot->left;
+	root->next=newroot->right;
+	newroot->right->prev=root;
+	root->dlen=newroot->dlen;
+	newroot->dlen=-1;
+	newroot->anc=NULL;
+	newroot->next=newroot->prev=NULL;
+	 //now make the new root nodeNum 0 in the allNodes array
+	TreeNode *tempnode=root;
+
+	//DEBUG
+/*	int tempindexdown=root->claIndexDown;
+	root->claIndexDown=newroot->claIndexDown;
+	newroot->claIndexDown=tempindexdown;
+	int tempindexUL=root->claIndexUL;
+	root->claIndexUL=newroot->claIndexUL;
+	newroot->claIndexUL=tempindexUL;
+	int tempindexUR=root->claIndexUR;
+	root->claIndexUR=newroot->claIndexUR;
+	newroot->claIndexUR=tempindexUR;
+*/	root=newroot;
+	allNodes[0]=newroot;
+	tempnode->nodeNum=root->nodeNum;
+	root->nodeNum=0;
+	allNodes[tempnode->nodeNum]=tempnode;
+	bipartCond = DIRTY;
+	//this form of setdirty won't shift every copy to a new topo, but will set them to dirty
+//	claMan->SetDirtyButDoNotMove(0, root->claIndex);
+//	claMan->SetDirtyButDoNotMove(tempnode->nodeNum, tempnode->claIndex);
+//	root->claIndexDown=claMan->SetDirty(root->claIndexDown);
+//	tempnode->claIndexDown=claMan->SetDirty(tempnode->claIndexDown);
+	}
+	
+//CAREFUL here!  This function assumes that this tree and ONLY this tree
+//points to a set of CLAs.  The indeces should all be valid on exit
+//but strange things may happen if other trees also point to them.
+void Tree::CheckBalance(){
+	//evaluate the average depth of all branches in the tree
+	int lb=0, mb=0, rb=0;
+	int ls=0, ms=0, rs=0;
+	int llb=0, lrb=0, mlb=0, mrb=0, rlb=0, rrb=0;
+	int lls=0, lrs=0, mls=0, mrs=0, rls=0, rrs=0;
+	int lastRot=0;
+	if(root->left->IsInternal()){
+		root->left->left->CountSubtreeBranchesAndDepth(llb, lls, 3, true);
+		root->left->right->CountSubtreeBranchesAndDepth(lrb, lrs, 3, true);
+		lb=llb+lrb+2;
+		ls=lls+lrs+4;
+		}
+	if(root->left->next->IsInternal()){
+		root->left->next->left->CountSubtreeBranchesAndDepth(mlb, mls, 3, true);
+		root->left->next->right->CountSubtreeBranchesAndDepth(mrb, mrs, 3, true);
+		mb=mlb+mrb+2;
+		ms=mls+mrs+4;
+		}
+	if(root->right->IsInternal()){
+		root->right->left->CountSubtreeBranchesAndDepth(rlb, rls, 3, true);
+		root->right->right->CountSubtreeBranchesAndDepth(rrb, rrs, 3, true);
+		rb=rlb+rrb+2;
+		rs=rls+rrs+4;
+		}
+/*	
+	int dl=0, dm=0, dr=0;
+	root->left->CalcDepth(dl);
+	root->left->next->CalcDepth(dm);
+	root->right->CalcDepth(dr);
+*/
+	do{
+		int cur=ls+ms+rs+3;
+		int rotLeft=(lls-llb+lrs-lrb+2+ms+mb+rs+rb+5);
+		int rotMid=(mls-mlb+mrs-mrb+2+ls+lb+rs+rb+5);
+		int rotRight=(rls-rlb+rrs-rrb+2+ms+mb+ls+lb+5);
+		
+		if(cur<=rotLeft&&cur<=rotMid&&cur<=rotRight) return;
+		else if(rotLeft<rotMid&&rotLeft<rotRight){
+			RotateNodesAtRoot(root->left);
+			lastRot=1;
+			}
+		else if(rotMid<rotLeft&&rotMid<rotRight){
+			RotateNodesAtRoot(root->left->next);
+			lastRot=2;
+			}
+		else if(rotRight<cur){
+			RotateNodesAtRoot(root->right);
+			lastRot=3;
+			}
+
+		lb=mb=rb=ls=ms=rs=llb=lrb=mlb=mrb=rlb=rrb=lls=lrs=mls=mrs=rls=rrs=0;
+	
+		if(root->left->IsInternal()){
+			root->left->left->CountSubtreeBranchesAndDepth(llb, lls, 3, true);
+			root->left->right->CountSubtreeBranchesAndDepth(lrb, lrs, 3, true);
+			lb=llb+lrb+2;
+			ls=lls+lrs+4;
+			}
+		if(root->left->next->IsInternal()){
+			root->left->next->left->CountSubtreeBranchesAndDepth(mlb, mls, 3, true);
+			root->left->next->right->CountSubtreeBranchesAndDepth(mrb, mrs, 3, true);
+			mb=mlb+mrb+2;
+			ms=mls+mrs+4;
+			}
+		if(root->right->IsInternal()){
+			root->right->left->CountSubtreeBranchesAndDepth(rlb, rls, 3, true);
+			root->right->right->CountSubtreeBranchesAndDepth(rrb, rrs, 3, true);
+			rb=rlb+rrb+2;
+			rs=rls+rrs+4;
+			}
+/*		
+		root->left->CalcDepth(dl);
+		root->left->next->CalcDepth(dm);
+		root->right->CalcDepth(dr);		
+
+
+
+*/		}while(1);
+	}
+
+void Tree::SwapAndFreeNodes(TreeNode *cop){
+	assert(cop->left);//only swap internal nodes
+	int tofree=cop->nodeNum;
+	//we need to actually swap the memory addresses of the nodes in the allnodes array so that all other node pointers in the
+	//tree stay correct
+	if(allNodes[tofree]->attached){
+		//find a node to swap with
+		int unused=FindUnusedNode(numTipsTotal+1);
+		TreeNode *tempnode=allNodes[unused];
+		//swap the adresses of the nodes
+		allNodes[unused]=allNodes[tofree];
+		allNodes[tofree]=tempnode;
+		//now adjust the nodeNums and claIndeces
+		int temp=allNodes[unused]->nodeNum;
+		allNodes[unused]->nodeNum=allNodes[tofree]->nodeNum;
+		allNodes[tofree]->nodeNum=temp;
+		
+		MakeNodeDirty(allNodes[unused]);
+		MakeNodeDirty(allNodes[tofree]);
+		/*
+		temp=allNodes[unused]->claIndexDown;
+		allNodes[unused]->claIndexDown=allNodes[tofree]->claIndexDown;
+		allNodes[tofree]->claIndexDown=temp;
+		temp=allNodes[unused]->claIndexUL;
+		allNodes[unused]->claIndexUL=allNodes[tofree]->claIndexUL;
+		allNodes[tofree]->claIndexUL=temp;
+		temp=allNodes[unused]->claIndexUR;
+		allNodes[unused]->claIndexUR=allNodes[tofree]->claIndexUR;
+		allNodes[tofree]->claIndexUR=temp;
+		*/
+		//set the nodes to dirty
+//		assert(0);
+//		allNodes[tofree]->claIndex=claMan->SetDirty(allNodes[tofree]->nodeNum, allNodes[tofree]->claIndex, true);
+//		allNodes[unused]->claIndex=claMan->SetDirty(allNodes[unused]->nodeNum, allNodes[unused]->claIndex, true);
+		allNodes[unused]->attached=true;
+		allNodes[tofree]->attached=true;//actual its not attached, but we need to mark it as such so it isn't used as a connector
+		}
+	else//this is odd, but if a node will need to be used to 
+		//mimic nodenums in the subtree, but was already unattached,
+		//we need to mark it as attached so that it isn't used for
+		//some other purpose.
+		allNodes[tofree]->attached=true;
+			
+	if(cop->left->left) SwapAndFreeNodes(cop->left);
+	if(cop->right->left) SwapAndFreeNodes(cop->right);	
+	}
+
+void Tree::CalcBipartitions(bool standardize){
+	if(!(bipartCond == CLEAN_STANDARDIZED && standardize == true) &&
+		!(bipartCond == CLEAN_UNSTANDARDIZED && standardize == false)){
+
+		if(bipartCond == CLEAN_UNSTANDARDIZED && standardize == true) 
+			root->StandardizeBipartition();
+		else
+			root->CalcBipartition(standardize);
+		if(standardize)	bipartCond = CLEAN_STANDARDIZED;
+		else bipartCond = CLEAN_UNSTANDARDIZED;
+		}
+//	root->VerifyBipartition(standardize);
+	}
+	
+void Tree::OutputBipartitions(){
+	ofstream out("biparts.log", ios::app);
+	root->OutputBipartition(out);
+	}
+/*
+void Tree::SetDistanceBasedBranchLengthsAroundNode(TreeNode *nd){
+	FLOAT_TYPE D1, D2, D3, k1, k2, k3, k4, a, b, c;
+	TreeNode *T1, *T2, *T3, *T4;
+
+	FindNearestTerminalUp(nd->left, T1, k1);
+	FindNearestTerminalUp(nd->right, T2, k2);
+	FindNearestTerminalsDown(nd->anc, nd, T3, T4, k3, k4);
+//	FindNearestTerminalUp(nd->, T2, k2);
+
+	if(k4<k3){
+		T3=T4;
+		k3=k4;
+		}
+#ifdef FLEX_RATES
+	assert(0);
+#else
+	D1=CalculatePDistance(T1->tipData, T2->tipData, data->NChar())/(1.0-mod->PropInvar()) - k1 -k2;
+	D2=CalculatePDistance(T1->tipData, T3->tipData, data->NChar())/(1.0-mod->PropInvar()) - k1 -k3;
+	D3=CalculatePDistance(T2->tipData, T3->tipData, data->NChar())/(1.0-mod->PropInvar()) - k2 -k3;
+#endif
+	b=(D3-D2+D1)*0.5;
+	if(b < min_brlen) b=min_brlen;
+	a=D1-b;
+	if(a < min_brlen) a=min_brlen;
+	c=D2-a;
+	if(c < min_brlen) c=min_brlen;
+	
+	nd->left->dlen=a;
+	nd->right->dlen=b;
+	nd->dlen=c;
+
+	SweepDirtynessOverTree(nd->left);
+	SweepDirtynessOverTree(nd);
+	SweepDirtynessOverTree(nd->right);
+	}
+
+void Tree::FindNearestTerminalUp(TreeNode *start, TreeNode *&term, FLOAT_TYPE &dist){
+	dist=999999.9;
+	int nodeDist=9999;
+	sprRange.clear();
+	sprRange.setseed(start->nodeNum);
+	int range=10;
+    for(int i = 0;i<range;i++){
+      int j =  sprRange.total;
+		for(int k=0; k < j; k++){
+			if(sprRange.front[k]==i){
+				TreeNode *cur=allNodes[sprRange.element[k]];
+				if(cur->left!=NULL){
+				    sprRange.addelement(cur->left->nodeNum, i+1, sprRange.pathlength[k]+cur->left->dlen);
+				    sprRange.addelement(cur->right->nodeNum, i+1, sprRange.pathlength[k]+cur->right->dlen);
+				    }
+				else{
+					//if(sprRange.pathlength[k]<dist){
+					if(sprRange.front[k]<nodeDist){
+						nodeDist=sprRange.front[k];
+						term=cur;
+						dist=sprRange.pathlength[k];
+						}
+					}
+				}
+		    }
+		}
+	}
+
+void Tree::FindNearestTerminalsDown(TreeNode *start, TreeNode *from, TreeNode *&term1, TreeNode *&term2, FLOAT_TYPE &dist1, FLOAT_TYPE &dist2){
+	dist1=dist2=999999.9;
+	int nodeDist1=9999, nodeDist2=9999;
+	sprRange.clear();
+	if(from==start->left) sprRange.setseed(start->right->nodeNum, start->right->dlen);
+	else sprRange.setseed(start->left->nodeNum, start->left->dlen);
+	int range=10;
+    for(int i = 0;i<range;i++){
+      int j =  sprRange.total;
+		for(int k=0; k < j; k++){
+			if(sprRange.front[k]==i){
+				TreeNode *cur=allNodes[sprRange.element[k]];
+				if(cur->left!=NULL){
+				    sprRange.addelement(cur->left->nodeNum, i+1, sprRange.pathlength[k]+cur->left->dlen);
+				    sprRange.addelement(cur->right->nodeNum, i+1, sprRange.pathlength[k]+cur->right->dlen);
+				    }
+				else{
+					//if(sprRange.pathlength[k]<dist1){
+					if(sprRange.front[k]<nodeDist1){
+						nodeDist1=sprRange.front[k];
+						term1=cur;
+						dist1=sprRange.pathlength[k];
+						}
+					}
+				}
+		    }
+		}
+
+	sprRange.clear();
+	if(start->anc != NULL){		
+		sprRange.setseed(start->anc->nodeNum, start->dlen);
+		for(int i = 0;i<range;i++){
+	      int j =  sprRange.total;
+			for(int k=0; k < j; k++){
+				if(sprRange.front[k]==i){
+					TreeNode *cur=allNodes[sprRange.element[k]];
+					if(cur->left!=NULL){
+					    if(cur->left!=from->anc) sprRange.addelement(cur->left->nodeNum, i+1, sprRange.pathlength[k]+cur->left->dlen);
+					    if(cur->right!=from->anc) sprRange.addelement(cur->right->nodeNum, i+1, sprRange.pathlength[k]+cur->right->dlen);
+					    }
+					else{
+						//if(sprRange.pathlength[k]<dist2){
+						if(sprRange.front[k]<nodeDist2){
+							nodeDist2=sprRange.front[k];
+							term2=cur;
+							dist2=sprRange.pathlength[k];
+							}
+						}
+					if(cur->anc) sprRange.addelement(cur->anc->nodeNum, i+1, sprRange.pathlength[k]+cur->dlen);
+					else sprRange.addelement(cur->left->next->nodeNum, i+1, sprRange.pathlength[k]+cur->left->next->dlen);
+					}
+			    }
+			}
+		}
+	else{
+		if(from!=start->left->next) sprRange.setseed(start->left->next->nodeNum, start->left->next->dlen);
+		else sprRange.setseed(start->right->nodeNum, start->right->dlen);
+		int range=10;
+	    for(int i = 0;i<range;i++){
+	      int j =  sprRange.total;
+			for(int k=0; k < j; k++){
+				if(sprRange.front[k]==i){
+					TreeNode *cur=allNodes[sprRange.element[k]];
+					if(cur->left!=NULL){
+					    sprRange.addelement(cur->left->nodeNum, i+1, sprRange.pathlength[k]+cur->left->dlen);
+					    sprRange.addelement(cur->right->nodeNum, i+1, sprRange.pathlength[k]+cur->right->dlen);
+					    }
+					else{
+						//if(sprRange.pathlength[k]<dist2){
+						if(sprRange.front[k]<nodeDist2){
+							nodeDist2=sprRange.front[k];
+							term2=cur;
+							dist2=sprRange.pathlength[k];
+							}
+						}
+					}
+			    }
+			}
+		}
+	assert(term1 != term2);
+	}
+*/
+void Tree::OptimizeBranchesAroundNode(TreeNode *nd, FLOAT_TYPE optPrecision, int subtreeNode){
+	//depricated
+	assert(0);
+	//this function will optimize the three branches (2 descendents and one anc) connecting
+	//to it.  It assumes that everything that is dirty has been marked so.
+	//by default there is only a single optimization pass over the three nodes
+/*	FLOAT_TYPE precision1, precision2;
+
+	if(subtreeNode==0) SetAllTempClasDirty();
+	
+	precision1=optPrecision;// * 0.5;
+	if(optPrecision > .2) precision2=0.0;
+	else precision2=precision1 * 0.5;
+	
+	if(nd != root){
+		BrentOptimizeBranchLength(precision1, nd, false);
+		BrentOptimizeBranchLength(precision1, nd->left, false);
+		BrentOptimizeBranchLength(precision1, nd->right, false);
+		}
+	else{
+		BrentOptimizeBranchLength(precision1, nd->left, false);
+		BrentOptimizeBranchLength(precision1, nd->left->next, false);
+		BrentOptimizeBranchLength(precision1, nd->right, false);	
+		}
+*/
+/*	
+	if(precision2 > 0){
+		//if were're doing multiple optimization passes, only this stuff needs to be set dirty
+		claMan->SetDirty(nd->nodeNum, nd->claIndex, true);
+		claMan->SetTempDirty(nd->nodeNum, true);
+		if(nd != root) claMan->SetTempDirty(nd->anc->nodeNum, true);
+
+		if(nd != root){
+			BrentOptimizeBranchLength(precision2, nd, false);
+			BrentOptimizeBranchLength(precision2, nd->left, false);
+			BrentOptimizeBranchLength(precision2, nd->right, false);
+			}
+		else {
+			BrentOptimizeBranchLength(precision2, nd->left, false);
+			BrentOptimizeBranchLength(precision2, nd->left->next, false);
+			BrentOptimizeBranchLength(precision2, nd->right, false);			
+			}
+		}
+*/		
+/*	//these must be called after all optimization passes are done around this node
+	TraceDirtynessToRoot(nd);
+	if(subtreeNode==0)
+		SetAllTempClasDirty();
+	else SetTempClasDirtyWithinSubtree(subtreeNode);
+*/	}
+
+void Tree::RerootHere(int newroot){
+	//DJZ 1-5-05 adding functionality to adjust the direction of existing clas
+	//so that they are still valid in the new context, rather than just dirtying everything
+	//DJZ 11/19/07 removing CLA adjustment code because it was buggy and didn't check the
+	//number of individuals that pointed to the same CLA, and so sometimes screwed things up.
+	//REMEMBER that the mutation_type of the individual this is called for needs to be 
+	// "|= rerooted" so that the topo numbers are updated properly
+
+	TreeNode *nroot=allNodes[newroot];
+
+	TreeNode *prevnode=nroot;
+	TreeNode *curnode=nroot->anc;
+	TreeNode *nextnode=nroot->anc->anc;
+
+	//this is necessary to properly dirty clas
+	TreeNode *lastOnPath=nroot;
+	while(lastOnPath->anc != root) lastOnPath = lastOnPath->anc;
+	SweepDirtynessOverTree(lastOnPath);
+
+	//first trace down to the old root and fix all the blens
+	//Each branch with take the length of its descendent on that path
+	//this will be easiest recursively
+	nroot->FlipBlensToRoot(0);
+	SweepDirtynessOverTree(nroot);
+	
+	//now take the new root's current ancestor and make it the middle des
+	//note that the existing cla directions at this node are still valid
+	nroot->left->next=curnode;
+	curnode->next=nroot->right;
+	nroot->right->prev=curnode;
+	curnode->prev=nroot->left;
+	
+	//this needs to work slightly differently if the old root is the anc of the new one
+	if(curnode!=root){
+		if(prevnode==curnode->left){
+			curnode->left=curnode->anc;
+			//curnode->AdjustClasForReroot(UPLEFT);
+			}
+		else{
+			curnode->right=curnode->anc;
+			//curnode->AdjustClasForReroot(UPRIGHT);
+			}
+//		SweepDirtynessOverTree(curnode);
+		
+		curnode->left->next=curnode->right;
+		curnode->left->prev=NULL;
+		curnode->right->prev=curnode->left;
+		curnode->right->next=NULL;
+
+		prevnode=curnode;
+		curnode=nextnode;
+		nextnode=nextnode->anc;
+		}
+		
+	curnode->anc=prevnode;
+	nroot->anc=NULL;
+			
+	while(curnode!=root){
+		if(prevnode==curnode->left){
+			curnode->left=nextnode;
+			//curnode->AdjustClasForReroot(UPLEFT);
+			}
+		else{
+			curnode->right=nextnode;
+			//curnode->AdjustClasForReroot(UPRIGHT);
+			}
+//		SweepDirtynessOverTree(curnode);
+			
+		curnode->left->next=curnode->right;
+		curnode->left->prev=NULL;
+		curnode->right->prev=curnode->left;
+		curnode->right->next=NULL;
+				
+		curnode->anc=prevnode;
+		
+		prevnode=curnode;
+		curnode=nextnode;
+		nextnode=nextnode->anc;
+		}
+	
+	//now deal with the old root, which is now curnode
+	if(prevnode==curnode->left){
+		curnode->left=curnode->right->prev;
+		curnode->left->prev=NULL;
+		//curnode->AdjustClasForReroot(UPLEFT);
+		}
+	else if(prevnode==curnode->left->next){
+		curnode->left->next=curnode->right;
+		curnode->right->prev=curnode->left;
+		//clas don't need to be adjusted in this case
+		}
+	else{
+		curnode->right=curnode->left->next;
+		curnode->right->next=NULL;		
+		//curnode->AdjustClasForReroot(UPRIGHT);
+		}
+	MakeNodeDirty(curnode);
+		
+	curnode->anc=prevnode;
+	
+	//now we just need to make the newroot node0 and swap it with the old root, which means moving the
+	//_data_ to node 0, not just swapping the memory addresses
+	
+	SwapNodeDataForReroot(nroot);
+
+	root->CheckTreeFormation();
+	bipartCond = DIRTY;
+//	MakeAllNodesDirty();
+//	Score();
+	}
+
+void Tree::SwapNodeDataForReroot(TreeNode *nroot){
+	TreeNode tempold;
+	tempold.left=root->left;
+	tempold.right=root->right;
+	tempold.next=root->next;
+	tempold.prev=root->prev;
+	//note that we need to watch out here if the new root is currently the anc of the old root
+	if(root->anc==nroot) tempold.anc=root;
+	else tempold.anc=root->anc;
+	tempold.dlen=root->dlen;
+	
+	tempold.claIndexDown=root->claIndexDown;
+	tempold.claIndexUL=root->claIndexUL;
+	tempold.claIndexUR=root->claIndexUR;
+	
+	TreeNode tempnew;
+	tempnew.left=nroot->left;
+	tempnew.right=nroot->right;
+	tempnew.next=nroot->next;
+	tempnew.prev=nroot->prev;
+	tempnew.anc=nroot->anc;
+	tempnew.dlen=nroot->dlen;	
+	tempnew.claIndexDown=nroot->claIndexDown;
+	tempnew.claIndexUL=nroot->claIndexUL;
+	tempnew.claIndexUR=nroot->claIndexUR;
+
+	root->left=tempnew.left;
+	root->left->anc=root;
+	root->right=tempnew.right;
+	root->right->anc=root;
+	root->left->next->anc=root;
+	root->prev=root->next=NULL;
+	root->anc=NULL;
+	root->dlen=-1;
+	root->claIndexDown=tempnew.claIndexDown;
+	root->claIndexUL=tempnew.claIndexUL;
+	root->claIndexUR=tempnew.claIndexUR;
+
+	MakeNodeDirty(root);
+	
+	nroot->left=tempold.left;
+	nroot->left->anc=nroot;
+	nroot->right=tempold.right;
+	nroot->next=tempold.next;
+	if(nroot->next) nroot->next->prev=nroot;
+	nroot->prev=tempold.prev;
+	if(nroot->prev) nroot->prev->next=nroot;
+	nroot->right->anc=nroot;
+	nroot->anc=tempold.anc;
+	nroot->claIndexDown=tempold.claIndexDown;
+	nroot->claIndexUL=tempold.claIndexUL;
+	nroot->claIndexUR=tempold.claIndexUR;
+
+	MakeNodeDirty(nroot);
+	
+	if(nroot->anc->left==root){
+		nroot->anc->left=nroot;
+		nroot->prev=NULL;
+		nroot->next=nroot->anc->right;
+		nroot->next->prev=nroot;
+		}
+	else if(nroot->anc->right==root){
+		nroot->anc->right=nroot;
+		nroot->next=NULL;
+		nroot->prev=nroot->anc->left;
+		nroot->prev->next=nroot;
+		}
+	else{
+		nroot->anc->left->next=nroot;
+//		nroot->next=NULL;
+		nroot->prev=nroot->anc->left;
+//		nroot->prev->next=nroot;		
+		}
+	nroot->dlen=tempold.dlen;
+	}
+
+	
+void Tree::MakeNodeDirty(TreeNode *nd){
+	if(nd->claIndexDown != -1)
+		nd->claIndexDown=claMan->SetDirty(nd->claIndexDown);
+	if(nd->claIndexUL != -1)
+		nd->claIndexUL=claMan->SetDirty(nd->claIndexUL);
+	if(nd->claIndexUR != -1)
+		nd->claIndexUR=claMan->SetDirty(nd->claIndexUR);
+	}
+	
+void Tree::RemoveTempClaReservations(){
+	if(memLevel > 1){
+		for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+			claMan->ClearTempReservation(allNodes[i]->claIndexDown);
+			}
+		}
+	
+	for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+		claMan->ClearTempReservation(allNodes[i]->claIndexUR);
+		}
+	for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+		claMan->ClearTempReservation(allNodes[i]->claIndexUL);
+		}
+	}
+
+void Tree::ReclaimUniqueClas(){
+	for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+		if(claMan->GetNumAssigned(allNodes[i]->claIndexDown) == 1){
+			claMan->ReclaimSingleCla(allNodes[i]->claIndexDown);
+			}
+		if(claMan->GetNumAssigned(allNodes[i]->claIndexUL) == 1){
+			claMan->ReclaimSingleCla(allNodes[i]->claIndexUL);
+			}
+		if(claMan->GetNumAssigned(allNodes[i]->claIndexUR) == 1){
+			claMan->ReclaimSingleCla(allNodes[i]->claIndexUR);
+			}
+		}
+	}
+
+void Tree::MarkUpwardClasToReclaim(int subtreeNode){
+	//if we are somewhat low on clas, mark some reclaimable that were 
+	//used tracing the likelihood upward for blen optimization
+	assert(0);
+	if(subtreeNode==0){
+/*		if(memLevel==2){
+			if(allNodes[0]->claIndexUL > 0)
+				claMan->MarkReclaimable(allNodes[0]->claIndexUL, 2);			
+			if(allNodes[0]->claIndexUR > 0)
+				claMan->MarkReclaimable(allNodes[0]->claIndexUR, 2);		
+			}
+*/		for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+//			claMan->MarkReclaimable(allNodes[i]->claIndexUL, 2, false);
+//			claMan->MarkReclaimable(allNodes[i]->claIndexUR, 2, false);
+			}
+		}
+	else{
+		for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+			if((allNodes[i]->nodeNum != subtreeNode) && (allNodes[i]->nodeNum != allNodes[subtreeNode]->anc->nodeNum)){
+				if(allNodes[i]->claIndexUL > 0){
+//					claMan->MarkReclaimable(allNodes[i]->claIndexUL, 2, false);
+					}
+				if(allNodes[i]->claIndexUR > 0){
+//					claMan->MarkReclaimable(allNodes[i]->claIndexUR, 2, false);
+					}
+				}
+			}
+		}
+	}
+
+void Tree::MarkDownwardClasToReclaim(int subtreeNode){
+	//if we're calling this, we must really be desperate for clas
+	//this should only be called after the tree has been scored
+	assert(0);
+
+	if(subtreeNode==0){
+		if(memLevel<3){
+			for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+//				claMan->MarkReclaimable(allNodes[i]->claIndexDown, 1);
+				}
+			}
+		else{
+			for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+//				claMan->MarkReclaimable(allNodes[i]->claIndexDown, 1, false);
+				}
+			}
+		}
+	else{
+		return;  //I think that this is safe, since in general many fewer node will be necessary in subtree mode
+		for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+			if((allNodes[i]->nodeNum != subtreeNode) && (allNodes[i]->nodeNum != allNodes[subtreeNode]->anc->nodeNum)){
+				if(allNodes[i]->claIndexUL > 0){
+//					claMan->MarkReclaimable(allNodes[i]->claIndexUL, 1);
+					}
+				}
+			}
+		}
+	}
+
+void Tree::MarkClasNearTipsToReclaim(int subtreeNode){
+	assert(0);
+	if(subtreeNode==0){
+		for(int i=1;i<numTipsTotal;i++){
+//			claMan->MarkReclaimable(allNodes[i]->anc->claIndexDown, 1, false);
+			}
+		}
+	else{
+		return;  //I think that this is safe, since in general many fewer node will be necessary in subtree mode
+		for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+			if((allNodes[i]->nodeNum != subtreeNode) && (allNodes[i]->nodeNum != allNodes[subtreeNode]->anc->nodeNum)){
+				if(allNodes[i]->claIndexUL > 0){
+//					claMan->MarkReclaimable(allNodes[i]->claIndexUL, 1);
+					}
+				}
+			}
+		}
+	}
+
+//PARTITION
+void Tree::OutputNthClaAcrossTree(ofstream &deb, TreeNode *nd, int site, int modIndex){
+	//int site=0;
+	int nstates = modPart->GetModel(modIndex)->NStates();
+	int rateCats = modPart->GetModel(modIndex)->NRateCats();
+	int index=nstates * rateCats * site;
+
+	bool outputDirtyClas = false;
+
+	if(nd->IsInternal()){
+		if(claMan->IsDirty(nd->claIndexDown) == false){
+			deb << nd->nodeNum << "\t0\t" << nd->claIndexDown << "\t";
+			const CondLikeArray *cla = claMan->GetCla(nd->claIndexDown)->theSets[modIndex];
+			for(int i=0;i<nstates*rateCats;i++) 
+				deb << cla->arr[index+i] << "\t";
+			deb << cla->underflow_mult[site];
+			deb <<"\n";
+			}
+		else if(outputDirtyClas){
+			deb << nd->nodeNum << "\t0\t" << nd->claIndexDown << "\n";
+			}
+		}
+	if(nd->IsInternal()){
+		if(claMan->IsDirty(nd->claIndexUL) == false){
+			deb << nd->nodeNum << "\t1\t" << nd->claIndexUL << "\t";
+			const CondLikeArray *cla = claMan->GetCla(nd->claIndexUL)->theSets[modIndex];
+			for(int i=0;i<nstates*rateCats;i++) 
+				deb << cla->arr[index+i] << "\t";
+			deb << cla->underflow_mult[site];
+			deb <<"\n";
+			}
+		else if(outputDirtyClas){
+			deb << nd->nodeNum << "\t1\t" << nd->claIndexUL << "\n";
+			}
+		}
+	if(nd->IsInternal()){
+		if(claMan->IsDirty(nd->claIndexUR) == false){
+			deb << nd->nodeNum << "\t2\t" << nd->claIndexUR << "\t";
+			const CondLikeArray *cla = claMan->GetCla(nd->claIndexUR)->theSets[modIndex];
+			for(int i=0;i<nstates*rateCats;i++) 
+				deb << cla->arr[index+i] << "\t";
+			deb << cla->underflow_mult[site];
+			deb <<"\n";
+			}
+		else if(outputDirtyClas){			
+			deb << nd->nodeNum << "\t2\t" << nd->claIndexUR << "\n";
+			}
+		}
+	if(nd->IsInternal())
+		OutputNthClaAcrossTree(deb, nd->left, site, modIndex);
+	if(nd->next!=NULL)
+		OutputNthClaAcrossTree(deb, nd->next, site, modIndex);
+	}
+
+void Tree::CountNumReservedClas(int &clean, int &tempRes, int&res){
+	clean=0;
+	tempRes=0;
+	res=0;
+	
+	if(claMan->IsDirty(allNodes[0]->claIndexDown)==false){
+		clean++;
+		res += (claMan->IsClaReserved(allNodes[0]->claIndexDown));
+		tempRes += (claMan->IsClaTempReserved(allNodes[0]->claIndexDown));
+		}
+	if(claMan->IsDirty(allNodes[0]->claIndexUL)==false){
+		clean++;
+		res += (claMan->IsClaReserved(allNodes[0]->claIndexUL));
+		tempRes += (claMan->IsClaTempReserved(allNodes[0]->claIndexUL));
+		}
+	if(claMan->IsDirty(allNodes[0]->claIndexUR)==false){
+		clean++;
+		res += (claMan->IsClaReserved(allNodes[0]->claIndexUR));
+		tempRes += (claMan->IsClaTempReserved(allNodes[0]->claIndexUR));
+		}
+	for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+		if(claMan->IsDirty(allNodes[i]->claIndexDown)==false){
+			clean++;
+			res += (claMan->IsClaReserved(allNodes[i]->claIndexDown));
+			tempRes += (claMan->IsClaTempReserved(allNodes[i]->claIndexDown));
+			}
+		if(claMan->IsDirty(allNodes[i]->claIndexUL)==false){
+			clean++;
+			res += (claMan->IsClaReserved(allNodes[i]->claIndexUL));
+			tempRes += (claMan->IsClaTempReserved(allNodes[i]->claIndexUL));
+			}
+		if(claMan->IsDirty(allNodes[i]->claIndexUR)==false){
+			clean++;
+			res += (claMan->IsClaReserved(allNodes[i]->claIndexUR));
+			tempRes += (claMan->IsClaTempReserved(allNodes[i]->claIndexUR));
+			}
+		}
+	}
+
+void Tree::SetupClasForSubtreeMode(int subtreeNode){
+	TreeNode *subnode=allNodes[subtreeNode];
+	
+	claMan->ReserveCla(subnode->claIndexDown, false);
+	claMan->ReserveCla(subnode->claIndexUL, false);
+	claMan->ReserveCla(subnode->claIndexUR, false);
+	
+	if(subnode->anc != root){
+		if(subnode->anc->left==subnode) claMan->ReserveCla(subnode->anc->claIndexUL, false);
+		else if(subnode->anc->right==subnode) claMan->ReserveCla(subnode->anc->claIndexUR, false);
+		}
+	
+	DirtyNodesOutsideOfSubtree(root, subtreeNode);
+	}
+	
+void Tree::DirtyNodesOutsideOfSubtree(TreeNode *nd, int subtreeNode){
+
+	if(nd != root){
+		claMan->ReclaimSingleCla(nd->claIndexDown);
+		claMan->ReclaimSingleCla(nd->claIndexUL);
+		claMan->ReclaimSingleCla(nd->claIndexUR);
+		}
+	
+	if(nd->left->IsInternal() && nd->left->nodeNum != subtreeNode && nd->left->nodeNum != allNodes[subtreeNode]->anc->nodeNum){
+		DirtyNodesOutsideOfSubtree(nd->left, subtreeNode);
+		}
+	if(nd->right->IsInternal() && nd->right->nodeNum != subtreeNode && nd->right->nodeNum != allNodes[subtreeNode]->anc->nodeNum){
+		DirtyNodesOutsideOfSubtree(nd->right, subtreeNode);
+		}
+	if(nd->IsRoot() && nd->left->next->IsInternal() && nd->left->next->nodeNum != subtreeNode && nd->left->next->nodeNum != allNodes[subtreeNode]->anc->nodeNum){
+		DirtyNodesOutsideOfSubtree(nd->left->next, subtreeNode);
+		}
+	}
+
+void Tree::OutputValidClaIndeces(){
+	ofstream cla("claind.log");
+	if(claMan->IsDirty(allNodes[0]->claIndexDown)==false){
+		cla << "0\t" << allNodes[0]->claIndexDown << "\t" << claMan->GetNumAssigned(allNodes[0]->claIndexDown) << "\t" << claMan->GetReclaimLevel(allNodes[0]->claIndexDown) << "\t" << claMan->IsClaReserved(allNodes[0]->claIndexDown) <<"\n";
+		}
+	for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+		cla << i << "\t" << allNodes[i]->claIndexDown << "\t" << claMan->GetNumAssigned(allNodes[i]->claIndexDown) << "\t" << claMan->GetReclaimLevel(allNodes[i]->claIndexDown) << "\t" << claMan->IsClaReserved(allNodes[i]->claIndexDown) << "\n";
+		}
+	cla.close();
+	}
+
+void Tree::GetInternalStateString(char *string, int nodeNum){
+	assert(0);
+//	Score(nodeNum);
+//	InferStatesFromCla(string, claMan->GetTempCla()->arr, data->NChar());	
+	}
+
+void Tree::InferAllInternalStateProbs(const char *ofprefix){
+	char filename[80];
+	sprintf(filename, "%s.internalstates.log", ofprefix);
+	ofstream out(filename);
+	out.precision(5);
+	AssignCLAsFromMaster();
+	RecursivelyCalculateInternalStateProbs(root, out);
+	out.close();
+	}
+
+void Tree::RecursivelyCalculateInternalStateProbs(TreeNode *nd, ofstream &out){
+	if(nd->IsInternal()) RecursivelyCalculateInternalStateProbs(nd->left, out);
+	if(nd->next) RecursivelyCalculateInternalStateProbs(nd->next, out);
+	
+	if(nd->IsInternal()){
+		//what this now returns is really the unscaled posterior values for each state, marginalized across rates (including any invariant class).
+		//thus, the state frqeuencies have already been figured in and nothing needs to be done in InferStatesFromCla besides divide each by the sum
+		//note that this clas then only uses the first nstates x nchar portion, instead of the usual nstates x nchar x nrates
+		int wholeTreeIndex = ConditionalLikelihoodRateHet(ROOT, nd, true);
+		CondLikeArraySet *CLAset = claMan->GetCla(wholeTreeIndex);
+
+		//output newick strings with both names and numbers indicating which node this corresponds to
+		string subtreeString;
+		nd->MakeNewickForSubtree(subtreeString, dataPart, false, false, false);	
+		out << "node " << nd->nodeNum << "\t" << subtreeString.c_str() << "\t";
+		subtreeString.clear();
+		nd->MakeNewickForSubtree(subtreeString, dataPart, false, false, true);	
+		out << subtreeString.c_str() << endl;
+
+		for(vector<ClaSpecifier>::iterator c = claSpecs.begin() ; c != claSpecs.end() ; c++){
+			const CondLikeArray *thisCLA = CLAset->GetCLA((*c).claIndex);
+			const ModelSpecification *modSpec = modSpecSet.GetModSpec((*c).modelIndex);
+			
+			vector<InternalState> stateProbs;
+			InferStatesFromCla(stateProbs, thisCLA->arr, thisCLA->NChar(), thisCLA->NStates());
+
+			//this just maps the indecies used in the clas to actual states
+			StateSet *states;
+			if(modSpec->IsNucleotide())
+				states = new StateSet(4);
+			else if(modSpec->IsAminoAcid()){
+				if(modSpec->IsTwoSerineRateMatrix())
+					states = new StateSet(21);
+				else
+					states = new StateSet(20);
+				}
+			else
+				states = new StateSet(modPart->GetModel((*c).modelIndex)->GetGeneticCode());
+
+			states->OutputInternalStateHeader(out);
+			
+			//now map the posteriors of each packed state to the original char order
+			const SequenceData *data = dataPart->GetSubset((*c).dataIndex);
+			for(int s=data->NumConditioningPatterns();s<data->GapsIncludedNChar() + data->NumConditioningPatterns();s++){
+				//out << s+1 << "\t";
+				out << data->OrigDataNumber(s) + 1 << "\t";
+				if(data->Number(s) > -1)
+					stateProbs[data->Number(s)].Output(out, *states);
+				else 
+					out << "Entirely uninformative character (gaps,N's or ?'s)\n";
+				}
+			
+			//return the cla that we used temporarily
+			claMan->ClearTempReservation(wholeTreeIndex);
+			claMan->DecrementCla(wholeTreeIndex);
+			delete states;
+			}
+			}
+		}
+
+void Tree::ClaReport(ofstream &cla){
+	int totDown=0;
+	int totUL=0;
+	int totUR=0;
+	
+	cla << "root\t" << claMan->GetReclaimLevel(root->claIndexDown) << "\t" << claMan->GetNumAssigned(root->claIndexDown)<< "\t" << claMan->GetClaNumber(root->claIndexDown);
+	cla << "\n\t" << claMan->GetReclaimLevel(root->claIndexUL) << "\t" << claMan->GetNumAssigned(root->claIndexUL) << "\t" << claMan->GetClaNumber(root->claIndexUL);
+	cla << "\n\t" << claMan->GetReclaimLevel(root->claIndexUR)  << "\t" << claMan->GetNumAssigned(root->claIndexUR)  << "\t" << claMan->GetClaNumber(root->claIndexUR) << "\n";
+//	cla << "\t" << claMan->GetNumAssigned(root->claIndexDown) << "\t" << claMan->GetNumAssigned(root->claIndexUL) << "\t" << claMan->GetNumAssigned(root->claIndexUR)  << "\n";
+	for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+		TreeNode *n=allNodes[i];
+	cla << i << "\t" << claMan->GetReclaimLevel(n->claIndexDown) << "\t" << claMan->GetNumAssigned(n->claIndexDown) << "\t" << claMan->GetClaNumber(n->claIndexDown);
+	cla << "\n\t" << claMan->GetReclaimLevel(n->claIndexUL) << "\t" << claMan->GetNumAssigned(n->claIndexUL) << "\t" << claMan->GetClaNumber(n->claIndexUL);
+	cla << "\n\t" << claMan->GetReclaimLevel(n->claIndexUR)  << "\t" << claMan->GetNumAssigned(n->claIndexUR)  << "\t" << claMan->GetClaNumber(n->claIndexUR) << "\n";
+		totDown += claMan->GetReclaimLevel(n->claIndexDown);
+		totUL += claMan->GetReclaimLevel(n->claIndexUL);
+		totUR += claMan->GetReclaimLevel(n->claIndexUR);
+		}
+	cla << "tots\t" << totDown << "\t" << totUL << "\t" << totUR << endl;
+//	cla.close();
+	}
+	
+FLOAT_TYPE Tree::CountClasInUse(){
+	FLOAT_TYPE inUse=0.0;
+	
+	if(claMan->IsDirty(root->claIndexDown) == false) inUse += ONE_POINT_ZERO/claMan->GetNumAssigned(root->claIndexDown);
+	if(claMan->IsDirty(root->claIndexUL) == false) inUse += ONE_POINT_ZERO/claMan->GetNumAssigned(root->claIndexUL);
+	if(claMan->IsDirty(root->claIndexUR) == false) inUse += ONE_POINT_ZERO/claMan->GetNumAssigned(root->claIndexUR);
+	for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+		TreeNode *n=allNodes[i];	
+		if(claMan->IsDirty(n->claIndexDown) == false) inUse += ONE_POINT_ZERO/claMan->GetNumAssigned(n->claIndexDown);
+		if(claMan->IsDirty(n->claIndexUL) == false) inUse += ONE_POINT_ZERO/claMan->GetNumAssigned(n->claIndexUL);
+		if(claMan->IsDirty(n->claIndexUR) == false) inUse += ONE_POINT_ZERO/claMan->GetNumAssigned(n->claIndexUR);		
+		}
+	return inUse;
+	}
+
+void Tree::OutputSiteLikelihoods(int partNum, vector<FLOAT_TYPE> &likes, const int *under1, const int *under2){
+	//output level 1 is user-level output, just site nums and site likes
+	//output level 2 is for debugging, includes underflow multipliers and output of site likes in packed order
+	const SequenceData *data = dataPart->GetSubset(partNum);
+
+	assert(sitelikeLevel != 0);
+	//a negative sitelike level means append, but the absolute value meanings are the same
+	bool append = sitelikeLevel < 0;
+	int effectiveSitelikeLevel = abs(sitelikeLevel);
+	ofstream ordered, packed;
+	string oname = ofprefix + ".sitelikes.log";
+	ordered.open(oname.c_str(), (append == true ? ios::app : ios::out));
+	if(effectiveSitelikeLevel > 1){
+		string pname = ofprefix + ".packedSiteLikes.log";
+		packed.open(pname.c_str(), (append == true ? ios::app : ios::out));
+		}
+	assert(effectiveSitelikeLevel > 0);
+	assert(likes.size() == data->NChar());;
+	if(!append){
+		ordered << "Tree\t-lnL\tSite\t-lnL";
+		if(effectiveSitelikeLevel > 1) 
+			ordered << "\tunder1\tunder2";
+		ordered << "\n";
+		}
+	ordered.setf(ios::fixed, ios::floatfield);
+	ordered.precision(8);
+	packed.precision(8);
+	
+	int startPat = (effectiveSitelikeLevel > 1 ? 0 : data->NumConditioningPatterns());
+
+	for(int site = startPat;site < data->GapsIncludedNChar() + data->NumConditioningPatterns();site++){
+		int col = data->Number(site);
+		int origCol = data->OrigDataNumber(site);
+		if(col == -1){
+			ordered << "\t\t" << origCol + 1 << "\t-";
+			if(effectiveSitelikeLevel > 1) 
+				ordered << "\t-\t-";
+			ordered << "\n";
+			}
+		else{
+			ordered << "\t\t" << origCol + 1 << "\t" << -likes[col];
+			if(effectiveSitelikeLevel > 1){
+				ordered << "\t" << under1[col];
+				if(under2 != NULL)
+					ordered << "\t" << under2[col];
+				else
+					ordered << "\t-";
+				}
+			ordered << "\n";
+			}
+		}
+	if(effectiveSitelikeLevel > 1){
+		packed << "Partition subset " << partNum + 1 << "\npackedIndex\ttruelnL\tunder1\tunder2" << endl;
+		for(int c = 0;c < data->NChar();c++){
+			packed << c << "\t" << likes[c] << "\t" << under1[c];
+			if(under2 != NULL)
+				packed << "\t" << under2[c] << endl;
+			else
+				packed << "\t-" << endl;
+			}
+		}
+	ordered.close();
+	if(packed.is_open())
+		packed.close();
+	}
+
+void Tree::OutputSiteDerivatives(int partNum, vector<double> &likes, vector<double> &d1s, vector<double> &d2s, const int *under1, const int *under2, ofstream &ordered, ofstream &packed){
+	const SequenceData *data = dataPart->GetSubset(partNum);
+
+	assert(d1s.size() == data->NChar());;
+	ordered << "Partition subset " << partNum + 1 << "\nsite#\ttruelnL\td1\td2\tunder1\tunder2" << endl;
+	packed << "Partition subset " << partNum + 1 << "\npackedIndex\ttruelnL\td1\td2\tunder1\tunder2" << endl;
+	ordered.precision(10);
+	packed.precision(10);
+	
+	for(int site = 0;site < data->GapsIncludedNChar() + data->NumConditioningPatterns();site++){
+		int col = data->Number(site);
+		if(col == -1)
+			ordered << site+1 << "\tgap\t-\t-\t-\t-";
+		else{
+			ordered << site+1 << "\t" << (likes.size() > 0 ? likes[col] : 0.0) << "\t" << d1s[col] << "\t" << d2s[col] << "\t" << under1[col];
+			if(under2 != NULL)
+				ordered << "\t" << under2[col] << endl;
+			else
+				ordered << "\t-" << endl;
+			}
+		}
+	for(int c = 0;c < data->NChar();c++){
+		packed << c << "\t" << (likes.size() > 0 ? likes[c] : 0.0) << "\t" << d1s[c] << "\t" << d2s[c] << "\t" << under1[c];
+		if(under2 != NULL)
+			packed << "\t" << under2[c] << endl;
+		else
+			packed << "\t-" << endl;
+		}
+	}
+
+FLOAT_TYPE Tree::GetScorePartialTerminalNState(const CondLikeArray *partialCLA, const FLOAT_TYPE *prmat, const char *Ldat, int modIndex, int dataIndex){
+
+	//this function assumes that the pmat is arranged with the nstates^2 entries for the
+	//first rate, followed by nstates^2 for the second, etc.
+	const FLOAT_TYPE *partial=partialCLA->arr;
+	const int *underflow_mult=partialCLA->underflow_mult;
+
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+
+	const int nstates = mod->NStates();
+	const int nRateCats = mod->NRateCats();
+	const int nchar = data->NChar();
+	const int *countit=data->GetCounts();
+	const char *Ldata = Ldat;
+
+	const FLOAT_TYPE *rateProb=mod->GetRateProbs();
+	const int lastConst=data->LastConstant();
+	const int *conStates=data->GetConstStates();
+	const FLOAT_TYPE prI=mod->PropInvar();
+	const int numCondPats = data->NumConditioningPatterns();
+
+#ifdef UNIX
+	posix_madvise((void*)partial, nchar*nstates*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+#endif
+
+	vector<FLOAT_TYPE> freqs(nstates);
+	for(int i=0;i<nstates;i++) 
+		freqs[i]=mod->StateFreq(i);
+
+	FLOAT_TYPE siteL, unscaledlnL, totallnL = ZERO_POINT_ZERO, grandSumlnL=ZERO_POINT_ZERO;
+
+	FLOAT_TYPE logConditioningFactor = ZERO_POINT_ZERO;
+	FLOAT_TYPE conditioningLikeSum = ZERO_POINT_ZERO;
+
+	vector<FLOAT_TYPE> siteLikes(nchar);
+
+	if(siteToScore > 0) Ldat += siteToScore;
+
+	if(nRateCats == 1){
+#ifdef OMP_TERMSCORE_NSTATE
+		#ifdef LUMP_LIKES
+			#pragma omp parallel for if(numCondPats == 0) private(partial, Ldata, siteL, unscaledlnL) reduction(+ : totallnL, grandSumlnL)
+		#else
+			#pragma omp parallel for if(numCondPats == 0) private(partial, Ldata, siteL, unscaledlnL) reduction(+ : totallnL)
+		#endif
+		for(int i=0;i<nchar;i++){
+			Ldata = &Ldat[i];
+			partial = &partialCLA->arr[i*nstates];
+#else
+		for(int i=0;i<nchar;i++){
+#endif
+#ifdef USE_COUNTS_IN_BOOT
+			if(countit[i] > 0){
+#else
+			if(1){
+#endif
+				siteL = 0.0;
+				if(*Ldata < nstates){ //no ambiguity
+					for(int from=0;from<nstates;from++){
+						siteL += prmat[(*Ldata)+nstates*from] * partial[from] * freqs[from];
+						}
+					partial += nstates;
+					}
+					
+				else if(*Ldata == nstates){ //total ambiguity
+					for(int from=0;from<nstates;from++){
+						siteL += partial[from] * freqs[from];
+						}
+					partial += nstates;
+					}
+				else{ //partial ambiguity
+					assert(0);
+					}
+				siteL *= rateProb[0];//multiply by (1-pinv)
+				if((mod->NoPinvInModel() == false) && (i<=lastConst)){
+					if(underflow_mult[i] == 0)
+						siteL += prI*freqs[conStates[i]];
+					else 
+						siteL += prI*freqs[conStates[i]]*exp((FLOAT_TYPE)underflow_mult[i]);
+					}
+				unscaledlnL = (log(siteL) - underflow_mult[i]);
+				assert(siteL > ZERO_POINT_ZERO);//this should be positive
+				assert(unscaledlnL < 1.0e-4);//this should be negative or zero
+				//rounding error in multiplying a site that is fully ambiguous across the tree
+				//(which might not have been removed from the data because we are only scoring a
+				//partial tree during stepwise addition) can cause the unscaledlnL to be slightly
+				//> zero.  If that is the case, just ignore it
+
+				if(numCondPats > 0){
+					assert(unscaledlnL < ZERO_POINT_ZERO);
+					if(i < numCondPats){
+						if(underflow_mult[i] == 0)
+							conditioningLikeSum += siteL;
+						else{
+							outman.DebugMessage("SCALED MKV SCALER = %d (%f)", (underflow_mult[i]), exp((double)underflow_mult[i]));
+							double unscaler = exp((FLOAT_TYPE)underflow_mult[i]);
+							//Guard against this over or underflowing, which I think are very unlikely. If it does, just ignore this siteL
+							if(unscaler == unscaler){
+								double unscaled = siteL / unscaler;
+								if(unscaled == unscaled)
+									conditioningLikeSum += unscaled;
+								}
+							}
+						if(i == numCondPats - 1)
+							logConditioningFactor = -log(ONE_POINT_ZERO - conditioningLikeSum);
+						}
+					else{
+						unscaledlnL += logConditioningFactor;
+						totallnL += (countit[i] * unscaledlnL);
+						}
+					assert(unscaledlnL < ZERO_POINT_ZERO);
+					}
+				else if(unscaledlnL < ZERO_POINT_ZERO)
+					totallnL += (countit[i] * unscaledlnL);
+
+#ifdef ALLOW_SINGLE_SITE
+				if(siteToScore > -1) break;
+#endif
+				}
+			else{//nothing needs to be done if the count for this site is 0
+				}
+			Ldata++;
+#ifdef LUMP_LIKES
+			if((i + 1) % LUMP_FREQ == 0){
+				grandSumlnL += totallnL;
+				totallnL = ZERO_POINT_ZERO;
+				}
+#endif
+			if(sitelikeLevel != 0)
+				siteLikes[i] = unscaledlnL;
+			}
+		}
+	else{//multiple rates
+		FLOAT_TYPE rateL;
+#ifdef OMP_TERMSCORE_NSTATE
+	#ifdef LUMP_LIKES
+		#pragma omp parallel for if(numCondPats == 0) private(partial, Ldata, siteL, rateL, unscaledlnL) reduction(+ : totallnL, grandSumlnL)
+	#else
+		#pragma omp parallel for if(numCondPats == 0) private(partial, Ldata, siteL, rateL, unscaledlnL) reduction(+ : totallnL)
+	#endif
+		for(int i=0;i<nchar;i++){
+			Ldata = &Ldat[i];
+			partial = &partialCLA->arr[i*nstates*nRateCats];
+#else
+		for(int i=0;i<nchar;i++){
+#endif
+#ifdef USE_COUNTS_IN_BOOT
+			if(countit[i] > 0){
+#else
+			if(1){
+#endif
+				siteL = ZERO_POINT_ZERO;
+				if(*Ldata < nstates){ //no ambiguity
+					for(int rate=0;rate<nRateCats;rate++){
+						rateL = ZERO_POINT_ZERO;
+						const int rateOffset = rate * nstates * nstates;
+						for(int from=0;from<nstates;from++){
+							const int offset = from * nstates;
+							rateL += prmat[rateOffset + offset + (*Ldata)] * partial[from] * freqs[from];
+							}
+						siteL += rateL * rateProb[rate];
+						partial += nstates;
+						}
+					}
+				else{ //total ambiguity
+					for(int rate=0;rate<nRateCats;rate++){
+						rateL = ZERO_POINT_ZERO;
+						for(int from=0;from<nstates;from++){
+							rateL += partial[from] * freqs[from];
+							}
+						siteL += rateL * rateProb[rate];
+						partial += nstates;
+						}
+					}
+
+				if((mod->NoPinvInModel() == false) && (i<=lastConst)){
+					if(underflow_mult[i] == 0)
+						siteL += prI*freqs[conStates[i]];
+					else 
+						siteL += prI*freqs[conStates[i]]*exp((FLOAT_TYPE)underflow_mult[i]);
+					}
+
+				unscaledlnL = (log(siteL) - underflow_mult[i]);
+				assert(siteL > ZERO_POINT_ZERO);//this should be positive
+				assert(unscaledlnL < 1.0e-4);//this should be negative or zero
+				//rounding error in multiplying a site that is fully ambiguous across the tree
+				//(which might not have been removed from the data because we are only scoring a
+				//partial tree during stepwise addition) can cause the unscaledlnL to be slightly
+				//> zero.  If that is the case, just ignore it
+
+				if(numCondPats > 0){
+					assert(unscaledlnL < ZERO_POINT_ZERO);
+					if(i < numCondPats){
+						if(underflow_mult[i] == 0)
+							conditioningLikeSum += siteL;
+						else{
+							outman.DebugMessage("SCALED MKV SCALER = %d (%f)", (underflow_mult[i], exp((double)underflow_mult[i])));
+							double unscaler = exp((FLOAT_TYPE)underflow_mult[i]);
+							//Guard against this over or underflowing, which I think are very unlikely. If it does, just ignore this siteL
+							if(unscaler == unscaler){
+								double unscaled = siteL / unscaler;
+								if(unscaled == unscaled)
+									conditioningLikeSum += unscaled;
+								}
+							}
+						if(i == numCondPats - 1)
+							logConditioningFactor = -log(ONE_POINT_ZERO - conditioningLikeSum);
+						}
+					else{
+						unscaledlnL += logConditioningFactor;
+						totallnL += (countit[i] * unscaledlnL);
+						}
+					assert(unscaledlnL < ZERO_POINT_ZERO);
+					}
+				else if(unscaledlnL < ZERO_POINT_ZERO)
+					totallnL += (countit[i] * unscaledlnL);
+
+#ifdef ALLOW_SINGLE_SITE
+				if(siteToScore > -1) break;
+#endif
+				}
+			Ldata++;
+#ifdef LUMP_LIKES
+			if((i + 1) % LUMP_FREQ == 0){
+				grandSumlnL += totallnL;
+				totallnL = ZERO_POINT_ZERO;
+				}
+#endif
+			if(sitelikeLevel != 0)
+				siteLikes[i] = unscaledlnL;
+			}
+		}
+	if(sitelikeLevel != 0){
+		OutputSiteLikelihoods(dataIndex, siteLikes, underflow_mult, NULL);
+		}
+#ifdef LUMP_LIKES
+	totallnL += grandSumlnL;
+#endif
+
+	return totallnL;
+	}
+
+FLOAT_TYPE Tree::GetScorePartialTerminalOrientedGap(const CondLikeArray *partialCLA, const FLOAT_TYPE *prmat, const char *Ldat, int modIndex, int dataIndex){
+//this assumes that Ldat is the all-missing data from the dummy taxon used in rooting.  So, neither it nor the pmat are actually used below
+
+	//Ldat should be from fully ambiguous dummy taxon that is added for rooting purposes
+	assert(Ldat[0] == 2);
+		
+	const FLOAT_TYPE *partial=partialCLA->arr;
+	const int *underflow_mult=partialCLA->underflow_mult;
+
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+
+	const int claStates = 3;
+	const int nchar = data->NChar();
+	const int *countit=data->GetCounts();
+
+	FLOAT_TYPE siteL, totallnL = ZERO_POINT_ZERO, unscaledlnL = ZERO_POINT_ZERO;
+
+	vector<FLOAT_TYPE> freqs(4);
+
+	vector<FLOAT_TYPE> siteLikes(nchar);
+
+	bool allGapChar = true;
+	
+	//rescaler for conditioning on not seeing all gap columns
+	double condScaler = ZERO_POINT_ZERO;
+
+	FLOAT_TYPE oneInsertProportion = mod->InsertRate();
+	assert(oneInsertProportion >= 0.0001);
+
+	double mu = mod->DeleteRate();
+
+	double TL = Treelength();
+	double TLrescaler = 1.0 / (TL * mu);
+
+	bool outputCategorySitelikes = false;
+
+	FILE *breakdown = NULL;
+	if(outputCategorySitelikes && sitelikeLevel != 0) 
+		breakdown = fopen("likeMixBreakdown.log", "a");
+
+	for(int i=0;i<nchar;i++){
+		if(countit[i] > 0){
+			//include the treelength and mu once here, not in the insert prob in the pmat
+			double oneInsert = oneInsertProportion * partial[1] * TLrescaler;
+			double noInsert = (1.0 - oneInsertProportion) * partial[2];
+			siteL = oneInsert + noInsert;
+
+			if(outputCategorySitelikes && sitelikeLevel != 0)
+				fprintf(breakdown, "%d\t%.3f\t%.3f\n", i, (oneInsert == 0.0 ? 0.0 : log(oneInsert) - (double) underflow_mult[i]), (noInsert == 0.0 ? 0.0 : log(noInsert) - (double) underflow_mult[i]));
+
+			partial += claStates;
+
+			if(i == 0 && allGapChar){
+				double sum = 0.0;
+				double allGapLike = siteL / exp((double) underflow_mult[i]);
+				//condScaler = -log(ONE_POINT_ZERO - siteL / exp((double) underflow_mult[i]));
+#ifdef ONE_BRANCH_INS_DEL
+				//also need to figure in prob of single branch insert then delete for each branch
+				//the full term here for each branch would be 
+				//(blen / TL) - (1.0 - expMu) / (mu * TL);
+				//or (blen - (1.0 - expMu) / mu)) / TL
+				//for(int i = 1;i < numTipsTotal - 1;i++){
+				for(int i = 1;i < numNodesTotal;i++){
+                    //skip the dummy root branch
+                    if(allNodes[i] != dummyRoot){
+                        double expMu = exp(-mu * allNodes[i]->dlen);
+                        //the TL would appear in the denominator of both of the following terms
+                        sum += (allNodes[i]->dlen - (1.0 - expMu) / mu);
+                        }
+					}
+				//the oneInsertProportion needs to appear here because this single branch ins->del scenario
+				//is only relavent for the class with one insert 
+				sum *= oneInsertProportion / TL;
+#endif
+				condScaler = -log(1.0 - (allGapLike + sum));
+				assert(condScaler > 0.0);
+				//this is just for sitelike purposes
+				unscaledlnL = condScaler;
+				//outman.UserMessage("mu\t%f\tTL\t%f\toneInsert\t%f\tnoInsert\t%f\tallGapLike\t%f\tsum\t%f\tcondScaler\t%f", mu, TL, oneInsert, noInsert, allGapLike, sum, condScaler);
+				}	
+			else{
+				unscaledlnL = log(siteL) - underflow_mult[i] + condScaler;
+				assert(siteL > ZERO_POINT_ZERO);//this should be positive
+				assert(unscaledlnL < 1.0e-4);//this should be negative or zero
+				//rounding error in multiplying a site that is fully ambiguous across the tree
+				//(which might not have been removed from the data because we are only scoring a
+				//partial tree during stepwise addition) can cause the unscaledlnL to be slightly
+				//> zero.  If that is the case, just ignore it
+
+				if(unscaledlnL < ZERO_POINT_ZERO)
+					totallnL += (countit[i] * unscaledlnL);
+			
+				assert(unscaledlnL == unscaledlnL);
+				assert(unscaledlnL < 0.0);
+				assert(unscaledlnL > -10000.0);
+				}
+			}
+		else{//nothing needs to be done if the count for this site is 0
+			}
+		if(sitelikeLevel != 0)
+			siteLikes[i] = unscaledlnL;
+		}
+	if(sitelikeLevel != 0){
+		OutputSiteLikelihoods(dataIndex, siteLikes, underflow_mult, NULL);
+		}
+
+	if(outputCategorySitelikes && sitelikeLevel != 0) 
+		fclose(breakdown);
+
+	//Previous Rivas and Eddy style method
+/* 
+	//This is the p parameter from the geometric length distribution.  Setting it dependent
+	//on the actual seq length L, it is p = ( L / (L + 1)).  So, 0.999 is expected len of 1000
+	double p = 0.999;
+
+	//freqs of gaps and bases doesn't come in here as it would with a nuc model.  However,
+	//a factor of p multiplies the conditional of a non-gap base as part of the seq. length prior
+	//so, just include it here in the freq
+	freqs[0] = freqs[3] = 0.0;
+	freqs[1] = 1.0;
+	freqs[2] = p;
+
+	//this calculates the product of the (1 - psi) factors that come from each branch
+	double runningTot = 1.0;
+	for(int i = 1;i < numNodesTotal;){
+		runningTot *= (1.0 - mod->IndelPsi(allNodes[i]->dlen * modPart->SubsetRate(modIndex)));
+		assert(runningTot > 0.0);
+		i++;
+		if(i == numTipsTotal)
+			i++;
+		}
+
+	double extraColTerm = (1.0 - p) * runningTot;
+
+	for(int i=0;i<nchar;i++){
+		if(countit[i] > 0){
+			siteL = ZERO_POINT_ZERO;
+
+			for(int from = 0;from < claStates;from++){
+				siteL += partial[from] * freqs[from];
+				}
+			partial += claStates;					
+
+			if(i == 0 && allGapChar){
+				if(underflow_mult[i] == 0)
+					condScaler = -log(ONE_POINT_ZERO - siteL);
+				else 
+					condScaler = ZERO_POINT_ZERO;
+				}	
+			else{
+				unscaledlnL = log(siteL) - underflow_mult[i] + condScaler;
+				assert(siteL > ZERO_POINT_ZERO);//this should be positive
+				assert(unscaledlnL < 1.0e-4);//this should be negative or zero
+				//rounding error in multiplying a site that is fully ambiguous across the tree
+				//(which might not have been removed from the data because we are only scoring a
+				//partial tree during stepwise addition) can cause the unscaledlnL to be slightly
+				//> zero.  If that is the case, just ignore it
+
+				if(unscaledlnL < ZERO_POINT_ZERO)
+					totallnL += (countit[i] * unscaledlnL);
+			
+				assert(unscaledlnL == unscaledlnL);
+				assert(unscaledlnL < 0.0);
+				assert(unscaledlnL > -100.0);
+				}
+			}
+		else{//nothing needs to be done if the count for this site is 0
+			}
+		if(sitelikeLevel != 0)
+			siteLikes.push_back(unscaledlnL);
+		}
+	if(sitelikeLevel != 0){
+		OutputSiteLikelihoods(dataIndex, siteLikes, underflow_mult, NULL);
+		}
+				assert(extraColTerm == extraColTerm);
+				assert(extraColTerm > 0.0);
+				assert(extraColTerm < 1.0);
+	totallnL += log(extraColTerm);
+*/
+
+	//DEBUG
+	//this takes into account the sequence length
+/*	double ins = mod->InsertRate();
+	double del = mod->DeleteRate();
+	int numNoIndels = 1497;
+	double term = 0.0;
+//	double term = log(1.0 - (ins / del)) + numNoIndels * log(ins / del);
+
+	//add in a factor for the constant columns
+	double expectedDels = Treelength() * del * modPart->SubsetRate(modIndex);
+	//this would be ln(pi * exp(-expectedDels)), so simplifies to:
+	double term2 = numNoIndels * (log(freqs[2]) - expectedDels) ;
+
+	outman.DebugMessage("%f\t%f\t%f\t%f\t%f\t%f", totallnL + term + term2, totallnL, term, term2, mod->InsertRate(), mod->DeleteRate());
+	totallnL += (term + term2);
+*/
+	return totallnL;
+	}
+
+FLOAT_TYPE Tree::GetScorePartialTerminalRateHet(const CondLikeArray *partialCLA, const FLOAT_TYPE *prmat, const char *Ldata, int modIndex, int dataIndex){
+	//this function assumes that the pmat is arranged with the 16 entries for the
+	//first rate, followed by 16 for the second, etc.
+	const FLOAT_TYPE *partial=partialCLA->arr;
+	const int *underflow_mult=partialCLA->underflow_mult;
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+	const int nRateCats=mod->NRateCats();
+
+	const int nchar=data->NChar();
+
+	const int *countit=data->GetCounts();
+	
+	const FLOAT_TYPE *rateProb=mod->GetRateProbs();
+
+	const int lastConst=data->LastConstant();
+	const int *conBases=data->GetConstStates();
+	const FLOAT_TYPE prI=mod->PropInvar();
+
+	FLOAT_TYPE freqs[4];
+	for(int i=0;i<4;i++) 
+		freqs[i]=mod->StateFreq(i);
+
+#ifdef UNIX
+	posix_madvise((void*)partial, nchar*4*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+#endif
+
+#ifdef ALLOW_SINGLE_SITE
+	if(siteToScore > 0) Ldata = AdvanceDataPointer(Ldata, siteToScore);
+#endif
+
+	FLOAT_TYPE siteL, unscaledlnL, totallnL = ZERO_POINT_ZERO, grandSumlnL=ZERO_POINT_ZERO;
+	FLOAT_TYPE La, Lc, Lg, Lt;
+
+	vector<FLOAT_TYPE> siteLikes(nchar);
+
+	for(int i=0;i<nchar;i++){
+#ifdef USE_COUNTS_IN_BOOT
+		if(countit[i] > 0){
+#else
+		if(1){
+#endif
+			La=Lc=Lg=Lt=ZERO_POINT_ZERO;
+			if(*Ldata > -1){ //no ambiguity
+				for(int rate=0;rate<nRateCats;rate++){
+					La  += prmat[(*Ldata)+16*rate] * partial[0] * rateProb[rate];
+					Lc  += prmat[(*Ldata+4)+16*rate] * partial[1] * rateProb[rate];
+					Lg  += prmat[(*Ldata+8)+16*rate] * partial[2] * rateProb[rate];
+					Lt  += prmat[(*Ldata+12)+16*rate] * partial[3] * rateProb[rate];
+					partial += 4;
+					}
+				Ldata++;
+				}
+				
+			else if(*Ldata == -4){ //total ambiguity
+				for(int rate=0;rate<nRateCats;rate++){
+					La += partial[0] * rateProb[rate];
+					Lc += partial[1] * rateProb[rate];
+					Lg += partial[2] * rateProb[rate];
+					Lt += partial[3] * rateProb[rate];
+					partial += 4;
+					}
+				Ldata++;
+				}
+			else{ //partial ambiguity
+				char nstates=-1 * *(Ldata++);
+				//this doesn't actually index anything, just counter
+				for(int s=0;s<nstates;s++){
+					for(int rate=0;rate<nRateCats;rate++){
+						La += prmat[(*Ldata)+16*rate]  * partial[4*rate] * rateProb[rate];
+						Lc += prmat[(*Ldata+4)+16*rate] * partial[1+4*rate] * rateProb[rate];
+						Lg += prmat[(*Ldata+8)+16*rate]* partial[2+4*rate] * rateProb[rate];
+						Lt += prmat[(*Ldata+12)+16*rate]* partial[3+4*rate] * rateProb[rate];
+						}
+					Ldata++;
+					}
+				partial+=4*nRateCats;
+				}
+			if((mod->NoPinvInModel() == false) && (i<=lastConst)){
+				FLOAT_TYPE btot=0.0;
+				if(conBases[i]&1) btot+=freqs[0];
+				if(conBases[i]&2) btot+=freqs[1];
+				if(conBases[i]&4) btot+=freqs[2];
+				if(conBases[i]&8) btot+=freqs[3];
+				if(underflow_mult[i]==0)
+					siteL  = ((La*freqs[0]+Lc*freqs[1]+Lg*freqs[2]+Lt*freqs[3]) + prI*btot);
+				else 
+					siteL  = ((La*freqs[0]+Lc*freqs[1]+Lg*freqs[2]+Lt*freqs[3]) + (prI*btot*exp((FLOAT_TYPE)underflow_mult[i])));
+				}
+			else
+				siteL  = ((La*freqs[0]+Lc*freqs[1]+Lg*freqs[2]+Lt*freqs[3]));
+			
+			unscaledlnL = (log(siteL) - underflow_mult[i]);
+			totallnL += (countit[i] * unscaledlnL);
+
+#ifdef ALLOW_SINGLE_SITE
+			if(siteToScore > -1) break;
+#endif
+			}
+		else{
+#ifdef OPEN_MP
+			//this is a little strange, but partial only needs to be advanced in the case of OMP
+			//because sections of the CLAs corresponding to sites with count=0 are skipped
+			//over in OMP instead of being eliminated
+			partial += 4*nRateCats;
+#endif
+			if(*Ldata > -1 || *Ldata == -4) Ldata++;
+			else{
+				int states = -1 * *Ldata;
+				do{
+					Ldata++;
+					}while (states-- > 0);
+				}
+			}
+#ifdef LUMP_LIKES
+		if((i + 1) % LUMP_FREQ == 0){
+			grandSumlnL += totallnL;
+			totallnL = ZERO_POINT_ZERO;
+			}
+#endif
+		if(sitelikeLevel != 0)
+			siteLikes[i] = unscaledlnL;
+		}
+#ifdef LUMP_LIKES
+	totallnL += grandSumlnL;
+#endif
+	if(sitelikeLevel != 0){
+		OutputSiteLikelihoods(dataIndex, siteLikes, underflow_mult, NULL);
+		}
+	return totallnL;
+	}
+	
+FLOAT_TYPE Tree::GetScorePartialInternalRateHet(const CondLikeArray *partialCLA, const CondLikeArray *childCLA, const FLOAT_TYPE *prmat, int modIndex, int dataIndex){
+	//this function assumes that the pmat is arranged with the 16 entries for the
+	//first rate, followed by 16 for the second, etc.
+	const FLOAT_TYPE *CL1=childCLA->arr;
+	const FLOAT_TYPE *partial=partialCLA->arr;
+	const int *underflow_mult1=partialCLA->underflow_mult;
+	const int *underflow_mult2=childCLA->underflow_mult;
+
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+
+	const int nchar=data->NChar();
+	const int nRateCats=mod->NRateCats();
+
+	const int *countit=data->GetCounts();
+
+	const FLOAT_TYPE *rateProb=mod->GetRateProbs();
+	const FLOAT_TYPE prI=mod->PropInvar();
+	const int lastConst=data->LastConstant();
+	const int *conBases=data->GetConstStates();
+
+	FLOAT_TYPE freqs[4];
+	for(int i=0;i<4;i++) 
+		freqs[i]=mod->StateFreq(i);
+
+
+#ifdef UNIX
+	posix_madvise((void*)partial, nchar*4*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+	posix_madvise((void*)CL1, nchar*4*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+#endif
+
+	FLOAT_TYPE siteL, unscaledlnL, totallnL = ZERO_POINT_ZERO, grandSumlnL=ZERO_POINT_ZERO;
+	FLOAT_TYPE La, Lc, Lg, Lt;
+
+	vector<FLOAT_TYPE> siteLikes(nchar);
+
+	for(int i=0;i<nchar;i++){
+#ifdef USE_COUNTS_IN_BOOT
+		if(countit[i] > 0){
+#else
+		if(1){
+#endif
+			La=Lc=Lg=Lt=ZERO_POINT_ZERO;
+			for(int rate=0;rate<nRateCats;rate++){
+				int rOff=rate*16;
+				La += ( prmat[rOff ]*CL1[0]+prmat[rOff + 1]*CL1[1]+prmat[rOff + 2]*CL1[2]+prmat[rOff + 3]*CL1[3]) * partial[0] * rateProb[rate];
+				Lc += ( prmat[rOff + 4]*CL1[0]+prmat[rOff + 5]*CL1[1]+prmat[rOff + 6]*CL1[2]+prmat[rOff + 7]*CL1[3]) * partial[1] * rateProb[rate];
+				Lg += ( prmat[rOff + 8]*CL1[0]+prmat[rOff + 9]*CL1[1]+prmat[rOff + 10]*CL1[2]+prmat[rOff + 11]*CL1[3]) * partial[2] * rateProb[rate];
+				Lt += ( prmat[rOff + 12]*CL1[0]+prmat[rOff + 13]*CL1[1]+prmat[rOff + 14]*CL1[2]+prmat[rOff + 15]*CL1[3]) * partial[3] * rateProb[rate];
+				partial+=4;
+				CL1+=4;
+				}
+			if((mod->NoPinvInModel() == false) && (i<=lastConst)){
+				FLOAT_TYPE btot=ZERO_POINT_ZERO;
+				if(conBases[i]&1) btot+=freqs[0];
+				if(conBases[i]&2) btot+=freqs[1];
+				if(conBases[i]&4) btot+=freqs[2];
+				if(conBases[i]&8) btot+=freqs[3];
+				if(underflow_mult1[i] + underflow_mult2[i] == 0)
+					siteL  = ((La*freqs[0]+Lc*freqs[1]+Lg*freqs[2]+Lt*freqs[3]) + prI*btot);
+				else 
+					siteL  = ((La*freqs[0]+Lc*freqs[1]+Lg*freqs[2]+Lt*freqs[3]) + (prI*btot*exp((FLOAT_TYPE)underflow_mult1[i]+underflow_mult2[i])));
+				}
+			else
+				siteL  = ((La*freqs[0]+Lc*freqs[1]+Lg*freqs[2]+Lt*freqs[3]));
+			
+			unscaledlnL = (log(siteL) - underflow_mult1[i] - underflow_mult2[i]);
+			totallnL += (countit[i] * unscaledlnL);
+
+#ifdef ALLOW_SINGLE_SITE
+			if(siteToScore > -1) break;
+#endif
+			}
+		else{
+#ifdef OPEN_MP
+			//this is a little strange, but the arrays only needs to be advanced in the case of OMP
+			//because sections of the CLAs corresponding to sites with count=0 are skipped
+			//over in OMP instead of being eliminated
+			partial+=4*nRateCats;
+			CL1+=4*nRateCats;
+#endif
+			}
+#ifdef LUMP_LIKES
+		if((i + 1) % LUMP_FREQ == 0){
+			grandSumlnL += totallnL;
+			totallnL = ZERO_POINT_ZERO;
+			}
+#endif
+		if(sitelikeLevel != 0)
+			siteLikes[i] = unscaledlnL;
+		}
+
+#ifdef LUMP_LIKES
+	totallnL += grandSumlnL;
+#endif
+	if(sitelikeLevel != 0){
+		OutputSiteLikelihoods(dataIndex, siteLikes, underflow_mult1, underflow_mult2);
+		}
+	return totallnL;
+	}
+
+FLOAT_TYPE Tree::GetScorePartialInternalNState(const CondLikeArray *partialCLA, const CondLikeArray *childCLA, const FLOAT_TYPE *prmat, int modIndex, int dataIndex){
+	//this function assumes that the pmat is arranged with nstates^2 entries for the
+	//first rate, followed by nstate^2 for the second, etc.
+	const FLOAT_TYPE *CL1=childCLA->arr;
+	const FLOAT_TYPE *partial=partialCLA->arr;
+	const int *underflow_mult1=partialCLA->underflow_mult;
+	const int *underflow_mult2=childCLA->underflow_mult;
+
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+
+	const int nchar=data->NChar();
+	const int *countit=data->GetCounts();
+	const int nRateCats = mod->NRateCats();
+	const int nstates = mod->NStates();
+
+	const FLOAT_TYPE *rateProb=mod->GetRateProbs();
+	const FLOAT_TYPE prI=mod->PropInvar();
+	const int lastConst=data->LastConstant();
+	const int *conStates=data->GetConstStates();
+	const int numCondPats = data->NumConditioningPatterns();
+
+#ifdef UNIX
+	posix_madvise((void*)partial, nchar*nstates*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+	posix_madvise((void*)CL1, nchar*nstates*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+#endif
+
+	vector<FLOAT_TYPE> freqs(nstates);
+	for(int i=0;i<nstates;i++) 
+		freqs[i]=mod->StateFreq(i);
+
+	FLOAT_TYPE siteL, unscaledlnL, totallnL = ZERO_POINT_ZERO, grandSumlnL=ZERO_POINT_ZERO;
+	
+	FLOAT_TYPE logConditioningFactor = ZERO_POINT_ZERO;
+	FLOAT_TYPE conditioningLikeSum = ZERO_POINT_ZERO;
+
+	vector<FLOAT_TYPE> siteLikes(nchar);
+
+	if(nRateCats == 1){
+#ifdef OMP_INTSCORE_NSTATE
+	#ifdef LUMP_LIKES
+		#pragma omp parallel for if(numCondPats == 0) private(partial, CL1, siteL, unscaledlnL) reduction(+ : totallnL, grandSumlnL)
+	#else
+		#pragma omp parallel for if(numCondPats == 0) private(partial, CL1, siteL, unscaledlnL) reduction(+ : totallnL)
+	#endif
+		for(int i=0;i<nchar;i++){
+			partial = &(partialCLA->arr[nstates*i]);
+			CL1		= &(childCLA->arr[nstates*i]);
+#else
+		for(int i=0;i<nchar;i++){
+#endif
+
+#ifdef USE_COUNTS_IN_BOOT
+			if(countit[i] > 0){
+#else
+			if(1){
+#endif
+				siteL = 0.0;
+				for(int from=0;from<nstates;from++){
+					FLOAT_TYPE temp = 0.0;
+					for(int to=0;to<nstates;to++){
+						temp += prmat[from*nstates + to]*CL1[to];
+						}
+					siteL += temp * partial[from] * freqs[from];
+					}
+				siteL *= rateProb[0]; //multiply by (1-pinv)
+				if((mod->NoPinvInModel() == false) && (i<=lastConst)){
+					if(underflow_mult1[i] + underflow_mult2[i] == 0)
+						siteL += prI*freqs[conStates[i]];
+					else 
+						siteL += prI*freqs[conStates[i]]*exp((FLOAT_TYPE)underflow_mult1[i]+(FLOAT_TYPE)underflow_mult2[i]);
+					}
+				CL1 += nstates;
+				partial += nstates;
+
+				unscaledlnL = (log(siteL) - underflow_mult1[i] - underflow_mult2[i]);
+				assert(siteL > ZERO_POINT_ZERO);//this should be positive
+				assert(unscaledlnL < 1.0e-4);//this should be negative or zero
+				//rounding error in multiplying a site that is fully ambiguous across the tree
+				//(which might not have been removed from the data because we are only scoring a
+				//partial tree during stepwise addition) can cause the unscaledlnL to be slightly
+				//> zero.  If that is the case, just ignore it
+
+				if(numCondPats > 0){
+					assert(unscaledlnL < ZERO_POINT_ZERO);
+					if(i < numCondPats){
+						if(underflow_mult1[i] + underflow_mult2[i] == 0)
+							conditioningLikeSum += siteL;
+						else{
+							outman.DebugMessage("SCALED MKV SCALER = %d (%f)", (underflow_mult1[i] + underflow_mult2[i]), exp((double)underflow_mult1[i] + underflow_mult2[i]));
+							double unscaler = exp((FLOAT_TYPE)underflow_mult1[i] + underflow_mult2[i]);
+							//Guard against this over or underflowing, which I think are very unlikely. If it does, just ignore this siteL
+							if(unscaler == unscaler){
+								double unscaled = siteL / unscaler;
+								if(unscaled == unscaled)
+									conditioningLikeSum += unscaled;
+								}
+							}
+						if(i == numCondPats - 1)
+							logConditioningFactor = -log(ONE_POINT_ZERO - conditioningLikeSum);
+						}
+					else{
+						unscaledlnL += logConditioningFactor;
+						totallnL += (countit[i] * unscaledlnL);
+						}
+					assert(unscaledlnL < ZERO_POINT_ZERO);
+					}
+				else if(unscaledlnL < ZERO_POINT_ZERO)
+					totallnL += (countit[i] * unscaledlnL);
+
+#ifdef ALLOW_SINGLE_SITE
+				if(siteToScore > -1) break;
+#endif
+				}
+			else{//nothing needs to be done if the count for this site is 0
+				}
+#ifdef LUMP_LIKES
+			if((i + 1) % LUMP_FREQ == 0){
+				grandSumlnL += totallnL;
+				totallnL = ZERO_POINT_ZERO;
+				}
+#endif
+			if(sitelikeLevel != 0)
+				siteLikes[i] = unscaledlnL;
+			}
+		}
+	else{
+		FLOAT_TYPE siteL, tempL, rateL;
+		
+#ifdef OMP_INTSCORE_NSTATE
+	#ifdef LUMP_LIKES
+		#pragma omp parallel for if(numCondPats == 0) private(partial, CL1, siteL, tempL, rateL, unscaledlnL) reduction(+ : totallnL, grandSumlnL)
+	#else
+		#pragma omp parallel for if(numCondPats == 0) private(partial, CL1, siteL, tempL, rateL, unscaledlnL) reduction(+ : totallnL)
+	#endif
+		for(int i=0;i<nchar;i++){
+			partial = &(partialCLA->arr[nRateCats*nstates*i]);
+			CL1		= &(childCLA->arr[nRateCats*nstates*i]);
+#else
+		for(int i=0;i<nchar;i++){
+#endif
+#ifdef USE_COUNTS_IN_BOOT
+			if(countit[i] > 0){
+#else
+			if(1){
+#endif
+				siteL = ZERO_POINT_ZERO;
+				for(int rate=0;rate<nRateCats;rate++){
+					rateL = ZERO_POINT_ZERO;
+					int rateOffset = rate*nstates*nstates;
+					for(int from=0;from<nstates;from++){
+						tempL = ZERO_POINT_ZERO;
+						int offset = from * nstates;
+						for(int to=0;to<nstates;to++){
+							tempL += prmat[rateOffset + offset + to]*CL1[to];
+							}
+						rateL += tempL * partial[from] * freqs[from];
+						}
+					siteL += rateL * rateProb[rate];
+					partial += nstates;
+					CL1 += nstates;
+					}
+
+				if((mod->NoPinvInModel() == false) && (i<=lastConst)){
+					if(underflow_mult1[i] + underflow_mult2[i] == 0)
+						siteL += prI*freqs[conStates[i]];
+					else 
+						siteL += prI*freqs[conStates[i]]*exp((FLOAT_TYPE)underflow_mult1[i]+(FLOAT_TYPE)underflow_mult2[i]);
+					}
+				unscaledlnL = (log(siteL) - underflow_mult1[i] - underflow_mult2[i]);
+				assert(siteL > ZERO_POINT_ZERO);//this should be positive
+				assert(unscaledlnL < 1.0e-4);//this should be negative or zero
+				//rounding error in multiplying a site that is fully ambiguous across the tree
+				//(which might not have been removed from the data because we are only scoring a
+				//partial tree during stepwise addition) can cause the unscaledlnL to be slightly
+				//> zero.  If that is the case, just ignore it
+
+				if(numCondPats > 0){
+					assert(unscaledlnL < ZERO_POINT_ZERO);
+					if(i < numCondPats){
+						if(underflow_mult1[i] + underflow_mult2[i] == 0)
+							conditioningLikeSum += siteL;
+						else
+							outman.DebugMessage("SCALED MKV SCALER = %d (%f)", (underflow_mult1[i] + underflow_mult2[i]), exp((double)underflow_mult1[i] + underflow_mult2[i]));
+							double unscaler = exp((FLOAT_TYPE)underflow_mult1[i] + underflow_mult2[i]);
+							//Guard against this over or underflowing, which I think are very unlikely. If it does, just ignore this siteL
+							if(unscaler == unscaler){
+								double unscaled = siteL / unscaler;
+								if(unscaled == unscaled)
+									conditioningLikeSum += unscaled;
+								}
+							}
+						if(i == numCondPats - 1)
+							logConditioningFactor = -log(ONE_POINT_ZERO - conditioningLikeSum);
+					else{
+						unscaledlnL += logConditioningFactor;
+						totallnL += (countit[i] * unscaledlnL);
+						}
+					assert(unscaledlnL < ZERO_POINT_ZERO);
+					}
+				else if(unscaledlnL < ZERO_POINT_ZERO)
+					totallnL += (countit[i] * unscaledlnL);
+
+#ifdef ALLOW_SINGLE_SITE
+				if(siteToScore > -1) break;
+#endif
+				}
+			else{ //nothing needs to be done if the count of this site is 0
+				}
+#ifdef LUMP_LIKES
+			if((i + 1) % LUMP_FREQ == 0){
+				grandSumlnL += totallnL;
+				totallnL = ZERO_POINT_ZERO;
+				}
+#endif
+			if(sitelikeLevel != 0)
+				siteLikes[i] = unscaledlnL;
+			}
+		}
+#ifdef LUMP_LIKES
+	totallnL += grandSumlnL;
+#endif
+	if(sitelikeLevel != 0){
+		OutputSiteLikelihoods(dataIndex, siteLikes, underflow_mult1, underflow_mult2);
+		}
+
+	return totallnL;
+	}
+
+void Tree::GetStatewiseUnscaledPosteriorsPartialInternalNState(CondLikeArray *destCLA, const CondLikeArray *partialCLA, const CondLikeArray *childCLA, const FLOAT_TYPE *prmat, int modIndex, int dataIndex){
+	
+	FLOAT_TYPE *dest=destCLA->arr;
+	const FLOAT_TYPE *CL1=childCLA->arr;
+	const FLOAT_TYPE *partial=partialCLA->arr;
+	const int *underflow_mult1=partialCLA->underflow_mult;
+	const int *underflow_mult2=childCLA->underflow_mult;
+
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+
+	const int nchar=data->NChar();
+	const int *countit=data->GetCounts();
+	const int nRateCats = mod->NRateCats();
+	const int nstates = mod->NStates();
+
+	const FLOAT_TYPE *rateProb=mod->GetRateProbs();
+	const FLOAT_TYPE prI=mod->PropInvar();
+	const int lastConst=data->LastConstant();
+	const int *conStates=data->GetConstStates();
+
+#ifdef UNIX
+	posix_madvise((void*)partial, nchar*nstates*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+	posix_madvise((void*)CL1, nchar*nstates*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+#endif
+
+	vector<FLOAT_TYPE> freqs(nstates);
+	for(int i=0;i<nstates;i++) 
+		freqs[i]=mod->StateFreq(i);
+
+	//note that we don't need to zero the whole thing
+	//this was not guaranteed to be safe
+	//memset(dest, 0, nchar * nstates * sizeof(FLOAT_TYPE));
+	for(int d = 0;d < nchar * nstates;d++)
+		dest[d] = ZERO_POINT_ZERO;
+
+	for(int i=0;i<nchar;i++){
+		for(int rate=0;rate<nRateCats;rate++){
+			int rateOffset = rate*nstates*nstates;
+			for(int from=0;from<nstates;from++){
+				FLOAT_TYPE temp = ZERO_POINT_ZERO;
+				int offset = from * nstates;
+				for(int to=0;to<nstates;to++){
+					temp += prmat[rateOffset + offset + to] * CL1[to];
+					}
+				dest[from] += temp * partial[from] * freqs[from] * rateProb[rate];
+				}
+			partial += nstates;
+			CL1 += nstates;
+			}
+
+		if((mod->NoPinvInModel() == false) && (i<=lastConst)){
+			//conStates has different meaning with nuc and other models.  
+			//With nuc it is the base in 1, 2, 4, 8 notation (possibly mulitple bits set if ambiguity)
+			//With other models it is the state index, starting at 0
+			FLOAT_TYPE pinvRescaler = ONE_POINT_ZERO;
+			//if the site is constant but was rescaled, this must be done 
+			if((underflow_mult1[i] + underflow_mult2[i]) != 0)
+				pinvRescaler = exp((FLOAT_TYPE)underflow_mult1[i]+(FLOAT_TYPE)underflow_mult2[i]);
+			if(nstates > 4){
+				dest[conStates[i]] += prI * freqs[conStates[i]] * pinvRescaler;
+				}
+			else{
+				if(conStates[i]&1)
+					dest[0] += prI * freqs[0] * pinvRescaler;
+				if(conStates[i]&2) 
+					dest[1] += prI * freqs[1] * pinvRescaler;
+				if(conStates[i]&4) 
+					dest[2] += prI * freqs[2] * pinvRescaler;
+				if(conStates[i]&8) 
+					dest[3] += prI * freqs[3] * pinvRescaler;
+				}
+			}
+		dest += nstates;
+		}
+	}
+
+void Tree::GetStatewiseUnscaledPosteriorsPartialTerminalNState(CondLikeArray *destCLA, const CondLikeArray *partialCLA, const FLOAT_TYPE *prmat, const char *Ldata, int modIndex, int dataIndex){
+	//this function assumes that the pmat is arranged with the nstates^2 entries for the
+	//first rate, followed by nstates^2 for the second, etc.
+	FLOAT_TYPE *dest=destCLA->arr;
+	const FLOAT_TYPE *partial=partialCLA->arr;
+	const int *underflow_mult=partialCLA->underflow_mult;
+
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+
+	const int nstates = mod->NStates();
+	const int nRateCats = mod->NRateCats();
+	const int nchar = data->NChar();
+
+	const FLOAT_TYPE *rateProb=mod->GetRateProbs();
+	const int lastConst=data->LastConstant();
+	const int *conStates=data->GetConstStates();
+	const FLOAT_TYPE prI=mod->PropInvar();
+
+#ifdef UNIX
+	posix_madvise((void*)partial, nchar*nstates*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+#endif
+
+	FLOAT_TYPE totallnL=ZERO_POINT_ZERO, grandSumlnL=ZERO_POINT_ZERO;
+
+	vector<FLOAT_TYPE> freqs(nstates);
+	for(int i=0;i<nstates;i++) 
+		freqs[i]=mod->StateFreq(i);
+
+	//note that we don't need to zero the whole thing
+	//this was not guaranteed to be safe
+	//memset(dest, 0, nchar * nstates * sizeof(FLOAT_TYPE));
+	for(int d = 0;d < nchar * nstates;d++)
+		dest[d] = ZERO_POINT_ZERO;
+
+	for(int i=0;i<nchar;i++){
+		if(*Ldata < nstates){ //no ambiguity
+			for(int rate=0;rate<nRateCats;rate++){
+				const int rateOffset = rate * nstates * nstates;
+				for(int from=0;from<nstates;from++){
+					const int offset = from * nstates;
+					dest[from] += prmat[rateOffset + offset + (*Ldata)] * partial[from] * freqs[from] * rateProb[rate];
+					}
+				partial += nstates;
+				}
+			}
+		else{ //total ambiguity
+			for(int rate=0;rate<nRateCats;rate++){
+				for(int from=0;from<nstates;from++){
+					dest[from] += partial[from] * freqs[from] * rateProb[rate];
+					}
+				partial += nstates;
+				}
+			}
+
+		if((mod->NoPinvInModel() == false) && (i<=lastConst)){
+			//conStates has different meaning with nuc and other models.  
+			//With nuc it is the base in 1, 2, 4, 8 notation (possibly mulitple bits set if ambiguity)
+			//With other models it is the state index, starting at 0
+			FLOAT_TYPE pinvRescaler = ONE_POINT_ZERO;
+			//if the site is constant but was rescaled, this must be done 
+			if(underflow_mult[i] != 0)
+				pinvRescaler = exp((FLOAT_TYPE)underflow_mult[i]);
+			if(nstates > 4){
+				dest[conStates[i]] += prI * freqs[conStates[i]] * pinvRescaler;
+				}
+			else{
+				if(conStates[i]&1)
+					dest[0] += prI * freqs[0] * pinvRescaler;
+				if(conStates[i]&2) 
+					dest[1] += prI * freqs[1] * pinvRescaler;
+				if(conStates[i]&4) 
+					dest[2] += prI * freqs[2] * pinvRescaler;
+				if(conStates[i]&8) 
+					dest[3] += prI * freqs[3] * pinvRescaler;
+				}
+			}
+
+		Ldata++;
+		dest += nstates;
+		}
+	}
+
+void Tree::LocalMove(){
+	assert(0);
+	//This is not working
+	//this will all assume that there are no polytomies besides the root
+	TreeNode *a, *b, *c, *d;
+	int cPosition;
+
+	//pick a random TreeNode and set up the rest of the nodes in relation to it//
+	int tmp=numTipsTotal+rnd.random_int(numTipsTotal-3)+1;
+	TreeNode *u=allNodes[tmp];
+	//set up the vicinity of u
+	TreeNode *v=u->anc;
+
+	//STANDARDIZE by making v->left=u
+	if(u!=v->left){
+		if(u==v->left->next){
+			if(v->IsRoot()){
+				TreeNode *tempnode=v->left;
+				TreeNode *tempnode2;
+				if(v->left->next==u) tempnode2=u->next;
+				else tempnode2=v->left->next;
+				v->left=u;
+				u->next=tempnode;
+				tempnode->next=tempnode2;
+				tempnode2->next=NULL;
+				}
+			else{
+				v->RotateDescendents();
+			/*	TreeNode *tempnode=v->left;
+				v->left=u;
+				u->next=tempnode;
+				tempnode->next=NULL;
+			*/	}
+			}
+		else{
+			//v must be the root, and u must be v->left->next->next
+			TreeNode *tempnode=v->left;
+			TreeNode *tempnode2=v->left->next;
+			v->left=u;
+			u->next=tempnode;
+			u->next->next=tempnode2;
+			tempnode2->next=NULL;
+			}
+		}
+	//determine a and b
+	if(rnd.uniform()<.5){
+		a=u->left;
+		b=a->next;
+		}
+	else{
+		b=u->left;
+		a=b->next;
+		}
+	//STANDARDIZE by making u->left=a
+	if(u->left!=a){
+		u->RotateDescendents();
+/*		u->left=a;
+		u->left->next=b;
+		b->next=NULL;
+*/		}
+	//set up the vicinity of v
+	if(v->IsRoot()){
+		//if v is the root
+		if(rnd.uniform()<.05){
+			c=u->next;
+			d=c->next;
+			//STANDARDIZE by making c=v->left->next->next
+			u->next=d;
+			d->next=c;
+			c->next=NULL;
+			cPosition=2;
+			}
+		else{
+			d=u->next;
+			c=d->next;//left->next->next
+			if(c==NULL){
+				c=c;
+				}
+			cPosition=2;
+			}
+		}
+	else{
+		//if v is not the root...
+		if(rnd.uniform()<.5){
+			c=u->next;
+			cPosition=1;//left->next
+			d=v->anc;
+			//STANDARDIZE by making d->left=v if cPosition==1
+			if(d->left!=v){
+				if(d->anc!=NULL){
+					d->RotateDescendents();
+/*					TreeNode *tempnode=d->left;
+					d->left=v;
+					v->next=tempnode;
+					tempnode->next=NULL;
+*/					}
+				else{
+					TreeNode *tempnode=d->left;
+					TreeNode *tempnode2;
+					if(d->left->next==v) tempnode2=v->next;
+					else tempnode2=d->left->next;
+					d->left=v;
+					v->next=tempnode;
+					tempnode->next=tempnode2;
+					tempnode2->next=NULL;				
+					}
+				}
+			}
+		else{
+			d=u->next;
+			c=v->anc;
+			cPosition=3;//anc
+			//STANDARDIZE by making c->left=v if cPosition==3
+			if(c->left!=v){
+				if(c->IsRoot()){
+					TreeNode *tempnode=c->left;
+					TreeNode *tempnode2;
+					if(tempnode->next==v) tempnode2=v->next;
+					else tempnode2=tempnode->next;
+					c->left=v;
+					v->next=tempnode;
+					tempnode->next=tempnode2;
+					tempnode2->next=NULL;
+					}
+				else{
+					c->RotateDescendents();
+/*					TreeNode *tempnode=c->left;
+					c->left=v;
+					v->next=tempnode;
+					tempnode->next=NULL;
+*/					}
+				}
+			}
+		}
+	/*Now that things are set up, we can count on the following being true:
+		u->left=a;
+		u->left->next=b;
+		v->left=a;
+		if(v->anc!=NULL){
+			v->left->next=c && d->left=v (case 1)
+			else c->left=v && v->left->next=d (case 2)
+			}
+		else{
+			v->left->next->next=c && v->left->next=d (case 3)
+			}
+	*/	
+
+
+
+	//Ok, the nodes are defined.
+	//Calculate the backbone length and the new length
+	FLOAT_TYPE m;
+	FLOAT_TYPE changing_blens[3];
+//	FLOAT_TYPE new_blens[3];
+	changing_blens[0]=a->dlen;
+	changing_blens[1]=u->dlen;
+	if(cPosition==3){
+		changing_blens[2]=v->dlen;
+		}
+	else {
+		changing_blens[2]=c->dlen;
+		}
+	m=changing_blens[0]+changing_blens[1]+changing_blens[2];
+	FLOAT_TYPE r=rnd.uniform();
+
+
+
+//	FLOAT_TYPE tuning=.25;
+//	FLOAT_TYPE tuning=.1;
+	FLOAT_TYPE mprime=m*exp((FLOAT_TYPE).5*(rnd.uniform()-(FLOAT_TYPE).5));
+	FLOAT_TYPE x, y;
+	//choose whether to "detach" u or v.  Don't actually detach anything though
+	if(rnd.uniform()<.5){ //detach u
+		//calculate x and y
+		x=rnd.uniform()*mprime;
+		y=(a->dlen+u->dlen) * (mprime/m);
+		
+		if(x<y){//all cases
+			//no topo change
+			a->dlen=x;
+			u->dlen=y-x;
+			if(cPosition==3) v->dlen=mprime-y;
+			else c->dlen = mprime-y;
+			TraceDirtynessToRoot(a->anc);
+//			tree->AdjustCLArrayFlagsBelow(a->anc, curMove);
+			}
+		else{
+			//case 1
+			if(cPosition==1){
+				u->left=b;
+				u->left->next=c;
+				c->next=NULL;
+				c->anc=u;
+				v->left->next=a;
+				a->anc=v;
+				a->next=NULL;
+				a->dlen=y;
+				u->dlen=x-y;
+				c->dlen=mprime-x;
+				TraceDirtynessToRoot(c->anc);
+				//tree->AdjustCLArrayFlagsBelow(c->anc, curMove);
+				}
+			//case 3
+			else if(cPosition==2){
+				u->left=b;
+				u->left->next=c;
+				c->next=NULL;
+				c->anc=u;
+				v->left->next->next=a;
+				a->anc=v;
+				a->next=NULL;
+				a->dlen=y;
+				u->dlen=x-y;
+				c->dlen=mprime-x;
+				TraceDirtynessToRoot(c->anc);
+				//tree->AdjustCLArrayFlagsBelow(c->anc, curMove);
+				}
+			//case 2
+			else{//u and v physically swap positions in this case
+				v->left=a;
+				a->anc=v;
+				a->next=d;
+				d->next=NULL;
+				u->left=v;
+				u->next=v->next;
+				v->next=b;
+				b->next=NULL;
+				u->anc=c;
+				v->anc=u;
+				c->left=u;
+				a->dlen=y;
+				v->dlen=x-y;
+				u->dlen=mprime-x;
+				TraceDirtynessToRoot(a->anc);
+				//tree->AdjustCLArrayFlagsBelow(a->anc, curMove);
+				}
+			}
+		}
+
+
+
+	else{
+		//"detach" v
+		x=a->dlen*(mprime/m);
+		y=rnd.uniform() * mprime;
+		if(x<y){
+			//no topo change
+			a->dlen=x;
+			u->dlen=y-x;
+			if(cPosition==3) v->dlen=mprime-y;
+			else c->dlen=mprime-y;
+			TraceDirtynessToRoot(a->anc);
+//			tree->AdjustCLArrayFlagsBelow(a->anc, curMove);
+			}			
+		else{
+			//case 1
+			if(cPosition==1){
+				u->left=b;
+				u->left->next=c;
+				c->next=NULL;
+				c->anc=u;
+				v->left->next=a;
+				a->anc=v;
+				a->next=NULL;
+				a->dlen=y;
+				u->dlen=x-y;
+				c->dlen=mprime-x;
+				TraceDirtynessToRoot(c->anc);
+		//		tree->AdjustCLArrayFlagsBelow(c->anc, curMove);
+				}
+			//case 3
+			else if(cPosition==2){
+				u->left=b;
+				u->left->next=c;
+				c->next=NULL;
+				c->anc=u;
+				v->left->next->next=a;
+				a->anc=v;
+				a->next=NULL;
+				a->dlen=y;
+				u->dlen=x-y;
+				c->dlen=mprime-x;
+				TraceDirtynessToRoot(c->anc);
+	//			tree->AdjustCLArrayFlagsBelow(c->anc, curMove);
+				}
+			//case 2
+			else{//u and v physically swap positions in this case
+				v->left=a;
+				a->anc=v;
+				a->next=d;
+				d->next=NULL;
+				u->left=v;
+				u->next=v->next;
+				v->next=b;
+				b->next=NULL;
+				u->anc=c;
+				v->anc=u;
+				c->left=u;
+				a->dlen=y;
+				v->dlen=x-y;
+				u->dlen=mprime-x;
+				TraceDirtynessToRoot(a->anc);
+//				tree->AdjustCLArrayFlagsBelow(a->anc, curMove);
+				}
+			}
+		}
+	}	
+
+void Tree::NNIMutate(int node, int branch, FLOAT_TYPE optPrecision, int subtreeNode){
+
+	assert(0);
+	TreeNode* connector=NULL;
+	TreeNode* cut=NULL;
+	TreeNode* broken=NULL;
+	TreeNode* sib=NULL;
+
+	assert(node<numNodesTotal);
+	connector = allNodes[node];
+	assert(connector->IsInternal());
+	
+	if(branch==0){
+		cut=connector->left;
+		sib=connector->right;
+		}
+	else{
+		cut=connector->right;
+		sib=connector->left;
+		}
+
+	SweepDirtynessOverTree(cut);
+
+	//cut will be attached to connector's next or prev
+	if(connector->next!=NULL) broken=connector->next;
+	else{
+		if(connector->anc==root){
+			//special case if connector's anc is root and connector is the rightmost decendent
+			broken=connector->prev->prev;
+			}
+		else broken=connector->prev;
+		}
+
+	//take out connector and substitute cut's sib for it
+   	connector->SubstituteNodeWithRespectToAnc(sib);
+
+	//establish correct topology for connector and cut nodes
+	connector->left=connector->right=cut;
+	connector->next=connector->prev=connector->anc=cut->next=cut->prev=NULL;
+
+	//assign branchlengths such that the previous blen of broken is divided between
+	//broken and connector
+	//cut will keep its original blen.  Connector's old blen will be added to sib
+	sib->dlen+=connector->dlen;
+
+	if(broken->dlen*.5 > min_brlen){
+		connector->dlen=broken->dlen*(FLOAT_TYPE).5;
+		broken->dlen-=connector->dlen;
+		}
+	else connector->dlen=broken->dlen=min_brlen;
+
+	//put everything in its place
+	broken->SubstituteNodeWithRespectToAnc(connector);
+	connector->AddDes(broken);
+	
+	//try some branch length optimization
+	SweepDirtynessOverTree(connector, cut);
+	MakeNodeDirty(connector);
+
+#ifdef OPT_DEBUG
+	opt << "NNI\n";
+	optsum << "NNI\n";
+#endif
+
+	OptimizeBranchesWithinRadius(connector, optPrecision, subtreeNode, NULL);
+	}
+
+/*
+void Tree::OutputBinaryFormattedTree(ofstream &out) const{
+	
+	for(int i=0;i<numNodesTotal;i++){
+		allNodes[i]->OutputBinaryNodeInfo(out);
+		}
+	out.write((char*) &lnL, sizeof(FLOAT_TYPE));
+	out.write((char*) &numTipsTotal, sizeof(numTipsTotal));
+	out.write((char*) &numTipsAdded, sizeof(numTipsAdded));
+	out.write((char*) &numNodesAdded, sizeof(numNodesAdded));
+	out.write((char*) &numBranchesAdded, sizeof(numBranchesAdded));
+	out.write((char*) &numNodesTotal, sizeof(numNodesTotal));
+	}
+*/
+
+void Tree::OutputBinaryFormattedTree(OUTPUT_CLASS &out) const{
+
+	out.WRITE_TO_FILE(&numTipsTotal, sizeof(numTipsTotal), 1);
+	out.WRITE_TO_FILE(&lnL, sizeof(FLOAT_TYPE), 1);
+	out.WRITE_TO_FILE(&numTipsAdded, sizeof(numTipsAdded), 1);
+	out.WRITE_TO_FILE(&numNodesAdded, sizeof(numNodesAdded), 1);
+	out.WRITE_TO_FILE(&numBranchesAdded, sizeof(numBranchesAdded), 1);
+	out.WRITE_TO_FILE(&numNodesTotal, sizeof(numNodesTotal), 1);
+
+	for(int i=0;i<numNodesTotal;i++){
+		allNodes[i]->OutputBinaryNodeInfo(out);
+		}
+	}
+
+void Tree::ReadBinaryFormattedTree(FILE *in){
+	//this allows a check that the checkpoint was written for the same
+	//dataset that was specified in the conf
+	int expectedNumTipsTotal = numTipsTotal;
+
+	fread((char*) &numTipsTotal, sizeof(numTipsTotal), 1, in);
+	if(numTipsTotal != expectedNumTipsTotal){
+		int wrong = numTipsTotal;
+		numTipsTotal = expectedNumTipsTotal;
+		throw ErrorException("Number of taxa from checkpoint (%d) is not the same as in the current\n\tdatafile (%d)! The checkpoint seems to be from a different run!", wrong, expectedNumTipsTotal);
+		}	
+	
+	fread((char*) &lnL, sizeof(FLOAT_TYPE), 1, in);
+	fread((char*) &numTipsAdded, sizeof(numTipsAdded), 1, in);
+	fread((char*) &numNodesAdded, sizeof(numNodesAdded), 1, in);
+	fread((char*) &numBranchesAdded, sizeof(numBranchesAdded), 1, in);
+	fread((char*) &numNodesTotal, sizeof(numNodesTotal), 1, in);
+
+	int dum;
+
+	fread((char*) &dum, sizeof(dum), 1, in);
+	allNodes[0]->left = allNodes[dum];
+
+	fread((char*) &dum, sizeof(dum), 1, in);
+	allNodes[0]->right = allNodes[dum];
+
+	fread((char*) &dum, sizeof(dum), 1, in);
+	if(dum == 0) allNodes[0]->prev = NULL;
+	else allNodes[0]->prev = allNodes[dum];
+	
+	fread((char*) &dum, sizeof(dum), 1, in);
+	if(dum == 0) allNodes[0]->next = NULL;
+	else allNodes[0]->next = allNodes[dum];
+	
+	fread((char*) &dum, sizeof(dum), 1, in);
+	if(dum == 0) allNodes[0]->anc = NULL;
+	else allNodes[0]->anc = allNodes[dum];
+	
+	fread((char*) &allNodes[0]->dlen, sizeof(FLOAT_TYPE), 1, in);
+
+//	double d;
+	for(int i=1;i<=numTipsTotal;i++){
+		fread(&dum, sizeof(dum), 1, in);
+		if(dum == 0) allNodes[i]->prev = NULL;
+		else allNodes[i]->prev = allNodes[dum];
+
+		fread(&dum, sizeof(dum), 1, in);
+		if(dum == 0) allNodes[i]->next = NULL;
+		else allNodes[i]->next = allNodes[dum];
+
+		//all non-root nodes will have an anc, which might be nodenum 0 (the root)
+		//so, don't test for zero here
+		fread(&dum, sizeof(dum), 1, in);
+		allNodes[i]->anc = allNodes[dum];
+
+		fread(&(allNodes[i]->dlen), sizeof(FLOAT_TYPE), 1, in);
+		}
+
+	for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+		fread((char*) &dum, sizeof(dum), 1, in);
+		allNodes[i]->left = allNodes[dum];
+		
+		fread((char*) &dum, sizeof(dum), 1, in);
+		allNodes[i]->right = allNodes[dum];
+		
+		fread((char*) &dum, sizeof(dum), 1, in);
+		if(dum == 0) allNodes[i]->prev = NULL;
+		else allNodes[i]->prev = allNodes[dum];
+		
+		fread((char*) &dum, sizeof(dum), 1, in);
+		if(dum == 0) allNodes[i]->next = NULL;
+		else allNodes[i]->next = allNodes[dum];
+		
+		//all non-root nodes will have an anc, which might be nodenum 0 (the root)
+		//so, don't test for zero here
+		fread((char*) &dum, sizeof(dum), 1, in);
+		allNodes[i]->anc = allNodes[dum];
+		
+		fread((char*) &allNodes[i]->dlen, sizeof(FLOAT_TYPE), 1, in);
+		}
+	}
+
+FLOAT_TYPE Tree::OptimizeInsertDeleteRates(FLOAT_TYPE prec, int modnum){
+	FLOAT_TYPE improve = 0.0;
+	FLOAT_TYPE insProp, del;
+	insProp = modPart->GetModel(modnum)->InsertRate();
+	del = modPart->GetModel(modnum)->DeleteRate();
+
+	//insert rate here is really the proportion of sites in the one insert category
+	improve += OptimizeBoundedParameter(modnum, prec, insProp, 0, max(1e-4, insProp / 1.5), min(insProp * 1.5, 0.9999), &Model::SetInsertRate);
+
+	//don't optimize del rate in these cases because it becomes non-identifiable
+	if(modSpecSet.NumSpecs() != 1 && modSpecSet.InferSubsetRates() == false)
+		improve += OptimizeBoundedParameter(modnum, prec, del, 0,       max(0.001, del / 1.5), min(del * 1.5, 999.9), &Model::SetDeleteRate);
+	
+	return improve;
+	}
+
+FLOAT_TYPE Tree::OptimizeOmegaParameters(FLOAT_TYPE prec, int modnum){
+	FLOAT_TYPE omegaImprove=ZERO_POINT_ZERO;
+	FLOAT_TYPE minVal = 1.0e-5;
+	int i=0;
+
+	Model *mod = modPart->GetModel(modnum);
+
+#undef DEBUG_OMEGA_OPT
+	//codon models can be a little unstable, so make the difference in scores that we're looking for in OptBounded a bit larger.  9 is the default value.
+	//it really shouldn't matter in almost all cases.
+	FLOAT_TYPE scoreDiffTarget;
+#ifdef SINGLE_PRECISION_FLOATS
+	scoreDiffTarget = 4.0;
+#else
+	scoreDiffTarget = 7.0;
+#endif
+
+	//limiting change in any one pass
+	double maxRateChangeProportion = 2.0; //this is the allowed proportion of change, i.e., x is bounded by x/maxRateChangeProportion and x * maxRateChangeProportion
+	double maxProbChange = 0.10; //this is the actual allowed magnitude of change, i.e, x - maxProbChange aned x + maxProbChange
+	double curVal;
+
+	//give the first rate more leeway in the down direction, since it may want to approach zero
+	if(mod->NRateCats() == 1){ 
+		curVal = mod->Omega(i);
+		omegaImprove += OptimizeBoundedParameter(modnum, prec, curVal, 0,
+			max(minVal, curVal / 5.0),
+			max(min(9999.9, curVal * maxRateChangeProportion), 0.01),
+			&Model::SetOmega, scoreDiffTarget);
+		}
+	else{
+		curVal = mod->Omega(i);
+		omegaImprove += OptimizeBoundedParameter(modnum, prec, curVal, i,
+			max(minVal, curVal / 5.0),
+			min(mod->Omega(i+1), max(curVal * maxRateChangeProportion, 0.01)), 
+			&Model::SetOmega, scoreDiffTarget);
+
+#ifdef DEBUG_OMEGA_OPT
+		for(int j=0;j<mod->NRateCats();j++)
+			outman.UserMessage("%f\t%f", mod->Omega(j), mod->OmegaProb(j));
+#endif
+		curVal = mod->OmegaProb(i);
+		omegaImprove += OptimizeBoundedParameter(modnum, prec, curVal, i,
+			max(minVal, curVal-maxProbChange),
+			min((ONE_POINT_ZERO - (minVal * (FLOAT_TYPE)(mod->NRateCats() - 1))),  curVal+maxProbChange), 
+			&Model::SetOmegaProb, scoreDiffTarget);
+
+#ifdef DEBUG_OMEGA_OPT
+		for(int j=0;j<mod->NRateCats();j++)
+			outman.UserMessage("%f\t%f", mod->Omega(j), mod->OmegaProb(j));
+#endif
+
+		for(i=1;i < mod->NRateCats()-1;i++){
+			curVal = mod->Omega(i);
+			omegaImprove += OptimizeBoundedParameter(modnum, prec, curVal, i,
+				max(mod->Omega(i-1), curVal / maxRateChangeProportion),
+				min(mod->Omega(i+1), max(curVal * maxRateChangeProportion, 0.01)), 
+				&Model::SetOmega, scoreDiffTarget);
+
+#ifdef DEBUG_OMEGA_OPT
+			for(int j=0;j<mod->NRateCats();j++)
+				outman.UserMessage("%f\t%f", mod->Omega(j), mod->OmegaProb(j));
+#endif
+			curVal = mod->OmegaProb(i);
+			omegaImprove += OptimizeBoundedParameter(modnum, prec, curVal, i,
+				max(minVal, curVal-maxProbChange),
+				min((ONE_POINT_ZERO - (minVal * (FLOAT_TYPE)(mod->NRateCats() - 1))),  curVal+maxProbChange),
+				&Model::SetOmegaProb, scoreDiffTarget);
+
+#ifdef DEBUG_OMEGA_OPT
+			for(int j=0;j<mod->NRateCats();j++)
+				outman.UserMessage("%f\t%f", mod->Omega(j), mod->OmegaProb(j));
+#endif
+			}
+		curVal = mod->Omega(i);
+		omegaImprove += OptimizeBoundedParameter(modnum, prec, curVal, i,
+			max(mod->Omega(i-1), curVal / maxRateChangeProportion),
+			min(9999.9, curVal * maxRateChangeProportion),
+			&Model::SetOmega, scoreDiffTarget);
+
+#ifdef DEBUG_OMEGA_OPT
+		for(int j=0;j<mod->NRateCats();j++)
+			outman.UserMessage("%f\t%f", mod->Omega(j), mod->OmegaProb(j));
+#endif
+		curVal = mod->OmegaProb(i);
+		omegaImprove += OptimizeBoundedParameter(modnum, prec, curVal, i,
+			max(minVal, curVal-maxProbChange),
+			min((ONE_POINT_ZERO - (minVal * (FLOAT_TYPE)(mod->NRateCats() - 1))),  curVal+maxProbChange),
+			&Model::SetOmegaProb, scoreDiffTarget);
+
+#ifdef DEBUG_OMEGA_OPT
+		for(int j=0;j<mod->NRateCats();j++)
+			outman.UserMessage("%f\t%f", mod->Omega(j), mod->OmegaProb(j));
+#endif
+		}
+
+/*
+	if(mod->NRateCats() == 1) 
+		omegaImprove += OptimizeBoundedParameter(prec, mod->Omega(i), 0, minVal, 9999.9, &Model::SetOmega);
+	else{
+		omegaImprove += OptimizeBoundedParameter(prec, mod->Omega(i), i, minVal, mod->Omega(1), &Model::SetOmega);
+//		for(int j=0;j<mod->NRateCats();j++)
+//			cout << mod->Omega(j) << "\t" << mod->OmegaProb(j) << endl;
+		omegaImprove += OptimizeBoundedParameter(prec, mod->OmegaProb(i), i, minVal, ONE_POINT_ZERO, &Model::SetOmegaProb);
+//		for(int j=0;j<mod->NRateCats();j++)
+//			cout << mod->Omega(j) << "\t" << mod->OmegaProb(j) << endl;
+		for(i=1;i < mod->NRateCats()-1;i++){
+			omegaImprove += OptimizeBoundedParameter(prec, mod->Omega(i), i, mod->Omega(i-1), mod->Omega(i+1), &Model::SetOmega);
+//			for(int j=0;j<mod->NRateCats();j++)
+//				cout << mod->Omega(j) << "\t" << mod->OmegaProb(j) << endl;
+			omegaImprove += OptimizeBoundedParameter(prec, mod->OmegaProb(i), i, minVal, ONE_POINT_ZERO, &Model::SetOmegaProb);
+//			for(int j=0;j<mod->NRateCats();j++)
+//				cout << mod->Omega(j) << "\t" << mod->OmegaProb(j) << endl;
+			}
+		omegaImprove += OptimizeBoundedParameter(prec, mod->Omega(i), i, mod->Omega(i-1), 9999.9, &Model::SetOmega);
+//		for(int j=0;j<mod->NRateCats();j++)
+//			cout << mod->Omega(j) << "\t" << mod->OmegaProb(j) << endl;
+		omegaImprove += OptimizeBoundedParameter(prec, mod->OmegaProb(i), i, minVal, ONE_POINT_ZERO, &Model::SetOmegaProb);
+//		for(int j=0;j<mod->NRateCats();j++)
+//			cout << mod->Omega(j) << "\t" << mod->OmegaProb(j) << endl;
+		}
+*/	return omegaImprove;
+	}
+
+FLOAT_TYPE Tree::OptimizeEquilibriumFreqs(FLOAT_TYPE prec, int modnum){
+	FLOAT_TYPE freqImprove=ZERO_POINT_ZERO;
+	int i=0;
+
+	Model *mod = modPart->GetModel(modnum);
+
+	//limiting change in any one pass much more
+	double maxChangeProportion = 1.2;
+
+	for(i=0;i < mod->NStates();i++){
+		double curVal = mod->StateFreq(i);
+		freqImprove += OptimizeBoundedParameter(modnum, prec, curVal, i, 
+			min(max((mod->NStates() > 4 ? 0.0001 : 0.01), curVal / maxChangeProportion), curVal),
+			max(min(0.96, curVal * maxChangeProportion), curVal),
+			&Model::SetEquilibriumFreq);
+		}
+	return freqImprove;
+	}
+
+FLOAT_TYPE Tree::OptimizeRelativeNucRates(FLOAT_TYPE prec, int modnum){
+	FLOAT_TYPE rateImprove=ZERO_POINT_ZERO;
+	FLOAT_TYPE minVal = 1.0e-5;
+	int i=0;
+	FLOAT_TYPE scoreOnEntry = lnL;
+
+	const ModelSpecification *modSpec = modSpecSet.GetModSpec(modnum);
+	Model *mod = modPart->GetModel(modnum);
+
+	//codon models can be a little unstable, so make the difference in scores that we're looking for in OptBounded a bit larger.  9 is the default value.
+	//it really shouldn't matter in almost all cases.
+	FLOAT_TYPE scoreDiffTarget;
+#ifdef SINGLE_PRECISION_FLOATS
+	if(modSpec->IsCodon())
+		scoreDiffTarget = 4.0;
+	else
+		scoreDiffTarget = 5.0;
+#else
+	if(modSpec->IsCodon())
+		scoreDiffTarget = 7.0;
+	else
+		scoreDiffTarget = 9.0;
+#endif
+
+	//limiting change in any one pass
+	double maxChangeProportion = 5.0;	
+	
+	//assert(mod->Nst() > 1);
+	if(mod->Nst() == 2){
+		//this was wrong - it should be Rates(1) i.e., K that is being optimized here
+		double curVal = mod->Rates(1);
+		rateImprove += OptimizeBoundedParameter(modnum, prec, curVal, 1, 
+				max(min(1.0e-3, curVal), curVal / maxChangeProportion),
+				min(max(999.0, curVal), curVal * maxChangeProportion),
+				&Model::SetRelativeNucRate, scoreDiffTarget);
+/*				
+		rateImprove += OptimizeBoundedParameter(prec, mod->Rates(0), 0, 
+				max(0.05, mod->Rates(0) / maxChangeProportion),
+				min(999.0, mod->Rates(0) * maxChangeProportion),
+				&Model::SetRelativeNucRate);
+*/
+		}
+	else if(modSpec->IsNucleotide() || modSpec->IsCodon()){
+/*		char temp[100];
+		int oprec = 4;
+		sprintf(temp," r %.*f %.*f %.*f %.*f %.*f", oprec, mod->Rates(0), oprec, mod->Rates(1), oprec, mod->Rates(2), oprec, mod->Rates(3), oprec, mod->Rates(4));
+		outman.UserMessage("%s", temp);
+*/		for(i=0;i < 5;i++){
+			bool skip = false;
+			if(modSpec->IsArbitraryRateMatrix()){
+				if(mod->GetArbitraryRateMatrixIndeces()[i] == mod->GetArbitraryRateMatrixIndeces()[5]) skip = true;
+				}
+			if(!skip){
+				double curVal = mod->Rates(i);
+				rateImprove += OptimizeBoundedParameter(modnum, prec, curVal, i, 
+					max(min(1.0e-3, curVal), curVal / maxChangeProportion),
+					min(max(999.0, curVal), curVal * maxChangeProportion),
+					&Model::SetRelativeNucRate, scoreDiffTarget);
+				}
+			}
+		}
+	else if(modSpec->IsAminoAcid()){
+
+#ifdef DEBUG_MESSAGES
+/*
+		string s;
+		mod->FillModelOrHeaderStringForTable(s, true);
+		ofstream tab("valTable.log", ios::app);
+		tab << lnL << "\t" << s.c_str() << "\t" << endl;
+		tab.close();
+*/
+#endif
+	
+		list<int> reopt;
+#ifdef SUM_AA_REL_RATES
+		mod->NormalizeSumConstrainedRelativeRates(true, -1);
+		for(i=0;i < mod->NumRelRates();i++)
+			reopt.push_back(i);
+#else
+		for(i=0;i < mod->NumRelRates()-1;i++)
+			reopt.push_back(i);
+#endif
+		int pass = 0;
+		while(reopt.size() != 0 && pass < 5){
+			double beflnL = lnL;
+			list<int>::iterator it = reopt.begin();
+			int num = reopt.size();
+			while(it != reopt.end()){
+				double beflnL = lnL;
+				double befval = mod->Rates(*it);
+#ifdef SUM_AA_REL_RATES
+				FLOAT_TYPE minV = max(MIN_REL_RATE, befval / maxChangeProportion);
+				if(minV < SUM_TO * 1.0e-3/190.0){
+					minV = min(befval, MIN_REL_RATE);
+					}
+				FLOAT_TYPE maxV = min(MAX_REL_RATE, befval * maxChangeProportion);
+				if(maxV < SUM_TO * 1.0e-3/190.0)
+					maxV = SUM_TO * 1.0e-3/190.0;
+				rateImprove += OptimizeBoundedParameter(modnum, prec, befval, *it, 
+					minV, maxV,
+					&Model::SetSumConstrainedRelativeRate, scoreDiffTarget);
+#else
+				FLOAT_TYPE minV = max(min(1.0e-3, befval), befval / maxChangeProportion);
+				if(minV < 0.01)
+					minV = min(befval, 1.0e-3);
+				FLOAT_TYPE maxV = min(max(9999.0, befval), befval * maxChangeProportion);
+				if(maxV < 0.01)
+					maxV = 0.01;
+				rateImprove += OptimizeBoundedParameter(modnum, prec, befval, *it, 
+					minV, maxV, 
+					&Model::SetRelativeNucRate, scoreDiffTarget);
+#endif
+				if(FloatingPointEquals(lnL, beflnL, 1e-8)){
+					list<int>::iterator del=it;
+					it++;
+					reopt.erase(del);
+					}
+				else it++;				
+				}
+			pass++;
+			outman.DebugMessage("reoptimized %d. improvement %.6f", num, lnL - beflnL);
+#ifdef DEBUG_MESSAGES
+			/*
+			string s;
+			mod->FillModelOrHeaderStringForTable(s, true);
+			ofstream tab("valTable.log", ios::app);
+			tab << lnL << "\t" << s.c_str() << endl;
+			tab.close();
+			*/
+#endif
+			}
+		FLOAT_TYPE currDiff = lnL - scoreOnEntry;
+		outman.UserMessage("summed improve %.8f actual diff %.8f, %.8f, %.8f", rateImprove, currDiff, scoreOnEntry, lnL);
+		if(currDiff < rateImprove && currDiff >= 0.0)
+			rateImprove = currDiff;
+		
+		string modstr;
+		modPart->FillGarliFormattedModelStrings(modstr);
+		ofstream modlog("models.log", ios::app);
+		modlog << lnL << "\t" << modstr.c_str() << "\t";
+
+		char treeString[5000];
+		modlog.setf( ios::floatfield, ios::fixed );
+		modlog.setf( ios::showpoint );
+		root->MakeNewick(treeString, false, true);
+		modlog << treeString << ";\n";
+
+		modlog.close();
+		}
+	return rateImprove;
+	}
+
+FLOAT_TYPE Tree::OptimizeFlexRates(FLOAT_TYPE prec, int modnum){
+	FLOAT_TYPE flexImprove=ZERO_POINT_ZERO;
+	FLOAT_TYPE minVal = 1.0e-5;
+	int i=0;
+
+	//PARTITION
+	Model *mod = modPart->GetModel(modnum);
+
+	//limiting change in any one pass
+	double maxRateChangeProp = 1.5;
+	double maxProbChange = 0.10;
+	double curVal;
+
+	//very tight increments really seems to help flex optimization
+	FLOAT_TYPE scoreDiffTarget;
+#ifdef SINGLE_PRECISION_FLOATS
+	scoreDiffTarget = 5.0;
+#else
+	scoreDiffTarget = 10.0;
+#endif
+
+#ifdef DEBUG_FLEX_OPT
+	outman.UserMessage("%.4f", lnL);
+	for(int j=0;j<mod->NRateCats();j++)
+		outman.UserMessage("%f\t%f", mod->FlexRate(j), mod->FlexProb(j));
+#endif
+
+	//the EffectiveXXXFlexBound functions here just give the values at
+	//which the rate currently being optimized would cross the one above
+	//or below it due to rescaling of the rates to keep the mean rate 1.0
+
+	curVal = mod->FlexRate(i);
+	flexImprove += OptimizeBoundedParameter(modnum, prec, curVal, i,
+		max(min(minVal, curVal), curVal / maxRateChangeProp),
+		min(mod->EffectiveUpperFlexBound(i), curVal * maxRateChangeProp),
+		&Model::SetFlexRate, scoreDiffTarget);
+	
+#ifdef DEBUG_FLEX_OPT
+	outman.UserMessage("%.4f", lnL);
+	for(int j=0;j<mod->NRateCats();j++)
+		outman.UserMessage("%f\t%f", mod->FlexRate(j), mod->FlexProb(j));
+#endif
+
+	curVal = mod->FlexProb(i);
+	flexImprove += OptimizeBoundedParameter(modnum, prec, curVal, i,
+		max(min(minVal, curVal), curVal-maxProbChange),
+		min((ONE_POINT_ZERO - (minVal * (FLOAT_TYPE)(mod->NRateCats() - 1))), curVal + maxProbChange),
+		&Model::SetFlexProb, scoreDiffTarget);
+
+#ifdef DEBUG_FLEX_OPT
+	outman.UserMessage("%.4f", lnL);
+	for(int j=0;j<mod->NRateCats();j++)
+		outman.UserMessage("%f\t%f", mod->FlexRate(j), mod->FlexProb(j));
+#endif
+
+	for(i=1;i < mod->NRateCats()-1;i++){
+
+		curVal = mod->FlexRate(i);
+		flexImprove += OptimizeBoundedParameter(modnum, prec, curVal, i,
+			max(mod->EffectiveLowerFlexBound(i), curVal / maxRateChangeProp),
+			min(mod->EffectiveUpperFlexBound(i), curVal * maxRateChangeProp),
+			&Model::SetFlexRate, scoreDiffTarget);
+
+#ifdef DEBUG_FLEX_OPT
+		outman.UserMessage("%.4f", lnL);
+		for(int j=0;j<mod->NRateCats();j++)
+			outman.UserMessage("%f\t%f", mod->FlexRate(j), mod->FlexProb(j));
+#endif
+
+		curVal = mod->FlexProb(i);
+		flexImprove += OptimizeBoundedParameter(modnum, prec, curVal, i,
+			max(min(minVal, curVal), curVal-maxProbChange),
+			min((ONE_POINT_ZERO - (minVal * (FLOAT_TYPE)(mod->NRateCats() - 1))), curVal + maxProbChange),
+			&Model::SetFlexProb, scoreDiffTarget);
+
+#ifdef DEBUG_FLEX_OPT
+		outman.UserMessage("%.4f", lnL);
+		for(int j=0;j<mod->NRateCats();j++)
+			outman.UserMessage("%f\t%f", mod->FlexRate(j), mod->FlexProb(j));
+#endif
+		}
+
+	curVal = mod->FlexRate(i);
+	flexImprove += OptimizeBoundedParameter(modnum, prec, curVal, i,
+		max(mod->EffectiveLowerFlexBound(i), curVal / maxRateChangeProp),
+		min(max(curVal, 999.9), curVal * maxRateChangeProp),
+		&Model::SetFlexRate, scoreDiffTarget);
+
+#ifdef DEBUG_FLEX_OPT
+	outman.UserMessage("%.4f", lnL);
+	for(int j=0;j<mod->NRateCats();j++)
+		outman.UserMessage("%f\t%f", mod->FlexRate(j), mod->FlexProb(j));
+#endif
+
+	curVal = mod->FlexProb(i);
+	flexImprove += OptimizeBoundedParameter(modnum, prec, curVal, i,
+		max(min(minVal, curVal), curVal-maxProbChange),
+		min((ONE_POINT_ZERO - (minVal * (FLOAT_TYPE)(mod->NRateCats() - 1))), curVal + maxProbChange),
+		&Model::SetFlexProb, scoreDiffTarget);
+
+#ifdef DEBUG_FLEX_OPT
+	outman.UserMessage("%.4f", lnL);
+	for(int j=0;j<mod->NRateCats();j++)
+		outman.UserMessage("%f\t%f", mod->FlexRate(j), mod->FlexProb(j));
+#endif
+
+	return flexImprove;
+	}
+
+FLOAT_TYPE Tree::OptimizeSubsetRates(FLOAT_TYPE prec){
+	FLOAT_TYPE subrateImprove=ZERO_POINT_ZERO;
+	FLOAT_TYPE minVal = 1.0e-5;
+	int i=0;
+
+	//DEBUG
+	//store the current values in case we end up making the lnL worse
+	Score();
+	FLOAT_TYPE start = lnL;
+	vector<FLOAT_TYPE> initVals;
+	for(int i = 0;i < modPart->NumSubsetRates();i++)
+		initVals.push_back(modPart->SubsetRate(i));
+
+	//limiting change in any one pass
+	double maxRateChangeProp = 0.9;
+	for(i=0;i < modPart->NumSubsetRates();i++){
+		subrateImprove += OptimizeBoundedParameter<ModelPartition>(prec, modPart->SubsetRate(i), i, 
+			max(minVal, modPart->SubsetRate(i)*maxRateChangeProp),
+			modPart->SubsetRate(i) / maxRateChangeProp,
+			modPart,
+			&ModelPartition::SetSubsetRate);
+		}
+
+	Score();
+	FLOAT_TYPE after = lnL;
+	//if the optimization made things at all worse we'll revert to the old values,
+	//but not complain about it unless it is a meaningful difference
+	if(after < start){
+		if(!FloatingPointEquals(after, start, 1.0e-3))
+			outman.DebugMessage("##NOTE: SUBSET RATE OPT WORSENED SCORE##");
+		modPart->SetSubsetRates(initVals, false);
+		MakeAllNodesDirty();
+		Score();
+		after = lnL;
+		assert(FloatingPointEquals(after, start, 1e-6));
+		subrateImprove = ZERO_POINT_ZERO;
+		}
+
+	assert(after - start + 1e-6> 0.0);
+	return subrateImprove;
+	}
+
+void Tree::CalcFullCLAInternalInternalEQUIV(CondLikeArray *destCLA, const CondLikeArray *LCLA, const CondLikeArray *RCLA, const FLOAT_TYPE *Lpr, const FLOAT_TYPE *Rpr, const char *leftEQ, const char *rightEQ, int modIndex, int dataIndex){
+	//this function assumes that the pmat is arranged with the 16 entries for the
+	//first rate, followed by 16 for the second, etc.
+	FLOAT_TYPE *dest=destCLA->arr;
+	const FLOAT_TYPE *LCL=LCLA->arr;
+	const FLOAT_TYPE *RCL=RCLA->arr;
+	FLOAT_TYPE L1, L2, L3, L4, R1, R2, R3, R4;
+
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+
+	const int nRateCats = mod->NRateCats();
+	const int nchar = data->NChar();
+	assert(nRateCats == 1);
+	
+#ifdef UNIX
+	posix_madvise(dest, nchar*4*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+	posix_madvise((void *)LCL, nchar*4*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+	posix_madvise((void *)RCL, nchar*4*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+#endif
+	
+	for(int i=0;i<nchar;i++) {
+		if(leftEQ[i] == false){
+			L1=( Lpr[0]*LCL[0]+Lpr[1]*LCL[1]+Lpr[2]*LCL[2]+Lpr[3]*LCL[3]);
+			L2=( Lpr[4]*LCL[0]+Lpr[5]*LCL[1]+Lpr[6]*LCL[2]+Lpr[7]*LCL[3]);
+			L3=( Lpr[8]*LCL[0]+Lpr[9]*LCL[1]+Lpr[10]*LCL[2]+Lpr[11]*LCL[3]);
+			L4=( Lpr[12]*LCL[0]+Lpr[13]*LCL[1]+Lpr[14]*LCL[2]+Lpr[15]*LCL[3]);
+			}
+
+		if(rightEQ[i] == false){
+			R1=(Rpr[0]*RCL[0]+Rpr[1]*RCL[1]+Rpr[2]*RCL[2]+Rpr[3]*RCL[3]);
+			R2=(Rpr[4]*RCL[0]+Rpr[5]*RCL[1]+Rpr[6]*RCL[2]+Rpr[7]*RCL[3]);
+			R3=(Rpr[8]*RCL[0]+Rpr[9]*RCL[1]+Rpr[10]*RCL[2]+Rpr[11]*RCL[3]);			
+			R4=(Rpr[12]*RCL[0]+Rpr[13]*RCL[1]+Rpr[14]*RCL[2]+Rpr[15]*RCL[3]);
+			}
+
+		dest[0] = L1 * R1;
+		dest[1] = L2 * R2;
+		dest[2] = L3 * R3;
+		dest[3] = L4 * R4;
+
+		assert(dest[0] == dest[0]);
+		assert(dest[0] >= 0);
+		dest += 4;
+		LCL += 4;
+		RCL += 4;
+		}
+
+	const int *left_mult=LCLA->underflow_mult;
+	const int *right_mult=RCLA->underflow_mult;
+	int *undermult=destCLA->underflow_mult;
+	
+	for(int i=0;i<nchar;i++){
+		undermult[i] = left_mult[i] + right_mult[i];
+		}
+	destCLA->rescaleRank = 2 + LCLA->rescaleRank + RCLA->rescaleRank;
+	}
+
+void Tree::CalcFullCLAInternalInternal(CondLikeArray *destCLA, const CondLikeArray *LCLA, const CondLikeArray *RCLA, const FLOAT_TYPE *Lpr, const FLOAT_TYPE *Rpr, int modIndex, int dataIndex){
+	//this function assumes that the pmat is arranged with the 16 entries for the
+	//first rate, followed by 16 for the second, etc.
+	FLOAT_TYPE *dest=destCLA->arr;
+	const FLOAT_TYPE *LCL=LCLA->arr;
+	const FLOAT_TYPE *RCL=RCLA->arr;
+	FLOAT_TYPE L1, L2, L3, L4, R1, R2, R3, R4;
+
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+
+	const int nRateCats = mod->NRateCats();
+	const int nchar = data->NChar();
+	const int *counts = data->GetCounts();
+
+#ifdef UNIX
+	posix_madvise(dest, nchar*4*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+	posix_madvise((void *)LCL, nchar*4*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+	posix_madvise((void *)RCL, nchar*4*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+#endif
+	
+	if(nRateCats == 4){//the unrolled 4 rate version
+#ifdef OMP_INTINTCLA
+		#pragma omp parallel for private(dest, LCL, RCL, L1, L2, L3, L4, R1, R2, R3, R4)
+		for(int i=0;i<nchar;i++){
+			int index=4*4*i;
+			dest = &(destCLA->arr[index]);
+			LCL = &(LCLA->arr[index]); 
+			RCL= &(RCLA->arr[index]);
+#else
+		for(int i=0;i<nchar;i++){
+#endif
+#ifdef USE_COUNTS_IN_BOOT
+			if(counts[i]> 0){
+#else
+			if(1){
+#endif
+				L1=((Lpr[0]*LCL[0])+(Lpr[1]*LCL[1]))+((Lpr[2]*LCL[2])+(Lpr[3]*LCL[3]));
+				L2=((Lpr[4]*LCL[0])+(Lpr[5]*LCL[1]))+((Lpr[6]*LCL[2])+(Lpr[7]*LCL[3]));
+				L3=((Lpr[8]*LCL[0])+(Lpr[9]*LCL[1]))+((Lpr[10]*LCL[2])+(Lpr[11]*LCL[3]));
+				L4=((Lpr[12]*LCL[0])+(Lpr[13]*LCL[1]))+((Lpr[14]*LCL[2])+(Lpr[15]*LCL[3]));
+
+				R1=((Rpr[0]*RCL[0])+(Rpr[1]*RCL[1]))+((Rpr[2]*RCL[2])+(Rpr[3]*RCL[3]));
+				R2=((Rpr[4]*RCL[0])+(Rpr[5]*RCL[1]))+((Rpr[6]*RCL[2])+(Rpr[7]*RCL[3]));
+				R3=((Rpr[8]*RCL[0])+(Rpr[9]*RCL[1]))+((Rpr[10]*RCL[2])+(Rpr[11]*RCL[3]));			
+				R4=((Rpr[12]*RCL[0])+(Rpr[13]*RCL[1]))+((Rpr[14]*RCL[2])+(Rpr[15]*RCL[3]));
+
+				dest[0] = L1 * R1;
+				dest[1] = L2 * R2;
+				dest[2] = L3 * R3;
+				dest[3] = L4 * R4;
+
+				dest+=4;
+				LCL+=4;
+				RCL+=4;
+
+				L1=(Lpr[16+0]*LCL[0]+Lpr[16+1]*LCL[1])+(Lpr[16+2]*LCL[2]+Lpr[16+3]*LCL[3]);
+				L2=(Lpr[16+4]*LCL[0]+Lpr[16+5]*LCL[1])+(Lpr[16+6]*LCL[2]+Lpr[16+7]*LCL[3]);
+				L3=(Lpr[16+8]*LCL[0]+Lpr[16+9]*LCL[1])+(Lpr[16+10]*LCL[2]+Lpr[16+11]*LCL[3]);
+				L4=(Lpr[16+12]*LCL[0]+Lpr[16+13]*LCL[1])+(Lpr[16+14]*LCL[2]+Lpr[16+15]*LCL[3]);
+
+				R1=(Rpr[16+0]*RCL[0]+Rpr[16+1]*RCL[1])+(Rpr[16+2]*RCL[2]+Rpr[16+3]*RCL[3]);
+				R2=(Rpr[16+4]*RCL[0]+Rpr[16+5]*RCL[1])+(Rpr[16+6]*RCL[2]+Rpr[16+7]*RCL[3]);
+				R3=(Rpr[16+8]*RCL[0]+Rpr[16+9]*RCL[1])+(Rpr[16+10]*RCL[2]+Rpr[16+11]*RCL[3]);			
+				R4=(Rpr[16+12]*RCL[0]+Rpr[16+13]*RCL[1])+(Rpr[16+14]*RCL[2]+Rpr[16+15]*RCL[3]);
+
+				dest[0] = L1 * R1;
+				dest[1] = L2 * R2;
+				dest[2] = L3 * R3;
+				dest[3] = L4 * R4;
+
+				dest+=4;
+				LCL+=4;
+				RCL+=4;
+
+				L1=(Lpr[32+0]*LCL[0]+Lpr[32+1]*LCL[1])+(Lpr[32+2]*LCL[2]+Lpr[32+3]*LCL[3]);
+				L2=(Lpr[32+4]*LCL[0]+Lpr[32+5]*LCL[1])+(Lpr[32+6]*LCL[2]+Lpr[32+7]*LCL[3]);
+				L3=(Lpr[32+8]*LCL[0]+Lpr[32+9]*LCL[1])+(Lpr[32+10]*LCL[2]+Lpr[32+11]*LCL[3]);
+				L4=(Lpr[32+12]*LCL[0]+Lpr[32+13]*LCL[1])+(Lpr[32+14]*LCL[2]+Lpr[32+15]*LCL[3]);
+
+				R1=(Rpr[32+0]*RCL[0]+Rpr[32+1]*RCL[1])+(Rpr[32+2]*RCL[2]+Rpr[32+3]*RCL[3]);
+				R2=(Rpr[32+4]*RCL[0]+Rpr[32+5]*RCL[1])+(Rpr[32+6]*RCL[2]+Rpr[32+7]*RCL[3]);
+				R3=(Rpr[32+8]*RCL[0]+Rpr[32+9]*RCL[1])+(Rpr[32+10]*RCL[2]+Rpr[32+11]*RCL[3]);			
+				R4=(Rpr[32+12]*RCL[0]+Rpr[32+13]*RCL[1])+(Rpr[32+14]*RCL[2]+Rpr[32+15]*RCL[3]);
+
+				dest[0] = L1 * R1;
+				dest[1] = L2 * R2;
+				dest[2] = L3 * R3;
+				dest[3] = L4 * R4;
+
+				dest+=4;
+				LCL+=4;
+				RCL+=4;
+
+				L1=(Lpr[48+0]*LCL[0]+Lpr[48+1]*LCL[1])+(Lpr[48+2]*LCL[2]+Lpr[48+3]*LCL[3]);
+				L2=(Lpr[48+4]*LCL[0]+Lpr[48+5]*LCL[1])+(Lpr[48+6]*LCL[2]+Lpr[48+7]*LCL[3]);
+				L3=(Lpr[48+8]*LCL[0]+Lpr[48+9]*LCL[1])+(Lpr[48+10]*LCL[2]+Lpr[48+11]*LCL[3]);
+				L4=(Lpr[48+12]*LCL[0]+Lpr[48+13]*LCL[1])+(Lpr[48+14]*LCL[2]+Lpr[48+15]*LCL[3]);
+
+				R1=(Rpr[48+0]*RCL[0]+Rpr[48+1]*RCL[1])+(Rpr[48+2]*RCL[2]+Rpr[48+3]*RCL[3]);
+				R2=(Rpr[48+4]*RCL[0]+Rpr[48+5]*RCL[1])+(Rpr[48+6]*RCL[2]+Rpr[48+7]*RCL[3]);
+				R3=(Rpr[48+8]*RCL[0]+Rpr[48+9]*RCL[1])+(Rpr[48+10]*RCL[2]+Rpr[48+11]*RCL[3]);			
+				R4=(Rpr[48+12]*RCL[0]+Rpr[48+13]*RCL[1])+(Rpr[48+14]*RCL[2]+Rpr[48+15]*RCL[3]);
+
+				dest[0] = L1 * R1;
+				dest[1] = L2 * R2;
+				dest[2] = L3 * R3;
+				dest[3] = L4 * R4;
+
+				dest+=4;
+				LCL+=4;
+				RCL+=4;
+
+#ifdef ALLOW_SINGLE_SITE
+				if(siteToScore > -1) break;
+#endif
+				}
+			}
+		}
+
+	else{//the general N rate version
+		int r;
+#ifdef OMP_INTINTCLA
+		int index;
+		#pragma omp parallel for private(r, index, dest, LCL, RCL, L1, L2, L3, L4, R1, R2, R3, R4)
+		for(int i=0;i<nchar;i++) {
+			index=4*nRateCats*i;
+			dest = &(destCLA->arr[index]);
+			LCL = &(LCLA->arr[index]); 
+			RCL= &(RCLA->arr[index]);
+#else			
+		for(int i=0;i<nchar;i++) {
+#endif
+#ifdef USE_COUNTS_IN_BOOT
+			if(counts[i] > 0){
+#else
+			if(1){
+#endif
+				for(r=0;r<nRateCats;r++){
+					L1=( Lpr[16*r+0]*LCL[0]+Lpr[16*r+1]*LCL[1]+Lpr[16*r+2]*LCL[2]+Lpr[16*r+3]*LCL[3]);
+					L2=( Lpr[16*r+4]*LCL[0]+Lpr[16*r+5]*LCL[1]+Lpr[16*r+6]*LCL[2]+Lpr[16*r+7]*LCL[3]);
+					L3=( Lpr[16*r+8]*LCL[0]+Lpr[16*r+9]*LCL[1]+Lpr[16*r+10]*LCL[2]+Lpr[16*r+11]*LCL[3]);
+					L4=( Lpr[16*r+12]*LCL[0]+Lpr[16*r+13]*LCL[1]+Lpr[16*r+14]*LCL[2]+Lpr[16*r+15]*LCL[3]);
+
+					R1=(Rpr[16*r+0]*RCL[0]+Rpr[16*r+1]*RCL[1]+Rpr[16*r+2]*RCL[2]+Rpr[16*r+3]*RCL[3]);
+					R2=(Rpr[16*r+4]*RCL[0]+Rpr[16*r+5]*RCL[1]+Rpr[16*r+6]*RCL[2]+Rpr[16*r+7]*RCL[3]);
+					R3=(Rpr[16*r+8]*RCL[0]+Rpr[16*r+9]*RCL[1]+Rpr[16*r+10]*RCL[2]+Rpr[16*r+11]*RCL[3]);			
+					R4=(Rpr[16*r+12]*RCL[0]+Rpr[16*r+13]*RCL[1]+Rpr[16*r+14]*RCL[2]+Rpr[16*r+15]*RCL[3]);
+
+					dest[0] = L1 * R1;
+					dest[1] = L2 * R2;
+					dest[2] = L3 * R3;
+					dest[3] = L4 * R4;
+
+					dest+=4;
+					LCL+=4;
+					RCL+=4;
+					}			
+#ifdef ALLOW_SINGLE_SITE
+				if(siteToScore > -1) break;
+#endif
+				}
+			}
+		}
+
+	const int *left_mult=LCLA->underflow_mult;
+	const int *right_mult=RCLA->underflow_mult;
+	int *undermult=destCLA->underflow_mult;
+	
+	for(int i=0;i<nchar;i++){
+		undermult[i] = left_mult[i] + right_mult[i];
+		}
+	destCLA->rescaleRank = 2 + LCLA->rescaleRank + RCLA->rescaleRank;
+	}
+
+void Tree::CalcFullCLAInternalInternalNState(CondLikeArray *destCLA, const CondLikeArray *LCLA, const CondLikeArray *RCLA, const FLOAT_TYPE *Lpr, const FLOAT_TYPE *Rpr, int modIndex, int dataIndex){
+	//this function assumes that the pmat is arranged with the 16 entries for the
+	//first rate, followed by 16 for the second, etc.
+	FLOAT_TYPE *dest=destCLA->arr;
+	const FLOAT_TYPE *LCL=LCLA->arr;
+	const FLOAT_TYPE *RCL=RCLA->arr;
+	FLOAT_TYPE L1, R1;
+	
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+
+	const int nRateCats = mod->NRateCats();
+	const int nstates = mod->NStates();
+	const int nchar = data->NChar();
+	const int *counts = data->GetCounts();
+
+#ifdef UNIX
+	posix_madvise(dest, nchar*nstates*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+	posix_madvise((void *)LCL, nchar*nstates*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+	posix_madvise((void *)RCL, nchar*nstates*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+#endif
+
+#ifdef OMP_INTINTCLA_NSTATE
+	#pragma omp parallel for private(dest, LCL, RCL, L1, R1)
+	for(int i=0;i<nchar;i++){
+		dest = &(destCLA->arr[nRateCats * nstates * i]);
+		LCL = &(LCLA->arr[nRateCats * nstates * i]); 
+		RCL= &(RCLA->arr[nRateCats * nstates * i]);
+
+#else
+	for(int i=0;i<nchar;i++) {
+#endif
+#ifdef USE_COUNTS_IN_BOOT
+		if(counts[i]> 0){
+#else
+		if(1)
+#endif
+			for(int rate=0;rate<nRateCats;rate++){
+				for(int from=0;from<nstates;from++){
+					L1 = R1 = ZERO_POINT_ZERO;
+					for(int to=0;to<nstates;to++){
+						L1 += Lpr[rate*nstates*nstates + from*nstates + to] * LCL[to];
+						R1 += Rpr[rate*nstates*nstates + from*nstates + to] * RCL[to];
+						}
+					dest[from] = L1 * R1;
+					}
+				LCL += nstates;
+				RCL += nstates;
+				dest += nstates;
+				}
+			assert(dest[-nstates*nRateCats] >= 0.0);
+			assert(dest[-nstates*nRateCats] == dest[-nstates*nRateCats]);
+
+#ifdef ALLOW_SINGLE_SITE
+				if(siteToScore > -1) break;
+#endif
+			}
+		}
+
+	const int *left_mult=LCLA->underflow_mult;
+	const int *right_mult=RCLA->underflow_mult;
+	int *undermult=destCLA->underflow_mult;
+	
+	for(int i=0;i<nchar;i++){
+		undermult[i] = left_mult[i] + right_mult[i];
+		}
+	destCLA->rescaleRank = 2 + LCLA->rescaleRank + RCLA->rescaleRank;
+	}
+
+void Tree::CalcFullCLATerminalTerminal(CondLikeArray *destCLA, const FLOAT_TYPE *Lpr, const FLOAT_TYPE *Rpr, const char *Ldata, const char *Rdata, int modIndex, int dataIndex){
+	//this function assumes that the pmat is arranged with the 16 entries for the
+	//first rate, followed by 16 for the second, etc.
+	FLOAT_TYPE *dest=destCLA->arr;
+
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+
+	const int nRateCats = mod->NRateCats();
+	const int nchar = data->NChar();
+	const int *counts = data->GetCounts();
+
+#ifdef UNIX
+	posix_madvise(dest, nchar*4*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+#endif
+
+#ifdef ALLOW_SINGLE_SITE
+	if(siteToScore > 0){
+		Ldata = AdvanceDataPointer(Ldata, siteToScore);
+		Rdata = AdvanceDataPointer(Rdata, siteToScore);
+		}
+#endif
+
+	for(int i=0;i<nchar;i++){
+#ifdef USE_COUNTS_IN_BOOT
+		if(counts[i] > 0){
+#else
+		if(1){
+#endif
+			if(*Ldata > -1 && *Rdata > -1){
+				for(int r=0;r<nRateCats;r++){
+					*(dest++) = Lpr[(*Ldata)+16*r] * Rpr[(*Rdata)+16*r];
+					*(dest++) = Lpr[(*Ldata+4)+16*r] * Rpr[(*Rdata+4)+16*r];
+					*(dest++) = Lpr[(*Ldata+8)+16*r] * Rpr[(*Rdata+8)+16*r];
+					*(dest++) = Lpr[(*Ldata+12)+16*r] * Rpr[(*Rdata+12)+16*r];
+					}
+				Ldata++;
+				Rdata++;
+				}
+				
+			else if((*Ldata == -4 && *Rdata == -4) || (*Ldata == -4 && *Rdata > -1) || (*Rdata == -4 && *Ldata > -1)){//total ambiguity of left, right or both
+				
+				if(*Ldata == -4 && *Rdata == -4) //total ambiguity of both
+					for(int i=0;i< (4*nRateCats);i++) *(dest++) = ONE_POINT_ZERO;
+				
+				else if(*Ldata == -4){//total ambiguity of left
+					for(int i=0;i<nRateCats;i++){
+						*(dest++) = Rpr[(*Rdata)+16*i];
+						*(dest++) = Rpr[(*Rdata+4)+16*i];
+						*(dest++) = Rpr[(*Rdata+8)+16*i];
+						*(dest++) = Rpr[(*Rdata+12)+16*i];
+						assert(*(dest-4)>=ZERO_POINT_ZERO);
+						}
+					}
+				else{//total ambiguity of right
+					for(int i=0;i<nRateCats;i++){
+						*(dest++) = Lpr[(*Ldata)+16*i];
+						*(dest++) = Lpr[(*Ldata+4)+16*i];
+						*(dest++) = Lpr[(*Ldata+8)+16*i];
+						*(dest++) = Lpr[(*Ldata+12)+16*i];
+						assert(*(dest-4)>=ZERO_POINT_ZERO);
+						}
+					}
+				Ldata++;
+				Rdata++;
+				}	
+			else {//partial ambiguity of left, right or both
+				if(*Ldata>-1){//unambiguous left
+					for(int i=0;i<nRateCats;i++){
+						*(dest+(i*4)) = Lpr[(*Ldata)+16*i];
+						*(dest+(i*4)+1) = Lpr[(*Ldata+4)+16*i];
+						*(dest+(i*4)+2) = Lpr[(*Ldata+8)+16*i];
+						*(dest+(i*4)+3) = Lpr[(*Ldata+12)+16*i];
+						assert(*(dest)>=ZERO_POINT_ZERO);
+						}
+					Ldata++;
+					}
+				else{
+					if(*Ldata==-4){//fully ambiguous left
+						for(int i=0;i< (4*nRateCats);i++){
+							*(dest+i)=ONE_POINT_ZERO;
+							}
+						Ldata++;
+						}
+				 
+					else{//partially ambiguous left
+						int nstates=-*(Ldata++);
+						for(int q=0;q< (4*nRateCats);q++) dest[q]=0;
+						for(int i=0;i<nstates;i++){
+							for(int r=0;r<nRateCats;r++){
+								*(dest+(r*4)) += Lpr[(*Ldata)+16*r];
+								*(dest+(r*4)+1) += Lpr[(*Ldata+4)+16*r];
+								*(dest+(r*4)+2) += Lpr[(*Ldata+8)+16*r];
+								*(dest+(r*4)+3) += Lpr[(*Ldata+12)+16*r];
+								}
+							Ldata++;
+							}
+						}
+					}
+				if(*Rdata>-1){//unambiguous right
+					for(int i=0;i<nRateCats;i++){
+						*(dest++) *= Rpr[(*Rdata)+16*i];
+						*(dest++) *= Rpr[(*Rdata+4)+16*i];
+						*(dest++) *= Rpr[(*Rdata+8)+16*i];
+						*(dest++) *= Rpr[(*Rdata+12)+16*i];
+						}
+					Rdata++;		
+					}
+				else if(*Rdata != -4){//partially ambiguous right
+					char nstates=-1 * *(Rdata++);
+					//create a temporary cla to hold the results from the ambiguity of the right, 
+					//which need to be +'s 
+					//FLOAT_TYPE *tempcla=new FLOAT_TYPE[4*nRateCats];
+					vector<FLOAT_TYPE> tempcla(4*nRateCats);
+					for(int i=0;i<nstates;i++){
+						for(int r=0;r<nRateCats;r++){
+							tempcla[(r*4)]   += Rpr[(*Rdata)+16*r];
+							tempcla[(r*4)+1] += Rpr[(*Rdata+4)+16*r];
+							tempcla[(r*4)+2] += Rpr[(*Rdata+8)+16*r];
+							tempcla[(r*4)+3] += Rpr[(*Rdata+12)+16*r];
+							}
+						Rdata++;
+						}
+					//Now multiply the temporary results against the already calced left
+					for(int i=0;i<nRateCats;i++){
+						*(dest++) *= tempcla[(i*4)];
+						*(dest++) *= tempcla[(i*4)+1];
+						*(dest++) *= tempcla[(i*4)+2];
+						*(dest++) *= tempcla[(i*4)+3];
+						}
+					}
+				else{//fully ambiguous right
+					dest+=(4*nRateCats);
+					Rdata++;
+					}
+				}
+#ifdef ALLOW_SINGLE_SITE
+			if(siteToScore > -1) break;
+#endif
+			}
+		else{//if the count for this site is 0
+#ifdef OPEN_MP
+			//this is a little strange, but dest only needs to be advanced in the case of OMP
+			//because sections of the CLAs corresponding to sites with count=0 are skipped
+			//over in OMP instead of being eliminated
+			dest += 4 * nRateCats;
+#endif
+			if(*Ldata > -1 || *Ldata == -4) Ldata++;
+			else{
+				int states = -1 * *Ldata;
+				do{
+					Ldata++;
+					}while (states-- > 0);
+				}
+			if(*Rdata > -1 || *Rdata == -4) Rdata++;
+			else{
+				int states = -1 * *Rdata;
+				do{
+					Rdata++;
+					}while (states-- > 0);
+				}
+			}
+		}
+		
+		for(int site=0;site<nchar;site++){
+			destCLA->underflow_mult[site]=0;
+			}
+		destCLA->rescaleRank=2;
+	}
+
+void Tree::CalcFullCLATerminalTerminalNState(CondLikeArray *destCLA, const FLOAT_TYPE *Lpr, const FLOAT_TYPE *Rpr, const char *Ldata, const char *Rdata, int modIndex, int dataIndex){
+	//this function assumes that the pmat is arranged with the 16 entries for the
+	//first rate, followed by 16 for the second, etc.
+	FLOAT_TYPE *dest=destCLA->arr;
+
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+
+	const int nRateCats = mod->NRateCats();
+	const int nstates = mod->NStates();
+	const int nchar = data->NChar();
+	const int *counts = data->GetCounts();
+
+#ifdef UNIX
+	posix_madvise(dest, nchar*nstates*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+#endif
+	if(siteToScore > 0){
+		Ldata += siteToScore;
+		Rdata += siteToScore;
+		}
+
+	for(int i=0;i<nchar;i++){
+#ifdef USE_COUNTS_IN_BOOT
+		if(counts[i]> 0){
+#else
+		if(1){
+#endif
+			if(*Ldata < nstates && *Rdata < nstates){
+				for(int rate=0;rate<nRateCats;rate++){
+					for(int from=0;from<nstates;from++){
+						dest[rate*nstates + from] = Lpr[(*Ldata) + from*nstates + rate*nstates*nstates] * Rpr[(*Rdata) + from*nstates + rate*nstates*nstates];	
+						}
+					}
+				Ldata++;
+				Rdata++;
+				}
+				
+			else{//total ambiguity of left, right or both
+				
+				if(*Ldata == nstates && *Rdata == nstates) //total ambiguity of both
+					for(int rate=0;rate<nRateCats;rate++)
+						for(int from=0;from<nstates;from++)
+							dest[rate*nstates + from] = ONE_POINT_ZERO;
+				
+				else if(*Ldata == nstates){//total ambiguity of left
+					for(int rate=0;rate<nRateCats;rate++)
+						for(int from=0;from<nstates;from++)
+							dest[rate*nstates + from] = Rpr[(*Rdata) + from*nstates + rate*nstates*nstates];
+						
+					}
+				else{//total ambiguity of right
+					for(int rate=0;rate<nRateCats;rate++)
+						for(int from=0;from<nstates;from++)
+							dest[rate*nstates + from] = Lpr[(*Ldata) + from*nstates + rate*nstates*nstates];
+					}
+				Ldata++;
+				Rdata++;
+				}
+			dest += nRateCats*nstates;
+#ifdef ALLOW_SINGLE_SITE
+			if(siteToScore > -1) break;
+#endif
+			}
+		else{
+#ifdef OPEN_MP
+			//this is a little strange, but dest only needs to be advanced in the case of OMP
+			//because sections of the CLAs corresponding to sites with count=0 are skipped
+			//over in OMP instead of being eliminated
+			dest += nRateCats*nstates;
+#endif
+			Ldata++;
+			Rdata++;
+			}
+		}
+		for(int site=0;site<nchar;site++){
+			destCLA->underflow_mult[site]=0;
+			}
+		destCLA->rescaleRank=2;
+	}
+
+//this will not be very fast, but is generalized to account for all types of nodes
+void Tree::CalcFullCLAOrientedGap(CondLikeArray *destCLA, const FLOAT_TYPE *Lpr, const FLOAT_TYPE *Rpr, const CondLikeArray *LCLA, const CondLikeArray *RCLA, const char *Ldata, const char *Rdata, int modIndex, int dataIndex){
+	assert((LCLA == NULL && Ldata) || (Ldata == NULL && LCLA));
+	assert((RCLA == NULL && Rdata) || (Rdata == NULL && RCLA));
+
+	const FLOAT_TYPE *LCL = NULL;
+	const FLOAT_TYPE *RCL = NULL;
+		
+	if(LCLA)
+		LCL = LCLA->arr;
+	if(RCLA)
+		RCL = RCLA->arr;
+
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+	const int nchar = data->NChar();
+	const int *counts = data->GetCounts();
+
+	const int pmatStates = mod->NStates();
+	const int claStates = mod->NStates();
+
+	FLOAT_TYPE *dest=destCLA->arr;
+
+	FLOAT_TYPE **tipStates = New2DArray<FLOAT_TYPE>(3, 4);
+
+	bool gapIsState0 = true;
+	int gapState = (gapIsState0 ? 0 : 1);
+	int baseState = (gapIsState0 ? 1 : 0);
+
+	//gap with base in subtree should always be zero at tip
+
+	//gap at tip
+	tipStates[gapState][0] = 1.0;
+	tipStates[gapState][2] = tipStates[gapState][1] = 0.0;
+	//base at tip
+	tipStates[baseState][0] = tipStates[baseState][1] = 0.0;
+	tipStates[baseState][2] = 1.0;
+	//missing data 
+	tipStates[2][0] = 1.0;
+	tipStates[2][1] = 0.0; //??
+	tipStates[2][2] = 1.0;
+
+	const FLOAT_TYPE *left, *right;
+
+	//conditioning on zero or 1 insert. cla[0] is now essentially an indicator func of "no bases in subtree"
+	//the categories also amount to state freqs at the root, being gap (one insert site, cla[1]) or base (no inserts, cla[2])
+	for(int i=0;i<nchar;i++){
+		if(counts[i]> 0){
+			if(Ldata)
+				left = tipStates[*Ldata];
+			else{
+				left = &LCL[0];
+				LCL += claStates;
+				}
+			if(Rdata)
+				right = tipStates[*Rdata];
+			else{
+				right = &RCL[0];
+				RCL += claStates;
+				}
+
+			//element 0 is just an indicator of when NO bases observed in subtree (i.e., 1 = no bases, 0 = bases)
+			dest[0] = left[0] * right[0];
+			//the pr[0][0] (never inserted to never inserted transition) that would appear here can be set to 1.0
+			dest[1] = left[0] * (Rpr[0 * claStates + 1] * right[2] + right[1]) + right[0] * (Lpr[0 * claStates + 1] * left[2] + left[1]);
+			//dest[1] = left[0] * (Rpr[0 * claStates + 1] * right[2] + Rpr[0 * claStates + 0] * right[1]) + right[0] * (Lpr[0 * claStates + 1] * left[2] + Lpr[0 * claStates + 0] * left[1]);
+			dest[2] = (left[2] * Lpr[1 * claStates + 1] + left[0] * Lpr[1 * claStates + 2]) * (right[2] * Rpr[1 * claStates + 1] + right[0] * Rpr[1 * claStates + 2]);
+
+			//DEBUG
+			if(!(dest[1] > 0.0 || dest[2] > 0.0))
+				outman.UserMessage("%f\t%f\t%f\t%f\t%f\t%f\t%f\t%f\t%f\t", left[0], left[1], left[2], right[0], right[1], right[2], dest[0], dest[1], dest[2]);
+			assert(dest[1] > 0.0 || dest[2] > 0.0);
+			dest += claStates;
+			}
+		if(Ldata)
+			Ldata++;
+		if(Rdata)
+			Rdata++;
+		}
+
+/*
+	//initial attempt with dynamic programming trick for only 1 insert. 4 states in CLA
+	//gap at tip
+	const int pmatStates = mod->NStates();
+	const int claStates = mod->NStates() + 1;
+
+	tipStates[gapState][0] = tipStates[gapState][3] = 1.0;
+	tipStates[gapState][2] = tipStates[gapState][1] = 0.0;
+	//base at tip
+	tipStates[baseState][0] = tipStates[baseState][1] = tipStates[baseState][3] = 0.0;
+	tipStates[baseState][2] = 1.0;
+	//missing data 
+	tipStates[2][0] = 0.0;
+	tipStates[2][1] = tipStates[2][2] = tipStates[2][3] = 1.0;
+
+	for(int i=0;i<nchar;i++){
+		if(counts[i]> 0){
+			if(Ldata)
+				left = tipStates[*Ldata++];
+			else
+				left = &LCL[i * claStates];
+			if(Rdata)
+				right = tipStates[*Rdata++];
+			else
+				right = &RCL[i * claStates];
+			dest[0] = left[0] * Lpr[0] * right[0] * Rpr[0];
+			assert(dest[0] <= 1.0);
+			//		  p(no base L) * p(no ins L) * (p(ins R) * p(base R) + p(no ins R) * p(no base R)) + p(no base R) * p(no ins R) * (p(ins L) * p(base L) + p(no ins L) * p(no base L)
+			dest[1] = left[0]      * Lpr[0]      * (Rpr[1]   * right[2]  + Rpr[0]      * right[1])     + right[0]     * Rpr[0]      * (Lpr[1]   * left[2]   + Lpr[0]      * left[1]);
+			assert(dest[1] <= 1.0);
+			dest[2] = (left[2] * Lpr[1 * pmatStates + 1] + left[3] * Lpr[1 * pmatStates + 2]) * (right[2] * Rpr[1 * pmatStates + 1] + right[3] * Rpr[1 * pmatStates + 2]);
+			assert(dest[2] <= 1.0);
+			if(! dest[2] > 0.0)
+				outman.DebugMessage("(left[2] (%f) * Lpr[1 * pmatStates + 1] (%f) + left[3] (%f) * Lpr[1 * pmatStates + 2]) (%f) * (right[2] (%f) * Rpr[1 * pmatStates + 1] (%f) + right[3] (%f) * Rpr[1 * pmatStates + 2] (%f))", left[2], Lpr[1 * pmatStates + 1], left[3], Lpr[1 * pmatStates + 2], right[2], Rpr[1 * pmatStates + 1], right[3], Rpr[1 * pmatStates + 2]);
+			//assert(dest[2] > 0.0);
+			dest[3] = (left[3] * right[3]);
+			assert(dest[3] <= 1.0);
+			dest += 4;
+			}
+		}
+*/	
+	for(int i=0;i<nchar;i++)
+		destCLA->underflow_mult[i] = (Ldata ? 0 : LCLA->underflow_mult[i]) + (Rdata ? 0 : RCLA->underflow_mult[i]);
+	
+	destCLA->rescaleRank = (Ldata ? 0 : LCLA->rescaleRank) + (Rdata ? 0 : RCLA->rescaleRank) + 2;
+
+	Delete2DArray(tipStates);
+	}
+
+void Tree::CalcFullCLAInternalTerminal(CondLikeArray *destCLA, const CondLikeArray *LCLA, const FLOAT_TYPE *pr1, const FLOAT_TYPE *pr2, char *dat2, const unsigned *ambigMap, int modIndex, int dataIndex){
+	//this function assumes that the pmat is arranged with the 16 entries for the
+	//first rate, followed by 16 for the second, etc.
+	FLOAT_TYPE *des=destCLA->arr;
+	FLOAT_TYPE *dest=des;
+	const FLOAT_TYPE *CL=LCLA->arr;
+	const FLOAT_TYPE *CL1=CL;
+	const char *data2=dat2;
+	FLOAT_TYPE L1, L2, L3, L4;
+
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);	
+
+	const int nchar = data->NChar();
+	const int nRateCats = mod->NRateCats();
+	const int *counts = data->GetCounts();
+
+#ifdef UNIX	
+	posix_madvise(dest, nchar*4*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+	posix_madvise((void*)CL1, nchar*4*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);	
+#endif
+
+#ifdef ALLOW_SINGLE_SITE
+	if(siteToScore > 0) data2 = AdvanceDataPointer(data2, siteToScore);
+#endif
+
+	if(nRateCats==4){//unrolled 4 rate version
+#ifdef OMP_INTTERMCLA
+		#pragma omp parallel for private(dest, CL1, data2, L1, L2, L3, L4)
+		for(int i=0;i<nchar;i++){
+			dest=&des[4*4*i];
+			CL1=&CL[4*4*i];
+			data2=&dat2[ambigMap[i]];
+#else
+		for(int i=0;i<nchar;i++){
+#endif
+#ifdef USE_COUNTS_IN_BOOT
+			if(counts[i] > 0){
+#else
+			if(1){
+#endif
+				if(*data2 > -1){ //no ambiguity
+					L1 = ((pr1[0]*CL1[0]+pr1[1]*CL1[1])+(pr1[2]*CL1[2]+pr1[3]*CL1[3]));
+					L2 = ((pr1[4]*CL1[0]+pr1[5]*CL1[1])+(pr1[6]*CL1[2]+pr1[7]*CL1[3]));
+					L3 = ((pr1[8]*CL1[0]+pr1[9]*CL1[1])+(pr1[10]*CL1[2]+pr1[11]*CL1[3]));
+					L4 = ((pr1[12]*CL1[0]+pr1[13]*CL1[1])+(pr1[14]*CL1[2]+pr1[15]*CL1[3]));
+
+					dest[0] = L1 * pr2[*data2];
+					dest[1] = L2 * pr2[*data2+4];
+					dest[2] = L3 * pr2[*data2+8];
+					dest[3] = L4 * pr2[*data2+12];
+
+					dest+=4;
+					CL1+=4;
+
+					L1 = ((pr1[16]*CL1[0]+pr1[17]*CL1[1])+(pr1[18]*CL1[2]+pr1[19]*CL1[3]));
+					L2 = ((pr1[20]*CL1[0]+pr1[21]*CL1[1])+(pr1[22]*CL1[2]+pr1[23]*CL1[3]));
+					L3 = ((pr1[24]*CL1[0]+pr1[25]*CL1[1])+(pr1[26]*CL1[2]+pr1[27]*CL1[3]));
+					L4 = ((pr1[28]*CL1[0]+pr1[29]*CL1[1])+(pr1[30]*CL1[2]+pr1[31]*CL1[3]));
+
+					dest[0] = L1 * pr2[*data2+16];
+					dest[1] = L2 * pr2[*data2+4+16];
+					dest[2] = L3 * pr2[*data2+8+16];
+					dest[3] = L4 * pr2[*data2+12+16];
+
+					dest+=4;
+					CL1+=4;
+
+					L1 = ((pr1[32]*CL1[0]+pr1[33]*CL1[1])+(pr1[34]*CL1[2]+pr1[35]*CL1[3]));
+					L2 = ((pr1[36]*CL1[0]+pr1[37]*CL1[1])+(pr1[38]*CL1[2]+pr1[39]*CL1[3]));
+					L3 = ((pr1[40]*CL1[0]+pr1[41]*CL1[1])+(pr1[42]*CL1[2]+pr1[43]*CL1[3]));
+					L4 = ((pr1[44]*CL1[0]+pr1[45]*CL1[1])+(pr1[46]*CL1[2]+pr1[47]*CL1[3]));
+
+					dest[0] = L1 * pr2[*data2+32];
+					dest[1] = L2 * pr2[*data2+4+32];
+					dest[2] = L3 * pr2[*data2+8+32];
+					dest[3] = L4 * pr2[*data2+12+32];
+
+					dest+=4;
+					CL1+=4;
+
+					L1 = ((pr1[48]*CL1[0]+pr1[49]*CL1[1])+(pr1[50]*CL1[2]+pr1[51]*CL1[3]));
+					L2 = ((pr1[52]*CL1[0]+pr1[53]*CL1[1])+(pr1[54]*CL1[2]+pr1[55]*CL1[3]));
+					L3 = ((pr1[56]*CL1[0]+pr1[57]*CL1[1])+(pr1[58]*CL1[2]+pr1[59]*CL1[3]));
+					L4 = ((pr1[60]*CL1[0]+pr1[61]*CL1[1])+(pr1[62]*CL1[2]+pr1[63]*CL1[3]));
+
+
+					dest[0] = L1 * pr2[*data2+48];
+					dest[1] = L2 * pr2[*data2+4+48];
+					dest[2] = L3 * pr2[*data2+8+48];
+					dest[3] = L4 * pr2[*data2+12+48];
+
+					dest+=4;
+					CL1+=4;
+					data2++;
+					}
+				else if(*data2 == -4){//total ambiguity
+					dest[0] = ( pr1[0]*CL1[0]+pr1[1]*CL1[1]+pr1[2]*CL1[2]+pr1[3]*CL1[3]);
+					dest[1] = ( pr1[4]*CL1[0]+pr1[5]*CL1[1]+pr1[6]*CL1[2]+pr1[7]*CL1[3]);
+					dest[2] = ( pr1[8]*CL1[0]+pr1[9]*CL1[1]+pr1[10]*CL1[2]+pr1[11]*CL1[3]);
+					dest[3] = ( pr1[12]*CL1[0]+pr1[13]*CL1[1]+pr1[14]*CL1[2]+pr1[15]*CL1[3]);
+					
+					dest[4] = ( pr1[16]*CL1[4]+pr1[17]*CL1[5]+pr1[18]*CL1[6]+pr1[19]*CL1[7]);
+					dest[5] = ( pr1[20]*CL1[4]+pr1[21]*CL1[5]+pr1[22]*CL1[6]+pr1[23]*CL1[7]);
+					dest[6] = ( pr1[24]*CL1[4]+pr1[25]*CL1[5]+pr1[26]*CL1[6]+pr1[27]*CL1[7]);
+					dest[7] = ( pr1[28]*CL1[4]+pr1[29]*CL1[5]+pr1[30]*CL1[6]+pr1[31]*CL1[7]);
+				
+					dest[8] = ( pr1[32]*CL1[8]+pr1[33]*CL1[9]+pr1[34]*CL1[10]+pr1[35]*CL1[11]);
+					dest[9] = ( pr1[36]*CL1[8]+pr1[37]*CL1[9]+pr1[38]*CL1[10]+pr1[39]*CL1[11]);
+					dest[10] = ( pr1[40]*CL1[8]+pr1[41]*CL1[9]+pr1[42]*CL1[10]+pr1[43]*CL1[11]);
+					dest[11] = ( pr1[44]*CL1[8]+pr1[45]*CL1[9]+pr1[46]*CL1[10]+pr1[47]*CL1[11]);
+				
+					dest[12] = ( pr1[48]*CL1[12]+pr1[49]*CL1[13]+pr1[50]*CL1[14]+pr1[51]*CL1[15]);
+					dest[13] = ( pr1[52]*CL1[12]+pr1[53]*CL1[13]+pr1[54]*CL1[14]+pr1[55]*CL1[15]);
+					dest[14] = ( pr1[56]*CL1[12]+pr1[57]*CL1[13]+pr1[58]*CL1[14]+pr1[59]*CL1[15]);
+					dest[15] = ( pr1[60]*CL1[12]+pr1[61]*CL1[13]+pr1[62]*CL1[14]+pr1[63]*CL1[15]);
+
+					dest+=16;
+					data2++;
+					CL1+=16;
+					}
+				else {//partial ambiguity
+					//first figure in the ambiguous terminal
+					int nstates=-1 * *(data2++);
+					for(int j=0;j<16;j++) dest[j]=ZERO_POINT_ZERO;
+					for(int s=0;s<nstates;s++){
+						for(int r=0;r<4;r++){
+							*(dest+(r*4)) += pr2[(*data2)+16*r];
+							*(dest+(r*4)+1) += pr2[(*data2+4)+16*r];
+							*(dest+(r*4)+2) += pr2[(*data2+8)+16*r];
+							*(dest+(r*4)+3) += pr2[(*data2+12)+16*r];
+							}
+						data2++;
+						}
+					
+					//now add the internal child
+					*(dest++) *= ( pr1[0]*CL1[0]+pr1[1]*CL1[1]+pr1[2]*CL1[2]+pr1[3]*CL1[3]);
+					*(dest++) *= ( pr1[4]*CL1[0]+pr1[5]*CL1[1]+pr1[6]*CL1[2]+pr1[7]*CL1[3]);
+					*(dest++) *= ( pr1[8]*CL1[0]+pr1[9]*CL1[1]+pr1[10]*CL1[2]+pr1[11]*CL1[3]);
+					*(dest++) *= ( pr1[12]*CL1[0]+pr1[13]*CL1[1]+pr1[14]*CL1[2]+pr1[15]*CL1[3]);
+					
+					*(dest++) *= ( pr1[16]*CL1[4]+pr1[17]*CL1[5]+pr1[18]*CL1[6]+pr1[19]*CL1[7]);
+					*(dest++) *= ( pr1[20]*CL1[4]+pr1[21]*CL1[5]+pr1[22]*CL1[6]+pr1[23]*CL1[7]);
+					*(dest++) *= ( pr1[24]*CL1[4]+pr1[25]*CL1[5]+pr1[26]*CL1[6]+pr1[27]*CL1[7]);
+					*(dest++) *= ( pr1[28]*CL1[4]+pr1[29]*CL1[5]+pr1[30]*CL1[6]+pr1[31]*CL1[7]);
+				
+					*(dest++) *= ( pr1[32]*CL1[8]+pr1[33]*CL1[9]+pr1[34]*CL1[10]+pr1[35]*CL1[11]);
+					*(dest++) *= ( pr1[36]*CL1[8]+pr1[37]*CL1[9]+pr1[38]*CL1[10]+pr1[39]*CL1[11]);
+					*(dest++) *= ( pr1[40]*CL1[8]+pr1[41]*CL1[9]+pr1[42]*CL1[10]+pr1[43]*CL1[11]);
+					*(dest++) *= ( pr1[44]*CL1[8]+pr1[45]*CL1[9]+pr1[46]*CL1[10]+pr1[47]*CL1[11]);
+				
+					*(dest++) *= ( pr1[48]*CL1[12]+pr1[49]*CL1[13]+pr1[50]*CL1[14]+pr1[51]*CL1[15]);
+					*(dest++) *= ( pr1[52]*CL1[12]+pr1[53]*CL1[13]+pr1[54]*CL1[14]+pr1[55]*CL1[15]);
+					*(dest++) *= ( pr1[56]*CL1[12]+pr1[57]*CL1[13]+pr1[58]*CL1[14]+pr1[59]*CL1[15]);
+					*(dest++) *= ( pr1[60]*CL1[12]+pr1[61]*CL1[13]+pr1[62]*CL1[14]+pr1[63]*CL1[15]);
+					CL1+=16;
+					}
+#ifdef ALLOW_SINGLE_SITE
+				if(siteToScore > -1) break;
+#endif
+				}
+			else{
+				data2 = AdvanceDataPointer(data2, 1);
+				}
+			}
+		}
+	else{//general N rate version
+#ifdef OMP_INTTERMCLA
+		#pragma omp parallel for private(dest, CL1, data2, L1, L2, L3, L4)
+		for(int i=0;i<nchar;i++){
+//			if(i == 0)
+//				outman.UserMessage("inttermCNucNRate: %d", omp_get_num_threads());
+			dest=&des[4*nRateCats*i];
+			CL1=&CL[4*nRateCats*i];
+			data2=&dat2[ambigMap[i]];
+#else
+		for(int i=0;i<nchar;i++){
+#endif
+#ifdef USE_COUNTS_IN_BOOT
+			if(counts[i] > 0){
+#else
+			if(1){
+#endif
+				if(*data2 > -1){ //no ambiguity
+					for(int r=0;r<nRateCats;r++){
+						L1 = ( pr1[16*r+0]*CL1[4*r+0]+pr1[16*r+1]*CL1[4*r+1]+pr1[16*r+2]*CL1[4*r+2]+pr1[16*r+3]*CL1[4*r+3]);
+						L2 = ( pr1[16*r+4]*CL1[4*r+0]+pr1[16*r+5]*CL1[4*r+1]+pr1[16*r+6]*CL1[4*r+2]+pr1[16*r+7]*CL1[4*r+3]);
+						L3 = ( pr1[16*r+8]*CL1[4*r+0]+pr1[16*r+9]*CL1[4*r+1]+pr1[16*r+10]*CL1[4*r+2]+pr1[16*r+11]*CL1[4*r+3]);
+						L4 = ( pr1[16*r+12]*CL1[4*r+0]+pr1[16*r+13]*CL1[4*r+1]+pr1[16*r+14]*CL1[4*r+2]+pr1[16*r+15]*CL1[4*r+3]);
+						dest[0] = L1 * pr2[(*data2)+16*r];
+						dest[1] = L2 * pr2[(*data2+4)+16*r];
+						dest[2] = L3 * pr2[(*data2+8)+16*r];
+						dest[3] = L4 * pr2[(*data2+12)+16*r];
+
+						dest+=4;
+						}
+					data2++;
+					}
+				else if(*data2 == -4){//total ambiguity
+					for(int r=0;r<nRateCats;r++){
+						dest[0] = ( pr1[16*r+0]*CL1[4*r+0]+pr1[16*r+1]*CL1[4*r+1]+pr1[16*r+2]*CL1[4*r+2]+pr1[16*r+3]*CL1[4*r+3]);
+						dest[1] = ( pr1[16*r+4]*CL1[4*r+0]+pr1[16*r+5]*CL1[4*r+1]+pr1[16*r+6]*CL1[4*r+2]+pr1[16*r+7]*CL1[4*r+3]);
+						dest[2] = ( pr1[16*r+8]*CL1[4*r+0]+pr1[16*r+9]*CL1[4*r+1]+pr1[16*r+10]*CL1[4*r+2]+pr1[16*r+11]*CL1[4*r+3]);
+						dest[3] = ( pr1[16*r+12]*CL1[4*r+0]+pr1[16*r+13]*CL1[4*r+1]+pr1[16*r+14]*CL1[4*r+2]+pr1[16*r+15]*CL1[4*r+3]);
+						dest+=4;
+						}
+					data2++;
+					}
+				else {//partial ambiguity
+					//first figure in the ambiguous terminal
+					int nstates=-1 * *(data2++);
+					for(int q=0;q<4*nRateCats;q++) dest[q]=0;
+					for(int s=0;s<nstates;s++){
+						for(int r=0;r<nRateCats;r++){
+							*(dest+(r*4)) += pr2[(*data2)+16*r];
+							*(dest+(r*4)+1) += pr2[(*data2+4)+16*r];
+							*(dest+(r*4)+2) += pr2[(*data2+8)+16*r];
+							*(dest+(r*4)+3) += pr2[(*data2+12)+16*r];
+							}
+						data2++;
+						}
+					//now add the internal child
+					for(int r=0;r<nRateCats;r++){
+						*(dest++) *= ( pr1[16*r+0]*CL1[4*r+0]+pr1[16*r+1]*CL1[4*r+1]+pr1[16*r+2]*CL1[4*r+2]+pr1[16*r+3]*CL1[4*r+3]);
+						*(dest++) *= ( pr1[16*r+4]*CL1[4*r+0]+pr1[16*r+5]*CL1[4*r+1]+pr1[16*r+6]*CL1[4*r+2]+pr1[16*r+7]*CL1[4*r+3]);
+						*(dest++) *= ( pr1[16*r+8]*CL1[4*r+0]+pr1[16*r+9]*CL1[4*r+1]+pr1[16*r+10]*CL1[4*r+2]+pr1[16*r+11]*CL1[4*r+3]);
+						*(dest++) *= ( pr1[16*r+12]*CL1[4*r+0]+pr1[16*r+13]*CL1[4*r+1]+pr1[16*r+14]*CL1[4*r+2]+pr1[16*r+15]*CL1[4*r+3]);
+						}
+					}
+				CL1 += 4*nRateCats;
+#ifdef ALLOW_SINGLE_SITE
+				if(siteToScore > -1) break;
+#endif
+				}
+			else{
+				data2 = AdvanceDataPointer(data2, 1);
+				}
+			}
+		}
+		
+	for(int i=0;i<nchar;i++)
+		destCLA->underflow_mult[i]=LCLA->underflow_mult[i];
+	
+	destCLA->rescaleRank=LCLA->rescaleRank+2;
+	} 
+
+void Tree::CalcFullCLAInternalTerminalNState(CondLikeArray *destCLA, const CondLikeArray *LCLA, const FLOAT_TYPE *pr1, const FLOAT_TYPE *pr2, char *dat2, int modIndex, int dataIndex){
+	//this function assumes that the pmat is arranged with the 16 entries for the
+	//first rate, followed by 16 for the second, etc.
+	FLOAT_TYPE *des=destCLA->arr;
+	FLOAT_TYPE *dest=des;
+	const FLOAT_TYPE *CL=LCLA->arr;
+	const FLOAT_TYPE *CL1=CL;
+	const char *data2=dat2;
+
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+
+	const int nchar = data->NChar();
+	const int nRateCats = mod->NRateCats();
+	const int nstates = mod->NStates();
+	const int *counts = data->GetCounts();
+
+#ifdef UNIX	
+	posix_madvise(dest, nchar*nstates*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+	posix_madvise((void*)CL1, nchar*nstates*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);	
+#endif
+
+	if(siteToScore > 0) data2 += siteToScore;
+
+#ifdef OMP_INTTERMCLA_NSTATE
+	#pragma omp parallel for private(dest, CL1, data2)
+	for(int i=0;i<nchar;i++){
+		dest=&des[nRateCats*nstates*i];
+		CL1=&CL[nRateCats*nstates*i];
+		data2=&dat2[i];
+#else
+	for(int i=0;i<nchar;i++){
+#endif
+#ifdef USE_COUNTS_IN_BOOT
+		if(counts[i]> 0){
+#else
+		if(1){
+#endif
+			for(int rate=0;rate<nRateCats;rate++){
+				for(int from=0;from<nstates;from++){
+					FLOAT_TYPE d = ZERO_POINT_ZERO;
+					for(int to=0;to<nstates;to++){
+						d += pr1[rate*nstates*nstates + from*nstates + to] * CL1[to];
+						}
+					dest[from] = (*data2 < nstates ? d * pr2[rate*nstates*nstates + (*data2)+from*nstates] : d);
+					}
+				assert(dest[nstates - 1] < 1e10);
+				dest += nstates;
+				CL1 += nstates;
+				}
+			data2++;
+#ifdef ALLOW_SINGLE_SITE
+			if(siteToScore > -1) break;
+#endif
+			}
+		else data2++;
+		}
+	
+	for(int i=0;i<nchar;i++)
+		destCLA->underflow_mult[i]=LCLA->underflow_mult[i];
+	
+	destCLA->rescaleRank=LCLA->rescaleRank+2;
+	}
+
+void Tree::CalcFullCLAPartialInternalRateHet(CondLikeArray *destCLA, const CondLikeArray *LCLA, const FLOAT_TYPE *pr1, CondLikeArray *partialCLA, int modIndex, int dataIndex){
+	//this function assumes that the pmat is arranged with the 16 entries for the
+	//first rate, followed by 16 for the second, etc.
+	FLOAT_TYPE *dest=destCLA->arr;
+	FLOAT_TYPE *CL1=LCLA->arr;
+	FLOAT_TYPE *partial=partialCLA->arr;
+
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+
+	const int nchar = data->NChar();
+	const int nRateCats = mod->NRateCats();
+
+#ifdef UNIX
+	posix_madvise(dest, nchar*4*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+	posix_madvise((void*)CL1, nchar*4*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+	posix_madvise(partial, nchar*4*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+#endif
+
+	if(nRateCats==4){
+		for(int i=0;i<nchar;i++){
+			*(dest++) = ( pr1[0]*CL1[0]+pr1[1]*CL1[1]+pr1[2]*CL1[2]+pr1[3]*CL1[3]) * *(partial++);
+			*(dest++) = ( pr1[4]*CL1[0]+pr1[5]*CL1[1]+pr1[6]*CL1[2]+pr1[7]*CL1[3]) * *(partial++);
+			*(dest++) = ( pr1[8]*CL1[0]+pr1[9]*CL1[1]+pr1[10]*CL1[2]+pr1[11]*CL1[3]) * *(partial++);
+			*(dest++) = ( pr1[12]*CL1[0]+pr1[13]*CL1[1]+pr1[14]*CL1[2]+pr1[15]*CL1[3]) * *(partial++);
+			
+			*(dest++) = ( pr1[16]*CL1[4]+pr1[17]*CL1[5]+pr1[18]*CL1[6]+pr1[19]*CL1[7]) * *(partial++);
+			*(dest++) = ( pr1[20]*CL1[4]+pr1[21]*CL1[5]+pr1[22]*CL1[6]+pr1[23]*CL1[7]) * *(partial++);
+			*(dest++) = ( pr1[24]*CL1[4]+pr1[25]*CL1[5]+pr1[26]*CL1[6]+pr1[27]*CL1[7]) * *(partial++);
+			*(dest++) = ( pr1[28]*CL1[4]+pr1[29]*CL1[5]+pr1[30]*CL1[6]+pr1[31]*CL1[7]) * *(partial++);
+		
+			*(dest++) = ( pr1[32]*CL1[8]+pr1[33]*CL1[9]+pr1[34]*CL1[10]+pr1[35]*CL1[11]) * *(partial++);
+			*(dest++) = ( pr1[36]*CL1[8]+pr1[37]*CL1[9]+pr1[38]*CL1[10]+pr1[39]*CL1[11]) * *(partial++);
+			*(dest++) = ( pr1[40]*CL1[8]+pr1[41]*CL1[9]+pr1[42]*CL1[10]+pr1[43]*CL1[11]) * *(partial++);
+			*(dest++) = ( pr1[44]*CL1[8]+pr1[45]*CL1[9]+pr1[46]*CL1[10]+pr1[47]*CL1[11]) * *(partial++);
+		
+			*(dest++) = ( pr1[48]*CL1[12]+pr1[49]*CL1[13]+pr1[50]*CL1[14]+pr1[51]*CL1[15]) * *(partial++);
+			*(dest++) = ( pr1[52]*CL1[12]+pr1[53]*CL1[13]+pr1[54]*CL1[14]+pr1[55]*CL1[15]) * *(partial++);
+			*(dest++) = ( pr1[56]*CL1[12]+pr1[57]*CL1[13]+pr1[58]*CL1[14]+pr1[59]*CL1[15]) * *(partial++);
+			*(dest++) = ( pr1[60]*CL1[12]+pr1[61]*CL1[13]+pr1[62]*CL1[14]+pr1[63]*CL1[15]) * *(partial++);
+			CL1+=16;
+			assert(*(dest-1)>=ZERO_POINT_ZERO);
+			}
+		}
+	else{
+		for(int i=0;i<nchar;i++){
+			for(int r=0;r<nRateCats;r++){
+				*(dest++) = ( pr1[16*r+0]*CL1[0]+pr1[16*r+1]*CL1[1]+pr1[16*r+2]*CL1[2]+pr1[16*r+3]*CL1[3]) * *(partial++);
+				*(dest++) = ( pr1[16*r+4]*CL1[0]+pr1[16*r+5]*CL1[1]+pr1[16*r+6]*CL1[2]+pr1[16*r+7]*CL1[3]) * *(partial++);
+				*(dest++) = ( pr1[16*r+8]*CL1[0]+pr1[16*r+9]*CL1[1]+pr1[16*r+10]*CL1[2]+pr1[16*r+11]*CL1[3]) * *(partial++);
+				*(dest++) = ( pr1[16*r+12]*CL1[0]+pr1[16*r+13]*CL1[1]+pr1[16*r+14]*CL1[2]+pr1[16*r+15]*CL1[3]) * *(partial++);
+				CL1+=4;
+				assert(*(dest-1)>=ZERO_POINT_ZERO);
+				}
+			}
+		}
+		
+	for(int site=0;site<nchar;site++){
+		destCLA->underflow_mult[site]=partialCLA->underflow_mult[site] + LCLA->underflow_mult[site];
+		}
+	}
+
+void Tree::CalcFullCLAPartialTerminalRateHet(CondLikeArray *destCLA, const CondLikeArray *partialCLA, const FLOAT_TYPE *Lpr, char *Ldata, int modIndex, int dataIndex){
+	//this function assumes that the pmat is arranged with the 16 entries for the
+	//first rate, followed by 16 for the second, etc.
+	FLOAT_TYPE *dest=destCLA->arr;
+	FLOAT_TYPE *partial=partialCLA->arr;
+
+	const SequenceData *data = dataPart->GetSubset(dataIndex);
+	Model *mod = modPart->GetModel(modIndex);
+
+	const int nchar = data->NChar();
+	const int nRateCats = mod->NRateCats();
+
+#ifdef UNIX
+	posix_madvise(dest, nchar*4*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+	posix_madvise((void*)partial, nchar*4*nRateCats*sizeof(FLOAT_TYPE), POSIX_MADV_SEQUENTIAL);
+#endif
+
+	for(int i=0;i<nchar;i++){
+		if(*Ldata > -1){ //no ambiguity
+			for(int i=0;i<nRateCats;i++){
+				*(dest++) = Lpr[(*Ldata)+16*i] * *(partial++);
+				*(dest++) = Lpr[(*Ldata+4)+16*i] * *(partial++);
+				*(dest++) = Lpr[(*Ldata+8)+16*i] * *(partial++);
+				*(dest++) = Lpr[(*Ldata+12)+16*i] * *(partial++);
+//				assert(*(dest-1)>=ZERO_POINT_ZERO);
+				}
+			Ldata++;
+			}
+			
+		else if(*Ldata == -4){ //total ambiguity
+			for(int i=0;i<4*nRateCats;i++) *(dest++) = *(partial++);
+			Ldata++;
+			}
+		else{ //partial ambiguity
+			//first figure in the ambiguous terminal
+			char nstates=-1 * *(Ldata++);
+			for(int q=0;q<4*nRateCats;q++) dest[q]=0;
+			for(int i=0;i<nstates;i++){
+				for(int i=0;i<nRateCats;i++){
+					*(dest+(i*4)) += Lpr[(*Ldata)+16*i];
+					*(dest+(i*4)+1) += Lpr[(*Ldata+4)+16*i];
+					*(dest+(i*4)+2) += Lpr[(*Ldata+8)+16*i];
+					*(dest+(i*4)+3) += Lpr[(*Ldata+12)+16*i];
+//					assert(*(dest-1)>=ZERO_POINT_ZERO);
+					}
+				Ldata++;
+				}
+			
+			//now add the partial
+			for(int r=0;r<nRateCats;r++){
+				*(dest++) *= *(partial++);
+				*(dest++) *= *(partial++);
+				*(dest++) *= *(partial++);
+				*(dest++) *= *(partial++);
+				}
+			}
+		}
+	for(int i=0;i<nchar;i++)
+		destCLA->underflow_mult[i]=partialCLA->underflow_mult[i];
+}
+
+//SINGLE SITE FUNCTIONS
+
+pair<FLOAT_TYPE, FLOAT_TYPE> Tree::OptimizeSingleSiteTreeScale(FLOAT_TYPE optPrecision){
+	//this is silly, but the site likelihood calculating function will do it for the 
+	//correct single site, but using the pattern count of the first character.  So, we'll
+	//need to divide by this count to get the proper site like
+	//PARTITION
+	FLOAT_TYPE siteCount = (FLOAT_TYPE) dataPart->GetSubset(0)->Count(0);
+	//FLOAT_TYPE siteCount = (FLOAT_TYPE) data->Count(0);
+	Score();
+	FLOAT_TYPE prev=lnL/siteCount;
+	FLOAT_TYPE cur;
+	FLOAT_TYPE scale;
+	FLOAT_TYPE t;
+	FLOAT_TYPE lastChange=(FLOAT_TYPE)9999.9;
+	FLOAT_TYPE effectiveScale = ONE_POINT_ZERO; //this measures the change in scale relative to what it began at.
+	FLOAT_TYPE upperBracket = FLT_MAX;   //the smallest value we know of with a negative d1 (relative to inital scale of 1.0!)
+	FLOAT_TYPE lowerBracket = FLT_MIN;   //the largest value we know of with a positive d1 (relative to inital scale of 1.0!)
+	FLOAT_TYPE incr;
+
+#ifdef DEBUG_SCALE_OPT
+	ofstream deb("scaleTrace.log");
+	deb.precision(20);
+	for(int s=0;s<50;s++){
+		FLOAT_TYPE scale=0.5 + s*.025;
+		ScaleWholeTree(scale);
+		Score();
+		deb << scale << "\t" << lnL << endl;
+		ScaleWholeTree(ONE_POINT_ZERO/scale);	
+		}
+	deb.close();
+#endif
+
+	if(FloatingPointEquals(lnL, ZERO_POINT_ZERO, max(1.0e-8, GARLI_FP_EPS * 2.0))){
+		return pair<FLOAT_TYPE, FLOAT_TYPE>(-ONE_POINT_ZERO, ZERO_POINT_ZERO);
+		}
+
+	int pass=1;
+	while(1){
+		//reversed this now so the reduction in scale is done first when getting the 
+		//derivs.  This works better if some blens are at DEF_MAX_BLEN because the 
+		//scaling up causes them to hit the max and the relative blens to change
+
+#ifdef SINGLE_PRECISION_FLOATS
+		incr=0.005f;
+#else
+		incr=0.005;
+#endif
+
+		scale=ONE_POINT_ZERO-incr;
+
+		ScaleWholeTree(scale);
+		Score();
+		cur=lnL/siteCount;
+		ScaleWholeTree(ONE_POINT_ZERO/scale);//return the tree to its original scale	
+		FLOAT_TYPE d12=(cur-prev)/-incr;
+
+		if(pass == 1 && fabs(d12) < max(1.0e-8, GARLI_FP_EPS * 2.0)){
+			//The surface looks suspiciously flat.  Test if the likelihood
+			//is really invariant for different scales (which means that
+			//the site is all missing or only has an observed state for one taxon)
+			ScaleWholeTree(1.1);
+			Score();
+			FLOAT_TYPE s = lnL/siteCount;
+			ScaleWholeTree(1.0/1.1);
+			if(fabs(prev - s) < max(1.0e-8, GARLI_FP_EPS * 2.0)) 
+				return pair<FLOAT_TYPE, FLOAT_TYPE>(-ONE_POINT_ZERO, prev);
+			}
+
+		scale=ONE_POINT_ZERO + incr;
+		ScaleWholeTree(scale);
+		Score();
+		cur=lnL/siteCount;
+		ScaleWholeTree(ONE_POINT_ZERO/scale);//return the tree to its original scale
+		FLOAT_TYPE d11=(cur-prev)/incr;
+
+		FLOAT_TYPE d1=(d11+d12)*ZERO_POINT_FIVE;
+		FLOAT_TYPE d2=(d11-d12)/incr;
+		
+		FLOAT_TYPE est = -d1/d2;
+		FLOAT_TYPE estImprove = d1*est + d2*(est*est*ZERO_POINT_FIVE);
+
+		//return conditions
+		if(estImprove < optPrecision && d2 < ZERO_POINT_ZERO){
+			ScaleWholeTree(ONE_POINT_ZERO/effectiveScale);
+			//cout << pass << endl;
+			return pair<FLOAT_TYPE, FLOAT_TYPE>(effectiveScale, prev);
+			}
+		
+		if(d2 < ZERO_POINT_ZERO){
+			est = max(min((FLOAT_TYPE)0.5, est), (FLOAT_TYPE)-0.5);
+			t=ONE_POINT_ZERO + est;
+			}
+		else{
+			if(d1 > ZERO_POINT_ZERO) t=(FLOAT_TYPE)2.0;
+			else t=(FLOAT_TYPE)0.5;
+			}
+		
+		//update the brackets
+		if(d1 <= ZERO_POINT_ZERO && effectiveScale < upperBracket)
+			upperBracket = effectiveScale;
+		else if(d1 > ZERO_POINT_ZERO && effectiveScale > lowerBracket)
+			lowerBracket = effectiveScale;
+
+		//if the surface is wacky and we are going to shoot past one of our brackets
+		//take evasive action by going halfway to the bracket
+		if((effectiveScale * t) <= lowerBracket){
+			t = (lowerBracket + effectiveScale) * ZERO_POINT_FIVE / effectiveScale;
+			}
+		else if((effectiveScale * t) >= upperBracket){
+			t = (upperBracket + effectiveScale) * ZERO_POINT_FIVE / effectiveScale;
+			}
+
+		scale=t;
+		effectiveScale *= scale;
+		if(effectiveScale > 100.0) 
+			return pair<FLOAT_TYPE, FLOAT_TYPE>(100.0, prev);
+		ScaleWholeTree(scale);
+		if(effectiveScale < 1e-4){
+			//The rate is essentially zero.  Invariant sites should be getting caught 
+			//before even calling this func, so this probably won't be visited
+			ScaleWholeTree(1.0/effectiveScale);
+			return pair<FLOAT_TYPE, FLOAT_TYPE>(effectiveScale, prev);
+			}
+		
+		Score();
+		cur=lnL/siteCount;
+		lastChange = cur - prev;
+		prev=cur;
+		pass++;
+		}
+	assert(0);
+	}
+
+void Tree::C4(const FLOAT_TYPE *a){
+	printf("%f %f %f %f\n", a[0], a[1], a[2], a[3]);
+	}
diff --git a/src/tree.h b/src/tree.h
new file mode 100644
index 0000000..8a59c25
--- /dev/null
+++ b/src/tree.h
@@ -0,0 +1,843 @@
+// GARLI version 2.1 source code
+// Copyright 2005-2014 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+//	NOTE: Portions of this source adapted from GAML source, written by Paul O. Lewis
+
+
+#ifndef __TREE_H
+#define __TREE_H
+
+#include <vector>
+#include <list>
+
+using namespace std;
+
+#include "defs.h"
+#include "rng.h"
+#include "treenode.h"
+#include "clamanager.h"
+#include "model.h"
+#include "sequencedata.h"
+#include "reconnode.h"
+
+
+#undef BRENT
+
+class SequenceData;
+class NucleotideData;
+class ClaManager;
+class GeneralGamlConfig;
+class ModelPartition;
+class Individual;
+extern rng rnd;
+
+#define RESCALE_ARRAY_LENGTH 90
+
+class Tree{
+	protected:
+		int numTipsTotal;
+		int numTipsAdded;
+		int numNodesAdded;
+		int numBranchesAdded;
+		int numNodesTotal;
+		int *taxtags;//int[ntax+1] used in tagging terminals in recombine function
+			//allocated in SharedTreeConstruction, deleted in dest
+
+	public:
+		FLOAT_TYPE lnL;	// holds likelihood score
+		ModelPartition *modPart;
+		TreeNode *root;
+		TreeNode *dummyRoot;//when we are dummy rootinging this will just alias allNodes[numTipsTotal]
+		TreeNode **allNodes;
+		ReconList sprRang;
+
+#ifdef EQUIV_CALCS
+		bool dirtyEQ;
+#endif
+		//a bunch of statics
+		static FLOAT_TYPE meanBrlenMuts;
+		static FLOAT_TYPE alpha; //alpha shape of blen mutation, not gamma rate het
+		static FLOAT_TYPE min_brlen;
+		static FLOAT_TYPE max_brlen;
+		static FLOAT_TYPE exp_starting_brlen;
+		static ClaManager *claMan;
+		static const DataPartition *dataPart;
+		static FLOAT_TYPE treeRejectionThreshold;
+		static vector<Constraint> constraints;
+		static AttemptedSwapList attemptedSwaps;
+		static FLOAT_TYPE uniqueSwapBias;
+		static FLOAT_TYPE distanceSwapBias;
+		static unsigned rescaleEvery;
+		static FLOAT_TYPE rescaleBelow;
+		static FLOAT_TYPE reduceRescaleBelow;
+		static FLOAT_TYPE bailOutBelow;
+		static list<TreeNode *> nodeOptVector;
+		
+		static bool useOptBoundedForBlen;
+		static bool rootWithDummy;
+		static bool dummyRootBranchMidpoint;
+		static bool someOrientedGap;
+		
+		static FLOAT_TYPE uniqueSwapPrecalc[500];
+		static FLOAT_TYPE distanceSwapPrecalc[1000];
+		static FLOAT_TYPE expectedPrecision;
+
+		static FLOAT_TYPE rescalePrecalcThresh[RESCALE_ARRAY_LENGTH];
+		static FLOAT_TYPE rescalePrecalcMult[RESCALE_ARRAY_LENGTH];
+		static int rescalePrecalcIncr[RESCALE_ARRAY_LENGTH];
+
+		static Bipartition *outgroup;
+
+		static int siteToScore;
+
+		int calcs;
+
+		//this controls the amount of site likelihood output. It is easier to just set it for the whole
+		//tree instead of passing it around a lot.  0 = no sitelikes, 1 = user level sitelikes, 2 = debugging
+		//it is NOT PERSISTENT, so after OutputSitelikes is called it is reset to 0
+		int sitelikeLevel;
+		string ofprefix;
+
+	enum{//the directions for sweeping of CLAs
+		DOWN = 1,
+		UPLEFT = 2,
+		UPRIGHT = 3,
+		ROOT = 4
+		};
+
+	enum{
+		DIRTY = 0,
+		CLEAN_STANDARDIZED = 1,
+		CLEAN_UNSTANDARDIZED = 2,
+		TEMP_ADJUSTED = 3
+		}bipartCond;
+		
+	public: 
+		//construction and allocation functions
+		Tree();
+		Tree(NucleotideData*,CondLikeArray **sharedcl);
+		Tree(const char*, bool numericalTaxa, bool allowPolytomies=false, bool allowMissingTaxa=false);
+		void AllocateTree(bool withExtraNode);
+		void AssignDataToTips();
+		void AssignCLAsFromMaster();
+	
+		//destructor
+		~Tree();
+
+		//functions for manipulating and making trees
+		void RandomlyAttachTip(int nodenum, int & );
+		void RandomlyAttachTipWithConstraints(int nodenum, int &placeInAllNodes, Bipartition *mask);
+		void MakeTrifurcatingRoot(bool reducenodes, bool clasAssigned);
+		bool ArbitrarilyBifurcate();
+		void SortAllNodesArray();
+		void EliminateNode(int nn);
+		int FindUnusedNode(int start);
+		inline void SetBranchLength(TreeNode *nd, FLOAT_TYPE len, bool dummyRootDontRecurse=false);
+		bool IdenticalSubtreeTopology(const TreeNode *other);
+		bool IdenticalTopology(const TreeNode *other);
+		bool IdenticalTopologyAllowingRerooting(const TreeNode *other);
+		void RotateNodesAtRoot(TreeNode *newroot);
+		void RerootHere(int newroot);
+		void SwapNodeDataForReroot(TreeNode *nroot);
+		void CheckBalance();
+		void SwapAndFreeNodes(TreeNode *cop);
+		void OutputBinaryFormattedTree(OUTPUT_CLASS &) const;
+		void ReadBinaryFormattedTree(FILE *);
+
+		//functions for copying trees
+		void MimicTopologyButNotInternNodeNums(TreeNode *copySource,TreeNode *replicate,int &placeInAllNodes);
+		void MimicTopo(TreeNode *, bool firstNode, bool sameModel);	
+     	void MimicTopo(const Tree *source);
+        void CopyBranchLens(const Tree *s);
+		void CopyClaIndeces(const Tree *source, bool remove);
+
+		// mutation functions
+		int TopologyMutator(FLOAT_TYPE optPrecision, int range, int subtreeNode);
+		void DeterministicSwapperByDist(Individual *source, double optPrecision, int range, bool furthestFirst);
+		void DeterministicSwapperByCut(Individual *source, double optPrecision, int range, bool furthestFirst);
+		void DeterministicSwapperRandom(Individual *source, double optPrecision, int range);
+		void GenerateTopologiesAtSprDistance(Individual *source, double optPrecision, int range);
+		void GatherValidReconnectionNodes(ReconList &list, int maxDist, TreeNode *cut, const TreeNode *subtreeNode, Bipartition *partialMask=NULL);
+		void GatherValidReconnectionNodes(int maxRange, TreeNode *cut, const TreeNode *subtreeNode, Bipartition *partialMask=NULL);
+		void FillAllSwapsList(ReconList *cuts, int reconLim);
+		unsigned FillWeightsForAllSwaps(ReconList *cuts, double *);
+		bool AssignWeightsToSwaps(TreeNode *cut);
+		int SPRMutate(int cutnum, ReconNode *broke, FLOAT_TYPE optPrecision, int subtreeNode);
+		int SPRMutateDummy(int cutnum, ReconNode *broke, FLOAT_TYPE optPrecision, int subtreeNode);
+		void ReorientSubtreeSPRMutate(int oldRoot, ReconNode *newRoot, FLOAT_TYPE optPrecision);
+		void ReorientSubtreeSPRMutateDummy(int oldRoot, ReconNode *newRoot, FLOAT_TYPE optPrecision);
+		int BrlenMutate();
+		int BrlenMutateSubset(const vector<int> &subtreeList);
+		void ScaleWholeTree(FLOAT_TYPE factor=-1.0);
+		FLOAT_TYPE Treelength();
+		//deprecated mutation functions
+		int VariableSPRMutate(int range, FLOAT_TYPE optPrecision);
+		void SPRMutate(int cutnum, int broknum, FLOAT_TYPE optPrecision, const vector<int> &nonSubNodes);
+		void NNIMutate(int node, int branch, FLOAT_TYPE optPrecision, int subtreeNode);
+		void VariableNNIMutate(int node, int branch, FLOAT_TYPE optPrecision, int subtreeNode);
+		void LocalMove();
+
+		//recombination
+		int BipartitionBasedRecombination( Tree *t, bool sameModel, FLOAT_TYPE optPrecision);
+		int SubtreeBasedRecombination( Tree *t, int recomNodeNum, bool sameModel, FLOAT_TYPE optPrecision);
+		void RecombineWith( Tree *t, bool sameModel , FLOAT_TYPE optPrecision );
+
+		//functions for dealing with constraints and bipartitions
+		static void LoadConstraints(ifstream &con, int nTaxa);
+		bool SwapAllowedByConstraint(const Constraint &constr, TreeNode *cut, ReconNode *broken, const Bipartition &proposed, const Bipartition *partialMask);
+		
+		//functions for determining if adding a particular taxon to a particular place in a growing tree is allowed by any constraints
+		//this is used if the taxon to be added is NOT already in the tree (so not for testing the allowability of swaps)
+		//these depend on the bipartitions across the tree NOT being standardized (not all having the taxon 1 bit on)
+		bool TaxonAdditionAllowedByPositiveConstraintWithMask(Constraint *constr, Bipartition *mask, TreeNode *toAdd, TreeNode *broken);
+		bool TaxonAdditionAllowedByNegativeConstraintWithMask(Constraint *constr, Bipartition *mask, TreeNode *toAdd, TreeNode *broken);
+		bool TaxonAdditionAllowedByPositiveBackboneConstraintWithMask(Constraint *constr, Bipartition *mask, TreeNode *toAdd, TreeNode *broken);
+		bool TaxonAdditionAllowedByNegativeBackboneConstraintWithMask(Constraint *constr, Bipartition *mask, TreeNode *toAdd, TreeNode *broken);
+		
+		bool RecursiveAllowedByConstraintWithMask(const Constraint &constr, const Bipartition *partialMask, const TreeNode *nd);
+		//bool RecursiveAllowedByNegativeConstraintWithMask(Constraint *constr, Bipartition *mask, TreeNode *nd);
+		void CalcBipartitions(bool standardize);
+		void OutputBipartitions();
+		TreeNode *ContainsBipartition(const Bipartition &bip);
+		TreeNode *ContainsBipartitionOrComplement(const Bipartition &bip);
+		TreeNode *ContainsMaskedBipartitionOrComplement(const Bipartition &bip, const Bipartition &mask);
+		void AdjustBipartsForSwap(int cut, int broken);
+
+		// functions for computing likelihood
+		bool ConditionalLikelihood(int direction, TreeNode* nd);	
+		int ConditionalLikelihoodRateHet(int direction, TreeNode* nd, bool fillFinalCLA=false);
+		FLOAT_TYPE GetScorePartialTerminalRateHet(const CondLikeArray *partialCLA, const FLOAT_TYPE *prmat, const char *Ldata, int modIndex, int dataIndex);
+		FLOAT_TYPE GetScorePartialTerminalNState(const CondLikeArray *partialCLA, const FLOAT_TYPE *prmat, const char *Ldata, int modIndex, int dataIndex);
+		FLOAT_TYPE GetScorePartialInternalRateHet(const CondLikeArray *partialCLA, const CondLikeArray *childCLA, const FLOAT_TYPE *prmat, int modIndex, int dataIndex);
+		FLOAT_TYPE GetScorePartialInternalNState(const CondLikeArray *partialCLA, const CondLikeArray *childCLA, const FLOAT_TYPE *prmat, int modIndex, int dataIndex);
+		int Score(int rootNodeNum =0);
+
+		FLOAT_TYPE GetScorePartialTerminalOrientedGap(const CondLikeArray *partialCLA, const FLOAT_TYPE *prmat, const char *Ldata, int modIndex, int dataIndex);
+	
+		//functions to optimize blens and params
+		pair<FLOAT_TYPE, FLOAT_TYPE> CalcDerivativesRateHet(TreeNode *nd1, TreeNode *nd2);
+		FLOAT_TYPE NewtonRaphsonOptimizeBranchLength(FLOAT_TYPE precision1, TreeNode *nd, bool goodGuess);
+#ifdef OPT_DEBUG
+		FLOAT_TYPE NewtonRaphsonSpoof(FLOAT_TYPE precision1, TreeNode *nd, bool goodGuess);
+#endif
+		void GetDerivsPartialTerminal(const CondLikeArray *partialCLA, const FLOAT_TYPE *prmat, const FLOAT_TYPE *d1mat, const FLOAT_TYPE *d2mat, const char *Ldata, FLOAT_TYPE &d1Tot, FLOAT_TYPE &d2Tot, int modIndex, int dataIndex, const unsigned *ambigMap =NULL);
+		void GetDerivsPartialTerminalNState(const CondLikeArray *partialCLA, const FLOAT_TYPE *prmat, const FLOAT_TYPE *d1mat, const FLOAT_TYPE *d2mat, const char *Ldata, FLOAT_TYPE &d1Tot, FLOAT_TYPE &d2Tot, int modIndex, int dataIndex);
+		void GetDerivsPartialTerminalNStateRateHet(const CondLikeArray *partialCLA, const FLOAT_TYPE *prmat, const FLOAT_TYPE *d1mat, const FLOAT_TYPE *d2mat, const char *Ldata, FLOAT_TYPE &d1Tot, FLOAT_TYPE &d2Tot, int modIndex, int dataIndex);
+		void GetDerivsPartialInternal(const CondLikeArray *partialCLA, const CondLikeArray *childCLA, const FLOAT_TYPE *prmat, const FLOAT_TYPE *d1mat, const FLOAT_TYPE *d2mat, FLOAT_TYPE &d1, FLOAT_TYPE &d2, int modIndex, int dataIndex);
+		void GetDerivsPartialInternalNState(const CondLikeArray *partialCLA, const CondLikeArray *childCLA, const FLOAT_TYPE *prmat, const FLOAT_TYPE *d1mat, const FLOAT_TYPE *d2mat, FLOAT_TYPE &d1, FLOAT_TYPE &d2, int modIndex, int dataIndex);
+		void GetDerivsPartialInternalNStateRateHet(const CondLikeArray *partialCLA, const CondLikeArray *childCLA, const FLOAT_TYPE *prmat, const FLOAT_TYPE *d1mat, const FLOAT_TYPE *d2mat, FLOAT_TYPE &d1Tot, FLOAT_TYPE &d2Tot, int modIndex, int dataIndex);
+		void GetDerivsPartialInternalEQUIV(const CondLikeArray *partialCLA, const CondLikeArray *childCLA, const FLOAT_TYPE *prmat, const FLOAT_TYPE *d1mat, const FLOAT_TYPE *d2mat, FLOAT_TYPE &d1, FLOAT_TYPE &d2, char *equiv, int modIndex, int dataIndex);
+		void CalcFullCLAInternalInternal(CondLikeArray *destCLA, const CondLikeArray *LCLA, const CondLikeArray *RCLA, const FLOAT_TYPE *Lpr, const FLOAT_TYPE *Rpr, int modIndex, int dataIndex);
+		void CalcFullCLATerminalTerminal(CondLikeArray *destCLA, const FLOAT_TYPE *Lpr, const FLOAT_TYPE *Rpr, const char *Ldata, const char *Rdata, int modIndex, int dataIndex);
+		void CalcFullCLAInternalTerminal(CondLikeArray *destCLA, const CondLikeArray *LCLA, const FLOAT_TYPE *pr1, const FLOAT_TYPE *pr2, char *data2, const unsigned *ambigMap, int modIndex, int dataIndex);
+		void CalcFullCLAInternalTerminalOpenMP(CondLikeArray *destCLA, const CondLikeArray *LCLA, const FLOAT_TYPE *pr1, const FLOAT_TYPE *pr2, char *data2, const unsigned *ambigMap, int modIndex, int dataIndex);
+
+		void CalcFullCLAInternalInternalEQUIV(CondLikeArray *destCLA, const CondLikeArray *LCLA, const CondLikeArray *RCLA, const FLOAT_TYPE *Lpr, const FLOAT_TYPE *Rpr,const char *leftEQ, const char *rightEQ, int modIndex, int dataIndex);
+
+		void CalcFullCLAPartialInternalRateHet(CondLikeArray *destCLA, const CondLikeArray *LCLA, const FLOAT_TYPE *pr1, CondLikeArray *partialCLA, int modIndex, int dataIndex);
+		void CalcFullCLAPartialTerminalRateHet(CondLikeArray *destCLA, const CondLikeArray *partialCLA, const FLOAT_TYPE *Lpr, char *Ldata, int modIndex, int dataIndex);
+
+		void CalcFullCLAInternalInternalNState(CondLikeArray *destCLA, const CondLikeArray *LCLA, const CondLikeArray *RCLA, const FLOAT_TYPE *Lpr, const FLOAT_TYPE *Rpr, int modIndex, int dataIndex);
+		void CalcFullCLAInternalTerminalNState(CondLikeArray *destCLA, const CondLikeArray *LCLA, const FLOAT_TYPE *pr1, const FLOAT_TYPE *pr2, char *data2, int modIndex, int dataIndex);
+		void CalcFullCLATerminalTerminalNState(CondLikeArray *destCLA, const FLOAT_TYPE *Lpr, const FLOAT_TYPE *Rpr, const char *Ldata, const char *Rdata, int modIndex, int dataIndex);
+
+		//for all internal state recon
+		void GetStatewiseUnscaledPosteriorsPartialInternalNState(CondLikeArray *destCLA, const CondLikeArray *partialCLA, const CondLikeArray *childCLA, const FLOAT_TYPE *prmat, int modIndex, int dataIndex);
+		void GetStatewiseUnscaledPosteriorsPartialTerminalNState(CondLikeArray *destCLA, const CondLikeArray *partialCLA, const FLOAT_TYPE *prmat, const char *Ldata, int modIndex, int dataIndex);
+		int FillStatewiseUnscaledPosteriors(CondLikeArraySet *partialCLAset, CondLikeArraySet *childCLAset, TreeNode *child, FLOAT_TYPE blen1);
+/*		
+		void CalcFullCLATerminalTerminalOrientedGap(CondLikeArray *destCLA, const FLOAT_TYPE *Lpr, const FLOAT_TYPE *Rpr, const char *Ldata, const char *Rdata, int modIndex, int dataIndex);
+		void CalcFullCLAInternalTerminalOrientedGap(CondLikeArray *destCLA, const CondLikeArray *LCLA, const FLOAT_TYPE *pr1, const FLOAT_TYPE *pr2, char *data2, int modIndex, int dataIndex);
+		void CalcFullCLAInternalInternalOrientedGap(CondLikeArray *destCLA, const CondLikeArray *LCLA, const CondLikeArray *RCLA, const FLOAT_TYPE *Lpr, const FLOAT_TYPE *Rpr, int modIndex, int dataIndex);
+*/
+		//new version that should work for any node - for each child data or a CLA will be passed in
+		void CalcFullCLAOrientedGap(CondLikeArray *destCLA, const FLOAT_TYPE *Lpr, const FLOAT_TYPE *Rpr, const CondLikeArray *LCLA, const CondLikeArray *RCLA, const char *Ldata, const char *Rdata, int modIndex, int dataIndex);
+
+		void UpdateCLAs(CondLikeArraySet *destCLA, CondLikeArraySet *firstCLA, CondLikeArraySet *secCLA, TreeNode *firstChild, TreeNode *secChild, FLOAT_TYPE blen1, FLOAT_TYPE blen2);
+		void GetTotalScore(CondLikeArraySet *partialCLA, CondLikeArraySet *childCLA, TreeNode *child, FLOAT_TYPE blen1);
+
+		FLOAT_TYPE OptimizeBranchLength(FLOAT_TYPE optPrecision, TreeNode *nd, bool goodGuess);
+		FLOAT_TYPE OptimizeAllBranches(FLOAT_TYPE optPrecision);
+		int PushBranchlengthsToMin();
+		void OptimizeBranchesAroundNode(TreeNode *nd, FLOAT_TYPE optPrecision, int subtreeNode);
+		void OptimizeBranchesWithinRadius(TreeNode *nd, FLOAT_TYPE optPrecision, int subtreeNode, TreeNode *prune);
+		void OptimizeBranchesInArray(int *nodes, int numNodes, FLOAT_TYPE optPrecision);
+		FLOAT_TYPE RecursivelyOptimizeBranches(TreeNode *nd, FLOAT_TYPE optPrecision, int subtreeNode, int radius, bool dontGoNext, FLOAT_TYPE scoreIncrease, bool ignoreDelta=false);
+		FLOAT_TYPE RecursivelyOptimizeBranchesDown(TreeNode *nd, TreeNode *calledFrom, FLOAT_TYPE optPrecision, int subtreeNode, int radius, FLOAT_TYPE scoreIncrease);
+		FLOAT_TYPE BrentOptimizeBranchLength(FLOAT_TYPE accuracy_cutoff, TreeNode *here, bool firstPass);
+		FLOAT_TYPE BranchLike(TreeNode *optNode);
+		FLOAT_TYPE OptimizeAlpha(FLOAT_TYPE, int modnum);
+		FLOAT_TYPE OptimizeOmegaParameters(FLOAT_TYPE prec, int modnum);
+		FLOAT_TYPE OptimizeFlexRates(FLOAT_TYPE prec, int modnum);
+		FLOAT_TYPE OptimizeEquilibriumFreqs(FLOAT_TYPE prec, int modnum);
+		FLOAT_TYPE OptimizeRelativeNucRates(FLOAT_TYPE prec, int modnum);
+		FLOAT_TYPE OptimizeInsertDeleteRates(FLOAT_TYPE prec, int modnum);
+		FLOAT_TYPE OptimizeSubsetRates(FLOAT_TYPE prec);
+//the new versions from the trunk
+#ifdef SINGLE_PRECISION_FLOATS
+		FLOAT_TYPE OptimizeBoundedParameter(int modnum, FLOAT_TYPE optPrecision, FLOAT_TYPE initialVal, int which, FLOAT_TYPE lowBound, FLOAT_TYPE highBound, void (Model::*SetParam)(int, FLOAT_TYPE), FLOAT_TYPE targetScoreDigits = 5.0f);
+#else
+		FLOAT_TYPE OptimizeBoundedParameter(int modnum, FLOAT_TYPE optPrecision, FLOAT_TYPE initialVal, int which, FLOAT_TYPE lowBound, FLOAT_TYPE highBound, void (Model::*SetParam)(int, FLOAT_TYPE), FLOAT_TYPE targetScoreDigits = 9.0);
+#endif
+		FLOAT_TYPE OptimizeBoundedParameter(FLOAT_TYPE optPrecision, FLOAT_TYPE prevVal, int which, FLOAT_TYPE lowBound, FLOAT_TYPE highBound, int modnum, void (Model::*SetParam)(int, FLOAT_TYPE));
+		template<class T> FLOAT_TYPE OptimizeBoundedParameter(FLOAT_TYPE optPrecision, FLOAT_TYPE prevVal, int which, FLOAT_TYPE lowBound, FLOAT_TYPE highBound, T *obj, void (T::*SetParam)(int, FLOAT_TYPE));
+		template<class T> void TraceParameterLikelihood(ofstream &out, int which, FLOAT_TYPE prevVal, FLOAT_TYPE startVal, FLOAT_TYPE endVal, FLOAT_TYPE incr, T *obj, void (T::*SetParam)(int, FLOAT_TYPE));
+
+		void TraceLikelihoodForParameter(int modnum, int which, FLOAT_TYPE init, FLOAT_TYPE min, FLOAT_TYPE max, FLOAT_TYPE interval, void (Model::*SetParam)(int, FLOAT_TYPE), bool append);
+		//FLOAT_TYPE OptimizeBoundedParameter(FLOAT_TYPE optPrecision, FLOAT_TYPE prevVal, int which, FLOAT_TYPE lowBound, FLOAT_TYPE highBound, void (Model::*SetParam)(int, FLOAT_TYPE));
+		FLOAT_TYPE SetAndEvaluateParameter(int modnum, int which, FLOAT_TYPE val, FLOAT_TYPE &bestKnownScore, FLOAT_TYPE &bestKnownVal, void (Model::*SetParam)(int, FLOAT_TYPE));
+		bool CheckScoreAndRestore(int modnum, int which, void (Model::*SetParam)(int, FLOAT_TYPE), FLOAT_TYPE otherScore, FLOAT_TYPE otherVal, FLOAT_TYPE bestScore, FLOAT_TYPE bestVal, FLOAT_TYPE tolerance);
+
+		FLOAT_TYPE OptimizeTreeScale(FLOAT_TYPE);
+		FLOAT_TYPE OptimizePinv();
+		void SetNodesUnoptimized();
+		void RescaleRateHet(CondLikeArray *destCLA, int dataIndex);
+		void RescaleRateHetNState(CondLikeArray *destCLA, int dataIndex);
+
+		void StoreBranchlengths(vector<FLOAT_TYPE> &blens){
+			for(int n=1;n<numNodesTotal;n++)
+				blens.push_back(allNodes[n]->dlen);
+			assert(blens.size() == numNodesTotal - 1);
+			}
+		void RestoreBranchlengths(vector<FLOAT_TYPE> &blens){
+			for(int n=1;n<numNodesTotal;n++)
+				SetBranchLength(allNodes[n], blens[n-1]);
+			MakeAllNodesDirty();
+			}
+
+		void VerifyScore(double tol){
+			if(!FloatingPointEquals(-1.0, lnL, 1e-8)){
+				double bef = lnL;
+				MakeAllNodesDirty();
+				Score();
+				outman.UserMessage("Verify score: %.6f -> %.6f = %.6f", bef, lnL, bef - lnL);
+				assert(FloatingPointEquals(bef, lnL, tol));
+				}
+			return;
+			}
+
+		pair<FLOAT_TYPE, FLOAT_TYPE> OptimizeSingleSiteTreeScale(FLOAT_TYPE optPrecision);
+
+		//functions for dealing with conditional likelihood arrays
+		void MarkUpwardClasToReclaim(int subtreeNode);
+		void MarkDownwardClasToReclaim(int subtreeNode);
+		void MarkClasNearTipsToReclaim(int subtreeNode);
+		void ProtectClas();
+		void UnprotectClas();
+		inline CondLikeArraySet *GetClaDown(TreeNode *nd, bool calc=true);
+		inline CondLikeArraySet *GetClaUpLeft(TreeNode *nd, bool calc=true);
+		inline CondLikeArraySet *GetClaUpRight(TreeNode *nd, bool calc=true);
+		void OutputValidClaIndeces();
+		void OutputNthClaAcrossTree(ofstream &deb, TreeNode *nd, int site, int modIndex);
+		void ClaReport(ofstream &cla);
+		FLOAT_TYPE CountClasInUse();
+		void OutputSiteLikelihoods(int partnum, vector<FLOAT_TYPE> &likes, const int *under1, const int *under2);
+		void OutputSiteDerivatives(int partNum, vector<double> &likes, vector<double> &d1s, vector<double> &d2s, const int *under1, const int *under2, ofstream &ordered, ofstream &packed);
+		void CountNumReservedClas(int &, int &, int&);
+		void CheckClaAssignments(TreeNode *nd);
+		void RemoveTempClaReservations();
+		void SetupClasForSubtreeMode(int subtreeNode);
+		void DirtyNodesOutsideOfSubtree(TreeNode *nd, int subtreeNodeAnc);
+		void CopyClaIndecesInSubtree(const TreeNode *from, bool remove);
+		void DirtyNodesInSubtree(TreeNode *nd);
+		void ReclaimUniqueClas();
+		void RemoveTreeFromAllClas();
+		void TraceDirtynessToRoot(TreeNode *nd);
+		void TraceDirtynessToNode(TreeNode *nd, int tonode);
+		void SweepDirtynessOverTree(TreeNode *nd, TreeNode *from=NULL);
+		void MakeNodeDirty(TreeNode *nd);
+		void MakeAllNodesDirty();
+
+		//accessor funcs
+		bool IsGood() const {return root->IsGood();}
+		int NTax() const {return numTipsTotal;}
+		int getNumTipsTotal() const {return numTipsTotal;}
+		int getNumNodesTotal() const {return numNodesTotal;}
+		int GetRandomInternalNode() const {return numTipsTotal+rnd.random_int(numTipsTotal-3)+1;}
+		int GetRandomTerminalNode() const {return rnd.random_int(numTipsTotal)+1;}
+		int GetRandomNonRootNode() const {return rnd.random_int(numNodesTotal-1)+1;}
+
+		//odds and ends
+		void PerturbAllBranches();
+		void RandomizeBranchLengths(FLOAT_TYPE lowLimit, FLOAT_TYPE highLimit);
+		void RandomizeBranchLengthsExponential(FLOAT_TYPE lambda);
+		int NodeToNodeDistance(int num1, int num2);
+		int NodesToRoot(TreeNode *nd);
+		void SampleBlenCurve(TreeNode *nd, ofstream &out);
+		void CalcEmpiricalDerivatives(TreeNode *nd, FLOAT_TYPE &D1, FLOAT_TYPE &D2);
+		void SetDistanceBasedBranchLengthsAroundNode(TreeNode *nd);
+		void FindNearestTerminalUp(TreeNode *start, TreeNode *&, FLOAT_TYPE &dist);
+		void FindNearestTerminalsDown(TreeNode *start, TreeNode *from, TreeNode *&term1, TreeNode *&term2, FLOAT_TYPE &dist1, FLOAT_TYPE &dist2);
+		void OutputTreeStructure(TreeNode *);
+		void GetInternalStateString(char *string, int nodeNum);
+		void RecursivelyCalculateInternalStateProbs(TreeNode *nd, ofstream &out);	
+		void InferAllInternalStateProbs(const char *ofprefix);
+		void MoveDummyRootToBranchMidpoint();
+
+		static void SetTreeStatics(ClaManager *, const DataPartition *, const GeneralGamlConfig *);
+
+		void C4(const FLOAT_TYPE *a);
+		};
+
+
+inline void Tree::CopyBranchLens(const Tree *s){
+	for(int i=1;i<numNodesTotal;i++)
+		allNodes[i]->dlen=s->allNodes[i]->dlen;
+	}
+
+inline void Tree::MakeAllNodesDirty(){
+	root->claIndexDown=claMan->SetDirty(root->claIndexDown);
+	root->claIndexUL=claMan->SetDirty(root->claIndexUL);
+	root->claIndexUR=claMan->SetDirty(root->claIndexUR);
+	for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+		allNodes[i]->claIndexDown=claMan->SetDirty(allNodes[i]->claIndexDown);
+		allNodes[i]->claIndexUL=claMan->SetDirty(allNodes[i]->claIndexUL);
+		allNodes[i]->claIndexUR=claMan->SetDirty(allNodes[i]->claIndexUR);
+		}
+	lnL=-ONE_POINT_ZERO;
+	}
+	
+inline int Tree::FindUnusedNode(int start){
+	for(int i=start;i<numNodesTotal;i++)
+		if(!(allNodes[i]->attached))
+			{allNodes[i]->left=allNodes[i]->right=NULL;
+			return i;
+			}
+	assert(0);
+	return -1;
+	}	
+
+inline void Tree::AssignCLAsFromMaster(){
+	//remember that the root's down cla is actually the one that goes up 
+	//the middle des
+	if(claMan == NULL)
+		return;
+	assert(allNodes[0]->claIndexDown==-1);
+	allNodes[0]->claIndexDown=claMan->AssignClaHolder();
+	allNodes[0]->claIndexUL=claMan->AssignClaHolder();
+	allNodes[0]->claIndexUR=claMan->AssignClaHolder();
+	for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+		assert(allNodes[i]->claIndexDown==-1);
+		allNodes[i]->claIndexDown=claMan->AssignClaHolder();
+		allNodes[i]->claIndexUL=claMan->AssignClaHolder();
+		allNodes[i]->claIndexUR=claMan->AssignClaHolder();
+		}
+	}
+	
+inline void Tree::CopyClaIndeces(const Tree *from, bool remove){
+	//the bool argument "remove" designates whether the tree currently has cla arrays
+	//assigned to it or not (if not, it must have come from the unused tree vector)
+
+	//do the clas down
+	if(remove) claMan->DecrementCla(allNodes[0]->claIndexDown);
+	allNodes[0]->claIndexDown=from->allNodes[0]->claIndexDown;
+	if(allNodes[0]->claIndexDown != -1) claMan->IncrementCla(allNodes[0]->claIndexDown);
+	
+#ifdef EQUIV_CALCS
+	if(from->dirtyEQ == false){
+		memcpy(allNodes[0]->tipData, from->allNodes[0]->tipData, data->NChar()*sizeof(char));
+		for(int i=numTipsTotal+1;i<numNodesTotal;i++)
+			memcpy(allNodes[i]->tipData, from->allNodes[i]->tipData, data->NChar()*sizeof(char));
+		dirtyEQ = false;
+		}
+	else dirtyEQ = true;
+#endif
+
+	for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+		if(remove) claMan->DecrementCla(allNodes[i]->claIndexDown);
+		allNodes[i]->claIndexDown=from->allNodes[i]->claIndexDown;
+		if(allNodes[i]->claIndexDown != -1) claMan->IncrementCla(allNodes[i]->claIndexDown);
+		}
+		
+	//do the clas up left
+	if(remove) claMan->DecrementCla(allNodes[0]->claIndexUL);
+	allNodes[0]->claIndexUL=from->allNodes[0]->claIndexUL;
+	if(allNodes[0]->claIndexUL != -1) claMan->IncrementCla(allNodes[0]->claIndexUL);
+	
+	for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+		if(remove) claMan->DecrementCla(allNodes[i]->claIndexUL);
+		allNodes[i]->claIndexUL=from->allNodes[i]->claIndexUL;
+		if(allNodes[i]->claIndexUL != -1) claMan->IncrementCla(allNodes[i]->claIndexUL);
+		}
+	
+	//do the clas up right
+	if(remove) claMan->DecrementCla(allNodes[0]->claIndexUR);
+	allNodes[0]->claIndexUR=from->allNodes[0]->claIndexUR;
+	if(allNodes[0]->claIndexUR != -1) claMan->IncrementCla(allNodes[0]->claIndexUR);
+		
+	for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+		if(remove) claMan->DecrementCla(allNodes[i]->claIndexUR);
+		allNodes[i]->claIndexUR=from->allNodes[i]->claIndexUR;
+		if(allNodes[i]->claIndexUR != -1) claMan->IncrementCla(allNodes[i]->claIndexUR);
+		}
+	}
+
+inline void Tree::RemoveTreeFromAllClas(){
+	if(root->claIndexDown != -1){
+		claMan->DecrementCla(root->claIndexDown);
+		root->claIndexDown=-1;
+		}
+	if(root->claIndexUL != -1){
+		claMan->DecrementCla(root->claIndexUL);
+		root->claIndexUL=-1;
+		}
+	if(root->claIndexUR != -1){	
+		claMan->DecrementCla(root->claIndexUR);
+		root->claIndexUR=-1;
+		}
+	for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+		if(allNodes[i]->claIndexDown != -1){
+			claMan->DecrementCla(allNodes[i]->claIndexDown);
+			allNodes[i]->claIndexDown=-1;
+			}
+		if(allNodes[i]->claIndexUL != -1){
+			claMan->DecrementCla(allNodes[i]->claIndexUL);
+			allNodes[i]->claIndexUL=-1;
+			}
+		if(allNodes[i]->claIndexUR != -1){
+			claMan->DecrementCla(allNodes[i]->claIndexUR);
+			allNodes[i]->claIndexUR=-1;
+			}
+		}
+	}
+	
+inline void Tree::SetBranchLength(TreeNode *nd, FLOAT_TYPE len, bool dummyRootDontRecurse /*=false*/){
+	assert(!(len < min_brlen) && !(len > max_brlen));
+	nd->dlen=len;
+
+	//the dontRecurse bit here just keeps it from bouncing back and forth setting the 
+	//lengths of the two "root" branches, since changing one triggers a change to the other
+	//There are are few posibilities:
+	//1. nd->anc is the root and dummyRoot->anc is the root
+	//		The other branch to adjust is the descendent of the root that is not the dummyRoot nor nd
+	//2. nd->anc is not the root
+	//	2a. nd is the branch "above" where dummyRoot attaches
+	//		In this case dummyRoot is the next or prev of nd, and the other branch to adjust is nd->anc
+	//	2b. nd is the branch "below" where dummyRoot attaches
+	//		In this case dummyRoot is left or right of nd.  The branch to adjust is the other descendent of nd
+	//	3.	nd is not related to the dummyRooted branch
+	if(rootWithDummy && dummyRootBranchMidpoint && dummyRootDontRecurse == false){
+		TreeNode *otherNode = NULL;
+		if(nd->anc == root && dummyRoot->anc == root){
+			otherNode = root->left;
+			do{
+				if(otherNode != dummyRoot && otherNode != nd){
+					break;
+					}
+				else
+					otherNode = otherNode->next;
+				}while(otherNode);
+			}
+		else{
+			if(nd->prev == dummyRoot || nd->next == dummyRoot)
+				otherNode = nd->anc;
+			else{
+				if(nd->left == dummyRoot)
+					otherNode = nd->right;
+				else if(nd->right == dummyRoot)
+					otherNode = nd->left;
+				}
+			}
+		if(otherNode)
+			SetBranchLength(otherNode, len, true);
+		}
+
+	SweepDirtynessOverTree(nd);
+	}
+
+inline void Tree::MoveDummyRootToBranchMidpoint(){
+	TreeNode *branch1, *branch2;
+	if(dummyRoot->anc == root){
+		if(root->left != dummyRoot){
+			branch1 = root->left;
+			if(root->left->next != dummyRoot){
+				branch2 = root->left->next;
+				assert(root->right == dummyRoot);
+				}
+			else{
+				branch2 = root->right;
+				}
+			}
+		else{
+			branch1 = root->left->next;
+			branch2 = root->right;
+			}
+		}
+	else{
+		branch1 = dummyRoot->anc;
+		branch2 = (dummyRoot->next ? dummyRoot->next : dummyRoot->prev);
+		}
+	double sum = branch1->dlen + branch2->dlen;
+	//this should automatically adjust the length of branch2 because of code in SetBranchLength
+	SetBranchLength(branch1, sum / 2.0);
+	}
+
+inline CondLikeArraySet *Tree::GetClaDown(TreeNode *nd, bool calc/*=true*/){
+	if(claMan->IsDirty(nd->claIndexDown)){
+		if(calc==true){
+			ConditionalLikelihoodRateHet(DOWN, nd);
+			}
+		else claMan->FillHolder(nd->claIndexDown, 1);
+		}
+	if(memLevel > 1) claMan->ReserveCla(nd->claIndexDown);
+	return claMan->GetCla(nd->claIndexDown);
+	}
+	
+inline CondLikeArraySet *Tree::GetClaUpLeft(TreeNode *nd, bool calc/*=true*/){
+	if(claMan->IsDirty(nd->claIndexUL)){
+		if(calc==true){
+			ConditionalLikelihoodRateHet(UPLEFT, nd);
+			}
+		else claMan->FillHolder(nd->claIndexUL, 2);
+		}
+	if(memLevel > 0) claMan->ReserveCla(nd->claIndexUL);
+	return claMan->GetCla(nd->claIndexUL);
+	}
+	
+inline CondLikeArraySet *Tree::GetClaUpRight(TreeNode *nd, bool calc/*=true*/){
+	if(claMan->IsDirty(nd->claIndexUR)){
+		if(calc==true){
+			ConditionalLikelihoodRateHet(UPRIGHT, nd);
+			}
+		else claMan->FillHolder(nd->claIndexUR, 2);
+		}
+	if(memLevel > 0) claMan->ReserveCla(nd->claIndexUR);
+	return claMan->GetCla(nd->claIndexUR);
+	}
+
+inline void Tree::ProtectClas(){
+	if(memLevel != 3){
+		for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+			claMan->ReserveCla(allNodes[i]->claIndexDown, false);
+			}
+		}
+	else{
+		for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+			if(allNodes[i]->left->IsInternal() && allNodes[i]->right->IsInternal()) claMan->ReserveCla(allNodes[i]->claIndexDown, false);
+			}
+		}
+	}
+
+inline void Tree::UnprotectClas(){
+	for(int i=numTipsTotal+1;i<numNodesTotal;i++){
+		if(allNodes[i]->claIndexDown > -1)
+			claMan->UnreserveCla(allNodes[i]->claIndexDown);
+		}
+	}
+
+inline int Tree::NodeToNodeDistance(int num1, int num2){
+	TreeNode *nd1=allNodes[num1];
+	TreeNode *nd2=allNodes[num2];
+	int dist=0;
+	
+	int height1=NodesToRoot(nd1);
+	int height2=NodesToRoot(nd2);
+	
+	while(height1 > height2){
+		nd1=nd1->anc;
+		dist++;
+		height1--;
+		}
+	while(height2 > height1){
+		nd2=nd2->anc;
+		dist++;
+		height2--;
+		}
+	
+	while(nd1 != nd2){
+		nd1=nd1->anc;
+		nd2=nd2->anc;
+		dist += 2;
+		}	
+	
+	return dist;
+	}
+
+inline int Tree::NodesToRoot(TreeNode *nd){
+	int i=0;
+	while(nd->anc){
+		nd=nd->anc;
+		i++;
+		}
+	return i;
+	}
+
+template<class T>
+void Tree::TraceParameterLikelihood(ofstream &out, int which, FLOAT_TYPE prevVal, FLOAT_TYPE startVal, FLOAT_TYPE endVal, FLOAT_TYPE incr, T *obj, void (T::*SetParam)(int, FLOAT_TYPE)){
+	for(FLOAT_TYPE val = startVal;val <=endVal;val += incr){
+		CALL_SET_PARAM_FUNCTION(*obj, SetParam)(which, val);
+		MakeAllNodesDirty();
+		Score();
+		out << val << "\t" << lnL << endl;
+		}
+	CALL_SET_PARAM_FUNCTION(*obj, SetParam)(which, prevVal);
+	MakeAllNodesDirty();
+	Score();
+	out << prevVal << "\t" << lnL << endl;
+	}
+
+//a templated version
+template<class T>
+FLOAT_TYPE Tree::OptimizeBoundedParameter(FLOAT_TYPE optPrecision, FLOAT_TYPE prevVal, int which, FLOAT_TYPE lowBound, FLOAT_TYPE highBound, T *obj, void (T::*SetParam)(int, FLOAT_TYPE)){
+
+	FLOAT_TYPE epsilon = min(optPrecision, (FLOAT_TYPE) 1.0e-5);
+
+	assert(prevVal > lowBound - epsilon && prevVal < highBound + epsilon);
+
+	//if the initial value is already very near or equal to a bound, bump it off a tad so the emirical derivs below work right.
+	if(prevVal - lowBound < epsilon){
+		prevVal = lowBound + epsilon;
+		CALL_SET_PARAM_FUNCTION(*obj, SetParam)(which, prevVal);
+		MakeAllNodesDirty();
+		}
+	else if(highBound - prevVal < epsilon){
+		prevVal = highBound - epsilon;
+		CALL_SET_PARAM_FUNCTION(*obj, SetParam)(which, prevVal);
+		MakeAllNodesDirty();
+		}
+
+	if(FloatingPointEquals(lnL, -ONE_POINT_ZERO, 1e-8)) Score();
+	FLOAT_TYPE start, prev, cur;
+	prev = start = cur = lnL;
+	FLOAT_TYPE lastChange=(FLOAT_TYPE)9999.9;
+	FLOAT_TYPE upperBracket = highBound;   //the smallest value we know of with a negative d1, or the minimum allowed value
+	FLOAT_TYPE lowerBracket = lowBound;   //the largest value we know of with a positive d1 , or the maximum allowed value
+	FLOAT_TYPE incr;
+	int lowBoundOvershoot = 0;
+	int upperBoundOvershoot = 0;
+	int positiveD2Num = 0;
+	int pass = 0;
+
+/*	ofstream curves("lcurve.log");
+	curves.precision(8);
+	curves << endl;
+	for(double c = max(prevVal - 0.01, lowBound); c < min(prevVal + 0.01, highBound) ; c += 0.001){
+		CALL_SET_PARAM_FUNCTION(*obj, SetParam)(which, c);
+		MakeAllNodesDirty();
+		Score();
+		curves << c << "\t" << lnL << endl;;
+		}
+	curves.close();
+
+	CALL_SET_PARAM_FUNCTION(*obj, SetParam)(which, prevVal);
+	MakeAllNodesDirty();
+	Score();
+*/
+	while(1){
+#ifdef SINGLE_PRECISION_FLOATS
+		incr=0.005f;
+#else
+		incr=min(0.0001*optPrecision, min(prevVal - lowerBracket, upperBracket - prevVal));
+		//incr=min(0.0001, min(prevVal - lowerBracket, upperBracket - prevVal));
+#endif
+		CALL_SET_PARAM_FUNCTION(*obj, SetParam)(which, prevVal+incr);
+		MakeAllNodesDirty();
+		Score();
+		cur=lnL;
+		FLOAT_TYPE d11=(cur-prev)/incr;
+		
+		CALL_SET_PARAM_FUNCTION(*obj, SetParam)(which, prevVal-incr);
+		MakeAllNodesDirty();
+		Score();
+		cur=lnL;
+		FLOAT_TYPE d12=(cur-prev)/-incr;
+		
+		FLOAT_TYPE d1=(d11+d12)*ZERO_POINT_FIVE;
+		//if the evaluation points straddle the optimum, leave now
+		if((d11 - d12) == ZERO_POINT_ZERO || (d11 > ZERO_POINT_ZERO && d12 < ZERO_POINT_ZERO) || (d11 < ZERO_POINT_ZERO && d12 > ZERO_POINT_ZERO)){
+			CALL_SET_PARAM_FUNCTION(*obj, SetParam)(which, prevVal);;
+			MakeAllNodesDirty();
+			lnL = prev;
+			return prev-start;
+			}
+		
+		FLOAT_TYPE d2=(d11-d12)/incr;
+		
+		FLOAT_TYPE est=-d1/d2;
+		
+		FLOAT_TYPE proposed = prevVal + est;
+
+	//	outman.UserMessage("%f\t%f\t%f\t%f\t%f", d1, d2, prevVal, est, proposed);
+
+		if(d2 > ZERO_POINT_ZERO){
+			positiveD2Num++;
+			if(d1 > ZERO_POINT_ZERO) proposed=prevVal*(FLOAT_TYPE)(ONE_POINT_ZERO+0.01*positiveD2Num);
+			else proposed=prevVal*(FLOAT_TYPE)(ONE_POINT_ZERO-0.01*positiveD2Num);
+			}
+		if(d1 < ZERO_POINT_ZERO && proposed < (lowerBracket + epsilon)){
+			if(prevVal - lowerBracket - epsilon < epsilon * ZERO_POINT_FIVE){
+				CALL_SET_PARAM_FUNCTION(*obj, SetParam)(which, prevVal);;
+				MakeAllNodesDirty();			
+				lnL = prev;
+				return prev-start;
+				}
+			lowBoundOvershoot++;
+			if(lowBoundOvershoot > 1)
+				proposed = lowerBracket + epsilon;
+			else
+				proposed = (prevVal + lowerBracket) * ZERO_POINT_FIVE;
+			}
+		else if(d1 > ZERO_POINT_ZERO && proposed > upperBracket - epsilon){
+			if(upperBracket - epsilon - prevVal < epsilon * ZERO_POINT_FIVE){
+				CALL_SET_PARAM_FUNCTION(*obj, SetParam)(which, prevVal);;
+				MakeAllNodesDirty();
+				lnL = prev;
+				return prev-start;
+				}
+			upperBoundOvershoot++;
+			if(upperBoundOvershoot > 1)
+				proposed = upperBracket - epsilon;
+			else
+				proposed = (prevVal + upperBracket) * ZERO_POINT_FIVE;
+			}
+
+		FLOAT_TYPE estImprove;
+		if(d2 < ZERO_POINT_ZERO) estImprove = d1*(proposed - prevVal) + (d2 * (proposed - prevVal) * (proposed - prevVal)) * ZERO_POINT_FIVE;
+		else estImprove = 9999.9;
+
+		//require that we didn't significantly worsen the likelihood 
+		if(estImprove < optPrecision && prev >= start - 1.0e-6){
+			CALL_SET_PARAM_FUNCTION(*obj, SetParam)(which, prevVal);;
+			MakeAllNodesDirty();			
+			lnL = prev;
+			return prev-start;
+			}
+
+		//don't allow infinite looping if something goes wrong
+		if(pass > 1000){
+			throw ErrorException("too many passes in OptimizeBoundedParameter");
+			}
+		
+		//update the brackets
+		if(d1 <= ZERO_POINT_ZERO && prevVal < upperBracket)
+			upperBracket = prevVal;
+		else if(d1 > ZERO_POINT_ZERO && prevVal > lowerBracket)
+			lowerBracket = prevVal;
+
+		CALL_SET_PARAM_FUNCTION(*obj, SetParam)(which, proposed);;
+		MakeAllNodesDirty();			
+		Score();
+		lastChange = lnL - prev;
+		prev=lnL;
+		prevVal=proposed;
+		pass++;
+		}
+	return -1;
+	}
+
+#endif
+
diff --git a/src/treenode.cpp b/src/treenode.cpp
new file mode 100644
index 0000000..da760b8
--- /dev/null
+++ b/src/treenode.cpp
@@ -0,0 +1,890 @@
+// GARLI version 2.1 source code
+// Copyright 2005-2014 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+//	NOTE: Portions of this source adapted from GAML source, written by Paul O. Lewis
+
+#include <cassert>
+#include <iostream>
+#include <fstream>
+
+using namespace std;
+
+#include "defs.h"
+#include "treenode.h"
+#include "clamanager.h"
+#include "bipartition.h"
+#include "errorexception.h"
+#include "outputman.h"
+#include "sequencedata.h"
+
+extern OutputManager outman;
+
+#undef DEBUG_RECOMBINEWITH
+
+TreeNode::TreeNode( const int no )
+	: left(0), right(0), next(0), prev(0), anc(0), tipData(0L), bipart(0L)
+{	attached =false;
+	
+	claIndexDown=-1;
+	claIndexUL=-1;
+	claIndexUR=-1;
+		
+	nodeNum  = no;
+	dlen	= 0.0;
+/* GANESH added this */
+#ifdef PECR_SET_PARSIMONY_BRLEN
+    /* every node is a leaf (no descendants) when created */
+    leaf_mask = true;
+#endif    
+}
+
+TreeNode::~TreeNode(){
+	if(bipart!=NULL) delete bipart;
+}
+
+TreeNode* TreeNode::AddDes(TreeNode *d){
+	//leaves blens as-is, ignores the current values
+	//of anc, prev and next for d
+	d->anc=this;
+	d->next=NULL;
+	if(left){
+		if(right){
+			right->next=d;
+			d->prev=right;
+			right=d;
+			}
+		else{
+			right=d;
+			left->next=d;
+			d->prev=left;
+			}
+		}
+	else{
+		left=d;
+		d->prev=NULL;
+		}
+	d->attached=true;
+
+/* GANESH added this */
+#ifdef PECR_SET_PARSIMONY_BRLEN
+    /* not a leaf any more once we add descendants */
+    leaf_mask = false;
+#endif
+	return d;
+}
+
+void TreeNode::RemoveDes(TreeNode *d){
+	//leaves blens as-is
+	assert(d->anc == this);
+	//remove d from this
+	if(d->prev != NULL) d->prev->next=d->next;
+	if(d->next != NULL) d->next->prev=d->prev;
+	if(d == left)
+		left=d->next;
+	else if(d == right)
+		right=d->prev;
+
+	d->next = d->prev = NULL;
+	d->anc=NULL;
+	}
+
+void TreeNode::MoveDesToAnc(TreeNode *d){
+	//this assumes that the anc is currently NULL,
+	//and makes the specified des the new anc.
+	//*this is added as a des of that anc
+	//the blen of the des is trasfered to this
+	assert(anc == NULL);
+	dlen = d->dlen;
+	d->dlen=-1;
+	RemoveDes(d);
+
+	//now add this to d
+	d->AddDes(this);
+	}
+
+char *TreeNode::MakeNewick(char *s, bool internalNodes, bool branchLengths, bool highPrec /*=false*/) const{
+
+	if(left){
+		if(internalNodes==true && nodeNum!=0){
+			sprintf(s, "%d", nodeNum);
+			while(*s)s++;
+			}
+		*s++='(';
+		s=left->MakeNewick(s, internalNodes, branchLengths, highPrec);
+		if(anc){
+			if(branchLengths==true){
+				*s++=':';
+				if(highPrec == false)
+					sprintf(s, "%.8lf", dlen);
+				else sprintf(s, "%.10lf", dlen);
+				while(*s)s++;
+				}
+			}
+		else
+			{*s='\0';
+			return s;
+			}
+		}
+	else {
+		sprintf(s, "%d", nodeNum);
+		while(*s)s++;
+		if(branchLengths==true){
+			*s++=':';
+			if(highPrec == false)
+				sprintf(s, "%.8lf", dlen);
+			else sprintf(s, "%.10lf", dlen);
+			while(*s)s++;
+			}
+		}
+		
+	if(next){
+		*s++=',';
+		s=next->MakeNewick(s, internalNodes, branchLengths, highPrec);
+		}
+	else {
+		if(anc){
+			*s++=')';
+			}
+		}
+	return s;
+	}
+
+void TreeNode::MakeNewick(string &outStr, const DataPartition *data, bool internalNodes, bool branchLengths, bool taxonNames /*=false*/, bool highPrec /*=false*/) const{
+	char s[500];
+	if(left){
+		if(internalNodes==true && nodeNum!=0){
+			sprintf(s, "%d", nodeNum);
+			outStr += s;
+			}
+		outStr += '(';
+		left->MakeNewick(outStr, data, internalNodes, branchLengths, taxonNames, highPrec);
+		if(anc){
+			if(branchLengths==true){
+				outStr += ':';
+				if(highPrec == false){
+					sprintf(s, "%.8lf", dlen);
+					outStr += s;
+					}
+				else{
+					sprintf(s, "%.10lf", dlen);
+					outStr += s;
+					}
+				}
+			}
+		else
+			return;
+		}
+	else {
+		//sprintf(s, "%d", nodeNum);
+		//outStr += s;
+		if(taxonNames && data)
+			outStr += data->TaxonLabel(nodeNum - 1);
+		else{
+			sprintf(s, "%d", nodeNum);
+			outStr += s;
+			}
+		if(branchLengths==true){
+			outStr += ':';
+			if(highPrec == false)
+				sprintf(s, "%.8lf", dlen);
+			else 
+				sprintf(s, "%.10lf", dlen);
+			outStr += s;
+			}
+		}
+		
+	if(next){
+		outStr += ',';
+		next->MakeNewick(outStr, data, internalNodes, branchLengths, taxonNames, highPrec);
+		}
+	else {
+		if(anc){
+			outStr += ')';
+			}
+		}
+	}
+
+void TreeNode::MakeNewickForSubtree(char *s) const{
+	assert(left);
+	*s++='(';
+	s=left->MakeNewick(s, false, false);
+	*s++=';';
+	*s++='\0';
+	}
+
+void TreeNode::MakeNewickForSubtree(string &s, const DataPartition *data, bool internalNodes, bool branchLengths, bool taxonNames, bool highPrec) const{
+	assert(left);
+	s += '(';
+	left->MakeNewick(s, data, internalNodes, branchLengths, taxonNames, highPrec);
+	//s += ';';
+	}
+
+//MTH
+void TreeNode::Prune()
+{	//DZ 7-6 removing adjustments to branch lengths when pruning, which just result in adding a whole bunch of length
+	//to the whole tree, making the dlens get longer and longer and longer as the run progresses
+	assert(anc);//never call with this=root
+	attached=false;
+	if(anc->anc)
+		{//not connected to the root
+		if(anc->left->next==anc->right)
+			{TreeNode *sis;
+			if(anc->left==this)
+				sis=anc->right;
+			else
+				sis=anc->left;
+//			sis->dlen+=anc->dlen;
+			anc->SubstituteNodeWithRespectToAnc(sis);
+			anc->attached=false;
+			}
+		else
+			{
+			anc=anc;
+			assert(0);//internal polytomy
+			}
+		}
+	else
+		{
+		//these assume a trifurcating root
+		if(anc->left==this){
+			anc->left=next;
+			anc->left->prev=NULL;
+			anc->left->next=anc->right;
+			}
+		else
+			if(anc->right==this){
+				anc->right=prev;
+				anc->right->next=NULL;
+				anc->left->next=anc->right;
+				}
+			else 
+				{assert(anc->left==prev && anc->right==next);
+		next->prev=prev;
+		prev->next=next;
+		assert(anc->left &&  anc->right);
+		TreeNode *temp;
+				if(anc->left->left){
+					//anc->right->dlen+=anc->left->dlen;
+			temp=anc->left;
+			temp->SubstituteNodeWithRespectToAnc(temp->left);
+			anc->AddDes(temp->right);
+			temp->attached=false;
+			}
+		else
+					if(anc->right->left){
+						//anc->left->dlen+=anc->right->dlen;
+				temp=anc->right;
+				temp->SubstituteNodeWithRespectToAnc(temp->left);
+				anc->AddDes(temp->right);
+				temp->attached=false;
+						}
+				}
+		
+		}
+}
+
+//MTH	
+void TreeNode::SubstituteNodeWithRespectToAnc(TreeNode *subs)//note THIS DOESN't do anything with numBranchesAdded or any other tree fields that describe the tree
+{		//this function moves subs into the place in the tree that had been occupied by this
+		// it is called in swapping and addRandomNode and can't be called with the root as this
+		//  Nothing is done with branch lengths OR LEFT OR RIGHT (this and subs still keep their descendants)
+		subs->anc=anc;
+		subs->prev=prev;
+		subs->next=next;
+		assert(anc);
+		if(anc->left==this)
+			anc->left=subs;
+		if(anc->right==this)
+			anc->right=subs;
+		if(next)
+			next->prev=subs;
+		if(prev)
+			prev->next=subs;
+		subs->attached=true;
+		attached=false;
+		next=prev=anc=NULL;
+}
+
+int TreeNode::CountBranches(int s){
+	if(left)
+		left->CountBranches(++s);
+	if(nodeNum==0)
+		left->next->CountBranches(++s);
+	if(right)
+		right->CountBranches(++s);
+	return s;
+}
+
+int TreeNode::CountTerminals(int s){
+	if(left)
+		s=left->CountTerminals(s);
+	else s++;
+	if(nodeNum==0)
+		s=left->next->CountTerminals(s);
+	if(right)
+		s=right->CountTerminals(s);
+	return s;
+}
+
+int TreeNode::CountTerminalsDown(int s, TreeNode *calledFrom){
+	TreeNode *sib;
+	
+	if(nodeNum!=0){		
+		if(left==calledFrom) sib=right;
+		else sib=left;
+
+		if(sib)
+			s=sib->CountTerminals(s);
+		else s++;
+
+		s=anc->CountTerminalsDown(s, this);
+		}
+	else {
+		if(left!=calledFrom) s=left->CountTerminals(s);
+		if(left->next!=calledFrom) s=left->next->CountTerminals(s);
+		if(right!=calledFrom) s=right->CountTerminals(s);
+		}
+	return s;
+}
+
+void TreeNode::CountSubtreeBranchesAndDepth(int &branches, int &sum, int depth, bool first) const{
+//this is the version to use if you want to be
+//sure not to jump to another subtree (ie, don't 
+//go ->next from the calling node)
+
+	if(left){
+		sum+=depth;
+		left->CountSubtreeBranchesAndDepth(++branches, sum, depth+1, false);
+		}
+	if(next&&!first){
+		sum+=depth-1;
+		next->CountSubtreeBranchesAndDepth(++branches, sum, depth, false);
+		}
+}
+	
+void TreeNode::CalcDepth(int &dep){
+	dep++;
+	int l=0, r=0;
+	if(left){
+		left->CalcDepth(l);
+		}
+	if(right){
+		right->CalcDepth(r);
+		}
+	dep += (r > l ? r : l);
+	}
+
+void TreeNode::MarkTerminals(int *taxtags){
+	if(left)
+		left->MarkTerminals(taxtags);
+	else
+		taxtags[nodeNum]=1;
+	if(next)
+		next->MarkTerminals(taxtags);
+}
+
+void TreeNode::MarkUnattached(bool includenode){
+	attached=false;
+	if(left)
+		left->MarkUnattached(false);
+	if(next&&includenode==false)
+		next->MarkUnattached(false);	
+	}
+	
+TreeNode* TreeNode::FindNode( int &n, TreeNode *tempno){		
+	//my version DZ.  It returns nodeNum n
+	if(left&&tempno!=NULL){
+		tempno=left->FindNode(n, tempno);
+		}
+	if(next&&tempno!=NULL){
+		tempno=left->FindNode(n, tempno);
+		}
+	if(nodeNum==n){
+		tempno=this;
+		}			
+	return tempno;
+	}
+	
+//MTH
+TreeNode* TreeNode::FindNode( int &n){
+		//note that this function does NOT look for the node with nodeNum n, but rather
+		//counts nodes and returns the nth one that it finds
+		n--;
+		if(n<0)
+			return this;
+		if(left)
+			{TreeNode* tempno;
+			tempno=left->FindNode(n);
+			if(tempno)
+				return tempno;
+			}
+		if(next)
+			return next->FindNode(n);
+		return NULL;
+}
+
+bool TreeNode::IsGood()
+{	if(attached || !anc)
+		{if(!left && right)
+			return false;
+		if(!anc)
+			{if(nodeNum!=0 || next || prev)
+				return false;
+			}
+		else
+			{TreeNode *tempno;
+			tempno=anc->left;
+			bool found=false;
+			int nsibs=0;
+			while(tempno)
+				{if(tempno->anc!=anc)
+					return false;
+				if(tempno==this)
+					found=true;
+				tempno=tempno->next;
+				nsibs++;
+				if(nsibs>3)
+					return false;
+				}
+			if(!found)
+				return false;
+			}
+		if(left){
+			
+			if(!left->IsGood())
+				return false;
+			}
+		if(next)
+			return next->IsGood();
+		return true;
+		}
+	else
+		return false;
+}
+
+void TreeNode::CountNumberofNodes(int &nnodes){
+	if(left!=NULL){
+		left->CountNumberofNodes(nnodes);
+		}
+	if(next!=NULL){
+		next->CountNumberofNodes(nnodes);
+		}
+	nnodes++;
+	
+	}
+	
+void TreeNode::CheckforLeftandRight(){
+	if(left!=NULL){
+		left->CheckforLeftandRight();
+		}
+	
+	if(next!=NULL){
+		next->CheckforLeftandRight();
+		}
+	
+	if((left&&!right)||(right&&!left)){
+		throw ErrorException("There appears to be a problem with a tree specification string.\n\tCheck for extra parentheses.");
+		}
+	}
+	
+void TreeNode::FindCrazyLongBranches(){
+	if(left!=NULL){
+		left->FindCrazyLongBranches();
+		}
+	
+	if(next!=NULL){
+		next->FindCrazyLongBranches();
+		}
+	if(dlen>1.0){
+		outman.UserMessage("WTF?");
+		}
+	}
+			
+void TreeNode::FindCrazyShortBranches(){
+	if(left!=NULL){
+		left->FindCrazyShortBranches();
+		}
+	
+	if(next!=NULL){
+		next->FindCrazyShortBranches();
+}
+	if(anc&&dlen<.0001){
+		outman.UserMessage("WTF?");
+		}
+	}
+		
+void TreeNode::CheckTreeFormation()	{
+#ifndef NDEBUG
+	//make sure that nodes that this node points to also point back (ie this->ldes->anc=this)
+	if(left){
+		assert(left->anc==this);
+		left->CheckTreeFormation();
+		}
+	if(right){
+		assert(right->anc==this);
+		}
+	if(next){
+		assert(next->prev==this);
+		next->CheckTreeFormation();
+		}
+	if(prev){
+		assert(prev->next==this);
+		}
+	assert(!anc||dlen>0.0);
+#endif
+	}
+
+void TreeNode::CheckforPolytomies(){
+	
+	if(IsInternal()){
+		left->CheckforPolytomies();
+		}
+
+	if(next!=NULL){
+		next->CheckforPolytomies();
+		}
+		
+	if(anc!=NULL){
+		if(left!=NULL){
+			if(left->next!=right){
+				//polytomous tree should have been dealt with earlier.
+				throw ErrorException("Input tree has polytomies!!");
+				}
+			}
+		}
+	}
+
+void TreeNode::OutputNodeConnections(){
+	TreeNode *nd;
+	if(IsInternal()){
+		cout << nodeNum << "\t";
+		nd = left;
+		while(nd){
+			cout << nd->nodeNum << "\t";
+			nd = nd->next;
+			}
+		cout << dlen << "\t" << endl;
+		nd = left;
+		while(nd){
+			nd->OutputNodeConnections();
+			nd = nd->next;
+			}
+		}
+	else{
+		cout << nodeNum << "\t" << dlen << endl;
+		}
+	}
+
+Bipartition* TreeNode::VerifyBipartition(bool standardize){	
+	Bipartition before = *bipart;
+	if(IsInternal()){//not terminal
+		TreeNode *nd=left;
+		*bipart = nd->CalcBipartition(standardize);
+		//the standardization needs to happen AFTER the child unstandardized bipart is used here
+		if(standardize)
+			nd->bipart->Standardize();
+		nd=nd->next;
+		do{
+			*bipart += nd->CalcBipartition(standardize);
+			//the standardization needs to happen AFTER the child unstandardized bipart is used here
+			if(standardize)
+				nd->bipart->Standardize();
+			nd=nd->next;
+			}while(nd != NULL);
+		assert(bipart->EqualsEquals(before));
+		return bipart;
+		}
+	else if(IsNotRoot()){//terminal
+		bipart=bipart->TerminalBipart(nodeNum);	
+		return bipart;
+		}
+	return NULL;
+	}
+
+Bipartition* TreeNode::CalcBipartition(bool standardize){	
+	if(IsInternal()){//not terminal
+		TreeNode *nd=left;
+		*bipart = nd->CalcBipartition(standardize);
+		//the standardization needs to happen AFTER the child unstandardized bipart is used here
+		if(standardize)
+			nd->bipart->Standardize();
+		nd=nd->next;
+		do{
+			*bipart += nd->CalcBipartition(standardize);
+			//the standardization needs to happen AFTER the child unstandardized bipart is used here
+			if(standardize)
+				nd->bipart->Standardize();
+			nd=nd->next;
+			}while(nd != NULL);
+		return bipart;
+		}
+	else if(IsNotRoot()){//terminal
+		bipart=bipart->TerminalBipart(nodeNum);	
+		return bipart;
+		}
+	return NULL;
+	}
+
+void TreeNode::StandardizeBipartition(){
+	if(IsInternal()){//not terminal
+		TreeNode *nd=left;
+		do{
+			nd->StandardizeBipartition();
+			nd=nd->next;
+			}while(nd != NULL);
+		}
+	bipart->Standardize();
+	}
+
+void TreeNode::GatherConstrainedBiparitions(vector<Bipartition> &biparts) {
+	if(IsInternal()){
+		TreeNode *nd=left;
+		do{
+			nd->GatherConstrainedBiparitions(biparts);
+			nd=nd->next;
+			}while(nd != NULL);
+		if(IsNotRoot()){
+			Bipartition b(*bipart);
+			biparts.push_back(b);
+			}
+		}
+	}
+
+void TreeNode::OutputBipartition(ostream &out){	
+	if(left&&anc){
+		left->OutputBipartition(out);
+		left->next->OutputBipartition(out);
+		out << bipart->Output() << endl;
+		}
+	else if(!anc){
+		left->OutputBipartition(out);
+		left->next->OutputBipartition(out);
+		left->next->next->OutputBipartition(out);
+		}
+	}
+
+void TreeNode::RotateDescendents(){
+	//don't call this with the root!
+	assert(anc);
+	TreeNode* tmp=right;
+	right=left;
+	left=tmp;
+	left->prev=NULL;	
+	left->next=right;
+	right->next=NULL;
+	}
+
+void TreeNode::AddNodesToList(vector<int> &list){
+	list.push_back(nodeNum);
+	if(IsInternal()) left->AddNodesToList(list);
+	if(next!=NULL) next->AddNodesToList(list);
+	}
+	
+void TreeNode::FlipBlensToRoot(TreeNode *from){
+	if(anc!=NULL) anc->FlipBlensToRoot(this);
+	if(from==NULL) dlen=-1;
+	else dlen=from->dlen;
+	}
+
+void TreeNode::FlipBlensToNode(TreeNode *from, TreeNode *stopNode){
+	//for rerooting a subtree
+	//each node gets the get blen of the previous node (one of
+	//its des)
+	assert(IsNotRoot());
+	assert(from != NULL);
+	assert(stopNode != NULL);
+	if(anc != stopNode) 
+		anc->FlipBlensToNode(this, stopNode);
+	else dlen=from->dlen;
+	}
+
+void TreeNode::PrintSubtreeMembers(ofstream &out){
+	if(IsTerminal()) out << nodeNum << "\t"; 
+	else left->PrintSubtreeMembers(out);
+	if(next!=NULL) next->PrintSubtreeMembers(out);
+	}
+	
+void TreeNode::AdjustClasForReroot(int dir){
+	//11/19/07 this was really, really dumb!  CLA's were 
+	//being reoriented even when more than one tree 
+	//was pointing to them.  There isn't an easy way
+	//of checking the number of users of a cla from here
+	//so just deprecating this function for now.
+	assert(0);
+
+	int tmp=claIndexDown;
+	if(dir==2){//the ancestor and left des have been swapped
+		claIndexDown=claIndexUL;
+		claIndexUL=tmp;
+		}
+	else if(dir==3){//the ancestor and right des have been swapped
+		claIndexDown=claIndexUR;
+		claIndexUR=tmp;		
+		}
+	else assert(0);
+	}	
+
+void TreeNode::RecursivelyAddOrRemoveSubtreeFromBipartitions(const Bipartition &subtree){
+	//this function just tricks nodes down to the root into thinking
+	//that a taxon is in their subtree by flipping its bit in the bipartition
+	//this obviously needs to be undone by calcing the biparts if the true
+	//tree bipartitions are needed
+	bipart->FlipBits(subtree);
+	if(anc->IsNotRoot()) anc->RecursivelyAddOrRemoveSubtreeFromBipartitions(subtree);
+	}
+
+//unsigned MATCH_II=0, MATCH_TT=0, MATCH_IT=0, TOT_II=0, TOT_IT=0, TOT_TT=0;
+/*
+void TreeNode::SetEquivalentConditionalVectors(const SequenceData *data){
+	if(nodeNum == 0){
+		if(left->IsInternal()) left->SetEquivalentConditionalVectors(data);
+		if(left->next->IsInternal()) left->next->SetEquivalentConditionalVectors(data);
+		if(right->IsInternal()) right->SetEquivalentConditionalVectors(data);
+		return;
+		}
+
+	if(left->IsTerminal() && right->IsTerminal()){
+		unsigned char *leftSeq = data->GetRow(left->nodeNum-1);
+		unsigned char *rightSeq = data->GetRow(right->nodeNum-1);
+		char lastLeft, lastRight;
+		lastLeft = leftSeq[0];
+		lastRight = rightSeq[0];
+		tipData[0] = 0;
+		for(int i=1;i<data->NChar();i++){
+			bool match=true;
+			if(leftSeq[i] != lastLeft){
+				lastLeft = leftSeq[i];
+				match=false;
+				}
+			if(rightSeq[i] != lastRight){
+				lastRight = rightSeq[i];
+				match=false;
+				}
+//			MATCH_TT += match;
+//			TOT_TT++;
+			tipData[i] = match;
+			}
+		}
+	else if(left->IsInternal() && right->IsInternal()){
+		left->SetEquivalentConditionalVectors(data);
+		right->SetEquivalentConditionalVectors(data);
+		for(int i=0;i<data->NChar();i++){
+			tipData[i] = left->tipData[i] && right->tipData[i];
+//			MATCH_II += tipData[i];
+//			TOT_II++;
+			}
+		}
+	else if(left->IsTerminal()){
+		right->SetEquivalentConditionalVectors(data);
+		unsigned char *leftSeq = data->GetRow(left->nodeNum-1);
+		char lastLeft;
+		lastLeft = leftSeq[0];
+		tipData[0] = 0;
+		for(int i=1;i<data->NChar();i++){
+			bool match=true;
+			if(leftSeq[i] != lastLeft){
+				lastLeft = leftSeq[i];
+				match=false;
+				}
+//			MATCH_IT += right->tipData[i] && match;
+//			TOT_IT++;
+			tipData[i] = right->tipData[i] && match;
+			}
+		}
+	else {
+		left->SetEquivalentConditionalVectors(data);
+		unsigned char *rightSeq = data->GetRow(right->nodeNum-1);
+		char lastRight;
+		lastRight = rightSeq[0];
+		tipData[0] = 0;
+		for(int i=1;i<data->NChar();i++){
+			bool match=true;
+			if(rightSeq[i] != lastRight){
+				lastRight = rightSeq[i];
+				match=false;
+				}
+//			MATCH_IT += right->tipData[i] && match;
+//			TOT_IT++;
+			tipData[i] = left->tipData[i] && match;
+			}
+		}
+	}
+*/
+ /*
+void TreeNode::OutputBinaryNodeInfo(ofstream &out) const{
+	int zero = 0;
+
+	if(this->IsInternal()){
+		out.write((char*) &(left->nodeNum), sizeof(int));
+		out.write((char*) &(right->nodeNum), sizeof(int));
+		}
+	if(prev == NULL) out.write((char*) &zero, sizeof(int));
+	else out.write((char*) &(prev->nodeNum), sizeof(int));
+
+	if(next == NULL) out.write((char*) &zero, sizeof(int));
+	else out.write((char*) &(next->nodeNum), sizeof(int));
+	
+	if(anc == NULL) out.write((char*) &zero, sizeof(int));
+	else out.write((char*) &(anc->nodeNum), sizeof(int));
+	
+	out.write((char*) &dlen, sizeof(FLOAT_TYPE));
+	}
+*/
+
+void TreeNode::OutputBinaryNodeInfo(OUTPUT_CLASS &out) const{
+	int zero = 0;
+
+	if(this->IsInternal()){
+		out.WRITE_TO_FILE(&(left->nodeNum), sizeof(int), 1);
+		out.WRITE_TO_FILE(&(right->nodeNum), sizeof(int), 1);
+		}
+	if(prev == NULL) out.WRITE_TO_FILE(&zero, sizeof(int), 1);
+	else out.WRITE_TO_FILE(&(prev->nodeNum), sizeof(int), 1);
+
+	if(next == NULL) out.WRITE_TO_FILE(&zero, sizeof(int), 1);
+	else out.WRITE_TO_FILE(&(next->nodeNum), sizeof(int), 1);
+	
+	if(anc == NULL) out.WRITE_TO_FILE(&zero, sizeof(int), 1);
+	else out.WRITE_TO_FILE(&(anc->nodeNum), sizeof(int), 1);
+	
+	out.WRITE_TO_FILE(&dlen, sizeof(FLOAT_TYPE), 1);
+	}
+
+void TreeNode::CollapseMinLengthBranches(int &num){
+	if(this->IsInternal()){
+		TreeNode *nd = left;
+		do{
+			if(FloatingPointEquals(nd->dlen, DEF_MIN_BRLEN, 2e-8) && nd->IsInternal()){
+				TreeNode *childNode = nd->left;
+				//Note that Prune requires that the subtree pruned is not part of a polytomy
+				//this means that the collapsing must start at the root and work upward.
+				//Also note that Prune automatically detatches the anc of the pruned subtree
+				//since it then only has one child.
+				childNode->Prune();
+				AddDes(childNode);
+				//this resets the node checking to the left des of the current node
+				//when a branch is removed.  This duplicates some effort but is safe. 
+				nd = left; 
+				num++;
+				}
+			else 
+				nd = nd->next;
+			}while(nd);
+		left->CollapseMinLengthBranches(num);
+		}
+	if(next) next->CollapseMinLengthBranches(num);
+	}
diff --git a/src/treenode.h b/src/treenode.h
new file mode 100644
index 0000000..c5880ed
--- /dev/null
+++ b/src/treenode.h
@@ -0,0 +1,153 @@
+// GARLI version 2.1 source code
+// Copyright 2005-2014 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+//
+//	NOTE: Portions of this source adapted from GAML source, written by Paul O. Lewis
+
+
+#ifndef __TREE_NODE_H
+#define __TREE_NODE_H
+#include <iostream>
+#include <vector>
+#include <cassert>
+using namespace std;
+
+#include "condlike.h"
+#include "clamanager.h"
+#include "bipartition.h"
+
+class NucleotideData;
+class MFILE;
+
+class TreeNode{
+	public:
+		TreeNode* left,* right,* next,* prev,* anc;
+ 		int nodeNum;
+ 		int claIndexDown;
+ 		int claIndexUL;
+ 		int claIndexUR;
+ 		FLOAT_TYPE dlen;
+		bool attached;
+		bool alreadyOptimized;
+		Bipartition *bipart;
+		vector<char *> tipData;
+#ifdef OPEN_MP
+		//unsigned *ambigMap;
+		vector<unsigned *> ambigMap;
+#endif
+
+		TreeNode( const int i = -1 );
+		~TreeNode();
+		
+		//functions for manipulating nodes within a tree
+		TreeNode * AddDes(TreeNode *);//returns argument
+		void RemoveDes(TreeNode *d);
+		void MoveDesToAnc(TreeNode *d);
+		void SubstituteNodeWithRespectToAnc(TreeNode *subs);
+		int CountBranches(int s);
+		int CountTerminals(int s);
+		int CountTerminalsDown(int s, TreeNode *calledFrom);
+		void CountSubtreeBranchesAndDepth(int &branches, int &sum, int depth, bool first) const;
+		void MarkTerminals(int *taxtags);
+		void Prune();
+        TreeNode* FindNode( int &n);
+        TreeNode* FindNode( int &n,TreeNode *tempno);
+		void CountNumberofNodes(int &nnodes);
+		void MarkUnattached(bool includenode);
+		void RotateDescendents();
+		void AdjustClasForReroot(int dir);
+		void AddNodesToList(vector<int> &list);
+		void FlipBlensToRoot(TreeNode *from);
+		void FlipBlensToNode(TreeNode *from, TreeNode *stopNode);
+		void RecursivelyAddOrRemoveSubtreeFromBipartitions(const Bipartition &subtree);
+		void CollapseMinLengthBranches(int &);
+		//misc functions
+		char *MakeNewick(char *s, bool internalNodes, bool branchLengths, bool highPrec=false) const;
+		void MakeNewick(string &outStr, const DataPartition *data, bool internalNodes, bool branchLengths, bool taxonNames = false, bool highPrec = false) const;
+		void MakeNewickForSubtree(char *s) const;
+		void MakeNewickForSubtree(string &s, const DataPartition *data, bool internalNodes, bool branchLengths, bool taxonNames = false, bool highPrec = false) const;
+		bool IsGood();
+		bool IsTerminal() const{
+			return left == NULL;
+			}
+		bool IsInternal() const{
+			return left != NULL;
+			}
+		bool IsRoot() const{
+			return anc==NULL;
+			}
+		bool IsNotRoot() const{
+			return anc!=NULL;
+			}
+		void CalcDepth(int &dep);
+		void CopyOneClaIndex(const TreeNode *from, ClaManager *claMan, int dir);
+		Bipartition* CalcBipartition(bool standardize);
+		Bipartition* VerifyBipartition(bool standardize);
+		void StandardizeBipartition();
+		void GatherConstrainedBiparitions(vector<Bipartition> &biparts);
+		void OutputBipartition(ostream &out);
+		void PrintSubtreeMembers(ofstream &out);
+		void SetUnoptimized(){
+			alreadyOptimized=false;
+			if(left) left->SetUnoptimized();
+			if(right) right->SetUnoptimized();
+			}
+		void SetEquivalentConditionalVectors(const SequenceData *data);
+		void OutputBinaryNodeInfo(OUTPUT_CLASS &out) const;
+		     
+		//debugging functions for checking tree formation
+		void CheckforPolytomies();
+		void CheckforLeftandRight();
+		void FindCrazyLongBranches();
+		void FindCrazyShortBranches();
+		void CheckTreeFormation();
+		void OutputNodeConnections();
+};
+
+inline void TreeNode::CopyOneClaIndex(const TreeNode *from, ClaManager *claMan, int dir){
+
+	const int *indexF;
+	int *indexT;
+	if(dir==1){
+		indexF=&from->claIndexDown;
+		indexT=&claIndexDown;
+		}
+	else if(dir==2){
+		indexF=&from->claIndexUL;
+		indexT=&claIndexUL;
+		}
+	else if(dir==3){
+		indexF=&from->claIndexUR;
+		indexT=&claIndexUR;
+		}
+	else assert(0);
+	
+	claMan->DecrementCla(*indexT);
+	claMan->IncrementCla(*indexF);
+	*indexT=*indexF;
+	}
+
+
+
+#endif
+
+
+
+
+
+
+
+
diff --git a/src/utility.h b/src/utility.h
new file mode 100644
index 0000000..f4593c1
--- /dev/null
+++ b/src/utility.h
@@ -0,0 +1,323 @@
+// GARLI version 2.0 source code
+// Copyright 2005-2011 Derrick J. Zwickl
+// email: garli.support at gmail.com
+//
+//  This program is free software: you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation, either version 3 of the License, or
+//  (at your option) any later version.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU General Public License
+//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#ifndef GAML_UTIL_HPP
+#define GAML_UTIL_HPP
+//some code from Mark Holder for allocating flattened matrices, and other misc stuff
+
+#include <stdlib.h>
+#include <cassert>
+#include <ostream>
+#include <iostream>
+#include <iomanip>
+
+#ifdef _MSC_VER
+#include <windows.h>
+#else
+#include <sys/time.h>
+#endif
+
+using namespace std;
+
+#include "errorexception.h"
+
+#define DBL_ALIGN 32
+
+template<typename T> T ***New3DArray(unsigned f , unsigned s , unsigned t);
+template<typename T> T **New2DArray(unsigned f , unsigned s);
+template<typename T> void Delete3DArray	(T ***temp);
+template<typename T> void Delete2DArray	(T **temp);
+
+//aligned versions
+template<typename T> T ***New3DAlignedArray(unsigned f , unsigned s , unsigned t, unsigned a);
+template<typename T> T **New2DAlignedArray(unsigned f , unsigned s, unsigned a);
+template<typename T> void Delete3DAlignedArray	(T ***temp);
+template<typename T> void Delete2DAlignedArray	(T **temp);
+
+template<typename T> T *NewAlignedArray(unsigned len, unsigned align ){
+#ifdef _MSC_VER
+	return (T*) _aligned_malloc(sizeof(T)*len, align);
+#endif
+}
+
+template<typename T> void DeleteAlignedArray(T *a){
+#ifdef _MSC_VER
+	_aligned_free(a);
+#endif
+}
+
+/*--------------------------------------------------------------------------------------------------------------------------
+| Allocates a three dimensional array of FLOAT_TYPEs as one contiguous block of memory
+| the dimensions are f two dimensional arrays that are s by t.  
+| the array is set up so that 
+| for(i = 0 ; i < f ; i++)
+|	for (j = 0 ; j < s ; j++)
+|		for (k = 0 ; k < t; k++)
+|			array[i][j][k];
+| would be the same order of access as: 
+| 
+|	T *temp = **array;
+|	for (i = 0 ; i < f*s*t ; i++)
+|		{
+|		*temp++;
+|		}
+*/
+template<typename T> T ***New3DArray(unsigned f , unsigned s , unsigned t)
+	{
+	assert(f > 0 && s > 0 && t> 0);
+	T ***temp;
+	try{
+		temp = new T **[f];
+		*temp = new T *[f * s];
+		**temp = new T[f * s * t];
+		for (unsigned sIt = 1 ; sIt < s ; sIt++)
+			temp[0][sIt] = temp[0][sIt-1] + t ;
+		for (unsigned fIt = 1 ; fIt < f ; fIt ++)
+			{
+			temp[fIt] = temp[fIt -1] +  s ;
+			temp[fIt][0] = temp[fIt -1][0] + (s*t);
+			for (unsigned sIt = 1 ; sIt < s ; sIt++)
+				temp[fIt][sIt] = temp[fIt][sIt-1] + t ;
+			}
+		}
+	catch(std::bad_alloc){
+		throw ErrorException("Problem allocating 3D array (%d X %d X %d = %.2f MB). Out of mem?", f, s, t, (f * s * t * sizeof(T)) / (1024.0 * 1024.0));
+		}
+	return temp;
+	}
+
+/*--------------------------------------------------------------------------------------------------------------------------
+| Delete a Three Dimensional Array that has been allocated using New3DArray
+*/
+template<typename T> void Delete3DArray	(T ***temp)
+	{
+	assert(temp); //these asserts aren't necessary, but right now I can't think of a case in which they'd fail other than following an allocation error
+	assert(*temp);
+	assert(**temp);
+	if (temp)
+		{
+		if (*temp)
+			{
+			if (**temp)
+				delete [] **temp;
+			delete [] * temp;
+			}
+		delete [] temp;
+		}
+	
+	}
+
+/*--------------------------------------------------------------------------------------------------------------------------
+| 	Allocates a two dimensional array of FLOAT_TYPEs as one contiguous block of memory
+| 	the dimensions are f by s.  
+| 	the array is set up so that 
+| 	
+|	for(i = 0 ; i < f ; i++)
+|		for (j = 0 ; j < s ; j++)
+|			array[i][j];
+| 	
+|	would be the same order of access as: 
+| 
+|  	T *temp = **array;
+|	for (i = 0 ; i < f*s*t ; i++)
+|		*temp++;
+*/
+template<typename T> T **New2DArray(unsigned f , unsigned s)
+	{
+	assert(f > 0 && s > 0);
+	T **temp;
+	try{
+		temp = new T *[f];
+		*temp = new T [f * s];
+		for (unsigned fIt = 1 ; fIt < f ; fIt ++)
+			temp[fIt] = temp[fIt -1] +  s ;
+		}
+	catch(std::bad_alloc){
+		throw ErrorException("Problem allocating 2D array (%d X %d = %.2f MB). Out of mem?", f, s, (f * s * sizeof(T)) / (1024.0 * 1024.0));
+		}
+	return temp;
+	}
+
+/*--------------------------------------------------------------------------------------------------------------------------
+| Delete a 2 Dimensional Array New2DArray
+*/
+template<typename T> inline void Delete2DArray	(T **temp)
+	{
+	assert(temp); //these asserts aren't necessary, but right now I can't think of a case in which they'd fail other than following an allocation error
+	assert(*temp);
+	if (temp)
+		{
+		if (*temp)
+			delete [] * temp;
+		delete [] temp;
+		}
+	}
+
+//aligned version
+template<typename T> T ***New3DAlignedArray(unsigned f , unsigned s , unsigned t)
+	{
+	assert(f > 0 && s > 0 && t> 0);
+	T ***temp;
+	temp = new T **[f];
+	*temp = new T *[f * s];
+	**temp = new T[f * s * t];
+	**temp = NewAlignedArray<T>(f * s * t, DBL_ALIGN);
+	for (unsigned sIt = 1 ; sIt < s ; sIt++)
+		temp[0][sIt] = temp[0][sIt-1] + t ;
+	for (unsigned fIt = 1 ; fIt < f ; fIt ++)
+		{
+		temp[fIt] = temp[fIt -1] +  s ;
+		temp[fIt][0] = temp[fIt -1][0] + (s*t);
+		for (unsigned sIt = 1 ; sIt < s ; sIt++)
+			temp[fIt][sIt] = temp[fIt][sIt-1] + t ;
+		}
+	return temp;
+	}
+
+/*--------------------------------------------------------------------------------------------------------------------------
+| Delete a Three Dimensional Array that has been allocated using New3DArray
+*/
+template<typename T> void Delete3DAlignedArray	(T ***temp)
+	{
+	assert(temp); //these asserts aren't necessary, but right now I can't think of a case in which they'd fail other than following an allocation error
+	assert(*temp);
+	assert(**temp);
+	if (temp)
+		{
+		if (*temp)
+			{
+			if (**temp)
+				DeleteAlignedArray(**temp);
+			delete [] * temp;
+			}
+		delete [] temp;
+		}
+	
+	}
+
+template<typename T> T **New2DAlignedArray(unsigned f , unsigned s)
+	{
+	assert(f > 0 && s > 0);
+	T **temp;
+	temp = new T *[f];
+	*temp = NewAlignedArray<T>(f * s, DBL_ALIGN);
+	for (unsigned fIt = 1 ; fIt < f ; fIt ++)
+		temp[fIt] = temp[fIt -1] +  s ;
+	return temp;
+	}
+
+/*--------------------------------------------------------------------------------------------------------------------------
+| Delete a 2 Dimensional Array New2DArray
+*/
+template<typename T> inline void Delete2DAlignedArray	(T **temp)
+	{
+	assert(temp); //these asserts aren't necessary, but right now I can't think of a case in which they'd fail other than following an allocation error
+	assert(*temp);
+	if (temp)
+		{
+		if (*temp)
+			DeleteAlignedArray(*temp);
+		delete [] temp;
+		}
+	}
+
+
+
+class Profiler{
+#ifdef _MSC_VER
+	LONGLONG totalTics;
+	int numCalls;
+	string name;
+	bool inuse;
+	LARGE_INTEGER start;
+	LARGE_INTEGER end;
+	LARGE_INTEGER ticsPerSec;
+#else
+	unsigned totalTics;
+	int numCalls;
+	string name;
+	bool inuse;
+	timeval start;
+	timeval end;
+	struct timezone tz;
+	int ticsPerSec;
+#endif
+
+public:
+	Profiler(string n){
+		name = n;
+		totalTics = 0;
+		numCalls = 0;
+		inuse=false;
+#ifdef _MSC_VER
+		QueryPerformanceFrequency(&ticsPerSec);
+#else
+		ticsPerSec = 1000000;
+#endif
+		}
+	void Start(){
+#ifdef ENABLE_CUSTOM_PROFILER
+		if(inuse){
+			cout << "Error! Don't use this on recursive functions!" << endl;
+			exit(1);
+			}
+		inuse=true;
+		numCalls++;
+	#ifdef _MSC_VER
+		QueryPerformanceCounter(&start);
+	#else
+		gettimeofday(&start, &tz);
+	#endif
+#endif
+		}
+	void Stop(){
+#ifdef ENABLE_CUSTOM_PROFILER
+		if(!inuse){
+			cout << "Error! Profiler was not started!" << endl;
+			exit(1);
+			}
+	#ifdef _MSC_VER
+		QueryPerformanceCounter(&end);
+		totalTics += end.QuadPart - start.QuadPart;
+	#else
+		gettimeofday(&end, &tz);
+		totalTics += end.tv_usec - start.tv_usec  + (end.tv_sec - start.tv_sec)*1000000;
+		
+//		cout <<  end.tv_usec - start.tv_usec  + (end.tv_usec - start.tv_usec)*100000 << endl;
+	#endif
+		inuse=false;
+#endif
+		}
+	void Report(ostream &out, int progTime){
+#ifdef ENABLE_CUSTOM_PROFILER
+	#ifdef _MSC_VER
+		FLOAT_TYPE seconds = totalTics/(FLOAT_TYPE)ticsPerSec.QuadPart;
+	#else
+		FLOAT_TYPE seconds = totalTics/(FLOAT_TYPE)ticsPerSec;
+	#endif
+		out << setw( 10 ) << name.c_str() << "\t" << setw( 10 )<< numCalls << "\t";
+		out.precision(4);
+		out << setw( 10 ) << seconds << "\t" << setw( 10 ) << seconds/(FLOAT_TYPE)numCalls << "\t" << setw( 10 ) << seconds*100/(FLOAT_TYPE)progTime << endl;
+
+#endif
+		}
+	};
+
+#endif //
+
+
+
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..b8e8bee
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,3 @@
+
+check-local:
+	$(srcdir)/runtests.sh $(srcdir) $(top_builddir)/src/Garli$(EXEEXT) @NCL_BIN_DIR@/NEXUSvalidator
diff --git a/tests/check/a.G3.conf b/tests/check/a.G3.conf
new file mode 100644
index 0000000..d9604ba
--- /dev/null
+++ b/tests/check/a.G3.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/z.11x30.stop.nex
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = ch.a.G3
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 1
+writecheckpoints = 1
+restart = 0
+outgroup = 1-2
+outputsitelikelihoods = 0
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+ignorestopcodons = 1
+
+datatype = codon-aminoacid
+ratematrix = jones
+statefrequencies = empirical
+ratehetmodel = gamma
+numratecats = 3
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000
+stoptime = 5
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+
diff --git a/tests/check/a.G4.conf b/tests/check/a.G4.conf
new file mode 100755
index 0000000..8cbf58d
--- /dev/null
+++ b/tests/check/a.G4.conf
@@ -0,0 +1,67 @@
+[general]
+datafname = data/z.11x30.AA.fas
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = ch.a.G4
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 1
+writecheckpoints = 1
+restart = 0
+outgroup = 2
+outputsitelikelihoods = 1
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = aminoacid
+ratematrix = jones
+statefrequencies = empirical
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000
+stoptime = 5
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 1
+
diff --git a/tests/check/a.conf b/tests/check/a.conf
new file mode 100755
index 0000000..290cc80
--- /dev/null
+++ b/tests/check/a.conf
@@ -0,0 +1,66 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = ch.a
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 1
+writecheckpoints = 1
+restart = 0
+outgroup = 2
+outputsitelikelihoods = 1
+collapsebranches = 1
+searchreps = 1
+
+datatype = codon-aminoacid
+ratematrix = jones
+statefrequencies = empirical
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000
+stoptime = 5
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 1
+
diff --git a/tests/check/c.M3x2.conf b/tests/check/c.M3x2.conf
new file mode 100755
index 0000000..ea00cef
--- /dev/null
+++ b/tests/check/c.M3x2.conf
@@ -0,0 +1,67 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = ch.c.M3x2
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 10
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 1
+writecheckpoints = 1
+restart = 0
+outgroup = 1
+outputsitelikelihoods = 1
+collapsebranches = 1
+searchreps = 1
+
+datatype = codon
+geneticcode = standard
+ratematrix = 6rate
+statefrequencies = f3x4
+ratehetmodel = nonsynonymous
+numratecats = 2
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000
+stoptime = 10
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 1
+
diff --git a/tests/check/c.conf b/tests/check/c.conf
new file mode 100644
index 0000000..58f4c66
--- /dev/null
+++ b/tests/check/c.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = ch.c
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 10
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 1
+writecheckpoints = 1
+restart = 0
+outgroup = 1-2
+outputsitelikelihoods = 0
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = codon
+geneticcode = standard
+ratematrix = 6rate
+statefrequencies = f3x4
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000
+stoptime = 5
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+
diff --git a/tests/check/g.dnaBnoZ.conf b/tests/check/g.dnaBnoZ.conf
new file mode 100755
index 0000000..775fbac
--- /dev/null
+++ b/tests/check/g.dnaBnoZ.conf
@@ -0,0 +1,76 @@
+[general]
+datafname = data/dnaGap.8x1K.nex
+constraintfile = none
+streefname = data/dnaGap.8x1K.nex
+attachmentspertaxon = 50
+ofprefix = ch.g.dnaBnoZ
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 10000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 1
+restart = 0
+outgroup = 1
+subsetspecificrates = 1
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 2
+outputsitelikelihoods = 0
+
+
+[model1]
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[model2]
+datatype = binaryNotAllZeros
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 2
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/check/g.dnaMix.conf b/tests/check/g.dnaMix.conf
new file mode 100755
index 0000000..3df6ba3
--- /dev/null
+++ b/tests/check/g.dnaMix.conf
@@ -0,0 +1,76 @@
+[general]
+datafname = data/dnaGap.8x1K.nex
+constraintfile = none
+streefname = data/dnaGap.8x1K.nex
+attachmentspertaxon = 50
+ofprefix = ch.g.dnaMix
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 10000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 1
+restart = 0
+outgroup = 1
+subsetspecificrates = 0
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 2
+outputsitelikelihoods = 0
+
+
+[model1]
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[model2]
+datatype = gapmixturemodel
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 2
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/check/n.G3.conf b/tests/check/n.G3.conf
new file mode 100755
index 0000000..ad5c2eb
--- /dev/null
+++ b/tests/check/n.G3.conf
@@ -0,0 +1,66 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = ch.n.G3
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 200
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 10000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 1
+writecheckpoints = 1
+restart = 0
+outgroup = 1
+outputsitelikelihoods = 1
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 3
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 10000
+stoptime = 5
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 1
diff --git a/tests/check/n.G4.conf b/tests/check/n.G4.conf
new file mode 100644
index 0000000..9290701
--- /dev/null
+++ b/tests/check/n.G4.conf
@@ -0,0 +1,66 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = ch.n.G4
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 200
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 10000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 1
+writecheckpoints = 1
+restart = 0
+outgroup = 1
+outputsitelikelihoods = 0
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 10000
+stoptime = 5
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/check/n.conf b/tests/check/n.conf
new file mode 100755
index 0000000..4d67d24
--- /dev/null
+++ b/tests/check/n.conf
@@ -0,0 +1,66 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = ch.n
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 200
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 10000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 1
+writecheckpoints = 1
+restart = 0
+outgroup = 1
+outputsitelikelihoods = 1
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 10000
+stoptime = 5
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 1
diff --git a/tests/check/n.const.conf b/tests/check/n.const.conf
new file mode 100755
index 0000000..8d07dd6
--- /dev/null
+++ b/tests/check/n.const.conf
@@ -0,0 +1,66 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = data/z.pos.const.tre
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = ch.n.const
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 200
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 10000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 1
+writecheckpoints = 1
+restart = 0
+outgroup = 1
+outputsitelikelihoods = 1
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 10000
+stoptime = 5
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 1
diff --git a/tests/check/p.3diff.conf b/tests/check/p.3diff.conf
new file mode 100644
index 0000000..4d08191
--- /dev/null
+++ b/tests/check/p.3diff.conf
@@ -0,0 +1,83 @@
+[general]
+datafname = data/z.byPos.11x2178.nex
+constraintfile = none
+streefname = data/p.3diff.start
+attachmentspertaxon = 50
+ofprefix = ch.p.3diff
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 5000
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 1
+restart = 0
+usepatternmanager = 1
+searchreps = 1
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 1
+
+[model1]
+datatype = nucleotide
+ratematrix = ( 0 1 2 2 3 4 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = none
+
+[model2]
+datatype = nucleotide
+ratematrix = ( 0 1 2 1 0 3 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = none
+
+[model3]
+datatype = nucleotide
+ratematrix = ( 0 1 2 3 1 0 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000
+stoptime = 5
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 5
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/check/p.mk.ssr.conf b/tests/check/p.mk.ssr.conf
new file mode 100755
index 0000000..bcd37a7
--- /dev/null
+++ b/tests/check/p.mk.ssr.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = ch.p.mk.ssr
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 1
+restart = 0
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 1
+
+
+[model1]
+datatype = standard
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/check/p.mkO.ssr.conf b/tests/check/p.mkO.ssr.conf
new file mode 100755
index 0000000..8a2dc62
--- /dev/null
+++ b/tests/check/p.mkO.ssr.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = ch.p.mkO.ssr
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 1
+restart = 0
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 1
+
+
+[model1]
+datatype = standardordered
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/check/p.mkv.ssr.conf b/tests/check/p.mkv.ssr.conf
new file mode 100755
index 0000000..e407e3b
--- /dev/null
+++ b/tests/check/p.mkv.ssr.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = ch.p.mkv.ssr
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 1
+restart = 0
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 1
+
+
+[model1]
+datatype = standardvariable
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/check/p.mkvO.ssr.conf b/tests/check/p.mkvO.ssr.conf
new file mode 100755
index 0000000..c1e614a
--- /dev/null
+++ b/tests/check/p.mkvO.ssr.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = ch.p.mkvO.ssr
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 1
+restart = 0
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 1
+
+
+[model1]
+datatype = standardorderedvariable
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/const/n.neg.const.conf b/tests/const/n.neg.const.conf
new file mode 100644
index 0000000..14ad2d6
--- /dev/null
+++ b/tests/const/n.neg.const.conf
@@ -0,0 +1,64 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = data/z.neg.const.tre
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = con.n.neg.const
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 500
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+outputsitelikelihoods = 0
+collapsebranches = 1
+searchreps = 1
+
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/const/n.negBack.const.conf b/tests/const/n.negBack.const.conf
new file mode 100644
index 0000000..74675ca
--- /dev/null
+++ b/tests/const/n.negBack.const.conf
@@ -0,0 +1,64 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = data/z.negBack.const.tre
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = con.n.negBack.const
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 500
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1-3
+outputsitelikelihoods = 0
+collapsebranches = 1
+searchreps = 1
+
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/const/n.pos.const.conf b/tests/const/n.pos.const.conf
new file mode 100644
index 0000000..1f5abf9
--- /dev/null
+++ b/tests/const/n.pos.const.conf
@@ -0,0 +1,65 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = data/z.pos.const.tre
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = con.n.pos.const
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 500
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1-5
+outputsitelikelihoods = 0
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/const/n.posBack.const.conf b/tests/const/n.posBack.const.conf
new file mode 100644
index 0000000..1883a5e
--- /dev/null
+++ b/tests/const/n.posBack.const.conf
@@ -0,0 +1,65 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = data/z.posBack.const.tre
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = con.n.posBack.const
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 500
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1 2
+outputsitelikelihoods = 0
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/data/L.start b/tests/data/L.start
new file mode 100644
index 0000000..ce59636
--- /dev/null
+++ b/tests/data/L.start
@@ -0,0 +1,44 @@
+#NEXUS 
+
+Begin trees;  [Treefile saved Fri Aug 13 17:03:40 2010]
+[!
+>Data file = /home/zwickl/googleCodeRepo/branches/partitioning/tests/gettingScores/data/L2001.30x52.nex
+>
+>Processing TREES block from file "mkv.search.best.tre":
+>   Keeping: trees from file (replacing trees in memory)
+>   1 tree read from file
+]
+	Translate
+		1 Aphidius_rhopalosiphi,
+		2 Aphidius_ervi,
+		3 Diaeretiella_rapae,
+		4 Lysiplebus_confusus,
+		5 Pauesia_unilachni,
+		6 Pauesia_juniperorum,
+		7 Binodoxys_acalephae,
+		8 Trioxys_pallidus,
+		9 Monoctonus_pseudoplatani,
+		10 Praon_volucre,
+		11 Praon_abjectum,
+		12 Pseudopraon_mindariphagum,
+		13 Dyscritulus_planiceps,
+		14 Ephedrus_plagiator,
+		15 Ephedrus_californicus,
+		16 Sathon_falcatus,
+		17 Chelonus_sp.,
+		18 Cenocoelius_analis,
+		19 Eubazus_semirugosus,
+		20 Acampsis_alternipes,
+		21 Alysia_lucicola,
+		22 Aleiodes_coxalis,
+		23 Heterospilus_prosopidis,
+		24 Hecabolus_sp.,
+		25 Bracon_sp.,
+		26 Colastes_incertus,
+		27 Rhyssalus_sp.,
+		28 Histeromerus_mystacinus,
+		29 Xorides_praecatorius,
+		30 Alomyia_debellator
+		;
+tree PAUP_1 = [&U] (1,(2,(3,(4,((5,((7,8),(9,(((((10,13),11),12),(((16,17),((18,19),20)),(21,((((22,25),((27,28),(29,30))),(23,24)),26)))),(14,15))))),6)))));
+End;
diff --git a/tests/data/L2001.30x52.nex b/tests/data/L2001.30x52.nex
new file mode 100644
index 0000000..af58670
--- /dev/null
+++ b/tests/data/L2001.30x52.nex
@@ -0,0 +1,240 @@
+
+#NEXUS
+
+[
+Title: INCONGRUENCE BETWEEN MORPHOLOGICAL DATA SETS: AN EXAMPLE FROM THE
+EVOLUTION OF ENDOPARASITISM AMONG PARASITIC WASPS (HYMENOPTERA: BRACONIDAE)
+
+Authors: DONALD L. J. QUICKE AND ROBERT BELSHAW
+
+Journal: SYSTEMATIC BIOLOGY 48(3): 436-454
+
+Contents: THREE NEXUS FILES, IDENTICAL EXCEPT FOR DIFFERENT ALIGNMENTS OF
+ONE GENE 
+
+This represents:
+File 1: data file with 28S D2 2:1 gap to substitution cost alignment
+except all of the sequence data has been removed
+]
+
+BEGIN CHARACTERS;
+DIMENSIONS NEWTAXA NTAX=30 NCHAR=118;
+FORMAT labels MISSING=? SYMBOLS= "0 1 2 3 4 5";
+OPTIONS  MSTAXA=POLYMORPH [gap=newstate];
+[DJZ - removing eliminate command, adding assumptions block
+eliminate 1-45 74-82 85 86 105 108-112 114 116-.; [leaves female+larval character set]
+]
+CHARLABELS
+	[1]	antennsensilla	[2]	antBarlin	[3]	'm/f_ant='
+	[4]	Maxillary_palp	[5]	labial_palp
+	[6]	cyclostome	[7]	laciniaround	[8]
+	laciniashort	[9]	hypoclypset	[10]	occipital_carina
+	[11]	Prontal_dorsum	[12]	prepectal_carina	[13]
+	Notauli	[14]	scut_sulc	[15]	scutellum
+	[16]	propodeum	[17]	Central_areola	[18]
+	antenna_cleaner	[19]	tib	[20]	FWR
+	[21]	'2m-cu'	[22]	'1-SR+M'	[23]	R_to_margin
+	[24]	'FW1-SR'	[25]	'r-m'
+	[26]	'FW2-SR'	[27]	MCU	[28]	'FW_m-cu'
+	[29]	'FW2-M'	[30]	FWa
+	[31]	3CU1	[32]	'HW2-CU'	[33]	'HW_cu-a'
+	[34]	HW_submarginal	[35]	'HWm-cu'
+	[36]	secondary_hamuli	[37]	petiole	[38]	numspir
+	[39]	T2_spir	[40]	'T2-T3articulation'
+	[41]	'MT4-7_apodemes'	[42]	MT8sculpt	[43]	MS8
+	[44]	rectal_pads	[45] chromosomes
+	[46]	prongs	[47]	ovip_sheath	[48]	GAoverlap
+	[49]	ovip_dor_valve	[50]	ovip_shape
+	[51]	ovip_ridge	[52]	Ovip	[53]	sperone	[54]
+	DVsculp	[55]	rachies
+	[56]	egg_canal	[57]	ctenidia	[58]	ctenidia
+	[59]	valvillus	[60]	valvillus
+	[61]	valpos	[62]	lower_valve	[63]	lv_seal	[64]
+	no_serrations	[65]	spermatheca
+	[66]	venom_app	[67]	res_sculp	[68]	VGA
+	[69]	Res_Div	[70]	VGins
+	[71]	ven_gland	[72]	no_ins	[73]	ovarioles
+	[74]	cercifused	[75]	cerci_setae
+	[76]	articulated_cusp	[77]	basal_ring	[78]
+	aedeagus	[79]	vas_def	[80]	Testes
+	[81]	sperm	[82]	sperm_morphol	[83]	egg	[84]
+	synovigeny	[85]	yolky
+	[86]	teratocytes	[87]	teratocyte_origin	[88]
+	lar_processes	[89]	L1_mandib_shape	[90]	L1_A_spines
+	[91]	L1_T3_spines.2	[92]	l1spinsfused	[93]
+	l1spinesgroups	[94]	L1_sensilla	[95]	L1_labral_sensilla
+	[96]	lar_antenna	[97]	Larval_mandible	[98]	larmandib
+	[99]	Larv_spir	[100]	'l-spirac'
+	[101]	hypostspur	[102]	stipital	[103]	larEpist
+[104]	ringsclerite [105]	anal_vesicle
+	[106]	postvencomm	[107]	instars	[108]	Ovip_into_gang
+	[109]	idiobiont	[110]	ectopar
+	[111]	final_external_feeding	[112]	mummif	[113]	mum
+	[114]	pupate	[115]	emergence_hole
+	[116]	paralysis	[117]	host_feeding	[118]	hostaphid
+	;
+STATELABELS
+	1  scattered one_rank 2_ranks,
+	2  small_hole medium_hole entire,
+	3  unequal equal,
+	4  six five four three,
+	5  four three two one,
+	6  no yes,
+	7  one three,
+	8  one three,
+	9  no yes,
+	10  complete abs_dors completely_abs,
+	11  simple_or_two_lateral_pits dorsope_and_2_lt_pits,
+	12  present absent,
+	13  present absent,
+	14  crenulate_or_with_1_carina smooth,
+	15  with_posterior_cren_groove without_posterior_crenulated_gr,
+	16  areola_complete areola_incomplete,
+	17  large small,
+	19  pegs_absent present,
+	20  contig_with_parastigma lost,
+	21  pres absent,
+	22  present_complete present_but_incomplete totally_absent,
+	23  yes no,
+	24  present lost,
+	25  present absent,
+	26  present absent,
+	27  fully_sclerotized largely_absent,
+	28  present absent,
+	29  part_present absent,
+	30  present absent,
+	31  present absent,
+	32  present absent,
+	33  present absent,
+	34  present absent,
+	35  present absent,
+	36  on_spur_beyond_r on_spur_overlapping on_C+SC+R,
+	37  unfused fused,
+	38  seven six five,
+	39  in_notum in_laterotergite,
+	40  fixed flexible,
+	41  _ _ _ _ _ _ small 'long,_thin_processes',
+	42  smooth microsculpture,
+	43  pointed_anteriorly square_anteriorly,
+	44  six four two,
+	45  four five six seven eight more_than_8,
+	46  absent present,
+	47  pointed truncate,
+	48  not trans,
+	49  lumen_divided lumen_entire,
+	50  straightish strongly_curved,
+	51  dorsal_ridge_absent present,
+	52  simple nodus notch double_nodus,
+	53  absent present,
+	54  present_ctenid pres_setae abs,
+	55  not to_end,
+	56  closed_by_LVs closed_by_DV,
+	57  otherwise 'with_scale-like_combsctenidiact',
+	58  without_sock_seta with_sock_seta,
+	59  many two one none,
+	60  no_fringe fringe,
+	61  apical medial basal,
+	62  flaps_absent flaps_normal flaps_large,
+	63  fades_out scaly_and_detached,
+	64  <3 '=3' >3,
+	65  white black,
+	66  muscular not_so,
+	67  spiral not_spiral,
+	68  otherwise with_long_prim_duct_and_anterio,
+	69  undivided divided,
+	70  in_spiral_part not_in_spiral_part,
+	71  anterior medial posterior,
+	72  one two many,
+	73  one two 'three-seven' eight_or_more,
+	74  cerci_separate cerci_fused_fo_TIX,
+	75  _many five four three,
+	76  present fused,
+	77  wide_laterally unifomly_narrow produced_medially,
+	78  normal reduced,
+	79  posterior anterior,
+	80  fused_above_gut separate_or_fised_below,
+	81  long medium short,
+	82  normal abnormal_morphology,
+	83  ovoid 'lemon-shaped' with_long_process,
+	84  synovigenic proovigenic,
+	85  anhydropic hydropic,
+	87  from_polar_bodies from_delamination_of_serosa,
+	88  absent pair_below_tail,
+	89  sickle_and_narrow broad_base_with_hook_blade,
+	90  absent single_row multiple_rows,
+	91  present absent,
+	92  not_fused fused_and_branching,
+	93  not_grouped grouped,
+	94  without_group_of_3 with_group_of_3,
+	95  absent present,
+	96  papilliform disc absent,
+	97  toothed smooth,
+	98  cross_or_meet separate,
+	99  prothorax mesothorax,
+	100  divided undivided,
+	101  present absent,
+	102  simple paddle baloon,
+	103  present absent_or_v_reduced,
+	104  absent present,
+	105  absent present,
+	106  present absent,
+	107  five four three,
+	108  not yes,
+	109  idiobiont koinobiont,
+	110  ecto endo,
+	111  present absent,
+	112  no_mummy mummy,
+	113  pale always_black,
+	114  internal external,
+	115  A B,
+	116  permanent temporary none,
+	117  present absent,
+	118  not_aphid aphid,
+;
+                        [               11111111112   2   2  22222   2  23   3   3333333344444444445555555555666666666677777777778888888888   9  9999999999000000000  0111   1  1111 ]
+                        [ 123	4  5678901234567890   1   2  34567   8  90   1   2345678901234567890123456789012345678901234567890123456789   0  1234567890123456789  0123   4  5678 ]
+MATRIX                  [                                                                                                                                                            ]
+Aphidius_rhopalosiphi     120   2  1000001011101001   1   2  10011   0  01   1   1111210101012301?10121001103??0011000002101311011101111000   0  10101211?1111000101  1110   1  1211
+Aphidius_ervi             120   2  1000001011101001   1   2  10011   0  01   1   1111210101012101?10121001103??0011000002101311011101111000   0  101012111111100?101  1110   1  1211
+Diaeretiella_rapae        120 (23) 2000001011101001   1   2  10111   1  01   1   1111210101012201?10121?01?03??00?1000002101311011??11?1000   0  101012111111100?1?1  1110   1  1211
+Lysiplebus_confusus       120 (23) 300000101111?001   1   2  10111   1  01   1   1111210101012200?10121001?03??101100000??01311011??1111000   0  101011111111100?1?1  1110   1  1211
+Pauesia_unilachni         120   2  1000001011100001   1   2  10011   0  01   1   1111210100012200010?21?01?03???0110000?2?01311011??01?1?00   0  10100211?111100?1?1  1110   1  1211
+Pauesia_juniperorum       120   2  1000000001100001   1   2  10011   0  01 (01)  1111210100012201010??1?01?03???0110000???01311011??11?1?00   0  10100211?111100?1?1  1110   1  1211
+Binodoxys_acalephae       120   2  2000000011100001   1   2  10111   1  11   ?   1111210100112410?1100??01?0????0?10000?2?0111?0????11?1?01   0  00000211?102100?1?1  1110   1  0211
+Trioxys_pallidus          120   2  2000000011100001   1   2  10111   1  11   ?   1111210100112410111001001?03???00100000?101111011??11?1001   0  000002111102100?101  1110   1  0211
+Monoctonus_pseudoplatani  120   2  1000001011100001   1   2  10011   0  11   ?   1111210100112300110021?01?020200110100?2?001110????11?1?11   0  00000211?102100?111  1110   1  0111
+Praon_volucre             120   2  100000000111?001   1   1  10110 (01) 01 (01)  1101200100012000010021001003??20101100???10200111100111111   0  0101021?1110110?1?1  1110   0  ?211
+Praon_abjectum            120   2  100000000111?001   1 (12) 10110 (01) 01 (01)  1101200100012000010?21001003??20101100???10200111100111111   0  0101021?1110110?1?1  1110   0  ?211
+[
+Praon_dorsale             120   2  100000000111?001   1   1  10110 (01) 01   0   1101200100012000010021001003??20101100???10200111100111111   0  0101021?1110110?1?1  1110   0  ?211
+]
+Pseudopraon_mindariphagum 120   2  2000000001100001   1   2  10110   0  11   0   1101200100?1??00010?2?????0????0??1100????02001?????????1?   ?  ???????1????1?0???1  1110 (01) 0211
+Dyscritulus_planiceps     120   2  1000000001100001   1   2  10110   0  01   0   110120010001200001002???1?0???20?01000?00102001????01???11   0  010102111110110?1?1  1110   0  ?211
+Ephedrus_plagiator        121   2  2000001001100001   1   0  00000   0  01   0   1101200100012301010021001003??2020010002010111011?00111111   0  000102111110100?101  1111   1  0211
+Ephedrus_californicus     121   2  2000001001100001   1   0  00000   0  01   0   1101200100012301010021001003??20200100020101110111?0111111   0  000102101110100?101  1111   1  0211
+[
+Ephedrus_validus          121   2  2000001001100001   1   0  00000   0  01   0   1101200100012301010021001003??2020010002010111011??0111111   0  000102111110100?101  1111   1  0211
+Ephedrus_persicae         121   2  2000001001100001   1   0  00000   0  01 (01)  1101200100012301010021001003??2020010002010111011??0111111   0  000102101110100?101  1111   1  0211
+]
+Sathon_falcatus           211   1  101102011011?001   1   0  10100   0  00   0   1001001110001500011001201101121121110012010011011210111?00   2  1????20010001010101  100?   0  ?210
+Chelonus_sp.              010   1  001100000011?100   1   1  01000   0  00   0   1001102010001200010021201101111?11110012010011011210111100 (01) 0000?10010101010101  100?   0  ?210
+Cenocoelius_analis        010   0  0011000000101000   1   0  00000   0  00   0   1001100110011?000100212010001?11211100110300110112121???0?   ?  ?????100?01010????1  100?   0  ?2?0
+Eubazus_semirugosus       010   0  0011000000000000   1   0  01100   0  00   0   1001000110011?000100212010001?1101110012030011011210111?00   0  000??1001010101?101  100?   0  ?210
+Acampsis_alternipes       010   0  0011000000001100   1   0  00000   0  00   0   0001000110011?000100011010021011?111001?030011011??0110?00   2  100001001010101??11  100?   0  ?210
+Alysia_lucicola           100   0  0000020000100100   1   0  00000   0  01   0   10002001100115000000200?0012001010000102010012001000110?01 (12) 000??11100001000101  110?   1  ?110
+Aleiodes_coxalis          100   0  010000000011?001   1   0  00000   0  01   0   10010000100115000000000?0012101021000002010012000000000?01   2  1????1100000000?001  1111   1  ?110
+Heterospilus_prosopidis   100   0  0100100000100011   1   1  00000   0  01   0   1000200010001?00000030010012001020000112110012000000000?01   1  000??00000000001000  000?   0  ?000
+Hecabolus_sp.             100   0  010010000011?011   1   0  00000   0  01   0   1000200010001?00000030010012001020000112110012000000000?01   1  000??00000001001000  000?   0  ?0?0
+Bracon_sp.                100   1  010012010011?101   1   0  00000   0  01   0   1001200010011500000010010012001020000012210012000000000?01   2  1????00000000001000  000?   0  ?000
+Colastes_incertus         100   0  010000010011?001   1   0  00000   0  01   0   1000200010001?000000100100120010?000010?010012000000000?01   1  000??00000000001000  000?   0  ?000
+Rhyssalus_sp.             100   0  0100100000101000   1   0  00000   0  00   0   100020011000??000000100100110010?01110020100?100?000000?0?   ?  ?????0000000000??00  000?   0  ?000
+Histeromerus_mystacinus   110   0  010011011011?000 (01)  0  00000   0  00   0   1000100110002?00000000?1001101100011100201000000???0000?0?   ?  ?????0000000000??00  000?   0  ?010
+Xorides_praecatorius      010   1  0001000000000000   0   2  0???0   0  01   0   0001010000000?00000011000001001020000000020000010000000?0?   ?  ?????000?000000??00  000?   0  ?0?0
+Alomyia_debellator        010   1  000100001011?000   0   2  0???0   0  01   0   0001010000000?000100100000011010201100000?0000000000??0?0?   ?  ?????111001000????1  111?   1  ?2?0
+;
+END;
+
+begin assumptions;
+exset * larfem = 1-45 74-82 85 86 105 108-112 114 116-.;
+wtset * equal = 1 : 1-.;
+end;
diff --git a/tests/data/a.G3.start b/tests/data/a.G3.start
new file mode 100644
index 0000000..6e3c7e7
--- /dev/null
+++ b/tests/data/a.G3.start
@@ -0,0 +1,22 @@
+#NEXUS
+
+begin trees;
+translate
+ 1 MorNa6,
+ 2 ClownNa6,
+ 3 AraNa6,
+ 4 puffNa6,
+ 5 NewZebra,
+ 6 SterNa6,
+ 7 eelNa6,
+ 8 catNa6,
+ 9 AptNa6,
+ 10 PinniNa6,
+ 11 tetra;
+tree bestREP1 = [&U][!GarliScore -6240.261727][!GarliModel  e  0.05006  0.02522  0.04579  0.05796  0.07502  0.05608  0.00778  0.08819  0.04880  0.11266  0.04378  0.05006  0.02961  0.02522  0.03726  0.05520  0.04441  0.09058  0.02170  0.03463  a 0.43677 ](8:0.05935897,((4:0.03051927,11:0.05580100):0.10931448,((1:0.22446286,(2:0.04508832,3:0.04743270):0.01175049):0.03129708,5:0.06562443):0.01061253):0.02441771,(((10:0.09191045,7:0.14789299):0.09056644,6:0.16711511):0.03643131,9:0.05177230) [...]
+end;
+[
+begin garli;
+M1 a 0.43677 ;
+end;
+]
diff --git a/tests/data/a.G4.start b/tests/data/a.G4.start
new file mode 100644
index 0000000..7130ec0
--- /dev/null
+++ b/tests/data/a.G4.start
@@ -0,0 +1,22 @@
+#NEXUS
+
+begin trees;
+translate
+ 1 MorNa6,
+ 2 ClownNa6,
+ 3 AraNa6,
+ 4 puffNa6,
+ 5 NewZebra,
+ 6 SterNa6,
+ 7 eelNa6,
+ 8 catNa6,
+ 9 AptNa6,
+ 10 PinniNa6,
+ 11 tetra;
+tree bestREP2 = [&U][!GarliScore -6237.258402][!GarliModel  e  0.05006  0.02522  0.04579  0.05796  0.07502  0.05608  0.00778  0.08819  0.04880  0.11266  0.04378  0.05006  0.02961  0.02522  0.03726  0.05520  0.04441  0.09058  0.02170  0.03463  a 0.46160 ](((7:0.14599226,10:0.09055204):0.09024955,6:0.16570677):0.03527064,9:0.05078852,(8:0.05838226,((4:0.02994310,11:0.05488274):0.10831868,(5:0.06486452,((2:0.04405548,3:0.04678517):0.01139601,1:0.22237979):0.03096996):0.01020390):0.02406689) [...]
+end;
+[the rate matrix is LG]
+begin garli;
+a 0.46160 
+r 243.500 38.656 101.598 24.819 202.114 35.106 14.657 52.486 38.675 109.961 27.080 115.206 94.882 41.586 462.446 209.301 249.250 17.679 21.420 6.120 0.342 108.123 55.689 62.662 31.366 1.298 58.110 87.426 51.728 7.374 8.297 52.294 272.397 111.863 191.672 65.557 114.020 512.992 1.704 82.657 90.697 1.046 27.681 1.475 2.499 496.584 38.588 51.201 12.126 121.332 41.661 3.714 2.924 13.217 1.840 34.127 41.467 4.330 176.791 6.816 16.996 52.994 41.030 403.888 35.606 59.867 59.141 23.971 7.616 11.7 [...]
+end;
diff --git a/tests/data/a.start b/tests/data/a.start
new file mode 100644
index 0000000..6da809e
--- /dev/null
+++ b/tests/data/a.start
@@ -0,0 +1,17 @@
+#NEXUS
+
+begin trees;
+translate
+ 1 MorNa6,
+ 2 ClownNa6,
+ 3 AraNa6,
+ 4 puffNa6,
+ 5 NewZebra,
+ 6 SterNa6,
+ 7 eelNa6,
+ 8 catNa6,
+ 9 AptNa6,
+ 10 PinniNa6,
+ 11 tetra;
+tree bestREP2 = [&U][!GarliScore -6430.816437][!GarliModel  e  0.05006  0.02522  0.04579  0.05796  0.07502  0.05608  0.00778  0.08819  0.04880  0.11266  0.04378  0.05006  0.02961  0.02522  0.03726  0.05520  0.04441  0.09058  0.02170  0.03463  ](8:0.05249357,((6:0.13492838,(10:0.07773538,7:0.12477691):0.07362245):0.03624041,9:0.04716527):0.03542008,((((3:0.04217772,2:0.04130586):0.01296054,1:0.17849475):0.02682993,5:0.05697633):0.01047972,(11:0.04999547,4:0.02773113):0.09034148):0.02247935);
+end;
diff --git a/tests/data/c.M3x2.start b/tests/data/c.M3x2.start
new file mode 100644
index 0000000..0870eff
--- /dev/null
+++ b/tests/data/c.M3x2.start
@@ -0,0 +1,21 @@
+#NEXUS
+
+begin trees;
+translate
+ 1 MorNa6,
+ 2 ClownNa6,
+ 3 AraNa6,
+ 4 puffNa6,
+ 5 NewZebra,
+ 6 SterNa6,
+ 7 eelNa6,
+ 8 catNa6,
+ 9 AptNa6,
+ 10 PinniNa6,
+ 11 tetra;
+tree bestREP1 = [&U][!GarliScore -12956.123517][!GarliModel  o 0.02001 0.69648 0.29356 0.30352 r  1.26027 2.44850 1.25881 0.68658 1.39601 1.00000 e  0.01794  0.03488  0.03086  0.01518  0.01142  0.01807  0.00652  0.00841  0.00953  0.01217  0.00828  0.01041  0.00941  0.05068  0.04378  0.02810  0.00778  0.00489  0.01744  0.00289  0.00866  0.01016  0.00226  0.00853  0.00339  0.00803  0.00289  0.00514  0.00715  0.02860  0.04165  0.01518  0.02045  0.03074  0.03751  0.01505  0.01192  0.02208  0 [...]
+end;
+
+begin garli;
+M1 o 0.02001 0.69648 0.29356 0.30352 r  1.26027 2.44850 1.25881 0.68658 1.39601 1.00000;
+end;
diff --git a/tests/data/c.start b/tests/data/c.start
new file mode 100644
index 0000000..c48244e
--- /dev/null
+++ b/tests/data/c.start
@@ -0,0 +1,21 @@
+#NEXUS
+
+begin trees;
+translate
+ 1 MorNa6,
+ 2 ClownNa6,
+ 3 AraNa6,
+ 4 puffNa6,
+ 5 NewZebra,
+ 6 SterNa6,
+ 7 eelNa6,
+ 8 catNa6,
+ 9 AptNa6,
+ 10 PinniNa6,
+ 11 tetra;
+tree bestREP2 = [&U][!GarliScore -13269.229793][!GarliModel  o 0.08740 1.00000 r  1.26512 2.36171 1.15119 0.70580 1.40199 1.00000 e  0.01794  0.03488  0.03086  0.01518  0.01142  0.01807  0.00652  0.00841  0.00953  0.01217  0.00828  0.01041  0.00941  0.05068  0.04378  0.02810  0.00778  0.00489  0.01744  0.00289  0.00866  0.01016  0.00226  0.00853  0.00339  0.00803  0.00289  0.00514  0.00715  0.02860  0.04165  0.01518  0.02045  0.03074  0.03751  0.01505  0.01192  0.02208  0.00427  0.01179  [...]
+end;
+
+begin garli;
+M1 o 0.08740 1.00000 r  1.26512 2.36171 1.15119 0.70580 1.40199 1.00000 ;
+end;
diff --git a/tests/data/dnaGap.8x1K.nex b/tests/data/dnaGap.8x1K.nex
new file mode 100644
index 0000000..654463c
--- /dev/null
+++ b/tests/data/dnaGap.8x1K.nex
@@ -0,0 +1,1055 @@
+#NEXUS
+BEGIN TAXA;
+    TITLE Untitled_TAXA_Block_1;
+    DIMENSIONS NTax = 8;
+    TAXLABELS temporariaDMH84R1 boyliiMVZ148929 luteiventris_MT_MVZ191016 luteiventris_WA_MVZ225749 muscosaMVZ149006 auroraMVZ13957 cascadaeMVZ148946 sylvaticaMVZ137426;
+END;
+BEGIN CHARACTERS;
+    TITLE Untitled_DATA_Block_1GapsAsMissing;
+    LINK TAXA = Untitled_TAXA_Block_1;
+    DIMENSIONS NChar=1000;
+    FORMAT Datatype=DNA;
+Matrix
+temporariaDMH84R1             ?AATAAAGCGCAAAGGTAC?TATA?ACT??????A??ATGATAACCTACTC???C??TTT?CCCCA???TACAGTAACTGTAC??T?TAATCTA??CT?ACG??????????????CCAAATTT?AACGACCCAAGC????????TACATGCTCCCCATGAA???A?C?????????TTTAAC?GGG?AAGGATA????AA?????????GA?GA???TTAAGTGCG????T????A???GAATTC?G?CACCAT??TA?CAGAT?A?T????????T???????TACG?????TCC???CGATGTGCAA??ACTTGGAAG?CT?GACGT??CTG???TCAAA?TCCAGTCGAAGA??????????AG?GGA??????TAACTATTTTGAT?ACTT?AGTATC???AATACA?TT??AG???????AC??CACGTCTA????ATGCAAA?T?T???????C? [...]
+boyliiMVZ148929               ?AATGTAGCGAAACAGCAC?TATA?GTT??????A??ATGACAACCTACTC???CTTTT???????????CTCATAACTGCAC??T?TAATT?????T?ACGTAG?ATG???????CTTAATTT?AATG???????C????????TACACGCTCTCATTGAA???A?C?????????TAAAAC?GGC?GGGGATA????AA?????????GA?GA???CTAAGTGCG????T????T???GAATAC???CACAAT??TA?CAGAC?A?C????????TAC?????TGTG?????TCT???CAATGTGCAA??CCTTGAAGG?TC?GACCT??CTC???TTAGC?ACCAGTCGAAGACT?TATTTCCAG?GGA??????TAACTAATTTGGT?CCTT?ATTATT???GACATA?TT??AG???????ATTACACGTCTA????CCGCAAA?T?T???????C? [...]
+luteiventris_MT_MVZ191016     ?AATATAGCGCAAAAGCAC?TA?A?GCT??????A??ATGACAACCTATTC???T?ATT???????????CAGATAACTGTAC??T?TAATCTC??CT?ACATGG?A?G???????CCTAATTC?AATG???????C????????TCCGTGCTCCCATCGAA???A?C?????????TAAAAC?GGC?GGGGATA????AA?????????GA?GA???TTAAGTGCG????T????A???GAGTAC?G?CATCAT??TA?CAAAT?A?A????????TAC?????TGTG?????TCT???CGATACGCAA??CCTTGGAGG?TC?GACAT??CTA???TCGAC?ACCAGTTGAAGATC?TGTTTCCAG?GGA??????TAACTAAATTGAT?CCTT?ATTATC???AATATA??T??CG???????ATCACACGTCTA????ACGTAAA?T?T???????C? [...]
+luteiventris_WA_MVZ225749     ?AATATAGCGCAAAAGCAC?TA?A?GCT??????A??ATGACAACCTATTC???T?ATT???????????CTGATAACTGTAC??T?TAATCTC??CT?ACATGG?A?G???????CCTAATTC?AATG???????C????????TCCGTGCTCCCATCGAA???A?C?????????TAAGAC?GGC?GGGGATA????AA?????????GA?GA???TTAAGTGCG????T????A???GAGTAC?G?CACCAT??TA?CAGAT?A?A????????TAC?????TGTG?????TCT???CGATACGCAA??CCTTGGAGG?TC?GACAT??CTA???TCAAC?ACCAGTTGAAGACC?TATTTCCAG?GGA??????TAACTAAATTGAT?CCTT?ATTATC???AATATA??T??CG???????ATCACACGTCTA????ACGTAAA?T?T???????C? [...]
+muscosaMVZ149006              ?AATACAGCGCAAAAGCAC?TATA?GCT??????A??ATGACAACCTACTC???T?TTTT?ATCCA???TTCAATAACTGCAC??T?TAATTTT??CT?ACTTAG?ATG???????CTTAATCC?AATG????????????????????TGCTCCCCTCAAA???A?A?????????TTAAACTGGT?GG??????????A?????????GA?GA???TTACGTGCG????T????A???GAGTCC?G?CACCAT??TA?CAGAC?A?T????????TAC?????TGCG?????TCT???CGATCCGCAA??CCT???AAG?TT?GACGT??CTA???TCAAA?TCCAGTAGAAGAAC?TATTTCCAG?GGA??????CAACTAATTTGGT?ACTT?ACTATC???AATATA?TT??TG???????ATAACACGTTTA????TCGCAAA?T?T???????C? [...]
+auroraMVZ13957                ?AATACAGCGCAAAAGCACTTATA?GTT??????A??ATGACAACCTACTC???A?TTTT?GTCCA???TCTTATAACCGCAC??T?TAATCCG??CT?ACATAG?ATG???????CCTAATTT?AATG????????????????????TGCTCCCCTCGAA???A?A?????????TAAAACTGGT?GGGGATAA???AA?????????AA??A???TTAAGTGCG????T????A???GAGTCC?G?CATTAT??TA?CAGAT?A?T????????TAC?????TGAG?????TCT???CGATCCG????????????????C?GACGT??CTA???TAAAT?TCCAGTAGAA?AAC?TCTTTCCA??GGA??????TAACTAATTTGGT?ACTT?ACTATC???AATACA?TT??TG???????ATCACACGTTTA????TTGTAAA?T?T???????C? [...]
+cascadaeMVZ148946             ?AATATAGCGCAAAAGCAC?TATA?GTT??????A??ATGACAACCTACTC???A?TTTT?GTCCA???TTTCATAACTGCAC??T?TAATTTT??CT?ACATAG?ATG???????CCTAATTT?AATG????????????????????TGCTCCCCTCAAA???A?A?????????TAAAACTGGC?GGGGATA????AA?????????AA?GA???TTAAGTGCG????T????G???GAGTCC?G?CATCAT??TA?AAGAT?A?C????????TAC?????TAAG?????TCC???CGATCCGCAA??ACT???AGG?CT?GACGT??CTA???TTAAT?TCCAGTAGAAGAAC?TATTTCCAG?GGA??????TAACTAATTTGGT?ACTT?ACTATC???AATACA?TT??AG???????ATCACACGTTTA????CCGTAAA?T?T???????C? [...]
+sylvaticaMVZ137426            ?AATACATCGTGACATTAC?TA???ATT??????A??ATGACGACTTACTC???T?ATTC?TTCCA???TTCGATAACTGCAC??T?TAATCCA??CT?ACGTAG?ATG???????CCTGATTT?AAAG???????C????????TTCATGCTCTCCACAAA???A?T?????????TATAAC?GGA?AAGAATA????AA?????????AA?GA???TCAGGTGCG????T????A???AAATAC?G?CTTAAT??TA?AAGAT?A?T????????TAC?????TGTG?????TCA???CGATATGCGA??ACTTGAAAG?TC?GACGT??CTG???TCAAT?ACCAGTTGAGGACT?TGTTTCCAG?GGA??????CAACTAATTTGGTGACAT?ATTATC???TA???A?TT??AG???????ACCACACGTTTA????AAGTAAA?T?T???????C? [...]
+;
+END;
+BEGIN CHARACTERS;
+    TITLE Untitled_DATA_Block_1GapsAsBinary;
+    LINK TAXA = Untitled_TAXA_Block_1;
+    DIMENSIONS NChar=1000;
+ CharStateLabels 1 col_1,
+    2 col_2,
+    3 col_3,
+    4 col_4,
+    5 col_5,
+    6 col_6,
+    7 col_7,
+    8 col_8,
+    9 col_9,
+    10 col_10,
+    11 col_11,
+    12 col_12,
+    13 col_13,
+    14 col_14,
+    15 col_15,
+    16 col_16,
+    17 col_17,
+    18 col_18,
+    19 col_19,
+    20 col_20,
+    21 col_21,
+    22 col_22,
+    23 col_23,
+    24 col_24,
+    25 col_25,
+    26 col_26,
+    27 col_27,
+    28 col_28,
+    29 col_29,
+    30 col_30,
+    31 col_31,
+    32 col_32,
+    33 col_33,
+    34 col_34,
+    35 col_35,
+    36 col_36,
+    37 col_37,
+    38 col_38,
+    39 col_39,
+    40 col_40,
+    41 col_41,
+    42 col_42,
+    43 col_43,
+    44 col_44,
+    45 col_45,
+    46 col_46,
+    47 col_47,
+    48 col_48,
+    49 col_49,
+    50 col_50,
+    51 col_51,
+    52 col_52,
+    53 col_53,
+    54 col_54,
+    55 col_55,
+    56 col_56,
+    57 col_57,
+    58 col_58,
+    59 col_59,
+    60 col_60,
+    61 col_61,
+    62 col_62,
+    63 col_63,
+    64 col_64,
+    65 col_65,
+    66 col_66,
+    67 col_67,
+    68 col_68,
+    69 col_69,
+    70 col_70,
+    71 col_71,
+    72 col_72,
+    73 col_73,
+    74 col_74,
+    75 col_75,
+    76 col_76,
+    77 col_77,
+    78 col_78,
+    79 col_79,
+    80 col_80,
+    81 col_81,
+    82 col_82,
+    83 col_83,
+    84 col_84,
+    85 col_85,
+    86 col_86,
+    87 col_87,
+    88 col_88,
+    89 col_89,
+    90 col_90,
+    91 col_91,
+    92 col_92,
+    93 col_93,
+    94 col_94,
+    95 col_95,
+    96 col_96,
+    97 col_97,
+    98 col_98,
+    99 col_99,
+    100 col_100,
+    101 col_101,
+    102 col_102,
+    103 col_103,
+    104 col_104,
+    105 col_105,
+    106 col_106,
+    107 col_107,
+    108 col_108,
+    109 col_109,
+    110 col_110,
+    111 col_111,
+    112 col_112,
+    113 col_113,
+    114 col_114,
+    115 col_115,
+    116 col_116,
+    117 col_117,
+    118 col_118,
+    119 col_119,
+    120 col_120,
+    121 col_121,
+    122 col_122,
+    123 col_123,
+    124 col_124,
+    125 col_125,
+    126 col_126,
+    127 col_127,
+    128 col_128,
+    129 col_129,
+    130 col_130,
+    131 col_131,
+    132 col_132,
+    133 col_133,
+    134 col_134,
+    135 col_135,
+    136 col_136,
+    137 col_137,
+    138 col_138,
+    139 col_139,
+    140 col_140,
+    141 col_141,
+    142 col_142,
+    143 col_143,
+    144 col_144,
+    145 col_145,
+    146 col_146,
+    147 col_147,
+    148 col_148,
+    149 col_149,
+    150 col_150,
+    151 col_151,
+    152 col_152,
+    153 col_153,
+    154 col_154,
+    155 col_155,
+    156 col_156,
+    157 col_157,
+    158 col_158,
+    159 col_159,
+    160 col_160,
+    161 col_161,
+    162 col_162,
+    163 col_163,
+    164 col_164,
+    165 col_165,
+    166 col_166,
+    167 col_167,
+    168 col_168,
+    169 col_169,
+    170 col_170,
+    171 col_171,
+    172 col_172,
+    173 col_173,
+    174 col_174,
+    175 col_175,
+    176 col_176,
+    177 col_177,
+    178 col_178,
+    179 col_179,
+    180 col_180,
+    181 col_181,
+    182 col_182,
+    183 col_183,
+    184 col_184,
+    185 col_185,
+    186 col_186,
+    187 col_187,
+    188 col_188,
+    189 col_189,
+    190 col_190,
+    191 col_191,
+    192 col_192,
+    193 col_193,
+    194 col_194,
+    195 col_195,
+    196 col_196,
+    197 col_197,
+    198 col_198,
+    199 col_199,
+    200 col_200,
+    201 col_201,
+    202 col_202,
+    203 col_203,
+    204 col_204,
+    205 col_205,
+    206 col_206,
+    207 col_207,
+    208 col_208,
+    209 col_209,
+    210 col_210,
+    211 col_211,
+    212 col_212,
+    213 col_213,
+    214 col_214,
+    215 col_215,
+    216 col_216,
+    217 col_217,
+    218 col_218,
+    219 col_219,
+    220 col_220,
+    221 col_221,
+    222 col_222,
+    223 col_223,
+    224 col_224,
+    225 col_225,
+    226 col_226,
+    227 col_227,
+    228 col_228,
+    229 col_229,
+    230 col_230,
+    231 col_231,
+    232 col_232,
+    233 col_233,
+    234 col_234,
+    235 col_235,
+    236 col_236,
+    237 col_237,
+    238 col_238,
+    239 col_239,
+    240 col_240,
+    241 col_241,
+    242 col_242,
+    243 col_243,
+    244 col_244,
+    245 col_245,
+    246 col_246,
+    247 col_247,
+    248 col_248,
+    249 col_249,
+    250 col_250,
+    251 col_251,
+    252 col_252,
+    253 col_253,
+    254 col_254,
+    255 col_255,
+    256 col_256,
+    257 col_257,
+    258 col_258,
+    259 col_259,
+    260 col_260,
+    261 col_261,
+    262 col_262,
+    263 col_263,
+    264 col_264,
+    265 col_265,
+    266 col_266,
+    267 col_267,
+    268 col_268,
+    269 col_269,
+    270 col_270,
+    271 col_271,
+    272 col_272,
+    273 col_273,
+    274 col_274,
+    275 col_275,
+    276 col_276,
+    277 col_277,
+    278 col_278,
+    279 col_279,
+    280 col_280,
+    281 col_281,
+    282 col_282,
+    283 col_283,
+    284 col_284,
+    285 col_285,
+    286 col_286,
+    287 col_287,
+    288 col_288,
+    289 col_289,
+    290 col_290,
+    291 col_291,
+    292 col_292,
+    293 col_293,
+    294 col_294,
+    295 col_295,
+    296 col_296,
+    297 col_297,
+    298 col_298,
+    299 col_299,
+    300 col_300,
+    301 col_301,
+    302 col_302,
+    303 col_303,
+    304 col_304,
+    305 col_305,
+    306 col_306,
+    307 col_307,
+    308 col_308,
+    309 col_309,
+    310 col_310,
+    311 col_311,
+    312 col_312,
+    313 col_313,
+    314 col_314,
+    315 col_315,
+    316 col_316,
+    317 col_317,
+    318 col_318,
+    319 col_319,
+    320 col_320,
+    321 col_321,
+    322 col_322,
+    323 col_323,
+    324 col_324,
+    325 col_325,
+    326 col_326,
+    327 col_327,
+    328 col_328,
+    329 col_329,
+    330 col_330,
+    331 col_331,
+    332 col_332,
+    333 col_333,
+    334 col_334,
+    335 col_335,
+    336 col_336,
+    337 col_337,
+    338 col_338,
+    339 col_339,
+    340 col_340,
+    341 col_341,
+    342 col_342,
+    343 col_343,
+    344 col_344,
+    345 col_345,
+    346 col_346,
+    347 col_347,
+    348 col_348,
+    349 col_349,
+    350 col_350,
+    351 col_351,
+    352 col_352,
+    353 col_353,
+    354 col_354,
+    355 col_355,
+    356 col_356,
+    357 col_357,
+    358 col_358,
+    359 col_359,
+    360 col_360,
+    361 col_361,
+    362 col_362,
+    363 col_363,
+    364 col_364,
+    365 col_365,
+    366 col_366,
+    367 col_367,
+    368 col_368,
+    369 col_369,
+    370 col_370,
+    371 col_371,
+    372 col_372,
+    373 col_373,
+    374 col_374,
+    375 col_375,
+    376 col_376,
+    377 col_377,
+    378 col_378,
+    379 col_379,
+    380 col_380,
+    381 col_381,
+    382 col_382,
+    383 col_383,
+    384 col_384,
+    385 col_385,
+    386 col_386,
+    387 col_387,
+    388 col_388,
+    389 col_389,
+    390 col_390,
+    391 col_391,
+    392 col_392,
+    393 col_393,
+    394 col_394,
+    395 col_395,
+    396 col_396,
+    397 col_397,
+    398 col_398,
+    399 col_399,
+    400 col_400,
+    401 col_401,
+    402 col_402,
+    403 col_403,
+    404 col_404,
+    405 col_405,
+    406 col_406,
+    407 col_407,
+    408 col_408,
+    409 col_409,
+    410 col_410,
+    411 col_411,
+    412 col_412,
+    413 col_413,
+    414 col_414,
+    415 col_415,
+    416 col_416,
+    417 col_417,
+    418 col_418,
+    419 col_419,
+    420 col_420,
+    421 col_421,
+    422 col_422,
+    423 col_423,
+    424 col_424,
+    425 col_425,
+    426 col_426,
+    427 col_427,
+    428 col_428,
+    429 col_429,
+    430 col_430,
+    431 col_431,
+    432 col_432,
+    433 col_433,
+    434 col_434,
+    435 col_435,
+    436 col_436,
+    437 col_437,
+    438 col_438,
+    439 col_439,
+    440 col_440,
+    441 col_441,
+    442 col_442,
+    443 col_443,
+    444 col_444,
+    445 col_445,
+    446 col_446,
+    447 col_447,
+    448 col_448,
+    449 col_449,
+    450 col_450,
+    451 col_451,
+    452 col_452,
+    453 col_453,
+    454 col_454,
+    455 col_455,
+    456 col_456,
+    457 col_457,
+    458 col_458,
+    459 col_459,
+    460 col_460,
+    461 col_461,
+    462 col_462,
+    463 col_463,
+    464 col_464,
+    465 col_465,
+    466 col_466,
+    467 col_467,
+    468 col_468,
+    469 col_469,
+    470 col_470,
+    471 col_471,
+    472 col_472,
+    473 col_473,
+    474 col_474,
+    475 col_475,
+    476 col_476,
+    477 col_477,
+    478 col_478,
+    479 col_479,
+    480 col_480,
+    481 col_481,
+    482 col_482,
+    483 col_483,
+    484 col_484,
+    485 col_485,
+    486 col_486,
+    487 col_487,
+    488 col_488,
+    489 col_489,
+    490 col_490,
+    491 col_491,
+    492 col_492,
+    493 col_493,
+    494 col_494,
+    495 col_495,
+    496 col_496,
+    497 col_497,
+    498 col_498,
+    499 col_499,
+    500 col_500,
+    501 col_501,
+    502 col_502,
+    503 col_503,
+    504 col_504,
+    505 col_505,
+    506 col_506,
+    507 col_507,
+    508 col_508,
+    509 col_509,
+    510 col_510,
+    511 col_511,
+    512 col_512,
+    513 col_513,
+    514 col_514,
+    515 col_515,
+    516 col_516,
+    517 col_517,
+    518 col_518,
+    519 col_519,
+    520 col_520,
+    521 col_521,
+    522 col_522,
+    523 col_523,
+    524 col_524,
+    525 col_525,
+    526 col_526,
+    527 col_527,
+    528 col_528,
+    529 col_529,
+    530 col_530,
+    531 col_531,
+    532 col_532,
+    533 col_533,
+    534 col_534,
+    535 col_535,
+    536 col_536,
+    537 col_537,
+    538 col_538,
+    539 col_539,
+    540 col_540,
+    541 col_541,
+    542 col_542,
+    543 col_543,
+    544 col_544,
+    545 col_545,
+    546 col_546,
+    547 col_547,
+    548 col_548,
+    549 col_549,
+    550 col_550,
+    551 col_551,
+    552 col_552,
+    553 col_553,
+    554 col_554,
+    555 col_555,
+    556 col_556,
+    557 col_557,
+    558 col_558,
+    559 col_559,
+    560 col_560,
+    561 col_561,
+    562 col_562,
+    563 col_563,
+    564 col_564,
+    565 col_565,
+    566 col_566,
+    567 col_567,
+    568 col_568,
+    569 col_569,
+    570 col_570,
+    571 col_571,
+    572 col_572,
+    573 col_573,
+    574 col_574,
+    575 col_575,
+    576 col_576,
+    577 col_577,
+    578 col_578,
+    579 col_579,
+    580 col_580,
+    581 col_581,
+    582 col_582,
+    583 col_583,
+    584 col_584,
+    585 col_585,
+    586 col_586,
+    587 col_587,
+    588 col_588,
+    589 col_589,
+    590 col_590,
+    591 col_591,
+    592 col_592,
+    593 col_593,
+    594 col_594,
+    595 col_595,
+    596 col_596,
+    597 col_597,
+    598 col_598,
+    599 col_599,
+    600 col_600,
+    601 col_601,
+    602 col_602,
+    603 col_603,
+    604 col_604,
+    605 col_605,
+    606 col_606,
+    607 col_607,
+    608 col_608,
+    609 col_609,
+    610 col_610,
+    611 col_611,
+    612 col_612,
+    613 col_613,
+    614 col_614,
+    615 col_615,
+    616 col_616,
+    617 col_617,
+    618 col_618,
+    619 col_619,
+    620 col_620,
+    621 col_621,
+    622 col_622,
+    623 col_623,
+    624 col_624,
+    625 col_625,
+    626 col_626,
+    627 col_627,
+    628 col_628,
+    629 col_629,
+    630 col_630,
+    631 col_631,
+    632 col_632,
+    633 col_633,
+    634 col_634,
+    635 col_635,
+    636 col_636,
+    637 col_637,
+    638 col_638,
+    639 col_639,
+    640 col_640,
+    641 col_641,
+    642 col_642,
+    643 col_643,
+    644 col_644,
+    645 col_645,
+    646 col_646,
+    647 col_647,
+    648 col_648,
+    649 col_649,
+    650 col_650,
+    651 col_651,
+    652 col_652,
+    653 col_653,
+    654 col_654,
+    655 col_655,
+    656 col_656,
+    657 col_657,
+    658 col_658,
+    659 col_659,
+    660 col_660,
+    661 col_661,
+    662 col_662,
+    663 col_663,
+    664 col_664,
+    665 col_665,
+    666 col_666,
+    667 col_667,
+    668 col_668,
+    669 col_669,
+    670 col_670,
+    671 col_671,
+    672 col_672,
+    673 col_673,
+    674 col_674,
+    675 col_675,
+    676 col_676,
+    677 col_677,
+    678 col_678,
+    679 col_679,
+    680 col_680,
+    681 col_681,
+    682 col_682,
+    683 col_683,
+    684 col_684,
+    685 col_685,
+    686 col_686,
+    687 col_687,
+    688 col_688,
+    689 col_689,
+    690 col_690,
+    691 col_691,
+    692 col_692,
+    693 col_693,
+    694 col_694,
+    695 col_695,
+    696 col_696,
+    697 col_697,
+    698 col_698,
+    699 col_699,
+    700 col_700,
+    701 col_701,
+    702 col_702,
+    703 col_703,
+    704 col_704,
+    705 col_705,
+    706 col_706,
+    707 col_707,
+    708 col_708,
+    709 col_709,
+    710 col_710,
+    711 col_711,
+    712 col_712,
+    713 col_713,
+    714 col_714,
+    715 col_715,
+    716 col_716,
+    717 col_717,
+    718 col_718,
+    719 col_719,
+    720 col_720,
+    721 col_721,
+    722 col_722,
+    723 col_723,
+    724 col_724,
+    725 col_725,
+    726 col_726,
+    727 col_727,
+    728 col_728,
+    729 col_729,
+    730 col_730,
+    731 col_731,
+    732 col_732,
+    733 col_733,
+    734 col_734,
+    735 col_735,
+    736 col_736,
+    737 col_737,
+    738 col_738,
+    739 col_739,
+    740 col_740,
+    741 col_741,
+    742 col_742,
+    743 col_743,
+    744 col_744,
+    745 col_745,
+    746 col_746,
+    747 col_747,
+    748 col_748,
+    749 col_749,
+    750 col_750,
+    751 col_751,
+    752 col_752,
+    753 col_753,
+    754 col_754,
+    755 col_755,
+    756 col_756,
+    757 col_757,
+    758 col_758,
+    759 col_759,
+    760 col_760,
+    761 col_761,
+    762 col_762,
+    763 col_763,
+    764 col_764,
+    765 col_765,
+    766 col_766,
+    767 col_767,
+    768 col_768,
+    769 col_769,
+    770 col_770,
+    771 col_771,
+    772 col_772,
+    773 col_773,
+    774 col_774,
+    775 col_775,
+    776 col_776,
+    777 col_777,
+    778 col_778,
+    779 col_779,
+    780 col_780,
+    781 col_781,
+    782 col_782,
+    783 col_783,
+    784 col_784,
+    785 col_785,
+    786 col_786,
+    787 col_787,
+    788 col_788,
+    789 col_789,
+    790 col_790,
+    791 col_791,
+    792 col_792,
+    793 col_793,
+    794 col_794,
+    795 col_795,
+    796 col_796,
+    797 col_797,
+    798 col_798,
+    799 col_799,
+    800 col_800,
+    801 col_801,
+    802 col_802,
+    803 col_803,
+    804 col_804,
+    805 col_805,
+    806 col_806,
+    807 col_807,
+    808 col_808,
+    809 col_809,
+    810 col_810,
+    811 col_811,
+    812 col_812,
+    813 col_813,
+    814 col_814,
+    815 col_815,
+    816 col_816,
+    817 col_817,
+    818 col_818,
+    819 col_819,
+    820 col_820,
+    821 col_821,
+    822 col_822,
+    823 col_823,
+    824 col_824,
+    825 col_825,
+    826 col_826,
+    827 col_827,
+    828 col_828,
+    829 col_829,
+    830 col_830,
+    831 col_831,
+    832 col_832,
+    833 col_833,
+    834 col_834,
+    835 col_835,
+    836 col_836,
+    837 col_837,
+    838 col_838,
+    839 col_839,
+    840 col_840,
+    841 col_841,
+    842 col_842,
+    843 col_843,
+    844 col_844,
+    845 col_845,
+    846 col_846,
+    847 col_847,
+    848 col_848,
+    849 col_849,
+    850 col_850,
+    851 col_851,
+    852 col_852,
+    853 col_853,
+    854 col_854,
+    855 col_855,
+    856 col_856,
+    857 col_857,
+    858 col_858,
+    859 col_859,
+    860 col_860,
+    861 col_861,
+    862 col_862,
+    863 col_863,
+    864 col_864,
+    865 col_865,
+    866 col_866,
+    867 col_867,
+    868 col_868,
+    869 col_869,
+    870 col_870,
+    871 col_871,
+    872 col_872,
+    873 col_873,
+    874 col_874,
+    875 col_875,
+    876 col_876,
+    877 col_877,
+    878 col_878,
+    879 col_879,
+    880 col_880,
+    881 col_881,
+    882 col_882,
+    883 col_883,
+    884 col_884,
+    885 col_885,
+    886 col_886,
+    887 col_887,
+    888 col_888,
+    889 col_889,
+    890 col_890,
+    891 col_891,
+    892 col_892,
+    893 col_893,
+    894 col_894,
+    895 col_895,
+    896 col_896,
+    897 col_897,
+    898 col_898,
+    899 col_899,
+    900 col_900,
+    901 col_901,
+    902 col_902,
+    903 col_903,
+    904 col_904,
+    905 col_905,
+    906 col_906,
+    907 col_907,
+    908 col_908,
+    909 col_909,
+    910 col_910,
+    911 col_911,
+    912 col_912,
+    913 col_913,
+    914 col_914,
+    915 col_915,
+    916 col_916,
+    917 col_917,
+    918 col_918,
+    919 col_919,
+    920 col_920,
+    921 col_921,
+    922 col_922,
+    923 col_923,
+    924 col_924,
+    925 col_925,
+    926 col_926,
+    927 col_927,
+    928 col_928,
+    929 col_929,
+    930 col_930,
+    931 col_931,
+    932 col_932,
+    933 col_933,
+    934 col_934,
+    935 col_935,
+    936 col_936,
+    937 col_937,
+    938 col_938,
+    939 col_939,
+    940 col_940,
+    941 col_941,
+    942 col_942,
+    943 col_943,
+    944 col_944,
+    945 col_945,
+    946 col_946,
+    947 col_947,
+    948 col_948,
+    949 col_949,
+    950 col_950,
+    951 col_951,
+    952 col_952,
+    953 col_953,
+    954 col_954,
+    955 col_955,
+    956 col_956,
+    957 col_957,
+    958 col_958,
+    959 col_959,
+    960 col_960,
+    961 col_961,
+    962 col_962,
+    963 col_963,
+    964 col_964,
+    965 col_965,
+    966 col_966,
+    967 col_967,
+    968 col_968,
+    969 col_969,
+    970 col_970,
+    971 col_971,
+    972 col_972,
+    973 col_973,
+    974 col_974,
+    975 col_975,
+    976 col_976,
+    977 col_977,
+    978 col_978,
+    979 col_979,
+    980 col_980,
+    981 col_981,
+    982 col_982,
+    983 col_983,
+    984 col_984,
+    985 col_985,
+    986 col_986,
+    987 col_987,
+    988 col_988,
+    989 col_989,
+    990 col_990,
+    991 col_991,
+    992 col_992,
+    993 col_993,
+    994 col_994,
+    995 col_995,
+    996 col_996,
+    997 col_997,
+    998 col_998,
+    999 col_999,
+    1000 col_1000 ;
+Format Datatype = Standard Symbols="01" missing = '?' ;
+Matrix
+temporariaDMH84R1             ?11111111111111111101111?111??????1??11111111111111???100111?11111???11111111111111??1?1111111??11?111000?000???????11111111?111111111111????????11111111111111111???1?1?????????1111110111?11111110???11?????????11?11???111111111????1????1???111111?1?111111??11?11111?1?1????????100?????1111?????111???1111111111??111111111?11?11111??111???11111?11111111111100?000000011?111??????111111111111101111?111111???111111?11??11???????110011111111????1111111?1?1???????1? [...]
+boyliiMVZ148929               ?11111111111111111101111?111??????1??11111111111111???111110?00000???01111111111111??1?1111100??01?111111?111???????11111111?111100000001????????11111111111111111???1?1?????????1111110111?11111110???11?????????11?11???111111111????1????1???111111?0?111111??11?11111?1?1????????111?????1111?????111???1111111111??111111111?11?11111??111???11111?11111111111111?111111111?111??????111111111111101111?111111???111111?11??11???????111111111111????1111111?1?1???????1? [...]
+luteiventris_MT_MVZ191016     ?11111111111111111101101?111??????1??11111111111111???101110?00000???01111111111111??1?1111111??11?111111?101???????11111111?111100000001????????11111111111111111???1?1?????????1111110111?11111110???11?????????11?11???111111111????1????1???111111?1?111111??11?11111?1?1????????111?????1111?????111???1111111111??111111111?11?11111??111???11111?11111111111111?111111111?111??????111111111111101111?111111???111111?01??11???????111111111111????1111111?1?1???????1? [...]
+luteiventris_WA_MVZ225749     ?11111111111111111101101?111??????1??11111111111111???101110?00000???01111111111111??1?1111111??11?111111?101???????11111111?111100000001????????11111111111111111???1?1?????????1111110111?11111110???11?????????11?11???111111111????1????1???111111?1?111111??11?11111?1?1????????111?????1111?????111???1111111111??111111111?11?11111??111???11111?11111111111111?111111111?111??????111111111111101111?111111???111111?01??11???????111111111111????1111111?1?1???????1? [...]
+muscosaMVZ149006              ?11111111111111111101111?111??????1??11111111111111???101111?11111???11111111111111??1?1111111??11?111111?111???????11111111?111100000000????????00001111111111111???1?1?????????1111111111?11000000???01?????????11?11???111111111????1????1???111111?1?111111??11?11111?1?1????????111?????1111?????111???1111111111??111000111?11?11111??111???11111?11111111111111?111111111?111??????111111111111101111?111111???111111?11??11???????111111111111????1111111?1?1???????1? [...]
+auroraMVZ13957                ?11111111111111111111111?111??????1??11111111111111???101111?11111???11111111111111??1?1111111??11?111111?111???????11111111?111100000000????????00001111111111111???1?1?????????1111111111?11111111???11?????????11?01???111111111????1????1???111111?1?111111??11?11111?1?1????????111?????1111?????111???1111111000??000000000?01?11111??111???11111?11111111110111?111111110?111??????111111111111101111?111111???111111?11??11???????111111111111????1111111?1?1???????1? [...]
+cascadaeMVZ148946             ?11111111111111111101111?111??????1??11111111111111???101111?11111???11111111111111??1?1111111??11?111111?111???????11111111?111100000000????????00001111111111111???1?1?????????1111111111?11111110???11?????????11?11???111111111????1????1???111111?1?111111??11?11111?1?1????????111?????1111?????111???1111111111??111000111?11?11111??111???11111?11111111111111?111111111?111??????111111111111101111?111111???111111?11??11???????111111111111????1111111?1?1???????1? [...]
+sylvaticaMVZ137426            ?11111111111111111101100?111??????1??11111111111111???101111?11111???11111111111111??1?1111111??11?111111?111???????11111111?111100000001????????11111111111111111???1?1?????????1111110111?11111110???11?????????11?11???111111111????1????1???111111?1?111111??11?11111?1?1????????111?????1111?????111???1111111111??111111111?11?11111??111???11111?11111111111111?111111111?111??????111111111111111111?111111???110001?11??11???????111111111111????1111111?1?1???????1? [...]
+;
+END;
+Begin trees;  [Treefile saved Tue Jan 11 10:45:47 2011]
+[!
+>Data file = /Users/zwickl/Desktop/GarliDEV/bugsAndExperiments/orientedGapTests/mixedModel.Oct2010/indelibleSims//multiSite/zipfian1.5/del2Xins/ranaDepth1.0/totRate0.08/19/onlyDNA.nex
+>Tree(s) input to PAUP* as user-defined tree(s)
+]
+	Translate
+		1 temporariaDMH84R1,
+		2 boyliiMVZ148929,
+		3 luteiventris_MT_MVZ191016,
+		4 luteiventris_WA_MVZ225749,
+		5 muscosaMVZ149006,
+		6 auroraMVZ13957,
+		7 cascadaeMVZ148946,
+		8 sylvaticaMVZ137426
+		;
+tree PAUP_1 = [&U] (1,(((2,(3,4)),(5,(6,7))),8));
+End;
diff --git a/tests/data/expected.scr b/tests/data/expected.scr
new file mode 100644
index 0000000..d92974d
--- /dev/null
+++ b/tests/data/expected.scr
@@ -0,0 +1,19 @@
+a.conf	6434.50916
+a.G3.conf   6242.85802
+a.G4.conf   6247.02222
+c.conf	13269.229793
+c.M3x2.conf	12956.1235
+n.conf	14486.03829
+n.G4.conf	13917.56622
+n.G5.conf	13918.08407
+p.mk.conf	474.1864
+p.mkO.conf	494.9700
+p.mkO.ssr.conf	477.6848
+p.mk.ssr.conf	467.6783
+p.mkv.conf	472.3906
+p.mkvO.conf	493.667
+p.mkvO.ssr.conf	474.6455633
+p.mkv.ssr.conf	464.5473
+p.3diff.conf	13306.20608
+g.dnaBnoZ.conf	3350.2345
+g.dnaMix.conf	3325.98222
diff --git a/tests/data/moore.matK90-120.nex b/tests/data/moore.matK90-120.nex
new file mode 100644
index 0000000..5fa0c38
--- /dev/null
+++ b/tests/data/moore.matK90-120.nex
@@ -0,0 +1,94 @@
+#NEXUS 
+
+Begin data;
+	Dimensions ntax=86 nchar=30;
+	Format datatype=dna gap=-;
+	Matrix
+Acorus               ---ATGGAA------------GAATTCAAA
+Amborella            ---ATGGAG------------GAATTACGA
+Anethum              ---ATGGAG------------GAATTCCAA
+Antirrhinum          ---ATGGAG------------GAAATCCAA
+Arabidopsis          CAAATGGAT------------AAATTTCAA
+Atropa               ---ATGGAA------------GAAATCCAA
+Aucuba               ---ATGGAG------------GAATTCCAA
+Berberidopsis        ---ATGGAG------------GAATTCCAA
+Brassica             CAAATGGAG------------AAATTTCAA
+Bulnesia             ---ATGAAG------------AAATTTCGA
+Buxus                ---ATGAAG------------GAATTACAA
+Calycanthus          ---ATGGAG------------GAATTACAA
+Ceratophyllum        ---ATGGAA------------GAATCGCAT
+Chloranthus          ---ATGGAA------------GAATTACAA
+Citrus               ---ATGGAG------------GAATTTCAA
+Coffea               ---ATGGAG------------GAAATTCAA
+Cornus               ---ATGGAG------------GAATTCCAA
+Cucumis              ---ATGGAG------------GAATTTCAA
+Cuscuta              ---ACGGAG------------GACTTCAAA
+Cycas                ---ATGGAT------------AAGTTTCGA
+Daucus               ---ATGGAG------------GAATTCCAA
+Dillenia             ---ATGGAG------------GAATTCCAA
+Dioscorea            AAAATAGAA------------GAATTACAA
+Drimys               ---ATGGAG------------GAATTACAA
+Ehretia              ---ATGGAG------------GAAATTCAA
+Elaeis               ---ATGGAA------------GAATTACAA
+Epifagus             ------------------------------
+Eucalyptus           ---ATGGAG------------GAATTTCAA
+Euonymus             ---ATGGAA------AAAGAAAAATTCCAA
+Ficus                ---ATGGCG------------GAATTTCAA
+Ginkgo               ---ATGGAT------------AAGTTCAAA
+Glycine              ---ATGGAG------------GAATCTCGA
+Gossypium            ---ATGGAG------------GAATTTCAA
+Gunnera              ---ATGGAG------------GAATTCAAA
+Helianthus           ---ATGGAG------------AAATTCCAA
+Heuchera             ---ATGGGG------------GAATTTCAA
+Ilex                 ---ATGGAG------------GAATTCCAA
+Illicium             ---ATGGAG------------GAATTACAA
+Ipomoea              ---ATGGAG------------GAAATTCAA
+Jasminum             ---ATGCAG------------GAAATCAAA
+Lactuca              ---ATGGAG------------AAATTCCAA
+Lemna                ---ATGGAA------------GAATTCAAA
+Liquidambar          ---ATGGAG------------GAATCTCAA
+Liriodendron         ---ATGGAG------------GAATTACAA
+Lonicera             ---ATGGAG------------GAATTCAAA
+Lotus                ---ATGGAG------------GAATATCAG
+Manihot              ---ATGGAG------------GAA------
+Medicago             ---ATGAAG------------GAATATCAA
+Meliosma             ---ATGGAG------------GAATTACAA
+Morus                ---ATGGCG------------GAATTTCAA
+Musa                 ---ATGGAA------------GAATTACAA
+Nandina              ---ATGGAA------------GAATTAAAA
+Nelumbo              ---ATGGAG------------GAATTACAA
+Nerium               ---ATGGAA------------GAAATCCAA
+Nicotiana            ---ATGGAA------------GAAATCCAA
+Nuphar               ---ATGGAGAAATTGCAATACGAATTGCAA
+Nymphaea             CAAATGGAAAAATTGCAATACGAATTGCAA
+Oenothera            ---ATGGAG------------GAATTCCCG
+Oryza                CAAATGGAA------------AAATTCGAG
+Oxalis               ---ATGTAT------------AAATATCAA
+Panax                ---ATGGAG------------GAATTCCAA
+Passiflora           ---ATAGAG------------AAATATCAA
+Pelargonium          ---ATGGAA------------GAATTTCAA
+Phalaenopsis         ------------------------------
+Phaseolus            ---ATGGAG------------AAATATCAA
+Phoradendron         ---ATGGAA------------CAATTCCAA
+Pinus                ---ATGGAT------------GAGTTCCAT
+Piper                ---ATGGAA------------AAATTCAAA
+Platanus             ---ATGGAA------------GAATTACAA
+Plumbago             ---ATGGAA------------GAATTCCAA
+Populus              AAAATAGAG------------AAATCTCAA
+Quercus              ---ATGGAG------------GAATTTCAA
+Ranunculus           ---ATGGAG------------GAATTACAA
+Rhododendron         ---ATGGAG------------GAATTCAAA
+Scaevola             ATGATGGAG------------GAATTCCAA
+Solanum_lycopersicum ---ATGGAA------------GAAATCCAC
+Spinacia             ---ATGGAA------------GAATTCCAA
+Staphylea            ---ATGGAG------------GAATTTCAA
+Trachelium           ---ATGGCG------------GAATTTCAA
+Triticum             CAAATGGAA------------AAATTCGAA
+Trochodendron        ---ATGGGG------------GAATTAGAA
+Typha                ---ATGAAA------------CAATTACAT
+Vitis                ---ATGGAA------------GGAGTTCAA
+Ximenia              ---ATGGAG------------AAATTCCAA
+Yucca                ---ATGGAA------------GAATTACAA
+Zea                  CAAATGGAA------------AAATTCGAA
+	;
+End;
diff --git a/tests/data/moore.start b/tests/data/moore.start
new file mode 100644
index 0000000..09b447e
--- /dev/null
+++ b/tests/data/moore.start
@@ -0,0 +1,122 @@
+#NEXUS 
+
+Begin trees;  [Treefile saved Wed Feb 16 13:33:03 2011]
+[!
+>Data file = /home/zwickl/googleCodeRepo/branches/clean-partitioning/tests/moore86x30.nex
+>Heuristic search settings:
+>  Optimality criterion = parsimony
+>    Character-status summary:
+>      Of 30 total characters:
+>        All characters are of type 'unord'
+>        All characters have equal weight
+>        6 characters are constant
+>        5 variable characters are parsimony-uninformative
+>        Number of parsimony-informative characters = 19
+>    Gaps are treated as "missing"
+>  Starting tree(s) obtained via stepwise addition
+>  Addition sequence: simple (reference taxon = Acorus)
+>  Number of trees held at each step during stepwise addition = 1
+>  Branch-swapping algorithm: tree-bisection-reconnection (TBR)
+>  Steepest descent option not in effect
+>  Initial 'MaxTrees' setting = 100
+>  Zero-length branches not collapsed
+>  'MulTrees' option not in effect; only 1 tree will be saved
+>  Topological constraints not enforced
+>  Trees are unrooted
+>
+>Heuristic search completed
+>   Total number of rearrangements tried = 433936
+>   Score of best tree(s) found = 93
+>   Number of trees retained = 1
+>   Time used = <1 sec (CPU time = 0.06 sec)
+]
+	Translate
+		1 Acorus,
+		2 Amborella,
+		3 Anethum,
+		4 Antirrhinum,
+		5 Arabidopsis,
+		6 Atropa,
+		7 Aucuba,
+		8 Berberidopsis,
+		9 Brassica,
+		10 Bulnesia,
+		11 Buxus,
+		12 Calycanthus,
+		13 Ceratophyllum,
+		14 Chloranthus,
+		15 Citrus,
+		16 Coffea,
+		17 Cornus,
+		18 Cucumis,
+		19 Cuscuta,
+		20 Cycas,
+		21 Daucus,
+		22 Dillenia,
+		23 Dioscorea,
+		24 Drimys,
+		25 Ehretia,
+		26 Elaeis,
+		27 Epifagus,
+		28 Eucalyptus,
+		29 Euonymus,
+		30 Ficus,
+		31 Ginkgo,
+		32 Glycine,
+		33 Gossypium,
+		34 Gunnera,
+		35 Helianthus,
+		36 Heuchera,
+		37 Ilex,
+		38 Illicium,
+		39 Ipomoea,
+		40 Jasminum,
+		41 Lactuca,
+		42 Lemna,
+		43 Liquidambar,
+		44 Liriodendron,
+		45 Lonicera,
+		46 Lotus,
+		47 Manihot,
+		48 Medicago,
+		49 Meliosma,
+		50 Morus,
+		51 Musa,
+		52 Nandina,
+		53 Nelumbo,
+		54 Nerium,
+		55 Nicotiana,
+		56 Nuphar,
+		57 Nymphaea,
+		58 Oenothera,
+		59 Oryza,
+		60 Oxalis,
+		61 Panax,
+		62 Passiflora,
+		63 Pelargonium,
+		64 Phalaenopsis,
+		65 Phaseolus,
+		66 Phoradendron,
+		67 Pinus,
+		68 Piper,
+		69 Platanus,
+		70 Plumbago,
+		71 Populus,
+		72 Quercus,
+		73 Ranunculus,
+		74 Rhododendron,
+		75 Scaevola,
+		76 Solanum_lycopersicum,
+		77 Spinacia,
+		78 Staphylea,
+		79 Trachelium,
+		80 Triticum,
+		81 Trochodendron,
+		82 Typha,
+		83 Vitis,
+		84 Ximenia,
+		85 Yucca,
+		86 Zea
+		;
+tree PAUP_1 = [&U] (1,(((((((((((((((((((((((((((((((((((((((((2,3,34),(((((((((4,19,27,6),7),16),25),55),76),32),70),78)),(((8,22),36),43)),10),11),14),((((15,(35,41)),71),(29,47)),60)),(((17,(39,54)),48),52)),(((18,42),46),(56,57))),24),26),28),((30,50),(((37,68),(65,84)),73))),38),44),(12,51)),((5,9),(13,33))),20),(((53,(64,66)),77),85)),69),72),81),83),23),31),40),45),49),21),58),59),61),62),63),67),74),75),79),80),82),86));
+End;
diff --git a/tests/data/n.G4.start b/tests/data/n.G4.start
new file mode 100644
index 0000000..bcdc0d1
--- /dev/null
+++ b/tests/data/n.G4.start
@@ -0,0 +1,25 @@
+#NEXUS
+
+begin trees;
+translate
+ 1 MorNa6,
+ 2 ClownNa6,
+ 3 AraNa6,
+ 4 puffNa6,
+ 5 NewZebra,
+ 6 SterNa6,
+ 7 eelNa6,
+ 8 catNa6,
+ 9 AptNa6,
+ 10 PinniNa6,
+ 11 tetra;
+tree bestREP2 = [&U][!GarliScore -13930.518123][!GarliModel  r  1.53159 3.88003 1.55869 1.28339 4.73849 1.00000 e 0.24425 0.24251 0.24974 0.26350 a 1.25046 p 0.30177 ]((8:0.09946229,(9:0.05193751,(6:0.10492481,(7:0.08952527,10:0.10060054):0.04846139):0.02384170):0.06722100):0.04417065,((4:0.05079817,11:0.05129394):0.15580771,((2:0.10536255,1:0.20236259):0.02015659,3:0.10962909):0.05348449):0.04497161,5:0.15298556);
+end;
+begin paup;
+clear;
+gett file=21.GTRIG.best.tre storebr;
+lset userbr nst=6 rmat=(1.531593 3.880025 1.558690 1.283386 4.738494) base=( 0.244246 0.242510 0.249740) rates=gamma shape=1.250460 ncat=4 pinv=0.301772;
+end;
+begin garli;
+M1 r  1.53159 3.88003 1.55869 1.28339 4.73849 1.00000 e 0.24425 0.24251 0.24974 0.26350 a 1.25046 p 0.30177 ;
+end;
diff --git a/tests/data/n.G5.start b/tests/data/n.G5.start
new file mode 100644
index 0000000..681a141
--- /dev/null
+++ b/tests/data/n.G5.start
@@ -0,0 +1,25 @@
+#NEXUS
+
+begin trees;
+translate
+ 1 MorNa6,
+ 2 ClownNa6,
+ 3 AraNa6,
+ 4 puffNa6,
+ 5 NewZebra,
+ 6 SterNa6,
+ 7 eelNa6,
+ 8 catNa6,
+ 9 AptNa6,
+ 10 PinniNa6,
+ 11 tetra;
+tree bestREP2 = [&U][!GarliScore -13931.023312][!GarliModel  r  1.53027 3.88100 1.55292 1.28472 4.74166 1.00000 e 0.24445 0.24238 0.24960 0.26357 a 1.34382 p 0.30984 ](((11:0.05135093,4:0.05087766):0.15612255,(3:0.10987345,(2:0.10558309,1:0.20301026):0.02021699):0.05373359):0.04514408,(8:0.09967691,(9:0.05197581,(6:0.10515979,(7:0.08974519,10:0.10077975):0.04865254):0.02389496):0.06736931):0.04428274,5:0.15340923);
+end;
+begin garli;
+M1  r  1.53027 3.88100 1.55292 1.28472 4.74166 1.00000 e 0.24445 0.24238 0.24960 0.26357 a 1.34382 p 0.30984 ;
+end;
+begin paup;
+clear;
+gett file=35.GTRIG5.best.tre storebr;
+lset userbr nst=6 rmat=(1.530273 3.880998 1.552918 1.284724 4.741660) base=( 0.244447 0.242378 0.249602) rates=gamma shape=1.343822 ncat=5 pinv=0.309837;
+end;
diff --git a/tests/data/n.start b/tests/data/n.start
new file mode 100644
index 0000000..ce1e7a8
--- /dev/null
+++ b/tests/data/n.start
@@ -0,0 +1,6 @@
+#NEXUS
+
+begin garli;
+M1 r  1.86905 3.67120 1.22140 1.85314 4.41432 1.00000 e 0.25543 0.20855 0.23822 0.29780 ;
+end;
+
diff --git a/tests/data/p.3diff.start b/tests/data/p.3diff.start
new file mode 100644
index 0000000..5074b10
--- /dev/null
+++ b/tests/data/p.3diff.start
@@ -0,0 +1,33 @@
+#NEXUS 
+
+Begin trees;  [Treefile saved Mon Aug 16 15:53:08 2010]
+[!
+>Data file = /home/zwickl/googleCodeRepo/branches/partitioning/tests/partTestWork/seqAndMixed/3parts.diffModelTypes/zakonEtAl2006.11tax.nex
+>
+>Processing TREES block from file "3diffModels.byCodonPos.best.tre":
+>   Keeping: trees from file (replacing trees in memory)
+>   1 tree read from file
+]
+	Translate
+		1 MorNa6,
+		2 ClownNa6,
+		3 AraNa6,
+		4 puffNa6,
+		5 NewZebra,
+		6 SterNa6,
+		7 eelNa6,
+		8 catNa6,
+		9 AptNa6,
+		10 PinniNa6,
+		11 tetra
+		;
+tree PAUP_1 = [&U] (1,(2,(3,((4,11),(5,(((6,(7,10)),9),8))))));
+End;
+
+begin garli;
+ S  0.540677  0.300693  2.158629  
+M2 e 0.1 0.2 0.3 0.4 a 0.4
+M1 r  1 10	 2 	2 1e-2 1.00000 a 0.6
+M3 r  1.0 2.0 3.0 5.0 2.0  e 0.4 0.2 0.3 0.1 p 0.01
+end;
+
diff --git a/tests/data/z.11x2178.AA.nex b/tests/data/z.11x2178.AA.nex
new file mode 100755
index 0000000..7b24bbb
--- /dev/null
+++ b/tests/data/z.11x2178.AA.nex
@@ -0,0 +1,59 @@
+#NEXUS
+[written Wed Sep 29 15:31:28 CDT 2010 by Mesquite  version 2.73 (build 544) at zwickl-WORK/129.237.138.169]
+
+[NOTE HERE THAT CODONs 513 and 646 OF PINNI HAD A Y IN IT, AND SO WAS BEING TOSSED BY GARLI IN CODON-AA
+THE AMBIGUITY ACTUALLY STILL ONLY ALLOWS IT TO CODE FOR ONE AA (L and K respectively, SO MESQUITE JUST 
+TRANSLATES IT NORMALLY THAT AA IS TAKEN OUT HERE.
+
+EDIT: Since GARLI now translates and allows codon ambiguity if it doesn't cause protein ambiguity, those
+AAs have been added back in.
+]
+
+BEGIN TAXA;
+	TITLE Taxa;
+	DIMENSIONS NTAX=11;
+	TAXLABELS
+		MorNa6 ClownNa6 AraNa6 puffNa6 NewZebra SterNa6 eelNa6 catNa6 AptNa6 PinniNa6 tetra 
+	;
+
+END;
+
+
+BEGIN CHARACTERS;
+	TITLE  Protein_translation_of_Character_Matrix;
+	DIMENSIONS  NCHAR=727;
+	FORMAT DATATYPE = Protein GAP = - MISSING = ?;
+	MATRIX
+	MorNa6    PVTPHFEHVLSVGNLVFSGIFAGEMVLKIIAMDPYYYFQVGWNVFDSIIVTMSMVEMVLADVEGLSVLRSFRLLRVFKLAKSWPTLNMLLTIIGNSVGALGNLTVVLAIIVFIFAVVGMQLFAKNYKDCVCKIAEDCELPRWHMHDFFHSFLIVFRILCGEWIETMWDCMEVANRNMCLVLFLMVMIIGNLVVLNLFLALLLSSFSGDNLQMADDDGELNNLQLSALRITRAIDWVKAYVRGLIWKILGKQPRVLDGLSHWATFTVPIAQEESDLEDGVSECSTVDYVPPPPDEVEEPEPVEPEACYTDNCLRRCPCLVLDTSEGRGKTWWNLRRTCYTIVEHDYFESSIIFMILLSSGALAFEDIYLERRRTIKILLEYADKVFSYVFVIEMLLKWVAYGYKVYFTNAWCWLDFLIVDVSLVSLAASIMGYSELGPIKSLRTLRALRPLRALSRFEGMRVVVNALVGAVPAIFNVMLVCL [...]
+	ClownNa6  PMSPEFDHMLSVGNLVFTGIFTAEMVLKLIAMDPYYYFQVGWNIFDSIIVTLSLVELGLANVQGLSVLRSFRLLRVFKLAKSWPTLNMLIKIIGNSVGALGNLTLVLAIIVFIFAVVGMQLFGKTYKDCVCKIASDCELPRWHMNDFFHSFLIVFRILCGEWIETMWDCMEVAGAGMCLVVFMMVMVIGNLVVLNLFLALLLSSFSGDNLAGGDEDGEMNNLQIAIGRITRGIDWVKAFVMGLVWRVMGKKPKMLDGLSHWVTLSVPMAQEESDLEDDSSECSTVDYRPPEPVEEEEPEQVEPVECFTDDCVRRCPCLTVDITQGKGRTWWNLRKTCYTIVEHDYFETFIIFMILLSSGALAFEDIYIERRRTIKIILEYADKVFTYVFVVEMLLKWVAYGFKTYFTNAWCWLDFLIVDVSLISLTANLMGYSELGPIKSLRTLRALRPLRALSRFEGMRVVVNALVGAILSIFNVLLVCL [...]
+	AraNa6    PMSPAFDHMLTVGNLVFTGIFTAEMVFKLIAMDPYHYFQVGWNIFDSIIVTLSLVELGLANVQGLSVLRSFRLLRVFKLAKSWPTLNMLIKIIGNSVGALGNLTLVLAIIVFIFAVVGMQLFGKSYKDCVCKIAEDCELPRWHMNDFFHSFLIVFRILCGEWIETMWDCMEVAGAGMCLVVFMMVMVIGNLVVLNLFLALLLSSFSGDNLAGGDDDGEMNNLQIAIGRITRGIDWIKAFAMGFIWKLLGKKAKMLDGLSHWVTLSVPIAQGESDLEDDSSECSTVDYRPPEPEEEEEPEQQEPEACFTEDCFRRMPCLMVDITQGKGKTWWKLRKTCFTIVEHGYFETFIIFMILLSSGALAFEDIYIEKRRVIKIILEYADKVFTYVFVIEMVLKWVAYGFKVYFTNAWCWLDFLIVDVSLISLTANLMGYSELGPIKSLRTLRALRPLRALSRFEGMRVVVNALVGAILSIFNVLLVCL [...]
+	puffNa6   PMTEEFDYMLSVGNLVFTGIFAAEMFFKLIAMDPYYYFQVGWNIFDSIIVTLSLVELGLANVQGLSVLRSFRLLRVFKLAKSWPTLNMLIKIIGNSVGALGNLTLVLAIIVFIFAVVGMQLFGKSYKDCVCKISSDCELPRWHMNDFFHSFLIVFRILCGEWIETMWDCMEVAGAGMCLVVFMMVMVIGNLVVLNLFLALLLSSFSGDNLSVGDDDGELNNLQIAIGRITRGGNWLKAFFIGTLQRVLGREPKLADGIANCLSITVPIALGESDSEGDSSVCSTVDYQPPEPEEEEEPDLVEPEACFTDNCVKRWPCLNVDISQGKGKKWWNLRKTCFTIVEHDWFETFIIFMILLSSGALAFEDIYIERRRTVKIVLEFADKVFTFIFVIEMLLKWVAYGFKTYFTNAWCWLDFFIVDISLISLSANLMGFSDLGPIKSLRTLRALRPLRALSRFEGMRVVVNALIGAIPSIFNVLLVCL [...]
+	NewZebra  PMSPHFEHVLSVGNLVFTGIFTAEMVFKLIAMDPYYYFQVGWNIFDSIIVTLSLVELGLANVQGLSVLRSFRLLRVFKLAKSWPTLNMLIKIIGNSVGALGNLTLVLAIIVFIFAVVGMQLFGKSYKDCVCKISEDCELPRWHMNDFFHSFLIVFRILCGEWIETMWDCMEVAGASMCLIVFMMVMVIGNLVVLNLFLALLLSSFSGDNLSGGDDDGEMNNLQIAIGRITRGIDWVKALVASMVQRILGKKPKMADGLTNCLTLTVPIARCESDVEGDSSVCSTVDYQPPEPVEEEEPEPEEPEACFTEGCIRRCACLSVDITEGWGKKWWNLRRTCFTIVEHDYFETFIIFMILLSSGALAFEDINIERRRVIKIILEYADKVFTYIFIVEMLLKWVAYGFKTYFTNAWCWLDFLIVDVSLVSLTANLMGYSELGAIKSLRTLRALRPLRALSRFEGMRVVVNALVGAIPSIFNVLLVCL [...]
+	SterNa6   PMSETFQHVLTIGNLVFTTIFTAEMVSKIIALDPYYYFQVGWNIFDCIIVTLSLVELSLSNMPGLSVLRSFRLMRIFKLAKSWPTLNMLIKIIGNSMGALGNLTFVLAIVIFIFAVVGFQLFGKSYKDNVCKVSADCTLPRWHMNDFFHSFLIVFRILCGEWIETMWDCMEVDGVPMCLTVFMMVMVIGNLVMLNLFLALLLSSFSCDNLAAPDDDSEVTNIQISIVRISRGISWVKKFIVGTAWWIMGRKPKIVDGITNYVVLNVPIAKGESEVEDDSSICSSVDYELLQPEEEKE-EPVDPEACFTENCVRYFPCLDVDITQGKGKIWWNLRCTCYNIVEHHYFENFLIFMILLSSGVLAFEDVNIERRRVIKTMLEYADIVFTYIFVVEMFLKWTAYGFKAYFTSAWCWLDFFIVDVSVISLVANVLGYAELGPVRSLRTFRALRPLRALSRFEGMRVVVNALLGAIPSIMNVLLVCL [...]
+	eelNa6    PMNESFQSLLSAGNLVFTTIFAAEMVLKIIALDPYYYFQQTWNIFDSIIVSLSLLELGLSNMQGMSVLRSLRLLRIFKLAKSWPTLNILIKIICNSVGALGNLTIVLAIIVFIFALVGFQLFGKNYKEYVCKISDDCELPRWHMNDFFHSFLIVFRALCGEWIETMWDCMEVGGVPMCLAVYMMVIIIGNLVMLNLFLALLLSSFSSDNLSSIEEDDEVNSLQVASERISRAKNWVKIFITGTVLWIQGKKPKIVDGITNCVTLNLPIVKGESEIEEDSSVCSTVDYSPSEQEEPEELESKDPEACFTEKCIWRFPFLDVDITQGKGKIWWNLRRTCYTIVEHDYFETFIIFMILLSSGVLAFEDIYIWRRRVIKVILEYADKVFTYVFIVEMLLKWVAYGFKRYFTDAWCWLDFVIVGASIMGITSSLLGYEELGAIKNLRTIRALRPLRALSRFEGMKVVVRALLGAIPSIMNVLLVCL [...]
+	catNa6    PMSSNFEHVLSVGNLVFTGIFTAEMVFKLIALDPFYYFQVGWNIFDSIIVTLSLVELGLANVQGLSVLRSFRLLRVFKLAKSWPTLNMLIKIIGNSVGALGNLTLVLAIVVFIFAVVGMQLFGKSYKDCVCKIAEDCELPRWHMNDFFHSFLIVFRILCGEWIETMWDCMEVAGAGMCLVVFLMVMVIGNLVVLNLFLALLLSSFSGDNLSAGDEDGEMNNLQIAIGRITRGIDWVKSFIIGLVQQILCRKPKMADRLTNCLTLNVPIAKAESDVEEDSSMCSTVDYRPPESEEEEEPEPVEPEACFTENCVRRCPCLNLDITQGRGKSWWNLRRTCYTIVEHDYFETFIIFMILLSSGALAFDDIYIERRRVIKIILEYADQVFTYIFVIEMLLKWVAYGFKTYFTNAWCWLDFFIVDVSLIGLTANLLGYSELGPIKSLRTLRALRPLRALSRFEGMRVVVNALLGAIPSIMNVLLVCL [...]
+	AptNa6    ---------LTVGNLVFTGIFTAEMVFKLIAMDPYYYFQVGWNIFDSIIVTLSLVELGLANVQGLSVLRSFRLLRVFKLAKSWPTLNMLIKIIGNSVGALGNLTLVLAIIVFIFAVVGMQLFGKSYKDCVCKIALDCELPRWHMTDFFHSFLIVFRILCGEWIETMWDCMEVAGPSMCLIVFMLVMVIGNLVVLNLFLALLLSSFSGDNLSASDDDSEINNLQIATGRISRAIGWVKNFIISTVQWVLGRKPKMVDGMTNCVVLNVPIAKGESEIEGDYSVCSTADYRPPEPEEEKVPETNDPEACFTENCVRRFPCLNVDITQGKGKSWWNLRRTCYIIVEHDYFETFIIFMILLSSGALAFEDIYIERRKMIKIILEYADKIFTYVFIMEMLLKWVAYGFKTYFTNAWCWLDFLIVDVSIISLTANLLGYSELGPIKSLRTLRALRPLRALSRFEGMRVVVNALVGAIPSIMNVLLVCL [...]
+	PinniNa6  PMSETFDYVLSTGNLVFTIIFAAEMVLKLIAMDPYYYFQQTWNIFDFFIVSLSLVEMGLANMQGLSVLRSFRLLRIFKLAKSWPTLNILIKIICNSVGALGNLTIVLAIIVFIFALVGMQLFGKNYKEFVCKISADCTLPRWHMNDFFHSFLIVFRCLCGEWIETMWDCMEVGGVPMCLSVYMMVIIIGNLVVLNLFLALLLSSFSGDNLTANDDDQEDNNILIAAERISRAKLWVKGFIIRTVLGMLGKEPKIVNGLANGVVLNVPIAKGESETEDDSSVCSTVDYSPPNPEEPEEPEPDNPEDCLTEECVSRFPWLNVDITQPKGKSWWNLRRTCYVIVEHDYFETFIIFMILLSSGALAFEDIYIERRRVIKIILEYADKVFTYIFIAEMLLKWVAYGFKKYFSDAWCWLDFLIVDVSIISLTANLLGYSELGPIKSLRTLRALRPLRALSRFEGMRVVVKALVGAIPSIVNVLLVCL [...]
+	tetra     PMTQEFDYMLSVGNLVFTGIFAAEMFFKLIAMDPYYYFQVGWNIFDSIIVTLSLVELGLANVQGLSVLRSFRLLRVFKLAKSWPTLNMLIKIIGSSVGALGNLTLVLAIIVFIFAVVGMQLFGKSYKDCVCKISTECELPRWHMNDFFHSFLIVFRILCGEWIENMWACMEVAGAGMCLVVFMMVMVIGNLVVLNLFLALLLSSFSGDNLSIGEDDGEMNNLQIAIGRITRGGNWLKTLVIRTVLQLLGREQKTADGIANCLVINVPIALGESDSEGESSVCSTADYRPPEPEEEEEPEPLEPEACFTDNCVKHWPCLNVDVTQGQGKKWWNLRKTCFTIVEHDWFETFIIFMILLSSGALAFEDIYIERRRTVKIILEFADKVFTFIFVLEMVLKWVAYGFKTYFTNAWCWLDFFIVDISLISLSANLMGLSDLGPIKSLRTLRALRPLRALSRFEGMRVVVNALIGAIPSIFNVLLVCL [...]
+
+;
+
+
+END;
+
+BEGIN ASSUMPTIONS;
+	TYPESET * UNTITLED   =  unord:  1 -  727;
+	wtset * equal = 1: 1-.;
+END;
+
+BEGIN CODONS;
+	CODESET * UNTITLED   =  universal:  1 -  727;
+
+
+END;
+
+BEGIN MESQUITECHARMODELS;
+	ProbModelSet * UNTITLED  (CHARACTERS = Protein_translation_of_Character_Matrix)  =  'Mk1 (est.)':  1 -  727;
+END;
+
+
diff --git a/tests/data/z.11x2178.nex b/tests/data/z.11x2178.nex
new file mode 100644
index 0000000..fb42190
--- /dev/null
+++ b/tests/data/z.11x2178.nex
@@ -0,0 +1,25 @@
+#NEXUS
+
+[
+This dataset is from:
+Zakon, Lu, Zwickl and Hillis. 2006. Sodium channel genes and the evolution of diversity in communication signals of electric fishes: Convergent molecular evolution. Proc. Natl. Acad. Sci. USA. 103(10):3675-80.
+]
+
+begin data;
+dimensions ntax=11 nchar=2178;
+format datatype=dna missing=? gap=-;
+matrix
+MorNa6    CCTGTGACTCCACATTTTGAGCACGTACTCAGTGTGGGAAACCTGGTTTTCTCAGGGATATTTGCTGGTGAAATGGTCTTGAAAATTATTGCTATGGACCCCTACTACTACTTCCAGGTTGGATGGAACGTGTTTGACAGCATCATTGTTACCATGAGTATGGTGGAGATGGTACTGGCTGATGTAGAGGGTCTGTCGGTTCTGCGGTCCTTTCGTTTGCTACGTGTCTTCAAGCTTGCCAAATCATGGCCTACCCTCAACATGCTGCTAACGATCATCGGAAACTCAGTGGGTGCTCTGGGGAACCTCACCGTGGTGCTGGCCATCATCGTTTTCATCTTCGCTGTGGTTGGAATGCAGCTGTTTGCCAAAAACTACAAGGACTGCGTCTGCAAGATCGCCGAGGATTGTGAGCTGCCCCGGTGGCACATGCATGACTTCTTCCACTCTTTCCTCATCGTGTTCCGCATCCTCTGTGGAGA [...]
+ClownNa6  CCCATGAGCCCTGAGTTTGACCACATGCTCTCTGTGGGAAACCTGGTTTTCACTGGAATCTTCACAGCTGAAATGGTCCTAAAACTCATTGCTATGGACCCCTACTACTACTTCCAGGTTGGATGGAACATATTTGACAGCATCATTGTCACTCTAAGCCTAGTGGAACTGGGGCTCGCTAATGTTCAGGGTCTGTCAGTCCTGCGATCCTTTCGTTTGTTGCGAGTGTTCAAGCTGGCAAAGTCTTGGCCCACCCTCAACATGCTGATCAAGATCATCGGGAATTCCGTGGGCGCCCTGGGCAACCTGACCCTGGTGCTGGCCATCATCGTCTTCATCTTCGCCGTGGTGGGCATGCAGCTCTTTGGGAAGACCTACAAGGACTGCGTGTGCAAGATTGCCAGTGACTGCGAGCTTCCCCGCTGGCACATGAATGACTTCTTCCACTCGTTCCTTATCGTGTTCCGCATCCTCTGCGGGGA [...]
+AraNa6    CCAATGAGTCCCGCGTTTGACCATATGCTGACCGTGGGAAACCTCGTTTTTACGGGGATCTTTACAGCTGAGATGGTATTCAAGCTCATCGCCATGGATCCATACCACTACTTCCAGGTTGGATGGAACATTTTTGACAGCATCATTGTCACACTTAGCCTGGTGGAGCTGGGTCTCGCGAATGTTCAGGGCCTTTCGGTCTTGCGCTCCTTCCGCTTGCTGCGGGTCTTCAAGCTGGCCAAGTCTTGGCCTACCCTGAACATGCTCATCAAGATCATTGGAAACTCAGTGGGTGCCCTAGGGAACCTCACACTGGTGCTGGCCATCATCGTCTTCATCTTCGCTGTCGTGGGCATGCAGCTGTTCGGTAAGAGCTACAAGGACTGTGTGTGTAAGATTGCAGAGGACTGTGAGCTACCCCGCTGGCACATGAATGACTTCTTCCACTCCTTCCTCATCGTGTTCCGCATCTTGTGTGGCGA [...]
+puffNa6   CCCATGACCGAAGAGTTCGACTACATGCTTTCAGTGGGAAATCTGGTTTTCACAGGAATCTTCGCGGCGGAAATGTTCTTCAAATTGATCGCCATGGATCCGTACTACTATTTCCAAGTTGGCTGGAACATTTTTGACAGCATCATCGTCACGCTCAGTCTGGTGGAGTTAGGGCTTGCAAACGTCCAGGGGCTGTCCGTCCTCAGGTCCTTCCGTCTGCTTCGGGTCTTCAAACTTGCCAAGTCCTGGCCCACGCTCAACATGCTGATCAAGATTATCGGTAATTCAGTTGGAGCTTTAGGGAATCTGACTTTGGTGCTGGCCATCATCGTCTTCATCTTCGCTGTGGTGGGGATGCAGCTCTTCGGCAAAAGCTACAAGGACTGTGTGTGCAAGATTTCCTCCGACTGCGAGCTGCCACGCTGGCACATGAATGACTTCTTCCACTCCTTCCTCATCGTGTTCCGCATCCTGTGCGGCGA [...]
+NewZebra  CCTATGAGTCCACATTTTGAACATGTCCTCTCAGTGGGCAACTTGGTGTTCACAGGAATCTTCACAGCTGAAATGGTGTTCAAGCTTATAGCTATGGACCCTTACTACTACTTCCAGGTGGGCTGGAACATTTTTGACAGCATCATTGTCACACTCAGCCTGGTGGAGTTGGGACTGGCCAACGTTCAGGGATTGTCCGTTCTAAGGTCCTTTCGTTTGCTACGTGTCTTCAAACTGGCTAAATCTTGGCCCACCCTTAACATGCTGATCAAGATCATCGGCAACTCAGTGGGTGCTCTAGGGAACCTAACACTTGTTCTGGCCATCATTGTCTTCATCTTTGCCGTGGTGGGCATGCAGCTTTTTGGAAAAAGCTACAAGGACTGCGTTTGTAAGATCTCTGAGGATTGCGAGCTGCCCCGCTGGCACATGAACGACTTCTTCCACTCATTCCTCATCGTCTTTCGGATCTTATGTGGAGA [...]
+SterNa6   CCCATGAGCGAAACCTTTCAACACGTGCTCACCATAGGGAACCTGGTGTTTACTACCATCTTTACGGCTGAAATGGTGTCGAAGATCATCGCCCTGGACCCTTACTACTACTTCCAGGTGGGCTGGAACATCTTCGACTGCATCATCGTCACTCTCAGTCTGGTGGAGCTAAGCCTATCCAACATGCCGGGCCTGTCTGTGCTCAGATCCTTTCGTTTGATGCGTATTTTCAAGCTGGCCAAGTCCTGGCCCACGCTCAACATGCTGATCAAGATCATCGGCAACTCAATGGGCGCCCTGGGGAACCTGACCTTCGTGTTGGCCATCGTCATCTTCATCTTCGCCGTGGTGGGCTTCCAGCTGTTCGGGAAGAGCTACAAGGACAACGTGTGCAAGGTCAGCGCGGACTGCACGCTGCCTCGCTGGCACATGAACGACTTCTTCCACTCCTTCCTGATCGTGTTTCGCATCCTGTGCGGCGA [...]
+eelNa6    CCCATGAACGAAAGCTTTCAGAGTCTGCTCAGTGCAGGAAACCTGGTGTTTACCACTATCTTTGCGGCTGAAATGGTGTTGAAGATCATTGCCTTGGACCCCTACTACTACTTCCAGCAGACGTGGAACATATTTGACAGCATCATTGTCAGTCTCAGTCTGTTGGAGCTTGGACTATCCAATATGCAAGGAATGTCTGTGCTCAGATCCTTACGTTTGCTGCGTATCTTCAAATTGGCCAAGTCCTGGCCCACGCTCAACATTCTGATCAAGATAATCTGCAACTCGGTGGGCGCTCTGGGCAACCTGACCATTGTGCTGGCCATTATCGTCTTCATCTTCGCCTTGGTGGGCTTTCAGCTGTTCGGAAAGAACTACAAGGAGTACGTGTGCAAGATCTCTGATGACTGTGAGCTGCCCCGCTGGCACATGAATGACTTCTTCCACTCCTTCCTGATTGTGTTCCGTGCCTTGTGTGGCGA [...]
+catNa6    CCCATGAGTTCGAACTTTGAACACGTGCTCAGTGTTGGCAATTTGGTGTTCACTGGTATTTTCACGGCTGAAATGGTGTTCAAGCTCATTGCCTTGGACCCCTTCTACTACTTCCAGGTTGGCTGGAACATATTTGACAGCATCATCGTCACTCTTAGCCTGGTGGAGTTAGGCCTGGCCAATGTGCAGGGTCTGTCTGTACTCAGATCCTTTCGTTTGCTGCGAGTCTTTAAGCTGGCTAAATCCTGGCCCACGCTCAACATGCTGATCAAAATCATTGGAAACTCTGTGGGTGCTCTGGGGAACCTGACTCTGGTGCTGGCCATCGTCGTCTTCATCTTCGCCGTCGTAGGCATGCAACTTTTTGGCAAGAGCTACAAGGACTGCGTGTGTAAGATTGCAGAGGACTGCGAACTGCCCCGCTGGCACATGAACGATTTTTTCCATTCGTTTCTCATTGTCTTCCGCATCCTTTGTGGTGA [...]
+AptNa6    ---------------------------CTCACTGTGGGGAACCTGGTGTTTACTGGCATCTTTACGGCTGAAATGGTGTTTAAGCTCATTGCCATGGACCCCTACTACTACTTCCAGGTGGGCTGGAACATCTTCGACAGCATCATCGTCACCCTCAGTCTGGTGGAGCTGGGGCTAGCCAACGTGCAGGGTCTGTCTGTGCTCAGGTCCTTCCGTTTGCTGCGTGTCTTCAAGTTGGCCAAGTCCTGGCCAACGCTCAATATGCTCATCAAGATCATTGGCAACTCGGTGGGAGCCCTGGGCAACCTGACACTGGTGCTGGCCATTATTGTCTTCATCTTTGCCGTGGTGGGCATGCAGCTATTTGGGAAGAGCTACAAGGACTGCGTGTGCAAGATTGCGCTGGACTGCGAGCTTCCCCGCTGGCACATGACGGACTTCTTCCACTCCTTCCTGATCGTGTTCCGCATCCTATGCGGCGA [...]
+PinniNa6  CCCATGAGTGAAACGTTTGATTACGTCCTCAGCACAGGGAACCTGGTGTTTACCATCATCTTTGCAGCTGAAATGGTCTTGAAGCTCATTGCCATGGACCCCTACTACTACTTCCAGCAGACGTGGAACATCTTTGACTTTTTCATTGTCTCACTCAGTCTGGTGGAGATGGGACTGGCTAACATGCAGGGGCTGTCAGTGCTTAGGTCCTTTCGACTGCTGCGTATCTTTAAGTTGGCCAAGTCCTGGCCCACGCTCAATATTCTGATCAAGATCATCTGCAACTCGGTGGGCGCCCTGGGAAACCTGACCATCGTGCTGGCCATTATCGTCTTCATCTTCGCCTTGGTGGGCATGCAGCTGTTCGGGAAGAATTACAAAGAGTTTGTGTGCAAGATCAGTGCAGACTGTACGCTGCCTCGCTGGCATATGAATGACTTCTTCCATTCCTTCCTGATTGTGTTCCGCTGCCTGTGCGGCGA [...]
+tetra     CCCATGACCCAGGAGTTCGACTACATGCTTTCAGTGGGAAATCTGGTTTTCACAGGAATTTTTGCAGCAGAAATGTTCTTCAAGCTGATCGCCATGGATCCGTACTACTATTTCCAAGTTGGCTGGAACATTTTTGACAGCATCATTGTCACCCTCAGCCTGGTAGAGTTGGGGCTTGCGAACGTCCAGGGCCTGTCTGTCCTCAGGTCCTTCCGCCTGCTCCGTGTCTTCAAACTTGCCAAATCCTGGCCCACACTCAACATGCTGATCAAGATTATTGGGAGCTCAGTTGGAGCGCTAGGGAATCTGACGTTGGTGCTGGCCATCATCGTCTTCATCTTCGCTGTGGTGGGGATGCAGCTCTTTGGCAAAAGCTACAAGGACTGCGTGTGCAAGATTTCCACGGAGTGCGAGCTGCCGCGCTGGCACATGAATGACTTCTTCCACTCCTTCCTCATCGTCTTCCGCATCCTGTGTGGCGA [...]
+;
+end;
+
diff --git a/tests/data/z.11x2178.wtset.nex b/tests/data/z.11x2178.wtset.nex
new file mode 100644
index 0000000..4c8e9f4
--- /dev/null
+++ b/tests/data/z.11x2178.wtset.nex
@@ -0,0 +1,41 @@
+#NEXUS
+
+[
+This dataset is from:
+Zakon, Lu, Zwickl and Hillis. 2006. Sodium channel genes and the evolution of diversity in communication signals of electric fishes: Convergent molecular evolution. Proc. Natl. Acad. Sci. USA. 103(10):3675-80.
+]
+
+begin data;
+dimensions ntax=11 nchar=2180;
+format datatype=dna missing=? gap=-;
+matrix
+MorNa6    CCTGTGACTCCACATTTTGAGCACGTACTCAGTGTGGGAAACCTGGTTTTCTCAGGGATATTTGCTGGTGAAATGGTCTTGAAAATTATTGCTATGGACCCCTACTACTACTTCCAGGTTGGATGGAACGTGTTTGACAGCATCATTGTTACCATGAGTATGGTGGAGATGGTACTGGCTGATGTAGAGGGTCTGTCGGTTCTGCGGTCCTTTCGTTTGCTACGTGTCTTCAAGCTTGCCAAATCATGGCCTACCCTCAACATGCTGCTAACGATCATCGGAAACTCAGTGGGTGCTCTGGGGAACCTCACCGTGGTGCTGGCCATCATCGTTTTCATCTTCGCTGTGGTTGGAATGCAGCTGTTTGCCAAAAACTACAAGGACTGCGTCTGCAAGATCGCCGAGGATTGTGAGCTGCCCCGGTGGCACATGCATGACTTCTTCCACTCTTTCCTCATCGTGTTCCGCATCCTCTGTGGAGA [...]
+ClownNa6  CCCATGAGCCCTGAGTTTGACCACATGCTCTCTGTGGGAAACCTGGTTTTCACTGGAATCTTCACAGCTGAAATGGTCCTAAAACTCATTGCTATGGACCCCTACTACTACTTCCAGGTTGGATGGAACATATTTGACAGCATCATTGTCACTCTAAGCCTAGTGGAACTGGGGCTCGCTAATGTTCAGGGTCTGTCAGTCCTGCGATCCTTTCGTTTGTTGCGAGTGTTCAAGCTGGCAAAGTCTTGGCCCACCCTCAACATGCTGATCAAGATCATCGGGAATTCCGTGGGCGCCCTGGGCAACCTGACCCTGGTGCTGGCCATCATCGTCTTCATCTTCGCCGTGGTGGGCATGCAGCTCTTTGGGAAGACCTACAAGGACTGCGTGTGCAAGATTGCCAGTGACTGCGAGCTTCCCCGCTGGCACATGAATGACTTCTTCCACTCGTTCCTTATCGTGTTCCGCATCCTCTGCGGGGA [...]
+AraNa6    CCAATGAGTCCCGCGTTTGACCATATGCTGACCGTGGGAAACCTCGTTTTTACGGGGATCTTTACAGCTGAGATGGTATTCAAGCTCATCGCCATGGATCCATACCACTACTTCCAGGTTGGATGGAACATTTTTGACAGCATCATTGTCACACTTAGCCTGGTGGAGCTGGGTCTCGCGAATGTTCAGGGCCTTTCGGTCTTGCGCTCCTTCCGCTTGCTGCGGGTCTTCAAGCTGGCCAAGTCTTGGCCTACCCTGAACATGCTCATCAAGATCATTGGAAACTCAGTGGGTGCCCTAGGGAACCTCACACTGGTGCTGGCCATCATCGTCTTCATCTTCGCTGTCGTGGGCATGCAGCTGTTCGGTAAGAGCTACAAGGACTGTGTGTGTAAGATTGCAGAGGACTGTGAGCTACCCCGCTGGCACATGAATGACTTCTTCCACTCCTTCCTCATCGTGTTCCGCATCTTGTGTGGCGA [...]
+puffNa6   CCCATGACCGAAGAGTTCGACTACATGCTTTCAGTGGGAAATCTGGTTTTCACAGGAATCTTCGCGGCGGAAATGTTCTTCAAATTGATCGCCATGGATCCGTACTACTATTTCCAAGTTGGCTGGAACATTTTTGACAGCATCATCGTCACGCTCAGTCTGGTGGAGTTAGGGCTTGCAAACGTCCAGGGGCTGTCCGTCCTCAGGTCCTTCCGTCTGCTTCGGGTCTTCAAACTTGCCAAGTCCTGGCCCACGCTCAACATGCTGATCAAGATTATCGGTAATTCAGTTGGAGCTTTAGGGAATCTGACTTTGGTGCTGGCCATCATCGTCTTCATCTTCGCTGTGGTGGGGATGCAGCTCTTCGGCAAAAGCTACAAGGACTGTGTGTGCAAGATTTCCTCCGACTGCGAGCTGCCACGCTGGCACATGAATGACTTCTTCCACTCCTTCCTCATCGTGTTCCGCATCCTGTGCGGCGA [...]
+NewZebra  CCTATGAGTCCACATTTTGAACATGTCCTCTCAGTGGGCAACTTGGTGTTCACAGGAATCTTCACAGCTGAAATGGTGTTCAAGCTTATAGCTATGGACCCTTACTACTACTTCCAGGTGGGCTGGAACATTTTTGACAGCATCATTGTCACACTCAGCCTGGTGGAGTTGGGACTGGCCAACGTTCAGGGATTGTCCGTTCTAAGGTCCTTTCGTTTGCTACGTGTCTTCAAACTGGCTAAATCTTGGCCCACCCTTAACATGCTGATCAAGATCATCGGCAACTCAGTGGGTGCTCTAGGGAACCTAACACTTGTTCTGGCCATCATTGTCTTCATCTTTGCCGTGGTGGGCATGCAGCTTTTTGGAAAAAGCTACAAGGACTGCGTTTGTAAGATCTCTGAGGATTGCGAGCTGCCCCGCTGGCACATGAACGACTTCTTCCACTCATTCCTCATCGTCTTTCGGATCTTATGTGGAGA [...]
+SterNa6   CCCATGAGCGAAACCTTTCAACACGTGCTCACCATAGGGAACCTGGTGTTTACTACCATCTTTACGGCTGAAATGGTGTCGAAGATCATCGCCCTGGACCCTTACTACTACTTCCAGGTGGGCTGGAACATCTTCGACTGCATCATCGTCACTCTCAGTCTGGTGGAGCTAAGCCTATCCAACATGCCGGGCCTGTCTGTGCTCAGATCCTTTCGTTTGATGCGTATTTTCAAGCTGGCCAAGTCCTGGCCCACGCTCAACATGCTGATCAAGATCATCGGCAACTCAATGGGCGCCCTGGGGAACCTGACCTTCGTGTTGGCCATCGTCATCTTCATCTTCGCCGTGGTGGGCTTCCAGCTGTTCGGGAAGAGCTACAAGGACAACGTGTGCAAGGTCAGCGCGGACTGCACGCTGCCTCGCTGGCACATGAACGACTTCTTCCACTCCTTCCTGATCGTGTTTCGCATCCTGTGCGGCGA [...]
+eelNa6    CCCATGAACGAAAGCTTTCAGAGTCTGCTCAGTGCAGGAAACCTGGTGTTTACCACTATCTTTGCGGCTGAAATGGTGTTGAAGATCATTGCCTTGGACCCCTACTACTACTTCCAGCAGACGTGGAACATATTTGACAGCATCATTGTCAGTCTCAGTCTGTTGGAGCTTGGACTATCCAATATGCAAGGAATGTCTGTGCTCAGATCCTTACGTTTGCTGCGTATCTTCAAATTGGCCAAGTCCTGGCCCACGCTCAACATTCTGATCAAGATAATCTGCAACTCGGTGGGCGCTCTGGGCAACCTGACCATTGTGCTGGCCATTATCGTCTTCATCTTCGCCTTGGTGGGCTTTCAGCTGTTCGGAAAGAACTACAAGGAGTACGTGTGCAAGATCTCTGATGACTGTGAGCTGCCCCGCTGGCACATGAATGACTTCTTCCACTCCTTCCTGATTGTGTTCCGTGCCTTGTGTGGCGA [...]
+catNa6    CCCATGAGTTCGAACTTTGAACACGTGCTCAGTGTTGGCAATTTGGTGTTCACTGGTATTTTCACGGCTGAAATGGTGTTCAAGCTCATTGCCTTGGACCCCTTCTACTACTTCCAGGTTGGCTGGAACATATTTGACAGCATCATCGTCACTCTTAGCCTGGTGGAGTTAGGCCTGGCCAATGTGCAGGGTCTGTCTGTACTCAGATCCTTTCGTTTGCTGCGAGTCTTTAAGCTGGCTAAATCCTGGCCCACGCTCAACATGCTGATCAAAATCATTGGAAACTCTGTGGGTGCTCTGGGGAACCTGACTCTGGTGCTGGCCATCGTCGTCTTCATCTTCGCCGTCGTAGGCATGCAACTTTTTGGCAAGAGCTACAAGGACTGCGTGTGTAAGATTGCAGAGGACTGCGAACTGCCCCGCTGGCACATGAACGATTTTTTCCATTCGTTTCTCATTGTCTTCCGCATCCTTTGTGGTGA [...]
+AptNa6    ---------------------------CTCACTGTGGGGAACCTGGTGTTTACTGGCATCTTTACGGCTGAAATGGTGTTTAAGCTCATTGCCATGGACCCCTACTACTACTTCCAGGTGGGCTGGAACATCTTCGACAGCATCATCGTCACCCTCAGTCTGGTGGAGCTGGGGCTAGCCAACGTGCAGGGTCTGTCTGTGCTCAGGTCCTTCCGTTTGCTGCGTGTCTTCAAGTTGGCCAAGTCCTGGCCAACGCTCAATATGCTCATCAAGATCATTGGCAACTCGGTGGGAGCCCTGGGCAACCTGACACTGGTGCTGGCCATTATTGTCTTCATCTTTGCCGTGGTGGGCATGCAGCTATTTGGGAAGAGCTACAAGGACTGCGTGTGCAAGATTGCGCTGGACTGCGAGCTTCCCCGCTGGCACATGACGGACTTCTTCCACTCCTTCCTGATCGTGTTCCGCATCCTATGCGGCGA [...]
+PinniNa6  CCCATGAGTGAAACGTTTGATTACGTCCTCAGCACAGGGAACCTGGTGTTTACCATCATCTTTGCAGCTGAAATGGTCTTGAAGCTCATTGCCATGGACCCCTACTACTACTTCCAGCAGACGTGGAACATCTTTGACTTTTTCATTGTCTCACTCAGTCTGGTGGAGATGGGACTGGCTAACATGCAGGGGCTGTCAGTGCTTAGGTCCTTTCGACTGCTGCGTATCTTTAAGTTGGCCAAGTCCTGGCCCACGCTCAATATTCTGATCAAGATCATCTGCAACTCGGTGGGCGCCCTGGGAAACCTGACCATCGTGCTGGCCATTATCGTCTTCATCTTCGCCTTGGTGGGCATGCAGCTGTTCGGGAAGAATTACAAAGAGTTTGTGTGCAAGATCAGTGCAGACTGTACGCTGCCTCGCTGGCATATGAATGACTTCTTCCATTCCTTCCTGATTGTGTTCCGCTGCCTGTGCGGCGA [...]
+tetra     CCCATGACCCAGGAGTTCGACTACATGCTTTCAGTGGGAAATCTGGTTTTCACAGGAATTTTTGCAGCAGAAATGTTCTTCAAGCTGATCGCCATGGATCCGTACTACTATTTCCAAGTTGGCTGGAACATTTTTGACAGCATCATTGTCACCCTCAGCCTGGTAGAGTTGGGGCTTGCGAACGTCCAGGGCCTGTCTGTCCTCAGGTCCTTCCGCCTGCTCCGTGTCTTCAAACTTGCCAAATCCTGGCCCACACTCAACATGCTGATCAAGATTATTGGGAGCTCAGTTGGAGCGCTAGGGAATCTGACGTTGGTGCTGGCCATCATCGTCTTCATCTTCGCTGTGGTGGGGATGCAGCTCTTTGGCAAAAGCTACAAGGACTGCGTGTGCAAGATTTCCACGGAGTGCGAGCTGCCGCGCTGGCACATGAATGACTTCTTCCACTCCTTCCTCATCGTCTTCCGCATCCTGTGTGGCGA [...]
+;
+end;
+
+begin assumptions;
+[These sites are identical:
+1929, 1995 (inform)
+750, 816 (inform)
+1009, 1012, 1019, 1022 (const)
+
+last two chars of all taxa are missing, the last of which is excluded
+the wtset exactly counteracts the exset
+]
+exset * zeroWeight = 1995 816 1012 1019 1022 2180;
+wtset * compensate = 1:1-749 751-1008 1010-1928 1930-., 2:1929 750, 4:1009;
+
+[exset * zeroWeight = 162 167 234;]
+[wtset * equal = 1: 1-141, 4:142, 0:162 167 234, 1:144-161, 1:163-166 168-233 235-.;]
+[wtset * equal = 1: 1-141, 4:142, 1:162 167 234, 1:143-161, 1:163-166 168-233 235-.;]
+end;
diff --git a/tests/data/z.11x30.AA.fas b/tests/data/z.11x30.AA.fas
new file mode 100755
index 0000000..a0dcdc2
--- /dev/null
+++ b/tests/data/z.11x30.AA.fas
@@ -0,0 +1,22 @@
+>MorNa6    
+PVTPHFEHVL-
+>ClownNa6  
+PMSPEFDHML-
+>AraNa6    
+PMSPAFDHML-
+>puffNa6   
+PMTEEFDYML-
+>NewZebra  
+PMSPHFEHVL-
+>SterNa6   
+PMSETFQHVL-
+>eelNa6    
+PMNESFQSLL-
+>catNa6    
+PMSSNFEHVL-
+>AptNa6    
+---------L-
+>PinniNa6  
+PMSETFDYVL-
+>tetra     
+PMTQEFDYML-
diff --git a/tests/data/z.11x30.phy b/tests/data/z.11x30.phy
new file mode 100644
index 0000000..070a06d
--- /dev/null
+++ b/tests/data/z.11x30.phy
@@ -0,0 +1,12 @@
+11 30
+MorNa6   CCTGTGACTCCACATTTTGAGCACGTACTC
+ClownNa6 CCCATGAGCCCTGAGTTTGACCACATGCTC
+AraNa6   CCAATGAGTCCCGCGTTTGACCATATGCTG
+puffNa6  CCCATGACCGAAGAGTTCGACTACATGCTT
+NewZebra CCTATGAGTCCACATTTTGAACATGTCCTC
+SterNa6  CCCATGAGCGAAACCTTTCAACACGTGCTC
+eelNa6   CCCATGAACGAAAGCTTTCAGAGTCTGCTC
+catNa6   CCCATGAGTTCGAACTTTGAACACGTGCTC
+AptNa6   ---------------------------CTC
+PinniNa6 CCCATGAGTGAAACGTTTGATTACGTCCTC
+tetra    CCCATGACCCAGGAGTTCGACTACATGCTT
diff --git a/tests/data/z.11x30.stop.nex b/tests/data/z.11x30.stop.nex
new file mode 100644
index 0000000..3ab91d1
--- /dev/null
+++ b/tests/data/z.11x30.stop.nex
@@ -0,0 +1,19 @@
+#NEXUS 
+
+Begin data;
+	Dimensions ntax=11 nchar=33;
+	Format datatype=dna gap=-;
+	Matrix
+MorNa6   CCTGTGACTCCACATTTTGAGCACGTACTCTAA
+ClownNa6 CCCATGAGCCCTGAGTTTGACCACATGCTCTAA
+AraNa6   CCAATGAGTCCCGCGTTTGACCATATGCTG---
+puffNa6  CCCATGACCGAAGAGTTCGACTACATGCTT---
+NewZebra CCTATGAGTCCACATTTTGAACATGTCCTC---
+SterNa6  CCCATGAGCGAAACCTTTCAACACGTGCTC---
+eelNa6   CCCATGAACGAAAGCTTTCAGAGTCTGCTC---
+catNa6   CCCATGAGTTCGAACTTTGAACACGTGCTC---
+AptNa6   ---------------------------CTC---
+PinniNa6 CCCATGAGTGAAACGTTTGATTACGTCCTC---
+tetra    CCCATGACCCAGGAGTTCGACTACATGCTT---
+	;
+End;
diff --git a/tests/data/z.11x30.wackyNames.nex b/tests/data/z.11x30.wackyNames.nex
new file mode 100644
index 0000000..9ef3312
--- /dev/null
+++ b/tests/data/z.11x30.wackyNames.nex
@@ -0,0 +1,19 @@
+#NEXUS 
+
+Begin data;
+	Dimensions ntax=11 nchar=30;
+	Format datatype=dna gap=-;
+	Matrix
+Mor_Na6   CCTGTGACTCCACATTTTGAGCACGTACTC
+'Clown Na6' CCCATGAGCCCTGAGTTTGACCACATGCTC
+'Ara-Na6'   CCAATGAGTCCCGCGTTTGACCATATGCTG
+'puff -Na6'  CCCATGACCGAAGAGTTCGACTACATGCTT
+'New_Zebra' CCTATGAGTCCACATTTTGAACATGTCCTC
+'Ster_-Na6'  CCCATGAGCGAAACCTTTCAACACGTGCTC
+eelNa6   CCCATGAACGAAAGCTTTCAGAGTCTGCTC
+catNa6   CCCATGAGTTCGAACTTTGAACACGTGCTC
+AptNa6   ---------------------------CTC
+PinniNa6 CCCATGAGTGAAACGTTTGATTACGTCCTC
+tetra    CCCATGACCCAGGAGTTCGACTACATGCTT
+	;
+End;
diff --git a/tests/data/z.byPos.11x2178.nex b/tests/data/z.byPos.11x2178.nex
new file mode 100644
index 0000000..3e147b4
--- /dev/null
+++ b/tests/data/z.byPos.11x2178.nex
@@ -0,0 +1,36 @@
+#NEXUS
+
+[
+This dataset is from:
+Zakon, Lu, Zwickl and Hillis. 2006. Sodium channel genes and the evolution of diversity in communication signals of electric fishes: Convergent molecular evolution. Proc. Natl. Acad. Sci. USA. 103(10):3675-80.
+]
+
+begin data;
+dimensions ntax=11 nchar=2178;
+format datatype=dna missing=? gap=-;
+matrix
+MorNa6    CCTGTGACTCCACATTTTGAGCACGTACTCAGTGTGGGAAACCTGGTTTTCTCAGGGATATTTGCTGGTGAAATGGTCTTGAAAATTATTGCTATGGACCCCTACTACTACTTCCAGGTTGGATGGAACGTGTTTGACAGCATCATTGTTACCATGAGTATGGTGGAGATGGTACTGGCTGATGTAGAGGGTCTGTCGGTTCTGCGGTCCTTTCGTTTGCTACGTGTCTTCAAGCTTGCCAAATCATGGCCTACCCTCAACATGCTGCTAACGATCATCGGAAACTCAGTGGGTGCTCTGGGGAACCTCACCGTGGTGCTGGCCATCATCGTTTTCATCTTCGCTGTGGTTGGAATGCAGCTGTTTGCCAAAAACTACAAGGACTGCGTCTGCAAGATCGCCGAGGATTGTGAGCTGCCCCGGTGGCACATGCATGACTTCTTCCACTCTTTCCTCATCGTGTTCCGCATCCTCTGTGGAGA [...]
+ClownNa6  CCCATGAGCCCTGAGTTTGACCACATGCTCTCTGTGGGAAACCTGGTTTTCACTGGAATCTTCACAGCTGAAATGGTCCTAAAACTCATTGCTATGGACCCCTACTACTACTTCCAGGTTGGATGGAACATATTTGACAGCATCATTGTCACTCTAAGCCTAGTGGAACTGGGGCTCGCTAATGTTCAGGGTCTGTCAGTCCTGCGATCCTTTCGTTTGTTGCGAGTGTTCAAGCTGGCAAAGTCTTGGCCCACCCTCAACATGCTGATCAAGATCATCGGGAATTCCGTGGGCGCCCTGGGCAACCTGACCCTGGTGCTGGCCATCATCGTCTTCATCTTCGCCGTGGTGGGCATGCAGCTCTTTGGGAAGACCTACAAGGACTGCGTGTGCAAGATTGCCAGTGACTGCGAGCTTCCCCGCTGGCACATGAATGACTTCTTCCACTCGTTCCTTATCGTGTTCCGCATCCTCTGCGGGGA [...]
+AraNa6    CCAATGAGTCCCGCGTTTGACCATATGCTGACCGTGGGAAACCTCGTTTTTACGGGGATCTTTACAGCTGAGATGGTATTCAAGCTCATCGCCATGGATCCATACCACTACTTCCAGGTTGGATGGAACATTTTTGACAGCATCATTGTCACACTTAGCCTGGTGGAGCTGGGTCTCGCGAATGTTCAGGGCCTTTCGGTCTTGCGCTCCTTCCGCTTGCTGCGGGTCTTCAAGCTGGCCAAGTCTTGGCCTACCCTGAACATGCTCATCAAGATCATTGGAAACTCAGTGGGTGCCCTAGGGAACCTCACACTGGTGCTGGCCATCATCGTCTTCATCTTCGCTGTCGTGGGCATGCAGCTGTTCGGTAAGAGCTACAAGGACTGTGTGTGTAAGATTGCAGAGGACTGTGAGCTACCCCGCTGGCACATGAATGACTTCTTCCACTCCTTCCTCATCGTGTTCCGCATCTTGTGTGGCGA [...]
+puffNa6   CCCATGACCGAAGAGTTCGACTACATGCTTTCAGTGGGAAATCTGGTTTTCACAGGAATCTTCGCGGCGGAAATGTTCTTCAAATTGATCGCCATGGATCCGTACTACTATTTCCAAGTTGGCTGGAACATTTTTGACAGCATCATCGTCACGCTCAGTCTGGTGGAGTTAGGGCTTGCAAACGTCCAGGGGCTGTCCGTCCTCAGGTCCTTCCGTCTGCTTCGGGTCTTCAAACTTGCCAAGTCCTGGCCCACGCTCAACATGCTGATCAAGATTATCGGTAATTCAGTTGGAGCTTTAGGGAATCTGACTTTGGTGCTGGCCATCATCGTCTTCATCTTCGCTGTGGTGGGGATGCAGCTCTTCGGCAAAAGCTACAAGGACTGTGTGTGCAAGATTTCCTCCGACTGCGAGCTGCCACGCTGGCACATGAATGACTTCTTCCACTCCTTCCTCATCGTGTTCCGCATCCTGTGCGGCGA [...]
+NewZebra  CCTATGAGTCCACATTTTGAACATGTCCTCTCAGTGGGCAACTTGGTGTTCACAGGAATCTTCACAGCTGAAATGGTGTTCAAGCTTATAGCTATGGACCCTTACTACTACTTCCAGGTGGGCTGGAACATTTTTGACAGCATCATTGTCACACTCAGCCTGGTGGAGTTGGGACTGGCCAACGTTCAGGGATTGTCCGTTCTAAGGTCCTTTCGTTTGCTACGTGTCTTCAAACTGGCTAAATCTTGGCCCACCCTTAACATGCTGATCAAGATCATCGGCAACTCAGTGGGTGCTCTAGGGAACCTAACACTTGTTCTGGCCATCATTGTCTTCATCTTTGCCGTGGTGGGCATGCAGCTTTTTGGAAAAAGCTACAAGGACTGCGTTTGTAAGATCTCTGAGGATTGCGAGCTGCCCCGCTGGCACATGAACGACTTCTTCCACTCATTCCTCATCGTCTTTCGGATCTTATGTGGAGA [...]
+SterNa6   CCCATGAGCGAAACCTTTCAACACGTGCTCACCATAGGGAACCTGGTGTTTACTACCATCTTTACGGCTGAAATGGTGTCGAAGATCATCGCCCTGGACCCTTACTACTACTTCCAGGTGGGCTGGAACATCTTCGACTGCATCATCGTCACTCTCAGTCTGGTGGAGCTAAGCCTATCCAACATGCCGGGCCTGTCTGTGCTCAGATCCTTTCGTTTGATGCGTATTTTCAAGCTGGCCAAGTCCTGGCCCACGCTCAACATGCTGATCAAGATCATCGGCAACTCAATGGGCGCCCTGGGGAACCTGACCTTCGTGTTGGCCATCGTCATCTTCATCTTCGCCGTGGTGGGCTTCCAGCTGTTCGGGAAGAGCTACAAGGACAACGTGTGCAAGGTCAGCGCGGACTGCACGCTGCCTCGCTGGCACATGAACGACTTCTTCCACTCCTTCCTGATCGTGTTTCGCATCCTGTGCGGCGA [...]
+eelNa6    CCCATGAACGAAAGCTTTCAGAGTCTGCTCAGTGCAGGAAACCTGGTGTTTACCACTATCTTTGCGGCTGAAATGGTGTTGAAGATCATTGCCTTGGACCCCTACTACTACTTCCAGCAGACGTGGAACATATTTGACAGCATCATTGTCAGTCTCAGTCTGTTGGAGCTTGGACTATCCAATATGCAAGGAATGTCTGTGCTCAGATCCTTACGTTTGCTGCGTATCTTCAAATTGGCCAAGTCCTGGCCCACGCTCAACATTCTGATCAAGATAATCTGCAACTCGGTGGGCGCTCTGGGCAACCTGACCATTGTGCTGGCCATTATCGTCTTCATCTTCGCCTTGGTGGGCTTTCAGCTGTTCGGAAAGAACTACAAGGAGTACGTGTGCAAGATCTCTGATGACTGTGAGCTGCCCCGCTGGCACATGAATGACTTCTTCCACTCCTTCCTGATTGTGTTCCGTGCCTTGTGTGGCGA [...]
+catNa6    CCCATGAGTTCGAACTTTGAACACGTGCTCAGTGTTGGCAATTTGGTGTTCACTGGTATTTTCACGGCTGAAATGGTGTTCAAGCTCATTGCCTTGGACCCCTTCTACTACTTCCAGGTTGGCTGGAACATATTTGACAGCATCATCGTCACTCTTAGCCTGGTGGAGTTAGGCCTGGCCAATGTGCAGGGTCTGTCTGTACTCAGATCCTTTCGTTTGCTGCGAGTCTTTAAGCTGGCTAAATCCTGGCCCACGCTCAACATGCTGATCAAAATCATTGGAAACTCTGTGGGTGCTCTGGGGAACCTGACTCTGGTGCTGGCCATCGTCGTCTTCATCTTCGCCGTCGTAGGCATGCAACTTTTTGGCAAGAGCTACAAGGACTGCGTGTGTAAGATTGCAGAGGACTGCGAACTGCCCCGCTGGCACATGAACGATTTTTTCCATTCGTTTCTCATTGTCTTCCGCATCCTTTGTGGTGA [...]
+AptNa6    ---------------------------CTCACTGTGGGGAACCTGGTGTTTACTGGCATCTTTACGGCTGAAATGGTGTTTAAGCTCATTGCCATGGACCCCTACTACTACTTCCAGGTGGGCTGGAACATCTTCGACAGCATCATCGTCACCCTCAGTCTGGTGGAGCTGGGGCTAGCCAACGTGCAGGGTCTGTCTGTGCTCAGGTCCTTCCGTTTGCTGCGTGTCTTCAAGTTGGCCAAGTCCTGGCCAACGCTCAATATGCTCATCAAGATCATTGGCAACTCGGTGGGAGCCCTGGGCAACCTGACACTGGTGCTGGCCATTATTGTCTTCATCTTTGCCGTGGTGGGCATGCAGCTATTTGGGAAGAGCTACAAGGACTGCGTGTGCAAGATTGCGCTGGACTGCGAGCTTCCCCGCTGGCACATGACGGACTTCTTCCACTCCTTCCTGATCGTGTTCCGCATCCTATGCGGCGA [...]
+PinniNa6  CCCATGAGTGAAACGTTTGATTACGTCCTCAGCACAGGGAACCTGGTGTTTACCATCATCTTTGCAGCTGAAATGGTCTTGAAGCTCATTGCCATGGACCCCTACTACTACTTCCAGCAGACGTGGAACATCTTTGACTTTTTCATTGTCTCACTCAGTCTGGTGGAGATGGGACTGGCTAACATGCAGGGGCTGTCAGTGCTTAGGTCCTTTCGACTGCTGCGTATCTTTAAGTTGGCCAAGTCCTGGCCCACGCTCAATATTCTGATCAAGATCATCTGCAACTCGGTGGGCGCCCTGGGAAACCTGACCATCGTGCTGGCCATTATCGTCTTCATCTTCGCCTTGGTGGGCATGCAGCTGTTCGGGAAGAATTACAAAGAGTTTGTGTGCAAGATCAGTGCAGACTGTACGCTGCCTCGCTGGCATATGAATGACTTCTTCCATTCCTTCCTGATTGTGTTCCGCTGCCTGTGCGGCGA [...]
+tetra     CCCATGACCCAGGAGTTCGACTACATGCTTTCAGTGGGAAATCTGGTTTTCACAGGAATTTTTGCAGCAGAAATGTTCTTCAAGCTGATCGCCATGGATCCGTACTACTATTTCCAAGTTGGCTGGAACATTTTTGACAGCATCATTGTCACCCTCAGCCTGGTAGAGTTGGGGCTTGCGAACGTCCAGGGCCTGTCTGTCCTCAGGTCCTTCCGCCTGCTCCGTGTCTTCAAACTTGCCAAATCCTGGCCCACACTCAACATGCTGATCAAGATTATTGGGAGCTCAGTTGGAGCGCTAGGGAATCTGACGTTGGTGCTGGCCATCATCGTCTTCATCTTCGCTGTGGTGGGGATGCAGCTCTTTGGCAAAAGCTACAAGGACTGCGTGTGCAAGATTTCCACGGAGTGCGAGCTGCCGCGCTGGCACATGAATGACTTCTTCCACTCCTTCCTCATCGTCTTCCGCATCCTGTGTGGCGA [...]
+;
+end;
+
+begin sets;
+charset 1st = 1-2178\3;
+charset 2nd = 2-2178\3;
+charset 3rd = 3-2178\3;
+
+charpartition byPos = 1stpos:1st, 2ndpos:2nd, 3rdpos:3rd;
+end;
+
+begin assumptions;
+exset * test = 4 5 6;
+end;
diff --git a/tests/data/z.neg.const.tre b/tests/data/z.neg.const.tre
new file mode 100644
index 0000000..7c928aa
--- /dev/null
+++ b/tests/data/z.neg.const.tre
@@ -0,0 +1 @@
+-(MorNa6,ClownNa6,puffNa6,tetra,AraNa6,(SterNa6,eelNa6,PinniNa6,catNa6,AptNa6),NewZebra);
diff --git a/tests/data/z.negBack.const.tre b/tests/data/z.negBack.const.tre
new file mode 100644
index 0000000..416d316
--- /dev/null
+++ b/tests/data/z.negBack.const.tre
@@ -0,0 +1 @@
+-(MorNa6,ClownNa6,(puffNa6,tetra),AraNa6,PinniNa6,catNa6,AptNa6,NewZebra);
diff --git a/tests/data/z.pos.const.tre b/tests/data/z.pos.const.tre
new file mode 100644
index 0000000..df1bbfd
--- /dev/null
+++ b/tests/data/z.pos.const.tre
@@ -0,0 +1 @@
++(MorNa6,(((ClownNa6,(puffNa6,tetra)),AraNa6),((SterNa6,eelNa6),PinniNa6),catNa6,AptNa6),NewZebra);
diff --git a/tests/data/z.posBack.const.tre b/tests/data/z.posBack.const.tre
new file mode 100644
index 0000000..67c8c11
--- /dev/null
+++ b/tests/data/z.posBack.const.tre
@@ -0,0 +1 @@
++(MorNa6,(((ClownNa6,(puffNa6,tetra)),AraNa6),PinniNa6,catNa6,AptNa6),NewZebra);
diff --git a/tests/internal/a.G3.conf b/tests/internal/a.G3.conf
new file mode 100644
index 0000000..ac4d458
--- /dev/null
+++ b/tests/internal/a.G3.conf
@@ -0,0 +1,65 @@
+[general]
+datafname = data/moore.matK90-120.nex
+constraintfile = none
+streefname = data/moore.start
+attachmentspertaxon = 50
+ofprefix = int.a.G3
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outputsitelikelihoods = 0
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = codon-aminoacid
+ratematrix = jones
+statefrequencies = empirical
+ratehetmodel = gamma
+numratecats = 3
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+
diff --git a/tests/internal/a.G4.conf b/tests/internal/a.G4.conf
new file mode 100644
index 0000000..f20c2fb
--- /dev/null
+++ b/tests/internal/a.G4.conf
@@ -0,0 +1,65 @@
+[general]
+datafname = data/moore.matK90-120.nex
+constraintfile = none
+streefname = data/moore.start
+attachmentspertaxon = 50
+ofprefix = int.a.G4
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outputsitelikelihoods = 0
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = codon-aminoacid
+ratematrix = jones
+statefrequencies = empirical
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+
diff --git a/tests/internal/a.conf b/tests/internal/a.conf
new file mode 100644
index 0000000..cba7a2e
--- /dev/null
+++ b/tests/internal/a.conf
@@ -0,0 +1,65 @@
+[general]
+datafname = data/moore.matK90-120.nex
+constraintfile = none
+streefname = data/moore.start
+attachmentspertaxon = 50
+ofprefix = int.a
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outputsitelikelihoods = 2
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = codon-aminoacid
+ratematrix = jones
+statefrequencies = empirical
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+
diff --git a/tests/internal/c.M3x2.conf b/tests/internal/c.M3x2.conf
new file mode 100644
index 0000000..b78b54a
--- /dev/null
+++ b/tests/internal/c.M3x2.conf
@@ -0,0 +1,67 @@
+[general]
+datafname = data/z.11x30.stop.nex
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = int.c.M3x2
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outputsitelikelihoods = 0
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+ignorestopcodons = 1
+
+datatype = codon
+geneticcode = standard
+ratematrix = 6rate
+statefrequencies = f3x4
+ratehetmodel = nonsynonymous
+numratecats = 2
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+
diff --git a/tests/internal/c.conf b/tests/internal/c.conf
new file mode 100644
index 0000000..77c4adb
--- /dev/null
+++ b/tests/internal/c.conf
@@ -0,0 +1,65 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = int.c
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outputsitelikelihoods = 0
+collapsebranches = 1
+searchreps = 1
+
+datatype = codon
+geneticcode = standard
+ratematrix = 6rate
+statefrequencies = f3x4
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+
diff --git a/tests/internal/n.G3.conf b/tests/internal/n.G3.conf
new file mode 100644
index 0000000..5b9ee6c
--- /dev/null
+++ b/tests/internal/n.G3.conf
@@ -0,0 +1,65 @@
+[general]
+datafname = data/moore.matK90-120.nex
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = int.n.G3
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+outputsitelikelihoods = 0
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 3
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/internal/n.G4.conf b/tests/internal/n.G4.conf
new file mode 100644
index 0000000..d6d68e8
--- /dev/null
+++ b/tests/internal/n.G4.conf
@@ -0,0 +1,64 @@
+[general]
+datafname = data/moore.matK90-120.nex
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = int.n.G4
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+outputsitelikelihoods = 0
+collapsebranches = 1
+searchreps = 1
+
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/internal/n.conf b/tests/internal/n.conf
new file mode 100644
index 0000000..a0d735f
--- /dev/null
+++ b/tests/internal/n.conf
@@ -0,0 +1,65 @@
+[general]
+datafname = data/moore.matK90-120.nex
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = int.n
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+outputsitelikelihoods = 0
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = nucleotide
+ratematrix = 1rate
+statefrequencies = estimate
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/internal/p.3diff.conf b/tests/internal/p.3diff.conf
new file mode 100644
index 0000000..0e75468
--- /dev/null
+++ b/tests/internal/p.3diff.conf
@@ -0,0 +1,82 @@
+[general]
+datafname = data/z.byPos.11x2178.nex
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = int.p.3diff
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 5000
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+searchreps = 1
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 1
+
+[model1]
+datatype = nucleotide
+ratematrix = ( 0 1 2 2 3 4 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = none
+
+[model2]
+datatype = nucleotide
+ratematrix = ( 0 1 2 1 0 3 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = none
+
+[model3]
+datatype = nucleotide
+ratematrix = ( 0 1 2 3 1 0 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 5
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/internal/p.mk.conf b/tests/internal/p.mk.conf
new file mode 100644
index 0000000..2cfaa88
--- /dev/null
+++ b/tests/internal/p.mk.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = int.mk
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 0
+optimizeinputonly = 1
+
+[model1]
+datatype = standard
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/internal/p.mk.ssr.conf b/tests/internal/p.mk.ssr.conf
new file mode 100644
index 0000000..765c7e7
--- /dev/null
+++ b/tests/internal/p.mk.ssr.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = int.mk.ssr
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 1
+optimizeinputonly = 1
+
+[model1]
+datatype = standard
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/internal/p.mkO.conf b/tests/internal/p.mkO.conf
new file mode 100644
index 0000000..7f9f61b
--- /dev/null
+++ b/tests/internal/p.mkO.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = int.mkO
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 0
+optimizeinputonly = 1
+
+[model1]
+datatype = standardordered
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/internal/p.mkO.ssr.conf b/tests/internal/p.mkO.ssr.conf
new file mode 100644
index 0000000..1f08bcc
--- /dev/null
+++ b/tests/internal/p.mkO.ssr.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = int.mkO.ssr
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 1
+optimizeinputonly = 1
+
+[model1]
+datatype = standardordered
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/internal/p.mkv.conf b/tests/internal/p.mkv.conf
new file mode 100644
index 0000000..c47b3d8
--- /dev/null
+++ b/tests/internal/p.mkv.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = int.mkv
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 0
+optimizeinputonly = 1
+
+[model1]
+datatype = standardvariable
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/internal/p.mkv.ssr.conf b/tests/internal/p.mkv.ssr.conf
new file mode 100644
index 0000000..076018a
--- /dev/null
+++ b/tests/internal/p.mkv.ssr.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = int.mkv.ssr
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 1
+optimizeinputonly = 1
+
+[model1]
+datatype = standardvariable
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/internal/p.mkvO.conf b/tests/internal/p.mkvO.conf
new file mode 100644
index 0000000..9a02a26
--- /dev/null
+++ b/tests/internal/p.mkvO.conf
@@ -0,0 +1,67 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = int.mkvO
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 0
+optimizeinputonly = 1
+
+[model1]
+datatype = standardorderedvariable
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/internal/p.mkvO.ssr.conf b/tests/internal/p.mkvO.ssr.conf
new file mode 100644
index 0000000..5fa94cf
--- /dev/null
+++ b/tests/internal/p.mkvO.ssr.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = int.mkvO.ssr
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 1
+optimizeinputonly = 1
+
+[model1]
+datatype = standardorderedvariable
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/output/a.G3.conf b/tests/output/a.G3.conf
new file mode 100644
index 0000000..1bbf3bd
--- /dev/null
+++ b/tests/output/a.G3.conf
@@ -0,0 +1,67 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = out.a.G3
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 1
+outputmostlyuselessfiles = 1
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+outputsitelikelihoods = 1
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = codon-aminoacid
+ratematrix = jones
+statefrequencies = empirical
+ratehetmodel = gamma
+numratecats = 3
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 1
+
diff --git a/tests/output/a.G4.conf b/tests/output/a.G4.conf
new file mode 100644
index 0000000..386b30e
--- /dev/null
+++ b/tests/output/a.G4.conf
@@ -0,0 +1,67 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = out.a.G4
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 1
+outputmostlyuselessfiles = 1
+writecheckpoints = 0
+restart = 0
+outgroup = 1-2
+outputsitelikelihoods = 1
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = codon-aminoacid
+ratematrix = jones
+statefrequencies = empirical
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 1
+
diff --git a/tests/output/a.conf b/tests/output/a.conf
new file mode 100644
index 0000000..b04c068
--- /dev/null
+++ b/tests/output/a.conf
@@ -0,0 +1,67 @@
+[general]
+datafname = data/z.11x30.AA.fas
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = out.a
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 1
+outputmostlyuselessfiles = 1
+writecheckpoints = 0
+restart = 0
+outgroup = 1-3
+outputsitelikelihoods = 1
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = aminoacid
+ratematrix = jones
+statefrequencies = empirical
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 1
+
diff --git a/tests/output/c.M3x2.conf b/tests/output/c.M3x2.conf
new file mode 100644
index 0000000..ee7a344
--- /dev/null
+++ b/tests/output/c.M3x2.conf
@@ -0,0 +1,67 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = out.c.M3x2
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 1
+outputmostlyuselessfiles = 1
+writecheckpoints = 0
+restart = 0
+outgroup = 1-5
+outputsitelikelihoods = 1
+collapsebranches = 1
+searchreps = 1
+
+datatype = codon
+geneticcode = standard
+ratematrix = 6rate
+statefrequencies = f3x4
+ratehetmodel = nonsynonymous
+numratecats = 2
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 1
+
diff --git a/tests/output/c.conf b/tests/output/c.conf
new file mode 100644
index 0000000..7667407
--- /dev/null
+++ b/tests/output/c.conf
@@ -0,0 +1,67 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = out.c
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 1
+outputmostlyuselessfiles = 1
+writecheckpoints = 0
+restart = 0
+outgroup = 5
+outputsitelikelihoods = 1
+collapsebranches = 1
+searchreps = 1
+
+datatype = codon
+geneticcode = standard
+ratematrix = 6rate
+statefrequencies = f3x4
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 1
+
diff --git a/tests/output/n.G3.conf b/tests/output/n.G3.conf
new file mode 100644
index 0000000..6412bba
--- /dev/null
+++ b/tests/output/n.G3.conf
@@ -0,0 +1,66 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = out.n.G3
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 500
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 1
+outputmostlyuselessfiles = 1
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+outputsitelikelihoods = 1
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 3
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 1
diff --git a/tests/output/n.G4.conf b/tests/output/n.G4.conf
new file mode 100644
index 0000000..ffb10f1
--- /dev/null
+++ b/tests/output/n.G4.conf
@@ -0,0 +1,66 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = out.n.G4
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 500
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 1
+outputmostlyuselessfiles = 1
+writecheckpoints = 0
+restart = 0
+outgroup = 1-4
+outputsitelikelihoods = 1
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 1
diff --git a/tests/output/n.conf b/tests/output/n.conf
new file mode 100644
index 0000000..a554806
--- /dev/null
+++ b/tests/output/n.conf
@@ -0,0 +1,66 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = out.n
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 500
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 1
+outputmostlyuselessfiles = 1
+writecheckpoints = 0
+restart = 0
+outgroup = 2-3
+outputsitelikelihoods = 1
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 1
diff --git a/tests/output/n.wackyNames.conf b/tests/output/n.wackyNames.conf
new file mode 100644
index 0000000..3136a93
--- /dev/null
+++ b/tests/output/n.wackyNames.conf
@@ -0,0 +1,66 @@
+[general]
+datafname = data/z.11x30.wackyNames.nex
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = out.n
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 500
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 1
+outputmostlyuselessfiles = 1
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+outputsitelikelihoods = 1
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/output/p.3diff.conf b/tests/output/p.3diff.conf
new file mode 100644
index 0000000..5ddda7e
--- /dev/null
+++ b/tests/output/p.3diff.conf
@@ -0,0 +1,86 @@
+[general]
+datafname = data/z.byPos.11x2178.nex
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = out.p.3diff
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+refineend = 0
+outputeachbettertopology = 1
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 5000
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 1
+outputmostlyuselessfiles = 1
+writecheckpoints = 0
+restart = 0
+outgroup = 1-2
+usepatternmanager = 1
+searchreps = 1
+collapsebranches = 1
+outputsitelikelihoods = 1
+
+linkmodels = 0
+subsetspecificrates = 1
+
+[model1]
+datatype = nucleotide
+ratematrix = ( 0 1 2 2 3 4 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = none
+
+[model2]
+datatype = nucleotide
+ratematrix = ( 0 1 2 1 0 3 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = none
+
+[model3]
+datatype = nucleotide
+ratematrix = ( 0 1 2 3 1 0 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 5
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 1
diff --git a/tests/output/p.mkvO.ssr.conf b/tests/output/p.mkvO.ssr.conf
new file mode 100644
index 0000000..3f56363
--- /dev/null
+++ b/tests/output/p.mkvO.ssr.conf
@@ -0,0 +1,69 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = out.p.mkvO.ssr
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+refineend = 0
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 5
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 1
+
+[model1]
+datatype = standardorderedvariable
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5
+stoptime = 5000000
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/restart/a.G3.conf b/tests/restart/a.G3.conf
new file mode 100644
index 0000000..4108f59
--- /dev/null
+++ b/tests/restart/a.G3.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/z.11x30.stop.nex
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = ch.a.G3
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 1
+writecheckpoints = 0
+restart = 1
+outgroup = 1-2
+outputsitelikelihoods = 0
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+ignorestopcodons = 1
+
+datatype = codon-aminoacid
+ratematrix = jones
+statefrequencies = empirical
+ratehetmodel = gamma
+numratecats = 3
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 1000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+
diff --git a/tests/restart/a.G4.conf b/tests/restart/a.G4.conf
new file mode 100755
index 0000000..37e93c6
--- /dev/null
+++ b/tests/restart/a.G4.conf
@@ -0,0 +1,67 @@
+[general]
+datafname = data/z.11x30.AA.fas
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = ch.a.G4
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 1
+writecheckpoints = 0
+restart = 1
+outgroup = 2
+outputsitelikelihoods = 1
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = aminoacid
+ratematrix = jones
+statefrequencies = empirical
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 1000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 1
+
diff --git a/tests/restart/a.conf b/tests/restart/a.conf
new file mode 100755
index 0000000..a0d26c5
--- /dev/null
+++ b/tests/restart/a.conf
@@ -0,0 +1,67 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = ch.a
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 1
+writecheckpoints = 0
+restart = 1
+outgroup = 2
+outputsitelikelihoods = 1
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = codon-aminoacid
+ratematrix = jones
+statefrequencies = empirical
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 1000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 1
+
diff --git a/tests/restart/c.M3x2.conf b/tests/restart/c.M3x2.conf
new file mode 100755
index 0000000..1054c84
--- /dev/null
+++ b/tests/restart/c.M3x2.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = ch.c.M3x2
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 10
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 1
+writecheckpoints = 0
+restart = 1
+outgroup = 1
+outputsitelikelihoods = 1
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = codon
+geneticcode = standard
+ratematrix = 6rate
+statefrequencies = f3x4
+ratehetmodel = nonsynonymous
+numratecats = 2
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 100
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 1
+
diff --git a/tests/restart/c.conf b/tests/restart/c.conf
new file mode 100644
index 0000000..4fbbfe0
--- /dev/null
+++ b/tests/restart/c.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = ch.c
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 10
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 1
+writecheckpoints = 0
+restart = 1
+outgroup = 1-2
+outputsitelikelihoods = 0
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = codon
+geneticcode = standard
+ratematrix = 6rate
+statefrequencies = f3x4
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 100
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+
diff --git a/tests/restart/g.dnaBnoZ.conf b/tests/restart/g.dnaBnoZ.conf
new file mode 100755
index 0000000..e76b5e3
--- /dev/null
+++ b/tests/restart/g.dnaBnoZ.conf
@@ -0,0 +1,76 @@
+[general]
+datafname = data/dnaGap.8x1K.nex
+constraintfile = none
+streefname = data/dnaGap.8x1K.nex
+attachmentspertaxon = 50
+ofprefix = ch.g.dnaBnoZ
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 10000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 1
+outgroup = 1
+subsetspecificrates = 1
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 2
+outputsitelikelihoods = 0
+
+
+[model1]
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[model2]
+datatype = binaryNotAllZeros
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 2
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/restart/g.dnaMix.conf b/tests/restart/g.dnaMix.conf
new file mode 100755
index 0000000..387ade7
--- /dev/null
+++ b/tests/restart/g.dnaMix.conf
@@ -0,0 +1,76 @@
+[general]
+datafname = data/dnaGap.8x1K.nex
+constraintfile = none
+streefname = data/dnaGap.8x1K.nex
+attachmentspertaxon = 50
+ofprefix = ch.g.dnaMix
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 10000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 1
+outgroup = 1
+subsetspecificrates = 0
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 2
+outputsitelikelihoods = 0
+
+
+[model1]
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[model2]
+datatype = gapmixturemodel
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 2
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/restart/n.G3.conf b/tests/restart/n.G3.conf
new file mode 100755
index 0000000..8180640
--- /dev/null
+++ b/tests/restart/n.G3.conf
@@ -0,0 +1,66 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = ch.n.G3
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 1
+writecheckpoints = 0
+restart = 1
+outgroup = 1
+outputsitelikelihoods = 1
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 3
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 10000
+stoptime = 5
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 1
diff --git a/tests/restart/n.G4.conf b/tests/restart/n.G4.conf
new file mode 100644
index 0000000..cdaf7f5
--- /dev/null
+++ b/tests/restart/n.G4.conf
@@ -0,0 +1,66 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = ch.n.G4
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 1
+writecheckpoints = 0
+restart = 1
+outgroup = 1
+outputsitelikelihoods = 0
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 10000
+stoptime = 5
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/restart/n.conf b/tests/restart/n.conf
new file mode 100755
index 0000000..7c912a3
--- /dev/null
+++ b/tests/restart/n.conf
@@ -0,0 +1,66 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = none
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = ch.n
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 1
+writecheckpoints = 0
+restart = 1
+outgroup = 1
+outputsitelikelihoods = 1
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 10000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 1
diff --git a/tests/restart/n.const.conf b/tests/restart/n.const.conf
new file mode 100755
index 0000000..f54d4cb
--- /dev/null
+++ b/tests/restart/n.const.conf
@@ -0,0 +1,66 @@
+[general]
+datafname = data/z.11x30.phy
+constraintfile = data/z.pos.const.tre
+streefname = stepwise
+attachmentspertaxon = 50
+ofprefix = ch.n.const
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refineend = 0
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 1
+writecheckpoints = 0
+restart = 1
+outgroup = 1
+outputsitelikelihoods = 1
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 10000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 1
diff --git a/tests/restart/p.3diff.conf b/tests/restart/p.3diff.conf
new file mode 100644
index 0000000..3fdbb1b
--- /dev/null
+++ b/tests/restart/p.3diff.conf
@@ -0,0 +1,84 @@
+[general]
+datafname = data/z.byPos.11x2178.nex
+constraintfile = none
+streefname = data/p.3diff.start
+attachmentspertaxon = 50
+ofprefix = ch.p.3diff
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+refineend = 0
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 5000
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 1
+usepatternmanager = 1
+searchreps = 1
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 1
+
+[model1]
+datatype = nucleotide
+ratematrix = ( 0 1 2 2 3 4 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = none
+
+[model2]
+datatype = nucleotide
+ratematrix = ( 0 1 2 1 0 3 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = none
+
+[model3]
+datatype = nucleotide
+ratematrix = ( 0 1 2 3 1 0 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 2000
+stoptime = 1
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 5
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/restart/p.mk.ssr.conf b/tests/restart/p.mk.ssr.conf
new file mode 100755
index 0000000..6134dd2
--- /dev/null
+++ b/tests/restart/p.mk.ssr.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = ch.p.mk.ssr
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 1
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 1
+
+
+[model1]
+datatype = standard
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/restart/p.mkO.ssr.conf b/tests/restart/p.mkO.ssr.conf
new file mode 100755
index 0000000..a876036
--- /dev/null
+++ b/tests/restart/p.mkO.ssr.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = ch.p.mkO.ssr
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 1
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 1
+
+
+[model1]
+datatype = standardordered
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/restart/p.mkv.ssr.conf b/tests/restart/p.mkv.ssr.conf
new file mode 100755
index 0000000..f120abb
--- /dev/null
+++ b/tests/restart/p.mkv.ssr.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = ch.p.mkv.ssr
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 1
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 1
+
+
+[model1]
+datatype = standardvariable
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 1
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/restart/p.mkvO.ssr.conf b/tests/restart/p.mkvO.ssr.conf
new file mode 100755
index 0000000..a97c896
--- /dev/null
+++ b/tests/restart/p.mkvO.ssr.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = ch.p.mkvO.ssr
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 1
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 1
+
+
+[model1]
+datatype = standardorderedvariable
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/runtests.sh b/tests/runtests.sh
new file mode 100755
index 0000000..335bb2a
--- /dev/null
+++ b/tests/runtests.sh
@@ -0,0 +1,237 @@
+#!/bin/bash
+
+if [ $# -lt 3 ];
+then
+	echo Usage: pass three, or \(optionally\) more arguments:
+	echo        '$0 <path to tests directory with data subdirectory> <path of GARLI binary> <path of NEXUSvalidator, part of NCL installation> [optional: GARLI command-line arguments]'
+	exit 1
+fi
+
+TESTS_DIR=$1
+GARLI_BIN=$2
+NEXUS_VAL=$3
+
+if [ $# -gt 3 ]
+then
+	shift; shift; shift;
+	GARLI_ARGS=$@
+fi
+
+#set this to move on to the next test after failing one
+#NO_EXIT_ON_ERR=1
+
+rm  -f *.log00.log *.screen.log *.best*.tre *.best*.tre.phy *.boot.tre *.boot.phy *treelog00.tre *treelog00.log *problog00.log *fate00.log .*lock* *swaplog* *.check out.* qout.* mpi_m* *SiteLikes.log *sitelikes.log *best.all.phy *best.phy *current.phy *internalstates.log
+
+echo "Linking to data ...."
+if [ -d data ];then
+	echo "data folder already exists"
+else
+	ln -sf $TESTS_DIR/data | exit 1
+fi
+
+echo "**************************"
+echo "Running internal tests ..."
+echo "**************************"
+
+if [ -d $TESTS_DIR/internal ];then
+	for i in $TESTS_DIR/internal/*.conf
+	do
+    		base=${i/*\/}
+    		base=${base/.conf/}
+    		echo "Running internal test $i"
+		echo "Running internal test $i" >&2
+
+	 	$GARLI_BIN -t $i $GARLI_ARGS
+		if [[ ! $? -eq 0 && ! -n "$NO_EXIT_ON_ERR" ]];then
+			exit 1
+		fi
+	done
+else
+	echo "No internal tests found ..."
+fi
+
+echo "**************************"
+echo "Running scoring tests ..."
+echo "**************************"
+
+if [ -d $TESTS_DIR/scoring ];then
+	for i in $TESTS_DIR/scoring/*.conf
+	do
+		if [ -f $i ];then
+			base=${i/*\/}
+			base=${base/.conf/}
+	
+			echo "Running scoring test $i"
+			echo "Running scoring test $i" >&2
+			$GARLI_BIN $i $GARLI_ARGS
+			if [[ ! $? -eq 0 && ! -n "$NO_EXIT_ON_ERR" ]];then
+				exit 1
+			fi
+	
+			#figure out what precision we can expect
+			if [ ! `grep "likelihood precision" scr.$base.screen.log | wc -l` -eq 0 ]
+			then
+				allowed=`grep "likelihood precision" scr.$base.screen.log | awk '{print $6}'`
+			else
+				#for partitioned models allow a bit more scoring leeway
+				if test  "${base:0:2}" = "p." 
+				then
+					allowed=0.05
+				else
+					allowed=0.01
+				fi
+			fi
+
+			#sum up the individual site likes and the full likelihood, both appearing
+			#in column 2.  Divide by 2 for the full like.  Thus, this tests that both
+			#general scoring and sitelike output are correct.
+			sum=`awk '{sum+=$2}END{printf("%.5f", sum)}' scr.$base.sitelikes.log`
+			score=`echo "scale=5; $sum / 2.0" | bc`
+			#score=`tail -1 scr.$base.sitelikes.log | awk '{print $2}'`
+
+			expect=`grep $base.conf data/expected.scr | awk '{print $2}'`
+			diff=`echo \($score\) - \($expect\) | bc`
+			echo ***********TEST**************
+			echo ***Score is $score
+			echo ***Expected is $expect
+			echo ***SCORE DIFFERENCE IS $diff
+			echo ***ALLOWED ERROR IS $allowed
+			OK=`echo "$diff < $allowed && $diff > -$allowed" | bc`
+		
+			if (( $OK ))
+			then
+				echo "***Scoring OK for $i ***"
+			else
+				echo "***Scoring test failed for $i ***"
+				if [[ ! -n "$NO_EXIT_ON_ERR" ]];then
+					exit 1
+				fi
+			fi
+		fi	
+	done
+else
+	echo "No scoring tests found ..."
+fi
+
+echo "**************************"
+echo "Running constraint tests ..."
+echo "**************************"
+
+if [ -d $TESTS_DIR/const ];then
+
+	for i in $TESTS_DIR/const/*.conf
+	do
+		base=${i/*\/}
+	        base=${base/.conf/}
+	        echo "Running constraint test $base"
+		echo "Running constraint test $base" >&2
+
+	        $GARLI_BIN $i $GARLI_ARGS
+		if [[ ! $? -eq 0 && ! -n "$NO_EXIT_ON_ERR" ]];then
+			exit 1
+		fi
+
+		#NEXUSvalidator gives a warning every time it reads a tree file
+		#without a taxa block.  So, shut it up initially and then if it
+		#fails let it output whatever error
+		$NEXUS_VAL con.$base*.tre 2> /dev/null
+		if [ $? -eq 0 ]
+	    	then
+	    		echo TREEFILES PASS
+	    	else
+	    		$NEXUS_VAL con.$base*.tre
+			if [[ ! $? -eq 0 && ! -n "$NO_EXIT_ON_ERR" ]];then
+				exit 1
+			fi
+	    	fi
+	done
+else
+	echo "No constraint tests found ..."
+fi
+
+echo "**************************"
+echo "Running output tests ..."
+echo "**************************"
+
+if [ -d $TESTS_DIR/output ];then
+
+	for i in $TESTS_DIR/output/*.conf
+	do
+		base=${i/*\/}
+		base=${base/.conf/}
+		echo "Running output test $base"
+		echo "Running output test $base" >&2
+
+		$GARLI_BIN $i $GARLI_ARGS
+		if [[ ! $? -eq 0 && ! -n "$NO_EXIT_ON_ERR" ]];then
+			exit 1
+		fi
+
+	#NEXUSvalidator gives a warning every time it reads a tree file
+	#without a taxa block.  So, shut it up initially and then if it
+	#fails let it output whatever error
+	data=`grep datafname $i | grep -o " data.*$"`
+	TESTNEX=test.out.$base.nex
+	cp $data $TESTNEX
+	cat out.$base.best.tre | grep -iv nexus >> $TESTNEX
+
+	#$NEXUS_VAL out.$base.best.tre 2> /dev/null
+	#$NEXUS_VAL $TESTNEX 2> /dev/null
+	$NEXUS_VAL $TESTNEX
+	if [ $? -eq 0 ]
+		then
+		echo "TREEFILES PASS"
+		else
+			#$NEXUS_VAL out.$base*.tre
+			$NEXUS_VAL $TESTNEX 2> /dev/null
+		if [[ ! $? -eq 0 && ! -n "$NO_EXIT_ON_ERR" ]];then
+			exit 1
+		fi
+    	fi
+	done
+else
+	echo "No output tests found ..."
+fi
+
+echo "**************************"
+echo "Running checkpoint tests ..."
+echo "**************************"
+
+if [ -d $TESTS_DIR/check ];then
+
+	for i in $TESTS_DIR/check/*.conf
+	do
+		base=${i/*\/}
+		base=${base/.conf/}
+		echo "Running checkpoint test $i"
+		echo "Running checkpoint test $i" >&2
+		
+		$GARLI_BIN $i $GARLI_ARGS
+		if [[ ! $? -eq 0 && ! -n "$NO_EXIT_ON_ERR" ]];then
+			exit 1
+		fi
+
+		$GARLI_BIN $TESTS_DIR/restart/$base.conf $GARLI_ARGS
+		if [[ ! $? -eq 0 && ! -n "$NO_EXIT_ON_ERR" ]];then
+			exit 1
+		fi
+
+		#NEXUSvalidator gives a warning every time it reads a tree file
+		#without a taxa block.  So, shut it up initially and then if it
+		#fails let it output whatever error
+		$NEXUS_VAL ch.$base*.tre 2> /dev/null
+		if [ $? -eq 0 ];then
+			echo "TREEFILES PASS"
+		else
+			$NEXUS_VAL ch.$base*.tre
+			if [[ ! $? -eq 0 && ! -n "$NO_EXIT_ON_ERR" ]];then
+				exit 1
+			fi
+		fi
+	done
+else
+	echo "No checkpoint tests found ..."
+fi
+
+echo "ALL TESTS COMPLETED SUCCESSFULLY"
+
diff --git a/tests/scoring/a.G3.conf b/tests/scoring/a.G3.conf
new file mode 100644
index 0000000..df3feb4
--- /dev/null
+++ b/tests/scoring/a.G3.conf
@@ -0,0 +1,69 @@
+[general]
+datafname = data/z.11x2178.AA.nex
+constraintfile = none
+streefname = data/a.G3.start
+attachmentspertaxon = 50
+ofprefix = scr.a.G3
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1-2
+outputsitelikelihoods = 0
+collapsebranches = 1
+optimizeinputonly = 1
+usepatternmanager = 1
+searchreps = 1
+
+parametervaluestring = M1 a 0.43677
+
+datatype = aminoacid
+ratematrix = wag
+statefrequencies = empirical
+ratehetmodel = gamma
+numratecats = 3
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+
diff --git a/tests/scoring/a.G4.conf b/tests/scoring/a.G4.conf
new file mode 100644
index 0000000..90ff19b
--- /dev/null
+++ b/tests/scoring/a.G4.conf
@@ -0,0 +1,67 @@
+[general]
+datafname = data/z.11x2178.nex
+constraintfile = none
+streefname = data/a.G4.start
+attachmentspertaxon = 50
+ofprefix = scr.a.G4
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1-5
+outputsitelikelihoods = 0
+collapsebranches = 1
+optimizeinputonly = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = codon-aminoacid
+ratematrix = fixed
+statefrequencies = empirical
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+
diff --git a/tests/scoring/a.conf b/tests/scoring/a.conf
new file mode 100644
index 0000000..e79eea0
--- /dev/null
+++ b/tests/scoring/a.conf
@@ -0,0 +1,67 @@
+[general]
+datafname = data/z.11x2178.nex
+constraintfile = none
+streefname = data/a.start
+attachmentspertaxon = 50
+ofprefix = scr.a
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+outputsitelikelihoods = 0
+collapsebranches = 1
+optimizeinputonly = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = codon-aminoacid
+ratematrix = wag
+statefrequencies = empirical
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+
diff --git a/tests/scoring/c.M3x2.conf b/tests/scoring/c.M3x2.conf
new file mode 100644
index 0000000..5c2c7a7
--- /dev/null
+++ b/tests/scoring/c.M3x2.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/z.11x2178.nex
+constraintfile = none
+streefname = data/c.M3x2.start
+attachmentspertaxon = 50
+ofprefix = scr.c.M3x2
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 0
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1-2
+outputsitelikelihoods = 0
+collapsebranches = 1
+optimizeinputonly = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = codon
+geneticcode = standard
+ratematrix = fixed
+statefrequencies = empirical
+ratehetmodel = nonsynonymous
+numratecats = 2
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 1.0
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+
diff --git a/tests/scoring/c.conf b/tests/scoring/c.conf
new file mode 100644
index 0000000..b10eaec
--- /dev/null
+++ b/tests/scoring/c.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/z.11x2178.nex
+constraintfile = none
+streefname = data/c.start
+attachmentspertaxon = 50
+ofprefix = scr.c
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 0
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1 2
+outputsitelikelihoods = 0
+collapsebranches = 1
+optimizeinputonly = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = codon
+geneticcode = standard
+ratematrix = 6rate
+statefrequencies = empirical
+ratehetmodel = nonsynonymousfixed
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
+
diff --git a/tests/scoring/g.dnaBnoZ.conf b/tests/scoring/g.dnaBnoZ.conf
new file mode 100644
index 0000000..133a5bd
--- /dev/null
+++ b/tests/scoring/g.dnaBnoZ.conf
@@ -0,0 +1,76 @@
+[general]
+datafname = data/dnaGap.8x1K.nex
+constraintfile = none
+streefname = data/dnaGap.8x1K.nex
+attachmentspertaxon = 50
+ofprefix = scr.g.dnaBnoZ
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 10000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+subsetspecificrates = 1
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 2
+outputsitelikelihoods = 0
+optimizeinputonly = 1
+
+[model1]
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[model2]
+datatype = binaryNotAllZeros
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 2
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/scoring/g.dnaMix.conf b/tests/scoring/g.dnaMix.conf
new file mode 100644
index 0000000..4d01fb2
--- /dev/null
+++ b/tests/scoring/g.dnaMix.conf
@@ -0,0 +1,76 @@
+[general]
+datafname = data/dnaGap.8x1K.nex
+constraintfile = none
+streefname = data/dnaGap.8x1K.nex
+attachmentspertaxon = 50
+ofprefix = scr.g.dnaMix
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 10000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+subsetspecificrates = 0
+collapsebranches = 1
+usepatternmanager = 1
+searchreps = 2
+outputsitelikelihoods = 0
+optimizeinputonly = 1
+
+[model1]
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[model2]
+datatype = gapmixturemodel
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 2
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/scoring/n.G4.conf b/tests/scoring/n.G4.conf
new file mode 100644
index 0000000..c29b864
--- /dev/null
+++ b/tests/scoring/n.G4.conf
@@ -0,0 +1,66 @@
+[general]
+datafname = data/z.11x2178.wtset.nex
+constraintfile = none
+streefname = data/n.G4.start
+attachmentspertaxon = 50
+ofprefix = scr.n.G4
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 2
+outputsitelikelihoods = 0
+collapsebranches = 1
+optimizeinputonly = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/scoring/n.G5.conf b/tests/scoring/n.G5.conf
new file mode 100644
index 0000000..4b0439f
--- /dev/null
+++ b/tests/scoring/n.G5.conf
@@ -0,0 +1,66 @@
+[general]
+datafname = data/z.11x2178.wtset.nex
+constraintfile = none
+streefname = data/n.G5.start
+attachmentspertaxon = 50
+ofprefix = scr.n.G5
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 2000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1
+outputsitelikelihoods = 0
+collapsebranches = 1
+optimizeinputonly = 1
+usepatternmanager = 1
+searchreps = 1
+
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 5
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/scoring/n.conf b/tests/scoring/n.conf
new file mode 100644
index 0000000..d4bd9ae
--- /dev/null
+++ b/tests/scoring/n.conf
@@ -0,0 +1,66 @@
+[general]
+datafname = data/z.11x2178.wtset.nex
+constraintfile = none
+streefname = data/n.start
+attachmentspertaxon = 50
+ofprefix = scr.n
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 1000
+scorethreshforterm = 0.05
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+outgroup = 1-3
+outputsitelikelihoods = 1
+collapsebranches = 1
+optimizeinputonly = 0
+usepatternmanager = 1
+searchreps = 1
+
+datatype = nucleotide
+ratematrix = 6rate
+statefrequencies = estimate
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 1
+treerejectionthreshold = 50.0
+topoweight = 1.0
+modweight = 0.05
+brlenweight = 0.2
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/scoring/p.3diff.conf b/tests/scoring/p.3diff.conf
new file mode 100644
index 0000000..51c5e5f
--- /dev/null
+++ b/tests/scoring/p.3diff.conf
@@ -0,0 +1,83 @@
+[general]
+datafname = data/z.byPos.11x2178.nex
+constraintfile = none
+streefname = data/p.3diff.start
+attachmentspertaxon = 50
+ofprefix = scr.p.3diff
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 5000
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+searchreps = 5
+collapsebranches = 1
+optimizeinputonly = 1
+
+linkmodels = 0
+subsetspecificrates = 1
+
+[model1]
+datatype = nucleotide
+ratematrix = ( 0 1 2 2 3 4 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = none
+
+[model2]
+datatype = nucleotide
+ratematrix = ( 0 1 2 1 0 3 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = none
+
+[model3]
+datatype = nucleotide
+ratematrix = ( 0 1 2 3 1 0 )
+statefrequencies = estimate
+ratehetmodel = gamma
+numratecats = 4
+invariantsites = estimate
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.5
+minoptprec = 0.01
+numberofprecreductions = 5
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/scoring/p.mk.conf b/tests/scoring/p.mk.conf
new file mode 100644
index 0000000..810ba39
--- /dev/null
+++ b/tests/scoring/p.mk.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = scr.p.mk
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 0
+optimizeinputonly = 1
+
+[model1]
+datatype = standard
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/scoring/p.mk.ssr.conf b/tests/scoring/p.mk.ssr.conf
new file mode 100644
index 0000000..7c06975
--- /dev/null
+++ b/tests/scoring/p.mk.ssr.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = scr.p.mk.ssr
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 1
+optimizeinputonly = 1
+
+[model1]
+datatype = standard
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/scoring/p.mkO.conf b/tests/scoring/p.mkO.conf
new file mode 100644
index 0000000..1b5903a
--- /dev/null
+++ b/tests/scoring/p.mkO.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = scr.p.mkO
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 0
+optimizeinputonly = 1
+
+[model1]
+datatype = standardordered
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/scoring/p.mkO.ssr.conf b/tests/scoring/p.mkO.ssr.conf
new file mode 100644
index 0000000..ceffe58
--- /dev/null
+++ b/tests/scoring/p.mkO.ssr.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = scr.p.mkO.ssr
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 1
+optimizeinputonly = 1
+
+[model1]
+datatype = standardordered
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/scoring/p.mkv.conf b/tests/scoring/p.mkv.conf
new file mode 100644
index 0000000..f53c1ab
--- /dev/null
+++ b/tests/scoring/p.mkv.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = scr.p.mkv
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 0
+optimizeinputonly = 1
+
+[model1]
+datatype = standardvariable
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/scoring/p.mkv.ssr.conf b/tests/scoring/p.mkv.ssr.conf
new file mode 100644
index 0000000..7858f0a
--- /dev/null
+++ b/tests/scoring/p.mkv.ssr.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = scr.p.mkv.ssr
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 1
+optimizeinputonly = 1
+
+[model1]
+datatype = standardvariable
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/scoring/p.mkvO.conf b/tests/scoring/p.mkvO.conf
new file mode 100644
index 0000000..8498acb
--- /dev/null
+++ b/tests/scoring/p.mkvO.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = scr.p.mkvO
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 0
+optimizeinputonly = 1
+
+[model1]
+datatype = standardorderedvariable
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/scoring/p.mkvO.ssr.conf b/tests/scoring/p.mkvO.ssr.conf
new file mode 100644
index 0000000..2a0bf0f
--- /dev/null
+++ b/tests/scoring/p.mkvO.ssr.conf
@@ -0,0 +1,68 @@
+[general]
+datafname = data/L2001.30x52.nex
+constraintfile = none
+streefname = data/L.start
+attachmentspertaxon = 100
+ofprefix = scr.p.mkvO.ssr
+randseed = -1
+availablememory = 512
+logevery = 10
+saveevery = 100
+refinestart = 1
+outputeachbettertopology = 0
+outputcurrentbesttopology = 0
+enforcetermconditions = 1
+genthreshfortopoterm = 100
+scorethreshforterm = 0.001
+significanttopochange = 0.01
+outputphyliptree = 0
+outputmostlyuselessfiles = 0
+writecheckpoints = 0
+restart = 0
+usepatternmanager = 1
+searchreps = 5
+collapsebranches = 1
+
+linkmodels = 0
+subsetspecificrates = 1
+optimizeinputonly = 1
+
+[model1]
+datatype = standardorderedvariable
+ratematrix = 1rate
+statefrequencies = equal
+ratehetmodel = none
+numratecats = 1
+invariantsites = none
+
+[master]
+nindivs = 4
+holdover = 1
+selectionintensity = 0.5
+holdoverpenalty = 0
+stopgen = 5000000
+stoptime = 5000000
+
+startoptprec = 0.01
+minoptprec = 0.01
+numberofprecreductions = 10
+treerejectionthreshold = 50.0
+topoweight = 0.01
+modweight = 0.002
+brlenweight = 0.002
+randnniweight = 0.1
+randsprweight = 0.3
+limsprweight =  0.6
+intervallength = 100
+intervalstostore = 5
+
+limsprrange = 6
+meanbrlenmuts = 5
+gammashapebrlen = 1000
+gammashapemodel = 1000
+uniqueswapbias = 0.1
+distanceswapbias = 1.0
+
+bootstrapreps = 0
+resampleproportion = 1.0
+inferinternalstateprobs = 0
diff --git a/tests/scoring/runScoring.sh b/tests/scoring/runScoring.sh
new file mode 100755
index 0000000..62ad180
--- /dev/null
+++ b/tests/scoring/runScoring.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+
+echo $score
+
+expect=14498.88532
+echo $expect
+
+line=1
+
+for i in *.conf
+do
+	$TESTING_EXEC $i
+	score=`tail -1 scr.${i%.conf}.sitelikes.log | awk '{print $2}'`
+	expect=`head -n$line data/expected.scr | tail -n1`
+	diff=`echo \($score\) - \($expect\) | bc`
+	echo ***********TEST**************
+	echo ***Score is $score
+	echo ***Excpected is $expect
+	echo ***SCORE DIFFERENCE IS $diff
+	OK=`echo "$diff < 0.01 && $diff > -0.01" | bc`
+
+	if (( $OK ))
+	then
+		echo ***Score OK***
+	else
+		echo ***Score Not OK***
+		exit 1
+	fi
+	line=`expr $line + 1`
+done
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/garli.git



More information about the debian-med-commit mailing list