[med-svn] [libpll] 02/05: New upstream version 0.3.0

Andreas Tille tille at debian.org
Mon May 15 07:52:52 UTC 2017


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

tille pushed a commit to branch master
in repository libpll.

commit d3809d0a3fd9a2550002ec766bbf155ddc64dee4
Author: Andreas Tille <tille at debian.org>
Date:   Mon May 15 08:46:10 2017 +0200

    New upstream version 0.3.0
---
 .gitignore                                         |    6 +
 .travis.yml                                        |   98 +-
 ChangeLog.md                                       |   34 +
 configure.ac                                       |   75 +-
 debian/changelog                                   |    5 -
 debian/clean                                       |   18 -
 debian/compat                                      |    1 -
 debian/control                                     |   50 -
 debian/copyright                                   |  673 --
 debian/get-orig-source                             |   35 -
 debian/rules                                       |   21 -
 debian/source/format                               |    1 -
 debian/upstream/metadata                           |    7 -
 debian/watch                                       |    7 -
 examples/Makefile.am                               |    1 +
 examples/heterotachy/heterotachy.c                 |    2 +-
 examples/lg4/lg4.c                                 |  146 +-
 examples/load-utree/load-utree.c                   |   27 +-
 examples/{unrooted => newick-export}/Makefile      |    6 +-
 examples/newick-export/newick-export.c             |  191 +
 examples/newick-export/target.mk                   |    2 +
 examples/newick-fasta-rooted/.gitignore            |    1 +
 examples/newick-fasta-rooted/newick-fasta-rooted.c |   94 +-
 examples/newick-fasta-unrooted/.gitignore          |    2 +
 .../newick-fasta-unrooted/newick-fasta-unrooted.c  |  123 +-
 .../newick-phylip-unrooted.c                       |  124 +-
 examples/newton/newton.c                           |    4 +-
 examples/parsimony/npr-pars.c                      |   79 +-
 examples/partial-traversal/.gitignore              |    1 +
 examples/partial-traversal/partial.c               |  125 +-
 examples/protein-list/.gitignore                   |    1 +
 examples/protein-list/protein-list.c               |  117 +-
 examples/rooted-tacg/rooted-tacg.c                 |    2 +-
 examples/rooted/rooted.c                           |    2 +-
 examples/{unrooted => stepwise}/Makefile           |    4 +-
 examples/stepwise/stepwise.c                       |  243 +
 examples/stepwise/target.mk                        |    2 +
 examples/unrooted/.gitignore                       |    1 +
 examples/unrooted/Makefile                         |    2 +-
 examples/unrooted/unrooted.c                       |    4 +-
 m4/ax_check_compile_flag.m4                        |   74 +
 m4/ax_ext.m4                                       |  303 +
 m4/ax_gcc_x86_avx_xgetbv.m4                        |   79 +
 m4/ax_gcc_x86_cpuid.m4                             |   90 +
 man/libpll.3                                       |   10 +
 src/Makefile.am                                    |   72 +-
 src/core_derivatives.c                             |  267 +-
 src/core_derivatives_avx.c                         |  775 ++-
 src/core_derivatives_avx2.c                        |  692 ++
 src/core_derivatives_sse.c                         |  231 +-
 src/core_likelihood.c                              |  396 +-
 src/core_likelihood_avx.c                          |  403 +-
 src/core_likelihood_avx2.c                         |  430 ++
 src/core_likelihood_sse.c                          |  209 +-
 src/core_partials.c                                |  326 +-
 src/core_partials_avx.c                            |  598 +-
 src/core_partials_avx2.c                           |  702 ++
 src/core_partials_sse.c                            |  197 +-
 src/core_pmatrix.c                                 |   92 +-
 src/core_pmatrix_avx.c                             |  527 +-
 src/core_pmatrix_avx2.c                            |  269 +
 src/core_pmatrix_sse.c                             |  112 +-
 src/derivatives.c                                  |  115 +-
 src/fast_parsimony.c                               |  774 +++
 src/fast_parsimony_avx.c                           |  404 ++
 src/fast_parsimony_avx2.c                          |  399 ++
 src/fast_parsimony_sse.c                           |  345 +
 src/fasta.c                                        |    2 +-
 src/gamma.c                                        |   25 +-
 src/hardware.c                                     |  121 +
 test/src/common.h => src/init.c                    |   35 +-
 src/lex_phylip.l                                   |   93 -
 src/lex_rtree.l                                    |   58 +-
 src/lex_utree.l                                    |   58 +-
 src/likelihood.c                                   |   34 +-
 src/maps.c                                         |   72 +-
 src/models.c                                       |   94 +-
 src/output.c                                       |    4 +-
 src/parse_phylip.y                                 |  229 -
 src/parse_rtree.y                                  |  224 +-
 src/parse_utree.y                                  |  286 +-
 src/parsimony.c                                    |   70 +-
 src/partials.c                                     |    1 +
 src/phylip.c                                       |  736 ++
 src/pll.c                                          |   42 +-
 src/pll.h                                          |  927 ++-
 src/random.c                                       |  393 ++
 src/rtree.c                                        |  206 +-
 src/stepwise.c                                     |  546 ++
 src/utree.c                                        |  353 +-
 src/utree_moves.c                                  |   28 +-
 src/utree_svg.c                                    |  138 +-
 test/.gitignore                                    |    5 +
 test/Makefile                                      |   21 +-
 test/README.md                                     |   26 +
 test/out/00010_NMDU_lkcalc.out                     |   98 +
 test/out/00011_NMAU_lkcalc.out                     |  354 +
 test/out/00012_NMOU_lkcalc.out                     |  146 +
 test/out/00020_NMDR_lkcalc.out                     |   98 +
 test/out/00021_NMAR_lkcalc.out                     |  354 +
 test/out/00022_NMOR_lkcalc.out                     |  146 +
 test/out/00030_NMDU_gamma.out                      |  205 +
 test/out/00032_NMOU_gamma.out                      | 2443 +++++++
 ...{fasta-dna.exe.out => 00110_NPDN_fasta.exe.out} |    0
 test/out/{fasta-dna.out => 00110_NPDN_fasta.out}   |    0
 ...fasta-prot.exe.out => 00120_NPAN_fasta.exe.out} |    0
 test/out/{fasta-prot.out => 00120_NPAN_fasta.out}  |    0
 test/out/alpha-cats.out                            | 7135 ++++++++++++++++++--
 test/out/asc-bias.out                              |   92 +-
 test/out/derivatives-oddstates.out                 |  972 +--
 test/out/derivatives.out                           |  972 +--
 test/out/odd-states.out                            | 1228 ----
 test/out/scaling.out                               |   64 +
 test/runtest.py                                    |   39 +-
 test/src/00010_NMDU_lkcalc.c                       |  210 +
 test/src/00011_NMAU_lkcalc.c                       |  200 +
 test/src/00012_NMOU_lkcalc.c                       |  221 +
 test/src/00020_NMDR_lkcalc.c                       |  222 +
 test/src/00021_NMAR_lkcalc.c                       |  211 +
 test/src/00022_NMOR_lkcalc.c                       |  246 +
 test/src/00030_NMDU_gamma.c                        |  251 +
 test/src/{odd-states.c => 00032_NMOU_gamma.c}      |  154 +-
 test/src/{fasta-dna.c => 00110_NPDN_fasta.c}       |    2 +-
 test/src/{fasta-prot.c => 00120_NPAN_fasta.c}      |    0
 test/src/README.md                                 |    7 +
 test/src/alpha-cats.c                              |  154 +-
 test/src/asc-bias.c                                |  180 +-
 test/src/common.c                                  |   77 +-
 test/src/common.h                                  |   17 +-
 test/src/derivatives-oddstates.c                   |   10 +-
 test/src/derivatives.c                             |   10 +-
 test/src/hky.c                                     |    2 +-
 test/src/partial-traversal.c                       |  129 +-
 test/src/protein-models.c                          |    2 +-
 test/src/rooted-tipinner.c                         |   61 +-
 test/src/rooted.c                                  |   67 +-
 test/src/scaling.c                                 |  338 +
 137 files changed, 26745 insertions(+), 6427 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6f15c03
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+src/libpll.so
+src/parse_rtree.h
+src/parse_utree.h
+src/parse_phylip.h
+*.o$
+*.so
diff --git a/.travis.yml b/.travis.yml
index e04b388..d205bfa 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,97 @@
 language: c
 
-compiler:
-  - gcc
-  - clang
+matrix:
+  include:
+    - os: linux
+      compiler: gcc
+      addons:
+        apt:
+          sources: ['ubuntu-toolchain-r-test']
+          packages: ['gcc-4.8']
+      env:
+        - COMPILER=gcc-4.8
 
-script: ./autogen.sh && ./configure && make && make check
+    - os: linux
+      compiler: gcc
+      addons:
+        apt:
+          sources: ['ubuntu-toolchain-r-test']
+          packages: ['gcc-4.9']
+      env:
+        - COMPILER=gcc-4.9
+
+    - os: linux
+      compiler: gcc
+      addons:
+        apt:
+          sources: ['ubuntu-toolchain-r-test']
+          packages: ['g++-5']
+      env:
+        - COMPILER=gcc-5
+
+    - os: linux
+      compiler: gcc
+      addons:
+        apt:
+          sources: ['ubuntu-toolchain-r-test']
+          packages: ['gcc-6']
+      env:
+        - COMPILER=gcc-6
+
+    - os: linux
+      compiler: clang
+      addons:
+        apt:
+          sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.5']
+          packages: ['clang-3.5']
+      env:
+        - COMPILER=clang-3.5
+
+    - os: linux
+      compiler: clang
+      addons:
+        apt:
+          sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.6']
+          packages: ['clang-3.6']
+      env:
+        - COMPILER=clang-3.6
+
+    - os: linux
+      compiler: clang
+      addons:
+        apt:
+          sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.7']
+          packages: ['clang-3.7']
+      env:
+        - COMPILER=clang-3.7
+
+    - os: linux
+      compiler: clang
+      addons:
+        apt:
+          sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.8']
+          packages: ['clang-3.8']
+      env:
+        - COMPILER=clang-3.8
+
+    - os: linux
+      dist: trusty
+      compiler: clang
+      addons:
+        apt:
+          sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-3.9']
+          packages: ['clang-3.9']
+      env:
+        - COMPILER=clang-3.9
+
+    - os: linux
+      dist: trusty
+      compiler: clang
+      addons:
+        apt:
+          sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-4.0']
+          packages: ['clang-4.0']
+      env:
+        - COMPILER=clang-4.0
+
+script: ./autogen.sh && CC=$COMPILER ./configure && make && make check
diff --git a/ChangeLog.md b/ChangeLog.md
index 207a1db..ed3e43e 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -2,6 +2,40 @@
 All notable changes to `libpll` will be documented in this file.
 This project adheres to [Semantic Versioning](http://semver.org/).
 
+## [0.3.0] - 2017-05-15
+### Added
+ - Run-time detection of cpu features
+ - Vectorized (AVX) computation of 20-state transition probability matrices
+ - Faster tip-inner kernels for 20-state models
+ - Improved AVX vectorization of derivatives
+ - Faster PHYLIP parser
+ - vectorized scaling for 20-state and arbitrary-state models
+ - AVX2 vectorizations for partials, likelihood and derivatives
+ - Unweighted parsimony functions including SSE, AVX and AVX2 vectorizations
+ - Randomized stepwise addition
+ - Portable functions for parsing trees from a C-string
+ - Optional per-rate category scalers to prevent numerical underflows on large
+   trees
+ - Setting of identity matrix if all exponentiations of eigenvalues multiplied
+   by branch length and rate are approximately equal to one
+ - Re-entrant cross-platform pseudo-random number generator
+ - Wrapper tree structures
+ - Custom exporting of tree structures using a callback function
+ - Support for median category rates in discrete gamma model
+ 
+### Fixed
+ - Derivatives computation
+ - Parsing of branch lengths in newick trees
+ - Invariant sites computation
+ - Multiplication of log-likelihood with pattern weight after scaling term
+ - Added destructors for eliminating memory leaks when tree parsing fails
+ - Sumtable computation when having multiple substitution matrices
+ - Ascertainment bias computation
+ - Per-site log-likelihood computation
+ - Uninitialized values in testing framework
+
+
+
 ## [0.2.0] - 2016-09-09
 ### Added
  - Methods for ascertainment bias correction (Lewis, Felsenstein, Stamatakis)
diff --git a/configure.ac b/configure.ac
index 8e5ffcc..62ba2db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.63])
-AC_INIT([libpll], [0.2.0], [Tomas.Flouri at h-its.org])
+AC_INIT([libpll], [0.3.0], [Tomas.Flouri at h-its.org])
 AM_INIT_AUTOMAKE([subdir-objects])
 AC_LANG([C])
 AC_CONFIG_SRCDIR([src/pll.c])
@@ -50,29 +50,41 @@ AC_FUNC_ALLOCA
 AC_FUNC_REALLOC
 AC_CHECK_FUNCS([asprintf memcpy memset posix_memalign])
 
+have_avx2=no
 have_avx=no
-have_sse=no
+have_sse3=no
 have_ps2pdf=no
 
-AX_EXT
-
-if test "x${ax_cv_have_avx_ext}" = "xyes"; then
-  have_avx=yes
-fi
-
-if test "x${ax_cv_have_sse3_ext}" = "xyes"; then
-  have_sse=yes
-fi
-
-AC_ARG_ENABLE(avx, AS_HELP_STRING([--disable-avx], [Build without AVX support]))
-AS_IF([test "x${ax_cv_have_avx_ext}" = "xyes"], [
-  have_avx=yes
-])
-
-AC_ARG_ENABLE(sse,i AS_HELP_STRING([--disable-sse],[Build without SSE support]))
-AS_IF([test "x${ax_cv_have_sse3_ext}" = "xyes"], [
-  have_sse=yes
-])
+# Compile-time detection of processor features - now disabled
+#AX_EXT
+#
+#if test "x${ax_cv_have_fma3_ext}" = "xyes"; then
+#  have_avx2=yes
+#fi
+#
+#if test "x${ax_cv_have_avx_ext}" = "xyes"; then
+#  have_avx=yes
+#fi
+#
+#if test "x${ax_cv_have_sse3_ext}" = "xyes"; then
+#  have_sse3=yes
+#fi
+#
+#AC_ARG_ENABLE(avx2, AS_HELP_STRING([--disable-avx2], [Build without AVX2/FMA support]))
+#AS_IF([test "x${ax_cv_have_fma3_ext}" = "xyes"], [
+#  have_avx2=yes
+#])
+#
+#AC_ARG_ENABLE(avx, AS_HELP_STRING([--disable-avx], [Build without AVX support]))
+#AS_IF([test "x${ax_cv_have_avx_ext}" = "xyes"], [
+#  have_avx=yes
+#])
+#
+#AC_ARG_ENABLE(sse, AS_HELP_STRING([--disable-sse],[Build without SSE support]))
+#AS_IF([test "x${ax_cv_have_sse3_ext}" = "xyes"], [
+#  have_sse3=yes
+#])
+#
 
 AC_ARG_ENABLE(pdfman, AS_HELP_STRING([--disable-pdfman], [Disable PDF manual creation]))
 AS_IF([test "x$enable_pdfman" != "xno"], [
@@ -84,8 +96,27 @@ AS_IF([test "x$enable_pdfman" != "xno"], [
   fi
 ])
 
+AC_ARG_ENABLE(sse, AS_HELP_STRING([--disable-sse], [Build without SSE support]))
+AS_IF([test "x$enable_sse" != "xno"], [
+  have_sse3=yes
+  AC_DEFINE([HAVE_SSE3], [1], [Define to 1 to support Streaming SIMD Extensions 3])
+])
+
+AC_ARG_ENABLE(avx, AS_HELP_STRING([--disable-avx], [Build without AVX support]))
+AS_IF([test "x$enable_avx" != "xno"], [
+  have_avx=yes
+  AC_DEFINE([HAVE_AVX], [1], [Define to 1 to support Advanced Vector Extensions])
+])
+
+AC_ARG_ENABLE(avx2, AS_HELP_STRING([--disable-avx2], [Build without AVX2/FMA support]))
+AS_IF([test "x$enable_avx2" != "xno"], [
+  have_avx2=yes
+  AC_DEFINE([HAVE_AVX2], [1], [Define to 1 to support Advanced Vector Extensions 2])
+])
+
+AM_CONDITIONAL(HAVE_AVX2, test "x${have_avx2}" = "xyes")
 AM_CONDITIONAL(HAVE_AVX, test "x${have_avx}" = "xyes")
-AM_CONDITIONAL(HAVE_SSE, test "x${have_sse}" = "xyes")
+AM_CONDITIONAL(HAVE_SSE3, test "x${have_sse3}" = "xyes")
 AM_CONDITIONAL(HAVE_PS2PDF, test "x${have_ps2pdf}" = "xyes")
 AM_PROG_CC_C_O
 
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644
index 7298ea6..0000000
--- a/debian/changelog
+++ /dev/null
@@ -1,5 +0,0 @@
-libpll (0.0+20160909-1) unstable; urgency=low
-
-  * Initial release (Closes: #861529)
-
- -- Andreas Tille <tille at debian.org>  Sun, 30 Apr 2017 13:55:29 +0200
diff --git a/debian/clean b/debian/clean
deleted file mode 100644
index db28d00..0000000
--- a/debian/clean
+++ /dev/null
@@ -1,18 +0,0 @@
-src/*.a
-src/*.la
-src/.dirstamp
-Makefile
-libtool
-stamp-h1
-m4/l*.m4
-Makefile.in
-*/Makefile.in
-aclocal.m4
-compile
-config.*
-configure
-depcomp
-install-sh
-ltmain.sh
-missing
-ylwrap
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 85b028f..0000000
--- a/debian/control
+++ /dev/null
@@ -1,50 +0,0 @@
-Source: libpll
-Section: science
-Priority: optional
-Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
-Uploaders: Andreas Tille <tille at debian.org>
-Build-Depends: debhelper (>= 10),
-               d-shlibs,
-               bison,
-               flex,
-               autoconf-archive
-Standards-Version: 3.9.8
-Vcs-Browser: https://anonscm.debian.org/cgit/debian-med/libpll.git
-Vcs-Git: https://anonscm.debian.org/git/debian-med/libpll.git
-Homepage: http://www.libpll.org/
-
-Package: libpll0
-Section: libs
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: Phylogenetic Likelihood Library
- PLL is a highly optimized, parallelized software library to ease the
- development of new software tools dealing with phylogenetic inference.
- .
- Among the functions included in PLL are parsing multiple sequence
- alignments (MSA) from PHYLIP and FASTA files, reading Newick trees,
- performing topological moves such as SPR and NNI, model optimization,
- likelihood evaluation and partitioned analysis by assigning different
- substitution models to each partition of the MSA. PLL fully implements
- the GTR nucleotide substitution model for DNA data and a number of
- models for aminoacid data.
- .
- This package contains the dynamic library.
-
-Package: libpll-dev
-Section: libdevel
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, libpll0 (= ${binary:Version})
-Description: Phylogenetic Likelihood Library (development)
- PLL is a highly optimized, parallelized software library to ease the
- development of new software tools dealing with phylogenetic inference.
- .
- Among the functions included in PLL are parsing multiple sequence
- alignments (MSA) from PHYLIP and FASTA files, reading Newick trees,
- performing topological moves such as SPR and NNI, model optimization,
- likelihood evaluation and partitioned analysis by assigning different
- substitution models to each partition of the MSA. PLL fully implements
- the GTR nucleotide substitution model for DNA data and a number of
- models for aminoacid data.
- .
- This package contains the static library and the header file.
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100644
index 9171936..0000000
--- a/debian/copyright
+++ /dev/null
@@ -1,673 +0,0 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Name: PLL
-Upstream-Contact: Tomas Flouri <Tomas.Flouri at h-its.org>
-Source: https://github.com/xflouris/libpll
-
-Files: *
-Copyright: 2013-2017 Diego Darriba <Diego.Darriba at h-its.org>
-                     Tomas Flouri <Tomas.Flouri at h-its.org>
-License: AFFERO-3
-
-Files: debian/*
-Copyright: 2017 Andreas Tille <tille at debian.org>
-License: AFFERO-3
-
-License: AFFERO-3
- 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 Affero General Public License is a free, copyleft license for
- software and other kinds of works, specifically designed to ensure
- cooperation with the community in the case of network server software.
- .
-  The licenses for most software and other practical works are designed
- to take away your freedom to share and change the works.  By contrast,
- our General Public Licenses are 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.
- .
-  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.
- .
-  Developers that use our General Public Licenses protect your rights
- with two steps: (1) assert copyright on the software, and (2) offer
- you this License which gives you legal permission to copy, distribute
- and/or modify the software.
- .
-  A secondary benefit of defending all users' freedom is that
- improvements made in alternate versions of the program, if they
- receive widespread use, become available for other developers to
- incorporate.  Many developers of free software are heartened and
- encouraged by the resulting cooperation.  However, in the case of
- software used on network servers, this result may fail to come about.
- The GNU General Public License permits making a modified version and
- letting the public access it on a server without ever releasing its
- source code to the public.
- .
-  The GNU Affero General Public License is designed specifically to
- ensure that, in such cases, the modified source code becomes available
- to the community.  It requires the operator of a network server to
- provide the source code of the modified version running there to the
- users of that server.  Therefore, public use of a modified version, on
- a publicly accessible server, gives the public access to the source
- code of the modified version.
- .
-  An older license, called the Affero General Public License and
- published by Affero, was designed to accomplish similar goals.  This is
- a different license, not a version of the Affero GPL, but Affero has
- released a new version of the Affero GPL which permits relicensing under
- this license.
- .
-  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 Affero 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. Remote Network Interaction; Use with the GNU General Public License.
- .
-  Notwithstanding any other provision of this License, if you modify the
- Program, your modified version must prominently offer all users
- interacting with it remotely through a computer network (if your version
- supports such interaction) an opportunity to receive the Corresponding
- Source of your version by providing access to the Corresponding Source
- from a network server at no charge, through some standard or customary
- means of facilitating copying of software.  This Corresponding Source
- shall include the Corresponding Source for any work covered by version 3
- of the GNU General Public License that is incorporated pursuant to the
- following paragraph.
- .
-  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 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 work with which it is combined will remain governed by version
- 3 of the GNU General Public License.
- .
-  14. Revised Versions of this License.
- .
-  The Free Software Foundation may publish revised and/or new versions of
- the GNU Affero 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 Affero 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 Affero 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 Affero 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
- .
-            How to Apply These Terms to Your New Programs
- .
-  If you develop a new program, and you want it to be of the greatest
- possible use to the public, the best way to achieve this is to make it
- free software which everyone can redistribute and change under these terms.
- .
-  To do so, attach the following notices to the program.  It is safest
- to attach them to the start of each source file to most effectively
- state the exclusion of warranty; and each file should have at least
- the "copyright" line and a pointer to where the full notice is found.
- .
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
- .
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU Affero 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 Affero General Public License for more details.
- .
-    You should have received a copy of the GNU Affero General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
- .
- Also add information on how to contact you by electronic and paper mail.
- .
-  If your software can interact with users remotely through a computer
- network, you should also make sure that it provides a way for users to
- get its source.  For example, if your program is a web application, its
- interface could display a "Source" link that leads users to an archive
- of the code.  There are many ways you could offer source, and different
- solutions will be better for different programs; see section 13 for the
- specific requirements.
- .
-  You should also get your employer (if you work as a programmer) or school,
- if any, to sign a "copyright disclaimer" for the program, if necessary.
- For more information on this, and how to apply and follow the GNU AGPL, see
- <http://www.gnu.org/licenses/>.
diff --git a/debian/get-orig-source b/debian/get-orig-source
deleted file mode 100755
index a5ca71b..0000000
--- a/debian/get-orig-source
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh -e
-
-COMPRESS=xz
-
-NAME=`dpkg-parsechangelog | awk '/^Source/ { print $2 }'`
-DVERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed -e 's/^[0-9]*://' -e 's/-.*//'`
-MVERSION=`dpkg-parsechangelog | awk '/^Version:/ { print $2 }' | sed 's/^\([0-9\.]\+\)[+~][-0-9]\+$/\1/'`
-
-mkdir -p ../tarballs
-cd ../tarballs
-# need to clean up the tarballs dir first because upstream tarball might
-# contain a directory with unpredictable name
-rm -rf *
-git clone --quiet https://github.com/xflouris/libpll
-cd $NAME
-VERSION=${MVERSION}+`date -d @$(git show --format="%at" | head -n1) +%Y%m%d`
-
-if [ "$DVERSION" = "$VERSION" ] ; then
-  echo "No newer upstream version than $DVERSION available."
-  cd ..
-  rm -rf ${NAME}
-  exit
-fi
-
-# for esthetical reasons set file timestamps (if git-restore-mtime is installed)
-git restore-mtime 2>/dev/null || true
-cd ..
-TARDIR=${NAME}-${VERSION}
-mv ${NAME} ${TARDIR}
-rm -rf ${TARDIR}/.git
-rm -f ${TARDIR}/jars/*
-rm -rf ${TARDIR}/m4
-
-GZIP="--best --no-name" tar --owner=root --group=root --mode=a+rX -caf "$NAME"_"$VERSION".orig.tar.${COMPRESS} "${TARDIR}"
-rm -rf ${TARDIR}
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index ffc729d..0000000
--- a/debian/rules
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/make -f
-
-# DH_VERBOSE := 1
-
-export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-
-%:
-	dh $@
-
-override_dh_auto_configure:
-	./autogen.sh
-	dh_auto_configure
-
-override_dh_install:
-	dh_install
-	d-shlibmove --commit \
-		    --multiarch \
-		    --devunversioned \
-		    --exclude-la \
-		    --movedev debian/tmp/usr/include/* usr/include \
-		    debian/tmp/usr/lib/*/*.so
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/upstream/metadata b/debian/upstream/metadata
deleted file mode 100644
index df9c8ea..0000000
--- a/debian/upstream/metadata
+++ /dev/null
@@ -1,7 +0,0 @@
-Reference:
-  Author: Fernando Izquierdo-Carrasco and Nikolaos Alachiotis and Simon Berger and Tomas Flouri and Solon P. Pissis and Alexandros Stamatakis
-  Title: A Generic Vectorization Scheme and a GPU Kernel for the Phylogenetic Likelihood Library
-  Journal: "Conference proceedings: Parallel and Distributed Processing Symposium Workshops"
-  Year: 2013
-  DOI: 10.1109/IPDPSW.2013.103
-  URL: http://ieeexplore.ieee.org/document/6650928/
diff --git a/debian/watch b/debian/watch
deleted file mode 100644
index 31f87b0..0000000
--- a/debian/watch
+++ /dev/null
@@ -1,7 +0,0 @@
-version=4
-
-http://www.libpll.org/ Downloads/libpll-(\d[.\d]+)\.tar\.gz
-
-# Asked for release tags on
-#     https://github.com/xflouris/libpll/releases
-# https://github.com/xflouris/libpll/issues/132
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 7eb6860..5218688 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -11,3 +11,4 @@ include protein-list/target.mk
 include rooted/target.mk
 include rooted-tacg/target.mk
 include unrooted/target.mk
+include stepwise/target.mk
diff --git a/examples/heterotachy/heterotachy.c b/examples/heterotachy/heterotachy.c
index 137170d..58f3f00 100644
--- a/examples/heterotachy/heterotachy.c
+++ b/examples/heterotachy/heterotachy.c
@@ -101,7 +101,7 @@ int main(int argc, char * argv[])
 
   /* fixed rate categories */
   double rate_cats[4];
-  pll_compute_gamma_cats(alpha, 4, rate_cats);
+  pll_compute_gamma_cats(alpha, 4, rate_cats, PLL_GAMMA_RATES_MEAN);
 
   /* set frequencies to the parameter sets */
   pll_set_frequencies(partition, 0, frequencies[0]);
diff --git a/examples/lg4/lg4.c b/examples/lg4/lg4.c
index b9f823f..eb09c0d 100644
--- a/examples/lg4/lg4.c
+++ b/examples/lg4/lg4.c
@@ -29,42 +29,49 @@
 
 static void fatal(const char * format, ...) __attribute__ ((noreturn));
 
+static void * xmalloc(size_t size)
+{ 
+  void * t;
+  t = malloc(size);
+  if (!t)
+    fatal("Unable to allocate enough memory.");
+  
+  return t;
+} 
+  
+static char * xstrdup(const char * s)
+{ 
+  size_t len = strlen(s);
+  char * p = (char *)xmalloc(len+1);
+  return strcpy(p,s);
+}  
+
 /* a callback function for performing a full traversal */
-static int cb_full_traversal(pll_utree_t * node)
+static int cb_full_traversal(pll_unode_t * node)
 {
   return 1;
 }
 
-static void set_missing_branch_length_recursive(pll_utree_t * tree,
-                                                double length)
+/* branch lengths not present in the newick file get a value of 0.000001 */
+static void set_missing_branch_length(pll_utree_t * tree, double length)
 {
-  if (tree)
-  {
-    /* set branch length to default if not set */
-    if (!tree->length)
-      tree->length = length;
-
-    if (tree->next)
-    {
-      if (!tree->next->length)
-        tree->next->length = length;
+  unsigned int i;
 
-      if (!tree->next->next->length)
-        tree->next->next->length = length;
+  for (i = 0; i < tree->tip_count; ++i)
+    if (!tree->nodes[i]->length)
+      tree->nodes[i]->length = length;
 
-      set_missing_branch_length_recursive(tree->next->back, length);
-      set_missing_branch_length_recursive(tree->next->next->back, length);
-    }
+  for (i = tree->tip_count; i < tree->tip_count + tree->inner_count; ++i)
+  {
+    if (!tree->nodes[i]->length)
+      tree->nodes[i]->length = length;
+    if (!tree->nodes[i]->next->length)
+      tree->nodes[i]->next->length = length;
+    if (!tree->nodes[i]->next->next->length)
+      tree->nodes[i]->next->next->length = length;
   }
 }
 
-/* branch lengths not present in the newick file get a value of 0.000001 */
-static void set_missing_branch_length(pll_utree_t * tree, double length)
-{
-  set_missing_branch_length_recursive(tree, length);
-  set_missing_branch_length_recursive(tree->back, length);
-}
-
 static void fatal(const char * format, ...)
 {
   va_list argptr;
@@ -84,7 +91,7 @@ int main(int argc, char * argv[])
   double * branch_lengths;
   pll_partition_t * partition;
   pll_operation_t * operations;
-  pll_utree_t ** travbuffer;
+  pll_unode_t ** travbuffer;
 
   /* we accept only two arguments - the newick tree (unrooted binary) and the
      alignment in the form of FASTA reads */
@@ -93,13 +100,16 @@ int main(int argc, char * argv[])
 
   /* parse the unrooted binary tree in newick format, and store the number
      of tip nodes in tip_nodes_count */
-  pll_utree_t * tree = pll_utree_parse_newick(argv[1], &tip_nodes_count);
+  pll_utree_t * tree = pll_utree_parse_newick(argv[1]);
+  if (!tree)
+    fatal("%s", pll_errmsg);
+
+  tip_nodes_count = tree->tip_count;
 
   /* fix all missing branch lengths (i.e. those that did not appear in the
      newick) to 0.000001 */
   set_missing_branch_length(tree, 0.000001);
 
-
   /* compute and show node count information */
   inner_nodes_count = tip_nodes_count - 2;
   nodes_count = inner_nodes_count + tip_nodes_count;
@@ -114,27 +124,26 @@ int main(int argc, char * argv[])
   pll_utree_show_ascii(tree, PLL_UTREE_SHOW_LABEL |
                              PLL_UTREE_SHOW_BRANCH_LENGTH |
                              PLL_UTREE_SHOW_CLV_INDEX);
-  char * newick = pll_utree_export_newick(tree);
+  char * newick = pll_utree_export_newick(tree,NULL);
   printf("%s\n", newick);
   free(newick);
- // */
-
-  /*  obtain an array of pointers to tip nodes */
-  pll_utree_t ** tipnodes = (pll_utree_t  **)calloc(tip_nodes_count,
-                                                    sizeof(pll_utree_t *));
-  pll_utree_query_tipnodes(tree, tipnodes);
+  */
 
   /* create a libc hash table of size tip_nodes_count */
   hcreate(tip_nodes_count);
 
   /* populate a libc hash table with tree tip labels */
-  unsigned int * data = (unsigned int *)malloc(tip_nodes_count *
-                                               sizeof(unsigned int));
+  unsigned int * data = (unsigned int *)xmalloc(tip_nodes_count *
+                                                sizeof(unsigned int));
   for (i = 0; i < tip_nodes_count; ++i)
   {
-    data[i] = tipnodes[i]->clv_index;
+    data[i] = tree->nodes[i]->clv_index;
     ENTRY entry;
-    entry.key = tipnodes[i]->label;
+#ifdef __APPLE__
+    entry.key = xstrdup(tree->nodes[i]->label);
+#else
+    entry.key = tree->nodes[i]->label;
+#endif
     entry.data = (void *)(data+i);
     hsearch(entry, ENTER);
   }
@@ -229,7 +238,6 @@ int main(int argc, char * argv[])
 
   /* we no longer need these two arrays (keys and values of hash table... */
   free(data);
-  free(tipnodes);
 
   /* ...neither the sequences and the headers as they are already
      present in the form of probabilities in the tip CLVs */
@@ -243,17 +251,21 @@ int main(int argc, char * argv[])
 
   /* allocate a buffer for storing pointers to nodes of the tree in postorder
      traversal */
-  travbuffer = (pll_utree_t **)malloc(nodes_count * sizeof(pll_utree_t *));
+  travbuffer = (pll_unode_t **)xmalloc(nodes_count * sizeof(pll_unode_t *));
 
-  branch_lengths = (double *)malloc(branch_count * sizeof(double));
-  matrix_indices = (unsigned int *)malloc(branch_count * sizeof(unsigned int));
-  operations = (pll_operation_t *)malloc(inner_nodes_count *
-                                                sizeof(pll_operation_t));
+  branch_lengths = (double *)xmalloc(branch_count * sizeof(double));
+  matrix_indices = (unsigned int *)xmalloc(branch_count * sizeof(unsigned int));
+  operations = (pll_operation_t *)xmalloc(inner_nodes_count *
+                                          sizeof(pll_operation_t));
 
-  /* compute a partial traversal starting from the randomly selected
-     inner node */
+  /* compute a partial postorder traversal starting from the inner node that
+     was the the root of the parsed 'unrooted' binary tree */
+  
+  pll_unode_t * root = tree->nodes[tip_nodes_count+inner_nodes_count-1];
   unsigned int traversal_size;
-  if (!pll_utree_traverse(tree,
+
+  if (!pll_utree_traverse(root,
+                          PLL_TREE_TRAVERSE_POSTORDER,
                           cb_full_traversal,
                           travbuffer,
                           &traversal_size))
@@ -275,7 +287,7 @@ int main(int argc, char * argv[])
 
   /* compute the discretized category rates from a gamma distribution
      with alpha shape 1 and store them in rate_cats  */
-  pll_compute_gamma_cats(1.00000, 4, rate_cats);
+  pll_compute_gamma_cats(1.00000, 4, rate_cats, PLL_GAMMA_RATES_MEAN);
 
   /* set rate categories */
   pll_set_category_rates(partition, rate_cats);
@@ -323,11 +335,11 @@ int main(int argc, char * argv[])
      frequency vector is to be used */
 
   double logl = pll_compute_edge_loglikelihood(partition,
-                                               tree->clv_index,
-                                               tree->scaler_index,
-                                               tree->back->clv_index,
-                                               tree->back->scaler_index,
-                                               tree->pmatrix_index,
+                                               root->clv_index,
+                                               root->scaler_index,
+                                               root->back->clv_index,
+                                               root->back->scaler_index,
+                                               root->pmatrix_index,
                                                params_indices,
                                                NULL);
 
@@ -351,8 +363,8 @@ int main(int argc, char * argv[])
   double weights[4] = { 0.209224645, 0.224707726, 0.277599198, 0.288468431 };
   double rates[4] = { 0.498991136, 0.563680734, 0.808264032, 1.887769458 };
 
-  pll_set_category_rates (partition, rates);
-  pll_set_category_weights (partition, weights);
+  pll_set_category_rates(partition, rates);
+  pll_set_category_weights(partition, weights);
 
   /* update transition probability matrices */
   pll_update_prob_matrices(partition,
@@ -374,11 +386,11 @@ int main(int argc, char * argv[])
   pll_update_partials(partition, operations, ops_count);
 
   logl = pll_compute_edge_loglikelihood(partition,
-                                        tree->clv_index,
-                                        tree->scaler_index,
-                                        tree->back->clv_index,
-                                        tree->back->scaler_index,
-                                        tree->pmatrix_index,
+                                        root->clv_index,
+                                        root->scaler_index,
+                                        root->back->clv_index,
+                                        root->back->scaler_index,
+                                        root->pmatrix_index,
                                         params_indices,
                                         NULL);
 
@@ -391,11 +403,11 @@ int main(int argc, char * argv[])
   printf("\nLog-L (LG4X): %f\n", logl);
 
   logl = pll_compute_edge_loglikelihood(partition,
-                                        tree->back->clv_index,
-                                        tree->back->scaler_index,
-                                        tree->clv_index,
-                                        tree->scaler_index,
-                                        tree->pmatrix_index,
+                                        root->back->clv_index,
+                                        root->back->scaler_index,
+                                        root->clv_index,
+                                        root->scaler_index,
+                                        root->pmatrix_index,
                                         params_indices,
                                         NULL);
 
@@ -416,7 +428,7 @@ int main(int argc, char * argv[])
   free(operations);
 
   /* we will no longer need the tree structure */
-  pll_utree_destroy(tree);
+  pll_utree_destroy(tree,NULL);
 
   return (EXIT_SUCCESS);
 }
diff --git a/examples/load-utree/load-utree.c b/examples/load-utree/load-utree.c
index 5c647c3..07f4355 100644
--- a/examples/load-utree/load-utree.c
+++ b/examples/load-utree/load-utree.c
@@ -34,15 +34,14 @@ static void fatal(const char * format, ...)
   exit(EXIT_FAILURE);
 }
 
-pll_utree_t * load_tree_unrooted(const char * filename,
-                                 unsigned int * tip_count)
+pll_utree_t * load_tree_unrooted(const char * filename)
 {
   pll_utree_t * utree;
   pll_rtree_t * rtree;
 
-  if (!(rtree = pll_rtree_parse_newick(filename, tip_count)))
+  if (!(rtree = pll_rtree_parse_newick(filename)))
   {
-    if (!(utree = pll_utree_parse_newick(filename, tip_count)))
+    if (!(utree = pll_utree_parse_newick(filename)))
     {
       fprintf(stderr, "%s\n", pll_errmsg);
       return NULL;
@@ -52,8 +51,12 @@ pll_utree_t * load_tree_unrooted(const char * filename,
   {
     utree = pll_rtree_unroot(rtree);
 
+    pll_unode_t * root = utree->nodes[utree->tip_count+utree->inner_count-1];
+
     /* optional step if using default PLL clv/pmatrix index assignments */
-    pll_utree_reset_template_indices(utree, *tip_count);
+    pll_utree_reset_template_indices(root, utree->tip_count);
+
+    pll_rtree_destroy(rtree,NULL);
   }
 
   return utree;
@@ -61,22 +64,26 @@ pll_utree_t * load_tree_unrooted(const char * filename,
 
 int main(int argc, char * argv[])
 {
-  unsigned int tip_count;
-
   if (argc != 2)
     fatal("syntax: %s [newick]", argv[0]);
 
-  pll_utree_t * utree = load_tree_unrooted(argv[1], &tip_count);
+  pll_utree_t * utree = load_tree_unrooted(argv[1]);
   if (!utree)
     fatal("Tree must be a rooted or unrooted binary.");
 
-  char * newick = pll_utree_export_newick(utree);
+  /* select a random inner node */
+  long int r = random() % utree->inner_count;
+  pll_unode_t * root = utree->nodes[utree->tip_count + r];
+
+  /* export the tree to newick format with the selected inner node as the root
+     of the unrooted binary tree */
+  char * newick = pll_utree_export_newick(root,NULL);
 
   printf("%s\n", newick);
 
   free(newick);
 
-  pll_utree_destroy(utree);
+  pll_utree_destroy(utree,NULL);
 
   return 0;
 }
diff --git a/examples/unrooted/Makefile b/examples/newick-export/Makefile
similarity index 93%
copy from examples/unrooted/Makefile
copy to examples/newick-export/Makefile
index c6470f5..f0d9b03 100644
--- a/examples/unrooted/Makefile
+++ b/examples/newick-export/Makefile
@@ -25,14 +25,14 @@ PROFILING=-g
 WARN=-Wall -Wsign-compare
 
 CC = gcc
-CFLAGS = -Wall -g -O3 $(WARN)
+CFLAGS = -Wall -g -O3 -D_GNU_SOURCE $(WARN)
 LINKFLAGS = -L. $(PROFILING)
 LIBS=-lpll -lm
-PROG=unrooted
+PROG=newick-export
 
 all: $(PROG)
 
-OBJS=unrooted.o
+OBJS=newick-export.o
 
 $(PROG): $(OBJS)
 	$(CC) $(LINKFLAGS) -o $@ $+ $(LIBS) $(LDFLAGS)
diff --git a/examples/newick-export/newick-export.c b/examples/newick-export/newick-export.c
new file mode 100644
index 0000000..e151342
--- /dev/null
+++ b/examples/newick-export/newick-export.c
@@ -0,0 +1,191 @@
+/*
+    Copyright (C) 2015 Tomas Flouri
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Contact: Tomas Flouri <Tomas.Flouri at h-its.org>,
+    Exelixis Lab, Heidelberg Instutute for Theoretical Studies
+    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
+*/
+
+#include "pll.h"
+#include <stdarg.h>
+#include <time.h>
+
+static void fatal(const char * format, ...) __attribute__ ((noreturn));
+
+static void fatal(const char * format, ...)
+{
+  va_list argptr;
+  va_start(argptr, format);
+  vfprintf(stderr, format, argptr);
+  va_end(argptr);
+  fprintf(stderr, "\n");
+  exit(EXIT_FAILURE);
+}
+
+typedef struct nodedata_s
+{
+  double support;
+  double rvalue;
+} nodedata_t;
+
+/* a callback function that prints the following information for the two types
+ * of nodes, tips and inners:
+
+
+   for tip nodes:
+     label, branch length and support value
+   
+   for inner nodes:
+     label, branch length, support value, and a random value 
+
+   Note that this is not a standard format that can be read by all tree viewers
+
+   Check the extended newick format for a more widespread notation:
+   http://dmi.uib.es/~gcardona/BioInfo/enewick.html
+
+*/
+static char * cb_serialize(const pll_unode_t * node)
+{
+  char * s = NULL;
+  nodedata_t * nd;
+
+
+  /* inner node */
+  if (node->next)
+  {
+    /* find which node of the round-about has the data element */
+    if (node->data)
+      nd = (nodedata_t *)(node->data);
+    else if (node->next->data)
+      nd = (nodedata_t *)(node->next->data);
+    else
+      nd = (nodedata_t *)(node->next->next->data);
+
+    asprintf(&s,
+             "%s[&support=%f,rvalue=%f]:%f",
+             node->label ? node->label : "",
+             nd->support,
+             nd->rvalue,
+             node->length);
+  }
+  else
+  {
+    nd = (nodedata_t *)(node->data);
+    asprintf(&s,
+             "%s[&support=%f]:%f",
+             node->label ? node->label : "",
+             nd->support,
+             node->length);
+  }
+
+  return s;
+}
+
+pll_utree_t * load_tree_unrooted(const char * filename)
+{
+  pll_utree_t * utree;
+  pll_rtree_t * rtree;
+
+  if (!(rtree = pll_rtree_parse_newick(filename)))
+  {
+    if (!(utree = pll_utree_parse_newick(filename)))
+    {
+      fprintf(stderr, "%s\n", pll_errmsg);
+      return NULL;
+    }
+  }
+  else
+  {
+    utree = pll_rtree_unroot(rtree);
+
+    pll_unode_t * root = utree->nodes[utree->tip_count+utree->inner_count-1];
+
+    /* optional step if using default PLL clv/pmatrix index assignments */
+    pll_utree_reset_template_indices(root, utree->tip_count);
+
+    pll_rtree_destroy(rtree,NULL);
+  }
+
+  return utree;
+}
+
+int main(int argc, char * argv[])
+{
+  unsigned int i;
+
+  if (argc != 2)
+    fatal("syntax: %s [newick]", argv[0]);
+
+  /* initialize pseudo-random number generator */
+  srandom(time(NULL));
+
+  /* load tree as unrooted */
+  pll_utree_t * utree = load_tree_unrooted(argv[1]);
+  if (!utree)
+    fatal("Tree must be a rooted or unrooted binary.");
+
+  /* set random support values for tip nodes */
+  for (i = 0; i < utree->tip_count; ++i)
+  {
+    pll_unode_t * node = utree->nodes[i];
+    nodedata_t * data;
+
+    node->data = malloc(sizeof(nodedata_t));
+
+    data = (nodedata_t *)(node->data);
+
+    data->support = random() / (double)RAND_MAX;
+  }
+
+  /* set random support values and a random value to each inner node, but
+     allocate the structure in only one of the three round-about nodes that make
+     up an inner node */
+  for (i = utree->tip_count; i < utree->tip_count + utree->inner_count; ++i)
+  {
+    pll_unode_t * node = utree->nodes[i];
+    nodedata_t * data;
+
+    node->data = malloc(sizeof(nodedata_t));
+
+    data = (nodedata_t *)(node->data);
+
+    data->support = random() / (double)RAND_MAX;
+    data->rvalue = data->support * random();
+  }
+
+  /* select a random inner node */
+  long int r = random() % utree->inner_count;
+  pll_unode_t * root = utree->nodes[utree->tip_count + r];
+
+  /* export the tree to newick format with the selected inner node as the root
+     of the unrooted binary tree.
+     
+     If we pass NULL as the callback function, then the tree is printed in newick
+     format with branch lengths only, i.e.
+  
+     char * newick = pll_utree_export_newick(root,NULL);
+  */
+
+  char * newick = pll_utree_export_newick(root,cb_serialize);
+
+  printf("%s\n", newick);
+
+  free(newick);
+
+  pll_utree_destroy(utree,free);
+
+  return 0;
+}
diff --git a/examples/newick-export/target.mk b/examples/newick-export/target.mk
new file mode 100644
index 0000000..e77819d
--- /dev/null
+++ b/examples/newick-export/target.mk
@@ -0,0 +1,2 @@
+newick_exportdir = $(docdir)/examples/newick-export
+dist_newick_export_DATA = newick-export/newick-export.c newick-export/Makefile
diff --git a/examples/newick-fasta-rooted/.gitignore b/examples/newick-fasta-rooted/.gitignore
new file mode 100644
index 0000000..6ceaa45
--- /dev/null
+++ b/examples/newick-fasta-rooted/.gitignore
@@ -0,0 +1 @@
+nfr
diff --git a/examples/newick-fasta-rooted/newick-fasta-rooted.c b/examples/newick-fasta-rooted/newick-fasta-rooted.c
index d9ca649..2243a1e 100644
--- a/examples/newick-fasta-rooted/newick-fasta-rooted.c
+++ b/examples/newick-fasta-rooted/newick-fasta-rooted.c
@@ -29,35 +29,37 @@
 
 static void fatal(const char * format, ...) __attribute__ ((noreturn));
 
+static void * xmalloc(size_t size)
+{ 
+  void * t;
+  t = malloc(size);
+  if (!t)
+    fatal("Unable to allocate enough memory.");
+  
+  return t;
+} 
+  
+static char * xstrdup(const char * s)
+{ 
+  size_t len = strlen(s);
+  char * p = (char *)xmalloc(len+1);
+  return strcpy(p,s);
+} 
+
 /* a callback function for performing a full traversal */
-static int cb_full_traversal(pll_rtree_t * node)
+static int cb_full_traversal(pll_rnode_t * node)
 {
   return 1;
 }
 
-static void set_missing_branch_length_recursive(pll_rtree_t * tree,
-                                                double length)
-{
-  if (!tree) return;
-
-  if (!tree->length)
-    tree->length = length;
-
-  if (tree->left)
-    set_missing_branch_length_recursive(tree->left, length);
-
-  if (tree->right)
-    set_missing_branch_length_recursive(tree->right, length);
-}
-
 /* branch lengths not present in the newick file get a value of 0.000001 */
 static void set_missing_branch_length(pll_rtree_t * tree, double length)
 {
-  if (tree)
-  {
-    set_missing_branch_length_recursive(tree->left,  length);
-    set_missing_branch_length_recursive(tree->right, length);
-  }
+  unsigned int i;
+
+  for (i = 0; i < tree->tip_count + tree->inner_count; ++i)
+    if (!tree->nodes[i]->length)
+      tree->nodes[i]->length = length;
 }
 
 static void fatal(const char * format, ...)
@@ -79,20 +81,21 @@ int main(int argc, char * argv[])
   double * branch_lengths;
   pll_partition_t * partition;
   pll_operation_t * operations;
-  pll_rtree_t ** travbuffer;
+  pll_rnode_t ** travbuffer;
 
   if (argc != 3)
     fatal(" syntax: %s [newick] [fasta]", argv[0]);
 
-  pll_rtree_t * tree = pll_rtree_parse_newick(argv[1], &tip_nodes_count);
+  pll_rtree_t * tree = pll_rtree_parse_newick(argv[1]);
   if (!tree)
     fatal("Tree must be an rooted binary tree");
-
+  
   /* fix all missing branch lengths (i.e. those that did not appear in the
      newick) to 0.000001 */
   set_missing_branch_length(tree, 0.000001);
 
   /* compute and show node count information */
+  tip_nodes_count = tree->tip_count;
   inner_nodes_count = tip_nodes_count - 1;
   nodes_count = inner_nodes_count + tip_nodes_count;
   branch_count = nodes_count - 1;
@@ -108,28 +111,27 @@ int main(int argc, char * argv[])
   pll_rtree_show_ascii(tree, PLL_UTREE_SHOW_LABEL |
                              PLL_UTREE_SHOW_BRANCH_LENGTH |
                              PLL_UTREE_SHOW_CLV_INDEX);
-  char * newick = pll_rtree_export_newick(tree);
+  char * newick = pll_rtree_export_newick(tree,NULL);
   printf("%s\n", newick);
   free(newick);
 
   */
 
-  /*  obtain an array of pointers to tip names */
-  pll_rtree_t ** tipnodes = (pll_rtree_t  **)calloc(tip_nodes_count,
-                                                    sizeof(pll_rtree_t *));
-  pll_rtree_query_tipnodes(tree, tipnodes);
-
   /* create a libc hash table of size tip_count */
   hcreate(tip_nodes_count);
 
   /* populate a libc hash table with tree tip labels */
-  unsigned int * data = (unsigned int *)malloc(tip_nodes_count *
-                                               sizeof(unsigned int));
+  unsigned int * data = (unsigned int *)xmalloc(tip_nodes_count *
+                                                sizeof(unsigned int));
   for (i = 0; i < tip_nodes_count; ++i)
   {
-    data[i] = tipnodes[i]->clv_index;
+    data[i] = tree->nodes[i]->clv_index;
     ENTRY entry;
-    entry.key = tipnodes[i]->label;
+#ifdef __APPLE__
+    entry.key = xstrdup(tree->nodes[i]->label);
+#else
+    entry.key = tree->nodes[i]->label;
+#endif
     entry.data = (void *)(data+i);
     hsearch(entry, ENTER);
   }
@@ -228,7 +230,6 @@ int main(int argc, char * argv[])
 
   /* we no longer need these two arrays (keys and values of hash table... */
   free(data);
-  free(tipnodes);
 
   /* ...neither the sequences and the headers as they are already
      present in the form of probabilities in the tip CLVs */
@@ -243,18 +244,17 @@ int main(int argc, char * argv[])
 
   /* allocate a buffer for storing pointers to nodes of the tree in postorder
      traversal */
-  travbuffer = (pll_rtree_t **)malloc(nodes_count * sizeof(pll_rtree_t *));
-
-
+  travbuffer = (pll_rnode_t **)xmalloc(nodes_count * sizeof(pll_rnode_t *));
 
-  branch_lengths = (double *)malloc(branch_count * sizeof(double));
-  matrix_indices = (unsigned int *)malloc(branch_count * sizeof(unsigned int));
-  operations = (pll_operation_t *)malloc(inner_nodes_count *
-                                                sizeof(pll_operation_t));
+  branch_lengths = (double *)xmalloc(branch_count * sizeof(double));
+  matrix_indices = (unsigned int *)xmalloc(branch_count * sizeof(unsigned int));
+  operations = (pll_operation_t *)xmalloc(inner_nodes_count *
+                                          sizeof(pll_operation_t));
 
   /* perform a postorder traversal of the rooted tree */
   unsigned int traversal_size;
-  if (!pll_rtree_traverse(tree,
+  if (!pll_rtree_traverse(tree->root,
+                          PLL_TREE_TRAVERSE_POSTORDER,
                           cb_full_traversal,
                           travbuffer,
                           &traversal_size))
@@ -288,7 +288,7 @@ int main(int argc, char * argv[])
 
   /* compute the discretized category rates from a gamma distribution
      with alpha shape 1 and store them in rate_cats  */
-  pll_compute_gamma_cats(1, 4, rate_cats);
+  pll_compute_gamma_cats(1, 4, rate_cats, PLL_GAMMA_RATES_MEAN);
 
   /* set frequencies at model with index 0 (we currently have only one model) */
   pll_set_frequencies(partition, 0, frequencies);
@@ -345,8 +345,8 @@ int main(int argc, char * argv[])
      frequency vector is to be used */
 
   double logl = pll_compute_root_loglikelihood(partition,
-                                               tree->clv_index,
-                                               tree->scaler_index,
+                                               tree->root->clv_index,
+                                               tree->root->scaler_index,
                                                params_indices,
                                                NULL);
 
@@ -363,7 +363,7 @@ int main(int argc, char * argv[])
   free(operations);
 
   /* we will no longer need the tree structure */
-  pll_rtree_destroy(tree);
+  pll_rtree_destroy(tree,NULL);
 
   return (EXIT_SUCCESS);
 }
diff --git a/examples/newick-fasta-unrooted/.gitignore b/examples/newick-fasta-unrooted/.gitignore
new file mode 100644
index 0000000..7fff3cb
--- /dev/null
+++ b/examples/newick-fasta-unrooted/.gitignore
@@ -0,0 +1,2 @@
+nfu
+
diff --git a/examples/newick-fasta-unrooted/newick-fasta-unrooted.c b/examples/newick-fasta-unrooted/newick-fasta-unrooted.c
index 41fef7d..4cc36b5 100644
--- a/examples/newick-fasta-unrooted/newick-fasta-unrooted.c
+++ b/examples/newick-fasta-unrooted/newick-fasta-unrooted.c
@@ -29,45 +29,47 @@
 
 static void fatal(const char * format, ...) __attribute__ ((noreturn));
 
-typedef struct
-{
-  int clv_valid;
-} node_info_t;
+static void * xmalloc(size_t size)
+{ 
+  void * t;
+  t = malloc(size);
+  if (!t)
+    fatal("Unable to allocate enough memory.");
+  
+  return t;
+} 
+  
+static char * xstrdup(const char * s)
+{ 
+  size_t len = strlen(s);
+  char * p = (char *)xmalloc(len+1);
+  return strcpy(p,s);
+} 
 
 /* a callback function for performing a full traversal */
-static int cb_full_traversal(pll_utree_t * node)
+static int cb_full_traversal(pll_unode_t * node)
 {
   return 1;
 }
 
-static void set_missing_branch_length_recursive(pll_utree_t * tree,
-                                                double length)
-{
-  if (tree)
-  {
-    /* set branch length to default if not set */
-    if (!tree->length)
-      tree->length = length;
-
-    if (tree->next)
-    {
-      if (!tree->next->length)
-        tree->next->length = length;
-
-      if (!tree->next->next->length)
-        tree->next->next->length = length;
-
-      set_missing_branch_length_recursive(tree->next->back, length);
-      set_missing_branch_length_recursive(tree->next->next->back, length);
-    }
-  }
-}
-
 /* branch lengths not present in the newick file get a value of 0.000001 */
 static void set_missing_branch_length(pll_utree_t * tree, double length)
 {
-  set_missing_branch_length_recursive(tree, length);
-  set_missing_branch_length_recursive(tree->back, length);
+  unsigned int i;
+
+  for (i = 0; i < tree->tip_count; ++i)
+    if (!tree->nodes[i]->length)
+      tree->nodes[i]->length = length;
+
+  for (i = tree->tip_count; i < tree->tip_count + tree->inner_count; ++i)
+  {
+    if (!tree->nodes[i]->length)
+      tree->nodes[i]->length = length;
+    if (!tree->nodes[i]->next->length)
+      tree->nodes[i]->next->length = length;
+    if (!tree->nodes[i]->next->next->length)
+      tree->nodes[i]->next->next->length = length;
+  } 
 }
 
 static void fatal(const char * format, ...)
@@ -89,7 +91,7 @@ int main(int argc, char * argv[])
   double * branch_lengths;
   pll_partition_t * partition;
   pll_operation_t * operations;
-  pll_utree_t ** travbuffer;
+  pll_unode_t ** travbuffer;
   unsigned int params_indices[RATE_CATS] = {0,0,0,0};
 
   /* we accept only two arguments - the newick tree (unrooted binary) and the
@@ -99,10 +101,12 @@ int main(int argc, char * argv[])
 
   /* parse the unrooted binary tree in newick format, and store the number
      of tip nodes in tip_nodes_count */
-  pll_utree_t * tree = pll_utree_parse_newick(argv[1], &tip_nodes_count);
+  pll_utree_t * tree = pll_utree_parse_newick(argv[1]);
   if (!tree)
     fatal("Tree must be an unrooted binary tree");
 
+  tip_nodes_count = tree->tip_count;
+
   /* fix all missing branch lengths (i.e. those that did not appear in the
      newick) to 0.000001 */
   set_missing_branch_length(tree, 0.000001);
@@ -125,28 +129,27 @@ int main(int argc, char * argv[])
   pll_utree_show_ascii(tree, PLL_UTREE_SHOW_LABEL |
                              PLL_UTREE_SHOW_BRANCH_LENGTH |
                              PLL_UTREE_SHOW_CLV_INDEX);
-  char * newick = pll_utree_export_newick(tree);
+  char * newick = pll_utree_export_newick(tree,NULL);
   printf("%s\n", newick);
   free(newick);
 
   */
 
-  /*  obtain an array of pointers to tip nodes */
-  pll_utree_t ** tipnodes = (pll_utree_t  **)calloc(tip_nodes_count,
-                                                    sizeof(pll_utree_t *));
-  pll_utree_query_tipnodes(tree, tipnodes);
-
   /* create a libc hash table of size tip_nodes_count */
   hcreate(tip_nodes_count);
 
   /* populate a libc hash table with tree tip labels */
-  unsigned int * data = (unsigned int *)malloc(tip_nodes_count *
-                                               sizeof(unsigned int));
+  unsigned int * data = (unsigned int *)xmalloc(tip_nodes_count *
+                                                sizeof(unsigned int));
   for (i = 0; i < tip_nodes_count; ++i)
   {
-    data[i] = tipnodes[i]->clv_index;
+    data[i] = tree->nodes[i]->clv_index;
     ENTRY entry;
-    entry.key = tipnodes[i]->label;
+#ifdef __APPLE__
+    entry.key = xstrdup(tree->nodes[i]->label);
+#else
+    entry.key = tree->nodes[i]->label;
+#endif
     entry.data = (void *)(data+i);
     hsearch(entry, ENTER);
   }
@@ -217,7 +220,7 @@ int main(int argc, char * argv[])
                                    branch_count,
                                    RATE_CATS,
                                    inner_nodes_count,
-                                   PLL_ATTRIB_ARCH_AVX);
+                                   PLL_ATTRIB_PATTERN_TIP | PLL_ATTRIB_ARCH_AVX);
 
   /* initialize the array of base frequencies */
   double frequencies[4] = { 0.17, 0.19, 0.25, 0.39 };
@@ -231,7 +234,7 @@ int main(int argc, char * argv[])
 
   /* compute the discretized category rates from a gamma distribution
      with alpha shape 1 and store them in rate_cats  */
-  pll_compute_gamma_cats(1, 4, rate_cats);
+  pll_compute_gamma_cats(1, 4, rate_cats, PLL_GAMMA_RATES_MEAN);
 
   /* set frequencies at model with index 0 (we currently have only one model) */
   pll_set_frequencies(partition, 0, frequencies);
@@ -264,7 +267,6 @@ int main(int argc, char * argv[])
 
   /* we no longer need these two arrays (keys and values of hash table... */
   free(data);
-  free(tipnodes);
 
   /* ...neither the sequences and the headers as they are already
      present in the form of probabilities in the tip CLVs */
@@ -279,17 +281,22 @@ int main(int argc, char * argv[])
 
   /* allocate a buffer for storing pointers to nodes of the tree in postorder
      traversal */
-  travbuffer = (pll_utree_t **)malloc(nodes_count * sizeof(pll_utree_t *));
+  travbuffer = (pll_unode_t **)xmalloc(nodes_count * sizeof(pll_unode_t *));
 
-
-  branch_lengths = (double *)malloc(branch_count * sizeof(double));
-  matrix_indices = (unsigned int *)malloc(branch_count * sizeof(unsigned int));
-  operations = (pll_operation_t *)malloc(inner_nodes_count *
-                                                sizeof(pll_operation_t));
+  branch_lengths = (double *)xmalloc(branch_count * sizeof(double));
+  matrix_indices = (unsigned int *)xmalloc(branch_count * sizeof(unsigned int));
+  operations = (pll_operation_t *)xmalloc(inner_nodes_count *
+                                          sizeof(pll_operation_t));
 
   /* perform a postorder traversal of the unrooted tree */
+  /* perform a postorder traversal starting from the inner node that
+     was the the root of the parsed 'unrooted' binary tree */
+  
+  pll_unode_t * root = tree->nodes[tip_nodes_count+inner_nodes_count-1];
   unsigned int traversal_size;
-  if (!pll_utree_traverse(tree,
+
+  if (!pll_utree_traverse(root,
+                          PLL_TREE_TRAVERSE_POSTORDER,
                           cb_full_traversal,
                           travbuffer,
                           &traversal_size))
@@ -353,11 +360,11 @@ int main(int argc, char * argv[])
      frequency vector is to be used */
 
   double logl = pll_compute_edge_loglikelihood(partition,
-                                               tree->clv_index,
-                                               tree->scaler_index,
-                                               tree->back->clv_index,
-                                               tree->back->scaler_index,
-                                               tree->pmatrix_index,
+                                               root->clv_index,
+                                               root->scaler_index,
+                                               root->back->clv_index,
+                                               root->back->scaler_index,
+                                               root->pmatrix_index,
                                                params_indices,
                                                NULL);
   printf("Log-L: %f\n", logl);
@@ -373,7 +380,7 @@ int main(int argc, char * argv[])
   free(operations);
 
   /* we will no longer need the tree structure */
-  pll_utree_destroy(tree);
+  pll_utree_destroy(tree,NULL);
 
   return (EXIT_SUCCESS);
 }
diff --git a/examples/newick-phylip-unrooted/newick-phylip-unrooted.c b/examples/newick-phylip-unrooted/newick-phylip-unrooted.c
index 40865b3..bf5926d 100644
--- a/examples/newick-phylip-unrooted/newick-phylip-unrooted.c
+++ b/examples/newick-phylip-unrooted/newick-phylip-unrooted.c
@@ -27,6 +27,8 @@
 #define STATES    4
 #define RATE_CATS 4
 
+#define COMPRESS
+
 static void fatal(const char * format, ...) __attribute__ ((noreturn));
 
 typedef struct
@@ -34,40 +36,47 @@ typedef struct
   int clv_valid;
 } node_info_t;
 
+static void * xmalloc(size_t size)
+{ 
+  void * t;
+  t = malloc(size);
+  if (!t)
+    fatal("Unable to allocate enough memory.");
+  
+  return t;
+} 
+  
+static char * xstrdup(const char * s)
+{ 
+  size_t len = strlen(s);
+  char * p = (char *)xmalloc(len+1);
+  return strcpy(p,s);
+} 
+
 /* a callback function for performing a full traversal */
-static int cb_full_traversal(pll_utree_t * node)
+static int cb_full_traversal(pll_unode_t * node)
 {
   return 1;
 }
 
-static void set_missing_branch_length_recursive(pll_utree_t * tree,
-                                                double length)
-{
-  if (tree)
-  {
-    /* set branch length to default if not set */
-    if (!tree->length)
-      tree->length = length;
-
-    if (tree->next)
-    {
-      if (!tree->next->length)
-        tree->next->length = length;
-
-      if (!tree->next->next->length)
-        tree->next->next->length = length;
-
-      set_missing_branch_length_recursive(tree->next->back, length);
-      set_missing_branch_length_recursive(tree->next->next->back, length);
-    }
-  }
-}
-
 /* branch lengths not present in the newick file get a value of 0.000001 */
 static void set_missing_branch_length(pll_utree_t * tree, double length)
 {
-  set_missing_branch_length_recursive(tree, length);
-  set_missing_branch_length_recursive(tree->back, length);
+  unsigned int i;
+
+  for (i = 0; i < tree->tip_count; ++i)
+    if (!tree->nodes[i]->length)
+      tree->nodes[i]->length = length;
+
+  for (i = tree->tip_count; i < tree->tip_count + tree->inner_count; ++i)
+  {
+    if (!tree->nodes[i]->length)
+      tree->nodes[i]->length = length;
+    if (!tree->nodes[i]->next->length)
+      tree->nodes[i]->next->length = length;
+    if (!tree->nodes[i]->next->next->length)
+      tree->nodes[i]->next->next->length = length;
+  } 
 }
 
 static void fatal(const char * format, ...)
@@ -84,25 +93,26 @@ int main(int argc, char * argv[])
 {
   unsigned int i;
   unsigned int tip_nodes_count, inner_nodes_count, nodes_count, branch_count;
-  unsigned int sequence_count;
   unsigned int matrix_count, ops_count;
   unsigned int * matrix_indices;
   double * branch_lengths;
   pll_partition_t * partition;
   pll_operation_t * operations;
-  pll_utree_t ** travbuffer;
+  pll_unode_t ** travbuffer;
 
   /* we accept only two arguments - the newick tree (unrooted binary) and the
      alignment in the form of FASTA reads */
   if (argc != 3)
-    fatal(" syntax: %s [newick] [fasta]", argv[0]);
+    fatal(" syntax: %s [newick] [phylip]", argv[0]);
 
   /* parse the unrooted binary tree in newick format, and store the number
      of tip nodes in tip_nodes_count */
-  pll_utree_t * tree = pll_utree_parse_newick(argv[1], &tip_nodes_count);
+  pll_utree_t * tree = pll_utree_parse_newick(argv[1]);
   if (!tree)
     fatal("Tree must be an unrooted binary tree");
 
+  tip_nodes_count = tree->tip_count;
+
   /* fix all missing branch lengths (i.e. those that did not appear in the
      newick) to 0.000001 */
   set_missing_branch_length(tree, 0.000001);
@@ -125,17 +135,12 @@ int main(int argc, char * argv[])
   pll_utree_show_ascii(tree, PLL_UTREE_SHOW_LABEL |
                              PLL_UTREE_SHOW_BRANCH_LENGTH |
                              PLL_UTREE_SHOW_CLV_INDEX);
-  char * newick = pll_utree_export_newick(tree);
+  char * newick = pll_utree_export_newick(tree,NULL);
   printf("%s\n", newick);
   free(newick);
 
   */
 
-  /*  obtain an array of pointers to tip nodes */
-  pll_utree_t ** tipnodes = (pll_utree_t  **)calloc(tip_nodes_count,
-                                                    sizeof(pll_utree_t *));
-  pll_utree_query_tipnodes(tree, tipnodes);
-
   /* create a libc hash table of size tip_nodes_count */
   hcreate(tip_nodes_count);
 
@@ -144,29 +149,40 @@ int main(int argc, char * argv[])
                                                sizeof(unsigned int));
   for (i = 0; i < tip_nodes_count; ++i)
   {
-    data[i] = tipnodes[i]->clv_index;
+    data[i] = tree->nodes[i]->clv_index;
     ENTRY entry;
-    entry.key = tipnodes[i]->label;
+#ifdef __APPLE__
+    entry.key = xstrdup(tree->nodes[i]->label);
+#else
+    entry.key = tree->nodes[i]->label;
+#endif
     entry.data = (void *)(data+i);
     hsearch(entry, ENTER);
   }
 
   /* read PHYLIP alignment */
-  pll_msa_t * msa = pll_phylip_parse_msa(argv[2], &sequence_count);
+  pll_phylip_t * fd = pll_phylip_open(argv[2], pll_map_phylip);
+  if (!fd)
+    fatal(pll_errmsg);
+
+  pll_msa_t * msa = pll_phylip_parse_interleaved(fd);
   if (!msa)
     fatal(pll_errmsg);
 
+  pll_phylip_close(fd);
+
   /* compress site patterns */
-  if (sequence_count != tip_nodes_count)
+  if ((unsigned int)(msa->count) != tip_nodes_count)
     fatal("Number of sequences does not match number of leaves in tree");
 
+#ifdef COMPRESS
   printf("Original sequence (alignment) length : %d\n", msa->length);
   unsigned int * weight = pll_compress_site_patterns(msa->sequence,
                                                      pll_map_nt,
                                                      tip_nodes_count,
                                                      &(msa->length));
   printf("Number of unique site patterns: %d\n", msa->length);
-
+#endif
 
   /* create the PLL partition instance
 
@@ -204,7 +220,7 @@ int main(int argc, char * argv[])
 
   /* compute the discretized category rates from a gamma distribution
      with alpha shape 1 and store them in rate_cats  */
-  pll_compute_gamma_cats(1, 4, rate_cats);
+  pll_compute_gamma_cats(1, 4, rate_cats, PLL_GAMMA_RATES_MEAN);
 
   /* set frequencies at model with index 0 (we currently have only one model) */
   pll_set_frequencies(partition, 0, frequencies);
@@ -215,9 +231,11 @@ int main(int argc, char * argv[])
   /* set rate categories */
   pll_set_category_rates(partition, rate_cats);
 
+#ifdef COMPRESS
   /* set pattern weights and free the weights array */
   pll_set_pattern_weights(partition, weight);
   free(weight);
+#endif
 
   /* find sequences in hash table and link them with the corresponding taxa */
   for (i = 0; i < tip_nodes_count; ++i)
@@ -244,11 +262,10 @@ int main(int argc, char * argv[])
 
   /* we no longer need these two arrays (keys and values of hash table... */
   free(data);
-  free(tipnodes);
 
   /* allocate a buffer for storing pointers to nodes of the tree in postorder
      traversal */
-  travbuffer = (pll_utree_t **)malloc(nodes_count * sizeof(pll_utree_t *));
+  travbuffer = (pll_unode_t **)malloc(nodes_count * sizeof(pll_unode_t *));
 
 
   branch_lengths = (double *)malloc(branch_count * sizeof(double));
@@ -257,8 +274,11 @@ int main(int argc, char * argv[])
                                                 sizeof(pll_operation_t));
 
   /* perform a postorder traversal of the unrooted tree */
+  pll_unode_t * root = tree->nodes[tip_nodes_count+inner_nodes_count-1];
   unsigned int traversal_size;
-  if (!pll_utree_traverse(tree,
+
+  if (!pll_utree_traverse(root,
+                          PLL_TREE_TRAVERSE_POSTORDER,
                           cb_full_traversal,
                           travbuffer,
                           &traversal_size))
@@ -325,15 +345,15 @@ int main(int argc, char * argv[])
      whose frequency vector is to be used for each rate category */
 
   double logl = pll_compute_edge_loglikelihood(partition,
-                                               tree->clv_index,
-                                               tree->scaler_index,
-                                               tree->back->clv_index,
-                                               tree->back->scaler_index,
-                                               tree->pmatrix_index,
+                                               root->clv_index,
+                                               root->scaler_index,
+                                               root->back->clv_index,
+                                               root->back->scaler_index,
+                                               root->pmatrix_index,
                                                params_indices,
                                                NULL);
 
-  printf("Log-L: %f\n", logl);
+  printf("Log-L: %.15f\n", logl);
 
   /* destroy all structures allocated for the concrete PLL partition instance */
   pll_partition_destroy(partition);
@@ -346,7 +366,7 @@ int main(int argc, char * argv[])
   free(operations);
 
   /* we will no longer need the tree structure */
-  pll_utree_destroy(tree);
+  pll_utree_destroy(tree,NULL);
 
   return (EXIT_SUCCESS);
 }
diff --git a/examples/newton/newton.c b/examples/newton/newton.c
index 7c8d3d8..e29ee4b 100644
--- a/examples/newton/newton.c
+++ b/examples/newton/newton.c
@@ -55,6 +55,8 @@ static double newton(pll_partition_t * partition,
   pll_update_sumtable(partition,
                       parent_clv_index,
                       child_clv_index,
+                      parent_scaler_index,
+                      child_scaler_index,
                       params_indices,
                       sumtable);
 
@@ -130,7 +132,7 @@ int main(int argc, char * argv[])
 
   /* discretized category rates from a gamma distribution with alpha shape 1 */
   double rate_cats[RATES];
-  pll_compute_gamma_cats(alpha, RATES, rate_cats);
+  pll_compute_gamma_cats(alpha, RATES, rate_cats, PLL_GAMMA_RATES_MEAN);
 
   /* set frequencies */
   pll_set_frequencies(partition, 0, frequencies);
diff --git a/examples/parsimony/npr-pars.c b/examples/parsimony/npr-pars.c
index 3292dcd..0175629 100644
--- a/examples/parsimony/npr-pars.c
+++ b/examples/parsimony/npr-pars.c
@@ -29,8 +29,25 @@
 
 static void fatal(const char * format, ...) __attribute__ ((noreturn));
 
+static void * xmalloc(size_t size)
+{ 
+  void * t;
+  t = malloc(size);
+  if (!t)
+    fatal("Unable to allocate enough memory.");
+  
+  return t;
+} 
+  
+static char * xstrdup(const char * s)
+{ 
+  size_t len = strlen(s);
+  char * p = (char *)xmalloc(len+1);
+  return strcpy(p,s);
+} 
+
 /* a callback function for performing a full traversal */
-static int cb_full_traversal(pll_rtree_t * node)
+static int cb_full_traversal(pll_rnode_t * node)
 {
   return 1;
 }
@@ -49,12 +66,11 @@ int main(int argc, char * argv[])
 {
   unsigned int i,j,n;
   unsigned int tip_nodes_count, inner_nodes_count, nodes_count, branch_count;
-  unsigned int sequence_count;
   unsigned int ops_count;
   pll_parsimony_t * pars;
   pll_pars_buildop_t * operations;
   pll_pars_recop_t * recops;
-  pll_rtree_t ** travbuffer;
+  pll_rnode_t ** travbuffer;
 
   /* we accept only two arguments - the newick tree (unrooted binary) and the
      alignment in the form of PHYLIP reads */
@@ -63,11 +79,12 @@ int main(int argc, char * argv[])
 
   /* parse the unrooted binary tree in newick format, and store the number
      of tip nodes in tip_nodes_count */
-  pll_rtree_t * tree = pll_rtree_parse_newick(argv[1], &tip_nodes_count);
+  pll_rtree_t * tree = pll_rtree_parse_newick(argv[1]);
   if (!tree)
     fatal("Tree must be a rooted binary tree");
 
   /* compute and show node count information */
+  tip_nodes_count = tree->tip_count;
   inner_nodes_count = tip_nodes_count - 1;
   nodes_count = inner_nodes_count + tip_nodes_count;
   branch_count = nodes_count - 1;
@@ -85,38 +102,43 @@ int main(int argc, char * argv[])
   pll_utree_show_ascii(tree, PLL_UTREE_SHOW_LABEL |
                              PLL_UTREE_SHOW_BRANCH_LENGTH |
                              PLL_UTREE_SHOW_CLV_INDEX);
-  char * newick = pll_utree_export_newick(tree);
+  char * newick = pll_utree_export_newick(tree,NULL);
   printf("%s\n", newick);
   free(newick);
 
   */
 
-  /*  obtain an array of pointers to tip nodes */
-  pll_rtree_t ** tipnodes = (pll_rtree_t  **)calloc(tip_nodes_count,
-                                                    sizeof(pll_rtree_t *));
-  pll_rtree_query_tipnodes(tree, tipnodes);
-
   /* create a libc hash table of size tip_nodes_count */
   hcreate(tip_nodes_count);
 
   /* populate a libc hash table with tree tip labels */
-  unsigned int * data = (unsigned int *)malloc(tip_nodes_count *
-                                               sizeof(unsigned int));
+  unsigned int * data = (unsigned int *)xmalloc(tip_nodes_count *
+                                                sizeof(unsigned int));
   for (i = 0; i < tip_nodes_count; ++i)
   {
-    data[i] = tipnodes[i]->clv_index;
+    data[i] = tree->nodes[i]->clv_index;
     ENTRY entry;
-    entry.key = tipnodes[i]->label;
+#ifdef __APPLE__
+    entry.key = xstrdup(tree->nodes[i]->label);
+#else
+    entry.key = tree->nodes[i]->label;
+#endif
     entry.data = (void *)(data+i);
     hsearch(entry, ENTER);
   }
 
   /* read PHYLIP alignment */
-  pll_msa_t * msa = pll_phylip_parse_msa(argv[2], &sequence_count);
+  pll_phylip_t * fd = pll_phylip_open(argv[2], pll_map_phylip);
+  if (!fd)
+    fatal(pll_errmsg);
+
+  pll_msa_t * msa = pll_phylip_parse_interleaved(fd);
   if (!msa)
     fatal(pll_errmsg);
 
-  if (sequence_count != tip_nodes_count)
+  pll_phylip_close(fd);
+
+  if ((unsigned int)(msa->count) != tip_nodes_count)
     fatal("Number of sequences does not match number of leaves in tree");
 
   /* create the PLL parsimony instance
@@ -172,19 +194,19 @@ int main(int argc, char * argv[])
 
   /* we no longer need these two arrays (keys and values of hash table... */
   free(data);
-  free(tipnodes);
 
   /* allocate a buffer for storing pointers to nodes of the tree in postorder
      traversal */
-  travbuffer = (pll_rtree_t **)malloc(nodes_count * sizeof(pll_rtree_t *));
+  travbuffer = (pll_rnode_t **)xmalloc(nodes_count * sizeof(pll_rnode_t *));
 
 
-  operations = (pll_pars_buildop_t *)malloc(inner_nodes_count *
-                                      sizeof(pll_pars_buildop_t));
+  operations = (pll_pars_buildop_t *)xmalloc(inner_nodes_count *
+                                             sizeof(pll_pars_buildop_t));
 
   /* perform a postorder traversal of the rooted tree */
   unsigned int traversal_size;
-  if (!pll_rtree_traverse(tree,
+  if (!pll_rtree_traverse(tree->root,
+                          PLL_TREE_TRAVERSE_POSTORDER,
                           cb_full_traversal,
                           travbuffer,
                           &traversal_size))
@@ -225,15 +247,16 @@ int main(int argc, char * argv[])
   }
 
   /* perform a preorder traversal of the rooted tree */
-  if (!pll_rtree_traverse_preorder(tree,
-                                   cb_full_traversal,
-                                   travbuffer,
-                                   &traversal_size))
+  if (!pll_rtree_traverse(tree->root,
+                          PLL_TREE_TRAVERSE_PREORDER,
+                          cb_full_traversal,
+                          travbuffer,
+                          &traversal_size))
     fatal("Function pll_rtree_traverse() requires inner nodes as parameters");
 
   /* create the reconstruct operations */
-  recops = (pll_pars_recop_t *)malloc(inner_nodes_count *
-                                      sizeof(pll_pars_recop_t));
+  recops = (pll_pars_recop_t *)xmalloc(inner_nodes_count *
+                                       sizeof(pll_pars_recop_t));
   pll_rtree_create_pars_recops(travbuffer,
                                traversal_size,
                                recops,
@@ -265,7 +288,7 @@ int main(int argc, char * argv[])
   free(recops);
 
   /* we will no longer need the tree structure */
-  pll_rtree_destroy(tree);
+  pll_rtree_destroy(tree,NULL);
   
   /* destroy the parsimony structure */
   pll_parsimony_destroy(pars);
diff --git a/examples/partial-traversal/.gitignore b/examples/partial-traversal/.gitignore
new file mode 100644
index 0000000..b648ac9
--- /dev/null
+++ b/examples/partial-traversal/.gitignore
@@ -0,0 +1 @@
+partial
diff --git a/examples/partial-traversal/partial.c b/examples/partial-traversal/partial.c
index 4a176b5..b117bec 100644
--- a/examples/partial-traversal/partial.c
+++ b/examples/partial-traversal/partial.c
@@ -35,8 +35,30 @@ typedef struct
   int clv_valid;
 } node_info_t;
 
+static void * xmalloc(size_t size)
+{ 
+  void * t;
+  t = malloc(size);
+  if (!t)
+    fatal("Unable to allocate enough memory.");
+  
+  return t;
+} 
+  
+static char * xstrdup(const char * s)
+{ 
+  size_t len = strlen(s);
+  char * p = (char *)xmalloc(len+1);
+  return strcpy(p,s);
+} 
+/* call-back function to destroy the data element of each node */
+static void cb_data_destroy(void * data)
+{
+  free(data);
+}
+
 /* a callback function for performing a partial traversal */
-static int cb_partial_traversal(pll_utree_t * node)
+static int cb_partial_traversal(pll_unode_t * node)
 {
   node_info_t * node_info;
 
@@ -81,34 +103,24 @@ static int cb_partial_traversal(pll_utree_t * node)
   return 1;
 }
 
-static void set_missing_branch_length_recursive(pll_utree_t * tree,
-                                                double length)
-{
-  if (tree)
-  {
-    /* set branch length to default if not set */
-    if (!tree->length)
-      tree->length = length;
-
-    if (tree->next)
-    {
-      if (!tree->next->length)
-        tree->next->length = length;
-
-      if (!tree->next->next->length)
-        tree->next->next->length = length;
-
-      set_missing_branch_length_recursive(tree->next->back, length);
-      set_missing_branch_length_recursive(tree->next->next->back, length);
-    }
-  }
-}
-
 /* branch lengths not present in the newick file get a value of 0.000001 */
 static void set_missing_branch_length(pll_utree_t * tree, double length)
 {
-  set_missing_branch_length_recursive(tree, length);
-  set_missing_branch_length_recursive(tree->back, length);
+  unsigned int i;
+
+  for (i = 0; i < tree->tip_count; ++i)
+    if (!tree->nodes[i]->length)
+      tree->nodes[i]->length = length;
+
+  for (i = tree->tip_count; i < tree->tip_count + tree->inner_count; ++i)
+  {
+    if (!tree->nodes[i]->length)
+      tree->nodes[i]->length = length;
+    if (!tree->nodes[i]->next->length)
+      tree->nodes[i]->next->length = length;
+    if (!tree->nodes[i]->next->next->length)
+      tree->nodes[i]->next->next->length = length;
+  } 
 }
 
 static void fatal(const char * format, ...)
@@ -130,8 +142,8 @@ int main(int argc, char * argv[])
   double * branch_lengths;
   pll_partition_t * partition;
   pll_operation_t * operations;
-  pll_utree_t ** travbuffer;
-  pll_utree_t ** inner_nodes_list;
+  pll_unode_t ** travbuffer;
+  pll_unode_t ** inner_nodes_list;
 
   /* we accept only two arguments - the newick tree (unrooted binary) and the
      alignment in the form of FASTA reads */
@@ -140,10 +152,12 @@ int main(int argc, char * argv[])
 
   /* parse the unrooted binary tree in newick format, and store the number
      of tip nodes in tip_nodes_count */
-  pll_utree_t * tree = pll_utree_parse_newick(argv[1], &tip_nodes_count);
+  pll_utree_t * tree = pll_utree_parse_newick(argv[1]);
   if (!tree)
     fatal("Tree must be an unrooted binary tree");
 
+  tip_nodes_count = tree->tip_count;
+
   /* fix all missing branch lengths (i.e. those that did not appear in the
      newick) to 0.000001 */
   set_missing_branch_length(tree, 0.000001);
@@ -167,28 +181,27 @@ int main(int argc, char * argv[])
   pll_utree_show_ascii(tree, PLL_UTREE_SHOW_LABEL |
                              PLL_UTREE_SHOW_BRANCH_LENGTH |
                              PLL_UTREE_SHOW_CLV_INDEX);
-  char * newick = pll_utree_export_newick(tree);
+  char * newick = pll_utree_export_newick(tree,NULL);
   printf("%s\n", newick);
   free(newick);
 
   */
 
-  /*  obtain an array of pointers to tip nodes */
-  pll_utree_t ** tipnodes = (pll_utree_t  **)calloc(tip_nodes_count,
-                                                    sizeof(pll_utree_t *));
-  pll_utree_query_tipnodes(tree, tipnodes);
-
   /* create a libc hash table of size tip_nodes_count */
   hcreate(tip_nodes_count);
 
   /* populate a libc hash table with tree tip labels */
-  unsigned int * data = (unsigned int *)malloc(tip_nodes_count *
-                                               sizeof(unsigned int));
+  unsigned int * data = (unsigned int *)xmalloc(tip_nodes_count *
+                                                sizeof(unsigned int));
   for (i = 0; i < tip_nodes_count; ++i)
   {
-    data[i] = tipnodes[i]->clv_index;
+    data[i] = tree->nodes[i]->clv_index;
     ENTRY entry;
-    entry.key = tipnodes[i]->label;
+#ifdef __APPLE__
+    entry.key = xstrdup(tree->nodes[i]->label);
+#else
+    entry.key = tree->nodes[i]->label;
+#endif
     entry.data = (void *)(data+i);
     hsearch(entry, ENTER);
   }
@@ -273,7 +286,7 @@ int main(int argc, char * argv[])
 
   /* compute the discretized category rates from a gamma distribution
      with alpha shape 1 and store them in rate_cats  */
-  pll_compute_gamma_cats(1, 4, rate_cats);
+  pll_compute_gamma_cats(1, 4, rate_cats, PLL_GAMMA_RATES_MEAN);
 
   /* set frequencies at model with index 0 (we currently have only one model) */
   pll_set_frequencies(partition, 0, frequencies);
@@ -306,7 +319,6 @@ int main(int argc, char * argv[])
 
   /* we no longer need these two arrays (keys and values of hash table... */
   free(data);
-  free(tipnodes);
 
   /* ...neither the sequences and the headers as they are already
      present in the form of probabilities in the tip CLVs */
@@ -321,18 +333,20 @@ int main(int argc, char * argv[])
 
   /* allocate a buffer for storing pointers to nodes of the tree in postorder
      traversal */
-  travbuffer = (pll_utree_t **)malloc(nodes_count * sizeof(pll_utree_t *));
+  travbuffer = (pll_unode_t **)xmalloc(nodes_count * sizeof(pll_unode_t *));
 
 
-  branch_lengths = (double *)malloc(branch_count * sizeof(double));
-  matrix_indices = (unsigned int *)malloc(branch_count * sizeof(unsigned int));
-  operations = (pll_operation_t *)malloc(inner_nodes_count *
-                                                sizeof(pll_operation_t));
+  branch_lengths = (double *)xmalloc(branch_count * sizeof(double));
+  matrix_indices = (unsigned int *)xmalloc(branch_count * sizeof(unsigned int));
+  operations = (pll_operation_t *)xmalloc(inner_nodes_count *
+                                          sizeof(pll_operation_t));
 
   /* get inner nodes */
-  inner_nodes_list = (pll_utree_t **)malloc(inner_nodes_count *
-                                                sizeof(pll_utree_t *));
-  pll_utree_query_innernodes(tree, inner_nodes_list);
+  inner_nodes_list = (pll_unode_t **)xmalloc(inner_nodes_count *
+                                             sizeof(pll_unode_t *));
+  memcpy(inner_nodes_list,
+         tree->nodes+tip_nodes_count,
+         inner_nodes_count*sizeof(pll_unode_t *));
 
 
   /* get random directions for each inner node */
@@ -351,12 +365,13 @@ int main(int argc, char * argv[])
   {
     /* randomly select an inner node */
     r = (unsigned int)rand() % inner_nodes_count;
-    pll_utree_t * node = inner_nodes_list[r];
+    pll_unode_t * node = inner_nodes_list[r];
 
     /* compute a partial traversal starting from the randomly selected
        inner node */
     unsigned int traversal_size;
     if (!pll_utree_traverse(node,
+                            PLL_TREE_TRAVERSE_POSTORDER,
                             cb_partial_traversal,
                             travbuffer,
                             &traversal_size))
@@ -443,14 +458,6 @@ int main(int argc, char * argv[])
     printf("Log-L: %f\n", logl);
   }
 
-  /* deallocate the data elements at inner nodes */
-  for (i = 0; i < inner_nodes_count; ++i)
-  {
-    free(inner_nodes_list[i]->data);
-    free(inner_nodes_list[i]->next->data);
-    free(inner_nodes_list[i]->next->next->data);
-  }
-
   /* deallocate the inner nodes list */
   free(inner_nodes_list);
 
@@ -465,7 +472,7 @@ int main(int argc, char * argv[])
   free(operations);
 
   /* we will no longer need the tree structure */
-  pll_utree_destroy(tree);
+  pll_utree_destroy(tree,cb_data_destroy);
 
   return (EXIT_SUCCESS);
 }
diff --git a/examples/protein-list/.gitignore b/examples/protein-list/.gitignore
new file mode 100644
index 0000000..b792a77
--- /dev/null
+++ b/examples/protein-list/.gitignore
@@ -0,0 +1 @@
+pl
diff --git a/examples/protein-list/protein-list.c b/examples/protein-list/protein-list.c
index f37e005..068cd5d 100644
--- a/examples/protein-list/protein-list.c
+++ b/examples/protein-list/protein-list.c
@@ -30,6 +30,23 @@
 
 static void fatal(const char * format, ...) __attribute__ ((noreturn));
 
+static void * xmalloc(size_t size)
+{ 
+  void * t;
+  t = malloc(size);
+  if (!t)
+    fatal("Unable to allocate enough memory.");
+  
+  return t;
+} 
+  
+static char * xstrdup(const char * s)
+{ 
+  size_t len = strlen(s);
+  char * p = (char *)xmalloc(len+1);
+  return strcpy(p,s);
+} 
+
 static const double * protein_models_rates_list[PROT_MODELS_COUNT] =
  {
    pll_aa_rates_dayhoff,
@@ -100,39 +117,29 @@ static const char * protein_models_names_list[PROT_MODELS_COUNT] =
 };
 
 /* a callback function for performing a full traversal */
-static int cb_full_traversal(pll_utree_t * node)
+static int cb_full_traversal(pll_unode_t * node)
 {
   return 1;
 }
 
-static void set_missing_branch_length_recursive(pll_utree_t * tree,
-                                                double length)
-{
-  if (tree)
-  {
-    /* set branch length to default if not set */
-    if (!tree->length)
-      tree->length = length;
-
-    if (tree->next)
-    {
-      if (!tree->next->length)
-        tree->next->length = length;
-
-      if (!tree->next->next->length)
-        tree->next->next->length = length;
-
-      set_missing_branch_length_recursive(tree->next->back, length);
-      set_missing_branch_length_recursive(tree->next->next->back, length);
-    }
-  }
-}
-
 /* branch lengths not present in the newick file get a value of 0.000001 */
 static void set_missing_branch_length(pll_utree_t * tree, double length)
 {
-  set_missing_branch_length_recursive(tree, length);
-  set_missing_branch_length_recursive(tree->back, length);
+  unsigned int i;
+
+  for (i = 0; i < tree->tip_count; ++i)
+    if (!tree->nodes[i]->length)
+      tree->nodes[i]->length = length;
+
+  for (i = tree->tip_count; i < tree->tip_count + tree->inner_count; ++i)
+  {
+    if (!tree->nodes[i]->length)
+      tree->nodes[i]->length = length;
+    if (!tree->nodes[i]->next->length)
+      tree->nodes[i]->next->length = length;
+    if (!tree->nodes[i]->next->next->length)
+      tree->nodes[i]->next->next->length = length;
+  } 
 }
 
 static void fatal(const char * format, ...)
@@ -154,7 +161,7 @@ int main(int argc, char * argv[])
   double * branch_lengths;
   pll_partition_t * partition;
   pll_operation_t * operations;
-  pll_utree_t ** travbuffer;
+  pll_unode_t ** travbuffer;
 
   /* we accept only two arguments - the newick tree (unrooted binary) and the
      alignment in the form of FASTA reads */
@@ -163,7 +170,11 @@ int main(int argc, char * argv[])
 
   /* parse the unrooted binary tree in newick format, and store the number
      of tip nodes in tip_nodes_count */
-  pll_utree_t * tree = pll_utree_parse_newick(argv[1], &tip_nodes_count);
+  pll_utree_t * tree = pll_utree_parse_newick(argv[1]);
+  if (!tree)
+    fatal("Tree must be an unrooted binary tree");
+
+  tip_nodes_count = tree->tip_count;
 
   /* fix all missing branch lengths (i.e. those that did not appear in the
      newick) to 0.000001 */
@@ -188,28 +199,27 @@ int main(int argc, char * argv[])
   pll_utree_show_ascii(tree, PLL_UTREE_SHOW_LABEL |
                              PLL_UTREE_SHOW_BRANCH_LENGTH |
                              PLL_UTREE_SHOW_CLV_INDEX);
-  char * newick = pll_utree_export_newick(tree);
+  char * newick = pll_utree_export_newick(tree,NULL);
   printf("%s\n", newick);
   free(newick);
 
   */
 
-  /*  obtain an array of pointers to tip nodes */
-  pll_utree_t ** tipnodes = (pll_utree_t  **)calloc(tip_nodes_count,
-                                                    sizeof(pll_utree_t *));
-  pll_utree_query_tipnodes(tree, tipnodes);
-
   /* create a libc hash table of size tip_nodes_count */
   hcreate(tip_nodes_count);
 
   /* populate a libc hash table with tree tip labels */
-  unsigned int * data = (unsigned int *)malloc(tip_nodes_count *
+  unsigned int * data = (unsigned int *)xmalloc(tip_nodes_count *
                                                sizeof(unsigned int));
   for (i = 0; i < tip_nodes_count; ++i)
   {
-    data[i] = tipnodes[i]->clv_index;
+    data[i] = tree->nodes[i]->clv_index;
     ENTRY entry;
-    entry.key = tipnodes[i]->label;
+#ifdef __APPLE__
+    entry.key = xstrdup(tree->nodes[i]->label);
+#else
+    entry.key = tree->nodes[i]->label;
+#endif
     entry.data = (void *)(data+i);
     hsearch(entry, ENTER);
   }
@@ -296,7 +306,7 @@ int main(int argc, char * argv[])
 
     unsigned int tip_clv_index = *((unsigned int *)(found->data));
 
-    pll_set_tip_states(partition, tip_clv_index, pll_map_nt, seqdata[i]);
+    pll_set_tip_states(partition, tip_clv_index, pll_map_aa, seqdata[i]);
   }
 
   /* destroy hash table */
@@ -304,7 +314,6 @@ int main(int argc, char * argv[])
 
   /* we no longer need these two arrays (keys and values of hash table... */
   free(data);
-  free(tipnodes);
 
   /* ...neither the sequences and the headers as they are already
      present in the form of probabilities in the tip CLVs */
@@ -318,18 +327,20 @@ int main(int argc, char * argv[])
 
   /* allocate a buffer for storing pointers to nodes of the tree in postorder
      traversal */
-  travbuffer = (pll_utree_t **)malloc(nodes_count * sizeof(pll_utree_t *));
+  travbuffer = (pll_unode_t **)xmalloc(nodes_count * sizeof(pll_unode_t *));
 
-
-  branch_lengths = (double *)malloc(branch_count * sizeof(double));
-  matrix_indices = (unsigned int *)malloc(branch_count * sizeof(unsigned int));
-  operations = (pll_operation_t *)malloc(inner_nodes_count *
-                                                sizeof(pll_operation_t));
+  branch_lengths = (double *)xmalloc(branch_count * sizeof(double));
+  matrix_indices = (unsigned int *)xmalloc(branch_count * sizeof(unsigned int));
+  operations = (pll_operation_t *)xmalloc(inner_nodes_count *
+                                          sizeof(pll_operation_t));
 
   /* compute a partial traversal starting from the randomly selected
      inner node */
+  pll_unode_t * root = tree->nodes[tip_nodes_count+inner_nodes_count-1];
   unsigned int traversal_size;
-  if (!pll_utree_traverse(tree,
+
+  if (!pll_utree_traverse(root,
+                          PLL_TREE_TRAVERSE_POSTORDER,
                           cb_full_traversal,
                           travbuffer,
                           &traversal_size))
@@ -351,7 +362,7 @@ int main(int argc, char * argv[])
 
   /* compute the discretized category rates from a gamma distribution
      with alpha shape 1 and store them in rate_cats  */
-  pll_compute_gamma_cats(1, 4, rate_cats);
+  pll_compute_gamma_cats(1, 4, rate_cats, PLL_GAMMA_RATES_MEAN);
 
   /* set rate categories */
   pll_set_category_rates(partition, rate_cats);
@@ -412,11 +423,11 @@ int main(int argc, char * argv[])
      whose frequency vector is to be used for each rate category */
 
   double logl = pll_compute_edge_loglikelihood(partition,
-                                               tree->clv_index,
-                                               tree->scaler_index,
-                                               tree->back->clv_index,
-                                               tree->back->scaler_index,
-                                               tree->pmatrix_index,
+                                               root->clv_index,
+                                               root->scaler_index,
+                                               root->back->clv_index,
+                                               root->back->scaler_index,
+                                               root->pmatrix_index,
                                                params_indices,
                                                NULL);
 
@@ -432,7 +443,7 @@ int main(int argc, char * argv[])
   free(operations);
 
   /* we will no longer need the tree structure */
-  pll_utree_destroy(tree);
+  pll_utree_destroy(tree,NULL);
 
   return (EXIT_SUCCESS);
 }
diff --git a/examples/rooted-tacg/rooted-tacg.c b/examples/rooted-tacg/rooted-tacg.c
index 21c8144..3e80ca4 100644
--- a/examples/rooted-tacg/rooted-tacg.c
+++ b/examples/rooted-tacg/rooted-tacg.c
@@ -193,7 +193,7 @@ int main(int argc, char * argv[])
                                    5,       /* How many probability matrices should we allocate */
                                    4,       /* Number of rate categories */
                                    4,       /* How many scale buffers do we want */
-                                   PLL_ATTRIB_ARCH_CPU);        /* various attributes */
+                                   PLL_ATTRIB_ARCH_AVX);        /* various attributes */
 
   /* initialize an array of two different branch lengths */
   double branch_lengths[5] = { 0.36, 0.722, 0.985, 0.718, 1.44};
diff --git a/examples/rooted/rooted.c b/examples/rooted/rooted.c
index 30e598b..55c2d32 100644
--- a/examples/rooted/rooted.c
+++ b/examples/rooted/rooted.c
@@ -15,7 +15,7 @@ int main(int argc, char * argv[])
                                    5,       /* How many probability matrices should we allocate */
                                    4,       /* Number of rate categories */
                                    4,       /* How many scale buffers do we want */
-                                   PLL_ATTRIB_ARCH_CPU);        /* various attributes */
+                                   PLL_ATTRIB_ARCH_AVX);        /* various attributes */
 
   /* initialize an array of two different branch lengths */
   double branch_lengths[5] = { 0.36, 0.722, 0.985, 0.718, 1.44};
diff --git a/examples/unrooted/Makefile b/examples/stepwise/Makefile
similarity index 97%
copy from examples/unrooted/Makefile
copy to examples/stepwise/Makefile
index c6470f5..26bd2ea 100644
--- a/examples/unrooted/Makefile
+++ b/examples/stepwise/Makefile
@@ -28,11 +28,11 @@ CC = gcc
 CFLAGS = -Wall -g -O3 $(WARN)
 LINKFLAGS = -L. $(PROFILING)
 LIBS=-lpll -lm
-PROG=unrooted
+PROG=stepwise
 
 all: $(PROG)
 
-OBJS=unrooted.o
+OBJS=$(PROG).o
 
 $(PROG): $(OBJS)
 	$(CC) $(LINKFLAGS) -o $@ $+ $(LIBS) $(LDFLAGS)
diff --git a/examples/stepwise/stepwise.c b/examples/stepwise/stepwise.c
new file mode 100644
index 0000000..fb40e5c
--- /dev/null
+++ b/examples/stepwise/stepwise.c
@@ -0,0 +1,243 @@
+/*
+    Copyright (C) 2015 Tomas Flouri
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Contact: Tomas Flouri <Tomas.Flouri at h-its.org>,
+    Exelixis Lab, Heidelberg Instutute for Theoretical Studies
+    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
+*/
+
+#include "pll.h"
+#include <stdarg.h>
+#include <search.h>
+#include <time.h>
+
+#define RATE_CATS 4
+
+static void fatal(const char * format, ...) __attribute__ ((noreturn));
+
+static void fatal(const char * format, ...)
+{
+  va_list argptr;
+  va_start(argptr, format);
+  vfprintf(stderr, format, argptr);
+  va_end(argptr);
+  fprintf(stderr, "\n");
+  exit(EXIT_FAILURE);
+}
+
+int main(int argc, char * argv[])
+{
+  unsigned int i;
+  unsigned int tip_nodes_count, inner_nodes_count, nodes_count, branch_count;
+  pll_partition_t * partition;
+  unsigned int arch = PLL_ATTRIB_ARCH_CPU;
+
+  /* we accept only two arguments - the newick tree (unrooted binary) and the
+     alignment in the form of FASTA reads */
+  if (argc != 5)
+    fatal(" syntax: %s [fasta] [seed] [attrib] [states]", argv[0]);
+
+  /* open FASTA file */
+  pll_fasta_t * fp = pll_fasta_open(argv[1], pll_map_fasta);
+  if (!fp)
+    fatal("Error opening file %s", argv[1]);
+
+  if (!strcasecmp(argv[3], "avx"))
+    arch = PLL_ATTRIB_ARCH_AVX;
+  else if (!strcasecmp(argv[3], "avx2"))
+    arch = PLL_ATTRIB_ARCH_AVX2;
+  else if (!strcasecmp(argv[3], "sse"))
+    arch = PLL_ATTRIB_ARCH_SSE;
+  else if (!strcasecmp(argv[3], "tpavx"))
+    arch = PLL_ATTRIB_ARCH_AVX | PLL_ATTRIB_PATTERN_TIP;
+  else if (!strcasecmp(argv[3], "tpavx2"))
+    arch = PLL_ATTRIB_ARCH_AVX2 | PLL_ATTRIB_PATTERN_TIP;
+  else if (!strcasecmp(argv[3], "tpsse"))
+    arch = PLL_ATTRIB_ARCH_SSE | PLL_ATTRIB_PATTERN_TIP;
+  else if (!strcasecmp(argv[3], "tpcpu"))
+    arch = PLL_ATTRIB_ARCH_CPU| PLL_ATTRIB_PATTERN_TIP;
+
+  printf("Setting flags:\n");
+  if (arch & PLL_ATTRIB_ARCH_CPU)
+    printf("\tPLL_ATTRIB_ARCH_CPU\n");
+  if (arch & PLL_ATTRIB_ARCH_SSE)
+    printf("\tPLL_ATTRIB_ARCH_SSE\n");
+  if (arch & PLL_ATTRIB_ARCH_AVX)
+    printf("\tPLL_ATTRIB_ARCH_AVX\n");
+  if (arch & PLL_ATTRIB_ARCH_AVX2)
+    printf("\tPLL_ATTRIB_ARCH_AVX2\n");
+  if (arch & PLL_ATTRIB_PATTERN_TIP)
+    printf("\tPLL_ATTRIB_PATTERN_TIP\n");
+
+  unsigned int states = atoi(argv[4]);
+  unsigned const int * map = pll_map_nt;
+  if (states == 20)
+  {
+    map = pll_map_aa;
+  }
+
+  char * seq = NULL;
+  char * hdr = NULL;
+  long seqlen;
+  long hdrlen;
+  long seqno;
+
+
+  unsigned int max_alloc = 100;
+  /* allocate arrays to store FASTA headers and sequences */
+  char ** headers = (char **)calloc(max_alloc, sizeof(char *));
+  char ** seqdata = (char **)calloc(max_alloc, sizeof(char *));
+
+  /* read FASTA sequences and make sure they are all of the same length */
+  int sites = -1;
+  for (i = 0; pll_fasta_getnext(fp,&hdr,&hdrlen,&seq,&seqlen,&seqno); ++i)
+  {
+    if (i >= max_alloc)
+    {
+      max_alloc += 100;
+      char ** tmpheaders = (char **)calloc(max_alloc, sizeof(char *));
+      char ** tmpseqdata = (char **)calloc(max_alloc, sizeof(char *));
+      memcpy(tmpheaders,headers,(max_alloc-100)*sizeof(char *));
+      memcpy(tmpseqdata,seqdata,(max_alloc-100)*sizeof(char *));
+      free(headers);
+      free(seqdata);
+      headers = tmpheaders;
+      seqdata = tmpseqdata;
+    }
+
+    if (sites != -1 && sites != seqlen)
+      fatal("FASTA file does not contain equal size sequences\n");
+
+    if (sites == -1) sites = seqlen;
+
+    headers[i] = hdr;
+    seqdata[i] = seq;
+  }
+
+  /* did we stop reading the file because we reached EOF? */
+  if (pll_errno != PLL_ERROR_FILE_EOF)
+  {
+    printf("errno %d %s\n", pll_errno, pll_errmsg);
+    fatal("Error while reading file %s", argv[1]);
+  }
+
+  /* close FASTA file */
+  pll_fasta_close(fp);
+
+  if (sites == -1)
+    fatal("Unable to read alignment");
+
+  if (i <= 0)
+    fatal("FASTA error");
+
+  tip_nodes_count = i;
+  inner_nodes_count = tip_nodes_count - 2;
+  nodes_count = inner_nodes_count + tip_nodes_count;
+  branch_count = nodes_count - 1;
+
+  printf("Number of tip/leaf nodes in tree: %d\n", tip_nodes_count);
+  printf("Number of inner nodes in tree: %d\n", inner_nodes_count);
+  printf("Total number of nodes in tree: %d\n", nodes_count);
+  printf("Number of branches in tree: %d\n", branch_count);
+  printf("Number of sites: %d\n", sites);
+
+  unsigned int * weight = pll_compress_site_patterns(seqdata,
+                                                     map,
+                                                     tip_nodes_count,
+                                                     &sites);
+  printf("Number of unique sites: %d\n", sites);
+
+
+  /* create the PLL partition instance
+
+  tip_nodes_count : the number of tip sequences we want to have
+  inner_nodes_count : the number of CLV buffers to be allocated for inner nodes
+  STATES : the number of states that our data have
+  1 : number of different substitution models (or eigen decomposition)
+      to use concurrently (i.e. 4 for LG4)
+  branch_count: number of probability matrices to be allocated
+  RATE_CATS : number of rate categories we will use
+  inner_nodes_count : how many scale buffers to use
+  PLL_ATTRIB_ARCH_SSE : list of flags for hardware acceleration (not yet implemented)
+
+  */
+
+  partition = pll_partition_create(tip_nodes_count,
+                                   inner_nodes_count,
+                                   states,
+                                   (unsigned int)sites,
+                                   1,
+                                   branch_count,
+                                   RATE_CATS,
+                                   inner_nodes_count,
+                                   arch);
+
+
+  /* set pattern weights and free the weights array */
+  pll_set_pattern_weights(partition,weight);
+  free(weight);
+
+  /* find sequences in hash table and link them with the corresponding taxa */
+  for (i = 0; i < tip_nodes_count; ++i)
+    pll_set_tip_states(partition, i, map, seqdata[i]);
+
+
+  unsigned int score;
+
+  pll_parsimony_t * parsimony = pll_fastparsimony_init(partition);
+
+  pll_utree_t * tree = pll_fastparsimony_stepwise(&parsimony, headers, &score,1,atoi(argv[2]));
+  printf("Score: %u\n", score);
+
+  /* select a random inner node */
+  long int r = random() % tree->inner_count;
+  pll_unode_t * root = tree->nodes[tree->tip_count + r];
+
+  /* export the tree to newick format with the selected inner node as the root
+     of the unrooted binary tree */
+  char * newick = pll_utree_export_newick(root,NULL);
+  printf("%s\n", newick);
+  free(newick);
+
+  /* uncomment the following code to output an SVG file 
+
+  pll_svg_attrib_t * attr = pll_svg_attrib_create();
+  attr->width = 1920;
+  pll_utree_export_svg(tree,tip_nodes_count,attr,"parsimony.svg");
+  pll_svg_attrib_destroy(attr);
+
+  */
+
+  pll_parsimony_destroy(parsimony);
+
+  /* destroy all structures allocated for the concrete PLL partition instance */
+  pll_partition_destroy(partition);
+
+  /* we will no longer need the tree structure */
+  pll_utree_destroy(tree,NULL);
+  /* ...neither the sequences and the headers as they are already
+     present in the form of probabilities in the tip CLVs */
+  for(i = 0; i < tip_nodes_count; ++i)
+  {
+    free(seqdata[i]);
+    free(headers[i]);
+  }
+  free(seqdata);
+  free(headers);
+
+
+  return (EXIT_SUCCESS);
+}
diff --git a/examples/stepwise/target.mk b/examples/stepwise/target.mk
new file mode 100644
index 0000000..7a4afa3
--- /dev/null
+++ b/examples/stepwise/target.mk
@@ -0,0 +1,2 @@
+stepwisedir = $(docdir)/examples/stepwise
+dist_stepwise_DATA = stepwise/stepwise.c stepwise/Makefile
diff --git a/examples/unrooted/.gitignore b/examples/unrooted/.gitignore
new file mode 100644
index 0000000..cbf0759
--- /dev/null
+++ b/examples/unrooted/.gitignore
@@ -0,0 +1 @@
+unrooted
diff --git a/examples/unrooted/Makefile b/examples/unrooted/Makefile
index c6470f5..eb98216 100644
--- a/examples/unrooted/Makefile
+++ b/examples/unrooted/Makefile
@@ -25,7 +25,7 @@ PROFILING=-g
 WARN=-Wall -Wsign-compare
 
 CC = gcc
-CFLAGS = -Wall -g -O3 $(WARN)
+CFLAGS = -Wall -g -O3 $(WARN) -std=c99
 LINKFLAGS = -L. $(PROFILING)
 LIBS=-lpll -lm
 PROG=unrooted
diff --git a/examples/unrooted/unrooted.c b/examples/unrooted/unrooted.c
index 22c8e08..30d9aa9 100644
--- a/examples/unrooted/unrooted.c
+++ b/examples/unrooted/unrooted.c
@@ -37,7 +37,7 @@ int main(int argc, char * argv[])
                                    5,       /* How many probability matrices should we allocate */
                                    4,       /* Number of rate categories */
                                    2,       /* How many scale buffers do we want */
-                                   PLL_ATTRIB_PATTERN_TIP | PLL_ATTRIB_ARCH_CPU);        /* various attributes */
+                                   PLL_ATTRIB_ARCH_AVX);        /* various attributes */
 
   /* initialize an array of two different branch lengths */
   double branch_lengths[5] = { 0.2, 0.4, 0.3, 0.5, 0.6};
@@ -54,7 +54,7 @@ int main(int argc, char * argv[])
 
   /* discretized category rates from a gamma distribution with alpha shape 1 */
   double rate_cats[4];
-  pll_compute_gamma_cats(alpha, 4, rate_cats);
+  pll_compute_gamma_cats(alpha, 4, rate_cats, PLL_GAMMA_RATES_MEAN);
 
   /* set frequencies */
   pll_set_frequencies(partition, 0, frequencies);
diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4
new file mode 100644
index 0000000..ca36397
--- /dev/null
+++ b/m4/ax_check_compile_flag.m4
@@ -0,0 +1,74 @@
+# ===========================================================================
+#   http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
+#
+# DESCRIPTION
+#
+#   Check whether the given FLAG works with the current language's compiler
+#   or gives an error.  (Warnings, however, are ignored)
+#
+#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+#   success/failure.
+#
+#   If EXTRA-FLAGS is defined, it is added to the current language's default
+#   flags (e.g. CFLAGS) when the check is done.  The check is thus made with
+#   the flags: "CFLAGS EXTRA-FLAGS FLAG".  This can for example be used to
+#   force the compiler to issue an error when a bad flag is given.
+#
+#   INPUT gives an alternative input source to AC_COMPILE_IFELSE.
+#
+#   NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
+#   macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Guido U. Draheim <guidod at gmx.de>
+#   Copyright (c) 2011 Maarten Bosmans <mkbosmans 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/>.
+#
+#   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 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.
+
+#serial 4
+
+AC_DEFUN([AX_CHECK_COMPILE_FLAG],
+[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
+AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
+AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
+  ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
+  _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
+  AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
+    [AS_VAR_SET(CACHEVAR,[yes])],
+    [AS_VAR_SET(CACHEVAR,[no])])
+  _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
+AS_VAR_IF(CACHEVAR,yes,
+  [m4_default([$2], :)],
+  [m4_default([$3], :)])
+AS_VAR_POPDEF([CACHEVAR])dnl
+])dnl AX_CHECK_COMPILE_FLAGS
diff --git a/m4/ax_ext.m4 b/m4/ax_ext.m4
new file mode 100644
index 0000000..be9b57f
--- /dev/null
+++ b/m4/ax_ext.m4
@@ -0,0 +1,303 @@
+# ===========================================================================
+#          http://www.gnu.org/software/autoconf-archive/ax_ext.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_EXT
+#
+# DESCRIPTION
+#
+#   Find supported SIMD extensions by requesting cpuid. When a SIMD
+#   extension is found, the -m"simdextensionname" is added to SIMD_FLAGS if
+#   compiler supports it. For example, if "sse2" is available then "-msse2"
+#   is added to SIMD_FLAGS.
+#
+#   Find other supported CPU extensions by requesting cpuid. When a
+#   processor extension is found, the -m"extensionname" is added to
+#   CPUEXT_FLAGS if compiler supports it. For example, if "bmi2" is
+#   available then "-mbmi2" is added to CPUEXT_FLAGS.
+#
+#   This macro calls:
+#
+#     AC_SUBST(SIMD_FLAGS)
+#     AC_SUBST(CPUEXT_FLAGS)
+#
+#   And defines:
+#
+#     HAVE_RDRND / HAVE_BMI1 / HAVE_BMI2 / HAVE_ADX / HAVE_MPX
+#     HAVE_PREFETCHWT1 / HAVE_ABM / HAVE_MMX / HAVE_SSE / HAVE_SSE2
+#     HAVE_SSE3 / HAVE_SSSE3 / HAVE_SSE4_1 / HAVE_SSE4_2 / HAVE_SSE4a
+#     HAVE_SHA / HAVE_AES / HAVE_AVX / HAVE_FMA3 / HAVE_FMA4 / HAVE_XOP
+#     HAVE_AVX2 / HAVE_AVX512_F / HAVE_AVX512_CD / HAVE_AVX512_PF
+#     HAVE_AVX512_ER / HAVE_AVX512_VL / HAVE_AVX512_BW / HAVE_AVX512_DQ
+#     HAVE_AVX512_IFMA / HAVE_AVX512_VBMI
+#
+# LICENSE
+#
+#   Copyright (c) 2007 Christophe Tournayre <turn3r at users.sourceforge.net>
+#   Copyright (c) 2013,2015 Michael Petch <mpetch at capp-sysware.com>
+#
+#   Copying and distribution of this file, with or without modification, are
+#   permitted in any medium without royalty provided the copyright notice
+#   and this notice are preserved. This file is offered as-is, without any
+#   warranty.
+
+#serial 15
+
+AC_DEFUN([AX_EXT],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST])
+  AC_REQUIRE([AC_PROG_CC])
+
+  CPUEXT_FLAGS=""
+  SIMD_FLAGS=""
+
+  case $host_cpu in
+    powerpc*)
+      AC_CACHE_CHECK([whether altivec is supported], [ax_cv_have_altivec_ext],
+          [
+            if test `/usr/sbin/sysctl -a 2>/dev/null| grep -c hw.optional.altivec` != 0; then
+                if test `/usr/sbin/sysctl -n hw.optional.altivec` = 1; then
+                  ax_cv_have_altivec_ext=yes
+                fi
+            fi
+          ])
+
+          if test "$ax_cv_have_altivec_ext" = yes; then
+            AC_DEFINE(HAVE_ALTIVEC,,[Support Altivec instructions])
+            AX_CHECK_COMPILE_FLAG(-faltivec, SIMD_FLAGS="$SIMD_FLAGS -faltivec", [])
+          fi
+    ;;
+
+    i[[3456]]86*|x86_64*|amd64*)
+
+      AC_REQUIRE([AX_GCC_X86_CPUID])
+      AC_REQUIRE([AX_GCC_X86_CPUID_COUNT])
+      AC_REQUIRE([AX_GCC_X86_AVX_XGETBV])
+
+      eax_cpuid0=0
+      AX_GCC_X86_CPUID(0x00000000)
+      if test "$ax_cv_gcc_x86_cpuid_0x00000000" != "unknown";
+      then
+        eax_cpuid0=`echo $ax_cv_gcc_x86_cpuid_0x00000000 | cut -d ":" -f 1`
+      fi
+
+      eax_cpuid80000000=0
+      AX_GCC_X86_CPUID(0x80000000)
+      if test "$ax_cv_gcc_x86_cpuid_0x80000000" != "unknown";
+      then
+        eax_cpuid80000000=`echo $ax_cv_gcc_x86_cpuid_0x80000000 | cut -d ":" -f 1`
+      fi
+
+      ecx_cpuid1=0
+      edx_cpuid1=0
+      if test "$((0x$eax_cpuid0))" -ge 1 ; then
+        AX_GCC_X86_CPUID(0x00000001)
+        if test "$ax_cv_gcc_x86_cpuid_0x00000001" != "unknown";
+        then
+          ecx_cpuid1=`echo $ax_cv_gcc_x86_cpuid_0x00000001 | cut -d ":" -f 3`
+          edx_cpuid1=`echo $ax_cv_gcc_x86_cpuid_0x00000001 | cut -d ":" -f 4`
+        fi
+      fi
+
+      ebx_cpuid7=0
+      ecx_cpuid7=0
+      if test "$((0x$eax_cpuid0))" -ge 7 ; then
+        AX_GCC_X86_CPUID_COUNT(0x00000007, 0x00)
+        if test "$ax_cv_gcc_x86_cpuid_0x00000007" != "unknown";
+        then
+          ebx_cpuid7=`echo $ax_cv_gcc_x86_cpuid_0x00000007 | cut -d ":" -f 2`
+          ecx_cpuid7=`echo $ax_cv_gcc_x86_cpuid_0x00000007 | cut -d ":" -f 3`
+        fi
+      fi
+
+      ecx_cpuid80000001=0
+      edx_cpuid80000001=0
+      if test "$((0x$eax_cpuid80000000))" -ge "$((0x80000001))" ; then
+        AX_GCC_X86_CPUID(0x80000001)
+        if test "$ax_cv_gcc_x86_cpuid_0x80000001" != "unknown";
+        then
+          ecx_cpuid80000001=`echo $ax_cv_gcc_x86_cpuid_0x80000001 | cut -d ":" -f 3`
+          edx_cpuid80000001=`echo $ax_cv_gcc_x86_cpuid_0x80000001 | cut -d ":" -f 4`
+        fi
+      fi
+
+      AC_CACHE_VAL([ax_cv_have_mmx_os_support_ext],
+      [
+        ax_cv_have_mmx_os_support_ext=yes
+      ])
+
+      ax_cv_have_none_os_support_ext=yes
+
+      AC_CACHE_VAL([ax_cv_have_sse_os_support_ext],
+      [
+        ax_cv_have_sse_os_support_ext=no,
+        if test "$((0x$edx_cpuid1>>25&0x01))" = 1; then
+          AC_LANG_PUSH([C])
+          AC_TRY_RUN([
+#include <signal.h>
+#include <stdlib.h>
+            /* No way at ring1 to ring3 in protected mode to check the CR0 and CR4
+               control registers directly. Execute an SSE instruction.
+               If it raises SIGILL then OS doesn't support SSE based instructions */
+            void sig_handler(int signum){ exit(1); }
+            int main(){
+              signal(SIGILL, sig_handler);
+              /* SSE instruction xorps  %xmm0,%xmm0 */
+              __asm__ __volatile__ (".byte 0x0f, 0x57, 0xc0");
+              return 0;
+            }],
+            ax_cv_have_sse_os_support_ext=yes,
+            ax_cv_have_sse_os_support_ext=no,
+            ax_cv_have_sse_os_support_ext=no)
+          AC_LANG_POP([C])
+        fi
+      ])
+
+      xgetbv_eax=0
+      if test "$((0x$ecx_cpuid1>>28&0x01))" = 1; then
+        AX_GCC_X86_AVX_XGETBV(0x00000000)
+
+        if test x"$ax_cv_gcc_x86_avx_xgetbv_0x00000000" != x"unknown"; then
+          xgetbv_eax=`echo $ax_cv_gcc_x86_avx_xgetbv_0x00000000 | cut -d ":" -f 1`
+        fi
+
+        AC_CACHE_VAL([ax_cv_have_avx_os_support_ext],
+        [
+          ax_cv_have_avx_os_support_ext=no
+          if test "$((0x$ecx_cpuid1>>27&0x01))" = 1; then
+            if test "$((0x$xgetbv_eax&0x6))" = 6; then
+              ax_cv_have_avx_os_support_ext=yes
+            fi
+          fi
+        ])
+      fi
+
+      AC_CACHE_VAL([ax_cv_have_avx512_os_support_ext],
+      [
+        ax_cv_have_avx512_os_support_ext=no
+        if test "$ax_cv_have_avx_os_support_ext" = yes; then
+          if test "$((0x$xgetbv_eax&0xe6))" = "$((0xe6))"; then
+            ax_cv_have_avx512_os_support_ext=yes
+          fi
+        fi
+      ])
+
+      for ac_instr_info dnl
+      in "none;rdrnd;RDRND;ecx_cpuid1,30;-mrdrnd;HAVE_RDRND;CPUEXT_FLAGS" dnl
+         "none;bmi1;BMI1;ebx_cpuid7,3;-mbmi;HAVE_BMI1;CPUEXT_FLAGS" dnl
+         "none;bmi2;BMI2;ebx_cpuid7,8;-mbmi2;HAVE_BMI2;CPUEXT_FLAGS" dnl
+         "none;adx;ADX;ebx_cpuid7,19;-madx;HAVE_ADX;CPUEXT_FLAGS" dnl
+         "none;mpx;MPX;ebx_cpuid7,14;-mmpx;HAVE_MPX;CPUEXT_FLAGS" dnl
+         "none;prefetchwt1;PREFETCHWT1;ecx_cpuid7,0;-mprefetchwt1;HAVE_PREFETCHWT1;CPUEXT_FLAGS" dnl
+         "none;abm;ABM;ecx_cpuid80000001,5;-mabm;HAVE_ABM;CPUEXT_FLAGS" dnl
+         "mmx;mmx;MMX;edx_cpuid1,23;-mmmx;HAVE_MMX;SIMD_FLAGS" dnl
+         "sse;sse;SSE;edx_cpuid1,25;-msse;HAVE_SSE;SIMD_FLAGS" dnl
+         "sse;sse2;SSE2;edx_cpuid1,26;-msse2;HAVE_SSE2;SIMD_FLAGS" dnl
+         "sse;sse3;SSE3;ecx_cpuid1,1;-msse3;HAVE_SSE3;SIMD_FLAGS" dnl
+         "sse;ssse3;SSSE3;ecx_cpuid1,9;-mssse3;HAVE_SSSE3;SIMD_FLAGS" dnl
+         "sse;sse41;SSE4.1;ecx_cpuid1,19;-msse4.1;HAVE_SSE4_1;SIMD_FLAGS" dnl
+         "sse;sse42;SSE4.2;ecx_cpuid1,20;-msse4.2;HAVE_SSE4_2;SIMD_FLAGS" dnl
+         "sse;sse4a;SSE4a;ecx_cpuid80000001,6;-msse4a;HAVE_SSE4a;SIMD_FLAGS" dnl
+         "sse;sha;SHA;ebx_cpuid7,29;-msha;HAVE_SHA;SIMD_FLAGS" dnl
+         "sse;aes;AES;ecx_cpuid1,25;-maes;HAVE_AES;SIMD_FLAGS" dnl
+         "avx;avx;AVX;ecx_cpuid1,28;-mavx;HAVE_AVX;SIMD_FLAGS" dnl
+         "avx;fma3;FMA3;ecx_cpuid1,12;-mfma;HAVE_FMA3;SIMD_FLAGS" dnl
+         "avx;fma4;FMA4;ecx_cpuid80000001,16;-mfma4;HAVE_FMA4;SIMD_FLAGS" dnl
+         "avx;xop;XOP;ecx_cpuid80000001,11;-mxop;HAVE_XOP;SIMD_FLAGS" dnl
+         "avx;avx2;AVX2;ebx_cpuid7,5;-mavx2;HAVE_AVX2;SIMD_FLAGS" dnl
+         "avx512;avx512f;AVX512-F;ebx_cpuid7,16;-mavx512f;HAVE_AVX512_F;SIMD_FLAGS" dnl
+         "avx512;avx512cd;AVX512-CD;ebx_cpuid7,28;-mavx512cd;HAVE_AVX512_CD;SIMD_FLAGS" dnl
+         "avx512;avx512pf;AVX512-PF;ebx_cpuid7,26;-mavx512pf;HAVE_AVX512_PF;SIMD_FLAGS" dnl
+         "avx512;avx512er;AVX512-ER;ebx_cpuid7,27;-mavx512er;HAVE_AVX512_ER;SIMD_FLAGS" dnl
+         "avx512;avx512vl;AVX512-VL;ebx_cpuid7,31;-mavx512vl;HAVE_AVX512_VL;SIMD_FLAGS" dnl
+         "avx512;avx512bw;AVX512-BW;ebx_cpuid7,30;-mavx512bw;HAVE_AVX512_BW;SIMD_FLAGS" dnl
+         "avx512;avx512dq;AVX512-DQ;ebx_cpuid7,17;-mavx512dq;HAVE_AVX512_DQ;SIMD_FLAGS" dnl
+         "avx512;avx512ifma;AVX512-IFMA;ebx_cpuid7,21;-mavx512ifma;HAVE_AVX512_IFMA;SIMD_FLAGS" dnl
+         "avx512;avx512vbmi;AVX512-VBMI;ecx_cpuid7,1;-mavx512vbmi;HAVE_AVX512_VBMI;SIMD_FLAGS" dnl
+         #
+      do ac_instr_os_support=$(eval echo \$ax_cv_have_$(echo $ac_instr_info | cut -d ";" -f 1)_os_support_ext)
+         ac_instr_acvar=$(echo $ac_instr_info | cut -d ";" -f 2)
+         ac_instr_shortname=$(echo $ac_instr_info | cut -d ";" -f 3)
+         ac_instr_chk_loc=$(echo $ac_instr_info | cut -d ";" -f 4)
+         ac_instr_chk_reg=0x$(eval echo \$$(echo $ac_instr_chk_loc | cut -d "," -f 1))
+         ac_instr_chk_bit=$(echo $ac_instr_chk_loc | cut -d "," -f 2)
+         ac_instr_compiler_flags=$(echo $ac_instr_info | cut -d ";" -f 5)
+         ac_instr_have_define=$(echo $ac_instr_info | cut -d ";" -f 6)
+         ac_instr_flag_type=$(echo $ac_instr_info | cut -d ";" -f 7)
+
+         AC_CACHE_CHECK([whether ${ac_instr_shortname} is supported by the processor], [ax_cv_have_${ac_instr_acvar}_cpu_ext],
+         [
+           eval ax_cv_have_${ac_instr_acvar}_cpu_ext=no
+           if test "$((${ac_instr_chk_reg}>>${ac_instr_chk_bit}&0x01))" = 1 ; then
+             eval ax_cv_have_${ac_instr_acvar}_cpu_ext=yes
+           fi
+         ])
+
+         if test x"$(eval echo \$ax_cv_have_${ac_instr_acvar}_cpu_ext)" = x"yes"; then
+           AC_CACHE_CHECK([whether ${ac_instr_shortname} is supported by the processor and OS], [ax_cv_have_${ac_instr_acvar}_ext],
+           [
+             eval ax_cv_have_${ac_instr_acvar}_ext=no
+             if test x"${ac_instr_os_support}" = x"yes"; then
+               eval ax_cv_have_${ac_instr_acvar}_ext=yes
+             fi
+           ])
+
+           if test "$(eval echo \$ax_cv_have_${ac_instr_acvar}_ext)" = yes; then
+             AX_CHECK_COMPILE_FLAG(${ac_instr_compiler_flags}, eval ax_cv_support_${ac_instr_acvar}_ext=yes,
+                                                               eval ax_cv_support_${ac_instr_acvar}_ext=no)
+             if test x"$(eval echo \$ax_cv_support_${ac_instr_acvar}_ext)" = x"yes"; then
+               eval ${ac_instr_flag_type}=\"\$${ac_instr_flag_type} ${ac_instr_compiler_flags}\"
+               AC_DEFINE_UNQUOTED([${ac_instr_have_define}])
+             else
+               AC_MSG_WARN([Your processor and OS supports ${ac_instr_shortname} instructions but not your compiler, can you try another compiler?])
+             fi
+           else
+             if test x"${ac_instr_os_support}" = x"no"; then
+               AC_CACHE_VAL(ax_cv_support_${ac_instr_acvar}_ext, eval ax_cv_support_${ac_instr_acvar}_ext=no)
+               AC_MSG_WARN([Your processor supports ${ac_instr_shortname}, but your OS doesn't])
+             fi
+           fi
+         else
+           AC_CACHE_VAL(ax_cv_have_${ac_instr_acvar}_ext, eval ax_cv_have_${ac_instr_acvar}_ext=no)
+           AC_CACHE_VAL(ax_cv_support_${ac_instr_acvar}_ext, eval ax_cv_support_${ac_instr_acvar}_ext=no)
+         fi
+      done
+  ;;
+  esac
+
+  AH_TEMPLATE([HAVE_RDRND],[Define to 1 to support Digital Random Number Generator])
+  AH_TEMPLATE([HAVE_BMI1],[Define to 1 to support Bit Manipulation Instruction Set 1])
+  AH_TEMPLATE([HAVE_BMI2],[Define to 1 to support Bit Manipulation Instruction Set 2])
+  AH_TEMPLATE([HAVE_ADX],[Define to 1 to support Multi-Precision Add-Carry Instruction Extensions])
+  AH_TEMPLATE([HAVE_MPX],[Define to 1 to support Memory Protection Extensions])
+  AH_TEMPLATE([HAVE_PREFETCHWT1],[Define to 1 to support Prefetch Vector Data Into Caches WT1])
+  AH_TEMPLATE([HAVE_ABM],[Define to 1 to support Advanced Bit Manipulation])
+  AH_TEMPLATE([HAVE_MMX],[Define to 1 to support Multimedia Extensions])
+  AH_TEMPLATE([HAVE_SSE],[Define to 1 to support Streaming SIMD Extensions])
+  AH_TEMPLATE([HAVE_SSE2],[Define to 1 to support Streaming SIMD Extensions])
+  AH_TEMPLATE([HAVE_SSE3],[Define to 1 to support Streaming SIMD Extensions 3])
+  AH_TEMPLATE([HAVE_SSSE3],[Define to 1 to support Supplemental Streaming SIMD Extensions 3])
+  AH_TEMPLATE([HAVE_SSE4_1],[Define to 1 to support Streaming SIMD Extensions 4.1])
+  AH_TEMPLATE([HAVE_SSE4_2],[Define to 1 to support Streaming SIMD Extensions 4.2])
+  AH_TEMPLATE([HAVE_SSE4a],[Define to 1 to support AMD Streaming SIMD Extensions 4a])
+  AH_TEMPLATE([HAVE_SHA],[Define to 1 to support Secure Hash Algorithm Extension])
+  AH_TEMPLATE([HAVE_AES],[Define to 1 to support Advanced Encryption Standard New Instruction Set (AES-NI)])
+  AH_TEMPLATE([HAVE_AVX],[Define to 1 to support Advanced Vector Extensions])
+  AH_TEMPLATE([HAVE_FMA3],[Define to 1 to support  Fused Multiply-Add Extensions 3])
+  AH_TEMPLATE([HAVE_FMA4],[Define to 1 to support Fused Multiply-Add Extensions 4])
+  AH_TEMPLATE([HAVE_XOP],[Define to 1 to support eXtended Operations Extensions])
+  AH_TEMPLATE([HAVE_AVX2],[Define to 1 to support Advanced Vector Extensions 2])
+  AH_TEMPLATE([HAVE_AVX512_F],[Define to 1 to support AVX-512 Foundation Extensions])
+  AH_TEMPLATE([HAVE_AVX512_CD],[Define to 1 to support AVX-512 Conflict Detection Instructions])
+  AH_TEMPLATE([HAVE_AVX512_PF],[Define to 1 to support AVX-512 Conflict Prefetch Instructions])
+  AH_TEMPLATE([HAVE_AVX512_ER],[Define to 1 to support AVX-512 Exponential & Reciprocal Instructions])
+  AH_TEMPLATE([HAVE_AVX512_VL],[Define to 1 to support AVX-512 Vector Length Extensions])
+  AH_TEMPLATE([HAVE_AVX512_BW],[Define to 1 to support AVX-512 Byte and Word Instructions])
+  AH_TEMPLATE([HAVE_AVX512_DQ],[Define to 1 to support AVX-512 Doubleword and Quadword Instructions])
+  AH_TEMPLATE([HAVE_AVX512_IFMA],[Define to 1 to support AVX-512 Integer Fused Multiply Add Instructions])
+  AH_TEMPLATE([HAVE_AVX512_VBMI],[Define to 1 to support AVX-512 Vector Byte Manipulation Instructions])
+  AC_SUBST(SIMD_FLAGS)
+  AC_SUBST(CPUEXT_FLAGS)
+])
diff --git a/m4/ax_gcc_x86_avx_xgetbv.m4 b/m4/ax_gcc_x86_avx_xgetbv.m4
new file mode 100644
index 0000000..2b38bbb
--- /dev/null
+++ b/m4/ax_gcc_x86_avx_xgetbv.m4
@@ -0,0 +1,79 @@
+# ===========================================================================
+#   http://www.gnu.org/software/autoconf-archive/ax_gcc_x86_avx_xgetbv.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_GCC_X86_AVX_XGETBV
+#
+# DESCRIPTION
+#
+#   On later x86 processors with AVX SIMD support, with gcc or a compiler
+#   that has a compatible syntax for inline assembly instructions, run a
+#   small program that executes the xgetbv instruction with input OP. This
+#   can be used to detect if the OS supports AVX instruction usage.
+#
+#   On output, the values of the eax and edx registers are stored as
+#   hexadecimal strings as "eax:edx" in the cache variable
+#   ax_cv_gcc_x86_avx_xgetbv.
+#
+#   If the xgetbv instruction fails (because you are running a
+#   cross-compiler, or because you are not using gcc, or because you are on
+#   a processor that doesn't have this instruction),
+#   ax_cv_gcc_x86_avx_xgetbv_OP is set to the string "unknown".
+#
+#   This macro mainly exists to be used in AX_EXT.
+#
+# LICENSE
+#
+#   Copyright (c) 2013 Michael Petch <mpetch at capp-sysware.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/>.
+#
+#   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 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.
+
+#serial 2
+
+AC_DEFUN([AX_GCC_X86_AVX_XGETBV],
+[AC_REQUIRE([AC_PROG_CC])
+AC_LANG_PUSH([C])
+AC_CACHE_CHECK(for x86-AVX xgetbv $1 output, ax_cv_gcc_x86_avx_xgetbv_$1,
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [
+     int op = $1, eax, edx;
+     FILE *f;
+      /* Opcodes for xgetbv */
+      __asm__ __volatile__ (".byte 0x0f, 0x01, 0xd0"
+        : "=a" (eax), "=d" (edx)
+        : "c" (op));
+     f = fopen("conftest_xgetbv", "w"); if (!f) return 1;
+     fprintf(f, "%x:%x\n", eax, edx);
+     fclose(f);
+     return 0;
+])],
+     [ax_cv_gcc_x86_avx_xgetbv_$1=`cat conftest_xgetbv`; rm -f conftest_xgetbv],
+     [ax_cv_gcc_x86_avx_xgetbv_$1=unknown; rm -f conftest_xgetbv],
+     [ax_cv_gcc_x86_avx_xgetbv_$1=unknown])])
+AC_LANG_POP([C])
+])
diff --git a/m4/ax_gcc_x86_cpuid.m4 b/m4/ax_gcc_x86_cpuid.m4
new file mode 100644
index 0000000..d90d411
--- /dev/null
+++ b/m4/ax_gcc_x86_cpuid.m4
@@ -0,0 +1,90 @@
+# ===========================================================================
+#     http://www.gnu.org/software/autoconf-archive/ax_gcc_x86_cpuid.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_GCC_X86_CPUID(OP)
+#   AX_GCC_X86_CPUID_COUNT(OP, COUNT)
+#
+# DESCRIPTION
+#
+#   On Pentium and later x86 processors, with gcc or a compiler that has a
+#   compatible syntax for inline assembly instructions, run a small program
+#   that executes the cpuid instruction with input OP. This can be used to
+#   detect the CPU type. AX_GCC_X86_CPUID_COUNT takes an additional COUNT
+#   parameter that gets passed into register ECX before calling cpuid.
+#
+#   On output, the values of the eax, ebx, ecx, and edx registers are stored
+#   as hexadecimal strings as "eax:ebx:ecx:edx" in the cache variable
+#   ax_cv_gcc_x86_cpuid_OP.
+#
+#   If the cpuid instruction fails (because you are running a
+#   cross-compiler, or because you are not using gcc, or because you are on
+#   a processor that doesn't have this instruction), ax_cv_gcc_x86_cpuid_OP
+#   is set to the string "unknown".
+#
+#   This macro mainly exists to be used in AX_GCC_ARCHFLAG.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Steven G. Johnson <stevenj at alum.mit.edu>
+#   Copyright (c) 2008 Matteo Frigo
+#   Copyright (c) 2015 Michael Petch <mpetch at capp-sysware.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/>.
+#
+#   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 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.
+
+#serial 9
+
+AC_DEFUN([AX_GCC_X86_CPUID],
+[AX_GCC_X86_CPUID_COUNT($1, 0)
+])
+
+AC_DEFUN([AX_GCC_X86_CPUID_COUNT],
+[AC_REQUIRE([AC_PROG_CC])
+AC_LANG_PUSH([C])
+AC_CACHE_CHECK(for x86 cpuid $1 output, ax_cv_gcc_x86_cpuid_$1,
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [
+     int op = $1, level = $2, eax, ebx, ecx, edx;
+     FILE *f;
+      __asm__ __volatile__ ("xchg %%ebx, %1\n"
+        "cpuid\n"
+        "xchg %%ebx, %1\n"
+        : "=a" (eax), "=r" (ebx), "=c" (ecx), "=d" (edx)
+        : "a" (op), "2" (level));
+
+     f = fopen("conftest_cpuid", "w"); if (!f) return 1;
+     fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
+     fclose(f);
+     return 0;
+])],
+     [ax_cv_gcc_x86_cpuid_$1=`cat conftest_cpuid`; rm -f conftest_cpuid],
+     [ax_cv_gcc_x86_cpuid_$1=unknown; rm -f conftest_cpuid],
+     [ax_cv_gcc_x86_cpuid_$1=unknown])])
+AC_LANG_POP([C])
+])
+
diff --git a/man/libpll.3 b/man/libpll.3
index 43084ee..2ff6344 100644
--- a/man/libpll.3
+++ b/man/libpll.3
@@ -576,5 +576,15 @@ bug releases may not be mentioned):
 .TP
 .BR v0.2.0\~ "released September 9th, 2016"
 First public release.
+.TP
+.BR v0.3.0\~ "released May 15th, 2017"
+Added faster vectorizations for 20-state and arbitrary-state models, unweighted
+parsimony functions, randomized stepwise addition, portable functions for
+parsing trees from C-strings, per-rate category scalers for preventing
+numberical underflows. Modified newick exporting function to accept callbacks
+for custom printing. Fixed derivatives computation, parsing of branch lengths,
+invariant sites computation, log-likelihood computation for cases where we have
+scaling and patterns, ascertainment bias computation, per-site log-likelihood
+computation, memory leaks. Added run-time detection of hardware.
 .RE
 .LP
diff --git a/src/Makefile.am b/src/Makefile.am
index 5e52f27..23c16ed 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,18 +1,6 @@
 lib_LTLIBRARIES=libpll.la
 
-if HAVE_AVX
-AVXFLAGS=-mavx
-else
-AVXFLAGS=
-endif
-
-if HAVE_SSE
-SSEFLAGS=-msse3
-else
-SSEFLAGS=
-endif
-
-AM_CFLAGS=-Wall -Wsign-compare -D_GNU_SOURCE -std=c99 -O3
+AM_CFLAGS=-Wall -Wsign-compare -D_GNU_SOURCE -std=c99 -O3 -fPIC
 
 LIBPLLHEADERS=\
 pll.h
@@ -35,27 +23,67 @@ derivatives.c \
 partials.c \
 compress.c \
 utree_moves.c \
+utree_svg.c \
 parsimony.c \
 core_derivatives.c \
 core_partials.c \
 core_pmatrix.c \
+core_likelihood.c \
+parse_utree.y \
+parse_rtree.y \
+lex_utree.l \
+lex_rtree.l \
+fast_parsimony.c \
+stepwise.c \
+random.c \
+phylip.c \
+hardware.c \
+init.c
+
+libpll_la_CFLAGS = $(AM_CFLAGS)
+
+# To allow cross-compilation, those SIMD flags will be used for the respective source files only  
+AVX2FLAGS=-mfma -mavx2
+AVXFLAGS=-mavx
+SSEFLAGS=-msse3
+
+SIMD_KERNELS=
+
+if HAVE_AVX2
+ SIMD_KERNELS+=libsimd_avx2.la
+ libsimd_avx2_la_CFLAGS=$(AM_CFLAGS) $(AVX2FLAGS)
+ libsimd_avx2_la_SOURCES=\
+ core_partials_avx2.c \
+ core_derivatives_avx2.c \
+ core_pmatrix_avx2.c \
+ core_likelihood_avx2.c \
+ fast_parsimony_avx2.c
+endif
+
+if HAVE_AVX
+SIMD_KERNELS+=libsimd_avx.la
+libsimd_avx_la_CFLAGS=$(AM_CFLAGS) $(AVXFLAGS)
+libsimd_avx_la_SOURCES=\
 core_partials_avx.c \
 core_derivatives_avx.c \
-core_likelihood.c \
+core_pmatrix_avx.c \
 core_likelihood_avx.c \
+fast_parsimony_avx.c
+endif
+
+if HAVE_SSE3
+SIMD_KERNELS+=libsimd_sse.la
+libsimd_sse_la_CFLAGS=$(AM_CFLAGS) $(SSEFLAGS)
+libsimd_sse_la_SOURCES=\
 core_partials_sse.c \
 core_derivatives_sse.c \
 core_likelihood_sse.c \
-core_pmatrix_avx.c \
 core_pmatrix_sse.c \
-parse_utree.y \
-parse_rtree.y \
-parse_phylip.y \
-lex_utree.l \
-lex_rtree.l \
-lex_phylip.l
+fast_parsimony_sse.c
+endif
 
-libpll_la_CFLAGS = $(AM_CFLAGS) $(AVXFLAGS) $(SSEFLAGS)
+libpll_la_LIBADD = $(SIMD_KERNELS)
+noinst_LTLIBRARIES = $(SIMD_KERNELS) 
 
 # This is the version information for libtool and not the libpll version. For
 #  more information see:
diff --git a/src/core_derivatives.c b/src/core_derivatives.c
index 5e9a4d7..a5fea48 100644
--- a/src/core_derivatives.c
+++ b/src/core_derivatives.c
@@ -19,17 +19,19 @@
     Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
 */
 
+#include <limits.h>
 #include "pll.h"
 
 PLL_EXPORT int pll_core_update_sumtable_ti_4x4(unsigned int sites,
                                                unsigned int rate_cats,
                                                const double * parent_clv,
                                                const unsigned char * left_tipchars,
-                                               double ** eigenvecs,
-                                               double ** inv_eigenvecs,
-                                               double ** freqs,
-                                               unsigned int * tipmap,
-                                               double *sumtable,
+                                               const unsigned int * parent_scaler,
+                                               double * const * eigenvecs,
+                                               double * const * inv_eigenvecs,
+                                               double * const * freqs,
+                                               const unsigned int * tipmap,
+                                               double * sumtable,
                                                unsigned int attrib)
 {
   unsigned int i, j, k, n;
@@ -45,9 +47,46 @@ PLL_EXPORT int pll_core_update_sumtable_ti_4x4(unsigned int sites,
 
   unsigned int states = 4;
 
+  unsigned int min_scaler;
+  unsigned int * rate_scalings = NULL;
+  int per_rate_scaling = (attrib & PLL_ATTRIB_RATE_SCALERS) ? 1 : 0;
+
+  /* powers of scale threshold for undoing the scaling */
+  double scale_minlh[PLL_SCALE_RATE_MAXDIFF];
+  if (per_rate_scaling)
+  {
+    rate_scalings = (unsigned int*) calloc(rate_cats, sizeof(unsigned int));
+
+    double scale_factor = 1.0;
+    for (i = 0; i < PLL_SCALE_RATE_MAXDIFF; ++i)
+    {
+      scale_factor *= PLL_SCALE_THRESHOLD;
+      scale_minlh[i] = scale_factor;
+    }
+  }
+
   /* build sumtable */
   for (n = 0; n < sites; n++)
   {
+    if (per_rate_scaling)
+    {
+      /* compute minimum per-rate scaler -> common per-site scaler */
+      min_scaler = UINT_MAX;
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = (parent_scaler) ? parent_scaler[n*rate_cats+i] : 0;
+        if (rate_scalings[i] < min_scaler)
+          min_scaler = rate_scalings[i];
+      }
+
+      /* compute relative capped per-rate scalers */
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = PLL_MIN(rate_scalings[i] - min_scaler,
+                                   PLL_SCALE_RATE_MAXDIFF);
+      }
+    }
+
     for (i = 0; i < rate_cats; ++i)
     {
       t_eigenvecs = eigenvecs[i];
@@ -67,6 +106,9 @@ PLL_EXPORT int pll_core_update_sumtable_ti_4x4(unsigned int sites,
           tipstate >>= 1;
         }
         sum[j] = lefterm * righterm;
+
+        if (rate_scalings && rate_scalings[i] > 0)
+          sum[j] *= scale_minlh[rate_scalings[i]-1];
       }
 
       t_clvc += states;
@@ -74,6 +116,9 @@ PLL_EXPORT int pll_core_update_sumtable_ti_4x4(unsigned int sites,
     }
   }
 
+  if (rate_scalings)
+    free(rate_scalings);
+
   return PLL_SUCCESS;
 }
 
@@ -82,10 +127,12 @@ PLL_EXPORT int pll_core_update_sumtable_ii(unsigned int states,
                                            unsigned int rate_cats,
                                            const double * parent_clv,
                                            const double * child_clv,
-                                           double ** eigenvecs,
-                                           double ** inv_eigenvecs,
-                                           double ** freqs,
-                                           double *sumtable,
+                                           const unsigned int * parent_scaler,
+                                           const unsigned int * child_scaler,
+                                           double * const * eigenvecs,
+                                           double * const * inv_eigenvecs,
+                                           double * const * freqs,
+                                           double * sumtable,
                                            unsigned int attrib)
 {
   unsigned int i, j, k, n;
@@ -99,38 +146,99 @@ PLL_EXPORT int pll_core_update_sumtable_ii(unsigned int states,
   const double * t_inv_eigenvecs;
   const double * t_freqs;
 
-#ifdef HAVE_SSE
-  if (attrib & PLL_ATTRIB_ARCH_SSE)
+#ifdef HAVE_SSE3
+  if (attrib & PLL_ATTRIB_ARCH_SSE && PLL_STAT(sse3_present))
   {
     return pll_core_update_sumtable_ii_sse(states,
                                            sites,
                                            rate_cats,
                                            parent_clv,
                                            child_clv,
+                                           parent_scaler,
+                                           child_scaler,
                                            eigenvecs,
                                            inv_eigenvecs,
                                            freqs,
-                                           sumtable);
+                                           sumtable,
+                                           attrib);
   }
 #endif
 #ifdef HAVE_AVX
-  if (attrib & PLL_ATTRIB_ARCH_AVX)
+  if (attrib & PLL_ATTRIB_ARCH_AVX && PLL_STAT(avx_present))
   {
     return pll_core_update_sumtable_ii_avx(states,
                                            sites,
                                            rate_cats,
                                            parent_clv,
                                            child_clv,
+                                           parent_scaler,
+                                           child_scaler,
                                            eigenvecs,
                                            inv_eigenvecs,
                                            freqs,
-                                           sumtable);
+                                           sumtable,
+                                           attrib);
+  }
+#endif
+#ifdef HAVE_AVX2
+  if (attrib & PLL_ATTRIB_ARCH_AVX2 && PLL_STAT(avx2_present))
+  {
+    return pll_core_update_sumtable_ii_avx2(states,
+                                           sites,
+                                           rate_cats,
+                                           parent_clv,
+                                           child_clv,
+                                           parent_scaler,
+                                           child_scaler,
+                                           eigenvecs,
+                                           inv_eigenvecs,
+                                           freqs,
+                                           sumtable,
+                                           attrib);
   }
 #endif
 
+  unsigned int min_scaler;
+  unsigned int * rate_scalings = NULL;
+  int per_rate_scaling = (attrib & PLL_ATTRIB_RATE_SCALERS) ? 1 : 0;
+
+  /* powers of scale threshold for undoing the scaling */
+  double scale_minlh[PLL_SCALE_RATE_MAXDIFF];
+  if (per_rate_scaling)
+  {
+    rate_scalings = (unsigned int*) calloc(rate_cats, sizeof(unsigned int));
+
+    double scale_factor = 1.0;
+    for (i = 0; i < PLL_SCALE_RATE_MAXDIFF; ++i)
+    {
+      scale_factor *= PLL_SCALE_THRESHOLD;
+      scale_minlh[i] = scale_factor;
+    }
+  }
+
   /* build sumtable */
   for (n = 0; n < sites; n++)
   {
+    if (per_rate_scaling)
+    {
+      /* compute minimum per-rate scaler -> common per-site scaler */
+      min_scaler = UINT_MAX;
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = (parent_scaler) ? parent_scaler[n*rate_cats+i] : 0;
+        rate_scalings[i] += (child_scaler) ? child_scaler[n*rate_cats+i] : 0;
+        if (rate_scalings[i] < min_scaler)
+          min_scaler = rate_scalings[i];
+      }
+
+      /* compute relative capped per-rate scalers */
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = PLL_MIN(rate_scalings[i] - min_scaler,
+                                   PLL_SCALE_RATE_MAXDIFF);
+      }
+    }
+
     for (i = 0; i < rate_cats; ++i)
     {
       t_eigenvecs     = eigenvecs[i];
@@ -147,6 +255,9 @@ PLL_EXPORT int pll_core_update_sumtable_ii(unsigned int states,
           righterm += t_eigenvecs[j * states + k] * t_clvc[k];
         }
         sum[j] = lefterm * righterm;
+
+        if (rate_scalings && rate_scalings[i] > 0)
+          sum[j] *= scale_minlh[rate_scalings[i]-1];
       }
       t_clvc += states;
       t_clvp += states;
@@ -154,6 +265,9 @@ PLL_EXPORT int pll_core_update_sumtable_ii(unsigned int states,
     }
   }
 
+  if (rate_scalings)
+    free(rate_scalings);
+
   return PLL_SUCCESS;
 }
 
@@ -162,11 +276,13 @@ PLL_EXPORT int pll_core_update_sumtable_ti(unsigned int states,
                                            unsigned int rate_cats,
                                            const double * parent_clv,
                                            const unsigned char * left_tipchars,
-                                           double ** eigenvecs,
-                                           double ** inv_eigenvecs,
-                                           double ** freqs,
-                                           unsigned int * tipmap,
-                                           double *sumtable,
+                                           const unsigned int * parent_scaler,
+                                           double * const * eigenvecs,
+                                           double * const * inv_eigenvecs,
+                                           double * const * freqs,
+                                           const unsigned int * tipmap,
+                                           unsigned int tipmap_size,
+                                           double * sumtable,
                                            unsigned int attrib)
 {
   unsigned int i, j, k, n;
@@ -182,33 +298,55 @@ PLL_EXPORT int pll_core_update_sumtable_ti(unsigned int states,
 
   unsigned int states_padded = states;
 
-#ifdef HAVE_SSE
-  if (attrib & PLL_ATTRIB_ARCH_SSE)
+#ifdef HAVE_SSE3
+  if (attrib & PLL_ATTRIB_ARCH_SSE && PLL_STAT(sse3_present))
   {
     return pll_core_update_sumtable_ti_sse(states,
                                            sites,
                                            rate_cats,
                                            parent_clv,
                                            left_tipchars,
+                                           parent_scaler,
                                            eigenvecs,
                                            inv_eigenvecs,
                                            freqs,
                                            tipmap,
-                                           sumtable);
+                                           sumtable,
+                                           attrib);
   }
 #endif
 #ifdef HAVE_AVX
-  if (attrib & PLL_ATTRIB_ARCH_AVX)
+  if (attrib & PLL_ATTRIB_ARCH_AVX && PLL_STAT(avx_present))
   {
     return pll_core_update_sumtable_ti_avx(states,
                                            sites,
                                            rate_cats,
                                            parent_clv,
                                            left_tipchars,
+                                           parent_scaler,
+                                           eigenvecs,
+                                           inv_eigenvecs,
+                                           freqs,
+                                           tipmap,
+                                           tipmap_size,
+                                           sumtable,
+                                           attrib);
+  }
+#endif
+#ifdef HAVE_AVX2
+  if (attrib & PLL_ATTRIB_ARCH_AVX2 && PLL_STAT(avx2_present))
+  {
+    return pll_core_update_sumtable_ti_avx2(states,
+                                           sites,
+                                           rate_cats,
+                                           parent_clv,
+                                           left_tipchars,
+                                           parent_scaler,
                                            eigenvecs,
                                            inv_eigenvecs,
                                            freqs,
                                            tipmap,
+                                           tipmap_size,
                                            sumtable,
                                            attrib);
   }
@@ -221,6 +359,7 @@ PLL_EXPORT int pll_core_update_sumtable_ti(unsigned int states,
                                            rate_cats,
                                            parent_clv,
                                            left_tipchars,
+                                           parent_scaler,
                                            eigenvecs,
                                            inv_eigenvecs,
                                            freqs,
@@ -266,7 +405,7 @@ static void core_site_likelihood_derivatives(unsigned int states,
                                              const double * rate_weights,
                                              const int * invariant,
                                              const double * prop_invar,
-                                             double ** freqs,
+                                             double * const * freqs,
                                              const double * sumtable,
                                              const double * diagptable,
                                              double * site_lk)
@@ -323,9 +462,9 @@ PLL_EXPORT int pll_core_likelihood_derivatives(unsigned int states,
                                                const unsigned int * pattern_weights,
                                                double branch_length,
                                                const double * prop_invar,
-                                               double ** freqs,
+                                               double * const * freqs,
                                                const double * rates,
-                                               double ** eigenvals,
+                                               double * const * eigenvals,
                                                const double * sumtable,
                                                double * d_f,
                                                double * dd_f,
@@ -348,19 +487,6 @@ PLL_EXPORT int pll_core_likelihood_derivatives(unsigned int states,
 
   unsigned int states_padded = states;
 
-#ifdef HAVE_SSE
-  if (attrib & PLL_ATTRIB_ARCH_SSE)
-  {
-    states_padded = (states+1) & 0xFFFFFFFE;
-  }
-#endif
-#ifdef HAVE_AVX
-  if (attrib & PLL_ATTRIB_ARCH_AVX)
-  {
-    states_padded = (states+3) & 0xFFFFFFFC;
-  }
-#endif
-
   /* For Stamatakis correction, the likelihood derivatives are computed in
      the usual way for the additional per-state sites. */
   if ((attrib & PLL_ATTRIB_AB_MASK) == PLL_ATTRIB_AB_STAMATAKIS)
@@ -390,8 +516,8 @@ PLL_EXPORT int pll_core_likelihood_derivatives(unsigned int states,
   for(i = 0; i < rate_cats; ++i)
   {
     t_eigenvals = eigenvals[i];
-    ki = rates[i];
-    t_branch_length = branch_length/(1.0 - prop_invar[i]);
+    ki = rates[i]/(1.0 - prop_invar[i]);
+    t_branch_length = branch_length;
     for(j = 0; j < states; ++j)
     {
       diagp[0] = exp(t_eigenvals[j] * ki * t_branch_length);
@@ -402,22 +528,53 @@ PLL_EXPORT int pll_core_likelihood_derivatives(unsigned int states,
     }
   }
 
+// SSE3 vectorization in missing as of now
+#ifdef HAVE_SSE3
+  if (attrib & PLL_ATTRIB_ARCH_SSE && PLL_STAT(sse3_present))
+  {
+    states_padded = (states+1) & 0xFFFFFFFE;
+  }
+#endif
+
+#ifdef HAVE_AVX2
+  if (attrib & PLL_ATTRIB_ARCH_AVX2 && PLL_STAT(avx2_present))
+  {
+    states_padded = (states+3) & 0xFFFFFFFC;
+
+    pll_core_likelihood_derivatives_avx2(states,
+                                        states_padded,
+                                        rate_cats,
+                                        ef_sites,
+                                        pattern_weights,
+                                        rate_weights,
+                                        invariant,
+                                        prop_invar,
+                                        freqs,
+                                        sumtable,
+                                        diagptable,
+                                        d_f,
+                                        dd_f);
+  }
+  else
+#endif
 #ifdef HAVE_AVX
-  if (attrib & PLL_ATTRIB_ARCH_AVX)
+  if (attrib & PLL_ATTRIB_ARCH_AVX && PLL_STAT(avx_present))
   {
-    core_likelihood_derivatives_avx(states,
-                                   states_padded,
-                                   rate_cats,
-                                   ef_sites,
-                                   pattern_weights,
-                                   rate_weights,
-                                   invariant,
-                                   prop_invar,
-                                   freqs,
-                                   sumtable,
-                                   diagptable,
-                                   d_f,
-                                   dd_f);
+    states_padded = (states+3) & 0xFFFFFFFC;
+
+    pll_core_likelihood_derivatives_avx(states,
+                                        states_padded,
+                                        rate_cats,
+                                        ef_sites,
+                                        pattern_weights,
+                                        rate_weights,
+                                        invariant,
+                                        prop_invar,
+                                        freqs,
+                                        sumtable,
+                                        diagptable,
+                                        d_f,
+                                        dd_f);
   }
   else
 #endif
diff --git a/src/core_derivatives_avx.c b/src/core_derivatives_avx.c
index 9b03e3d..54f03ff 100644
--- a/src/core_derivatives_avx.c
+++ b/src/core_derivatives_avx.c
@@ -19,16 +19,20 @@
     Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
 */
 
+#include <limits.h>
 #include "pll.h"
 
-PLL_EXPORT int pll_core_update_sumtable_ii_4x4_avx(unsigned int sites,
-                                                   unsigned int rate_cats,
-                                                   const double * clvp,
-                                                   const double * clvc,
-                                                   double ** eigenvecs,
-                                                   double ** inv_eigenvecs,
-                                                   double ** freqs,
-                                                   double *sumtable)
+static int core_update_sumtable_ii_4x4_avx(unsigned int sites,
+                                           unsigned int rate_cats,
+                                           const double * clvp,
+                                           const double * clvc,
+                                           const unsigned int * parent_scaler,
+                                           const unsigned int * child_scaler,
+                                           double * const * eigenvecs,
+                                           double * const * inv_eigenvecs,
+                                           double * const * freqs,
+                                           double *sumtable,
+                                           unsigned int attrib)
 {
   unsigned int i, j, k, n;
 
@@ -37,11 +41,28 @@ PLL_EXPORT int pll_core_update_sumtable_ii_4x4_avx(unsigned int sites,
 
   const double * t_clvp = clvp;
   const double * t_clvc = clvc;
-  double * t_eigenvecs;
   double * t_freqs;
 
   unsigned int states = 4;
 
+  unsigned int min_scaler = 0;
+  unsigned int * rate_scalings = NULL;
+  int per_rate_scaling = (attrib & PLL_ATTRIB_RATE_SCALERS) ? 1 : 0;
+
+  /* powers of scale threshold for undoing the scaling */
+  __m256d v_scale_minlh[PLL_SCALE_RATE_MAXDIFF];
+  if (per_rate_scaling)
+  {
+    rate_scalings = (unsigned int*) calloc(rate_cats, sizeof(unsigned int));
+
+    double scale_factor = 1.0;
+    for (i = 0; i < PLL_SCALE_RATE_MAXDIFF; ++i)
+    {
+      scale_factor *= PLL_SCALE_THRESHOLD;
+      v_scale_minlh[i] = _mm256_set1_pd(scale_factor);
+    }
+  }
+
   /* transposed inv_eigenvecs */
   double * tt_inv_eigenvecs = (double *) pll_aligned_alloc (
       (states * states * rate_cats) * sizeof(double),
@@ -56,76 +77,79 @@ PLL_EXPORT int pll_core_update_sumtable_ii_4x4_avx(unsigned int sites,
 
   for (i = 0; i < rate_cats; ++i)
   {
+    t_freqs = freqs[i];
     for (j = 0; j < states; ++j)
       for (k = 0; k < states; ++k)
       {
         tt_inv_eigenvecs[i * states * states + j * states + k] =
-            inv_eigenvecs[i][k * states + j];
+            inv_eigenvecs[i][k * states + j] * t_freqs[k];
       }
   }
 
   /* vectorized loop from update_sumtable() */
   for (n = 0; n < sites; n++)
   {
-    for (i = 0; i < rate_cats; ++i)
+    /* compute per-rate scalers and obtain minimum value (within site) */
+    if (per_rate_scaling)
     {
-      t_eigenvecs = eigenvecs[i];
-      t_freqs = freqs[i];
+      min_scaler = UINT_MAX;
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = (parent_scaler) ? parent_scaler[n*rate_cats+i] : 0;
+        rate_scalings[i] += (child_scaler) ? child_scaler[n*rate_cats+i] : 0;
+        if (rate_scalings[i] < min_scaler)
+          min_scaler = rate_scalings[i];
+      }
 
-      const double * c_eigenvecs = t_eigenvecs;
-      const double * ct_inv_eigenvecs = tt_inv_eigenvecs;
+      /* compute relative capped per-rate scalers */
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = PLL_MIN(rate_scalings[i] - min_scaler,
+                                   PLL_SCALE_RATE_MAXDIFF);
+      }
+    }
 
-      __m256d v_lefterm[4], v_righterm[4];
-      v_lefterm[0] = v_lefterm[1] = v_lefterm[2] = v_lefterm[3] = _mm256_setzero_pd ();
-      v_righterm[0] = v_righterm[1] = v_righterm[2] = v_righterm[3] = _mm256_setzero_pd ();
+    const double * c_eigenvecs;
+    const double * c_inv_eigenvecs = tt_inv_eigenvecs;
+
+    for (i = 0; i < rate_cats; ++i)
+    {
+      c_eigenvecs = eigenvecs[i];
 
+      __m256d v_lefterm[4], v_righterm[4];
       __m256d v_eigen;
-      __m256d v_freqs;
       __m256d v_clvp, v_clvc;
 
       v_clvp = _mm256_load_pd (t_clvp);
       v_clvc = _mm256_load_pd (t_clvc);
-      v_freqs = _mm256_load_pd (t_freqs);
 
-      v_eigen = _mm256_load_pd (ct_inv_eigenvecs);
-      v_lefterm[0] = _mm256_add_pd (
-          v_lefterm[0],
-          _mm256_mul_pd (v_freqs, _mm256_mul_pd (v_eigen, v_clvp)));
+      v_eigen = _mm256_load_pd (c_inv_eigenvecs);
+      v_lefterm[0] = _mm256_mul_pd (v_eigen, v_clvp);
       v_eigen = _mm256_load_pd (c_eigenvecs);
-      v_righterm[0] = _mm256_add_pd (v_righterm[0],
-                                     _mm256_mul_pd (v_eigen, v_clvc));
+      v_righterm[0] = _mm256_mul_pd (v_eigen, v_clvc);
       c_eigenvecs += 4;
-      ct_inv_eigenvecs += 4;
+      c_inv_eigenvecs += 4;
 
-      v_eigen = _mm256_load_pd (ct_inv_eigenvecs);
-      v_lefterm[1] = _mm256_add_pd (
-          v_lefterm[1],
-          _mm256_mul_pd (v_freqs, _mm256_mul_pd (v_eigen, v_clvp)));
+      v_eigen = _mm256_load_pd (c_inv_eigenvecs);
+      v_lefterm[1] = _mm256_mul_pd (v_eigen, v_clvp);
       v_eigen = _mm256_load_pd (c_eigenvecs);
-      v_righterm[1] = _mm256_add_pd (v_righterm[1],
-                                     _mm256_mul_pd (v_eigen, v_clvc));
+      v_righterm[1] = _mm256_mul_pd (v_eigen, v_clvc);
       c_eigenvecs += 4;
-      ct_inv_eigenvecs += 4;
+      c_inv_eigenvecs += 4;
 
-      v_eigen = _mm256_load_pd (ct_inv_eigenvecs);
-      v_lefterm[2] = _mm256_add_pd (
-          v_lefterm[2],
-          _mm256_mul_pd (v_freqs, _mm256_mul_pd (v_eigen, v_clvp)));
+      v_eigen = _mm256_load_pd (c_inv_eigenvecs);
+      v_lefterm[2] = _mm256_mul_pd (v_eigen, v_clvp);
       v_eigen = _mm256_load_pd (c_eigenvecs);
-      v_righterm[2] = _mm256_add_pd (v_righterm[2],
-                                     _mm256_mul_pd (v_eigen, v_clvc));
+      v_righterm[2] = _mm256_mul_pd (v_eigen, v_clvc);
       c_eigenvecs += 4;
-      ct_inv_eigenvecs += 4;
+      c_inv_eigenvecs += 4;
 
-      v_eigen = _mm256_load_pd (ct_inv_eigenvecs);
-      v_lefterm[3] = _mm256_add_pd (
-          v_lefterm[3],
-          _mm256_mul_pd (v_freqs, _mm256_mul_pd (v_eigen, v_clvp)));
+      v_eigen = _mm256_load_pd (c_inv_eigenvecs);
+      v_lefterm[3] = _mm256_mul_pd (v_eigen, v_clvp);
       v_eigen = _mm256_load_pd (c_eigenvecs);
-      v_righterm[3] = _mm256_add_pd (v_righterm[3],
-                                     _mm256_mul_pd (v_eigen, v_clvc));
+      v_righterm[3] = _mm256_mul_pd (v_eigen, v_clvc);
       c_eigenvecs += 4;
-      ct_inv_eigenvecs += 4;
+      c_inv_eigenvecs += 4;
 
       /* compute lefterm */
       __m256d xmm0 = _mm256_unpackhi_pd (v_lefterm[0], v_lefterm[1]);
@@ -150,8 +174,15 @@ PLL_EXPORT int pll_core_update_sumtable_ii_4x4_avx(unsigned int sites,
       __m256d v_righterm_sum = _mm256_add_pd (xmm2, xmm3);
 
       /* update sum */
-      __m256d v_prod = _mm256_mul_pd (v_lefterm_sum, v_righterm_sum);
-      _mm256_store_pd (sum, v_prod);
+      __m256d v_sum = _mm256_mul_pd (v_lefterm_sum, v_righterm_sum);
+
+      /* apply per-rate scalers */
+      if (rate_scalings && rate_scalings[i] > 0)
+      {
+        v_sum = _mm256_mul_pd(v_sum, v_scale_minlh[rate_scalings[i]-1]);
+      }
+
+      _mm256_store_pd (sum, v_sum);
 
       t_clvc += states;
       t_clvp += states;
@@ -161,6 +192,9 @@ PLL_EXPORT int pll_core_update_sumtable_ii_4x4_avx(unsigned int sites,
 
   pll_aligned_free (tt_inv_eigenvecs);
 
+  if (rate_scalings)
+    free(rate_scalings);
+
   return PLL_SUCCESS;
 }
 
@@ -169,10 +203,13 @@ PLL_EXPORT int pll_core_update_sumtable_ii_avx(unsigned int states,
                                                unsigned int rate_cats,
                                                const double * clvp,
                                                const double * clvc,
-                                               double ** eigenvecs,
-                                               double ** inv_eigenvecs,
-                                               double ** freqs,
-                                               double *sumtable)
+                                               const unsigned int * parent_scaler,
+                                               const unsigned int * child_scaler,
+                                               double * const * eigenvecs,
+                                               double * const * inv_eigenvecs,
+                                               double * const * freqs,
+                                               double * sumtable,
+                                               unsigned int attrib)
 {
   unsigned int i, j, k, n;
 
@@ -186,14 +223,17 @@ PLL_EXPORT int pll_core_update_sumtable_ii_avx(unsigned int states,
   /* dedicated functions for 4x4 matrices */
   if (states == 4)
   {
-    return pll_core_update_sumtable_ii_4x4_avx(sites,
-                                       rate_cats,
-                                       clvp,
-                                       clvc,
-                                       eigenvecs,
-                                       inv_eigenvecs,
-                                       freqs,
-                                       sumtable);
+    return core_update_sumtable_ii_4x4_avx(sites,
+                                           rate_cats,
+                                           clvp,
+                                           clvc,
+                                           parent_scaler,
+                                           child_scaler,
+                                           eigenvecs,
+                                           inv_eigenvecs,
+                                           freqs,
+                                           sumtable,
+                                           attrib);
   }
 
   unsigned int states_padded = (states+3) & 0xFFFFFFFC;
@@ -225,13 +265,15 @@ PLL_EXPORT int pll_core_update_sumtable_ii_avx(unsigned int states,
   memset(tt_eigenvecs, 0, (states_padded * states_padded * rate_cats) * sizeof(double));
   memset(tt_inv_eigenvecs, 0, (states_padded * states_padded * rate_cats) * sizeof(double));
 
+  /* add padding to eigenvecs matrices and multiply with frequencies */
   for (i = 0; i < rate_cats; ++i)
   {
+    t_freqs = freqs[i];
     for (j = 0; j < states; ++j)
       for (k = 0; k < states; ++k)
       {
         tt_inv_eigenvecs[i * states_padded * states_padded + j * states_padded
-            + k] = inv_eigenvecs[i][k * states + j];
+            + k] = inv_eigenvecs[i][k * states + j] * t_freqs[k];
         tt_eigenvecs[i * states_padded * states_padded + j * states_padded
             + k] = eigenvecs[i][j * states + k];
       }
@@ -244,10 +286,22 @@ PLL_EXPORT int pll_core_update_sumtable_ii_avx(unsigned int states,
     const double * ct_inv_eigenvecs = tt_inv_eigenvecs;
     for (i = 0; i < rate_cats; ++i)
     {
-      t_freqs = freqs[i];
-
       for (j = 0; j < states_padded; j += 4)
       {
+        /* point to the four rows of the eigenvecs matrix */
+        const double * em0 = c_eigenvecs;
+        const double * em1 = em0 + states_padded;
+        const double * em2 = em1 + states_padded;
+        const double * em3 = em2 + states_padded;
+        c_eigenvecs += 4*states_padded;
+
+        /* point to the four rows of the inv_eigenvecs matrix */
+        const double * im0 = ct_inv_eigenvecs;
+        const double * im1 = im0 + states_padded;
+        const double * im2 = im1 + states_padded;
+        const double * im3 = im2 + states_padded;
+        ct_inv_eigenvecs += 4*states_padded;
+
         __m256d v_lefterm0 = _mm256_setzero_pd ();
         __m256d v_righterm0 = _mm256_setzero_pd ();
         __m256d v_lefterm1 = _mm256_setzero_pd ();
@@ -258,79 +312,49 @@ PLL_EXPORT int pll_core_update_sumtable_ii_avx(unsigned int states,
         __m256d v_righterm3 = _mm256_setzero_pd ();
 
         __m256d v_eigen;
-        __m256d v_freqs;
-        __m256d v_clv;
+        __m256d v_clvp;
+        __m256d v_clvc;
 
         for (k = 0; k < states_padded; k += 4)
         {
-          v_freqs = _mm256_load_pd (t_freqs + k);
-          v_eigen = _mm256_load_pd (ct_inv_eigenvecs);
-          v_clv = _mm256_load_pd (t_clvp + k);
-          v_lefterm0 = _mm256_add_pd (
-              v_lefterm0,
-              _mm256_mul_pd (v_freqs, _mm256_mul_pd (v_eigen, v_clv)));
-
-          v_clv = _mm256_load_pd (t_clvc + k);
-          v_eigen = _mm256_load_pd (c_eigenvecs);
+          v_clvp = _mm256_load_pd (t_clvp + k);
+          v_clvc = _mm256_load_pd (t_clvc + k);
+
+          /* row 0 */
+          v_eigen = _mm256_load_pd (im0 + k);
+          v_lefterm0 = _mm256_add_pd (v_lefterm0,
+                                      _mm256_mul_pd (v_eigen, v_clvp));
+
+          v_eigen = _mm256_load_pd (em0 + k);
           v_righterm0 = _mm256_add_pd (v_righterm0,
-                                       _mm256_mul_pd (v_eigen, v_clv));
+                                       _mm256_mul_pd (v_eigen, v_clvc));
 
-          c_eigenvecs      += 4;
-          ct_inv_eigenvecs += 4;
-        }
+          /* row 1 */
+          v_eigen = _mm256_load_pd (im1 + k);
+          v_lefterm1 = _mm256_add_pd (v_lefterm1,
+                                      _mm256_mul_pd (v_eigen, v_clvp));
 
-        for (k = 0; k < states_padded; k += 4)
-        {
-          v_freqs = _mm256_load_pd (t_freqs + k);
-          v_eigen = _mm256_load_pd (ct_inv_eigenvecs);
-          v_clv = _mm256_load_pd (t_clvp + k);
-          v_lefterm1 = _mm256_add_pd (
-              v_lefterm1,
-              _mm256_mul_pd (v_freqs, _mm256_mul_pd (v_eigen, v_clv)));
-
-          v_clv = _mm256_load_pd (t_clvc + k);
-          v_eigen = _mm256_load_pd (c_eigenvecs);
+          v_eigen = _mm256_load_pd (em1 + k);
           v_righterm1 = _mm256_add_pd (v_righterm1,
-                                       _mm256_mul_pd (v_eigen, v_clv));
+                                       _mm256_mul_pd (v_eigen, v_clvc));
 
-          c_eigenvecs      += 4;
-          ct_inv_eigenvecs += 4;
-        }
+          /* row 2 */
+          v_eigen = _mm256_load_pd (im2 + k);
+          v_lefterm2 = _mm256_add_pd (v_lefterm2,
+                                      _mm256_mul_pd (v_eigen, v_clvp));
 
-        for (k = 0; k < states_padded; k += 4)
-        {
-          v_freqs = _mm256_load_pd (t_freqs + k);
-          v_eigen = _mm256_load_pd (ct_inv_eigenvecs);
-          v_clv = _mm256_load_pd (t_clvp + k);
-          v_lefterm2 = _mm256_add_pd (
-              v_lefterm2,
-              _mm256_mul_pd (v_freqs, _mm256_mul_pd (v_eigen, v_clv)));
-
-          v_clv = _mm256_load_pd (t_clvc + k);
-          v_eigen = _mm256_load_pd (c_eigenvecs);
+          v_eigen = _mm256_load_pd (em2 + k);
           v_righterm2 = _mm256_add_pd (v_righterm2,
-                                       _mm256_mul_pd (v_eigen, v_clv));
+                                       _mm256_mul_pd (v_eigen, v_clvc));
 
-          c_eigenvecs      += 4;
-          ct_inv_eigenvecs += 4;
-        }
+          /* row 3 */
+          v_eigen = _mm256_load_pd (im3 + k);
+          v_lefterm3 = _mm256_add_pd (v_lefterm3,
+                                      _mm256_mul_pd (v_eigen, v_clvp));
 
-        for (k = 0; k < states_padded; k += 4)
-        {
-          v_freqs = _mm256_load_pd (t_freqs + k);
-          v_eigen = _mm256_load_pd (ct_inv_eigenvecs);
-          v_clv = _mm256_load_pd (t_clvp + k);
-          v_lefterm3 = _mm256_add_pd (
-              v_lefterm3,
-              _mm256_mul_pd (v_freqs, _mm256_mul_pd (v_eigen, v_clv)));
-
-          v_clv = _mm256_load_pd (t_clvc + k);
-          v_eigen = _mm256_load_pd (c_eigenvecs);
+          v_eigen = _mm256_load_pd (em3 + k);
           v_righterm3 = _mm256_add_pd (v_righterm3,
-                                       _mm256_mul_pd (v_eigen, v_clv));
-
-          c_eigenvecs      += 4;
-          ct_inv_eigenvecs += 4;
+                                       _mm256_mul_pd (v_eigen, v_clvc));
         }
 
         /* compute lefterm */
@@ -376,10 +400,12 @@ static int core_update_sumtable_ti_4x4_avx(unsigned int sites,
                                            unsigned int rate_cats,
                                            const double * parent_clv,
                                            const unsigned char * left_tipchars,
-                                           double ** eigenvecs,
-                                           double ** inv_eigenvecs,
-                                           double ** freqs,
-                                           double *sumtable)
+                                           const unsigned int * parent_scaler,
+                                           double * const * eigenvecs,
+                                           double * const * inv_eigenvecs,
+                                           double * const * freqs,
+                                           double *sumtable,
+                                           unsigned int attrib)
 {
   const unsigned int states = 4;
 
@@ -390,6 +416,24 @@ static int core_update_sumtable_ti_4x4_avx(unsigned int sites,
   const double * t_clvc = parent_clv;
   const double * t_eigenvecs_trans;
 
+  unsigned int min_scaler = 0;
+  unsigned int * rate_scalings = NULL;
+  int per_rate_scaling = (attrib & PLL_ATTRIB_RATE_SCALERS) ? 1 : 0;
+
+  /* powers of scale threshold for undoing the scaling */
+  __m256d v_scale_minlh[PLL_SCALE_RATE_MAXDIFF];
+  if (per_rate_scaling)
+  {
+    rate_scalings = (unsigned int*) calloc(rate_cats, sizeof(unsigned int));
+
+    double scale_factor = 1.0;
+    for (i = 0; i < PLL_SCALE_RATE_MAXDIFF; ++i)
+    {
+      scale_factor *= PLL_SCALE_THRESHOLD;
+      v_scale_minlh[i] = _mm256_set1_pd(scale_factor);
+    }
+  }
+
   double * eigenvecs_trans = (double *) pll_aligned_alloc (
       (states * states * rate_cats) * sizeof(double),
       PLL_ALIGNMENT_AVX);
@@ -467,6 +511,25 @@ static int core_update_sumtable_ti_4x4_avx(unsigned int sites,
   /* build sumtable */
   for (n = 0; n < sites; n++)
   {
+    /* compute per-rate scalers and obtain minimum value (within site) */
+    if (per_rate_scaling)
+    {
+      min_scaler = UINT_MAX;
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = (parent_scaler) ? parent_scaler[n*rate_cats+i] : 0;
+        if (rate_scalings[i] < min_scaler)
+          min_scaler = rate_scalings[i];
+      }
+
+      /* compute relative capped per-rate scalers */
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = PLL_MIN(rate_scalings[i] - min_scaler,
+                                   PLL_SCALE_RATE_MAXDIFF);
+      }
+    }
+
     tipstate = (unsigned int) left_tipchars[n];
 
     /* set pointer to the precomputed lefterm values for the current tipstate */
@@ -479,15 +542,21 @@ static int core_update_sumtable_ti_4x4_avx(unsigned int sites,
       __m256d v_righterm = _mm256_setzero_pd();
 
       for (k = 0; k < states; ++k)
-        {
-          __m256d v_clvc = _mm256_set1_pd(t_clvc[k]);
-          __m256d v_eigen = _mm256_load_pd(t_eigenvecs_trans + k*states);
-          v_righterm =  _mm256_add_pd(v_righterm,
-                                      _mm256_mul_pd(v_eigen, v_clvc));
-
-        }
+      {
+        __m256d v_clvc = _mm256_set1_pd(t_clvc[k]);
+        __m256d v_eigen = _mm256_load_pd(t_eigenvecs_trans + k*states);
+        v_righterm =  _mm256_add_pd(v_righterm,
+                                    _mm256_mul_pd(v_eigen, v_clvc));
+      }
 
       __m256d v_sum = _mm256_mul_pd(v_lefterm, v_righterm);
+
+      /* apply per-rate scalers */
+      if (rate_scalings && rate_scalings[i] > 0)
+      {
+        v_sum = _mm256_mul_pd(v_sum, v_scale_minlh[rate_scalings[i]-1]);
+      }
+
       _mm256_store_pd(sum, v_sum);
 
       t_eigenvecs_trans += states * states;
@@ -500,6 +569,9 @@ static int core_update_sumtable_ti_4x4_avx(unsigned int sites,
   pll_aligned_free(eigenvecs_trans);
   pll_aligned_free(precomp_left);
 
+  if (rate_scalings)
+    free(rate_scalings);
+
   return PLL_SUCCESS;
 }
 
@@ -508,11 +580,13 @@ PLL_EXPORT int pll_core_update_sumtable_ti_avx(unsigned int states,
                                                unsigned int rate_cats,
                                                const double * parent_clv,
                                                const unsigned char * left_tipchars,
-                                               double ** eigenvecs,
-                                               double ** inv_eigenvecs,
-                                               double ** freqs,
-                                               unsigned int * tipmap,
-                                               double *sumtable,
+                                               const unsigned int * parent_scaler,
+                                               double * const * eigenvecs,
+                                               double * const * inv_eigenvecs,
+                                               double * const * freqs,
+                                               const unsigned int * tipmap,
+                                               unsigned int tipmap_size,
+                                               double * sumtable,
                                                unsigned int attrib)
 {
   if (states == 4)
@@ -521,284 +595,273 @@ PLL_EXPORT int pll_core_update_sumtable_ti_avx(unsigned int states,
                                            rate_cats,
                                            parent_clv,
                                            left_tipchars,
+                                           parent_scaler,
                                            eigenvecs,
                                            inv_eigenvecs,
                                            freqs,
-                                           sumtable);
+                                           sumtable,
+                                           attrib);
   }
 
-  // TODO: we can use the same pre-computation technique as in 4x4 case,
-  // but we need to know maxstates here
-
   unsigned int states_padded = (states+3) & 0xFFFFFFFC;
+  unsigned int span = states_padded * rate_cats;
+  unsigned int maxstates = tipmap_size;
 
   unsigned int i, j, k, n;
   unsigned int tipstate;
 
   double * sum = sumtable;
   const double * t_clvc = parent_clv;
-  const double * t_eigenvecs_trans;
+  const double * t_eigenvecs_padded;
 
-  double * eigenvecs_trans = (double *) pll_aligned_alloc (
+  double * eigenvecs_padded = (double *) pll_aligned_alloc (
       (states_padded * states_padded * rate_cats) * sizeof(double),
       PLL_ALIGNMENT_AVX);
 
   double * precomp_left = (double *) pll_aligned_alloc (
-      (states_padded * states_padded * rate_cats) * sizeof(double),
+      (maxstates * states_padded * rate_cats) * sizeof(double),
       PLL_ALIGNMENT_AVX);
 
-  if (!eigenvecs_trans || !precomp_left)
+  if (!eigenvecs_padded || !precomp_left)
   {
     pll_errno = PLL_ERROR_MEM_ALLOC;
     snprintf (pll_errmsg, 200, "Cannot allocate memory for tt_inv_eigenvecs");
     return PLL_FAILURE;
   }
 
-  /* transpose eigenvecs matrix -> for efficient vectorization */
+  /* add padding to eigenvecs matrix -> for efficient vectorization */
   for (i = 0; i < rate_cats; ++i)
   {
     for (j = 0; j < states_padded; ++j)
       for (k = 0; k < states_padded; ++k)
       {
-        eigenvecs_trans[i*states_padded*states_padded + j*states_padded + k] =
-            (j < states && k < states) ? eigenvecs[i][k*states + j] : 0.;
+        eigenvecs_padded[i*states_padded*states_padded + j*states_padded + k] =
+            (j < states && k < states) ? eigenvecs[i][j*states + k] : 0.;
       }
   }
 
   /* precompute left terms since they are the same for every site */
   double * t_precomp = precomp_left;
-  for (i = 0; i < rate_cats; ++i)
+  for (n = 0; n < maxstates; ++n)
   {
-        for (k = 0; k < states_padded; ++k)
+    unsigned int state = tipmap ? tipmap[n] : n;
+
+    int ss = __builtin_popcount(state) == 1 ? __builtin_ctz(state) : -1;
+
+    for (i = 0; i < rate_cats; ++i)
+    {
+      for (j = 0; j < states_padded; j += 4)
+      {
+        __m256d v_lefterm;
+
+        if (ss != -1)
         {
-            for (j = 0; j < states_padded; j += 4)
+          /* special case for non-ambiguous state */
+          __m256d v_freqs = _mm256_set1_pd(freqs[i][ss]);
+          __m256d v_eigen = _mm256_load_pd(inv_eigenvecs[i] +
+                                                       ss*states + j);
+          v_lefterm =  _mm256_mul_pd(v_eigen, v_freqs);
+        }
+        else
+        {
+          v_lefterm = _mm256_setzero_pd();
+          for (k = 0; k < states; ++k)
+          {
+            if ((state>>k) & 1)
             {
-              if (k < states && j < states)
-                {
-                  __m256d v_freqs = _mm256_set1_pd(freqs[i][k]);
-                  __m256d v_eigen = _mm256_load_pd(inv_eigenvecs[i] +
-                                                               k*states + j);
-                  __m256d v_lefterm =  _mm256_mul_pd(v_eigen, v_freqs);
-                  _mm256_store_pd(t_precomp, v_lefterm);
-                }
-              else
-                memset(t_precomp, 0, 4 * sizeof(double));
-
-              t_precomp += 4;
+              __m256d v_freqs = _mm256_set1_pd(freqs[i][k]);
+              __m256d v_eigen = _mm256_load_pd(inv_eigenvecs[i] +
+                                                           k*states + j);
+
+              v_lefterm = _mm256_add_pd(v_lefterm,
+                                        _mm256_mul_pd(v_eigen, v_freqs));
             }
+          }
         }
+
+        _mm256_store_pd(t_precomp, v_lefterm);
+        t_precomp += 4;
+      }
+    }
   }
 
   /* build sumtable */
   for (n = 0; n < sites; n++)
   {
-    // TODO: There should be a proper way to decide (tipmap == NULL?)
-    if (states == 4)
-      tipstate = (unsigned int) left_tipchars[n];
-    else
-      tipstate = tipmap[(unsigned int)left_tipchars[n]];
+    tipstate = (unsigned int) left_tipchars[n];
 
-    t_eigenvecs_trans = eigenvecs_trans;
-    t_precomp = precomp_left;
+    unsigned int loffset = tipstate * span;
+
+    t_eigenvecs_padded = eigenvecs_padded;
+    t_precomp = precomp_left + loffset;
 
     for (i = 0; i < rate_cats; ++i)
     {
       for (j = 0; j < states_padded; j += 4)
+      {
+        /* point to the four rows of the eigenvec matrix */
+        const double * em0 = t_eigenvecs_padded;
+        const double * em1 = em0 + states_padded;
+        const double * em2 = em1 + states_padded;
+        const double * em3 = em2 + states_padded;
+        t_eigenvecs_padded += 4*states_padded;
+
+        __m256d v_righterm0 = _mm256_setzero_pd();
+        __m256d v_righterm1 = _mm256_setzero_pd();
+        __m256d v_righterm2 = _mm256_setzero_pd();
+        __m256d v_righterm3 = _mm256_setzero_pd();
+
+        for (k = 0; k < states_padded; k += 4)
         {
-          __m256d v_lefterm = _mm256_setzero_pd();
-          __m256d v_righterm = _mm256_setzero_pd();
+          /* load 4 entries of CLV */
+          __m256d v_clvc = _mm256_load_pd(t_clvc + k);
 
-          for (k = 0; k < states; ++k)
-            {
-              __m256d v_clvc = _mm256_set1_pd(t_clvc[k]);
-              __m256d v_eigen = _mm256_load_pd(t_eigenvecs_trans +
-                                                          k*states_padded + j);
-              v_righterm =  _mm256_add_pd(v_righterm,
-                                          _mm256_mul_pd(v_eigen, v_clvc));
-
-              if ((tipstate >> k) & 1)
-                {
-                  v_lefterm = _mm256_add_pd(v_lefterm,
-                                 _mm256_load_pd(t_precomp +
-                                                         k*states_padded + j));
-                }
-            }
+          /* row 0 */
+          __m256d v_eigen = _mm256_load_pd(em0 + k);
+          v_righterm0 =  _mm256_add_pd(v_righterm0,
+                                      _mm256_mul_pd(v_eigen, v_clvc));
 
-          __m256d v_sum = _mm256_mul_pd(v_lefterm, v_righterm);
-          _mm256_store_pd(sum + j, v_sum);
-        }
+          /* row 1 */
+          v_eigen = _mm256_load_pd(em1 + k);
+          v_righterm1 =  _mm256_add_pd(v_righterm1,
+                                      _mm256_mul_pd(v_eigen, v_clvc));
 
-      t_clvc += states_padded;
-      t_eigenvecs_trans += states_padded * states_padded;
-      t_precomp += states_padded * states_padded;
-      sum += states_padded;
-    }
-  }
+          /* row 2 */
+          v_eigen = _mm256_load_pd(em2 + k);
+          v_righterm2 =  _mm256_add_pd(v_righterm2,
+                                      _mm256_mul_pd(v_eigen, v_clvc));
 
-  pll_aligned_free(eigenvecs_trans);
-  pll_aligned_free(precomp_left);
+          /* row 3 */
+          v_eigen = _mm256_load_pd(em3 + k);
+          v_righterm3 =  _mm256_add_pd(v_righterm3,
+                                      _mm256_mul_pd(v_eigen, v_clvc));
+        }
 
-  return PLL_SUCCESS;
-}
+        /* reduce righterm */
+        __m256d xmm0, xmm1, xmm2, xmm3;
+        xmm0 = _mm256_unpackhi_pd(v_righterm0,v_righterm1);
+        xmm1 = _mm256_unpacklo_pd(v_righterm0,v_righterm1);
 
-PLL_EXPORT void core_site_likelihood_derivatives_avx(unsigned int states,
-                                             unsigned int states_padded,
-                                             unsigned int rate_cats,
-                                             const double * rate_weights,
-                                             const double * prop_invar,
-                                             const double * lk_invar,
-                                             const double * sumtable,
-                                             const double * diagptable,
-                                             double * site_lk)
-{
-  unsigned int i,j;
-  const double *sum = sumtable;
-  const double * diagp = diagptable;
+        xmm2 = _mm256_unpackhi_pd(v_righterm2,v_righterm3);
+        xmm3 = _mm256_unpacklo_pd(v_righterm2,v_righterm3);
 
-  __m256d v_sitelk = _mm256_setzero_pd ();
-  for (i = 0; i < rate_cats; ++i)
-  {
-    __m256d v_cat_sitelk = _mm256_setzero_pd ();
-    for (j = 0; j < states_padded; j++)
-    {
-      __m256d v_diagp = _mm256_load_pd(diagp);
-      __m256d v_sum = _mm256_set1_pd(sum[j]);
-      v_cat_sitelk = _mm256_add_pd (v_cat_sitelk, _mm256_mul_pd(v_sum, v_diagp));
+        xmm0 = _mm256_add_pd(xmm0,xmm1);
+        xmm1 = _mm256_add_pd(xmm2,xmm3);
 
-//      v_sitelk = _mm256_add_pd (v_sitelk, _mm256_mul_pd(v_sum, v_diagp));
+        xmm2 = _mm256_permute2f128_pd(xmm0,xmm1, _MM_SHUFFLE(0,2,0,1));
 
-      diagp += 4;
-    }
+        xmm3 = _mm256_blend_pd(xmm0,xmm1,12);
 
-    /* account for invariant sites */
-    const double t_prop_invar = prop_invar[i];
-    if (t_prop_invar > 0)
-    {
-      __m256d v_inv_prop = _mm256_set1_pd(1. - t_prop_invar);
-      v_cat_sitelk = _mm256_mul_pd(v_cat_sitelk, v_inv_prop);
+        __m256d v_righterm = _mm256_add_pd(xmm2,xmm3);
 
-      if (lk_invar)
-        {
-          __m256d v_inv_lk = _mm256_setr_pd(lk_invar[i], 0., 0., 0.);
-          v_cat_sitelk = _mm256_add_pd(v_cat_sitelk, v_inv_lk);
-        }
-    }
+        __m256d v_lefterm = _mm256_load_pd(t_precomp + j);
 
-    __m256d v_weight = _mm256_set1_pd(rate_weights[i]);
-    v_sitelk = _mm256_add_pd (v_sitelk, _mm256_mul_pd(v_cat_sitelk, v_weight));
+        __m256d v_sum = _mm256_mul_pd(v_lefterm, v_righterm);
+        _mm256_store_pd(sum + j, v_sum);
+      }
 
-    sum += states_padded;
+      t_clvc += states_padded;
+      t_precomp += states_padded;
+      sum += states_padded;
+    }
   }
 
-  _mm256_store_pd(site_lk, v_sitelk);
+  pll_aligned_free(eigenvecs_padded);
+  pll_aligned_free(precomp_left);
+
+  return PLL_SUCCESS;
 }
 
-PLL_EXPORT void core_site_likelihood_derivatives_4x4_avx(unsigned int rate_cats,
-                                             const double * rate_weights,
-                                             const double * prop_invar,
-                                             const double * lk_invar,
-                                             const double * sumtable,
-                                             const double * diagptable,
-                                             double * site_lk)
+PLL_EXPORT int pll_core_likelihood_derivatives_avx(unsigned int states,
+                                                   unsigned int states_padded,
+                                                   unsigned int rate_cats,
+                                                   unsigned int ef_sites,
+                                                   const unsigned int * pattern_weights,
+                                                   const double * rate_weights,
+                                                   const int * invariant,
+                                                   const double * prop_invar,
+                                                   double * const * freqs,
+                                                   const double * sumtable,
+                                                   const double * diagptable,
+                                                   double * d_f,
+                                                   double * dd_f)
 {
-  unsigned int i;
-  const double *sum = sumtable;
-  const double * diagp = diagptable;
+  unsigned int i,j,k,n;
+  unsigned int span_padded = rate_cats * states_padded;
+
+  double * t_diagp = NULL;
+  const double * diagp_start = NULL;
+  double * invar_lk = NULL;
 
-  __m256d v_sitelk = _mm256_setzero_pd ();
+  /* check for special cases in which we can save some computation later on */
+  int use_pinv = 0;
+  int eq_weights = 1;
   for (i = 0; i < rate_cats; ++i)
   {
-      __m256d v_cat_sitelk = _mm256_setzero_pd ();
+    /* check if proportion of invariant site is used */
+    use_pinv |= (prop_invar[i] > 0);
 
-      __m256d v_diagp = _mm256_load_pd(diagp);
-      __m256d v_sum = _mm256_set1_pd(sum[0]);
-      v_cat_sitelk = _mm256_add_pd (v_cat_sitelk, _mm256_mul_pd(v_sum, v_diagp));
-//      v_cat_sitelk = _mm256_fmadd_pd (v_sum, v_diagp, v_cat_sitelk);
-
-      v_diagp = _mm256_load_pd(diagp + 4);
-      v_sum = _mm256_set1_pd(sum[1]);
-      v_cat_sitelk = _mm256_add_pd (v_cat_sitelk, _mm256_mul_pd(v_sum, v_diagp));
+    /* check if rate weights are all equal (e.g. GAMMA) */
+    eq_weights &= (rate_weights[i] == rate_weights[0]);
+  }
 
-      v_diagp = _mm256_load_pd(diagp + 8);
-      v_sum = _mm256_set1_pd(sum[2]);
-      v_cat_sitelk = _mm256_add_pd (v_cat_sitelk, _mm256_mul_pd(v_sum, v_diagp));
+  if (use_pinv)
+  {
+    invar_lk = (double *) pll_aligned_alloc(rate_cats * states * sizeof(double),
+                                            PLL_ALIGNMENT_AVX);
 
-      v_diagp = _mm256_load_pd(diagp + 12);
-      v_sum = _mm256_set1_pd(sum[3]);
-      v_cat_sitelk = _mm256_add_pd (v_cat_sitelk, _mm256_mul_pd(v_sum, v_diagp));
+    if (!invar_lk)
+    {
+      pll_errno = PLL_ERROR_MEM_ALLOC;
+      snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+      return PLL_FAILURE;
+    }
 
-      /* account for invariant sites */
-      const double t_prop_invar = prop_invar[i];
-      if (t_prop_invar > 0)
+    /* pre-compute invariant site likelihoods*/
+    for(i = 0; i < states; ++i)
+    {
+      for(j = 0; j < rate_cats; ++j)
       {
-        __m256d v_inv_prop = _mm256_set1_pd(1. - t_prop_invar);
-        v_cat_sitelk = _mm256_mul_pd(v_cat_sitelk, v_inv_prop);
-
-        if (lk_invar)
-          {
-            __m256d v_inv_lk = _mm256_setr_pd(lk_invar[i], 0., 0., 0.);
-            v_cat_sitelk = _mm256_add_pd(v_cat_sitelk, v_inv_lk);
-          }
+        invar_lk[i * rate_cats + j] = freqs[j][i] * prop_invar[j];
       }
-
-      __m256d v_weight = _mm256_set1_pd(rate_weights[i]);
-      v_sitelk = _mm256_add_pd (v_sitelk, _mm256_mul_pd(v_cat_sitelk, v_weight));
-
-      diagp += 16;
-      sum += 4;
+    }
   }
-  _mm256_store_pd(site_lk, v_sitelk);
-}
-
-PLL_EXPORT int core_likelihood_derivatives_avx(unsigned int states,
-                                               unsigned int states_padded,
-                                               unsigned int rate_cats,
-                                               unsigned int ef_sites,
-                                               const unsigned int * pattern_weights,
-                                               const double * rate_weights,
-                                               const int * invariant,
-                                               const double * prop_invar,
-                                               double ** freqs,
-                                               const double * sumtable,
-                                               const double * diagptable,
-                                               double * d_f,
-                                               double * dd_f)
-{
 
-  unsigned int i,j,n;
-
-  double * invar_lk = (double *) pll_aligned_alloc(
-                                    rate_cats * states * sizeof(double),
-                                    PLL_ALIGNMENT_AVX);
-  if (!invar_lk)
+  if (states == 4)
   {
-    pll_errno = PLL_ERROR_MEM_ALLOC;
-    snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
-    return PLL_FAILURE;
+    diagp_start = diagptable;
   }
-
-
-  /* pre-compute invariant site likelihoods*/
-  for(i = 0; i < states; ++i)
+  else
   {
-    for(j = 0; j < rate_cats; ++j)
+    t_diagp = (double *) pll_aligned_alloc(
+                                      3 * span_padded * sizeof(double),
+                                      PLL_ALIGNMENT_AVX);
+
+    if (!t_diagp)
     {
-      invar_lk[i * rate_cats + j] = freqs[j][i] * prop_invar[j];
+      pll_errno = PLL_ERROR_MEM_ALLOC;
+      snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+      return PLL_FAILURE;
     }
-  }
 
-  /* check for special cases in which we can save some computation later on */
-  int use_pinv = 0;
-  int eq_weights = 1;
-  for (i = 0; i < rate_cats; ++i)
-    {
-      /* check if proportion of invariant site is used */
-      use_pinv |= (prop_invar[i] > 0);
+    memset(t_diagp, 0, 3 * span_padded * sizeof(double));
 
-      /* check if rate weights are all equal (e.g. GAMMA) */
-      eq_weights &= (rate_weights[i] == rate_weights[0]);
+    /* transpose diagptable */
+    for(i = 0; i < rate_cats; ++i)
+    {
+      for(j = 0; j < states; ++j)
+      {
+        for(k = 0; k < 3; ++k)
+        {
+          t_diagp[i * states_padded * 3 + k * states_padded  + j] =
+              diagptable[i * states * 4 + j * 4 + k];
+        }
+      }
     }
 
+    diagp_start = t_diagp;
+  }
+
   /* here we will temporary store per-site LH, 1st and 2nd derivatives */
   double site_lk[16] __attribute__( ( aligned ( PLL_ALIGNMENT_AVX ) ) ) ;
 
@@ -812,7 +875,7 @@ PLL_EXPORT int core_likelihood_derivatives_avx(unsigned int states,
   unsigned int offset = 0;
   for (n = 0; n < ef_sites; ++n)
   {
-    const double * diagp = diagptable;
+    const double * diagp = diagp_start;
 
     __m256d v_sitelk = _mm256_setzero_pd ();
     for (i = 0; i < rate_cats; ++i)
@@ -843,15 +906,50 @@ PLL_EXPORT int core_likelihood_derivatives_avx(unsigned int states,
       }
       else
       {
-        for (j = 0; j < states; j++)
+        /* pointer to 3 "rows" of diagp with values for lk0, lk1 and lk2 */
+        const double * r0 = diagp;
+        const double * r1 = r0 + states_padded;
+        const double * r2 = r1 + states_padded;
+
+        /* unroll 1st iteration to save a couple of adds */
+        __m256d v_sum = _mm256_load_pd(sum);
+        __m256d v_diagp = _mm256_load_pd(r0);
+        __m256d v_lk0 = _mm256_mul_pd(v_sum, v_diagp);
+
+        v_diagp = _mm256_load_pd(r1);
+        __m256d v_lk1 = _mm256_mul_pd(v_sum, v_diagp);
+
+        v_diagp = _mm256_load_pd(r2);
+        __m256d v_lk2 = _mm256_mul_pd(v_sum, v_diagp);
+
+        /* iterate over remaining states (if any) */
+        for (j = 4; j < states_padded; j+= 4)
         {
-          __m256d v_diagp = _mm256_load_pd(diagp);
-          __m256d v_sum = _mm256_set1_pd(sum[j]);
-          v_cat_sitelk = _mm256_add_pd (v_cat_sitelk, _mm256_mul_pd(v_sum, v_diagp));
+          v_sum = _mm256_load_pd(sum + j);
+          v_diagp = _mm256_load_pd(r0 + j);
+          v_lk0 = _mm256_add_pd (v_lk0, _mm256_mul_pd(v_sum, v_diagp));
 
-          diagp += 4;
+          v_diagp = _mm256_load_pd(r1 + j);
+          v_lk1 = _mm256_add_pd (v_lk1, _mm256_mul_pd(v_sum, v_diagp));
+
+          v_diagp = _mm256_load_pd(r2 + j);
+          v_lk2 = _mm256_add_pd (v_lk2, _mm256_mul_pd(v_sum, v_diagp));
         }
+
+        /* reduce lk0 (=LH), lk1 (=1st deriv) and v_lk2 (=2nd deriv) */
+        v_lk0 = _mm256_hadd_pd(v_lk0, v_lk0);
+        double lk0 = ((double *)&v_lk0)[0] + ((double *)&v_lk0)[2];
+
+        v_lk1 = _mm256_hadd_pd(v_lk1, v_lk1);
+        double lk1 = ((double *)&v_lk1)[0] + ((double *)&v_lk1)[2];
+
+        v_lk2 = _mm256_hadd_pd(v_lk2, v_lk2);
+        double lk2 = ((double *)&v_lk2)[0] + ((double *)&v_lk2)[2];
+
+        v_cat_sitelk = _mm256_setr_pd (lk0, lk1, lk2, 0.);
+
         sum += states_padded;
+        diagp += 3 * states_padded;
       }
 
       /* account for invariant sites */
@@ -944,7 +1042,10 @@ PLL_EXPORT int core_likelihood_derivatives_avx(unsigned int states,
   _mm256_store_pd(site_lk, v_ddf);
   *dd_f += site_lk[0] + site_lk[1] + site_lk[2] + site_lk[3];
 
-  pll_aligned_free(invar_lk);
+  if (t_diagp)
+    pll_aligned_free(t_diagp);
+  if (invar_lk)
+    pll_aligned_free(invar_lk);
 
   return PLL_SUCCESS;
 }
diff --git a/src/core_derivatives_avx2.c b/src/core_derivatives_avx2.c
new file mode 100644
index 0000000..20216d5
--- /dev/null
+++ b/src/core_derivatives_avx2.c
@@ -0,0 +1,692 @@
+/*
+    Copyright (C) 2016 Tomas Flouri, Diego Darriba, Alexey Kozlov
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Contact: Tomas Flouri <Tomas.Flouri at h-its.org>,
+    Exelixis Lab, Heidelberg Instutute for Theoretical Studies
+    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
+*/
+
+#include "pll.h"
+
+PLL_EXPORT int pll_core_update_sumtable_ii_avx2(unsigned int states,
+                                                unsigned int sites,
+                                                unsigned int rate_cats,
+                                                const double * clvp,
+                                                const double * clvc,
+                                                const unsigned int * parent_scaler,
+                                                const unsigned int * child_scaler,
+                                                double * const * eigenvecs,
+                                                double * const * inv_eigenvecs,
+                                                double * const * freqs,
+                                                double * sumtable,
+                                                unsigned int attrib)
+{
+  unsigned int i, j, k, n;
+
+  /* build sumtable */
+  double * sum = sumtable;
+
+  const double * t_clvp = clvp;
+  const double * t_clvc = clvc;
+  double * t_freqs;
+
+  /* dedicated functions for 4x4 matrices */
+  if (states == 4)
+  {
+    /* call AVX variant */
+    return pll_core_update_sumtable_ii_avx(states,
+                                           sites,
+                                           rate_cats,
+                                           clvp,
+                                           clvc,
+                                           parent_scaler,
+                                           child_scaler,
+                                           eigenvecs,
+                                           inv_eigenvecs,
+                                           freqs,
+                                           sumtable,
+                                           attrib);
+  }
+
+  unsigned int states_padded = (states+3) & 0xFFFFFFFC;
+
+  /* padded eigenvecs */
+  double * tt_eigenvecs = (double *) pll_aligned_alloc (
+        (states_padded * states_padded * rate_cats) * sizeof(double),
+        PLL_ALIGNMENT_AVX);
+
+  if (!tt_eigenvecs)
+  {
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf (pll_errmsg, 200, "Cannot allocate memory for tt_eigenvecs");
+    return PLL_FAILURE;
+  }
+
+  /* transposed padded inv_eigenvecs */
+  double * tt_inv_eigenvecs = (double *) pll_aligned_alloc (
+      (states_padded * states_padded * rate_cats) * sizeof(double),
+      PLL_ALIGNMENT_AVX);
+
+  if (!tt_inv_eigenvecs)
+  {
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf (pll_errmsg, 200, "Cannot allocate memory for tt_inv_eigenvecs");
+    return PLL_FAILURE;
+  }
+
+  memset(tt_eigenvecs, 0, (states_padded * states_padded * rate_cats) * sizeof(double));
+  memset(tt_inv_eigenvecs, 0, (states_padded * states_padded * rate_cats) * sizeof(double));
+
+  /* add padding to eigenvecs matrices and multiply with frequencies */
+  for (i = 0; i < rate_cats; ++i)
+  {
+    t_freqs = freqs[i];
+    for (j = 0; j < states; ++j)
+      for (k = 0; k < states; ++k)
+      {
+        tt_inv_eigenvecs[i * states_padded * states_padded + j * states_padded
+            + k] = inv_eigenvecs[i][k * states + j] * t_freqs[k];
+        tt_eigenvecs[i * states_padded * states_padded + j * states_padded
+            + k] = eigenvecs[i][j * states + k];
+      }
+  }
+
+  /* vectorized loop from update_sumtable() */
+  for (n = 0; n < sites; n++)
+  {
+    const double * c_eigenvecs      = tt_eigenvecs;
+    const double * ct_inv_eigenvecs = tt_inv_eigenvecs;
+    for (i = 0; i < rate_cats; ++i)
+    {
+      for (j = 0; j < states_padded; j += 4)
+      {
+        /* point to the four rows of the eigenvecs matrix */
+        const double * em0 = c_eigenvecs;
+        const double * em1 = em0 + states_padded;
+        const double * em2 = em1 + states_padded;
+        const double * em3 = em2 + states_padded;
+        c_eigenvecs += 4*states_padded;
+
+        /* point to the four rows of the inv_eigenvecs matrix */
+        const double * im0 = ct_inv_eigenvecs;
+        const double * im1 = im0 + states_padded;
+        const double * im2 = im1 + states_padded;
+        const double * im3 = im2 + states_padded;
+        ct_inv_eigenvecs += 4*states_padded;
+
+        __m256d v_lefterm0 = _mm256_setzero_pd ();
+        __m256d v_righterm0 = _mm256_setzero_pd ();
+        __m256d v_lefterm1 = _mm256_setzero_pd ();
+        __m256d v_righterm1 = _mm256_setzero_pd ();
+        __m256d v_lefterm2 = _mm256_setzero_pd ();
+        __m256d v_righterm2 = _mm256_setzero_pd ();
+        __m256d v_lefterm3 = _mm256_setzero_pd ();
+        __m256d v_righterm3 = _mm256_setzero_pd ();
+
+        __m256d v_eigen;
+        __m256d v_clvp;
+        __m256d v_clvc;
+
+        for (k = 0; k < states_padded; k += 4)
+        {
+          v_clvp = _mm256_load_pd (t_clvp + k);
+          v_clvc = _mm256_load_pd (t_clvc + k);
+
+          /* row 0 */
+          v_eigen = _mm256_load_pd (im0 + k);
+          v_lefterm0 = _mm256_fmadd_pd(v_eigen, v_clvp, v_lefterm0);
+
+
+          v_eigen = _mm256_load_pd (em0 + k);
+          v_righterm0 = _mm256_fmadd_pd(v_eigen, v_clvc, v_righterm0);
+
+          /* row 1 */
+          v_eigen = _mm256_load_pd (im1 + k);
+          v_lefterm1 = _mm256_fmadd_pd(v_eigen, v_clvp, v_lefterm1);
+
+          v_eigen = _mm256_load_pd (em1 + k);
+          v_righterm1 = _mm256_fmadd_pd(v_eigen, v_clvc, v_righterm1);
+
+
+          /* row 2 */
+          v_eigen = _mm256_load_pd (im2 + k);
+          v_lefterm2 = _mm256_fmadd_pd(v_eigen, v_clvp, v_lefterm2);
+
+          v_eigen = _mm256_load_pd (em2 + k);
+          v_righterm2 = _mm256_fmadd_pd(v_eigen, v_clvc, v_righterm2);
+
+          /* row 3 */
+          v_eigen = _mm256_load_pd (im3 + k);
+          v_lefterm3 = _mm256_fmadd_pd(v_eigen, v_clvp, v_lefterm3);
+
+          v_eigen = _mm256_load_pd (em3 + k);
+          v_righterm3 = _mm256_fmadd_pd(v_eigen, v_clvc, v_righterm3);
+
+        }
+
+        /* compute lefterm */
+        __m256d xmm0 = _mm256_unpackhi_pd (v_lefterm0, v_lefterm1);
+        __m256d xmm1 = _mm256_unpacklo_pd (v_lefterm0, v_lefterm1);
+        __m256d xmm2 = _mm256_unpackhi_pd (v_lefterm2, v_lefterm3);
+        __m256d xmm3 = _mm256_unpacklo_pd (v_lefterm2, v_lefterm3);
+        xmm0 = _mm256_add_pd (xmm0, xmm1);
+        xmm1 = _mm256_add_pd (xmm2, xmm3);
+        xmm2 = _mm256_permute2f128_pd (xmm0, xmm1, _MM_SHUFFLE(0, 2, 0, 1));
+        xmm3 = _mm256_blend_pd (xmm0, xmm1, 12);
+        __m256d v_lefterm_sum = _mm256_add_pd (xmm2, xmm3);
+
+        /* compute righterm */
+        xmm0 = _mm256_unpackhi_pd (v_righterm0, v_righterm1);
+        xmm1 = _mm256_unpacklo_pd (v_righterm0, v_righterm1);
+        xmm2 = _mm256_unpackhi_pd (v_righterm2, v_righterm3);
+        xmm3 = _mm256_unpacklo_pd (v_righterm2, v_righterm3);
+        xmm0 = _mm256_add_pd (xmm0, xmm1);
+        xmm1 = _mm256_add_pd (xmm2, xmm3);
+        xmm2 = _mm256_permute2f128_pd (xmm0, xmm1, _MM_SHUFFLE(0, 2, 0, 1));
+        xmm3 = _mm256_blend_pd (xmm0, xmm1, 12);
+        __m256d v_righterm_sum = _mm256_add_pd (xmm2, xmm3);
+
+        /* update sum */
+        __m256d v_prod = _mm256_mul_pd (v_lefterm_sum, v_righterm_sum);
+        _mm256_store_pd (sum + j, v_prod);
+      }
+
+      t_clvc += states_padded;
+      t_clvp += states_padded;
+      sum    += states_padded;
+    }
+  }
+
+  pll_aligned_free (tt_inv_eigenvecs);
+  pll_aligned_free (tt_eigenvecs);
+
+  return PLL_SUCCESS;
+}
+
+PLL_EXPORT int pll_core_update_sumtable_ti_avx2(unsigned int states,
+                                                unsigned int sites,
+                                                unsigned int rate_cats,
+                                                const double * parent_clv,
+                                                const unsigned char * left_tipchars,
+                                                const unsigned int * parent_scaler,
+                                                double * const * eigenvecs,
+                                                double * const * inv_eigenvecs,
+                                                double * const * freqs,
+                                                const unsigned int * tipmap,
+                                                unsigned int tipmap_size,
+                                                double *sumtable,
+                                                unsigned int attrib)
+{
+  if (states == 4)
+  {
+    /* call AVX version for the 4x4 case */
+    return pll_core_update_sumtable_ti_avx(states,
+                                           sites,
+                                           rate_cats,
+                                           parent_clv,
+                                           left_tipchars,
+                                           parent_scaler,
+                                           eigenvecs,
+                                           inv_eigenvecs,
+                                           freqs,
+                                           tipmap,
+                                           tipmap_size,
+                                           sumtable,
+                                           attrib);
+  }
+
+  unsigned int states_padded = (states+3) & 0xFFFFFFFC;
+  unsigned int span = states_padded * rate_cats;
+  unsigned int maxstates = tipmap_size;
+
+  unsigned int i, j, k, n;
+  unsigned int tipstate;
+
+  double * sum = sumtable;
+  const double * t_clvc = parent_clv;
+  const double * t_eigenvecs_padded;
+
+  double * eigenvecs_padded = (double *) pll_aligned_alloc (
+      (states_padded * states_padded * rate_cats) * sizeof(double),
+      PLL_ALIGNMENT_AVX);
+
+  double * precomp_left = (double *) pll_aligned_alloc (
+      (maxstates * states_padded * rate_cats) * sizeof(double),
+      PLL_ALIGNMENT_AVX);
+
+  if (!eigenvecs_padded || !precomp_left)
+  {
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf (pll_errmsg, 200, "Cannot allocate memory for tt_inv_eigenvecs");
+    return PLL_FAILURE;
+  }
+
+  /* add padding to eigenvecs matrix -> for efficient vectorization */
+  for (i = 0; i < rate_cats; ++i)
+  {
+    for (j = 0; j < states_padded; ++j)
+      for (k = 0; k < states_padded; ++k)
+      {
+        eigenvecs_padded[i*states_padded*states_padded + j*states_padded + k] =
+            (j < states && k < states) ? eigenvecs[i][j*states + k] : 0.;
+      }
+  }
+
+  /* precompute left terms since they are the same for every site */
+  double * t_precomp = precomp_left;
+  for (n = 0; n < maxstates; ++n)
+  {
+    unsigned int state = tipmap ? tipmap[n] : n;
+
+    int ss = __builtin_popcount(state) == 1 ? __builtin_ctz(state) : -1;
+
+    for (i = 0; i < rate_cats; ++i)
+    {
+      for (j = 0; j < states_padded; j += 4)
+      {
+        __m256d v_lefterm;
+
+        if (ss != -1)
+        {
+          /* special case for non-ambiguous state */
+          __m256d v_freqs = _mm256_set1_pd(freqs[i][ss]);
+          __m256d v_eigen = _mm256_load_pd(inv_eigenvecs[i] +
+                                                       ss*states + j);
+          v_lefterm =  _mm256_mul_pd(v_eigen, v_freqs);
+        }
+        else
+        {
+          v_lefterm = _mm256_setzero_pd();
+          for (k = 0; k < states; ++k)
+          {
+            if ((state>>k) & 1)
+            {
+              __m256d v_freqs = _mm256_set1_pd(freqs[i][k]);
+              __m256d v_eigen = _mm256_load_pd(inv_eigenvecs[i] +
+                                                           k*states + j);
+
+              v_lefterm = _mm256_fmadd_pd(v_eigen, v_freqs, v_lefterm);
+            }
+          }
+        }
+
+        _mm256_store_pd(t_precomp, v_lefterm);
+        t_precomp += 4;
+      }
+    }
+  }
+
+  /* build sumtable */
+  for (n = 0; n < sites; n++)
+  {
+    tipstate = (unsigned int) left_tipchars[n];
+
+    unsigned int loffset = tipstate * span;
+
+    t_eigenvecs_padded = eigenvecs_padded;
+    t_precomp = precomp_left + loffset;
+
+    for (i = 0; i < rate_cats; ++i)
+    {
+      for (j = 0; j < states_padded; j += 4)
+      {
+        /* point to the four rows of the eigenvec matrix */
+        const double * em0 = t_eigenvecs_padded;
+        const double * em1 = em0 + states_padded;
+        const double * em2 = em1 + states_padded;
+        const double * em3 = em2 + states_padded;
+        t_eigenvecs_padded += 4*states_padded;
+
+        __m256d v_righterm0 = _mm256_setzero_pd();
+        __m256d v_righterm1 = _mm256_setzero_pd();
+        __m256d v_righterm2 = _mm256_setzero_pd();
+        __m256d v_righterm3 = _mm256_setzero_pd();
+
+        for (k = 0; k < states_padded; k += 4)
+        {
+          /* load 4 entries of CLV */
+          __m256d v_clvc = _mm256_load_pd(t_clvc + k);
+
+          /* row 0 */
+          __m256d v_eigen = _mm256_load_pd(em0 + k);
+          v_righterm0 = _mm256_fmadd_pd(v_eigen, v_clvc, v_righterm0);
+
+          /* row 1 */
+          v_eigen = _mm256_load_pd(em1 + k);
+          v_righterm1 = _mm256_fmadd_pd(v_eigen, v_clvc, v_righterm1);
+
+          /* row 2 */
+          v_eigen = _mm256_load_pd(em2 + k);
+          v_righterm2 = _mm256_fmadd_pd(v_eigen, v_clvc, v_righterm2);
+
+          /* row 3 */
+          v_eigen = _mm256_load_pd(em3 + k);
+          v_righterm3 = _mm256_fmadd_pd(v_eigen, v_clvc, v_righterm3);
+        }
+
+        /* reduce righterm */
+        __m256d xmm0, xmm1, xmm2, xmm3;
+        xmm0 = _mm256_unpackhi_pd(v_righterm0,v_righterm1);
+        xmm1 = _mm256_unpacklo_pd(v_righterm0,v_righterm1);
+
+        xmm2 = _mm256_unpackhi_pd(v_righterm2,v_righterm3);
+        xmm3 = _mm256_unpacklo_pd(v_righterm2,v_righterm3);
+
+        xmm0 = _mm256_add_pd(xmm0,xmm1);
+        xmm1 = _mm256_add_pd(xmm2,xmm3);
+
+        xmm2 = _mm256_permute2f128_pd(xmm0,xmm1, _MM_SHUFFLE(0,2,0,1));
+
+        xmm3 = _mm256_blend_pd(xmm0,xmm1,12);
+
+        __m256d v_righterm = _mm256_add_pd(xmm2,xmm3);
+
+        __m256d v_lefterm = _mm256_load_pd(t_precomp + j);
+
+        __m256d v_sum = _mm256_mul_pd(v_lefterm, v_righterm);
+        _mm256_store_pd(sum + j, v_sum);
+      }
+
+      t_clvc += states_padded;
+      t_precomp += states_padded;
+      sum += states_padded;
+    }
+  }
+
+  pll_aligned_free(eigenvecs_padded);
+  pll_aligned_free(precomp_left);
+
+  return PLL_SUCCESS;
+}
+
+PLL_EXPORT
+int pll_core_likelihood_derivatives_avx2(unsigned int states,
+                                         unsigned int states_padded,
+                                         unsigned int rate_cats,
+                                         unsigned int ef_sites,
+                                         const unsigned int * pattern_weights,
+                                         const double * rate_weights,
+                                         const int * invariant,
+                                         const double * prop_invar,
+                                         double * const * freqs,
+                                         const double * sumtable,
+                                         const double * diagptable,
+                                         double * d_f,
+                                         double * dd_f)
+{
+  unsigned int i,j,k,n;
+  unsigned int span_padded = rate_cats * states_padded;
+
+  double * t_diagp = NULL;
+  const double * diagp_start = NULL;
+  double * invar_lk = NULL;
+
+  /* check for special cases in which we can save some computation later on */
+  int use_pinv = 0;
+  int eq_weights = 1;
+  for (i = 0; i < rate_cats; ++i)
+  {
+    /* check if proportion of invariant site is used */
+    use_pinv |= (prop_invar[i] > 0);
+
+    /* check if rate weights are all equal (e.g. GAMMA) */
+    eq_weights &= (rate_weights[i] == rate_weights[0]);
+  }
+
+  if (use_pinv)
+  {
+    invar_lk = (double *) pll_aligned_alloc(rate_cats * states * sizeof(double),
+                                            PLL_ALIGNMENT_AVX);
+
+    if (!invar_lk)
+    {
+      pll_errno = PLL_ERROR_MEM_ALLOC;
+      snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+      return PLL_FAILURE;
+    }
+
+    /* pre-compute invariant site likelihoods*/
+    for(i = 0; i < states; ++i)
+    {
+      for(j = 0; j < rate_cats; ++j)
+      {
+        invar_lk[i * rate_cats + j] = freqs[j][i] * prop_invar[j];
+      }
+    }
+  }
+
+  if (states == 4)
+  {
+    diagp_start = diagptable;
+  }
+  else
+  {
+    t_diagp = (double *) pll_aligned_alloc(
+                                      3 * span_padded * sizeof(double),
+                                      PLL_ALIGNMENT_AVX);
+
+    if (!t_diagp)
+    {
+      pll_errno = PLL_ERROR_MEM_ALLOC;
+      snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+      return PLL_FAILURE;
+    }
+
+    memset(t_diagp, 0, 3 * span_padded * sizeof(double));
+
+    /* transpose diagptable */
+    for(i = 0; i < rate_cats; ++i)
+    {
+      for(j = 0; j < states; ++j)
+      {
+        for(k = 0; k < 3; ++k)
+        {
+          t_diagp[i * states_padded * 3 + k * states_padded  + j] =
+              diagptable[i * states * 4 + j * 4 + k];
+        }
+      }
+    }
+
+    diagp_start = t_diagp;
+  }
+
+  /* here we will temporary store per-site LH, 1st and 2nd derivatives */
+  double site_lk[16] __attribute__( ( aligned ( PLL_ALIGNMENT_AVX ) ) ) ;
+
+  /* vectors for accumulating 1st and 2nd derivatives */
+  __m256d v_df = _mm256_setzero_pd ();
+  __m256d v_ddf = _mm256_setzero_pd ();
+  __m256d v_all1 = _mm256_set1_pd(1.);
+
+  const double *sum = sumtable;
+  const int * invariant_ptr = invariant;
+  unsigned int offset = 0;
+  for (n = 0; n < ef_sites; ++n)
+  {
+    const double * diagp = diagp_start;
+
+    __m256d v_sitelk = _mm256_setzero_pd ();
+    for (i = 0; i < rate_cats; ++i)
+    {
+      __m256d v_cat_sitelk = _mm256_setzero_pd ();
+
+      if (states == 4)
+      {
+        /* use unrolled loop */
+        __m256d v_diagp = _mm256_load_pd(diagp);
+        __m256d v_sum = _mm256_set1_pd(sum[0]);
+        v_cat_sitelk = _mm256_fmadd_pd(v_sum, v_diagp, v_cat_sitelk);
+
+        v_diagp = _mm256_load_pd(diagp + 4);
+        v_sum = _mm256_set1_pd(sum[1]);
+        v_cat_sitelk = _mm256_fmadd_pd(v_sum, v_diagp, v_cat_sitelk);
+
+        v_diagp = _mm256_load_pd(diagp + 8);
+        v_sum = _mm256_set1_pd(sum[2]);
+        v_cat_sitelk = _mm256_fmadd_pd(v_sum, v_diagp, v_cat_sitelk);
+
+        v_diagp = _mm256_load_pd(diagp + 12);
+        v_sum = _mm256_set1_pd(sum[3]);
+        v_cat_sitelk = _mm256_fmadd_pd(v_sum, v_diagp, v_cat_sitelk);
+
+        diagp += 16;
+        sum += 4;
+      }
+      else
+      {
+        /* pointer to 3 "rows" of diagp with values for lk0, lk1 and lk2 */
+        const double * r0 = diagp;
+        const double * r1 = r0 + states_padded;
+        const double * r2 = r1 + states_padded;
+
+        /* unroll 1st iteration to save a couple of adds */
+        __m256d v_sum = _mm256_load_pd(sum);
+        __m256d v_diagp = _mm256_load_pd(r0);
+        __m256d v_lk0 = _mm256_mul_pd(v_sum, v_diagp);
+
+        v_diagp = _mm256_load_pd(r1);
+        __m256d v_lk1 = _mm256_mul_pd(v_sum, v_diagp);
+
+        v_diagp = _mm256_load_pd(r2);
+        __m256d v_lk2 = _mm256_mul_pd(v_sum, v_diagp);
+
+        /* iterate over remaining states (if any) */
+        for (j = 4; j < states_padded; j+= 4)
+        {
+          v_sum = _mm256_load_pd(sum + j);
+          v_diagp = _mm256_load_pd(r0 + j);
+          v_lk0 =  _mm256_fmadd_pd (v_sum, v_diagp, v_lk0);
+
+          v_diagp = _mm256_load_pd(r1 + j);
+          v_lk1 =  _mm256_fmadd_pd (v_sum, v_diagp, v_lk1);
+
+          v_diagp = _mm256_load_pd(r2 + j);
+          v_lk2 =  _mm256_fmadd_pd (v_sum, v_diagp, v_lk2);
+        }
+
+        /* reduce lk0 (=LH), lk1 (=1st deriv) and v_lk2 (=2nd deriv) */
+        v_lk0 = _mm256_hadd_pd(v_lk0, v_lk0);
+        double lk0 = ((double *)&v_lk0)[0] + ((double *)&v_lk0)[2];
+
+        v_lk1 = _mm256_hadd_pd(v_lk1, v_lk1);
+        double lk1 = ((double *)&v_lk1)[0] + ((double *)&v_lk1)[2];
+
+        v_lk2 = _mm256_hadd_pd(v_lk2, v_lk2);
+        double lk2 = ((double *)&v_lk2)[0] + ((double *)&v_lk2)[2];
+
+        v_cat_sitelk = _mm256_setr_pd (lk0, lk1, lk2, 0.);
+
+        sum += states_padded;
+        diagp += 3 * states_padded;
+      }
+
+      /* account for invariant sites */
+      if (use_pinv && prop_invar[i] > 0)
+      {
+        __m256d v_inv_prop = _mm256_set1_pd(1. - prop_invar[i]);
+        v_cat_sitelk = _mm256_mul_pd(v_cat_sitelk, v_inv_prop);
+
+        if (invariant && *invariant_ptr != -1)
+        {
+          double site_invar_lk = invar_lk[(*invariant_ptr) * rate_cats + i];
+          __m256d v_inv_lk = _mm256_setr_pd(site_invar_lk, 0., 0., 0.);
+          v_cat_sitelk = _mm256_add_pd(v_cat_sitelk, v_inv_lk);
+        }
+      }
+
+      /* apply rate category weights */
+      if (eq_weights)
+      {
+        /* all rate weights are equal -> no multiplication needed */
+        v_sitelk = _mm256_add_pd (v_sitelk, v_cat_sitelk);
+      }
+      else
+      {
+        __m256d v_weight = _mm256_set1_pd(rate_weights[i]);
+        v_sitelk = _mm256_fmadd_pd(v_cat_sitelk, v_weight, v_sitelk);
+      }
+    }
+
+    _mm256_store_pd(&site_lk[offset], v_sitelk);
+    offset += 4;
+
+    invariant_ptr++;
+
+    /* build derivatives for 4 adjacent sites at once */
+    if (offset == 16)
+    {
+      __m256d v_term0 = _mm256_setr_pd(site_lk[0], site_lk[4],
+                                       site_lk[8], site_lk[12]);
+      __m256d v_term1 = _mm256_setr_pd(site_lk[1], site_lk[5],
+                                       site_lk[9], site_lk[13]);
+      __m256d v_term2 = _mm256_setr_pd(site_lk[2], site_lk[6],
+                                       site_lk[10], site_lk[14]);
+
+      __m256d v_recip0 = _mm256_div_pd(v_all1, v_term0);
+      __m256d v_deriv1 = _mm256_mul_pd(v_term1, v_recip0);
+      __m256d v_deriv2 = _mm256_sub_pd(_mm256_mul_pd(v_deriv1, v_deriv1),
+                                       _mm256_mul_pd(v_term2, v_recip0));
+
+      /* assumption: no zero weights */
+      if ((pattern_weights[n-3] | pattern_weights[n-2] |
+           pattern_weights[n-1] | pattern_weights[n]) == 1)
+      {
+        /* all 4 weights are 1 -> no multiplication needed */
+        v_df = _mm256_sub_pd (v_df, v_deriv1);
+        v_ddf = _mm256_add_pd (v_ddf, v_deriv2);
+      }
+      else
+      {
+        __m256d v_patw = _mm256_setr_pd(pattern_weights[n-3], pattern_weights[n-2],
+                                        pattern_weights[n-1], pattern_weights[n]);
+
+        v_df = _mm256_fnmadd_pd (v_deriv1, v_patw, v_df);
+        v_ddf = _mm256_fmadd_pd (v_deriv2, v_patw, v_ddf);
+      }
+      offset = 0;
+    }
+  }
+
+  *d_f = *dd_f = 0.;
+
+  /* remainder loop */
+  while (offset > 0)
+  {
+    offset -= 4;
+    n--;
+    double deriv1 = (-site_lk[offset+1] / site_lk[offset]);
+    double deriv2 = (deriv1 * deriv1 - (site_lk[offset+2] / site_lk[offset]));
+    *d_f += pattern_weights[n] * deriv1;
+    *dd_f += pattern_weights[n] * deriv2;
+  }
+
+  assert(offset == 0 && n == ef_sites / 4 * 4);
+
+  /* reduce 1st derivative */
+  _mm256_store_pd(site_lk, v_df);
+  *d_f += site_lk[0] + site_lk[1] + site_lk[2] + site_lk[3];
+
+  /* reduce 2nd derivative */
+  _mm256_store_pd(site_lk, v_ddf);
+  *dd_f += site_lk[0] + site_lk[1] + site_lk[2] + site_lk[3];
+
+  if (t_diagp)
+    pll_aligned_free(t_diagp);
+  if (invar_lk)
+    pll_aligned_free(invar_lk);
+
+  return PLL_SUCCESS;
+}
diff --git a/src/core_derivatives_sse.c b/src/core_derivatives_sse.c
index abefe08..f9849dd 100644
--- a/src/core_derivatives_sse.c
+++ b/src/core_derivatives_sse.c
@@ -19,6 +19,7 @@
     Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
 */
 
+#include <limits.h>
 #include "pll.h"
 
 /*
@@ -26,180 +27,276 @@
           work with SSE (states_padded is set to the corresponding value)
 */
 
-PLL_EXPORT int pll_core_update_sumtable_ii_sse(unsigned int states,
-                                               unsigned int sites,
-                                               unsigned int rate_cats,
-                                               const double * parent_clv,
-                                               const double * child_clv,
-                                               double ** eigenvecs,
-                                               double ** inv_eigenvecs,
-                                               double ** freqs_indices,
-                                               double * sumtable)
+static int core_update_sumtable_ti_4x4_sse(unsigned int sites,
+                                           unsigned int rate_cats,
+                                           const double * parent_clv,
+                                           const unsigned char * left_tipchars,
+                                           const unsigned int * parent_scaler,
+                                           double * const * eigenvecs,
+                                           double * const * inv_eigenvecs,
+                                           double * const * freqs_indices,
+                                           const unsigned int * tipmap,
+                                           double * sumtable,
+                                           unsigned int attrib)
 {
-  unsigned int i, j, k, n;
+  unsigned int i,j,k,n;
+  unsigned int tipstate;
+  unsigned int states = 4;
   double lterm = 0;
   double rterm = 0;
 
-  const double * clvp = parent_clv;
-  const double * clvc = child_clv;
+  const double * clvc = parent_clv;
   const double * ev;
-  const double * invev;
+  const double * invei;
   const double * freqs;
 
   double * sum = sumtable;
 
-  unsigned int states_padded = (states+1) & 0xFFFFFFFE;
+  unsigned int min_scaler;
+  unsigned int * rate_scalings = NULL;
+  int per_rate_scaling = (attrib & PLL_ATTRIB_RATE_SCALERS) ? 1 : 0;
+
+  /* powers of scale threshold for undoing the scaling */
+  double scale_minlh[PLL_SCALE_RATE_MAXDIFF];
+  if (per_rate_scaling)
+  {
+    rate_scalings = (unsigned int*) calloc(rate_cats, sizeof(unsigned int));
+
+    double scale_factor = 1.0;
+    for (i = 0; i < PLL_SCALE_RATE_MAXDIFF; ++i)
+    {
+      scale_factor *= PLL_SCALE_THRESHOLD;
+      scale_minlh[i] = scale_factor;
+    }
+  }
 
   /* build sumtable */
   for (n = 0; n < sites; n++)
   {
+    if (per_rate_scaling)
+    {
+      /* compute minimum per-rate scaler -> common per-site scaler */
+      min_scaler = UINT_MAX;
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = (parent_scaler) ? parent_scaler[n*rate_cats+i] : 0;
+        if (rate_scalings[i] < min_scaler)
+          min_scaler = rate_scalings[i];
+      }
+
+      /* compute relative capped per-rate scalers */
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = PLL_MIN(rate_scalings[i] - min_scaler,
+                                   PLL_SCALE_RATE_MAXDIFF);
+      }
+    }
+
     for (i = 0; i < rate_cats; ++i)
     {
-      ev = eigenvecs[i];
-      invev = inv_eigenvecs[i];
+      ev    = eigenvecs[i];
+      invei = inv_eigenvecs[i];
       freqs = freqs_indices[i];
 
       for (j = 0; j < states; ++j)
       {
+        tipstate = (unsigned int)left_tipchars[n];
         lterm = 0;
         rterm = 0;
 
         for (k = 0; k < states; ++k)
         {
-          lterm += clvp[k] * freqs[k] * invev[k*states+j];
+          lterm += (tipstate & 1) * freqs[k] * invei[k*states+j];
           rterm += ev[j*states+k] * clvc[k];
+          tipstate >>= 1;
         }
-
         sum[j] = lterm*rterm;
+
+        if (rate_scalings && rate_scalings[i] > 0)
+          sum[j] *= scale_minlh[rate_scalings[i]-1];
       }
 
-      clvc += states_padded;
-      clvp += states_padded;
-      sum += states_padded;
+      clvc += states;
+      sum += states;
     }
   }
 
+  if (rate_scalings)
+    free(rate_scalings);
+
   return PLL_SUCCESS;
 }
 
-PLL_EXPORT int pll_core_update_sumtable_ti_sse(unsigned int states,
+PLL_EXPORT int pll_core_update_sumtable_ii_sse(unsigned int states,
                                                unsigned int sites,
                                                unsigned int rate_cats,
                                                const double * parent_clv,
-                                               const unsigned char * left_tipchars,
-                                               double ** eigenvecs,
-                                               double ** inv_eigenvecs,
-                                               double ** freqs_indices,
-                                               unsigned int * tipmap,
-                                               double * sumtable)
+                                               const double * child_clv,
+                                               const unsigned int * parent_scaler,
+                                               const unsigned int * child_scaler,
+                                               double * const * eigenvecs,
+                                               double * const * inv_eigenvecs,
+                                               double * const * freqs_indices,
+                                               double * sumtable,
+                                               unsigned int attrib)
 {
-  unsigned int i,j,k,n;
-  unsigned int tipstate;
+  unsigned int i, j, k, n;
   double lterm = 0;
   double rterm = 0;
 
-  double * sum = sumtable;
-  const double * clvc = parent_clv;
+  const double * clvp = parent_clv;
+  const double * clvc = child_clv;
   const double * ev;
   const double * invev;
   const double * freqs;
 
-  if (states == 4)
-  {
-    return pll_core_update_sumtable_ti_4x4_sse(sites,
-                                               rate_cats,
-                                               parent_clv,
-                                               left_tipchars,
-                                               eigenvecs,
-                                               inv_eigenvecs,
-                                               freqs_indices,
-                                               tipmap,
-                                               sumtable);
-  }
+  double * sum = sumtable;
 
   unsigned int states_padded = (states+1) & 0xFFFFFFFE;
 
-  /* build sumtable: non-vectorized version, general case */
+  unsigned int min_scaler;
+  unsigned int * rate_scalings = NULL;
+  int per_rate_scaling = (attrib & PLL_ATTRIB_RATE_SCALERS) ? 1 : 0;
+
+  /* powers of scale threshold for undoing the scaling */
+  double scale_minlh[PLL_SCALE_RATE_MAXDIFF];
+  if (per_rate_scaling)
+  {
+    rate_scalings = (unsigned int*) calloc(rate_cats, sizeof(unsigned int));
+
+    double scale_factor = 1.0;
+    for (i = 0; i < PLL_SCALE_RATE_MAXDIFF; ++i)
+    {
+      scale_factor *= PLL_SCALE_THRESHOLD;
+      scale_minlh[i] = scale_factor;
+    }
+  }
+
+  /* build sumtable */
   for (n = 0; n < sites; n++)
   {
+    if (per_rate_scaling)
+    {
+      /* compute minimum per-rate scaler -> common per-site scaler */
+      min_scaler = UINT_MAX;
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = (parent_scaler) ? parent_scaler[n*rate_cats+i] : 0;
+        rate_scalings[i] += (child_scaler) ? child_scaler[n*rate_cats+i] : 0;
+        if (rate_scalings[i] < min_scaler)
+          min_scaler = rate_scalings[i];
+      }
+
+      /* compute relative capped per-rate scalers */
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = PLL_MIN(rate_scalings[i] - min_scaler,
+                                   PLL_SCALE_RATE_MAXDIFF);
+      }
+    }
+
     for (i = 0; i < rate_cats; ++i)
     {
-      ev    = eigenvecs[i];
+      ev = eigenvecs[i];
       invev = inv_eigenvecs[i];
       freqs = freqs_indices[i];
 
       for (j = 0; j < states; ++j)
       {
-        tipstate = tipmap[(unsigned int)left_tipchars[n]];
         lterm = 0;
         rterm = 0;
 
         for (k = 0; k < states; ++k)
         {
-          lterm += (tipstate & 1) * freqs[k] * invev[k*states+j];
+          lterm += clvp[k] * freqs[k] * invev[k*states+j];
           rterm += ev[j*states+k] * clvc[k];
-          tipstate >>= 1;
         }
+
         sum[j] = lterm*rterm;
+
+        if (rate_scalings && rate_scalings[i] > 0)
+          sum[j] *= scale_minlh[rate_scalings[i]-1];
       }
 
       clvc += states_padded;
+      clvp += states_padded;
       sum += states_padded;
     }
   }
+
+  if (rate_scalings)
+    free(rate_scalings);
+
   return PLL_SUCCESS;
 }
 
-PLL_EXPORT int pll_core_update_sumtable_ti_4x4_sse(unsigned int sites,
-                                                   unsigned int rate_cats,
-                                                   const double * parent_clv,
-                                                   const unsigned char * left_tipchars,
-                                                   double ** eigenvecs,
-                                                   double ** inv_eigenvecs,
-                                                   double ** freqs_indices,
-                                                   unsigned int * tipmap,
-                                                   double * sumtable)
+PLL_EXPORT int pll_core_update_sumtable_ti_sse(unsigned int states,
+                                               unsigned int sites,
+                                               unsigned int rate_cats,
+                                               const double * parent_clv,
+                                               const unsigned char * left_tipchars,
+                                               const unsigned int * parent_scaler,
+                                               double * const * eigenvecs,
+                                               double * const * inv_eigenvecs,
+                                               double * const * freqs_indices,
+                                               const unsigned int * tipmap,
+                                               double * sumtable,
+                                               unsigned int attrib)
 {
   unsigned int i,j,k,n;
   unsigned int tipstate;
-  unsigned int states = 4;
   double lterm = 0;
   double rterm = 0;
 
+  double * sum = sumtable;
   const double * clvc = parent_clv;
   const double * ev;
-  const double * invei;
+  const double * invev;
   const double * freqs;
 
-  double * sum = sumtable;
+  if (states == 4)
+  {
+    return core_update_sumtable_ti_4x4_sse(sites,
+                                           rate_cats,
+                                           parent_clv,
+                                           left_tipchars,
+                                           parent_scaler,
+                                           eigenvecs,
+                                           inv_eigenvecs,
+                                           freqs_indices,
+                                           tipmap,
+                                           sumtable,
+                                           attrib);
+  }
 
+  unsigned int states_padded = (states+1) & 0xFFFFFFFE;
 
-  /* build sumtable */
+  /* build sumtable: non-vectorized version, general case */
   for (n = 0; n < sites; n++)
   {
     for (i = 0; i < rate_cats; ++i)
     {
       ev    = eigenvecs[i];
-      invei = inv_eigenvecs[i];
+      invev = inv_eigenvecs[i];
       freqs = freqs_indices[i];
 
       for (j = 0; j < states; ++j)
       {
-        tipstate = (unsigned int)left_tipchars[n];
+        tipstate = tipmap[(unsigned int)left_tipchars[n]];
         lterm = 0;
         rterm = 0;
 
         for (k = 0; k < states; ++k)
         {
-          lterm += (tipstate & 1) * freqs[k] * invei[k*states+j];
+          lterm += (tipstate & 1) * freqs[k] * invev[k*states+j];
           rterm += ev[j*states+k] * clvc[k];
           tipstate >>= 1;
         }
         sum[j] = lterm*rterm;
       }
 
-      clvc += states;
-      sum += states;
+      clvc += states_padded;
+      sum += states_padded;
     }
   }
   return PLL_SUCCESS;
diff --git a/src/core_likelihood.c b/src/core_likelihood.c
index dba753b..392bdc0 100644
--- a/src/core_likelihood.c
+++ b/src/core_likelihood.c
@@ -19,6 +19,7 @@
     Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
 */
 
+#include <limits.h>
 #include "pll.h"
 
 PLL_EXPORT double pll_core_root_loglikelihood(unsigned int states,
@@ -26,7 +27,7 @@ PLL_EXPORT double pll_core_root_loglikelihood(unsigned int states,
                                               unsigned int rate_cats,
                                               const double * clv,
                                               const unsigned int * scaler,
-                                              double ** frequencies,
+                                              double * const * frequencies,
                                               const double * rate_weights,
                                               const unsigned int * pattern_weights,
                                               const double * invar_proportion,
@@ -35,7 +36,7 @@ PLL_EXPORT double pll_core_root_loglikelihood(unsigned int states,
                                               double * persite_lnl,
                                               unsigned int attrib)
 {
-  unsigned int i,j,k,m = 0;
+  unsigned int i,j,k;
   double logl = 0;
   const double * freqs = NULL;
 
@@ -46,8 +47,8 @@ PLL_EXPORT double pll_core_root_loglikelihood(unsigned int states,
 
   unsigned int states_padded = states;
 
-  #ifdef HAVE_SSE
-  if (attrib & PLL_ATTRIB_ARCH_SSE)
+  #ifdef HAVE_SSE3
+  if (attrib & PLL_ATTRIB_ARCH_SSE && PLL_STAT(sse3_present))
   {
     if (states == 4)
     {
@@ -84,7 +85,7 @@ PLL_EXPORT double pll_core_root_loglikelihood(unsigned int states,
   }
   #endif
   #ifdef HAVE_AVX
-  if (attrib & PLL_ATTRIB_ARCH_AVX)
+  if (attrib & PLL_ATTRIB_ARCH_AVX && PLL_STAT(avx_present))
   {
     if (states == 4)
     {
@@ -120,6 +121,43 @@ PLL_EXPORT double pll_core_root_loglikelihood(unsigned int states,
     states_padded = (states+3) & 0xFFFFFFFC;
   }
   #endif
+  #ifdef HAVE_AVX2
+  if (attrib & PLL_ATTRIB_ARCH_AVX2 && PLL_STAT(avx2_present))
+  {
+    if (states == 4)
+    {
+      return pll_core_root_loglikelihood_4x4_avx(sites,
+                                                 rate_cats,
+                                                 clv,
+                                                 scaler,
+                                                 frequencies,
+                                                 rate_weights,
+                                                 pattern_weights,
+                                                 invar_proportion,
+                                                 invar_indices,
+                                                 freqs_indices,
+                                                 persite_lnl);
+    }
+    else
+    {
+      return pll_core_root_loglikelihood_avx2(states,
+                                             sites,
+                                             rate_cats,
+                                             clv,
+                                             scaler,
+                                             frequencies,
+                                             rate_weights,
+                                             pattern_weights,
+                                             invar_proportion,
+                                             invar_indices,
+                                             freqs_indices,
+                                             persite_lnl);
+    }
+    /* this line is never called, but should we disable the else case above,
+       then states_padded must be set to this value */
+    states_padded = (states+3) & 0xFFFFFFFC;
+  }
+  #endif
 
 
   /* iterate through sites */
@@ -141,7 +179,7 @@ PLL_EXPORT double pll_core_root_loglikelihood(unsigned int states,
       {
         inv_site_lk = (invar_indices[i] == -1) ?
                            0 : freqs[invar_indices[i]];
-        term += rate_weights[j] * (term_r * (1 - prop_invar) + 
+        term += rate_weights[j] * (term_r * (1 - prop_invar) +
                                    inv_site_lk*prop_invar);
       }
       else
@@ -155,13 +193,15 @@ PLL_EXPORT double pll_core_root_loglikelihood(unsigned int states,
     site_lk = term;
 
     /* compute site log-likelihood and scale if necessary */
-    site_lk = log(site_lk) * pattern_weights[i];
+    site_lk = log(site_lk);
     if (scaler && scaler[i])
       site_lk += scaler[i] * log(PLL_SCALE_THRESHOLD);
 
+    site_lk *= pattern_weights[i];
+
     /* store per-site log-likelihood */
     if (persite_lnl)
-      persite_lnl[m++] = site_lk;
+      persite_lnl[i] = site_lk;
 
     logl += site_lk;
   }
@@ -175,7 +215,7 @@ double pll_core_edge_loglikelihood_ti_4x4(unsigned int sites,
                                           const unsigned int * parent_scaler,
                                           const unsigned char * tipchars,
                                           const double * pmatrix,
-                                          double ** frequencies,
+                                          double * const * frequencies,
                                           const double * rate_weights,
                                           const unsigned int * pattern_weights,
                                           const double * invar_proportion,
@@ -184,7 +224,7 @@ double pll_core_edge_loglikelihood_ti_4x4(unsigned int sites,
                                           double * persite_lnl,
                                           unsigned int attrib)
 {
-  unsigned int n,i,j,k,m = 0;
+  unsigned int n,i,j,k;
   double logl = 0;
 
   const double * clvp = parent_clv;
@@ -195,14 +235,13 @@ double pll_core_edge_loglikelihood_ti_4x4(unsigned int sites,
   double terma, terma_r, termb;
   double site_lk, inv_site_lk;
 
-  unsigned int scale_factors;
   unsigned int cstate;
 
   unsigned int states = 4;
   unsigned int states_padded = states;
 
-  #ifdef HAVE_SSE
-  if (attrib & PLL_ATTRIB_ARCH_SSE)
+  #ifdef HAVE_SSE3
+  if (attrib & PLL_ATTRIB_ARCH_SSE && PLL_STAT(sse3_present))
   {
     return pll_core_edge_loglikelihood_ti_4x4_sse(sites,
                                                   rate_cats,
@@ -216,11 +255,12 @@ double pll_core_edge_loglikelihood_ti_4x4(unsigned int sites,
                                                   invar_proportion,
                                                   invar_indices,
                                                   freqs_indices,
-                                                  persite_lnl);
+                                                  persite_lnl,
+                                                  attrib);
   }
   #endif
   #ifdef HAVE_AVX
-  if (attrib & PLL_ATTRIB_ARCH_AVX)
+  if (attrib & PLL_ATTRIB_ARCH_AVX && PLL_STAT(avx_present))
   {
     return pll_core_edge_loglikelihood_ti_4x4_avx(sites,
                                                   rate_cats,
@@ -234,14 +274,77 @@ double pll_core_edge_loglikelihood_ti_4x4(unsigned int sites,
                                                   invar_proportion,
                                                   invar_indices,
                                                   freqs_indices,
-                                                  persite_lnl);
+                                                  persite_lnl,
+                                                  attrib);
   }
   #endif
+  #ifdef HAVE_AVX2
+  if (attrib & PLL_ATTRIB_ARCH_AVX2 && PLL_STAT(avx2_present))
+  {
+    return pll_core_edge_loglikelihood_ti_4x4_avx(sites,
+                                                  rate_cats,
+                                                  parent_clv,
+                                                  parent_scaler,
+                                                  tipchars,
+                                                  pmatrix,
+                                                  frequencies,
+                                                  rate_weights,
+                                                  pattern_weights,
+                                                  invar_proportion,
+                                                  invar_indices,
+                                                  freqs_indices,
+                                                  persite_lnl,
+                                                  attrib);
+  }
+  #endif
+
+  unsigned int site_scalings;
+  unsigned int * rate_scalings = NULL;
+  int per_rate_scaling = (attrib & PLL_ATTRIB_RATE_SCALERS) ? 1 : 0;
+
+  /* powers of scale threshold for undoing the scaling */
+  double scale_minlh[PLL_SCALE_RATE_MAXDIFF];
+  if (per_rate_scaling)
+  {
+    rate_scalings = (unsigned int*) calloc(rate_cats, sizeof(unsigned int));
+
+    double scale_factor = 1.0;
+    for (i = 0; i < PLL_SCALE_RATE_MAXDIFF; ++i)
+    {
+      scale_factor *= PLL_SCALE_THRESHOLD;
+      scale_minlh[i] = scale_factor;
+    }
+  }
 
   for (n = 0; n < sites; ++n)
   {
     pmat = pmatrix;
     terma = 0;
+
+    if (per_rate_scaling)
+    {
+      /* compute minimum per-rate scaler -> common per-site scaler */
+      site_scalings = UINT_MAX;
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = (parent_scaler) ? parent_scaler[n*rate_cats+i] : 0;
+        if (rate_scalings[i] < site_scalings)
+          site_scalings = rate_scalings[i];
+      }
+
+      /* compute relative capped per-rate scalers */
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = PLL_MIN(rate_scalings[i] - site_scalings,
+                                   PLL_SCALE_RATE_MAXDIFF);
+      }
+    }
+    else
+    {
+      /* count number of scaling factors to account for */
+      site_scalings =  (parent_scaler) ? parent_scaler[n] : 0;
+    }
+
     for (i = 0; i < rate_cats; ++i)
     {
       freqs = frequencies[freqs_indices[i]];
@@ -261,6 +364,12 @@ double pll_core_edge_loglikelihood_ti_4x4(unsigned int sites,
         pmat += states_padded;
       }
 
+      /* apply per-rate scalers, if necessary */
+      if (rate_scalings && rate_scalings[i] > 0)
+      {
+        terma_r *= scale_minlh[rate_scalings[i]-1];
+      }
+
       /* account for invariant sites */
       if (prop_invar > 0)
       {
@@ -278,22 +387,25 @@ double pll_core_edge_loglikelihood_ti_4x4(unsigned int sites,
       clvp += states_padded;
     }
 
-    /* count number of scaling factors to acount for */
-    scale_factors = (parent_scaler) ? parent_scaler[n] : 0;
-
     /* compute site log-likelihood and scale if necessary */
-    site_lk = log(terma) * pattern_weights[n];
-    if (scale_factors)
-      site_lk += scale_factors * log(PLL_SCALE_THRESHOLD);
+    site_lk = log(terma);
+    if (site_scalings)
+      site_lk += site_scalings * log(PLL_SCALE_THRESHOLD);
+
+    site_lk *= pattern_weights[n];
 
     /* store per-site log-likelihood */
     if (persite_lnl)
-      persite_lnl[m++] = site_lk;
+      persite_lnl[n] = site_lk;
 
     logl += site_lk;
 
     tipchars++;
   }
+
+  if (rate_scalings)
+    free(rate_scalings);
+
   return logl;
 }
 
@@ -305,8 +417,9 @@ double pll_core_edge_loglikelihood_ti(unsigned int states,
                                       const unsigned int * parent_scaler,
                                       const unsigned char * tipchars,
                                       const unsigned int * tipmap,
+                                      unsigned int tipmap_size,
                                       const double * pmatrix,
-                                      double ** frequencies,
+                                      double * const * frequencies,
                                       const double * rate_weights,
                                       const unsigned int * pattern_weights,
                                       const double * invar_proportion,
@@ -315,7 +428,7 @@ double pll_core_edge_loglikelihood_ti(unsigned int states,
                                       double * persite_lnl,
                                       unsigned int attrib)
 {
-  unsigned int n,i,j,k,m = 0;
+  unsigned int n,i,j,k;
   double logl = 0;
 
   const double * clvp = parent_clv;
@@ -331,8 +444,8 @@ double pll_core_edge_loglikelihood_ti(unsigned int states,
 
   unsigned int states_padded = states;
 
-  #ifdef HAVE_SSE
-  if (attrib & PLL_ATTRIB_ARCH_SSE)
+  #ifdef HAVE_SSE3
+  if (attrib & PLL_ATTRIB_ARCH_SSE && PLL_STAT(sse3_present))
   {
     if (states == 4)
     {
@@ -348,7 +461,8 @@ double pll_core_edge_loglikelihood_ti(unsigned int states,
                                                     invar_proportion,
                                                     invar_indices,
                                                     freqs_indices,
-                                                    persite_lnl);
+                                                    persite_lnl,
+                                                    attrib);
     }
     else
     {
@@ -374,7 +488,68 @@ double pll_core_edge_loglikelihood_ti(unsigned int states,
   }
   #endif
   #ifdef HAVE_AVX
-  if (attrib & PLL_ATTRIB_ARCH_AVX)
+  if (attrib & PLL_ATTRIB_ARCH_AVX && PLL_STAT(avx_present))
+  {
+    if (states == 4)
+    {
+      return pll_core_edge_loglikelihood_ti_4x4_avx(sites,
+                                                    rate_cats,
+                                                    parent_clv,
+                                                    parent_scaler,
+                                                    tipchars,
+                                                    pmatrix,
+                                                    frequencies,
+                                                    rate_weights,
+                                                    pattern_weights,
+                                                    invar_proportion,
+                                                    invar_indices,
+                                                    freqs_indices,
+                                                    persite_lnl,
+                                                    attrib);
+    }
+    else if (states == 20)
+    {
+      return pll_core_edge_loglikelihood_ti_20x20_avx(sites,
+                                                      rate_cats,
+                                                      parent_clv,
+                                                      parent_scaler,
+                                                      tipchars,
+                                                      tipmap,
+                                                      tipmap_size,
+                                                      pmatrix,
+                                                      frequencies,
+                                                      rate_weights,
+                                                      pattern_weights,
+                                                      invar_proportion,
+                                                      invar_indices,
+                                                      freqs_indices,
+                                                      persite_lnl);
+    }
+    else
+    {
+      return pll_core_edge_loglikelihood_ti_avx(states,
+                                                sites,
+                                                rate_cats,
+                                                parent_clv,
+                                                parent_scaler,
+                                                tipchars,
+                                                tipmap,
+                                                pmatrix,
+                                                frequencies,
+                                                rate_weights,
+                                                pattern_weights,
+                                                invar_proportion,
+                                                invar_indices,
+                                                freqs_indices,
+                                                persite_lnl);
+    }
+    /* this line is never called, but should we disable the else case above,
+       then states_padded must be set to this value */
+    states_padded = (states+3) & 0xFFFFFFFC;
+  }
+  #endif
+  #ifdef HAVE_AVX2
+  if (attrib & PLL_ATTRIB_ARCH_AVX2 && PLL_STAT(avx2_present))
   {
     if (states == 4)
     {
@@ -390,7 +565,26 @@ double pll_core_edge_loglikelihood_ti(unsigned int states,
                                                     invar_proportion,
                                                     invar_indices,
                                                     freqs_indices,
-                                                    persite_lnl);
+                                                    persite_lnl,
+                                                    attrib);
+    }
+    else if (states == 20)
+    {
+      return pll_core_edge_loglikelihood_ti_20x20_avx2(sites,
+                                                      rate_cats,
+                                                      parent_clv,
+                                                      parent_scaler,
+                                                      tipchars,
+                                                      tipmap,
+                                                      tipmap_size,
+                                                      pmatrix,
+                                                      frequencies,
+                                                      rate_weights,
+                                                      pattern_weights,
+                                                      invar_proportion,
+                                                      invar_indices,
+                                                      freqs_indices,
+                                                      persite_lnl);
     }
     else
     {
@@ -459,13 +653,15 @@ double pll_core_edge_loglikelihood_ti(unsigned int states,
     scale_factors = (parent_scaler) ? parent_scaler[n] : 0;
 
     /* compute site log-likelihood and scale if necessary */
-    site_lk = log(terma) * pattern_weights[n];
+    site_lk = log(terma);
     if (scale_factors)
       site_lk += scale_factors * log(PLL_SCALE_THRESHOLD);
 
+    site_lk *= pattern_weights[n];
+
     /* store per-site log-likelihood */
     if (persite_lnl)
-      persite_lnl[m++] = site_lk;
+      persite_lnl[n] = site_lk;
 
     logl += site_lk;
 
@@ -483,7 +679,7 @@ double pll_core_edge_loglikelihood_ii(unsigned int states,
                                       const double * child_clv,
                                       const unsigned int * child_scaler,
                                       const double * pmatrix,
-                                      double ** frequencies,
+                                      double * const * frequencies,
                                       const double * rate_weights,
                                       const unsigned int * pattern_weights,
                                       const double * invar_proportion,
@@ -492,7 +688,7 @@ double pll_core_edge_loglikelihood_ii(unsigned int states,
                                       double * persite_lnl,
                                       unsigned int attrib)
 {
-  unsigned int n,i,j,k,m = 0;
+  unsigned int n,i,j,k;
   double logl = 0;
 
   const double * clvp = parent_clv;
@@ -504,14 +700,12 @@ double pll_core_edge_loglikelihood_ii(unsigned int states,
   double terma, terma_r, termb;
   double site_lk, inv_site_lk;
 
-  unsigned int scale_factors;
-
-  /* TODO: We need states_padded in the AVX/SSE implementations 
+  /* TODO: We need states_padded in the AVX/SSE implementations
   */
   unsigned int states_padded = states;
 
-  #ifdef HAVE_SSE
-  if (attrib & PLL_ATTRIB_ARCH_SSE)
+  #ifdef HAVE_SSE3
+  if (attrib & PLL_ATTRIB_ARCH_SSE && PLL_STAT(sse3_present))
   {
     if (states == 4)
     {
@@ -528,7 +722,8 @@ double pll_core_edge_loglikelihood_ii(unsigned int states,
                                                     invar_proportion,
                                                     invar_indices,
                                                     freqs_indices,
-                                                    persite_lnl);
+                                                    persite_lnl,
+                                                    attrib);
     }
     else
     {
@@ -554,7 +749,7 @@ double pll_core_edge_loglikelihood_ii(unsigned int states,
   }
   #endif
   #ifdef HAVE_AVX
-  if (attrib & PLL_ATTRIB_ARCH_AVX)
+  if (attrib & PLL_ATTRIB_ARCH_AVX && PLL_STAT(avx_present))
   {
     if (states == 4)
     {
@@ -571,7 +766,8 @@ double pll_core_edge_loglikelihood_ii(unsigned int states,
                                                     invar_proportion,
                                                     invar_indices,
                                                     freqs_indices,
-                                                    persite_lnl);
+                                                    persite_lnl,
+                                                    attrib);
     }
     else
     {
@@ -596,11 +792,100 @@ double pll_core_edge_loglikelihood_ii(unsigned int states,
     states_padded = (states+3) & 0xFFFFFFFC;
   }
   #endif
-  
+  #ifdef HAVE_AVX2
+  if (attrib & PLL_ATTRIB_ARCH_AVX2 && PLL_STAT(avx2_present))
+  {
+    if (states == 4)
+    {
+      return pll_core_edge_loglikelihood_ii_4x4_avx(sites,
+                                                    rate_cats,
+                                                    clvp,
+                                                    parent_scaler,
+                                                    clvc,
+                                                    child_scaler,
+                                                    pmatrix,
+                                                    frequencies,
+                                                    rate_weights,
+                                                    pattern_weights,
+                                                    invar_proportion,
+                                                    invar_indices,
+                                                    freqs_indices,
+                                                    persite_lnl,
+                                                    attrib);
+    }
+    else
+    {
+      return pll_core_edge_loglikelihood_ii_avx2(states,
+                                                sites,
+                                                rate_cats,
+                                                clvp,
+                                                parent_scaler,
+                                                clvc,
+                                                child_scaler,
+                                                pmatrix,
+                                                frequencies,
+                                                rate_weights,
+                                                pattern_weights,
+                                                invar_proportion,
+                                                invar_indices,
+                                                freqs_indices,
+                                                persite_lnl);
+    }
+    /* this line is never called, but should we disable the else case above,
+       then states_padded must be set to this value */
+    states_padded = (states+3) & 0xFFFFFFFC;
+  }
+  #endif
+
+  unsigned int site_scalings;
+  unsigned int * rate_scalings = NULL;
+  int per_rate_scaling = (attrib & PLL_ATTRIB_RATE_SCALERS) ? 1 : 0;
+
+  /* powers of scale threshold for undoing the scaling */
+  double scale_minlh[PLL_SCALE_RATE_MAXDIFF];
+  if (per_rate_scaling)
+  {
+    rate_scalings = (unsigned int*) calloc(rate_cats, sizeof(unsigned int));
+
+    double scale_factor = 1.0;
+    for (i = 0; i < PLL_SCALE_RATE_MAXDIFF; ++i)
+    {
+      scale_factor *= PLL_SCALE_THRESHOLD;
+      scale_minlh[i] = scale_factor;
+    }
+  }
+
   for (n = 0; n < sites; ++n)
   {
     pmat = pmatrix;
     terma = 0;
+
+    if (per_rate_scaling)
+    {
+      /* compute minimum per-rate scaler -> common per-site scaler */
+      site_scalings = UINT_MAX;
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = (parent_scaler) ? parent_scaler[n*rate_cats+i] : 0;
+        rate_scalings[i] += (child_scaler) ? child_scaler[n*rate_cats+i] : 0;
+        if (rate_scalings[i] < site_scalings)
+          site_scalings = rate_scalings[i];
+      }
+
+      /* compute relative capped per-rate scalers */
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = PLL_MIN(rate_scalings[i] - site_scalings,
+                                   PLL_SCALE_RATE_MAXDIFF);
+      }
+    }
+    else
+    {
+      /* count number of scaling factors to account for */
+      site_scalings =  (parent_scaler) ? parent_scaler[n] : 0;
+      site_scalings += (child_scaler) ? child_scaler[n] : 0;
+    }
+
     for (i = 0; i < rate_cats; ++i)
     {
       freqs = frequencies[freqs_indices[i]];
@@ -612,10 +897,17 @@ double pll_core_edge_loglikelihood_ii(unsigned int states,
         {
           termb += pmat[k] * clvc[k];
         }
+
         terma_r += clvp[j] * freqs[j] * termb;
         pmat += states_padded;
       }
 
+      /* apply per-rate scalers, if necessary */
+      if (rate_scalings && rate_scalings[i] > 0)
+      {
+        terma_r *= scale_minlh[rate_scalings[i]-1];
+      }
+
       /* account for invariant sites */
       prop_invar = invar_proportion ? invar_proportion[freqs_indices[i]] : 0;
       if (prop_invar > 0)
@@ -634,20 +926,22 @@ double pll_core_edge_loglikelihood_ii(unsigned int states,
       clvc += states_padded;
     }
 
-    /* count number of scaling factors to acount for */
-    scale_factors = (parent_scaler) ? parent_scaler[n] : 0;
-    scale_factors += (child_scaler) ? child_scaler[n] : 0;
-
     /* compute site log-likelihood and scale if necessary */
-    site_lk = log(terma) * pattern_weights[n];
-    if (scale_factors)
-      site_lk += scale_factors * log(PLL_SCALE_THRESHOLD);
+    site_lk = log(terma);
+    if (site_scalings)
+      site_lk += site_scalings * log(PLL_SCALE_THRESHOLD);
+
+    site_lk *= pattern_weights[n];
 
     /* store per-site log-likelihood */
     if (persite_lnl)
-      persite_lnl[m++] = site_lk;
+      persite_lnl[n] = site_lk;
 
     logl += site_lk;
   }
+
+  if (rate_scalings)
+    free(rate_scalings);
+
   return logl;
 }
diff --git a/src/core_likelihood_avx.c b/src/core_likelihood_avx.c
index b87c9aa..26ded2d 100644
--- a/src/core_likelihood_avx.c
+++ b/src/core_likelihood_avx.c
@@ -19,6 +19,7 @@
     Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
 */
 
+#include <limits.h>
 #include "pll.h"
 
 PLL_EXPORT double pll_core_root_loglikelihood_avx(unsigned int states,
@@ -26,7 +27,7 @@ PLL_EXPORT double pll_core_root_loglikelihood_avx(unsigned int states,
                                                   unsigned int rate_cats,
                                                   const double * clv,
                                                   const unsigned int * scaler,
-                                                  double ** frequencies,
+                                                  double * const * frequencies,
                                                   const double * rate_weights,
                                                   const unsigned int * pattern_weights,
                                                   const double * invar_proportion,
@@ -34,7 +35,7 @@ PLL_EXPORT double pll_core_root_loglikelihood_avx(unsigned int states,
                                                   const unsigned int * freqs_indices,
                                                   double * persite_lnl)
 {
-  unsigned int i,j,k,m = 0;
+  unsigned int i,j,k;
   double logl = 0;
   double prop_invar = 0;
 
@@ -84,7 +85,7 @@ PLL_EXPORT double pll_core_root_loglikelihood_avx(unsigned int states,
         freqs = frequencies[freqs_indices[j]];
         inv_site_lk = (invar_indices[i] == -1) ?
                            0 : freqs[invar_indices[i]];
-        term += rate_weights[j] * (term_r * (1 - prop_invar) + 
+        term += rate_weights[j] * (term_r * (1 - prop_invar) +
                                    inv_site_lk*prop_invar);
       }
       else
@@ -94,13 +95,15 @@ PLL_EXPORT double pll_core_root_loglikelihood_avx(unsigned int states,
     }
 
     /* compute site log-likelihood and scale if necessary */
-    term = log(term) * pattern_weights[i];
+    term = log(term);
     if (scaler && scaler[i])
       term += scaler[i] * log(PLL_SCALE_THRESHOLD);
 
+    term *= pattern_weights[i];
+
     /* store per-site log-likelihood */
     if (persite_lnl)
-      persite_lnl[m++] = term;
+      persite_lnl[i] = term;
 
     logl += term;
   }
@@ -112,7 +115,7 @@ double pll_core_root_loglikelihood_4x4_avx(unsigned int sites,
                                            unsigned int rate_cats,
                                            const double * clv,
                                            const unsigned int * scaler,
-                                           double ** frequencies,
+                                           double * const * frequencies,
                                            const double * rate_weights,
                                            const unsigned int * pattern_weights,
                                            const double * invar_proportion,
@@ -120,7 +123,7 @@ double pll_core_root_loglikelihood_4x4_avx(unsigned int sites,
                                            const unsigned int * freqs_indices,
                                            double * persite_lnl)
 {
-  unsigned int i,j,m = 0;
+  unsigned int i,j;
   double logl = 0;
   double prop_invar = 0;
 
@@ -158,7 +161,7 @@ double pll_core_root_loglikelihood_4x4_avx(unsigned int sites,
       {
         inv_site_lk = (invar_indices[i] == -1) ?
                            0 : freqs[invar_indices[i]];
-        term += rate_weights[j] * (term_r * (1 - prop_invar) + 
+        term += rate_weights[j] * (term_r * (1 - prop_invar) +
                                    inv_site_lk*prop_invar);
       }
       else
@@ -170,13 +173,15 @@ double pll_core_root_loglikelihood_4x4_avx(unsigned int sites,
     }
 
     /* compute site log-likelihood and scale if necessary */
-    term = log(term) * pattern_weights[i];
+    term = log(term);
     if (scaler && scaler[i])
       term += scaler[i] * log(PLL_SCALE_THRESHOLD);
 
+    term *= pattern_weights[i];
+
     /* store per-site log-likelihood */
     if (persite_lnl)
-      persite_lnl[m++] = term;
+      persite_lnl[i] = term;
 
     logl += term;
   }
@@ -190,15 +195,16 @@ double pll_core_edge_loglikelihood_ti_4x4_avx(unsigned int sites,
                                               const unsigned int * parent_scaler,
                                               const unsigned char * tipchars,
                                               const double * pmatrix,
-                                              double ** frequencies,
+                                              double * const * frequencies,
                                               const double * rate_weights,
                                               const unsigned int * pattern_weights,
                                               const double * invar_proportion,
                                               const int * invar_indices,
                                               const unsigned int * freqs_indices,
-                                              double * persite_lnl)
+                                              double * persite_lnl,
+                                              unsigned int attrib)
 {
-  unsigned int n,i,m = 0;
+  unsigned int n,i;
   double logl = 0;
   double prop_invar = 0;
 
@@ -209,7 +215,6 @@ double pll_core_edge_loglikelihood_ti_4x4_avx(unsigned int sites,
   double terma, terma_r;
   double site_lk, inv_site_lk;
 
-  unsigned int scale_factors;
   unsigned int cstate;
   unsigned int states_padded = 4;
   unsigned int span = rate_cats*states_padded;
@@ -217,6 +222,24 @@ double pll_core_edge_loglikelihood_ti_4x4_avx(unsigned int sites,
   __m256d xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7;
   __m256i mask;
 
+  unsigned int site_scalings;
+  unsigned int * rate_scalings = NULL;
+  int per_rate_scaling = parent_scaler && (attrib & PLL_ATTRIB_RATE_SCALERS) ? 1 : 0;
+
+  /* powers of scale threshold for undoing the scaling */
+  double scale_minlh[PLL_SCALE_RATE_MAXDIFF];
+  if (per_rate_scaling)
+  {
+    rate_scalings = (unsigned int*) calloc(rate_cats, sizeof(unsigned int));
+
+    double scale_factor = 1.0;
+    for (i = 0; i < PLL_SCALE_RATE_MAXDIFF; ++i)
+    {
+      scale_factor *= PLL_SCALE_THRESHOLD;
+      scale_minlh[i] = scale_factor;
+    }
+  }
+
   /* precompute a lookup table of four values per entry (one for each state),
      for all 16 states (including ambiguities) and for each rate category. */
   double * lookup = pll_aligned_alloc(64*rate_cats*sizeof(double),
@@ -294,6 +317,31 @@ double pll_core_edge_loglikelihood_ti_4x4_avx(unsigned int sites,
 
     unsigned int coffset = cstate*span;
 
+    if (per_rate_scaling)
+    {
+      const unsigned int * pscaler = parent_scaler + n*rate_cats;
+
+      /* compute minimum per-rate scaler -> common per-site scaler */
+      site_scalings = UINT_MAX;
+      for (i = 0; i < rate_cats; ++i)
+      {
+        if (pscaler[i] < site_scalings)
+          site_scalings = pscaler[i];
+      }
+
+      /* compute relative capped per-rate scalers */
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = PLL_MIN(pscaler[i] - site_scalings,
+                                   PLL_SCALE_RATE_MAXDIFF);
+      }
+    }
+    else
+    {
+      /* count number of scaling factors to account for */
+      site_scalings = (parent_scaler) ? parent_scaler[n] : 0;
+    }
+
     for (i = 0; i < rate_cats; ++i)
     {
       /* load precomputed lookup table into xmm3 */
@@ -307,10 +355,190 @@ double pll_core_edge_loglikelihood_ti_4x4_avx(unsigned int sites,
       xmm1 = _mm256_hadd_pd(xmm0,xmm0);
       terma_r = ((double *)&xmm1)[0] + ((double *)&xmm1)[2];
 
+      /* apply per-rate scalers, if necessary */
+      if (rate_scalings && rate_scalings[i] > 0)
+      {
+        terma_r *= scale_minlh[rate_scalings[i]-1];
+      }
+
+      if (terma_r > 0.)
+      {
+        /* account for invariant sites */
+        prop_invar = invar_proportion ? invar_proportion[freqs_indices[i]] : 0;
+        if (prop_invar > 0)
+        {
+          inv_site_lk = (invar_indices[n] == -1) ?
+                            0 : freqs[invar_indices[n]];
+          terma += rate_weights[i] * (terma_r * (1 - prop_invar) +
+                   inv_site_lk * prop_invar);
+        }
+        else
+        {
+          terma += terma_r * rate_weights[i];
+        }
+      }
+
+      clvp += states_padded;
+      coffset += 4;
+    }
+
+    /* compute site log-likelihood and scale if necessary */
+    site_lk = log(terma);
+
+    /* apply per-site scaler, if necessary */
+    if (site_scalings)
+      site_lk += site_scalings * log(PLL_SCALE_THRESHOLD);
+
+    site_lk *= pattern_weights[n];
+
+    /* store per-site log-likelihood */
+    if (persite_lnl)
+      persite_lnl[n] = site_lk;
+
+    logl += site_lk;
+  }
+
+  pll_aligned_free(lookup);
+  if (rate_scalings)
+    free(rate_scalings);
+
+  return logl;
+}
+
+PLL_EXPORT
+double pll_core_edge_loglikelihood_ti_20x20_avx(unsigned int sites,
+                                                unsigned int rate_cats,
+                                                const double * parent_clv,
+                                                const unsigned int * parent_scaler,
+                                                const unsigned char * tipchars,
+                                                const unsigned int * tipmap,
+                                                unsigned int tipmap_size,
+                                                const double * pmatrix,
+                                                double * const * frequencies,
+                                                const double * rate_weights,
+                                                const unsigned int * pattern_weights,
+                                                const double * invar_proportion,
+                                                const int * invar_indices,
+                                                const unsigned int * freqs_indices,
+                                                double * persite_lnl)
+{
+  unsigned int n,i,j,m;
+  double logl = 0;
+  double prop_invar = 0;
+
+  const double * clvp = parent_clv;
+  const double * pmat;
+  const double * freqs = NULL;
+
+  double terma, terma_r;
+  double site_lk, inv_site_lk;
+
+  unsigned int cstate;
+  unsigned int scale_factors;
+  unsigned int states = 20;
+  unsigned int states_padded = states;
+
+  __m256d xmm0, xmm1, xmm2;
+
+  size_t displacement = (states_padded - states) * (states_padded);
+
+  unsigned int span = states_padded * rate_cats;
+  unsigned int maxstates = tipmap_size;
+
+  /* precompute a lookup table of four values per entry (one for each state),
+     for all 16 states (including ambiguities) and for each rate category. */
+  double * lookup = pll_aligned_alloc(maxstates*span*sizeof(double),
+                                      PLL_ALIGNMENT_AVX);
+  if (!lookup)
+  {
+    /* TODO: in the highly unlikely event that allocation fails, we should
+       resort to a non-lookup-precomputation version of this function,
+       available at commit e.g.  a4fc873fdc65741e402cdc1c59919375143d97d1 */
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf(pll_errmsg, 200, "Cannot allocate space for precomputation.");
+    return 0.;
+  }
+
+  double * ptr = lookup;
+
+  /* precompute left-side values and store them in lookup table */
+  for (j = 0; j < maxstates; ++j)
+  {
+    pmat = pmatrix;
+
+    unsigned int state = tipmap[j];
+
+    int ss = __builtin_popcount(state) == 1 ? __builtin_ctz(state) : -1;
+
+    for (n = 0; n < rate_cats; ++n)
+    {
+      freqs = frequencies[freqs_indices[n]];
+
+      for (i = 0; i < states; ++i)
+      {
+        double terml;
+        if (ss != -1)
+        {
+          /* special case for non-ambiguous states */
+          terml = pmat[ss];
+        }
+        else
+        {
+          terml = 0;
+          for (m = 0; m < states; ++m)
+          {
+            if ((state>>m) & 1)
+            {
+              terml += pmat[m];
+            }
+          }
+        }
+
+        pmat += states;
+
+        ptr[i] = terml * freqs[i];
+      }
+
+      ptr += states;
+    }
+  }
+
+  for (n = 0; n < sites; ++n)
+  {
+    terma = 0;
+
+    cstate = (unsigned int) tipchars[n];
+    unsigned int loffset = cstate*span;
+
+    for (i = 0; i < rate_cats; ++i)
+    {
+      xmm1 = _mm256_setzero_pd();
+
+      /* iterate over quadruples of rows */
+      for (j = 0; j < states_padded; j += 4)
+      {
+        /* load value from lookup table */
+        xmm2 = _mm256_load_pd(lookup+loffset);
+
+        /* multiply with clvp */
+        xmm0 = _mm256_load_pd(clvp);
+        xmm0 = _mm256_mul_pd(xmm2,xmm0);
+
+        /* add up the elements of xmm1 to the accumulator */
+        xmm1 = _mm256_add_pd(xmm1,xmm0);
+
+        clvp += 4;
+        loffset += 4;
+      }
+
+      xmm0 = _mm256_hadd_pd(xmm1,xmm1);
+      terma_r = ((double *)&xmm0)[0] + ((double *)&xmm0)[2];
+
       /* account for invariant sites */
       prop_invar = invar_proportion ? invar_proportion[freqs_indices[i]] : 0;
       if (prop_invar > 0)
       {
+        freqs = frequencies[freqs_indices[i]];
         inv_site_lk = (invar_indices[n] == -1) ?
                           0 : freqs[invar_indices[n]];
         terma += rate_weights[i] * (terma_r * (1 - prop_invar) +
@@ -321,25 +549,27 @@ double pll_core_edge_loglikelihood_ti_4x4_avx(unsigned int sites,
         terma += terma_r * rate_weights[i];
       }
 
-      clvp += states_padded;
-      coffset += 4;
+      pmat -= displacement;
     }
-
     /* count number of scaling factors to acount for */
     scale_factors = (parent_scaler) ? parent_scaler[n] : 0;
 
     /* compute site log-likelihood and scale if necessary */
-    site_lk = log(terma) * pattern_weights[n];
+    site_lk = log(terma);
     if (scale_factors)
       site_lk += scale_factors * log(PLL_SCALE_THRESHOLD);
 
+    site_lk *= pattern_weights[n];
+
     /* store per-site log-likelihood */
     if (persite_lnl)
-      persite_lnl[m++] = site_lk;
+      persite_lnl[n] = site_lk;
 
     logl += site_lk;
   }
+
   pll_aligned_free(lookup);
+
   return logl;
 }
 
@@ -352,7 +582,7 @@ double pll_core_edge_loglikelihood_ti_avx(unsigned int states,
                                           const unsigned char * tipchars,
                                           const unsigned int * tipmap,
                                           const double * pmatrix,
-                                          double ** frequencies,
+                                          double * const * frequencies,
                                           const double * rate_weights,
                                           const unsigned int * pattern_weights,
                                           const double * invar_proportion,
@@ -360,7 +590,7 @@ double pll_core_edge_loglikelihood_ti_avx(unsigned int states,
                                           const unsigned int * freqs_indices,
                                           double * persite_lnl)
 {
-  unsigned int n,i,j,k,m = 0;
+  unsigned int n,i,j,k;
   double logl = 0;
   double prop_invar = 0;
 
@@ -412,7 +642,7 @@ double pll_core_edge_loglikelihood_ti_avx(unsigned int states,
         /* iterate quadruples of columns */
         for (k = 0; k < states_padded; k += 4)
         {
-          
+
           /* set mask */
           mask = _mm256_set_epi64x(
                     ((cstate >> (lsb+3)) & 1) ? ~0 : 0,
@@ -443,7 +673,7 @@ double pll_core_edge_loglikelihood_ti_avx(unsigned int states,
           row3 += 4;
         }
 
-        /* point pmatrix to the next four rows */ 
+        /* point pmatrix to the next four rows */
         pmat = row3;
 
         /* create a vector containing the sums of xmm0, xmm1, xmm2, xmm3 */
@@ -497,13 +727,15 @@ double pll_core_edge_loglikelihood_ti_avx(unsigned int states,
     scale_factors = (parent_scaler) ? parent_scaler[n] : 0;
 
     /* compute site log-likelihood and scale if necessary */
-    site_lk = log(terma) * pattern_weights[n];
+    site_lk = log(terma);
     if (scale_factors)
       site_lk += scale_factors * log(PLL_SCALE_THRESHOLD);
 
+    site_lk *= pattern_weights[n];
+
     /* store per-site log-likelihood */
     if (persite_lnl)
-      persite_lnl[m++] = site_lk;
+      persite_lnl[n] = site_lk;
 
     logl += site_lk;
   }
@@ -519,7 +751,7 @@ double pll_core_edge_loglikelihood_ii_avx(unsigned int states,
                                           const double * child_clv,
                                           const unsigned int * child_scaler,
                                           const double * pmatrix,
-                                          double ** frequencies,
+                                          double * const * frequencies,
                                           const double * rate_weights,
                                           const unsigned int * pattern_weights,
                                           const double * invar_proportion,
@@ -527,7 +759,7 @@ double pll_core_edge_loglikelihood_ii_avx(unsigned int states,
                                           const unsigned int * freqs_indices,
                                           double * persite_lnl)
 {
-  unsigned int n,i,j,k,m = 0;
+  unsigned int n,i,j,k;
   double logl = 0;
   double prop_invar = 0;
 
@@ -554,7 +786,7 @@ double pll_core_edge_loglikelihood_ii_avx(unsigned int states,
     {
       freqs = frequencies[freqs_indices[i]];
       terma_r = 0;
-      
+
       /* iterate over quadruples of rows */
       for (j = 0; j < states_padded; j += 4)
       {
@@ -568,7 +800,7 @@ double pll_core_edge_loglikelihood_ii_avx(unsigned int states,
         const double * row1 = row0 + states_padded;
         const double * row2 = row1 + states_padded;
         const double * row3 = row2 + states_padded;
-        
+
         /* iterate quadruples of columns */
         for (k = 0; k < states_padded; k += 4)
         {
@@ -585,7 +817,7 @@ double pll_core_edge_loglikelihood_ii_avx(unsigned int states,
           xmm6 = _mm256_mul_pd(xmm4,xmm5);
           xmm1 = _mm256_add_pd(xmm1,xmm6);
           row1 += 4;
-          
+
           /* row 2 */
           xmm4 = _mm256_load_pd(row2);
           xmm6 = _mm256_mul_pd(xmm4,xmm5);
@@ -599,7 +831,7 @@ double pll_core_edge_loglikelihood_ii_avx(unsigned int states,
           row3 += 4;
         }
 
-        /* point pmatrix to the next four rows */ 
+        /* point pmatrix to the next four rows */
         pmat = row3;
 
         /* create a vector containing the sums of xmm0, xmm1, xmm2, xmm3 */
@@ -655,13 +887,15 @@ double pll_core_edge_loglikelihood_ii_avx(unsigned int states,
     scale_factors += (child_scaler) ? child_scaler[n] : 0;
 
     /* compute site log-likelihood and scale if necessary */
-    site_lk = log(terma) * pattern_weights[n];
+    site_lk = log(terma);
     if (scale_factors)
       site_lk += scale_factors * log(PLL_SCALE_THRESHOLD);
 
+    site_lk *= pattern_weights[n];
+
     /* store per-site log-likelihood */
     if (persite_lnl)
-      persite_lnl[m++] = site_lk;
+      persite_lnl[n] = site_lk;
 
     logl += site_lk;
   }
@@ -676,15 +910,16 @@ double pll_core_edge_loglikelihood_ii_4x4_avx(unsigned int sites,
                                               const double * child_clv,
                                               const unsigned int * child_scaler,
                                               const double * pmatrix,
-                                              double ** frequencies,
+                                              double * const * frequencies,
                                               const double * rate_weights,
                                               const unsigned int * pattern_weights,
                                               const double * invar_proportion,
                                               const int * invar_indices,
                                               const unsigned int * freqs_indices,
-                                              double * persite_lnl)
+                                              double * persite_lnl,
+                                              unsigned int attrib)
 {
-  unsigned int n,i,m = 0;
+  unsigned int n,i;
   double logl = 0;
   double prop_invar = 0;
 
@@ -696,16 +931,60 @@ double pll_core_edge_loglikelihood_ii_4x4_avx(unsigned int sites,
   double terma, terma_r;
   double site_lk, inv_site_lk;
 
-  unsigned int scale_factors;
   unsigned int states = 4;
   unsigned int states_padded = 4;
 
   __m256d xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6;
-  
+
+  unsigned int site_scalings;
+  unsigned int * rate_scalings = NULL;
+  int per_rate_scaling = (attrib & PLL_ATTRIB_RATE_SCALERS) ? 1 : 0;
+
+  /* powers of scale threshold for undoing the scaling */
+  double scale_minlh[PLL_SCALE_RATE_MAXDIFF];
+  if (per_rate_scaling)
+  {
+    rate_scalings = (unsigned int*) calloc(rate_cats, sizeof(unsigned int));
+
+    double scale_factor = 1.0;
+    for (i = 0; i < PLL_SCALE_RATE_MAXDIFF; ++i)
+    {
+      scale_factor *= PLL_SCALE_THRESHOLD;
+      scale_minlh[i] = scale_factor;
+    }
+  }
+
   for (n = 0; n < sites; ++n)
   {
     pmat = pmatrix;
     terma = 0;
+
+    if (per_rate_scaling)
+    {
+      /* compute minimum per-rate scaler -> common per-site scaler */
+      site_scalings = UINT_MAX;
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = (parent_scaler) ? parent_scaler[n*rate_cats+i] : 0;
+        rate_scalings[i] += (child_scaler) ? child_scaler[n*rate_cats+i] : 0;
+        if (rate_scalings[i] < site_scalings)
+          site_scalings = rate_scalings[i];
+      }
+
+      /* compute relative capped per-rate scalers */
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = PLL_MIN(rate_scalings[i] - site_scalings,
+                                   PLL_SCALE_RATE_MAXDIFF);
+      }
+    }
+    else
+    {
+      /* count number of scaling factors to account for */
+      site_scalings =  (parent_scaler) ? parent_scaler[n] : 0;
+      site_scalings += (child_scaler) ? child_scaler[n] : 0;
+    }
+
     for (i = 0; i < rate_cats; ++i)
     {
       freqs = frequencies[freqs_indices[i]];
@@ -763,39 +1042,51 @@ double pll_core_edge_loglikelihood_ii_4x4_avx(unsigned int sites,
       xmm1 = _mm256_hadd_pd(xmm0,xmm0);
       terma_r = ((double *)&xmm1)[0] + ((double *)&xmm1)[2];
 
-
-      /* account for invariant sites */
-      prop_invar = invar_proportion ? invar_proportion[freqs_indices[i]] : 0;
-      if (prop_invar > 0)
+      /* apply per-rate scalers, if necessary */
+      if (rate_scalings && rate_scalings[i] > 0)
       {
-        inv_site_lk = (invar_indices[n] == -1) ?
-                          0 : freqs[invar_indices[n]];
-        terma += rate_weights[i] * (terma_r * (1 - prop_invar) +
-                 inv_site_lk * prop_invar);
+        terma_r *= scale_minlh[rate_scalings[i]-1];
       }
-      else
+
+      if (terma_r > 0.)
       {
-        terma += terma_r * rate_weights[i];
+        /* account for invariant sites */
+        prop_invar = invar_proportion ? invar_proportion[freqs_indices[i]] : 0;
+        if (prop_invar > 0)
+        {
+          inv_site_lk = (invar_indices[n] == -1) ?
+                            0 : freqs[invar_indices[n]];
+          terma += rate_weights[i] * (terma_r * (1 - prop_invar) +
+                   inv_site_lk * prop_invar);
+        }
+        else
+        {
+          terma += terma_r * rate_weights[i];
+        }
       }
 
       clvp += states_padded;
       clvc += states_padded;
     }
 
-    /* count number of scaling factors to acount for */
-    scale_factors = (parent_scaler) ? parent_scaler[n] : 0;
-    scale_factors += (child_scaler) ? child_scaler[n] : 0;
+    /* compute site log-likelihood */
+    site_lk = log(terma);
 
-    /* compute site log-likelihood and scale if necessary */
-    site_lk = log(terma) * pattern_weights[n];
-    if (scale_factors)
-      site_lk += scale_factors * log(PLL_SCALE_THRESHOLD);
+    /* apply per-site scaler, if necessary */
+    if (site_scalings)
+      site_lk += site_scalings * log(PLL_SCALE_THRESHOLD);
+
+    site_lk *= pattern_weights[n];
 
     /* store per-site log-likelihood */
     if (persite_lnl)
-      persite_lnl[m++] = site_lk;
+      persite_lnl[n] = site_lk;
 
     logl += site_lk;
   }
+
+  if (rate_scalings)
+    free(rate_scalings);
+
   return logl;
 }
diff --git a/src/core_likelihood_avx2.c b/src/core_likelihood_avx2.c
new file mode 100644
index 0000000..b730a35
--- /dev/null
+++ b/src/core_likelihood_avx2.c
@@ -0,0 +1,430 @@
+/*
+    Copyright (C) 2015 Tomas Flouri
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Contact: Tomas Flouri <Tomas.Flouri at h-its.org>,
+    Exelixis Lab, Heidelberg Instutute for Theoretical Studies
+    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
+*/
+
+#include "pll.h"
+
+PLL_EXPORT double pll_core_root_loglikelihood_avx2(unsigned int states,
+                                                   unsigned int sites,
+                                                   unsigned int rate_cats,
+                                                   const double * clv,
+                                                   const unsigned int * scaler,
+                                                   double * const * frequencies,
+                                                   const double * rate_weights,
+                                                   const unsigned int * pattern_weights,
+                                                   const double * invar_proportion,
+                                                   const int * invar_indices,
+                                                   const unsigned int * freqs_indices,
+                                                   double * persite_lnl)
+{
+  unsigned int i,j,k;
+  double logl = 0;
+  double prop_invar = 0;
+
+  const double * freqs = NULL;
+
+  double term, term_r;
+  double inv_site_lk;
+
+  unsigned int states_padded = (states+3) & 0xFFFFFFFC;
+
+  __m256d xmm0, xmm1, xmm3;
+
+  for (i = 0; i < sites; ++i)
+  {
+    term = 0;
+    for (j = 0; j < rate_cats; ++j)
+    {
+      freqs = frequencies[freqs_indices[j]];
+      xmm3 = _mm256_setzero_pd();
+
+      for (k = 0; k < states_padded; k += 4)
+      {
+        /* load frequencies for current rate matrix */
+        xmm0 = _mm256_load_pd(freqs);
+
+        /* load clv */
+        xmm1 = _mm256_load_pd(clv);
+
+        /* multiply with frequencies */
+        xmm3 = _mm256_fmadd_pd(xmm0, xmm1, xmm3);
+
+        freqs += 4;
+        clv += 4;
+      }
+
+      /* add up the elements of xmm2 */
+      xmm1 = _mm256_hadd_pd(xmm3,xmm3);
+
+      term_r = ((double *)&xmm1)[0] + ((double *)&xmm1)[2];
+
+      /* account for invariant sites */
+      prop_invar = invar_proportion ? invar_proportion[freqs_indices[j]] : 0;
+      if (prop_invar > 0)
+      {
+        freqs = frequencies[freqs_indices[j]];
+        inv_site_lk = (invar_indices[i] == -1) ?
+                           0 : freqs[invar_indices[i]];
+        term += rate_weights[j] * (term_r * (1 - prop_invar) +
+                                   inv_site_lk*prop_invar);
+      }
+      else
+      {
+        term += term_r * rate_weights[j];
+      }
+    }
+
+    /* compute site log-likelihood and scale if necessary */
+    term = log(term);
+    if (scaler && scaler[i])
+      term += scaler[i] * log(PLL_SCALE_THRESHOLD);
+
+    term *= pattern_weights[i];
+
+    /* store per-site log-likelihood */
+    if (persite_lnl)
+      persite_lnl[i] = term;
+
+    logl += term;
+  }
+  return logl;
+}
+
+PLL_EXPORT
+double pll_core_edge_loglikelihood_ti_20x20_avx2(unsigned int sites,
+                                                 unsigned int rate_cats,
+                                                 const double * parent_clv,
+                                                 const unsigned int * parent_scaler,
+                                                 const unsigned char * tipchars,
+                                                 const unsigned int * tipmap,
+                                                 unsigned int tipmap_size,
+                                                 const double * pmatrix,
+                                                 double * const * frequencies,
+                                                 const double * rate_weights,
+                                                 const unsigned int * pattern_weights,
+                                                 const double * invar_proportion,
+                                                 const int * invar_indices,
+                                                 const unsigned int * freqs_indices,
+                                                 double * persite_lnl)
+{
+  unsigned int n,i,j,m = 0;
+  double logl = 0;
+  double prop_invar = 0;
+
+  const double * clvp = parent_clv;
+  const double * pmat;
+  const double * freqs = NULL;
+
+  double terma, terma_r;
+  double site_lk, inv_site_lk;
+
+  unsigned int cstate;
+  unsigned int scale_factors;
+  unsigned int states = 20;
+  unsigned int states_padded = states;
+
+  __m256d xmm0, xmm1, xmm2;
+
+  size_t displacement = (states_padded - states) * (states_padded);
+
+  unsigned int span = states_padded * rate_cats;
+  unsigned int maxstates = tipmap_size;
+
+  /* precompute a lookup table of four values per entry (one for each state),
+     for all 16 states (including ambiguities) and for each rate category. */
+  double * lookup = pll_aligned_alloc(maxstates*span*sizeof(double),
+                                      PLL_ALIGNMENT_AVX);
+  if (!lookup)
+  {
+    /* TODO: in the highly unlikely event that allocation fails, we should
+       resort to a non-lookup-precomputation version of this function,
+       available at commit e.g.  a4fc873fdc65741e402cdc1c59919375143d97d1 */
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf(pll_errmsg, 200, "Cannot allocate space for precomputation.");
+    return 0.;
+  }
+
+  double * ptr = lookup;
+
+  /* precompute left-side values and store them in lookup table */
+  for (j = 0; j < maxstates; ++j)
+  {
+    pmat = pmatrix;
+
+    unsigned int state = tipmap[j];
+
+    int ss = __builtin_popcount(state) == 1 ? __builtin_ctz(state) : -1;
+
+    for (n = 0; n < rate_cats; ++n)
+    {
+      freqs = frequencies[freqs_indices[n]];
+
+      for (i = 0; i < states; ++i)
+      {
+        double terml;
+        if (ss != -1)
+        {
+          /* special case for non-ambiguous states */
+          terml = pmat[ss];
+        }
+        else
+        {
+          terml = 0;
+          for (m = 0; m < states; ++m)
+          {
+            if ((state>>m) & 1)
+            {
+              terml += pmat[m];
+            }
+          }
+        }
+
+        pmat += states;
+
+        ptr[i] = terml * freqs[i];
+      }
+
+      ptr += states;
+    }
+  }
+
+  for (n = 0; n < sites; ++n)
+  {
+    terma = 0;
+
+    cstate = (unsigned int) tipchars[n];
+    unsigned int loffset = cstate*span;
+
+    for (i = 0; i < rate_cats; ++i)
+    {
+      xmm1 = _mm256_setzero_pd();
+
+      /* iterate over quadruples of rows */
+      for (j = 0; j < states_padded; j += 4)
+      {
+        /* load value from lookup table */
+        xmm2 = _mm256_load_pd(lookup+loffset);
+
+        /* multiply with clvp */
+        xmm0 = _mm256_load_pd(clvp);
+        xmm1 =  _mm256_fmadd_pd(xmm2, xmm0, xmm1);
+
+        clvp += 4;
+        loffset += 4;
+      }
+
+      /* add up the elements of xmm1 */
+      xmm0 = _mm256_hadd_pd(xmm1,xmm1);
+      terma_r = ((double *)&xmm0)[0] + ((double *)&xmm0)[2];
+
+      /* account for invariant sites */
+      prop_invar = invar_proportion ? invar_proportion[freqs_indices[i]] : 0;
+      if (prop_invar > 0)
+      {
+        freqs = frequencies[freqs_indices[i]];
+        inv_site_lk = (invar_indices[n] == -1) ?
+                          0 : freqs[invar_indices[n]];
+        terma += rate_weights[i] * (terma_r * (1 - prop_invar) +
+                 inv_site_lk * prop_invar);
+      }
+      else
+      {
+        terma += terma_r * rate_weights[i];
+      }
+
+      pmat -= displacement;
+    }
+    /* count number of scaling factors to acount for */
+    scale_factors = (parent_scaler) ? parent_scaler[n] : 0;
+
+    /* compute site log-likelihood and scale if necessary */
+    site_lk = log(terma);
+    if (scale_factors)
+      site_lk += scale_factors * log(PLL_SCALE_THRESHOLD);
+
+    site_lk *= pattern_weights[n];
+
+    /* store per-site log-likelihood */
+    if (persite_lnl)
+      persite_lnl[n] = site_lk;
+
+    logl += site_lk;
+  }
+
+  pll_aligned_free(lookup);
+
+  return logl;
+}
+
+PLL_EXPORT
+double pll_core_edge_loglikelihood_ii_avx2(unsigned int states,
+                                           unsigned int sites,
+                                           unsigned int rate_cats,
+                                           const double * parent_clv,
+                                           const unsigned int * parent_scaler,
+                                           const double * child_clv,
+                                           const unsigned int * child_scaler,
+                                           const double * pmatrix,
+                                           double * const * frequencies,
+                                           const double * rate_weights,
+                                           const unsigned int * pattern_weights,
+                                           const double * invar_proportion,
+                                           const int * invar_indices,
+                                           const unsigned int * freqs_indices,
+                                           double * persite_lnl)
+{
+  unsigned int n,i,j,k;
+  double logl = 0;
+  double prop_invar = 0;
+
+  const double * clvp = parent_clv;
+  const double * clvc = child_clv;
+  const double * pmat;
+  const double * freqs = NULL;
+
+  double terma, terma_r;
+  double site_lk, inv_site_lk;
+
+  unsigned int scale_factors;
+  unsigned int states_padded = (states+3) & 0xFFFFFFFC;
+
+  __m256d xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7;
+
+  size_t displacement = (states_padded - states) * (states_padded);
+
+  for (n = 0; n < sites; ++n)
+  {
+    pmat = pmatrix;
+    terma = 0;
+    for (i = 0; i < rate_cats; ++i)
+    {
+      freqs = frequencies[freqs_indices[i]];
+      terma_r = 0;
+
+      /* iterate over quadruples of rows */
+      for (j = 0; j < states_padded; j += 4)
+      {
+        xmm0 = _mm256_setzero_pd();
+        xmm1 = _mm256_setzero_pd();
+        xmm2 = _mm256_setzero_pd();
+        xmm3 = _mm256_setzero_pd();
+
+        /* point to the four rows */
+        const double * row0 = pmat;
+        const double * row1 = row0 + states_padded;
+        const double * row2 = row1 + states_padded;
+        const double * row3 = row2 + states_padded;
+
+        /* iterate quadruples of columns */
+        for (k = 0; k < states_padded; k += 4)
+        {
+          xmm5 = _mm256_load_pd(clvc+k);
+
+          /* row 0 */
+          xmm4 = _mm256_load_pd(row0);
+          xmm0 = _mm256_fmadd_pd(xmm4, xmm5, xmm0);
+          row0 += 4;
+
+          /* row 1 */
+          xmm4 = _mm256_load_pd(row1);
+          xmm1 = _mm256_fmadd_pd(xmm4, xmm5, xmm1);
+          row1 += 4;
+
+          /* row 2 */
+          xmm4 = _mm256_load_pd(row2);
+          xmm2 = _mm256_fmadd_pd(xmm4, xmm5, xmm2);
+          row2 += 4;
+
+          /* row 3 */
+          xmm4 = _mm256_load_pd(row3);
+          xmm3 = _mm256_fmadd_pd(xmm4, xmm5, xmm3);
+          row3 += 4;
+        }
+
+        /* point pmatrix to the next four rows */
+        pmat = row3;
+
+        /* create a vector containing the sums of xmm0, xmm1, xmm2, xmm3 */
+        xmm4 = _mm256_unpackhi_pd(xmm0,xmm1);
+        xmm5 = _mm256_unpacklo_pd(xmm0,xmm1);
+
+        xmm6 = _mm256_unpackhi_pd(xmm2,xmm3);
+        xmm7 = _mm256_unpacklo_pd(xmm2,xmm3);
+
+        xmm0 = _mm256_add_pd(xmm4,xmm5);
+        xmm1 = _mm256_add_pd(xmm6,xmm7);
+
+        xmm2 = _mm256_permute2f128_pd(xmm0,xmm1, _MM_SHUFFLE(0,2,0,1));
+        xmm3 = _mm256_blend_pd(xmm0,xmm1,12);
+        xmm0 = _mm256_add_pd(xmm2,xmm3);
+
+        /* multiply with frequencies */
+        xmm1 = _mm256_load_pd(freqs);
+        xmm2 = _mm256_mul_pd(xmm0,xmm1);
+
+        /* multiply with clvp */
+        xmm0 = _mm256_load_pd(clvp);
+        xmm1 = _mm256_mul_pd(xmm2,xmm0);
+
+        /* add up the elements of xmm1 */
+        xmm0 = _mm256_hadd_pd(xmm1,xmm1);
+        terma_r += ((double *)&xmm0)[0] + ((double *)&xmm0)[2];
+
+        freqs += 4;
+        clvp += 4;
+      }
+
+      /* account for invariant sites */
+      prop_invar = invar_proportion ? invar_proportion[freqs_indices[i]] : 0;
+      if (prop_invar > 0)
+      {
+        freqs = frequencies[freqs_indices[i]];
+        inv_site_lk = (invar_indices[n] == -1) ?
+                          0 : freqs[invar_indices[n]];
+        terma += rate_weights[i] * (terma_r * (1 - prop_invar) +
+                 inv_site_lk * prop_invar);
+      }
+      else
+      {
+        terma += terma_r * rate_weights[i];
+      }
+
+      clvc += states_padded;
+      pmat -= displacement;
+    }
+    /* count number of scaling factors to acount for */
+    scale_factors = (parent_scaler) ? parent_scaler[n] : 0;
+    scale_factors += (child_scaler) ? child_scaler[n] : 0;
+
+    /* compute site log-likelihood and scale if necessary */
+    site_lk = log(terma);
+    if (scale_factors)
+      site_lk += scale_factors * log(PLL_SCALE_THRESHOLD);
+
+    site_lk *= pattern_weights[n];
+
+    /* store per-site log-likelihood */
+    if (persite_lnl)
+      persite_lnl[n] = site_lk;
+
+    logl += site_lk;
+  }
+  return logl;
+}
diff --git a/src/core_likelihood_sse.c b/src/core_likelihood_sse.c
index 221226d..4549b09 100644
--- a/src/core_likelihood_sse.c
+++ b/src/core_likelihood_sse.c
@@ -19,6 +19,7 @@
     Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
 */
 
+#include <limits.h>
 #include "pll.h"
 
 PLL_EXPORT double pll_core_root_loglikelihood_sse(unsigned int states,
@@ -26,7 +27,7 @@ PLL_EXPORT double pll_core_root_loglikelihood_sse(unsigned int states,
                                                   unsigned int rate_cats,
                                                   const double * clv,
                                                   const unsigned int * scaler,
-                                                  double ** frequencies,
+                                                  double * const * frequencies,
                                                   const double * rate_weights,
                                                   const unsigned int * pattern_weights,
                                                   const double * invar_proportion,
@@ -34,7 +35,7 @@ PLL_EXPORT double pll_core_root_loglikelihood_sse(unsigned int states,
                                                   const unsigned int * freqs_indices,
                                                   double * persite_lnl)
 {
-  unsigned int i,j,k,m = 0;
+  unsigned int i,j,k;
   double logl = 0;
   double prop_invar = 0;
 
@@ -81,7 +82,7 @@ PLL_EXPORT double pll_core_root_loglikelihood_sse(unsigned int states,
         freqs = frequencies[freqs_indices[j]];
         inv_site_lk = (invar_indices[i] == -1) ?
                            0 : freqs[invar_indices[i]];
-        term += rate_weights[j] * (term_r * (1 - prop_invar) + 
+        term += rate_weights[j] * (term_r * (1 - prop_invar) +
                                    inv_site_lk*prop_invar);
       }
       else
@@ -91,23 +92,26 @@ PLL_EXPORT double pll_core_root_loglikelihood_sse(unsigned int states,
     }
 
     /* compute site log-likelihood and scale if necessary */
-    term = log(term) * pattern_weights[i];
+    term = log(term);
     if (scaler && scaler[i])
       term += scaler[i] * log(PLL_SCALE_THRESHOLD);
 
+    term *= pattern_weights[i];
+
     /* store per-site log-likelihood */
     if (persite_lnl)
-      persite_lnl[m++] = term;
+      persite_lnl[i] = term;
 
     logl += term;
   }
   return logl;
 }
+
 PLL_EXPORT double pll_core_root_loglikelihood_4x4_sse(unsigned int sites,
                                                       unsigned int rate_cats,
                                                       const double * clv,
                                                       const unsigned int * scaler,
-                                                      double ** frequencies,
+                                                      double * const * frequencies,
                                                       const double * rate_weights,
                                                       const unsigned int * pattern_weights,
                                                       const double * invar_proportion,
@@ -115,7 +119,7 @@ PLL_EXPORT double pll_core_root_loglikelihood_4x4_sse(unsigned int sites,
                                                       const unsigned int * freqs_indices,
                                                       double * persite_lnl)
 {
-  unsigned int i,j,m = 0;
+  unsigned int i,j;
   double logl = 0;
   double prop_invar = 0;
 
@@ -156,7 +160,7 @@ PLL_EXPORT double pll_core_root_loglikelihood_4x4_sse(unsigned int sites,
       {
         inv_site_lk = (invar_indices[i] == -1) ?
                            0 : freqs[invar_indices[i]];
-        term += rate_weights[j] * (term_r * (1 - prop_invar) + 
+        term += rate_weights[j] * (term_r * (1 - prop_invar) +
                                    inv_site_lk*prop_invar);
       }
       else
@@ -168,13 +172,15 @@ PLL_EXPORT double pll_core_root_loglikelihood_4x4_sse(unsigned int sites,
     }
 
     /* compute site log-likelihood and scale if necessary */
-    term = log(term) * pattern_weights[i];
+    term = log(term);
     if (scaler && scaler[i])
       term += scaler[i] * log(PLL_SCALE_THRESHOLD);
 
+    term *= pattern_weights[i];
+
     /* store per-site log-likelihood */
     if (persite_lnl)
-      persite_lnl[m++] = term;
+      persite_lnl[i] = term;
 
     logl += term;
   }
@@ -190,7 +196,7 @@ double pll_core_edge_loglikelihood_ti_sse(unsigned int states,
                                           const unsigned char * tipchars,
                                           const unsigned int * tipmap,
                                           const double * pmatrix,
-                                          double ** frequencies,
+                                          double * const * frequencies,
                                           const double * rate_weights,
                                           const unsigned int * pattern_weights,
                                           const double * invar_proportion,
@@ -198,7 +204,7 @@ double pll_core_edge_loglikelihood_ti_sse(unsigned int states,
                                           const unsigned int * freqs_indices,
                                           double * persite_lnl)
 {
-  unsigned int n,i,j,k,m = 0;
+  unsigned int n,i,j,k;
   double logl = 0;
   double prop_invar = 0;
 
@@ -267,7 +273,7 @@ double pll_core_edge_loglikelihood_ti_sse(unsigned int states,
           row1 += 2;
         }
 
-        /* point pmatrix to the next four rows */ 
+        /* point pmatrix to the next four rows */
         pmat = row1;
 
         /* create a vector containing the sums of xmm0 and xmm1 */
@@ -309,13 +315,15 @@ double pll_core_edge_loglikelihood_ti_sse(unsigned int states,
     scale_factors = (parent_scaler) ? parent_scaler[n] : 0;
 
     /* compute site log-likelihood and scale if necessary */
-    site_lk = log(terma) * pattern_weights[n];
+    site_lk = log(terma);
     if (scale_factors)
       site_lk += scale_factors * log(PLL_SCALE_THRESHOLD);
 
+    site_lk *= pattern_weights[n];
+
     /* store per-site log-likelihood */
     if (persite_lnl)
-      persite_lnl[m++] = site_lk;
+      persite_lnl[n] = site_lk;
 
     logl += site_lk;
   }
@@ -331,7 +339,7 @@ double pll_core_edge_loglikelihood_ii_sse(unsigned int states,
                                           const double * child_clv,
                                           const unsigned int * child_scaler,
                                           const double * pmatrix,
-                                          double ** frequencies,
+                                          double * const * frequencies,
                                           const double * rate_weights,
                                           const unsigned int * pattern_weights,
                                           const double * invar_proportion,
@@ -339,7 +347,7 @@ double pll_core_edge_loglikelihood_ii_sse(unsigned int states,
                                           const unsigned int * freqs_indices,
                                           double * persite_lnl)
 {
-  unsigned int n,i,j,k,m = 0;
+  unsigned int n,i,j,k;
   double logl = 0;
   double prop_invar = 0;
 
@@ -366,7 +374,7 @@ double pll_core_edge_loglikelihood_ii_sse(unsigned int states,
     {
       freqs = frequencies[freqs_indices[i]];
       terma_r = 0;
-      
+
       /* iterate over pairs of rows */
       for (j = 0; j < states_padded; j += 2)
       {
@@ -376,7 +384,7 @@ double pll_core_edge_loglikelihood_ii_sse(unsigned int states,
         /* point to the two rows */
         const double * row0 = pmat;
         const double * row1 = row0 + states_padded;
-        
+
         /* iterate pairs of columns */
         for (k = 0; k < states_padded; k += 2)
         {
@@ -395,7 +403,7 @@ double pll_core_edge_loglikelihood_ii_sse(unsigned int states,
           row1 += 2;
         }
 
-        /* point pmatrix to the next two rows */ 
+        /* point pmatrix to the next two rows */
         pmat = row1;
 
         /* create a vector containing the sums of xmm0 and xmm1 */
@@ -439,13 +447,15 @@ double pll_core_edge_loglikelihood_ii_sse(unsigned int states,
     scale_factors += (child_scaler) ? child_scaler[n] : 0;
 
     /* compute site log-likelihood and scale if necessary */
-    site_lk = log(terma) * pattern_weights[n];
+    site_lk = log(terma);
     if (scale_factors)
       site_lk += scale_factors * log(PLL_SCALE_THRESHOLD);
 
+    site_lk *= pattern_weights[n];
+
     /* store per-site log-likelihood */
     if (persite_lnl)
-      persite_lnl[m++] = site_lk;
+      persite_lnl[n] = site_lk;
 
     logl += site_lk;
   }
@@ -460,15 +470,16 @@ double pll_core_edge_loglikelihood_ii_4x4_sse(unsigned int sites,
                                               const double * child_clv,
                                               const unsigned int * child_scaler,
                                               const double * pmatrix,
-                                              double ** frequencies,
+                                              double * const * frequencies,
                                               const double * rate_weights,
                                               const unsigned int * pattern_weights,
                                               const double * invar_proportion,
                                               const int * invar_indices,
                                               const unsigned int * freqs_indices,
-                                              double * persite_lnl)
+                                              double * persite_lnl,
+                                              unsigned int attrib)
 {
-  unsigned int n,i,m = 0;
+  unsigned int n,i;
   double logl = 0;
   double prop_invar = 0;
 
@@ -480,16 +491,60 @@ double pll_core_edge_loglikelihood_ii_4x4_sse(unsigned int sites,
   double terma, terma_r;
   double site_lk, inv_site_lk;
 
-  unsigned int scale_factors;
   unsigned int states = 4;
   unsigned int states_padded = 4;
 
   __m128d xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7;
-  
+
+  unsigned int site_scalings;
+  unsigned int * rate_scalings = NULL;
+  int per_rate_scaling = (attrib & PLL_ATTRIB_RATE_SCALERS) ? 1 : 0;
+
+  /* powers of scale threshold for undoing the scaling */
+  double scale_minlh[PLL_SCALE_RATE_MAXDIFF];
+  if (per_rate_scaling)
+  {
+    rate_scalings = (unsigned int*) calloc(rate_cats, sizeof(unsigned int));
+
+    double scale_factor = 1.0;
+    for (i = 0; i < PLL_SCALE_RATE_MAXDIFF; ++i)
+    {
+      scale_factor *= PLL_SCALE_THRESHOLD;
+      scale_minlh[i] = scale_factor;
+    }
+  }
+
   for (n = 0; n < sites; ++n)
   {
     pmat = pmatrix;
     terma = 0;
+
+    if (per_rate_scaling)
+    {
+      /* compute minimum per-rate scaler -> common per-site scaler */
+      site_scalings = UINT_MAX;
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = (parent_scaler) ? parent_scaler[n*rate_cats+i] : 0;
+        rate_scalings[i] += (child_scaler) ? child_scaler[n*rate_cats+i] : 0;
+        if (rate_scalings[i] < site_scalings)
+          site_scalings = rate_scalings[i];
+      }
+
+      /* compute relative capped per-rate scalers */
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = PLL_MIN(rate_scalings[i] - site_scalings,
+                                   PLL_SCALE_RATE_MAXDIFF);
+      }
+    }
+    else
+    {
+      /* count number of scaling factors to account for */
+      site_scalings =  (parent_scaler) ? parent_scaler[n] : 0;
+      site_scalings += (child_scaler) ? child_scaler[n] : 0;
+    }
+
     for (i = 0; i < rate_cats; ++i)
     {
       freqs = frequencies[freqs_indices[i]];
@@ -504,7 +559,7 @@ double pll_core_edge_loglikelihood_ii_4x4_sse(unsigned int sites,
       /* load pmatrix row 1 */
       xmm3 = _mm_load_pd(pmat);
       xmm4 = _mm_load_pd(pmat+2);
-      
+
       /* load pmatrix row 2 */
       pmat += states;
       xmm5 = _mm_load_pd(pmat);
@@ -576,6 +631,12 @@ double pll_core_edge_loglikelihood_ii_4x4_sse(unsigned int sites,
       xmm0 = _mm_hadd_pd(xmm6,xmm7);
       terma_r = ((double *)&xmm0)[0] + ((double *)&xmm0)[1];
 
+      /* apply per-rate scalers, if necessary */
+      if (rate_scalings && rate_scalings[i] > 0)
+      {
+        terma_r *= scale_minlh[rate_scalings[i]-1];
+      }
+
       /* account for invariant sites */
       prop_invar = invar_proportion ? invar_proportion[freqs_indices[i]] : 0;
       if (prop_invar > 0)
@@ -594,21 +655,23 @@ double pll_core_edge_loglikelihood_ii_4x4_sse(unsigned int sites,
       clvc += states_padded;
     }
 
-    /* count number of scaling factors to acount for */
-    scale_factors = (parent_scaler) ? parent_scaler[n] : 0;
-    scale_factors += (child_scaler) ? child_scaler[n] : 0;
+    /* compute site log-likelihood and apply per-site scaler if necessary */
+    site_lk = log(terma);
+    if (site_scalings)
+      site_lk += site_scalings * log(PLL_SCALE_THRESHOLD);
 
-    /* compute site log-likelihood and scale if necessary */
-    site_lk = log(terma) * pattern_weights[n];
-    if (scale_factors)
-      site_lk += scale_factors * log(PLL_SCALE_THRESHOLD);
+    site_lk *= pattern_weights[n];
 
     /* store per-site log-likelihood */
     if (persite_lnl)
-      persite_lnl[m++] = site_lk;
+      persite_lnl[n] = site_lk;
 
     logl += site_lk;
   }
+
+  if (rate_scalings)
+    free(rate_scalings);
+
   return logl;
 }
 
@@ -619,15 +682,16 @@ double pll_core_edge_loglikelihood_ti_4x4_sse(unsigned int sites,
                                               const unsigned int * parent_scaler,
                                               const unsigned char * tipchars,
                                               const double * pmatrix,
-                                              double ** frequencies,
+                                              double * const * frequencies,
                                               const double * rate_weights,
                                               const unsigned int * pattern_weights,
                                               const double * invar_proportion,
                                               const int * invar_indices,
                                               const unsigned int * freqs_indices,
-                                              double * persite_lnl)
+                                              double * persite_lnl,
+                                              unsigned int attrib)
 {
-  unsigned int i,k,m,n;
+  unsigned int i,k,n;
   double logl = 0;
   double prop_invar = 0;
 
@@ -638,7 +702,6 @@ double pll_core_edge_loglikelihood_ti_4x4_sse(unsigned int sites,
   double terma, terma_r;
   double site_lk, inv_site_lk;
 
-  unsigned int scale_factors;
   unsigned int cstate;
   unsigned int states_padded = 4;
   unsigned int span = rate_cats*states_padded;
@@ -646,6 +709,24 @@ double pll_core_edge_loglikelihood_ti_4x4_sse(unsigned int sites,
   __m128d xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7;
   __m128d ymm0,ymm1,ymm2,ymm3;
 
+  unsigned int site_scalings;
+  unsigned int * rate_scalings = NULL;
+  int per_rate_scaling = (attrib & PLL_ATTRIB_RATE_SCALERS) ? 1 : 0;
+
+  /* powers of scale threshold for undoing the scaling */
+  double scale_minlh[PLL_SCALE_RATE_MAXDIFF];
+  if (per_rate_scaling)
+  {
+    rate_scalings = (unsigned int*) calloc(rate_cats, sizeof(unsigned int));
+
+    double scale_factor = 1.0;
+    for (i = 0; i < PLL_SCALE_RATE_MAXDIFF; ++i)
+    {
+      scale_factor *= PLL_SCALE_THRESHOLD;
+      scale_minlh[i] = scale_factor;
+    }
+  }
+
   /* precompute a lookup table of four values per entry (one for each state),
      for all 16 states (including ambiguities) and for each rate category. */
   double * lookup = pll_aligned_alloc(64*rate_cats*sizeof(double),
@@ -747,12 +828,35 @@ double pll_core_edge_loglikelihood_ti_4x4_sse(unsigned int sites,
     }
   }
 
-  m=0;
   for (n = 0; n < sites; ++n)
   {
     pmat = pmatrix;
     terma = 0;
 
+    if (per_rate_scaling)
+    {
+      /* compute minimum per-rate scaler -> common per-site scaler */
+      site_scalings = UINT_MAX;
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = (parent_scaler) ? parent_scaler[n*rate_cats+i] : 0;
+        if (rate_scalings[i] < site_scalings)
+          site_scalings = rate_scalings[i];
+      }
+
+      /* compute relative capped per-rate scalers */
+      for (i = 0; i < rate_cats; ++i)
+      {
+        rate_scalings[i] = PLL_MIN(rate_scalings[i] - site_scalings,
+                                   PLL_SCALE_RATE_MAXDIFF);
+      }
+    }
+    else
+    {
+      /* count number of scaling factors to account for */
+      site_scalings =  (parent_scaler) ? parent_scaler[n] : 0;
+    }
+
     cstate = tipchars[n];
 
     unsigned int coffset = cstate*span;
@@ -777,6 +881,12 @@ double pll_core_edge_loglikelihood_ti_4x4_sse(unsigned int sites,
       xmm1 = _mm_hadd_pd(xmm4,xmm5);
       terma_r = ((double *)&xmm1)[0] + ((double *)&xmm1)[1];
 
+      /* apply per-rate scalers, if necessary */
+      if (rate_scalings && rate_scalings[i] > 0)
+      {
+        terma_r *= scale_minlh[rate_scalings[i]-1];
+      }
+
       /* account for invariant sites */
       prop_invar = invar_proportion ? invar_proportion[freqs_indices[i]] : 0;
       if (prop_invar > 0)
@@ -795,20 +905,23 @@ double pll_core_edge_loglikelihood_ti_4x4_sse(unsigned int sites,
       coffset += 4;
     }
 
-    /* count number of scaling factors to acount for */
-    scale_factors = (parent_scaler) ? parent_scaler[n] : 0;
-
     /* compute site log-likelihood and scale if necessary */
-    site_lk = log(terma) * pattern_weights[n];
-    if (scale_factors)
-      site_lk += scale_factors * log(PLL_SCALE_THRESHOLD);
+    site_lk = log(terma);
+    if (site_scalings)
+      site_lk += site_scalings * log(PLL_SCALE_THRESHOLD);
+
+    site_lk *= pattern_weights[n];
 
     /* store per-site log-likelihood */
     if (persite_lnl)
-      persite_lnl[m++] = site_lk;
+      persite_lnl[n] = site_lk;
 
     logl += site_lk;
   }
+
   pll_aligned_free(lookup);
+  if (rate_scalings)
+    free(rate_scalings);
+
   return logl;
 }
diff --git a/src/core_partials.c b/src/core_partials.c
index 9451f75..e218c06 100644
--- a/src/core_partials.c
+++ b/src/core_partials.c
@@ -21,7 +21,7 @@
 
 #include "pll.h"
 
-static void fill_parent_scaler(unsigned int sites,
+static void fill_parent_scaler(unsigned int scaler_size,
                                unsigned int * parent_scaler,
                                const unsigned int * left_scaler,
                                const unsigned int * right_scaler)
@@ -29,19 +29,19 @@ static void fill_parent_scaler(unsigned int sites,
   unsigned int i;
 
   if (!left_scaler && !right_scaler)
-    memset(parent_scaler, 0, sizeof(unsigned int) * sites);
+    memset(parent_scaler, 0, sizeof(unsigned int) * scaler_size);
   else if (left_scaler && right_scaler)
   {
-    memcpy(parent_scaler, left_scaler, sizeof(unsigned int) * sites);
-    for (i = 0; i < sites; ++i)
+    memcpy(parent_scaler, left_scaler, sizeof(unsigned int) * scaler_size);
+    for (i = 0; i < scaler_size; ++i)
       parent_scaler[i] += right_scaler[i];
   }
   else
   {
     if (left_scaler)
-      memcpy(parent_scaler, left_scaler, sizeof(unsigned int) * sites);
+      memcpy(parent_scaler, left_scaler, sizeof(unsigned int) * scaler_size);
     else
-      memcpy(parent_scaler, right_scaler, sizeof(unsigned int) * sites);
+      memcpy(parent_scaler, right_scaler, sizeof(unsigned int) * scaler_size);
   }
 }
 
@@ -51,15 +51,19 @@ PLL_EXPORT void pll_core_update_partial_tt_4x4(unsigned int sites,
                                                unsigned int * parent_scaler,
                                                const unsigned char * left_tipchars,
                                                const unsigned char * right_tipchars,
-                                               const double * lookup)
+                                               const double * lookup,
+                                               unsigned int attrib)
 {
   unsigned int j,k,n;
   unsigned int states = 4;
   unsigned int span = states * rate_cats;
   const double * offset;
 
+  size_t scaler_size = (attrib & PLL_ATTRIB_RATE_SCALERS) ?
+                                                        sites*rate_cats : sites;
+
   if (parent_scaler)
-    memset(parent_scaler, 0, sizeof(unsigned int) * sites);
+    memset(parent_scaler, 0, sizeof(unsigned int) * scaler_size);
 
   for (n = 0; n < sites; ++n)
   {
@@ -90,8 +94,8 @@ PLL_EXPORT void pll_core_update_partial_tt(unsigned int states,
   unsigned int j,k,n;
   const double * offset;
 
-  #ifdef HAVE_SSE
-  if (attrib & PLL_ATTRIB_ARCH_SSE)
+  #ifdef HAVE_SSE3
+  if (attrib & PLL_ATTRIB_ARCH_SSE && PLL_STAT(sse3_present))
   {
     if (states == 4)
       pll_core_update_partial_tt_4x4_sse(sites,
@@ -100,7 +104,8 @@ PLL_EXPORT void pll_core_update_partial_tt(unsigned int states,
                                          parent_scaler,
                                          left_tipchars,
                                          right_tipchars,
-                                         lookup);
+                                         lookup,
+                                         attrib);
     else
       pll_core_update_partial_tt_sse(states,
                                      sites,
@@ -110,14 +115,42 @@ PLL_EXPORT void pll_core_update_partial_tt(unsigned int states,
                                      left_tipchars,
                                      right_tipchars,
                                      lookup,
-                                     tipmap_size);
+                                     tipmap_size,
+                                     attrib);
 
     return;
   }
   
   #endif
   #ifdef HAVE_AVX
-  if (attrib & PLL_ATTRIB_ARCH_AVX)
+  if (attrib & PLL_ATTRIB_ARCH_AVX && PLL_STAT(avx_present))
+  {
+    if (states == 4)
+      pll_core_update_partial_tt_4x4_avx(sites,
+                                         rate_cats,
+                                         parent_clv,
+                                         parent_scaler,
+                                         left_tipchars,
+                                         right_tipchars,
+                                         lookup,
+                                         attrib);
+    else
+      pll_core_update_partial_tt_avx(states,
+                                     sites,
+                                     rate_cats,
+                                     parent_clv,
+                                     parent_scaler,
+                                     left_tipchars,
+                                     right_tipchars,
+                                     lookup,
+                                     tipmap_size,
+                                     attrib);
+
+    return;
+  }
+  #endif
+  #ifdef HAVE_AVX2
+  if (attrib & PLL_ATTRIB_ARCH_AVX2 && PLL_STAT(avx2_present))
   {
     if (states == 4)
       pll_core_update_partial_tt_4x4_avx(sites,
@@ -126,7 +159,8 @@ PLL_EXPORT void pll_core_update_partial_tt(unsigned int states,
                                          parent_scaler,
                                          left_tipchars,
                                          right_tipchars,
-                                         lookup);
+                                         lookup,
+                                         attrib);
     else
       pll_core_update_partial_tt_avx(states,
                                      sites,
@@ -136,7 +170,8 @@ PLL_EXPORT void pll_core_update_partial_tt(unsigned int states,
                                      left_tipchars,
                                      right_tipchars,
                                      lookup,
-                                     tipmap_size);
+                                     tipmap_size,
+                                     attrib);
 
     return;
   }
@@ -144,9 +179,11 @@ PLL_EXPORT void pll_core_update_partial_tt(unsigned int states,
 
   unsigned int span = states * rate_cats;
   unsigned int log2_maxstates = (unsigned int)ceil(log2(tipmap_size));
+  size_t scaler_size = (attrib & PLL_ATTRIB_RATE_SCALERS) ?
+                                                        sites*rate_cats : sites;
 
   if (parent_scaler)
-    memset(parent_scaler, 0, sizeof(unsigned int) * sites);
+    memset(parent_scaler, 0, sizeof(unsigned int) * scaler_size);
 
   for (n = 0; n < sites; ++n)
   {
@@ -174,15 +211,18 @@ PLL_EXPORT void pll_core_update_partial_ti_4x4(unsigned int sites,
                                                unsigned int attrib)
 {
   unsigned int states = 4;
-  unsigned int scaling;
   unsigned int i,j,k,n;
   unsigned int span = states * rate_cats;
 
+  unsigned int scale_mode;  /* 0 = none, 1 = per-site, 2 = per-rate */
+  unsigned int site_scale;
+  unsigned int init_mask;
+
   const double * lmat;
   const double * rmat;
 
-  #ifdef HAVE_SSE
-  if (attrib & PLL_ATTRIB_ARCH_SSE)
+  #ifdef HAVE_SSE3
+  if (attrib & PLL_ATTRIB_ARCH_SSE && PLL_STAT(sse3_present))
   {
     pll_core_update_partial_ti_4x4_sse(sites,
                                        rate_cats,
@@ -192,12 +232,29 @@ PLL_EXPORT void pll_core_update_partial_ti_4x4(unsigned int sites,
                                        right_clv,
                                        left_matrix,
                                        right_matrix,
-                                       right_scaler);
+                                       right_scaler,
+                                       attrib);
     return;
   }
   #endif
   #ifdef HAVE_AVX
-  if (attrib & PLL_ATTRIB_ARCH_AVX)
+  if (attrib & PLL_ATTRIB_ARCH_AVX && PLL_STAT(avx_present))
+  {
+    pll_core_update_partial_ti_4x4_avx(sites,
+                                       rate_cats,
+                                       parent_clv,
+                                       parent_scaler,
+                                       left_tipchars,
+                                       right_clv,
+                                       left_matrix,
+                                       right_matrix,
+                                       right_scaler,
+                                       attrib);
+    return;
+  }
+  #endif
+  #ifdef HAVE_AVX2
+  if (attrib & PLL_ATTRIB_ARCH_AVX2 && PLL_STAT(avx2_present))
   {
     pll_core_update_partial_ti_4x4_avx(sites,
                                        rate_cats,
@@ -207,23 +264,39 @@ PLL_EXPORT void pll_core_update_partial_ti_4x4(unsigned int sites,
                                        right_clv,
                                        left_matrix,
                                        right_matrix,
-                                       right_scaler);
+                                       right_scaler,
+                                       attrib);
     return;
   }
   #endif
 
+  /* init scaling-related stuff */
   if (parent_scaler)
-    fill_parent_scaler(sites, parent_scaler, NULL, right_scaler);
+  {
+    /* determine the scaling mode and init the vars accordingly */
+    scale_mode = (attrib & PLL_ATTRIB_RATE_SCALERS) ? 2 : 1;
+    init_mask = (scale_mode == 1) ? 1 : 0;
+    const size_t scaler_size = (scale_mode == 2) ? sites * rate_cats : sites;
+
+    /* update the parent scaler with the scaler of the right child */
+    fill_parent_scaler(scaler_size, parent_scaler, NULL, right_scaler);
+  }
+  else
+  {
+    /* scaling disabled / not required */
+    scale_mode = init_mask = 0;
+  }
 
   for (n = 0; n < sites; ++n)
   {
     lmat = left_matrix;
     rmat = right_matrix;
 
-    scaling = (parent_scaler) ? 1 : 0;
+    site_scale = init_mask;
 
     for (k = 0; k < rate_cats; ++k)
     {
+      unsigned int rate_scale = 1;
       for (i = 0; i < states; ++i)
       {
         double terma = 0;
@@ -239,17 +312,35 @@ PLL_EXPORT void pll_core_update_partial_ti_4x4(unsigned int sites,
           lstate >>= 1;
         }
         parent_clv[i] = terma*termb;
+
+        rate_scale &= (parent_clv[i] < PLL_SCALE_THRESHOLD);
+
         lmat += states;
         rmat += states;
+      }
 
-        scaling = scaling && (parent_clv[i] < PLL_SCALE_THRESHOLD);
+      /* check if scaling is needed for the current rate category */
+      if (scale_mode == 2)
+      {
+        /* PER-RATE SCALING: if *all* entries of the *rate* CLV were below
+         * the threshold then scale (all) entries by PLL_SCALE_FACTOR */
+        if (rate_scale)
+        {
+          for (i = 0; i < states; ++i)
+            parent_clv[i] *= PLL_SCALE_FACTOR;
+          parent_scaler[n*rate_cats + k] += 1;
+        }
       }
+      else
+        site_scale = site_scale && rate_scale;
+
       parent_clv += states;
       right_clv  += states;
     }
-    /* if *all* entries of the site CLV were below the threshold then scale
-       (all) entries by PLL_SCALE_FACTOR */
-    if (scaling)
+
+    /* PER-SITE SCALING: if *all* entries of the *site* CLV were below
+     * the threshold then scale (all) entries by PLL_SCALE_FACTOR */
+    if (site_scale)
     {
       parent_clv -= span;
       for (i = 0; i < span; ++i)
@@ -271,17 +362,20 @@ PLL_EXPORT void pll_core_update_partial_ti(unsigned int states,
                                            const double * right_matrix,
                                            const unsigned int * right_scaler,
                                            const unsigned int * tipmap,
+                                           unsigned int tipmap_size,
                                            unsigned int attrib)
 {
   int scaling;
   unsigned int i,j,k,n;
   unsigned int span = states * rate_cats;
+  size_t scaler_size = (attrib & PLL_ATTRIB_RATE_SCALERS) ?
+                                                        sites*rate_cats : sites;
 
   const double * lmat;
   const double * rmat;
 
-#ifdef HAVE_SSE
-  if ((attrib & PLL_ATTRIB_ARCH_SSE))
+#ifdef HAVE_SSE3
+  if (attrib & PLL_ATTRIB_ARCH_SSE && PLL_STAT(sse3_present))
   {
     if (states == 4)
       pll_core_update_partial_ti_4x4_sse(sites,
@@ -292,7 +386,8 @@ PLL_EXPORT void pll_core_update_partial_ti(unsigned int states,
                                          right_clv,
                                          left_matrix,
                                          right_matrix,
-                                         right_scaler);
+                                         right_scaler,
+                                         attrib);
     else
       pll_core_update_partial_ti_sse(states,
                                      sites,
@@ -304,35 +399,47 @@ PLL_EXPORT void pll_core_update_partial_ti(unsigned int states,
                                      left_matrix,
                                      right_matrix,
                                      right_scaler,
-                                     tipmap);
+                                     tipmap,
+                                     tipmap_size,
+                                     attrib);
     return;
   }
 #endif
 #ifdef HAVE_AVX
-  if ((attrib & PLL_ATTRIB_ARCH_AVX))
+  if (attrib & PLL_ATTRIB_ARCH_AVX && PLL_STAT(avx_present))
   {
-    if (states == 4)
-      pll_core_update_partial_ti_4x4_avx(sites,
-                                         rate_cats,
-                                         parent_clv,
-                                         parent_scaler,
-                                         left_tipchars,
-                                         right_clv,
-                                         left_matrix,
-                                         right_matrix,
-                                         right_scaler);
-    else
-      pll_core_update_partial_ti_avx(states,
-                                     sites,
-                                     rate_cats,
-                                     parent_clv,
-                                     parent_scaler,
-                                     left_tipchars,
-                                     right_clv,
-                                     left_matrix,
-                                     right_matrix,
-                                     right_scaler,
-                                     tipmap);
+    pll_core_update_partial_ti_avx(states,
+                                   sites,
+                                   rate_cats,
+                                   parent_clv,
+                                   parent_scaler,
+                                   left_tipchars,
+                                   right_clv,
+                                   left_matrix,
+                                   right_matrix,
+                                   right_scaler,
+                                   tipmap,
+                                   tipmap_size,
+                                   attrib);
+    return;
+  }
+#endif
+#ifdef HAVE_AVX2
+  if (attrib & PLL_ATTRIB_ARCH_AVX2 && PLL_STAT(avx2_present))
+  {
+    pll_core_update_partial_ti_avx(states,
+                                   sites,
+                                   rate_cats,
+                                   parent_clv,
+                                   parent_scaler,
+                                   left_tipchars,
+                                   right_clv,
+                                   left_matrix,
+                                   right_matrix,
+                                   right_scaler,
+                                   tipmap,
+                                   tipmap_size,
+                                   attrib);
     return;
   }
 #endif
@@ -353,7 +460,7 @@ PLL_EXPORT void pll_core_update_partial_ti(unsigned int states,
   }
 
   if (parent_scaler)
-    fill_parent_scaler(sites, parent_scaler, NULL, right_scaler);
+    fill_parent_scaler(scaler_size, parent_scaler, NULL, right_scaler);
 
   for (n = 0; n < sites; ++n)
   {
@@ -414,15 +521,18 @@ PLL_EXPORT void pll_core_update_partial_ii(unsigned int states,
                                            unsigned int attrib)
 {
   unsigned int i,j,k,n;
-  unsigned int scaling;
+
+  unsigned int scale_mode;  /* 0 = none, 1 = per-site, 2 = per-rate */
+  unsigned int site_scale;
+  unsigned int init_mask;
 
   const double * lmat;
   const double * rmat;
 
   unsigned int span = states * rate_cats;
 
-#ifdef HAVE_SSE
-  if (attrib & PLL_ATTRIB_ARCH_SSE)
+#ifdef HAVE_SSE3
+  if (attrib & PLL_ATTRIB_ARCH_SSE && PLL_STAT(sse3_present))
   {
     pll_core_update_partial_ii_sse(states,
                                    sites,
@@ -434,12 +544,13 @@ PLL_EXPORT void pll_core_update_partial_ii(unsigned int states,
                                    left_matrix,
                                    right_matrix,
                                    left_scaler,
-                                   right_scaler);
+                                   right_scaler,
+                                   attrib);
     return;
   }
 #endif
 #ifdef HAVE_AVX
-  if (attrib & PLL_ATTRIB_ARCH_AVX)
+  if (attrib & PLL_ATTRIB_ARCH_AVX && PLL_STAT(avx_present))
   {
     pll_core_update_partial_ii_avx(states,
                                    sites,
@@ -451,24 +562,57 @@ PLL_EXPORT void pll_core_update_partial_ii(unsigned int states,
                                    left_matrix,
                                    right_matrix,
                                    left_scaler,
-                                   right_scaler);
+                                   right_scaler,
+                                   attrib);
+    return;
+  }
+#endif
+#ifdef HAVE_AVX2
+  if (attrib & PLL_ATTRIB_ARCH_AVX2 && PLL_STAT(avx2_present))
+  {
+    pll_core_update_partial_ii_avx2(states,
+                                    sites,
+                                    rate_cats,
+                                    parent_clv,
+                                    parent_scaler,
+                                    left_clv,
+                                    right_clv,
+                                    left_matrix,
+                                    right_matrix,
+                                    left_scaler,
+                                    right_scaler,
+                                    attrib);
     return;
   }
 #endif
 
-  /* add up the scale vectors of the two children if available */
+  /* init scaling-related stuff */
   if (parent_scaler)
-    fill_parent_scaler(sites, parent_scaler, left_scaler, right_scaler);
+  {
+    /* determine the scaling mode and init the vars accordingly */
+    scale_mode = (attrib & PLL_ATTRIB_RATE_SCALERS) ? 2 : 1;
+    init_mask = (scale_mode == 1) ? 1 : 0;
+    const size_t scaler_size = (scale_mode == 2) ? sites * rate_cats : sites;
+
+    /* add up the scale vectors of the two children if available */
+    fill_parent_scaler(scaler_size, parent_scaler, left_scaler, right_scaler);
+  }
+  else
+  {
+    /* scaling disabled / not required */
+    scale_mode = init_mask = 0;
+  }
 
   /* compute CLV */
   for (n = 0; n < sites; ++n)
   {
     lmat = left_matrix;
     rmat = right_matrix;
-    scaling = (parent_scaler) ? 1 : 0;
+    site_scale = init_mask;
 
     for (k = 0; k < rate_cats; ++k)
     {
+      unsigned int rate_scale = 1;
       for (i = 0; i < states; ++i)
       {
         double terma = 0;
@@ -479,18 +623,35 @@ PLL_EXPORT void pll_core_update_partial_ii(unsigned int states,
           termb += rmat[j] * right_clv[j];
         }
         parent_clv[i] = terma*termb;
+
+        rate_scale &= (parent_clv[i] < PLL_SCALE_THRESHOLD);
+
         lmat += states;
         rmat += states;
+      }
 
-        scaling = scaling && (parent_clv[i] < PLL_SCALE_THRESHOLD);
+      /* check if scaling is needed for the current rate category */
+      if (scale_mode == 2)
+      {
+        /* PER-RATE SCALING: if *all* entries of the *rate* CLV were below
+         * the threshold then scale (all) entries by PLL_SCALE_FACTOR */
+        if (rate_scale)
+        {
+          for (i = 0; i < states; ++i)
+            parent_clv[i] *= PLL_SCALE_FACTOR;
+          parent_scaler[n*rate_cats + k] += 1;
+        }
       }
+      else
+        site_scale = site_scale && rate_scale;
+
       parent_clv += states;
       left_clv   += states;
       right_clv  += states;
     }
-    /* if *all* entries of the site CLV were below the threshold then scale
-       (all) entries by PLL_SCALE_FACTOR */
-    if (scaling)
+    /* PER-SITE SCALING: if *all* entries of the *site* CLV were below
+     * the threshold then scale (all) entries by PLL_SCALE_FACTOR */
+    if (site_scale)
     {
       parent_clv -= span;
       for (i = 0; i < span; ++i)
@@ -566,13 +727,13 @@ PLL_EXPORT void pll_core_create_lookup(unsigned int states,
                                        double * lookup,
                                        const double * left_matrix,
                                        const double * right_matrix,
-                                       unsigned int * tipmap,
+                                       const unsigned int * tipmap,
                                        unsigned int tipmap_size,
                                        unsigned int attrib)
 {
 
-  #ifdef HAVE_SSE
-  if (attrib & PLL_ATTRIB_ARCH_SSE)
+  #ifdef HAVE_SSE3
+  if (attrib & PLL_ATTRIB_ARCH_SSE && PLL_STAT(sse3_present))
   {
     if (states == 4)
       pll_core_create_lookup_4x4_sse(rate_cats,
@@ -591,7 +752,26 @@ PLL_EXPORT void pll_core_create_lookup(unsigned int states,
   }
   #endif
   #ifdef HAVE_AVX
-  if (attrib & PLL_ATTRIB_ARCH_AVX)
+  if (attrib & PLL_ATTRIB_ARCH_AVX && PLL_STAT(avx_present))
+  {
+    if (states == 4)
+      pll_core_create_lookup_4x4_avx(rate_cats,
+                                     lookup,
+                                     left_matrix,
+                                     right_matrix);
+    else
+      pll_core_create_lookup_avx(states,
+                                 rate_cats,
+                                 lookup,
+                                 left_matrix,
+                                 right_matrix,
+                                 tipmap,
+                                 tipmap_size);
+    return;
+  }
+  #endif
+  #ifdef HAVE_AVX2
+  if (attrib & PLL_ATTRIB_ARCH_AVX2 && PLL_STAT(avx2_present))
   {
     if (states == 4)
       pll_core_create_lookup_4x4_avx(rate_cats,
diff --git a/src/core_partials_avx.c b/src/core_partials_avx.c
index fde9fb5..d20c70d 100644
--- a/src/core_partials_avx.c
+++ b/src/core_partials_avx.c
@@ -21,7 +21,7 @@
 
 #include "pll.h"
 
-static void fill_parent_scaler(unsigned int sites,
+static void fill_parent_scaler(unsigned int scaler_size,
                                unsigned int * parent_scaler,
                                const unsigned int * left_scaler,
                                const unsigned int * right_scaler)
@@ -29,19 +29,19 @@ static void fill_parent_scaler(unsigned int sites,
   unsigned int i;
 
   if (!left_scaler && !right_scaler)
-    memset(parent_scaler, 0, sizeof(unsigned int) * sites);
+    memset(parent_scaler, 0, sizeof(unsigned int) * scaler_size);
   else if (left_scaler && right_scaler)
   {
-    memcpy(parent_scaler, left_scaler, sizeof(unsigned int) * sites);
-    for (i = 0; i < sites; ++i)
+    memcpy(parent_scaler, left_scaler, sizeof(unsigned int) * scaler_size);
+    for (i = 0; i < scaler_size; ++i)
       parent_scaler[i] += right_scaler[i];
   }
   else
   {
     if (left_scaler)
-      memcpy(parent_scaler, left_scaler, sizeof(unsigned int) * sites);
+      memcpy(parent_scaler, left_scaler, sizeof(unsigned int) * scaler_size);
     else
-      memcpy(parent_scaler, right_scaler, sizeof(unsigned int) * sites);
+      memcpy(parent_scaler, right_scaler, sizeof(unsigned int) * scaler_size);
   }
 }
 
@@ -50,7 +50,7 @@ PLL_EXPORT void pll_core_create_lookup_avx(unsigned int states,
                                            double * ttlookup,
                                            const double * left_matrix,
                                            const double * right_matrix,
-                                           unsigned int * tipmap,
+                                           const unsigned int * tipmap,
                                            unsigned int tipmap_size)
 {
   if (states == 4)
@@ -62,6 +62,17 @@ PLL_EXPORT void pll_core_create_lookup_avx(unsigned int states,
     return;
   }
 
+  if (states == 20)
+  {
+    pll_core_create_lookup_20x20_avx(rate_cats,
+                                   ttlookup,
+                                   left_matrix,
+                                   right_matrix,
+                                   tipmap,
+                                   tipmap_size);
+    return;
+  }
+
   unsigned int i,j,k,n,m;
   unsigned int states_padded = (states+3) & 0xFFFFFFFC;
   unsigned int maxstates = tipmap_size;
@@ -132,6 +143,122 @@ PLL_EXPORT void pll_core_create_lookup_avx(unsigned int states,
   }
 }
 
+PLL_EXPORT void pll_core_create_lookup_20x20_avx(unsigned int rate_cats,
+                                               double * ttlookup,
+                                               const double * left_matrix,
+                                               const double * right_matrix,
+                                               const unsigned int * tipmap,
+                                               unsigned int tipmap_size)
+{
+  unsigned int i,j,k,n,m;
+  unsigned int states = 20;
+  unsigned int states_padded = 20;
+  unsigned int maxstates = tipmap_size;
+
+  unsigned int log2_maxstates = (unsigned int)ceil(log2(maxstates));
+  unsigned int span_padded = states_padded*rate_cats;
+
+  /* precompute first the entries that contain only one 1 */
+  double terml = 0;
+  double termr = 0;
+
+  double * lookupl = pll_aligned_alloc(span_padded*maxstates*sizeof(double),
+                                       PLL_ALIGNMENT_AVX);
+
+  double * lookupr = pll_aligned_alloc(span_padded*maxstates*sizeof(double),
+                                       PLL_ALIGNMENT_AVX);
+
+  const double * lmat;
+  const double * rmat;
+  double * lookup;
+  double * ll = lookupl;
+  double * lr = lookupr;
+
+  for (j = 0; j < maxstates; ++j)
+  {
+    lmat = left_matrix;
+    rmat = right_matrix;
+
+    unsigned int state = tipmap[j];
+
+    int ss = __builtin_popcount(state) == 1 ? __builtin_ctz(state) : -1;
+
+    for (n = 0; n < rate_cats; ++n)
+    {
+      for (i = 0; i < states; ++i)
+      {
+        if (ss != -1)
+        {
+          /* special case for non-ambiguous states */
+          terml = lmat[ss];
+          termr = rmat[ss];
+        }
+        else
+        {
+          terml = 0;
+          termr = 0;
+          for (m = 0; m < states; ++m)
+          {
+            if ((state>>m) & 1)
+            {
+              terml += lmat[m];
+              termr += rmat[m];
+            }
+          }
+        }
+
+        lmat += states_padded;
+        rmat += states_padded;
+
+        ll[i] = terml;
+        lr[i] = termr;
+      }
+
+      ll += states_padded;
+      lr += states_padded;
+    }
+  }
+
+  assert(ll == lookupl + maxstates * span_padded);
+  assert(lr == lookupr + maxstates * span_padded);
+
+  /* go through all pairs j,k of states for the two tips; i is the inner
+     node state */
+  for (j = 0; j < maxstates; ++j)
+  {
+    for (k = 0; k < maxstates; ++k)
+    {
+      /* find offset of state-pair in the precomputation table */
+      lookup = ttlookup;
+      lookup += ((j << log2_maxstates) + k)*span_padded;
+
+      ll = lookupl + j * span_padded;
+      lr = lookupr + k * span_padded;
+
+      /* precompute the likelihood for each state and each rate */
+      for (n = 0; n < rate_cats; ++n)
+      {
+        for (i = 0; i < states; i += 4)
+        {
+          __m256d v_terml = _mm256_load_pd(ll+i);
+          __m256d v_termr = _mm256_load_pd(lr+i);
+
+          __m256d v_prod = _mm256_mul_pd(v_terml,v_termr);
+
+          _mm256_store_pd(lookup+i, v_prod);
+        }
+
+        lookup += states_padded;
+        ll += states_padded;
+        lr += states_padded;
+      }
+    }
+  }
+
+  pll_aligned_free(lookupl);
+  pll_aligned_free(lookupr);
+}
+
 PLL_EXPORT void pll_core_create_lookup_4x4_avx(unsigned int rate_cats,
                                                double * lookup,
                                                const double * left_matrix,
@@ -245,11 +372,14 @@ PLL_EXPORT void pll_core_update_partial_ii_4x4_avx(unsigned int sites,
                                                    const double * left_matrix,
                                                    const double * right_matrix,
                                                    const unsigned int * left_scaler,
-                                                   const unsigned int * right_scaler)
+                                                   const unsigned int * right_scaler,
+                                                   unsigned int attrib)
 {
   unsigned int states = 4;
   unsigned int n,k,i;
-  unsigned int scaling;
+  unsigned int scale_mode;  /* 0 = none, 1 = per-site, 2 = per-rate */
+  unsigned int scale_mask;
+  unsigned int init_mask;
 
   const double * lmat;
   const double * rmat;
@@ -259,15 +389,29 @@ PLL_EXPORT void pll_core_update_partial_ii_4x4_avx(unsigned int sites,
 
   unsigned int span = states * rate_cats;
 
-  /* add up the scale vector of the two children if available */
-  if (parent_scaler)
-    fill_parent_scaler(sites, parent_scaler, left_scaler, right_scaler);
+  if (!parent_scaler)
+  {
+    /* scaling disabled / not required */
+    scale_mode = init_mask = 0;
+  }
+  else
+  {
+    /* determine the scaling mode and init the vars accordingly */
+    scale_mode = (attrib & PLL_ATTRIB_RATE_SCALERS) ? 2 : 1;
+    init_mask = (scale_mode == 1) ? 0xF : 0;
+    const size_t scaler_size = (scale_mode == 2) ? sites * rate_cats : sites;
+    /* add up the scale vector of the two children if available */
+    fill_parent_scaler(scaler_size, parent_scaler, left_scaler, right_scaler);
+  }
+
+  __m256d v_scale_threshold = _mm256_set1_pd(PLL_SCALE_THRESHOLD);
+  __m256d v_scale_factor = _mm256_set1_pd(PLL_SCALE_FACTOR);
 
   for (n = 0; n < sites; ++n)
   {
     lmat = left_matrix;
     rmat = right_matrix;
-    scaling = (parent_scaler) ? 1 : 0;
+    scale_mask = init_mask;
 
     for (k = 0; k < rate_cats; ++k)
     {
@@ -341,24 +485,34 @@ PLL_EXPORT void pll_core_update_partial_ii_4x4_avx(unsigned int sites,
       /* compute x*y */
       xmm0 = _mm256_mul_pd(xmm4,ymm4);
 
-      _mm256_store_pd(parent_clv, xmm0);
+      /* check if scaling is needed for the current rate category */
+      __m256d v_cmp = _mm256_cmp_pd(xmm0, v_scale_threshold, _CMP_LT_OS);
+      const unsigned int rate_mask = _mm256_movemask_pd(v_cmp);
 
-      for (i = 0; i < states; ++i)
-        scaling = scaling && (parent_clv[i] < PLL_SCALE_THRESHOLD);
+      if (scale_mode == 2)
+      {
+        /* PER-RATE SCALING: if *all* entries of the *rate* CLV were below
+         * the threshold then scale (all) entries by PLL_SCALE_FACTOR */
+        if (rate_mask == 0xF)
+        {
+          xmm0 = _mm256_mul_pd(xmm0,v_scale_factor);
+          parent_scaler[n*rate_cats + k] += 1;
+        }
+      }
+      else
+        scale_mask = scale_mask & rate_mask;
+
+      _mm256_store_pd(parent_clv, xmm0);
 
       parent_clv += states;
       left_clv   += states;
       right_clv  += states;
     }
-    /* if *all* entries of the site CLV were below the threshold then scale
-       (all) entries by PLL_SCALE_FACTOR */
-    if (scaling)
-    {
-      __m256d v_scale_factor = _mm256_set_pd(PLL_SCALE_FACTOR,
-                                             PLL_SCALE_FACTOR,
-                                             PLL_SCALE_FACTOR,
-                                             PLL_SCALE_FACTOR);
 
+    /* PER-SITE SCALING: if *all* entries of the *site* CLV were below
+     * the threshold then scale (all) entries by PLL_SCALE_FACTOR */
+    if (scale_mask == 0xF)
+    {
       parent_clv -= span;
       for (i = 0; i < span; i += 4)
       {
@@ -380,7 +534,8 @@ PLL_EXPORT void pll_core_update_partial_tt_avx(unsigned int states,
                                                const unsigned char * left_tipchars,
                                                const unsigned char * right_tipchars,
                                                const double * lookup,
-                                               unsigned int tipstates_count)
+                                               unsigned int tipstates_count,
+                                               unsigned int attrib)
 {
   unsigned int j,k,n;
   unsigned int log2_maxstates = (unsigned int)ceil(log2(tipstates_count));
@@ -396,7 +551,8 @@ PLL_EXPORT void pll_core_update_partial_tt_avx(unsigned int states,
                                        parent_scaler,
                                        left_tipchars,
                                        right_tipchars,
-                                       lookup);
+                                       lookup,
+                                       attrib);
     return;
   }
 
@@ -423,15 +579,19 @@ PLL_EXPORT void pll_core_update_partial_tt_4x4_avx(unsigned int sites,
                                                    unsigned int * parent_scaler,
                                                    const unsigned char * left_tipchars,
                                                    const unsigned char * right_tipchars,
-                                                   const double * lookup)
+                                                   const double * lookup,
+                                                   unsigned int attrib)
 {
   unsigned int j,k,n;
   unsigned int states = 4;
   unsigned int span = states*rate_cats;
   const double * offset;
 
+  size_t scaler_size = (attrib & PLL_ATTRIB_RATE_SCALERS) ?
+                                                        sites*rate_cats : sites;
+
   if (parent_scaler)
-    memset(parent_scaler, 0, sizeof(unsigned int) * sites);
+    memset(parent_scaler, 0, sizeof(unsigned int) * scaler_size);
 
   for (n = 0; n < sites; ++n)
   {
@@ -441,7 +601,12 @@ PLL_EXPORT void pll_core_update_partial_tt_4x4_avx(unsigned int sites,
     offset = lookup;
     offset += ((j << 4) + k)*span;
 
-    memcpy(parent_clv, offset, span*sizeof(double));
+    //    memcpy(parent_clv, offset, span*sizeof(double));
+    for (k = 0; k < span; k += 4)
+    {
+      __m256d v_clv = _mm256_load_pd(offset + k);
+      _mm256_store_pd(parent_clv + k, v_clv);
+    }
 
     parent_clv += span;
   }
@@ -457,7 +622,9 @@ PLL_EXPORT void pll_core_update_partial_ti_avx(unsigned int states,
                                                const double * left_matrix,
                                                const double * right_matrix,
                                                const unsigned int * right_scaler,
-                                               const unsigned int * tipmap)
+                                               const unsigned int * tipmap,
+                                               unsigned int tipmap_size,
+                                               unsigned int attrib)
 {
   unsigned int i,j,k,n;
   unsigned int scaling;
@@ -470,7 +637,7 @@ PLL_EXPORT void pll_core_update_partial_ti_avx(unsigned int states,
 
   unsigned int lstate;
 
-  /* dedicated functions for 4x4 matrices */
+  /* dedicated functions for 4x4 matrices (DNA) */
   if (states == 4)
   {
     pll_core_update_partial_ti_4x4_avx(sites,
@@ -481,7 +648,25 @@ PLL_EXPORT void pll_core_update_partial_ti_avx(unsigned int states,
                                        right_clv,
                                        left_matrix,
                                        right_matrix,
-                                       right_scaler);
+                                       right_scaler,
+                                       attrib);
+    return;
+  }
+
+  /* dedicated functions for 20x20 matrices (AA) */
+  if (states == 20)
+  {
+    pll_core_update_partial_ti_20x20_avx(sites,
+                                       rate_cats,
+                                       parent_clv,
+                                       parent_scaler,
+                                       left_tipchars,
+                                       right_clv,
+                                       left_matrix,
+                                       right_matrix,
+                                       right_scaler,
+                                       tipmap,
+                                       tipmap_size);
     return;
   }
 
@@ -492,6 +677,7 @@ PLL_EXPORT void pll_core_update_partial_ti_avx(unsigned int states,
   size_t displacement = (states_padded - states) * (states_padded);
 
   __m256i mask;
+  __m256d v_scale_threshold = _mm256_set1_pd(PLL_SCALE_THRESHOLD);
 
   /* compute CLV */
   for (n = 0; n < sites; ++n)
@@ -499,7 +685,7 @@ PLL_EXPORT void pll_core_update_partial_ti_avx(unsigned int states,
     lmat = left_matrix;
     rmat = right_matrix;
 
-    scaling = (parent_scaler) ? 1 : 0;
+    scaling = (parent_scaler) ? 0xF : 0;
 
     lstate = tipmap[left_tipchars[n]];
 
@@ -547,48 +733,52 @@ PLL_EXPORT void pll_core_update_partial_ti_avx(unsigned int states,
                     ((lstate >> (lsb+1)) & 1) ? ~0 : 0,
                     ((lstate >> (lsb+0)) & 1) ? ~0 : 0);
 
+          if ((lstate >> lsb) & 0b1111)
+          {
+            v_mat    = _mm256_maskload_pd(lm0,mask);
+            v_terma0 = _mm256_add_pd(v_terma0,v_mat);
+
+            v_mat    = _mm256_maskload_pd(lm1,mask);
+            v_terma1 = _mm256_add_pd(v_terma1,v_mat);
+
+            v_mat    = _mm256_maskload_pd(lm2,mask);
+            v_terma2 = _mm256_add_pd(v_terma2,v_mat);
+
+            v_mat    = _mm256_maskload_pd(lm3,mask);
+            v_terma3 = _mm256_add_pd(v_terma3,v_mat);
+          }
+
           lsb += 4;
 
+          lm0 += 4;
+          lm1 += 4;
+          lm2 += 4;
+          lm3 += 4;
+
           v_rclv    = _mm256_load_pd(right_clv+j);
 
           /* row 0 */
-          v_mat    = _mm256_maskload_pd(lm0,mask);
-          v_terma0 = _mm256_add_pd(v_terma0,v_mat);
-
           v_mat    = _mm256_load_pd(rm0);
           v_termb0 = _mm256_add_pd(v_termb0,
                                    _mm256_mul_pd(v_mat,v_rclv));
-          lm0 += 4;
           rm0 += 4;
 
           /* row 1 */
-          v_mat    = _mm256_maskload_pd(lm1,mask);
-          v_terma1 = _mm256_add_pd(v_terma1,v_mat);
-
           v_mat    = _mm256_load_pd(rm1);
           v_termb1 = _mm256_add_pd(v_termb1,
                                    _mm256_mul_pd(v_mat,v_rclv));
-          lm1 += 4;
           rm1 += 4;
 
           /* row 2 */
-          v_mat    = _mm256_maskload_pd(lm2,mask);
-          v_terma2 = _mm256_add_pd(v_terma2,v_mat);
-
           v_mat    = _mm256_load_pd(rm2);
           v_termb2 = _mm256_add_pd(v_termb2,
                                    _mm256_mul_pd(v_mat,v_rclv));
-          lm2 += 4;
           rm2 += 4;
 
           /* row 3 */
-          v_mat    = _mm256_maskload_pd(lm3,mask);
-          v_terma3 = _mm256_add_pd(v_terma3,v_mat);
-
           v_mat    = _mm256_load_pd(rm3);
           v_termb3 = _mm256_add_pd(v_termb3,
                                    _mm256_mul_pd(v_mat,v_rclv));
-          lm3 += 4;
           rm3 += 4;
         }
 
@@ -630,6 +820,10 @@ PLL_EXPORT void pll_core_update_partial_ti_avx(unsigned int states,
 
         __m256d v_prod = _mm256_mul_pd(v_terma_sum,v_termb_sum);
 
+        /* check for scaling */
+        __m256d v_cmp = _mm256_cmp_pd(v_prod, v_scale_threshold, _CMP_LT_OS);
+        scaling = scaling & _mm256_movemask_pd(v_cmp);
+
         _mm256_store_pd(parent_clv+i, v_prod);
 
       }
@@ -640,20 +834,14 @@ PLL_EXPORT void pll_core_update_partial_ti_avx(unsigned int states,
       lmat -= displacement;
       rmat -= displacement;
 
-      for (j = 0; j < states; ++j)
-        scaling = scaling && (parent_clv[j] < PLL_SCALE_THRESHOLD);
-
       parent_clv += states_padded;
       right_clv  += states_padded;
     }
     /* if *all* entries of the site CLV were below the threshold then scale
        (all) entries by PLL_SCALE_FACTOR */
-    if (scaling)
+    if (scaling == 0xF)
     {
-      __m256d v_scale_factor = _mm256_set_pd(PLL_SCALE_FACTOR,
-                                             PLL_SCALE_FACTOR,
-                                             PLL_SCALE_FACTOR,
-                                             PLL_SCALE_FACTOR);
+      __m256d v_scale_factor = _mm256_set1_pd(PLL_SCALE_FACTOR);
 
       parent_clv -= span_padded;
       for (i = 0; i < span_padded; i += 4)
@@ -676,12 +864,16 @@ PLL_EXPORT void pll_core_update_partial_ti_4x4_avx(unsigned int sites,
                                                    const double * right_clv,
                                                    const double * left_matrix,
                                                    const double * right_matrix,
-                                                   const unsigned int * right_scaler)
+                                                   const unsigned int * right_scaler,
+                                                   unsigned int attrib)
 {
   unsigned int states = 4;
-  unsigned int scaling;
   unsigned int i,k,n;
 
+  unsigned int scale_mode;  /* 0 = none, 1 = per-site, 2 = per-rate */
+  unsigned int scale_mask;
+  unsigned int init_mask;
+
   const double * lmat;
   const double * rmat;
 
@@ -751,16 +943,31 @@ PLL_EXPORT void pll_core_update_partial_ti_4x4_avx(unsigned int sites,
     }
   }
 
-  /* update the parent scaler with the scaler of the right child */
-  if (parent_scaler)
-    fill_parent_scaler(sites, parent_scaler, NULL, right_scaler);
+  if (!parent_scaler)
+  {
+    /* scaling disabled / not required */
+    scale_mode = init_mask = 0;
+  }
+  else
+  {
+    /* determine the scaling mode and init the vars accordingly */
+    scale_mode = (attrib & PLL_ATTRIB_RATE_SCALERS) ? 2 : 1;
+    init_mask = (scale_mode == 1) ? 0xF : 0;
+    const size_t scaler_size = (scale_mode == 2) ? sites * rate_cats : sites;
+
+    /* update the parent scaler with the scaler of the right child */
+    fill_parent_scaler(scaler_size, parent_scaler, NULL, right_scaler);
+  }
+
+  __m256d v_scale_threshold = _mm256_set1_pd(PLL_SCALE_THRESHOLD);
+  __m256d v_scale_factor = _mm256_set1_pd(PLL_SCALE_FACTOR);
 
   /* iterate over sites and compute CLV entries */
   for (n = 0; n < sites; ++n)
   {
     rmat = right_matrix;
 
-    scaling = (parent_scaler) ? 1 : 0;
+    scale_mask = init_mask;
 
     lstate = left_tipchar[n];
 
@@ -805,23 +1012,245 @@ PLL_EXPORT void pll_core_update_partial_ti_4x4_avx(unsigned int sites,
       /* compute x*y */
       xmm0 = _mm256_mul_pd(xmm4,ymm4);
 
-      _mm256_store_pd(parent_clv, xmm0);
+      /* check if scaling is needed for the current rate category */
+      __m256d v_cmp = _mm256_cmp_pd(xmm0, v_scale_threshold, _CMP_LT_OS);
+      const unsigned int rate_mask = _mm256_movemask_pd(v_cmp);
 
-      for (i = 0; i < states; ++i)
-        scaling = scaling && (parent_clv[i] < PLL_SCALE_THRESHOLD);
+      if (scale_mode == 2)
+      {
+        /* PER-RATE SCALING: if *all* entries of the *rate* CLV were below
+         * the threshold then scale (all) entries by PLL_SCALE_FACTOR */
+        if (rate_mask == 0xF)
+        {
+          xmm0 = _mm256_mul_pd(xmm0, v_scale_factor);
+          parent_scaler[n*rate_cats + k] += 1;
+        }
+      }
+      else
+        scale_mask = scale_mask & rate_mask;
+
+      _mm256_store_pd(parent_clv, xmm0);
 
       parent_clv += states;
       right_clv  += states;
       loffset    += 4;
     }
+
+    /* PER-SITE SCALING: if *all* entries of the *site* CLV were below
+     * the threshold then scale (all) entries by PLL_SCALE_FACTOR */
+    if (scale_mask == 0xF)
+    {
+      parent_clv -= span;
+      for (i = 0; i < span; i += 4)
+      {
+        __m256d v_prod = _mm256_load_pd(parent_clv + i);
+        v_prod = _mm256_mul_pd(v_prod, v_scale_factor);
+        _mm256_store_pd(parent_clv + i, v_prod);
+      }
+      parent_clv += span;
+      parent_scaler[n] += 1;
+    }
+  }
+  pll_aligned_free(lookup);
+}
+
+PLL_EXPORT void pll_core_update_partial_ti_20x20_avx(unsigned int sites,
+                                                     unsigned int rate_cats,
+                                                     double * parent_clv,
+                                                     unsigned int * parent_scaler,
+                                                     const unsigned char * left_tipchar,
+                                                     const double * right_clv,
+                                                     const double * left_matrix,
+                                                     const double * right_matrix,
+                                                     const unsigned int * right_scaler,
+                                                     const unsigned int * tipmap,
+                                                     unsigned int tipmap_size)
+{
+  unsigned int states = 20;
+  unsigned int states_padded = states;
+  unsigned int maxstates = tipmap_size;
+  unsigned int scaling;
+  unsigned int i,j,k,n,m;
+
+  const double * lmat;
+  const double * rmat;
+
+  unsigned int span = states_padded * rate_cats;
+  unsigned int lstate;
+
+  __m256d xmm0,xmm1,xmm2,xmm3;
+
+  /* precompute a lookup table of four values per entry (one for each state),
+     for all 16 states (including ambiguities) and for each rate category. */
+  double * lookup = pll_aligned_alloc(maxstates*span*sizeof(double),
+                                      PLL_ALIGNMENT_AVX);
+  if (!lookup)
+  {
+    /* TODO: in the highly unlikely event that allocation fails, we should
+       resort to a non-lookup-precomputation version of this function,
+       available at commit e.g.  a4fc873fdc65741e402cdc1c59919375143d97d1 */
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf(pll_errmsg, 200, "Cannot allocate space for precomputation.");
+    return;
+  }
+
+  double * ptr = lookup;
+
+  /* precompute left-side values and store them in lookup table */
+  for (j = 0; j < maxstates; ++j)
+  {
+    lmat = left_matrix;
+
+    unsigned int state = tipmap[j];
+
+    int ss = __builtin_popcount(state) == 1 ? __builtin_ctz(state) : -1;
+
+    for (n = 0; n < rate_cats; ++n)
+    {
+      for (i = 0; i < states; ++i)
+      {
+        double terml;
+        if (ss != -1)
+        {
+          /* special case for non-ambiguous states */
+          terml = lmat[ss];
+        }
+        else
+        {
+          terml = 0;
+          for (m = 0; m < states; ++m)
+          {
+            if ((state>>m) & 1)
+            {
+              terml += lmat[m];
+            }
+          }
+        }
+
+        lmat += states;
+
+        ptr[i] = terml;
+      }
+
+      ptr += states;
+    }
+  }
+
+  /* update the parent scaler with the scaler of the right child */
+  if (parent_scaler)
+    fill_parent_scaler(sites, parent_scaler, NULL, right_scaler);
+
+  size_t displacement = (states_padded - states) * (states_padded);
+
+  __m256d v_scale_threshold = _mm256_set1_pd(PLL_SCALE_THRESHOLD);
+
+  /* iterate over sites and compute CLV entries */
+  for (n = 0; n < sites; ++n)
+  {
+    rmat = right_matrix;
+
+    scaling = (parent_scaler) ? 0xF : 0;
+
+    lstate = (unsigned int) left_tipchar[n];
+
+    unsigned int loffset = lstate*span;
+
+    for (k = 0; k < rate_cats; ++k)
+    {
+      /* iterate over quadruples of rows */
+      for (i = 0; i < states_padded; i += 4)
+      {
+
+        __m256d v_termb0 = _mm256_setzero_pd();
+        __m256d v_termb1 = _mm256_setzero_pd();
+        __m256d v_termb2 = _mm256_setzero_pd();
+        __m256d v_termb3 = _mm256_setzero_pd();
+
+        __m256d v_mat;
+        __m256d v_rclv;
+
+        /* point to the four rows of the right matrix */
+        const double * rm0 = rmat;
+        const double * rm1 = rm0 + states_padded;
+        const double * rm2 = rm1 + states_padded;
+        const double * rm3 = rm2 + states_padded;
+
+        /* iterate over quadruples of columns */
+        for (j = 0; j < states_padded; j += 4)
+        {
+          v_rclv    = _mm256_load_pd(right_clv+j);
+
+          /* row 0 */
+          v_mat    = _mm256_load_pd(rm0);
+          v_termb0 = _mm256_add_pd(v_termb0,
+                                   _mm256_mul_pd(v_mat,v_rclv));
+          rm0 += 4;
+
+          /* row 1 */
+          v_mat    = _mm256_load_pd(rm1);
+          v_termb1 = _mm256_add_pd(v_termb1,
+                                   _mm256_mul_pd(v_mat,v_rclv));
+          rm1 += 4;
+
+          /* row 2 */
+          v_mat    = _mm256_load_pd(rm2);
+          v_termb2 = _mm256_add_pd(v_termb2,
+                                   _mm256_mul_pd(v_mat,v_rclv));
+          rm2 += 4;
+
+          /* row 3 */
+          v_mat    = _mm256_load_pd(rm3);
+          v_termb3 = _mm256_add_pd(v_termb3,
+                                   _mm256_mul_pd(v_mat,v_rclv));
+          rm3 += 4;
+        }
+
+        /* point pmatrix to the next four rows */
+        rmat = rm3;
+
+        /* load x from precomputed lookup table */
+        __m256d v_terma_sum = _mm256_load_pd(lookup+loffset);
+        loffset += 4;
+
+        /* compute termb */
+        xmm0 = _mm256_unpackhi_pd(v_termb0,v_termb1);
+        xmm1 = _mm256_unpacklo_pd(v_termb0,v_termb1);
+
+        xmm2 = _mm256_unpackhi_pd(v_termb2,v_termb3);
+        xmm3 = _mm256_unpacklo_pd(v_termb2,v_termb3);
+
+        xmm0 = _mm256_add_pd(xmm0,xmm1);
+        xmm1 = _mm256_add_pd(xmm2,xmm3);
+
+        xmm2 = _mm256_permute2f128_pd(xmm0,xmm1, _MM_SHUFFLE(0,2,0,1));
+
+        xmm3 = _mm256_blend_pd(xmm0,xmm1,12);
+
+        __m256d v_termb_sum = _mm256_add_pd(xmm2,xmm3);
+
+        __m256d v_prod = _mm256_mul_pd(v_terma_sum,v_termb_sum);
+
+        /* check for scaling */
+        __m256d v_cmp = _mm256_cmp_pd(v_prod, v_scale_threshold, _CMP_LT_OS);
+        scaling = scaling & _mm256_movemask_pd(v_cmp);
+
+        _mm256_store_pd(parent_clv+i, v_prod);
+      }
+
+      /* reset pointers to point to the start of the next p-matrix, as the
+         vectorization assumes a square states_padded * states_padded matrix,
+         even though the real matrix is states * states_padded */
+      rmat -= displacement;
+
+      parent_clv += states_padded;
+      right_clv  += states_padded;
+    }
+
     /* if *all* entries of the site CLV were below the threshold then scale
        (all) entries by PLL_SCALE_FACTOR */
-    if (scaling)
+    if (scaling == 0xF)
     {
-      __m256d v_scale_factor = _mm256_set_pd(PLL_SCALE_FACTOR,
-                                             PLL_SCALE_FACTOR,
-                                             PLL_SCALE_FACTOR,
-                                             PLL_SCALE_FACTOR);
+      __m256d v_scale_factor = _mm256_set1_pd(PLL_SCALE_FACTOR);
 
       parent_clv -= span;
       for (i = 0; i < span; i += 4)
@@ -847,7 +1276,8 @@ PLL_EXPORT void pll_core_update_partial_ii_avx(unsigned int states,
                                                const double * left_matrix,
                                                const double * right_matrix,
                                                const unsigned int * left_scaler,
-                                               const unsigned int * right_scaler)
+                                               const unsigned int * right_scaler,
+                                               unsigned int attrib)
 {
   unsigned int i,j,k,n;
   unsigned int scaling;
@@ -870,7 +1300,8 @@ PLL_EXPORT void pll_core_update_partial_ii_avx(unsigned int states,
                                        left_matrix,
                                        right_matrix,
                                        left_scaler,
-                                       right_scaler);
+                                       right_scaler,
+                                       attrib);
     return;
   }
 
@@ -880,12 +1311,15 @@ PLL_EXPORT void pll_core_update_partial_ii_avx(unsigned int states,
 
   size_t displacement = (states_padded - states) * (states_padded);
 
+  __m256d v_scale_threshold = _mm256_set1_pd(PLL_SCALE_THRESHOLD);
+
   /* compute CLV */
   for (n = 0; n < sites; ++n)
   {
     lmat = left_matrix;
     rmat = right_matrix;
-    scaling = (parent_scaler) ? 1 : 0;
+    scaling = (parent_scaler) ? 0xF : 0;
+
     for (k = 0; k < rate_cats; ++k)
     {
       /* iterate over quadruples of rows */
@@ -1002,8 +1436,11 @@ PLL_EXPORT void pll_core_update_partial_ii_avx(unsigned int states,
 
         __m256d v_prod = _mm256_mul_pd(v_terma_sum,v_termb_sum);
 
-        _mm256_store_pd(parent_clv+i, v_prod);
+        /* check for scaling */
+        __m256d v_cmp = _mm256_cmp_pd(v_prod, v_scale_threshold, _CMP_LT_OS);
+        scaling = scaling & _mm256_movemask_pd(v_cmp);
 
+        _mm256_store_pd(parent_clv+i, v_prod);
       }
 
       /* reset pointers to point to the start of the next p-matrix, as the
@@ -1012,21 +1449,16 @@ PLL_EXPORT void pll_core_update_partial_ii_avx(unsigned int states,
       lmat -= displacement;
       rmat -= displacement;
 
-      for (j = 0; j < states; ++j)
-        scaling = scaling && (parent_clv[j] < PLL_SCALE_THRESHOLD);
-
       parent_clv += states_padded;
       left_clv   += states_padded;
       right_clv  += states_padded;
     }
+
     /* if *all* entries of the site CLV were below the threshold then scale
        (all) entries by PLL_SCALE_FACTOR */
-    if (scaling)
+    if (scaling == 0xF)
     {
-      __m256d v_scale_factor = _mm256_set_pd(PLL_SCALE_FACTOR,
-                                             PLL_SCALE_FACTOR,
-                                             PLL_SCALE_FACTOR,
-                                             PLL_SCALE_FACTOR);
+      __m256d v_scale_factor = _mm256_set1_pd(PLL_SCALE_FACTOR);
 
       parent_clv -= span_padded;
       for (i = 0; i < span_padded; i += 4)
diff --git a/src/core_partials_avx2.c b/src/core_partials_avx2.c
new file mode 100644
index 0000000..a16824b
--- /dev/null
+++ b/src/core_partials_avx2.c
@@ -0,0 +1,702 @@
+/*
+    Copyright (C) 2016 Tomas Flouri, Kassian Kobert
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Contact: Tomas Flouri <Tomas.Flouri at h-its.org>,
+    Exelixis Lab, Heidelberg Instutute for Theoretical Studies
+    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
+*/
+
+#include "pll.h"
+
+static void fill_parent_scaler(unsigned int sites,
+                               unsigned int * parent_scaler,
+                               const unsigned int * left_scaler,
+                               const unsigned int * right_scaler)
+{
+  unsigned int i;
+
+  if (!left_scaler && !right_scaler)
+    memset(parent_scaler, 0, sizeof(unsigned int) * sites);
+  else if (left_scaler && right_scaler)
+  {
+    memcpy(parent_scaler, left_scaler, sizeof(unsigned int) * sites);
+    for (i = 0; i < sites; ++i)
+      parent_scaler[i] += right_scaler[i];
+  }
+  else
+  {
+    if (left_scaler)
+      memcpy(parent_scaler, left_scaler, sizeof(unsigned int) * sites);
+    else
+      memcpy(parent_scaler, right_scaler, sizeof(unsigned int) * sites);
+  }
+}
+
+
+PLL_EXPORT void pll_core_update_partial_ti_avx2(unsigned int states,
+                                                unsigned int sites,
+                                                unsigned int rate_cats,
+                                                double * parent_clv,
+                                                unsigned int * parent_scaler,
+                                                const unsigned char * left_tipchars,
+                                                const double * right_clv,
+                                                const double * left_matrix,
+                                                const double * right_matrix,
+                                                const unsigned int * right_scaler,
+                                                const unsigned int * tipmap,
+                                                unsigned int tipmap_size,
+                                                unsigned int attrib)
+{
+  unsigned int i,j,k,n;
+  unsigned int scaling;
+
+  const double * lmat;
+  const double * rmat;
+
+  unsigned int states_padded = (states+3) & 0xFFFFFFFC;
+  unsigned int span_padded = states_padded * rate_cats;
+
+  unsigned int lstate;
+
+  /* dedicated functions for 4x4 matrices (DNA) */
+  if (states == 4)
+  {
+    /* no AVX2 kernel so far; rollback to AVX */
+    pll_core_update_partial_ti_4x4_avx(sites,
+                                       rate_cats,
+                                       parent_clv,
+                                       parent_scaler,
+                                       left_tipchars,
+                                       right_clv,
+                                       left_matrix,
+                                       right_matrix,
+                                       right_scaler,
+                                       attrib);
+    return;
+  }
+
+  /* dedicated functions for 20x20 matrices (AA) */
+  if (states == 20)
+  {
+    pll_core_update_partial_ti_20x20_avx2(sites,
+                                          rate_cats,
+                                          parent_clv,
+                                          parent_scaler,
+                                          left_tipchars,
+                                          right_clv,
+                                          left_matrix,
+                                          right_matrix,
+                                          right_scaler,
+                                          tipmap,
+                                          tipmap_size);
+    return;
+  }
+
+  /* add up the scale vector of the two children if available */
+  if (parent_scaler)
+    fill_parent_scaler(sites, parent_scaler, NULL, right_scaler);
+
+  size_t displacement = (states_padded - states) * (states_padded);
+
+  __m256i mask;
+  __m256d v_scale_threshold = _mm256_set1_pd(PLL_SCALE_THRESHOLD);
+
+  /* compute CLV */
+  for (n = 0; n < sites; ++n)
+  {
+    lmat = left_matrix;
+    rmat = right_matrix;
+
+    scaling = (parent_scaler) ? 0xF : 0;
+
+    lstate = tipmap[left_tipchars[n]];
+
+    for (k = 0; k < rate_cats; ++k)
+    {
+      /* iterate over quadruples of rows */
+      for (i = 0; i < states_padded; i += 4)
+      {
+
+        __m256d v_terma0 = _mm256_setzero_pd();
+        __m256d v_termb0 = _mm256_setzero_pd();
+        __m256d v_terma1 = _mm256_setzero_pd();
+        __m256d v_termb1 = _mm256_setzero_pd();
+        __m256d v_terma2 = _mm256_setzero_pd();
+        __m256d v_termb2 = _mm256_setzero_pd();
+        __m256d v_terma3 = _mm256_setzero_pd();
+        __m256d v_termb3 = _mm256_setzero_pd();
+
+        __m256d v_mat;
+        __m256d v_rclv;
+
+        /* point to the four rows of the left matrix */
+        const double * lm0 = lmat;
+        const double * lm1 = lm0 + states_padded;
+        const double * lm2 = lm1 + states_padded;
+        const double * lm3 = lm2 + states_padded;
+
+        /* point to the four rows of the right matrix */
+        const double * rm0 = rmat;
+        const double * rm1 = rm0 + states_padded;
+        const double * rm2 = rm1 + states_padded;
+        const double * rm3 = rm2 + states_padded;
+
+        /* set position of least significant bit in character state */
+        register int lsb = 0;
+
+        /* iterate over quadruples of columns */
+        for (j = 0; j < states_padded; j += 4)
+        {
+
+          /* set mask */
+          mask = _mm256_set_epi64x(
+                    ((lstate >> (lsb+3)) & 1) ? ~0 : 0,
+                    ((lstate >> (lsb+2)) & 1) ? ~0 : 0,
+                    ((lstate >> (lsb+1)) & 1) ? ~0 : 0,
+                    ((lstate >> (lsb+0)) & 1) ? ~0 : 0);
+
+          if ((lstate >> lsb) & 0b1111)
+          {
+            v_mat    = _mm256_maskload_pd(lm0,mask);
+            v_terma0 = _mm256_add_pd(v_terma0,v_mat);
+
+            v_mat    = _mm256_maskload_pd(lm1,mask);
+            v_terma1 = _mm256_add_pd(v_terma1,v_mat);
+
+            v_mat    = _mm256_maskload_pd(lm2,mask);
+            v_terma2 = _mm256_add_pd(v_terma2,v_mat);
+
+            v_mat    = _mm256_maskload_pd(lm3,mask);
+            v_terma3 = _mm256_add_pd(v_terma3,v_mat);
+          }
+
+          lsb += 4;
+
+          lm0 += 4;
+          lm1 += 4;
+          lm2 += 4;
+          lm3 += 4;
+
+          v_rclv    = _mm256_load_pd(right_clv+j);
+
+          /* row 0 */
+          v_mat    = _mm256_load_pd(rm0);
+          v_termb0 = _mm256_fmadd_pd(v_mat, v_rclv, v_termb0);
+          rm0 += 4;
+
+          /* row 1 */
+          v_mat    = _mm256_load_pd(rm1);
+          v_termb1 = _mm256_fmadd_pd(v_mat, v_rclv, v_termb1);
+          rm1 += 4;
+
+          /* row 2 */
+          v_mat    = _mm256_load_pd(rm2);
+          v_termb2 = _mm256_fmadd_pd(v_mat, v_rclv, v_termb2);
+          rm2 += 4;
+
+          /* row 3 */
+          v_mat    = _mm256_load_pd(rm3);
+          v_termb3 = _mm256_fmadd_pd(v_mat, v_rclv, v_termb3);
+          rm3 += 4;
+        }
+
+        /* point pmatrix to the next four rows */ 
+        lmat = lm3;
+        rmat = rm3;
+
+        __m256d xmm0 = _mm256_unpackhi_pd(v_terma0,v_terma1);
+        __m256d xmm1 = _mm256_unpacklo_pd(v_terma0,v_terma1);
+
+        __m256d xmm2 = _mm256_unpackhi_pd(v_terma2,v_terma3);
+        __m256d xmm3 = _mm256_unpacklo_pd(v_terma2,v_terma3);
+
+        xmm0 = _mm256_add_pd(xmm0,xmm1);
+        xmm1 = _mm256_add_pd(xmm2,xmm3);
+
+        xmm2 = _mm256_permute2f128_pd(xmm0,xmm1, _MM_SHUFFLE(0,2,0,1));
+
+        xmm3 = _mm256_blend_pd(xmm0,xmm1,12);
+
+        __m256d v_terma_sum = _mm256_add_pd(xmm2,xmm3);
+
+        /* compute termb */
+
+        xmm0 = _mm256_unpackhi_pd(v_termb0,v_termb1);
+        xmm1 = _mm256_unpacklo_pd(v_termb0,v_termb1);
+
+        xmm2 = _mm256_unpackhi_pd(v_termb2,v_termb3);
+        xmm3 = _mm256_unpacklo_pd(v_termb2,v_termb3);
+
+        xmm0 = _mm256_add_pd(xmm0,xmm1);
+        xmm1 = _mm256_add_pd(xmm2,xmm3);
+
+        xmm2 = _mm256_permute2f128_pd(xmm0,xmm1, _MM_SHUFFLE(0,2,0,1));
+
+        xmm3 = _mm256_blend_pd(xmm0,xmm1,12);
+
+        __m256d v_termb_sum = _mm256_add_pd(xmm2,xmm3);
+
+        __m256d v_prod = _mm256_mul_pd(v_terma_sum,v_termb_sum);
+
+        /* check for scaling */
+        __m256d v_cmp = _mm256_cmp_pd(v_prod, v_scale_threshold, _CMP_LT_OS);
+        scaling = scaling & _mm256_movemask_pd(v_cmp);
+
+        _mm256_store_pd(parent_clv+i, v_prod);
+
+      }
+
+      /* reset pointers to point to the start of the next p-matrix, as the
+         vectorization assumes a square states_padded * states_padded matrix,
+         even though the real matrix is states * states_padded */
+      lmat -= displacement;
+      rmat -= displacement;
+
+      parent_clv += states_padded;
+      right_clv  += states_padded;
+    }
+    /* if *all* entries of the site CLV were below the threshold then scale
+       (all) entries by PLL_SCALE_FACTOR */
+    if (scaling == 0xF)
+    {
+      __m256d v_scale_factor = _mm256_set1_pd(PLL_SCALE_FACTOR);
+
+      parent_clv -= span_padded;
+      for (i = 0; i < span_padded; i += 4)
+      {
+        __m256d v_prod = _mm256_load_pd(parent_clv + i);
+        v_prod = _mm256_mul_pd(v_prod,v_scale_factor);
+        _mm256_store_pd(parent_clv + i, v_prod);
+      }
+      parent_clv += span_padded;
+      parent_scaler[n] += 1;
+    }
+  }
+}
+
+PLL_EXPORT
+void pll_core_update_partial_ti_20x20_avx2(unsigned int sites,
+                                           unsigned int rate_cats,
+                                           double * parent_clv,
+                                           unsigned int * parent_scaler,
+                                           const unsigned char * left_tipchar,
+                                           const double * right_clv,
+                                           const double * left_matrix,
+                                           const double * right_matrix,
+                                           const unsigned int * right_scaler,
+                                           const unsigned int * tipmap,
+                                           unsigned int tipmap_size)
+{
+  unsigned int states = 20;
+  unsigned int states_padded = states;
+  unsigned int maxstates = tipmap_size;
+  unsigned int scaling;
+  unsigned int i,j,k,n,m;
+
+  const double * lmat;
+  const double * rmat;
+
+  unsigned int span = states_padded * rate_cats;
+  unsigned int lstate;
+
+  __m256d xmm0,xmm1,xmm2,xmm3;
+
+  /* precompute a lookup table of four values per entry (one for each state),
+     for all 16 states (including ambiguities) and for each rate category. */
+  double * lookup = pll_aligned_alloc(maxstates*span*sizeof(double),
+                                      PLL_ALIGNMENT_AVX);
+  if (!lookup)
+  {
+    /* TODO: in the highly unlikely event that allocation fails, we should
+       resort to a non-lookup-precomputation version of this function,
+       available at commit e.g.  a4fc873fdc65741e402cdc1c59919375143d97d1 */
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf(pll_errmsg, 200, "Cannot allocate space for precomputation.");
+    return;
+  }
+
+  double * ptr = lookup;
+
+  /* precompute left-side values and store them in lookup table */
+  for (j = 0; j < maxstates; ++j)
+  {
+    lmat = left_matrix;
+
+    unsigned int state = tipmap[j];
+
+    int ss = __builtin_popcount(state) == 1 ? __builtin_ctz(state) : -1;
+
+    for (n = 0; n < rate_cats; ++n)
+    {
+      for (i = 0; i < states; ++i)
+      {
+        double terml;
+        if (ss != -1)
+        {
+          /* special case for non-ambiguous states */
+          terml = lmat[ss];
+        }
+        else
+        {
+          terml = 0;
+          for (m = 0; m < states; ++m)
+          {
+            if ((state>>m) & 1)
+            {
+              terml += lmat[m];
+            }
+          }
+        }
+
+        lmat += states;
+
+        ptr[i] = terml;
+      }
+
+      ptr += states;
+    }
+  }
+
+  /* update the parent scaler with the scaler of the right child */
+  if (parent_scaler)
+    fill_parent_scaler(sites, parent_scaler, NULL, right_scaler);
+
+  size_t displacement = (states_padded - states) * (states_padded);
+
+  __m256d v_scale_threshold = _mm256_set1_pd(PLL_SCALE_THRESHOLD);
+
+  /* iterate over sites and compute CLV entries */
+  for (n = 0; n < sites; ++n)
+  {
+    rmat = right_matrix;
+
+    scaling = (parent_scaler) ? 0xF : 0;
+
+    lstate = (unsigned int) left_tipchar[n];
+
+    unsigned int loffset = lstate*span;
+
+    for (k = 0; k < rate_cats; ++k)
+    {
+      /* iterate over quadruples of rows */
+      for (i = 0; i < states_padded; i += 4)
+      {
+
+        __m256d v_termb0 = _mm256_setzero_pd();
+        __m256d v_termb1 = _mm256_setzero_pd();
+        __m256d v_termb2 = _mm256_setzero_pd();
+        __m256d v_termb3 = _mm256_setzero_pd();
+
+        __m256d v_mat;
+        __m256d v_rclv;
+
+        /* point to the four rows of the right matrix */
+        const double * rm0 = rmat;
+        const double * rm1 = rm0 + states_padded;
+        const double * rm2 = rm1 + states_padded;
+        const double * rm3 = rm2 + states_padded;
+
+        /* iterate over quadruples of columns */
+        for (j = 0; j < states_padded; j += 4)
+        {
+          v_rclv    = _mm256_load_pd(right_clv+j);
+
+          /* row 0 */
+          v_mat    = _mm256_load_pd(rm0);
+          v_termb0 = _mm256_fmadd_pd(v_mat, v_rclv, v_termb0);
+          rm0 += 4;
+
+          /* row 1 */
+          v_mat    = _mm256_load_pd(rm1);
+          v_termb1 = _mm256_fmadd_pd(v_mat, v_rclv, v_termb1);
+          rm1 += 4;
+
+          /* row 2 */
+          v_mat    = _mm256_load_pd(rm2);
+          v_termb2 = _mm256_fmadd_pd(v_mat, v_rclv, v_termb2);
+          rm2 += 4;
+
+          /* row 3 */
+          v_mat    = _mm256_load_pd(rm3);
+          v_termb3 = _mm256_fmadd_pd(v_mat, v_rclv, v_termb3);
+          rm3 += 4;
+        }
+
+        /* point pmatrix to the next four rows */
+        rmat = rm3;
+
+        /* load x from precomputed lookup table */
+        __m256d v_terma_sum = _mm256_load_pd(lookup+loffset);
+        loffset += 4;
+
+        /* compute termb */
+        xmm0 = _mm256_unpackhi_pd(v_termb0,v_termb1);
+        xmm1 = _mm256_unpacklo_pd(v_termb0,v_termb1);
+
+        xmm2 = _mm256_unpackhi_pd(v_termb2,v_termb3);
+        xmm3 = _mm256_unpacklo_pd(v_termb2,v_termb3);
+
+        xmm0 = _mm256_add_pd(xmm0,xmm1);
+        xmm1 = _mm256_add_pd(xmm2,xmm3);
+
+        xmm2 = _mm256_permute2f128_pd(xmm0,xmm1, _MM_SHUFFLE(0,2,0,1));
+
+        xmm3 = _mm256_blend_pd(xmm0,xmm1,12);
+
+        __m256d v_termb_sum = _mm256_add_pd(xmm2,xmm3);
+
+        __m256d v_prod = _mm256_mul_pd(v_terma_sum,v_termb_sum);
+
+        /* check for scaling */
+        __m256d v_cmp = _mm256_cmp_pd(v_prod, v_scale_threshold, _CMP_LT_OS);
+        scaling = scaling & _mm256_movemask_pd(v_cmp);
+
+        _mm256_store_pd(parent_clv+i, v_prod);
+      }
+
+      /* reset pointers to point to the start of the next p-matrix, as the
+         vectorization assumes a square states_padded * states_padded matrix,
+         even though the real matrix is states * states_padded */
+      rmat -= displacement;
+
+      parent_clv += states_padded;
+      right_clv  += states_padded;
+    }
+
+    /* if *all* entries of the site CLV were below the threshold then scale
+       (all) entries by PLL_SCALE_FACTOR */
+    if (scaling == 0xF)
+    {
+      __m256d v_scale_factor = _mm256_set1_pd(PLL_SCALE_FACTOR);
+
+      parent_clv -= span;
+      for (i = 0; i < span; i += 4)
+      {
+        __m256d v_prod = _mm256_load_pd(parent_clv + i);
+        v_prod = _mm256_mul_pd(v_prod,v_scale_factor);
+        _mm256_store_pd(parent_clv + i, v_prod);
+      }
+      parent_clv += span;
+      parent_scaler[n] += 1;
+    }
+  }
+  pll_aligned_free(lookup);
+}
+
+PLL_EXPORT void pll_core_update_partial_ii_avx2(unsigned int states,
+                                                unsigned int sites,
+                                                unsigned int rate_cats,
+                                                double * parent_clv,
+                                                unsigned int * parent_scaler,
+                                                const double * left_clv,
+                                                const double * right_clv,
+                                                const double * left_matrix,
+                                                const double * right_matrix,
+                                                const unsigned int * left_scaler,
+                                                const unsigned int * right_scaler,
+                                                unsigned int attrib)
+{
+  unsigned int i,j,k,n;
+  unsigned int scaling;
+
+  const double * lmat;
+  const double * rmat;
+
+  unsigned int states_padded = (states+3) & 0xFFFFFFFC;
+  unsigned int span_padded = states_padded * rate_cats;
+
+  /* dedicated functions for 4x4 matrices */
+  if (states == 4)
+  {
+    /* TODO: Implement avx2 4x4 case */
+    pll_core_update_partial_ii_4x4_avx(sites,
+                                       rate_cats,
+                                       parent_clv,
+                                       parent_scaler,
+                                       left_clv,
+                                       right_clv,
+                                       left_matrix,
+                                       right_matrix,
+                                       left_scaler,
+                                       right_scaler,
+                                       attrib);
+    return;
+  }
+
+  /* add up the scale vector of the two children if available */
+  if (parent_scaler)
+    fill_parent_scaler(sites, parent_scaler, left_scaler, right_scaler);
+
+  size_t displacement = (states_padded - states) * (states_padded);
+
+  __m256d v_scale_threshold = _mm256_set1_pd(PLL_SCALE_THRESHOLD);
+
+  /* compute CLV */
+  for (n = 0; n < sites; ++n)
+  {
+    lmat = left_matrix;
+    rmat = right_matrix;
+    scaling = (parent_scaler) ? 0xF : 0;
+
+    for (k = 0; k < rate_cats; ++k)
+    {
+      /* iterate over quadruples of rows */
+      for (i = 0; i < states_padded; i += 4)
+      {
+
+        __m256d v_terma0 = _mm256_setzero_pd();
+        __m256d v_termb0 = _mm256_setzero_pd();
+        __m256d v_terma1 = _mm256_setzero_pd();
+        __m256d v_termb1 = _mm256_setzero_pd();
+        __m256d v_terma2 = _mm256_setzero_pd();
+        __m256d v_termb2 = _mm256_setzero_pd();
+        __m256d v_terma3 = _mm256_setzero_pd();
+        __m256d v_termb3 = _mm256_setzero_pd();
+
+        __m256d v_mat;
+        __m256d v_lclv;
+        __m256d v_rclv;
+
+        /* point to the four rows of the left matrix */
+        const double * lm0 = lmat;
+        const double * lm1 = lm0 + states_padded;
+        const double * lm2 = lm1 + states_padded;
+        const double * lm3 = lm2 + states_padded;
+
+        /* point to the four rows of the right matrix */
+        const double * rm0 = rmat;
+        const double * rm1 = rm0 + states_padded;
+        const double * rm2 = rm1 + states_padded;
+        const double * rm3 = rm2 + states_padded;
+
+        /* iterate over quadruples of columns */
+        for (j = 0; j < states_padded; j += 4)
+        {
+          v_lclv    = _mm256_load_pd(left_clv+j);
+          v_rclv    = _mm256_load_pd(right_clv+j);
+
+          /* row 0 */
+          v_mat    = _mm256_load_pd(lm0);
+          v_terma0 = _mm256_fmadd_pd(v_mat, v_lclv, v_terma0);
+
+          v_mat    = _mm256_load_pd(rm0);
+          v_termb0 = _mm256_fmadd_pd(v_mat, v_rclv, v_termb0);
+          lm0 += 4;
+          rm0 += 4;
+
+          /* row 1 */
+          v_mat    = _mm256_load_pd(lm1);
+          v_terma1 = _mm256_fmadd_pd(v_mat, v_lclv, v_terma1);
+
+          v_mat    = _mm256_load_pd(rm1);
+          v_termb1 = _mm256_fmadd_pd(v_mat, v_rclv, v_termb1);
+          lm1 += 4;
+          rm1 += 4;
+
+          /* row 2 */
+          v_mat    = _mm256_load_pd(lm2);
+          v_terma2 = _mm256_fmadd_pd(v_mat, v_lclv, v_terma2);
+
+          v_mat    = _mm256_load_pd(rm2);
+          v_termb2 = _mm256_fmadd_pd(v_mat, v_rclv, v_termb2);
+          lm2 += 4;
+          rm2 += 4;
+
+          /* row 3 */
+          v_mat    = _mm256_load_pd(lm3);
+          v_terma3 = _mm256_fmadd_pd(v_mat, v_lclv, v_terma3);
+
+          v_mat    = _mm256_load_pd(rm3);
+          v_termb3 = _mm256_fmadd_pd(v_mat, v_rclv, v_termb3);
+
+          lm3 += 4;
+          rm3 += 4;
+        }
+
+        /* point pmatrix to the next four rows */ 
+        lmat = lm3;
+        rmat = rm3;
+
+        __m256d xmm0 = _mm256_unpackhi_pd(v_terma0,v_terma1);
+        __m256d xmm1 = _mm256_unpacklo_pd(v_terma0,v_terma1);
+
+        __m256d xmm2 = _mm256_unpackhi_pd(v_terma2,v_terma3);
+        __m256d xmm3 = _mm256_unpacklo_pd(v_terma2,v_terma3);
+
+        xmm0 = _mm256_add_pd(xmm0,xmm1);
+        xmm1 = _mm256_add_pd(xmm2,xmm3);
+
+        xmm2 = _mm256_permute2f128_pd(xmm0,xmm1, _MM_SHUFFLE(0,2,0,1));
+
+        xmm3 = _mm256_blend_pd(xmm0,xmm1,12);
+
+        __m256d v_terma_sum = _mm256_add_pd(xmm2,xmm3);
+
+        /* compute termb */
+
+        xmm0 = _mm256_unpackhi_pd(v_termb0,v_termb1);
+        xmm1 = _mm256_unpacklo_pd(v_termb0,v_termb1);
+
+        xmm2 = _mm256_unpackhi_pd(v_termb2,v_termb3);
+        xmm3 = _mm256_unpacklo_pd(v_termb2,v_termb3);
+
+        xmm0 = _mm256_add_pd(xmm0,xmm1);
+        xmm1 = _mm256_add_pd(xmm2,xmm3);
+
+        xmm2 = _mm256_permute2f128_pd(xmm0,xmm1, _MM_SHUFFLE(0,2,0,1));
+
+        xmm3 = _mm256_blend_pd(xmm0,xmm1,12);
+
+        __m256d v_termb_sum = _mm256_add_pd(xmm2,xmm3);
+
+        __m256d v_prod = _mm256_mul_pd(v_terma_sum,v_termb_sum);
+
+        /* check for scaling */
+        __m256d v_cmp = _mm256_cmp_pd(v_prod, v_scale_threshold, _CMP_LT_OS);
+        scaling = scaling & _mm256_movemask_pd(v_cmp);
+
+        _mm256_store_pd(parent_clv+i, v_prod);
+      }
+
+      /* reset pointers to point to the start of the next p-matrix, as the
+         vectorization assumes a square states_padded * states_padded matrix,
+         even though the real matrix is states * states_padded */
+      lmat -= displacement;
+      rmat -= displacement;
+
+      parent_clv += states_padded;
+      left_clv   += states_padded;
+      right_clv  += states_padded;
+    }
+
+    /* if *all* entries of the site CLV were below the threshold then scale
+       (all) entries by PLL_SCALE_FACTOR */
+    if (scaling == 0xF)
+    {
+      __m256d v_scale_factor = _mm256_set1_pd(PLL_SCALE_FACTOR);
+
+      parent_clv -= span_padded;
+      for (i = 0; i < span_padded; i += 4)
+      {
+        __m256d v_prod = _mm256_load_pd(parent_clv + i);
+        v_prod = _mm256_mul_pd(v_prod,v_scale_factor);
+        _mm256_store_pd(parent_clv + i, v_prod);
+      }
+      parent_clv += span_padded;
+      parent_scaler[n] += 1;
+    }
+  }
+}
diff --git a/src/core_partials_sse.c b/src/core_partials_sse.c
index 1d2c205..7c128c6 100644
--- a/src/core_partials_sse.c
+++ b/src/core_partials_sse.c
@@ -21,7 +21,7 @@
 
 #include "pll.h"
 
-static void fill_parent_scaler(unsigned int sites,
+static void fill_parent_scaler(unsigned int scaler_size,
                                unsigned int * parent_scaler,
                                const unsigned int * left_scaler,
                                const unsigned int * right_scaler)
@@ -29,19 +29,19 @@ static void fill_parent_scaler(unsigned int sites,
   unsigned int i;
 
   if (!left_scaler && !right_scaler)
-    memset(parent_scaler, 0, sizeof(unsigned int) * sites);
+    memset(parent_scaler, 0, sizeof(unsigned int) * scaler_size);
   else if (left_scaler && right_scaler)
   {
-    memcpy(parent_scaler, left_scaler, sizeof(unsigned int) * sites);
-    for (i = 0; i < sites; ++i)
+    memcpy(parent_scaler, left_scaler, sizeof(unsigned int) * scaler_size);
+    for (i = 0; i < scaler_size; ++i)
       parent_scaler[i] += right_scaler[i];
   }
   else
   {
     if (left_scaler)
-      memcpy(parent_scaler, left_scaler, sizeof(unsigned int) * sites);
+      memcpy(parent_scaler, left_scaler, sizeof(unsigned int) * scaler_size);
     else
-      memcpy(parent_scaler, right_scaler, sizeof(unsigned int) * sites);
+      memcpy(parent_scaler, right_scaler, sizeof(unsigned int) * scaler_size);
   }
 }
 
@@ -50,7 +50,7 @@ PLL_EXPORT void pll_core_create_lookup_sse(unsigned int states,
                                            double * ttlookup,
                                            const double * left_matrix,
                                            const double * right_matrix,
-                                           unsigned int * tipmap,
+                                           const unsigned int * tipmap,
                                            unsigned int tipmap_size)
 {
   if (states == 4)
@@ -390,7 +390,8 @@ PLL_EXPORT void pll_core_update_partial_tt_sse(unsigned int states,
                                                const unsigned char * left_tipchars,
                                                const unsigned char * right_tipchars,
                                                const double * lookup,
-                                               unsigned int tipstates_count)
+                                               unsigned int tipstates_count,
+                                               unsigned int attrib)
 {
   unsigned int j,k,n;
   unsigned int log2_maxstates = (unsigned int)ceil(log2(tipstates_count));
@@ -406,7 +407,8 @@ PLL_EXPORT void pll_core_update_partial_tt_sse(unsigned int states,
                                        parent_scaler,
                                        left_tipchars,
                                        right_tipchars,
-                                       lookup);
+                                       lookup,
+                                       attrib);
     return;
   }
 
@@ -433,15 +435,19 @@ PLL_EXPORT void pll_core_update_partial_tt_4x4_sse(unsigned int sites,
                                                    unsigned int * parent_scaler,
                                                    const unsigned char * left_tipchars,
                                                    const unsigned char * right_tipchars,
-                                                   const double * lookup)
+                                                   const double * lookup,
+                                                   unsigned int attrib)
 {
   unsigned int j,k,n;
   unsigned int states = 4;
   unsigned int span = states*rate_cats;
   const double * offset;
 
+  size_t scaler_size = (attrib & PLL_ATTRIB_RATE_SCALERS) ?
+                                                        sites*rate_cats : sites;
+
   if (parent_scaler)
-    memset(parent_scaler, 0, sizeof(unsigned int) * sites);
+    memset(parent_scaler, 0, sizeof(unsigned int) * scaler_size);
 
   for (n = 0; n < sites; ++n)
   {
@@ -466,23 +472,39 @@ PLL_EXPORT void pll_core_update_partial_ii_4x4_sse(unsigned int sites,
                                                    const double * left_matrix,
                                                    const double * right_matrix,
                                                    const unsigned int * left_scaler,
-                                                   const unsigned int * right_scaler)
+                                                   const unsigned int * right_scaler,
+                                                   unsigned int attrib)
 {
   unsigned int states = 4;
+  unsigned int span = states * rate_cats;
   unsigned int n,k,i;
-  unsigned int scaling;
 
   const double * lmat;
   const double * rmat;
 
-  __m128d xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7,xmm8,xmm9;
+  unsigned int scale_mode;  /* 0 = none, 1 = per-site, 2 = per-rate */
+  unsigned int scale_mask;
+  unsigned int init_mask;
 
-  unsigned int span = states * rate_cats;
+  __m128d v_scale_threshold = _mm_set1_pd(PLL_SCALE_THRESHOLD);
+  __m128d v_scale_factor = _mm_set1_pd(PLL_SCALE_FACTOR);
 
-  /* add up the scale vector of the two children if available */
-  if (parent_scaler)
-    fill_parent_scaler(sites, parent_scaler, left_scaler, right_scaler);
+  __m128d xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7,xmm8,xmm9,xmm10;
 
+  if (parent_scaler)
+  {
+    /* determine the scaling mode and init the vars accordingly */
+    scale_mode = (attrib & PLL_ATTRIB_RATE_SCALERS) ? 2 : 1;
+    init_mask = (scale_mode == 1) ? 0x3 : 0;
+    const size_t scaler_size = (scale_mode == 2) ? sites * rate_cats : sites;
+    /* add up the scale vector of the two children if available */
+    fill_parent_scaler(scaler_size, parent_scaler, left_scaler, right_scaler);
+  }
+  else
+  {
+    /* scaling disabled / not required */
+    scale_mode = init_mask = 0;
+  }
 
   /* 
      perform the following matrix multiplications:
@@ -509,7 +531,7 @@ PLL_EXPORT void pll_core_update_partial_ii_4x4_sse(unsigned int sites,
   {
     lmat = left_matrix;
     rmat = right_matrix;
-    scaling = (parent_scaler) ? 1 : 0;
+    scale_mask = init_mask;
 
     for (k = 0; k < rate_cats; ++k)
     {
@@ -565,7 +587,6 @@ PLL_EXPORT void pll_core_update_partial_ii_4x4_sse(unsigned int sites,
       xmm8 = _mm_hadd_pd(xmm2,xmm6);
       xmm2 = _mm_hadd_pd(xmm5,xmm7);
       xmm9 = _mm_mul_pd(xmm8,xmm2);
-      _mm_store_pd(parent_clv, xmm9);
 
       rmat += states;
       lmat += states;
@@ -610,33 +631,50 @@ PLL_EXPORT void pll_core_update_partial_ii_4x4_sse(unsigned int sites,
       xmm8 = _mm_mul_pd(xmm3,xmm7);
 
       xmm7 = _mm_load_pd(rmat+2);
-      xmm9 = _mm_mul_pd(xmm4,xmm7);
+      xmm10 = _mm_mul_pd(xmm4,xmm7);
 
       /* calculate (b13*d1 + b15*d3 | b14*d2 + b16*d4) */
-      xmm7 = _mm_add_pd(xmm8,xmm9);         /* needed (4) */
+      xmm7 = _mm_add_pd(xmm8,xmm10);         /* needed (4) */
 
       rmat += states;
       lmat += states;
       
       xmm8 = _mm_hadd_pd(xmm2,xmm6);
       xmm2 = _mm_hadd_pd(xmm5,xmm7);
-      xmm9 = _mm_mul_pd(xmm8,xmm2);
-      _mm_store_pd(parent_clv+2, xmm9);
+      xmm10 = _mm_mul_pd(xmm8,xmm2);
 
-      for (i = 0; i < states; ++i)
-        scaling = scaling && (parent_clv[i] < PLL_SCALE_THRESHOLD);
+      /* check if scaling is needed for the current rate category */
+      __m128d v_cmp = _mm_cmplt_pd(xmm9, v_scale_threshold);
+      unsigned int rate_mask = _mm_movemask_pd(v_cmp);
+      v_cmp = _mm_cmplt_pd(xmm10, v_scale_threshold);
+      rate_mask = rate_mask & _mm_movemask_pd(v_cmp);
+
+      if (scale_mode == 2)
+      {
+        /* PER-RATE SCALING: if *all* entries of the *rate* CLV were below
+         * the threshold then scale (all) entries by PLL_SCALE_FACTOR */
+        if (rate_mask == 0x3)
+        {
+          xmm9 = _mm_mul_pd(xmm9,v_scale_factor);
+          xmm10 = _mm_mul_pd(xmm10,v_scale_factor);
+          parent_scaler[n*rate_cats + k] += 1;
+        }
+      }
+      else
+        scale_mask = scale_mask & rate_mask;
+
+      _mm_store_pd(parent_clv, xmm9);
+      _mm_store_pd(parent_clv+2, xmm10);
 
       parent_clv += states;
       left_clv   += states;
       right_clv  += states;
     }
-    /* if *all* entries of the site CLV were below the threshold then scale
-       (all) entries by PLL_SCALE_FACTOR */
-    if (scaling)
-    {
-      __m128d v_scale_factor = _mm_set_pd(PLL_SCALE_FACTOR,
-                                          PLL_SCALE_FACTOR);
 
+    /* PER-SITE SCALING: if *all* entries of the *site* CLV were below
+     * the threshold then scale (all) entries by PLL_SCALE_FACTOR */
+    if (scale_mask == 0x3)
+    {
       parent_clv -= span;
       for (i = 0; i < span; i += 2)
       {
@@ -660,7 +698,8 @@ PLL_EXPORT void pll_core_update_partial_ii_sse(unsigned int states,
                                                const double * left_matrix,
                                                const double * right_matrix,
                                                const unsigned int * left_scaler,
-                                               const unsigned int * right_scaler)
+                                               const unsigned int * right_scaler,
+                                               unsigned int attrib)
 {
   unsigned int i,j,k,n;
   unsigned int scaling;
@@ -682,7 +721,8 @@ PLL_EXPORT void pll_core_update_partial_ii_sse(unsigned int states,
                                        left_matrix,
                                        right_matrix,
                                        left_scaler,
-                                       right_scaler);
+                                       right_scaler,
+                                       attrib);
     return;
   }
 
@@ -798,19 +838,25 @@ PLL_EXPORT void pll_core_update_partial_ti_4x4_sse(unsigned int sites,
                                                    const double * right_clv,
                                                    const double * left_matrix,
                                                    const double * right_matrix,
-                                                   const unsigned int * right_scaler)
+                                                   const unsigned int * right_scaler,
+                                                   unsigned int attrib)
 {
   unsigned int states = 4;
-  unsigned int scaling;
+  unsigned int span = states * rate_cats;
   unsigned int i,k,n;
+  unsigned int lstate;
 
   const double * lmat;
   const double * rmat;
 
-  unsigned int span = states * rate_cats;
-  unsigned int lstate;
+  unsigned int scale_mode;  /* 0 = none, 1 = per-site, 2 = per-rate */
+  unsigned int scale_mask;
+  unsigned int init_mask;
 
-  __m128d xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7;
+  __m128d v_scale_threshold = _mm_set1_pd(PLL_SCALE_THRESHOLD);
+  __m128d v_scale_factor = _mm_set1_pd(PLL_SCALE_FACTOR);
+
+  __m128d xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7,xmm8;
   __m128d ymm0,ymm1,ymm2,ymm3;
 
   /* precompute a lookup table of four values per entry (one for each state),
@@ -903,16 +949,27 @@ PLL_EXPORT void pll_core_update_partial_ti_4x4_sse(unsigned int sites,
     }
   }
 
-  /* update the parent scaler with the scaler of the right child */
   if (parent_scaler)
-    fill_parent_scaler(sites, parent_scaler, NULL, right_scaler);
+  {
+    /* determine the scaling mode and init the vars accordingly */
+    scale_mode = (attrib & PLL_ATTRIB_RATE_SCALERS) ? 2 : 1;
+    init_mask = (scale_mode == 1) ? 0x3 : 0;
+    const size_t scaler_size = (scale_mode == 2) ? sites * rate_cats : sites;
+    /* update the parent scaler with the scaler of the right child */
+    fill_parent_scaler(scaler_size, parent_scaler, NULL, right_scaler);
+  }
+  else
+  {
+    /* scaling disabled / not required */
+    scale_mode = init_mask = 0;
+  }
 
   /* iterate over sites and compute CLV entries */
   for (n = 0; n < sites; ++n)
   {
     rmat = right_matrix;
 
-    scaling = (parent_scaler) ? 1 : 0;
+    scale_mask = init_mask;
 
     lstate = left_tipchar[n];
 
@@ -950,24 +1007,23 @@ PLL_EXPORT void pll_core_update_partial_ti_4x4_sse(unsigned int sites,
       /* load precomputed lookup table into xmm2 */
       xmm2 = _mm_load_pd(lookup+loffset);
       xmm3 = _mm_mul_pd(xmm4,xmm2);
-      _mm_store_pd(parent_clv,xmm3);
 
       /* load right pmatrix row2 */
       xmm2 = _mm_load_pd(rmat);
-      xmm3 = _mm_load_pd(rmat+2);
+      xmm8 = _mm_load_pd(rmat+2);
 
       xmm4 = _mm_mul_pd(xmm0,xmm2);
-      xmm5 = _mm_mul_pd(xmm1,xmm3);
+      xmm5 = _mm_mul_pd(xmm1,xmm8);
       xmm6 = _mm_add_pd(xmm4,xmm5);    /* a1*c1 + a3*c3 | a2*c2 + a4*c4 */
 
       rmat += states;
 
       /* load right pmatrix row3 */
       xmm2 = _mm_load_pd(rmat);
-      xmm3 = _mm_load_pd(rmat+2);
+      xmm8 = _mm_load_pd(rmat+2);
 
       xmm4 = _mm_mul_pd(xmm0,xmm2);
-      xmm5 = _mm_mul_pd(xmm1,xmm3);
+      xmm5 = _mm_mul_pd(xmm1,xmm8);
       xmm7 = _mm_add_pd(xmm4,xmm5);    /* a5*c1 + a7*c3 | a6*c2 + a8*c4 */
 
       rmat += states;
@@ -977,23 +1033,43 @@ PLL_EXPORT void pll_core_update_partial_ti_4x4_sse(unsigned int sites,
 
       /* load precomputed lookup table into xmm2 */
       xmm2 = _mm_load_pd(lookup+loffset+2);
-      xmm3 = _mm_mul_pd(xmm4,xmm2);
-      _mm_store_pd(parent_clv+2,xmm3);
+      xmm8 = _mm_mul_pd(xmm4,xmm2);
+
+//      for (i = 0; i < states; ++i)
+//        scaling = scaling && (parent_clv[i] < PLL_SCALE_THRESHOLD);
 
-      for (i = 0; i < states; ++i)
-        scaling = scaling && (parent_clv[i] < PLL_SCALE_THRESHOLD);
+      /* check if scaling is needed for the current rate category */
+      __m128d v_cmp = _mm_cmplt_pd(xmm3, v_scale_threshold);
+      unsigned int rate_mask = _mm_movemask_pd(v_cmp);
+      v_cmp = _mm_cmplt_pd(xmm8, v_scale_threshold);
+      rate_mask = rate_mask & _mm_movemask_pd(v_cmp);
+
+      if (scale_mode == 2)
+      {
+        /* PER-RATE SCALING: if *all* entries of the *rate* CLV were below
+         * the threshold then scale (all) entries by PLL_SCALE_FACTOR */
+        if (rate_mask == 0x3)
+        {
+          xmm3 = _mm_mul_pd(xmm3,v_scale_factor);
+          xmm8 = _mm_mul_pd(xmm8,v_scale_factor);
+          parent_scaler[n*rate_cats + k] += 1;
+        }
+      }
+      else
+        scale_mask = scale_mask & rate_mask;
+
+      _mm_store_pd(parent_clv,xmm3);
+      _mm_store_pd(parent_clv+2,xmm8);
 
       parent_clv += states;
       right_clv  += states;
       loffset    += 4;
     }
-    /* if *all* entries of the site CLV were below the threshold then scale
-       (all) entries by PLL_SCALE_FACTOR */
-    if (scaling)
-    {
-      __m128d v_scale_factor = _mm_set_pd(PLL_SCALE_FACTOR,
-                                          PLL_SCALE_FACTOR);
 
+    /* PER-SITE SCALING: if *all* entries of the *site* CLV were below
+     * the threshold then scale (all) entries by PLL_SCALE_FACTOR */
+    if (scale_mask == 0x3)
+    {
       parent_clv -= span;
       for (i = 0; i < span; i += 2)
       {
@@ -1018,7 +1094,9 @@ PLL_EXPORT void pll_core_update_partial_ti_sse(unsigned int states,
                                                const double * left_matrix,
                                                const double * right_matrix,
                                                const unsigned int * right_scaler,
-                                               const unsigned int * tipmap)
+                                               const unsigned int * tipmap,
+                                               unsigned int tipmap_size,
+                                               unsigned int attrib)
 {
   int scaling;
   unsigned int i,j,k,n;
@@ -1041,7 +1119,8 @@ PLL_EXPORT void pll_core_update_partial_ti_sse(unsigned int states,
                                        right_clv,
                                        left_matrix,
                                        right_matrix,
-                                       right_scaler);
+                                       right_scaler,
+                                       attrib);
     return;
   }
 
diff --git a/src/core_pmatrix.c b/src/core_pmatrix.c
index b308971..4fb1e84 100644
--- a/src/core_pmatrix.c
+++ b/src/core_pmatrix.c
@@ -24,14 +24,14 @@
 PLL_EXPORT int pll_core_update_pmatrix(double ** pmatrix,
                                        unsigned int states,
                                        unsigned int rate_cats,
-                                       double * rates,
+                                       const double * rates,
                                        const double * branch_lengths,
                                        const unsigned int * matrix_indices,
                                        const unsigned int * params_indices,
-                                       double * prop_invar,
-                                       double ** eigenvals,
-                                       double ** eigenvecs,
-                                       double ** inv_eigenvecs,
+                                       const double * prop_invar,
+                                       double * const * eigenvals,
+                                       double * const * eigenvecs,
+                                       double * const * inv_eigenvecs,
                                        unsigned int count,
                                        unsigned int attrib)
 {
@@ -47,8 +47,8 @@ PLL_EXPORT int pll_core_update_pmatrix(double ** pmatrix,
   double * pmat;
 
 
-  #ifdef HAVE_SSE
-  if (attrib & PLL_ATTRIB_ARCH_SSE)
+  #ifdef HAVE_SSE3
+  if (attrib & PLL_ATTRIB_ARCH_SSE && PLL_STAT(sse3_present))
   {
     if (states == 4)
     {
@@ -70,7 +70,7 @@ PLL_EXPORT int pll_core_update_pmatrix(double ** pmatrix,
   }
   #endif
   #ifdef HAVE_AVX
-  if (attrib & PLL_ATTRIB_ARCH_AVX)
+  if (attrib & PLL_ATTRIB_ARCH_AVX && PLL_STAT(avx_present))
   {
     if (states == 4)
     {
@@ -86,6 +86,57 @@ PLL_EXPORT int pll_core_update_pmatrix(double ** pmatrix,
                                              inv_eigenvecs,
                                              count);
     }
+    if (states == 20)
+    {
+      return pll_core_update_pmatrix_20x20_avx(pmatrix,
+                                             rate_cats,
+                                             rates,
+                                             branch_lengths,
+                                             matrix_indices,
+                                             params_indices,
+                                             prop_invar,
+                                             eigenvals,
+                                             eigenvecs,
+                                             inv_eigenvecs,
+                                             count);
+    }
+    /* this line is never called, but should we disable the else case above,
+       then states_padded must be set to this value */
+    states_padded = (states+3) & 0xFFFFFFFC;
+  }
+  #endif
+  #ifdef HAVE_AVX2
+  if (attrib & PLL_ATTRIB_ARCH_AVX2 && PLL_STAT(avx2_present))
+  {
+    if (states == 4)
+    {
+      /* use AVX version here since FMA doesn't make much sense */
+      return pll_core_update_pmatrix_4x4_avx(pmatrix,
+                                             rate_cats,
+                                             rates,
+                                             branch_lengths,
+                                             matrix_indices,
+                                             params_indices,
+                                             prop_invar,
+                                             eigenvals,
+                                             eigenvecs,
+                                             inv_eigenvecs,
+                                             count);
+    }
+    if (states == 20)
+    {
+      return pll_core_update_pmatrix_20x20_avx2(pmatrix,
+                                             rate_cats,
+                                             rates,
+                                             branch_lengths,
+                                             matrix_indices,
+                                             params_indices,
+                                             prop_invar,
+                                             eigenvals,
+                                             eigenvecs,
+                                             inv_eigenvecs,
+                                             count);
+    }
     /* this line is never called, but should we disable the else case above,
        then states_padded must be set to this value */
     states_padded = (states+3) & 0xFFFFFFFC;
@@ -141,6 +192,26 @@ PLL_EXPORT int pll_core_update_pmatrix(double ** pmatrix,
             expd[j] = exp(evals[j] * rates[n] * branch_lengths[i]);
         }
 
+        /* check if all values of expd are approximately one */
+        for (k=0, j=0; j < states; ++j)
+          if ((expd[j] > PLL_ONE_MIN) && (expd[j] < PLL_ONE_MAX))
+            ++k;
+
+        /* if yes, it means we are multiplying the inverse eigenvectors matrix
+           by the eigenvectors matrix, and essentially the resulting pmatrix is
+           the identity matrix. This is done to prevent having numerical issues
+           (negative entries in the pmatrix) which can occur due to the
+           different floating point representations of one in expd */
+        if (k == states)
+        {
+          /* set identity matrix */
+          for (j = 0; j < states; ++j)
+            for (k = 0; k < states; ++k)
+              pmat[j*states_padded + k] = (j == k) ? 1 : 0;
+
+          continue;
+        }
+
         for (j = 0; j < states; ++j)
           for (k = 0; k < states; ++k)
             temp[j*states+k] = inv_evecs[j*states+k] * expd[k];
@@ -158,6 +229,11 @@ PLL_EXPORT int pll_core_update_pmatrix(double ** pmatrix,
           }
         }
       }
+      #ifdef DEBUG
+      for (j = 0; j < states; ++j)
+        for (k = 0; k < states; ++k)
+          assert(pmat[j*states_padded+k] >= 0);
+      #endif
     }
   }
 
diff --git a/src/core_pmatrix_avx.c b/src/core_pmatrix_avx.c
index 64d1f05..439b10e 100644
--- a/src/core_pmatrix_avx.c
+++ b/src/core_pmatrix_avx.c
@@ -21,16 +21,34 @@
 
 #include "pll.h"
 
+#define ONESTEP(x,baseptr)                                      \
+            ymm0 = _mm256_load_pd(baseptr+0);                   \
+            ymm1 = _mm256_load_pd(baseptr+4);                   \
+            ymm2 = _mm256_load_pd(baseptr+8);                   \
+            ymm3 = _mm256_load_pd(baseptr+12);                  \
+            ymm4 = _mm256_load_pd(baseptr+16);                  \
+                                                                \
+            ymm5 = _mm256_mul_pd(xmm4,ymm0);                    \
+            ymm6 = _mm256_mul_pd(xmm5,ymm1);                    \
+            ymm7 = _mm256_mul_pd(xmm6,ymm2);                    \
+            ymm8 = _mm256_mul_pd(xmm7,ymm3);                    \
+            ymm9 = _mm256_mul_pd(xmm8,ymm4);                    \
+                                                                \
+            xmm1 = _mm256_add_pd(ymm5,ymm6);                    \
+            ymm5 = _mm256_add_pd(xmm1,ymm7);                    \
+            ymm6 = _mm256_add_pd(ymm5,ymm8);                    \
+            x    = _mm256_add_pd(ymm6,ymm9);    /* row x */
+
 PLL_EXPORT int pll_core_update_pmatrix_4x4_avx(double ** pmatrix,
                                                unsigned int rate_cats,
-                                               double * rates,
+                                               const double * rates,
                                                const double * branch_lengths,
                                                const unsigned int * matrix_indices,
                                                const unsigned int * params_indices,
-                                               double * prop_invar,
-                                               double ** eigenvals,
-                                               double ** eigenvecs,
-                                               double ** inv_eigenvecs,
+                                               const double * prop_invar,
+                                               double * const * eigenvals,
+                                               double * const * eigenvecs,
+                                               double * const * inv_eigenvecs,
                                                unsigned int count)
 {
   unsigned int i,n;
@@ -54,8 +72,11 @@ PLL_EXPORT int pll_core_update_pmatrix_4x4_avx(double ** pmatrix,
   }
 
   __m256d xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7,xmm8,xmm9;
-  __m256d ymm0,ymm1,ymm2,ymm3,ymm4,ymm5,ymm6,ymm7;
+  __m256d ymm0,ymm1,ymm2,ymm3,ymm4,ymm5,ymm6,ymm7,ymm8,ymm9;
+
   xmm0 = _mm256_setzero_pd();
+  ymm8 = _mm256_set1_pd(PLL_ONE_MIN);
+  ymm9 = _mm256_set1_pd(PLL_ONE_MAX);
 
   for (i = 0; i < count; ++i)
   {
@@ -113,127 +134,157 @@ PLL_EXPORT int pll_core_update_pmatrix_4x4_avx(double ** pmatrix,
                              exp(expd[1]),
                              exp(expd[0]));
 
-        /* multiply inverse eigenvectors with computed result */
-        xmm2 = _mm256_load_pd(inv_evecs+0);
-        xmm4 = _mm256_load_pd(inv_evecs+4);
-        xmm5 = _mm256_load_pd(inv_evecs+8);
-        xmm6 = _mm256_load_pd(inv_evecs+12);
 
-        xmm7 = _mm256_mul_pd(xmm2,xmm1);       /* temp row 0 */
-        xmm2 = _mm256_mul_pd(xmm4,xmm1);       /* temp row 1 */
-        xmm4 = _mm256_mul_pd(xmm5,xmm1);       /* temp row 2 */
-        xmm5 = _mm256_mul_pd(xmm6,xmm1);       /* temp row 3 */
+        /* check if all values of expd are approximately one */
+        xmm2 = _mm256_cmp_pd(xmm1, ymm8, _CMP_GT_OS);
+        xmm4 = _mm256_cmp_pd(xmm1, ymm9, _CMP_LT_OS);
+        xmm5 = _mm256_and_pd(xmm2,xmm4);
+
+        
+        /* if yes, it means we are multiplying the inverse eigenvectors matrix
+           by the eigenvectors matrix, and essentially the resulting pmatrix is
+           the identity matrix. This is done to prevent having numerical issues
+           (negative entries in the pmatrix) which can occur due to the
+           different floating point representations of one in expd. Otherwise,
+           proceed as normal and multiply eigenvector matrices with expd  */
+        if (_mm256_movemask_pd(xmm5) == 0xF)
+        {
+          _mm256_store_pd(pmat+0,xmm0);
+          _mm256_store_pd(pmat+4,xmm0);
+          _mm256_store_pd(pmat+8,xmm0);
+          _mm256_store_pd(pmat+12,xmm0);
+
+          pmat[0] = pmat[5] = pmat[10] = pmat[15] = 1;
+        }
+        else
+        {
+          /* multiply inverse eigenvectors with computed result */
+          xmm2 = _mm256_load_pd(inv_evecs+0);
+          xmm4 = _mm256_load_pd(inv_evecs+4);
+          xmm5 = _mm256_load_pd(inv_evecs+8);
+          xmm6 = _mm256_load_pd(inv_evecs+12);
 
-        /* transpose eigenvector */
-        xmm6 = _mm256_load_pd(evecs+0); 
-        xmm1 = _mm256_load_pd(evecs+4);
-        xmm8 = _mm256_load_pd(evecs+8);
-        xmm9 = _mm256_load_pd(evecs+12);
+          xmm7 = _mm256_mul_pd(xmm2,xmm1);       /* temp row 0 */
+          xmm2 = _mm256_mul_pd(xmm4,xmm1);       /* temp row 1 */
+          xmm4 = _mm256_mul_pd(xmm5,xmm1);       /* temp row 2 */
+          xmm5 = _mm256_mul_pd(xmm6,xmm1);       /* temp row 3 */
 
-        /* transpose eigenvectors */
-        ymm0 = _mm256_unpacklo_pd(xmm6,xmm1);
-        ymm1 = _mm256_unpackhi_pd(xmm6,xmm1);
-        ymm2 = _mm256_unpacklo_pd(xmm8,xmm9);
-        ymm3 = _mm256_unpackhi_pd(xmm8,xmm9);
+          /* transpose eigenvector */
+          xmm6 = _mm256_load_pd(evecs+0); 
+          xmm1 = _mm256_load_pd(evecs+4);
+          xmm8 = _mm256_load_pd(evecs+8);
+          xmm9 = _mm256_load_pd(evecs+12);
 
-        xmm6 = _mm256_permute2f128_pd(ymm0,ymm2,_MM_SHUFFLE(0,2,0,0));
-        xmm1 = _mm256_permute2f128_pd(ymm1,ymm3,_MM_SHUFFLE(0,2,0,0));
-        xmm8 = _mm256_permute2f128_pd(ymm0,ymm2,_MM_SHUFFLE(0,3,0,1));
-        xmm9 = _mm256_permute2f128_pd(ymm1,ymm3,_MM_SHUFFLE(0,3,0,1));
+          /* transpose eigenvectors */
+          ymm0 = _mm256_unpacklo_pd(xmm6,xmm1);
+          ymm1 = _mm256_unpackhi_pd(xmm6,xmm1);
+          ymm2 = _mm256_unpacklo_pd(xmm8,xmm9);
+          ymm3 = _mm256_unpackhi_pd(xmm8,xmm9);
 
-        /* pmat row 0*/
+          xmm6 = _mm256_permute2f128_pd(ymm0,ymm2,_MM_SHUFFLE(0,2,0,0));
+          xmm1 = _mm256_permute2f128_pd(ymm1,ymm3,_MM_SHUFFLE(0,2,0,0));
+          xmm8 = _mm256_permute2f128_pd(ymm0,ymm2,_MM_SHUFFLE(0,3,0,1));
+          xmm9 = _mm256_permute2f128_pd(ymm1,ymm3,_MM_SHUFFLE(0,3,0,1));
 
-        ymm0 = _mm256_mul_pd(xmm7,xmm6);
-        ymm1 = _mm256_mul_pd(xmm7,xmm1);
-        ymm2 = _mm256_mul_pd(xmm7,xmm8);
-        ymm3 = _mm256_mul_pd(xmm7,xmm9);
+          /* pmat row 0*/
 
-        /* create a vector with the sums of ymm0, ymm1, ymm2, ymm3 */
-        ymm4 = _mm256_unpackhi_pd(ymm0,ymm1);
-        ymm5 = _mm256_unpacklo_pd(ymm0,ymm1);
+          ymm0 = _mm256_mul_pd(xmm7,xmm6);
+          ymm1 = _mm256_mul_pd(xmm7,xmm1);
+          ymm2 = _mm256_mul_pd(xmm7,xmm8);
+          ymm3 = _mm256_mul_pd(xmm7,xmm9);
 
-        ymm6 = _mm256_unpackhi_pd(ymm2,ymm3);
-        ymm7 = _mm256_unpacklo_pd(ymm2,ymm3);
+          /* create a vector with the sums of ymm0, ymm1, ymm2, ymm3 */
+          ymm4 = _mm256_unpackhi_pd(ymm0,ymm1);
+          ymm5 = _mm256_unpacklo_pd(ymm0,ymm1);
 
-        ymm0 = _mm256_add_pd(ymm4,ymm5);
-        ymm1 = _mm256_add_pd(ymm6,ymm7);
+          ymm6 = _mm256_unpackhi_pd(ymm2,ymm3);
+          ymm7 = _mm256_unpacklo_pd(ymm2,ymm3);
 
-        ymm2 = _mm256_permute2f128_pd(ymm0,ymm1, _MM_SHUFFLE(0,2,0,1));
-        ymm3 = _mm256_blend_pd(ymm0,ymm1,12);
-        ymm0 = _mm256_add_pd(ymm2,ymm3);
+          ymm0 = _mm256_add_pd(ymm4,ymm5);
+          ymm1 = _mm256_add_pd(ymm6,ymm7);
 
-        _mm256_store_pd(pmat+0,ymm0);
+          ymm2 = _mm256_permute2f128_pd(ymm0,ymm1, _MM_SHUFFLE(0,2,0,1));
+          ymm3 = _mm256_blend_pd(ymm0,ymm1,12);
+          ymm0 = _mm256_add_pd(ymm2,ymm3);
 
-        /* pmat row 1 */
+          _mm256_store_pd(pmat+0,ymm0);
 
-        ymm0 = _mm256_mul_pd(xmm2,xmm6);
-        ymm1 = _mm256_mul_pd(xmm2,xmm1);
-        ymm2 = _mm256_mul_pd(xmm2,xmm8);
-        ymm3 = _mm256_mul_pd(xmm2,xmm9);
+          /* pmat row 1 */
 
-        /* create a vector with the sums of ymm0, ymm1, ymm2, ymm3 */
-        ymm4 = _mm256_unpackhi_pd(ymm0,ymm1);
-        ymm5 = _mm256_unpacklo_pd(ymm0,ymm1);
+          ymm0 = _mm256_mul_pd(xmm2,xmm6);
+          ymm1 = _mm256_mul_pd(xmm2,xmm1);
+          ymm2 = _mm256_mul_pd(xmm2,xmm8);
+          ymm3 = _mm256_mul_pd(xmm2,xmm9);
 
-        ymm6 = _mm256_unpackhi_pd(ymm2,ymm3);
-        ymm7 = _mm256_unpacklo_pd(ymm2,ymm3);
+          /* create a vector with the sums of ymm0, ymm1, ymm2, ymm3 */
+          ymm4 = _mm256_unpackhi_pd(ymm0,ymm1);
+          ymm5 = _mm256_unpacklo_pd(ymm0,ymm1);
 
-        ymm0 = _mm256_add_pd(ymm4,ymm5);
-        ymm1 = _mm256_add_pd(ymm6,ymm7);
+          ymm6 = _mm256_unpackhi_pd(ymm2,ymm3);
+          ymm7 = _mm256_unpacklo_pd(ymm2,ymm3);
 
-        ymm2 = _mm256_permute2f128_pd(ymm0,ymm1, _MM_SHUFFLE(0,2,0,1));
-        ymm3 = _mm256_blend_pd(ymm0,ymm1,12);
-        ymm0 = _mm256_add_pd(ymm2,ymm3);
+          ymm0 = _mm256_add_pd(ymm4,ymm5);
+          ymm1 = _mm256_add_pd(ymm6,ymm7);
 
-        _mm256_store_pd(pmat+4,ymm0);
+          ymm2 = _mm256_permute2f128_pd(ymm0,ymm1, _MM_SHUFFLE(0,2,0,1));
+          ymm3 = _mm256_blend_pd(ymm0,ymm1,12);
+          ymm0 = _mm256_add_pd(ymm2,ymm3);
 
-        /* pmat row 2 */
+          _mm256_store_pd(pmat+4,ymm0);
 
-        ymm0 = _mm256_mul_pd(xmm4,xmm6);
-        ymm1 = _mm256_mul_pd(xmm4,xmm1);
-        ymm2 = _mm256_mul_pd(xmm4,xmm8);
-        ymm3 = _mm256_mul_pd(xmm4,xmm9);
+          /* pmat row 2 */
 
-        /* create a vector with the sums of ymm0, ymm1, ymm2, ymm3 */
-        ymm4 = _mm256_unpackhi_pd(ymm0,ymm1);
-        ymm5 = _mm256_unpacklo_pd(ymm0,ymm1);
+          ymm0 = _mm256_mul_pd(xmm4,xmm6);
+          ymm1 = _mm256_mul_pd(xmm4,xmm1);
+          ymm2 = _mm256_mul_pd(xmm4,xmm8);
+          ymm3 = _mm256_mul_pd(xmm4,xmm9);
 
-        ymm6 = _mm256_unpackhi_pd(ymm2,ymm3);
-        ymm7 = _mm256_unpacklo_pd(ymm2,ymm3);
+          /* create a vector with the sums of ymm0, ymm1, ymm2, ymm3 */
+          ymm4 = _mm256_unpackhi_pd(ymm0,ymm1);
+          ymm5 = _mm256_unpacklo_pd(ymm0,ymm1);
 
-        ymm0 = _mm256_add_pd(ymm4,ymm5);
-        ymm1 = _mm256_add_pd(ymm6,ymm7);
+          ymm6 = _mm256_unpackhi_pd(ymm2,ymm3);
+          ymm7 = _mm256_unpacklo_pd(ymm2,ymm3);
 
-        ymm2 = _mm256_permute2f128_pd(ymm0,ymm1, _MM_SHUFFLE(0,2,0,1));
-        ymm3 = _mm256_blend_pd(ymm0,ymm1,12);
-        ymm0 = _mm256_add_pd(ymm2,ymm3);
+          ymm0 = _mm256_add_pd(ymm4,ymm5);
+          ymm1 = _mm256_add_pd(ymm6,ymm7);
 
-        _mm256_store_pd(pmat+8,ymm0);
+          ymm2 = _mm256_permute2f128_pd(ymm0,ymm1, _MM_SHUFFLE(0,2,0,1));
+          ymm3 = _mm256_blend_pd(ymm0,ymm1,12);
+          ymm0 = _mm256_add_pd(ymm2,ymm3);
 
-        /* pmat row 3 */
+          _mm256_store_pd(pmat+8,ymm0);
 
-        ymm0 = _mm256_mul_pd(xmm5,xmm6);
-        ymm1 = _mm256_mul_pd(xmm5,xmm1);
-        ymm2 = _mm256_mul_pd(xmm5,xmm8);
-        ymm3 = _mm256_mul_pd(xmm5,xmm9);
+          /* pmat row 3 */
 
-        /* create a vector with the sums of ymm0, ymm1, ymm2, ymm3 */
-        ymm4 = _mm256_unpackhi_pd(ymm0,ymm1);
-        ymm5 = _mm256_unpacklo_pd(ymm0,ymm1);
+          ymm0 = _mm256_mul_pd(xmm5,xmm6);
+          ymm1 = _mm256_mul_pd(xmm5,xmm1);
+          ymm2 = _mm256_mul_pd(xmm5,xmm8);
+          ymm3 = _mm256_mul_pd(xmm5,xmm9);
 
-        ymm6 = _mm256_unpackhi_pd(ymm2,ymm3);
-        ymm7 = _mm256_unpacklo_pd(ymm2,ymm3);
+          /* create a vector with the sums of ymm0, ymm1, ymm2, ymm3 */
+          ymm4 = _mm256_unpackhi_pd(ymm0,ymm1);
+          ymm5 = _mm256_unpacklo_pd(ymm0,ymm1);
 
-        ymm0 = _mm256_add_pd(ymm4,ymm5);
-        ymm1 = _mm256_add_pd(ymm6,ymm7);
+          ymm6 = _mm256_unpackhi_pd(ymm2,ymm3);
+          ymm7 = _mm256_unpacklo_pd(ymm2,ymm3);
 
-        ymm2 = _mm256_permute2f128_pd(ymm0,ymm1, _MM_SHUFFLE(0,2,0,1));
-        ymm3 = _mm256_blend_pd(ymm0,ymm1,12);
-        ymm0 = _mm256_add_pd(ymm2,ymm3);
+          ymm0 = _mm256_add_pd(ymm4,ymm5);
+          ymm1 = _mm256_add_pd(ymm6,ymm7);
 
-        _mm256_store_pd(pmat+12,ymm0);
+          ymm2 = _mm256_permute2f128_pd(ymm0,ymm1, _MM_SHUFFLE(0,2,0,1));
+          ymm3 = _mm256_blend_pd(ymm0,ymm1,12);
+          ymm0 = _mm256_add_pd(ymm2,ymm3);
 
+          _mm256_store_pd(pmat+12,ymm0);
+        }
       }
+      #ifdef DEBUG
+      unsigned int j,k;
+      for (j = 0; j < 4; ++j)
+        for (k = 0; k < 4; ++k)
+          assert(pmat[j*4+k] >= 0);
+      #endif
       pmat = pmat+16;
     }
   }
@@ -241,3 +292,293 @@ PLL_EXPORT int pll_core_update_pmatrix_4x4_avx(double ** pmatrix,
   pll_aligned_free(expd);
   return PLL_SUCCESS;
 }
+
+PLL_EXPORT int pll_core_update_pmatrix_20x20_avx(double ** pmatrix,
+                                                 unsigned int rate_cats,
+                                                 const double * rates,
+                                                 const double * branch_lengths,
+                                                 const unsigned int * matrix_indices,
+                                                 const unsigned int * params_indices,
+                                                 const double * prop_invar,
+                                                 double * const * eigenvals,
+                                                 double * const * eigenvecs,
+                                                 double * const * inv_eigenvecs,
+                                                 unsigned int count)
+{
+  unsigned int i,n,j,k;
+  double pinvar;
+
+  int * transposed;
+  double * evecs;
+  double * inv_evecs;
+  double * evals;
+  double * pmat;
+  double * expd;
+  double * temp;
+  double ** tran_evecs;
+
+  expd = (double *)pll_aligned_alloc(20*sizeof(double), PLL_ALIGNMENT_AVX);
+  temp = (double *)pll_aligned_alloc(400*sizeof(double), PLL_ALIGNMENT_AVX);
+
+  /* transposed eigen vectors */
+  transposed = (int *)calloc((size_t)rate_cats, sizeof(int));
+  tran_evecs= (double **)calloc((size_t)rate_cats, sizeof(double *));
+
+  if (!expd || !temp || !transposed || !tran_evecs)
+  {
+    if (expd) pll_aligned_free(expd);
+    if (temp) pll_aligned_free(temp);
+    if (transposed) free(transposed);
+    if (tran_evecs) free(tran_evecs);
+
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+    return PLL_FAILURE;
+  }
+
+  /* transpose eigenvectors */
+  /* TODO: The same trick can be applied for exponentiations */
+  for (n = 0; n < rate_cats; ++n)
+  {
+    int index = params_indices[n];
+
+    if (!transposed[index])
+    {
+      /* allocate space for transposed eigenvectors and check that
+         allocation succeeds */
+      double * tran = (double *)pll_aligned_alloc(400*sizeof(double),
+                                                  PLL_ALIGNMENT_AVX);
+      if (!tran)
+      {
+        pll_aligned_free(expd);
+        pll_aligned_free(temp);
+        free(transposed);
+        for (i = 0; i < n; ++i)
+          if (tran_evecs[i]) pll_aligned_free(tran_evecs[i]);
+        free(tran_evecs);
+
+        pll_errno = PLL_ERROR_MEM_ALLOC;
+        snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+        return PLL_FAILURE;
+      }
+
+      /* transpose eigen vectors */
+      evecs = eigenvecs[index];
+      for (i = 0; i < 20; ++i)
+      {
+        for (j = 0; j < 20; ++j)
+          tran[i*20+j] = evecs[j*20+i];
+      }
+      
+      /* update pointers and indicate that the eigen vector for the current
+         rate matrix with index was updated */
+      tran_evecs[index] = tran;
+      transposed[index] = 1;
+    }
+  }
+  free(transposed);
+
+  __m256d xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7,xmm8;
+  __m256d ymm0,ymm1,ymm2,ymm3,ymm4,ymm5,ymm6,ymm7,ymm8,ymm9;
+  __m256d zmm0,zmm1,zmm2,zmm3;
+
+  ymm8 = _mm256_set1_pd(PLL_ONE_MIN);
+  ymm9 = _mm256_set1_pd(PLL_ONE_MAX);
+
+  double * tran = NULL;
+  for (i = 0; i < count; ++i)
+  {
+    assert(branch_lengths[i] >= 0);
+    
+    xmm3 = _mm256_set1_pd(branch_lengths[i]);
+    pmat = pmatrix[matrix_indices[i]];
+
+    /* compute effective pmatrix location */
+    for (n = 0; n < rate_cats; ++n)
+    {
+      pinvar = prop_invar[params_indices[n]];
+      tran = tran_evecs[params_indices[n]];
+      inv_evecs = inv_eigenvecs[params_indices[n]];
+      evals = eigenvals[params_indices[n]];
+
+      /* if branch length is zero then set the p-matrix to identity matrix */
+      if (!branch_lengths[i])
+      {
+        xmm0 = _mm256_setzero_pd();
+        for (j = 0; j < 20; ++j)
+        {
+          _mm256_store_pd(pmat+0,xmm0);
+          _mm256_store_pd(pmat+4,xmm0);
+          _mm256_store_pd(pmat+8,xmm0);
+          _mm256_store_pd(pmat+12,xmm0);
+          _mm256_store_pd(pmat+16,xmm0);
+          pmat[j] = 1;
+          pmat += 20;
+        }
+        continue;
+      }
+
+      #ifdef DEBUG
+      double * dbg_pmat = pmat;   
+      #endif
+
+      /* exponentiate eigenvalues */
+      xmm2 = _mm256_set1_pd(rates[n]);
+
+      if (pinvar > PLL_MISC_EPSILON)
+        xmm6 = _mm256_set1_pd(1.0 - pinvar);
+
+      for (k = 0; k < 5; ++k)
+      {
+        xmm1 = _mm256_load_pd(evals+k*4);
+
+        /* scalar multiplication with rates */
+        xmm4 = _mm256_mul_pd(xmm1,xmm2);
+
+        /* scalar multiplication with branch lengths */
+        xmm5 = _mm256_mul_pd(xmm4,xmm3);
+
+        if (pinvar > PLL_MISC_EPSILON)
+        {
+          xmm5 = _mm256_div_pd(xmm5,xmm6);
+        }
+
+        _mm256_store_pd(expd+k*4,xmm5);
+      }
+
+      for (k = 0; k < 20; ++k)
+        expd[k] = exp(expd[k]);
+        
+      /* load expd */
+      xmm4 = _mm256_load_pd(expd+0);
+      xmm5 = _mm256_load_pd(expd+4);
+      xmm6 = _mm256_load_pd(expd+8);
+      xmm7 = _mm256_load_pd(expd+12);
+      xmm8 = _mm256_load_pd(expd+16);
+
+      /* check if all values of expd are approximately one */
+      ymm0 = _mm256_cmp_pd(xmm4, ymm8, _CMP_GT_OS);
+      ymm1 = _mm256_cmp_pd(xmm4, ymm9, _CMP_LT_OS);
+      ymm2 = _mm256_and_pd(ymm0,ymm1);                 /* expd[0..3] */
+      ymm0 = _mm256_cmp_pd(xmm5, ymm8, _CMP_GT_OS);
+      ymm1 = _mm256_cmp_pd(xmm5, ymm9, _CMP_LT_OS);
+      ymm3 = _mm256_and_pd(ymm0,ymm1);                 /* expd[4..7] */
+      ymm0 = _mm256_cmp_pd(xmm6, ymm8, _CMP_GT_OS);
+      ymm1 = _mm256_cmp_pd(xmm6, ymm9, _CMP_LT_OS);
+      ymm4 = _mm256_and_pd(ymm0,ymm1);                 /* expd[8..11] */
+      ymm0 = _mm256_cmp_pd(xmm7, ymm8, _CMP_GT_OS);
+      ymm1 = _mm256_cmp_pd(xmm7, ymm9, _CMP_LT_OS);
+      ymm5 = _mm256_and_pd(ymm0,ymm1);                 /* expd[12..15] */
+      ymm0 = _mm256_cmp_pd(xmm8, ymm8, _CMP_GT_OS);
+      ymm1 = _mm256_cmp_pd(xmm8, ymm9, _CMP_LT_OS);
+      ymm6 = _mm256_and_pd(ymm0,ymm1);                 /* expd[12..15] */
+
+      /* AND the results of comnparisons and check the mask to see if all
+         values of expd are approximately one. If they are, it means we are
+         multiplying the inverse eigenvectors matrix by the eigenvectors
+         matrix, and essentially the resulting pmatrix is the identity matrix.
+         This is done to prevent having numerical issues (negative entries in
+         the pmatrix) which can occur due to the different floating point
+         representations of one in expd. Otherwise, proceed as normal and
+         multiply eigenvector matrices with expd  */
+      ymm0 = _mm256_and_pd(ymm2,ymm3);
+      ymm1 = _mm256_and_pd(ymm0,ymm4);
+      ymm0 = _mm256_and_pd(ymm1,ymm5);
+      ymm1 = _mm256_and_pd(ymm0,ymm6);
+      if (_mm256_movemask_pd(ymm1) == 0xF)
+      {
+        xmm0 = _mm256_setzero_pd();
+        for (j = 0; j < 20; ++j)
+        {
+          _mm256_store_pd(pmat+0,xmm0);
+          _mm256_store_pd(pmat+4,xmm0);
+          _mm256_store_pd(pmat+8,xmm0);
+          _mm256_store_pd(pmat+12,xmm0);
+          _mm256_store_pd(pmat+16,xmm0);
+          pmat[j] = 1;
+          pmat += 20;
+        }
+        continue;
+      }
+
+      /* compute temp matrix */
+      for (k = 0; k < 400; k += 20)
+      {
+        ymm0 = _mm256_load_pd(inv_evecs+k+0);
+        ymm1 = _mm256_load_pd(inv_evecs+k+4);
+        ymm2 = _mm256_load_pd(inv_evecs+k+8);
+        ymm3 = _mm256_load_pd(inv_evecs+k+12);
+        ymm4 = _mm256_load_pd(inv_evecs+k+16);
+
+        ymm5 = _mm256_mul_pd(xmm4,ymm0);
+        ymm6 = _mm256_mul_pd(xmm5,ymm1);
+        ymm7 = _mm256_mul_pd(xmm6,ymm2);
+        ymm8 = _mm256_mul_pd(xmm7,ymm3);
+        ymm9 = _mm256_mul_pd(xmm8,ymm4);
+
+        _mm256_store_pd(temp+k+0,ymm5);
+        _mm256_store_pd(temp+k+4,ymm6);
+        _mm256_store_pd(temp+k+8,ymm7);
+        _mm256_store_pd(temp+k+12,ymm8);
+        _mm256_store_pd(temp+k+16,ymm9);
+      }
+
+      for (j = 0; j < 400; j += 20)
+      {
+        xmm4 = _mm256_load_pd(temp+j+0);
+        xmm5 = _mm256_load_pd(temp+j+4);
+        xmm6 = _mm256_load_pd(temp+j+8);
+        xmm7 = _mm256_load_pd(temp+j+12);
+        xmm8 = _mm256_load_pd(temp+j+16);
+
+        /* process four rows at a time */
+        for (k = 0; k < 400; k += 80)
+        {
+          /* row 0 */
+          ONESTEP(zmm0,tran+k+0);
+
+          /* row 1 */
+          ONESTEP(zmm1,tran+k+20);
+
+          /* row 2 */
+          ONESTEP(zmm2,tran+k+40);
+
+          /* row 3 */
+          ONESTEP(zmm3,tran+k+60);
+
+          /* create a vector with the sums of zmm0, zmm1, zmm2, zmm3 */
+          ymm4 = _mm256_unpackhi_pd(zmm0,zmm1);
+          ymm5 = _mm256_unpacklo_pd(zmm0,zmm1);
+
+          ymm6 = _mm256_unpackhi_pd(zmm2,zmm3);
+          ymm7 = _mm256_unpacklo_pd(zmm2,zmm3);
+
+          ymm0 = _mm256_add_pd(ymm4,ymm5);
+          ymm1 = _mm256_add_pd(ymm6,ymm7);
+
+          ymm2 = _mm256_permute2f128_pd(ymm0,ymm1, _MM_SHUFFLE(0,2,0,1));
+          ymm3 = _mm256_blend_pd(ymm0,ymm1,12);
+          ymm0 = _mm256_add_pd(ymm2,ymm3);
+
+          _mm256_store_pd(pmat,ymm0);
+
+          pmat += 4;
+        }
+      }
+      #ifdef DEBUG
+      for (j = 0; j < 20; ++j)
+        for (k = 0; k < 20; ++k)
+          assert(dbg_pmat[j*20+k] >= 0);
+      #endif
+    }
+  }
+
+  pll_aligned_free(expd);
+  pll_aligned_free(temp);
+
+  for (i = 0; i < rate_cats; ++i)
+    if (tran_evecs[i]) pll_aligned_free(tran_evecs[i]); 
+
+  free(tran_evecs);
+  return PLL_SUCCESS;
+}
diff --git a/src/core_pmatrix_avx2.c b/src/core_pmatrix_avx2.c
new file mode 100644
index 0000000..b67bcdd
--- /dev/null
+++ b/src/core_pmatrix_avx2.c
@@ -0,0 +1,269 @@
+/*
+    Copyright (C) 2015 Tomas Flouri
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Contact: Tomas Flouri <Tomas.Flouri at h-its.org>,
+    Exelixis Lab, Heidelberg Instutute for Theoretical Studies
+    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
+*/
+
+#include "pll.h"
+
+#define ONESTEP(x,baseptr)                                      \
+            ymm0 = _mm256_load_pd(baseptr+0);                   \
+            ymm1 = _mm256_load_pd(baseptr+4);                   \
+            ymm2 = _mm256_load_pd(baseptr+8);                   \
+            ymm3 = _mm256_load_pd(baseptr+12);                  \
+            ymm4 = _mm256_load_pd(baseptr+16);                  \
+                                                                \
+            x = _mm256_mul_pd(xmm4,ymm0);                       \
+            x = _mm256_fmadd_pd(xmm5,ymm1,x);                   \
+            x = _mm256_fmadd_pd(xmm6,ymm2,x);                   \
+            x = _mm256_fmadd_pd(xmm7,ymm3,x);                   \
+            x = _mm256_fmadd_pd(xmm8,ymm4,x);                   \
+
+PLL_EXPORT
+int pll_core_update_pmatrix_20x20_avx2(double ** pmatrix,
+                                       unsigned int rate_cats,
+                                       const double * rates,
+                                       const double * branch_lengths,
+                                       const unsigned int * matrix_indices,
+                                       const unsigned int * params_indices,
+                                       const double * prop_invar,
+                                       double * const * eigenvals,
+                                       double * const * eigenvecs,
+                                       double * const * inv_eigenvecs,
+                                       unsigned int count)
+{
+  unsigned int i,n,j,k;
+  double pinvar;
+
+  int * transposed;
+  double * evecs;
+  double * inv_evecs;
+  double * evals;
+  double * pmat;
+  double * expd;
+  double * temp;
+  double ** tran_evecs;
+
+  expd = (double *)pll_aligned_alloc(20*sizeof(double), PLL_ALIGNMENT_AVX);
+  temp = (double *)pll_aligned_alloc(400*sizeof(double), PLL_ALIGNMENT_AVX);
+
+  /* transposed eigen vectors */
+  transposed = (int *)calloc((size_t)rate_cats, sizeof(int));
+  tran_evecs= (double **)calloc((size_t)rate_cats, sizeof(double *));
+
+  if (!expd || !temp || !transposed || !tran_evecs)
+  {
+    if (expd) pll_aligned_free(expd);
+    if (temp) pll_aligned_free(temp);
+    if (transposed) free(transposed);
+    if (tran_evecs) free(tran_evecs);
+
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+    return PLL_FAILURE;
+  }
+
+  /* transpose eigenvectors */
+  /* TODO: The same trick can be applied for exponentiations */
+  for (n = 0; n < rate_cats; ++n)
+  {
+    int index = params_indices[n];
+
+    if (!transposed[index])
+    {
+      /* allocate space for transposed eigenvectors and check that
+         allocation succeeds */
+      double * tran = (double *)pll_aligned_alloc(400*sizeof(double),
+                                                  PLL_ALIGNMENT_AVX);
+      if (!tran)
+      {
+        pll_aligned_free(expd);
+        pll_aligned_free(temp);
+        free(transposed);
+        for (i = 0; i < n; ++i)
+          if (tran_evecs[i]) pll_aligned_free(tran_evecs[i]);
+        free(tran_evecs);
+
+        pll_errno = PLL_ERROR_MEM_ALLOC;
+        snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+        return PLL_FAILURE;
+      }
+
+      /* transpose eigen vectors */
+      evecs = eigenvecs[index];
+      for (i = 0; i < 20; ++i)
+      {
+        for (j = 0; j < 20; ++j)
+          tran[i*20+j] = evecs[j*20+i];
+      }
+      
+      /* update pointers and indicate that the eigen vector for the current
+         rate matrix with index was updated */
+      tran_evecs[index] = tran;
+      transposed[index] = 1;
+    }
+  }
+  free(transposed);
+
+  __m256d xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7,xmm8;
+  __m256d ymm0,ymm1,ymm2,ymm3,ymm4,ymm5,ymm6,ymm7,ymm8,ymm9;
+  __m256d zmm0,zmm1,zmm2,zmm3;
+
+  double * tran = NULL;
+  for (i = 0; i < count; ++i)
+  {
+    assert(branch_lengths[i] >= 0);
+    
+    xmm3 = _mm256_set1_pd(branch_lengths[i]);
+    pmat = pmatrix[matrix_indices[i]];
+
+    /* compute effective pmatrix location */
+    for (n = 0; n < rate_cats; ++n)
+    {
+      pinvar = prop_invar[params_indices[n]];
+      tran = tran_evecs[params_indices[n]];
+      inv_evecs = inv_eigenvecs[params_indices[n]];
+      evals = eigenvals[params_indices[n]];
+
+      /* if branch length is zero then set the p-matrix to identity matrix */
+      if (!branch_lengths[i])
+      {
+        xmm0 = _mm256_setzero_pd();
+        for (j = 0; j < 20; ++j)
+        {
+          _mm256_store_pd(pmat+0,xmm0);
+          _mm256_store_pd(pmat+4,xmm0);
+          _mm256_store_pd(pmat+8,xmm0);
+          _mm256_store_pd(pmat+12,xmm0);
+          _mm256_store_pd(pmat+16,xmm0);
+          pmat[j] = 1;
+          pmat += 20;
+        }
+        continue;
+      }
+
+      /* exponentiate eigenvalues */
+      xmm2 = _mm256_set1_pd(rates[n]);
+
+      if (pinvar > PLL_MISC_EPSILON)
+        xmm6 = _mm256_set1_pd(1.0 - pinvar);
+
+      for (k = 0; k < 5; ++k)
+      {
+        xmm1 = _mm256_load_pd(evals+k*4);
+
+        /* scalar multiplication with rates */
+        xmm4 = _mm256_mul_pd(xmm1,xmm2);
+
+        /* scalar multiplication with branch lengths */
+        xmm5 = _mm256_mul_pd(xmm4,xmm3);
+
+        if (pinvar > PLL_MISC_EPSILON)
+        {
+          xmm5 = _mm256_div_pd(xmm5,xmm6);
+        }
+
+        _mm256_store_pd(expd+k*4,xmm5);
+      }
+
+      for (k = 0; k < 20; ++k)
+        expd[k] = exp(expd[k]);
+
+      /* load expd */
+      xmm4 = _mm256_load_pd(expd+0);
+      xmm5 = _mm256_load_pd(expd+4);
+      xmm6 = _mm256_load_pd(expd+8);
+      xmm7 = _mm256_load_pd(expd+12);
+      xmm8 = _mm256_load_pd(expd+16);
+
+      /* compute temp matrix */
+      for (k = 0; k < 400; k += 20)
+      {
+        ymm0 = _mm256_load_pd(inv_evecs+k+0);
+        ymm1 = _mm256_load_pd(inv_evecs+k+4);
+        ymm2 = _mm256_load_pd(inv_evecs+k+8);
+        ymm3 = _mm256_load_pd(inv_evecs+k+12);
+        ymm4 = _mm256_load_pd(inv_evecs+k+16);
+
+        ymm5 = _mm256_mul_pd(xmm4,ymm0);
+        ymm6 = _mm256_mul_pd(xmm5,ymm1);
+        ymm7 = _mm256_mul_pd(xmm6,ymm2);
+        ymm8 = _mm256_mul_pd(xmm7,ymm3);
+        ymm9 = _mm256_mul_pd(xmm8,ymm4);
+
+        _mm256_store_pd(temp+k+0,ymm5);
+        _mm256_store_pd(temp+k+4,ymm6);
+        _mm256_store_pd(temp+k+8,ymm7);
+        _mm256_store_pd(temp+k+12,ymm8);
+        _mm256_store_pd(temp+k+16,ymm9);
+      }
+
+      for (j = 0; j < 400; j += 20)
+      {
+        xmm4 = _mm256_load_pd(temp+j+0);
+        xmm5 = _mm256_load_pd(temp+j+4);
+        xmm6 = _mm256_load_pd(temp+j+8);
+        xmm7 = _mm256_load_pd(temp+j+12);
+        xmm8 = _mm256_load_pd(temp+j+16);
+
+        /* process four rows at a time */
+        for (k = 0; k < 400; k += 80)
+        {
+          /* row 0 */
+          ONESTEP(zmm0,tran+k+0);
+
+          /* row 1 */
+          ONESTEP(zmm1,tran+k+20);
+
+          /* row 2 */
+          ONESTEP(zmm2,tran+k+40);
+
+          /* row 3 */
+          ONESTEP(zmm3,tran+k+60);
+
+          /* create a vector with the sums of zmm0, zmm1, zmm2, zmm3 */
+          ymm4 = _mm256_unpackhi_pd(zmm0,zmm1);
+          ymm5 = _mm256_unpacklo_pd(zmm0,zmm1);
+
+          ymm6 = _mm256_unpackhi_pd(zmm2,zmm3);
+          ymm7 = _mm256_unpacklo_pd(zmm2,zmm3);
+
+          ymm0 = _mm256_add_pd(ymm4,ymm5);
+          ymm1 = _mm256_add_pd(ymm6,ymm7);
+
+          ymm2 = _mm256_permute2f128_pd(ymm0,ymm1, _MM_SHUFFLE(0,2,0,1));
+          ymm3 = _mm256_blend_pd(ymm0,ymm1,12);
+          ymm0 = _mm256_add_pd(ymm2,ymm3);
+
+          _mm256_store_pd(pmat,ymm0);
+
+          pmat += 4;
+        }
+      }
+    }
+  }
+
+  pll_aligned_free(expd);
+  pll_aligned_free(temp);
+
+  for (i = 0; i < rate_cats; ++i)
+    if (tran_evecs[i]) pll_aligned_free(tran_evecs[i]); 
+
+  free(tran_evecs);
+  return PLL_SUCCESS;
+}
diff --git a/src/core_pmatrix_sse.c b/src/core_pmatrix_sse.c
index a638056..1aa1564 100644
--- a/src/core_pmatrix_sse.c
+++ b/src/core_pmatrix_sse.c
@@ -57,14 +57,14 @@
 
 PLL_EXPORT int pll_core_update_pmatrix_4x4_sse(double ** pmatrix,
                                                unsigned int rate_cats,
-                                               double * rates,
+                                               const double * rates,
                                                const double * branch_lengths,
                                                const unsigned int * matrix_indices,
                                                const unsigned int * params_indices,
-                                               double * prop_invar,
-                                               double ** eigenvals,
-                                               double ** eigenvecs,
-                                               double ** inv_eigenvecs,
+                                               const double * prop_invar,
+                                               double * const * eigenvals,
+                                               double * const * eigenvecs,
+                                               double * const * inv_eigenvecs,
                                                unsigned int count)
 {
   unsigned int i,n;
@@ -89,7 +89,11 @@ PLL_EXPORT int pll_core_update_pmatrix_4x4_sse(double ** pmatrix,
 
   __m128d xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7, xmm8, xmm9;
   __m128d xmm10, xmm11, xmm12, xmm13, xmm14, xmm15, xmm16;
+  __m128d v_onemin, v_onemax;
+
   xmm0 = _mm_setzero_pd();
+  v_onemin = _mm_set1_pd(PLL_ONE_MIN);
+  v_onemax = _mm_set1_pd(PLL_ONE_MAX);
 
   for (i = 0; i < count; ++i)
   {
@@ -152,41 +156,75 @@ PLL_EXPORT int pll_core_update_pmatrix_4x4_sse(double ** pmatrix,
         _mm_store_pd(expd+0,xmm7);
         _mm_store_pd(expd+2,xmm8);
 
+        /* check if all values of expd are approximately one */
+        xmm12 = _mm_set_pd(exp(expd[1]), exp(expd[0]));
+        xmm13 = _mm_set_pd(exp(expd[3]), exp(expd[2]));
 
-        /* transpose eigenvector */
-
-        xmm1 = _mm_load_pd(evecs+0);
-        xmm2 = _mm_load_pd(evecs+4);
-        xmm4 = _mm_unpacklo_pd(xmm1,xmm2);     /* row 0 (0,1) */
-        xmm5 = _mm_unpackhi_pd(xmm1,xmm2);     /* row 1 (0,1) */
-
-        xmm1 = _mm_load_pd(evecs+2);
-        xmm2 = _mm_load_pd(evecs+6);
-        xmm6 = _mm_unpacklo_pd(xmm1,xmm2);     /* row 2 (0,1) */
-        xmm7 = _mm_unpackhi_pd(xmm1,xmm2);     /* row 3 (0,1) */
-
-        xmm1 = _mm_load_pd(evecs+8);
-        xmm2 = _mm_load_pd(evecs+12);
-        xmm8 = _mm_unpacklo_pd(xmm1,xmm2);     /* row 0 (2,3) */
-        xmm9 = _mm_unpackhi_pd(xmm1,xmm2);     /* row 1 (2,3) */
-
-        xmm1 = _mm_load_pd(evecs+10);
-        xmm2 = _mm_load_pd(evecs+14);
-        xmm10 = _mm_unpacklo_pd(xmm1,xmm2);    /* row 2 (2,3) */
-        xmm11 = _mm_unpackhi_pd(xmm1,xmm2);    /* row 3 (2,3) */
+        /* */
+        xmm1 = _mm_cmpgt_pd(xmm12,v_onemin);
+        xmm2 = _mm_cmplt_pd(xmm13,v_onemax);
+        xmm4 = _mm_and_pd(xmm1,xmm2);
 
-        /* load exponentiated eigenvalues */
-        xmm1 = _mm_set_pd(exp(expd[1]),
-                          exp(expd[0]));
-        xmm2 = _mm_set_pd(exp(expd[3]),
-                          exp(expd[2]));
-
-        /* compute pmatrix */
-        ONESTEP(0);
-        ONESTEP(4);
-        ONESTEP(8);
-        ONESTEP(12);
+        if (_mm_movemask_pd(xmm4) == 0x3)
+        {
+          _mm_store_pd(pmat+0, xmm0);
+          _mm_store_pd(pmat+2, xmm0);
+          _mm_store_pd(pmat+4, xmm0);
+          _mm_store_pd(pmat+6, xmm0);
+          _mm_store_pd(pmat+8, xmm0);
+          _mm_store_pd(pmat+10,xmm0);
+          _mm_store_pd(pmat+12,xmm0);
+          _mm_store_pd(pmat+14,xmm0);
+
+          pmat[0] = pmat[5] = pmat[10] = pmat[15] = 1;
+        }
+        else
+        {
+          /* transpose eigenvector */
+
+          xmm1 = _mm_load_pd(evecs+0);
+          xmm2 = _mm_load_pd(evecs+4);
+          xmm4 = _mm_unpacklo_pd(xmm1,xmm2);     /* row 0 (0,1) */
+          xmm5 = _mm_unpackhi_pd(xmm1,xmm2);     /* row 1 (0,1) */
+
+          xmm1 = _mm_load_pd(evecs+2);
+          xmm2 = _mm_load_pd(evecs+6);
+          xmm6 = _mm_unpacklo_pd(xmm1,xmm2);     /* row 2 (0,1) */
+          xmm7 = _mm_unpackhi_pd(xmm1,xmm2);     /* row 3 (0,1) */
+
+          xmm1 = _mm_load_pd(evecs+8);
+          xmm2 = _mm_load_pd(evecs+12);
+          xmm8 = _mm_unpacklo_pd(xmm1,xmm2);     /* row 0 (2,3) */
+          xmm9 = _mm_unpackhi_pd(xmm1,xmm2);     /* row 1 (2,3) */
+
+          xmm1 = _mm_load_pd(evecs+10);
+          xmm2 = _mm_load_pd(evecs+14);
+          xmm10 = _mm_unpacklo_pd(xmm1,xmm2);    /* row 2 (2,3) */
+          xmm11 = _mm_unpackhi_pd(xmm1,xmm2);    /* row 3 (2,3) */
+
+          /* load exponentiated eigenvalues */
+          /*
+          xmm1 = _mm_set_pd(exp(expd[1]),
+                            exp(expd[0]));
+          xmm2 = _mm_set_pd(exp(expd[3]),
+                            exp(expd[2]));
+          */
+          xmm1 = xmm12;
+          xmm2 = xmm13;
+
+          /* compute pmatrix */
+          ONESTEP(0);
+          ONESTEP(4);
+          ONESTEP(8);
+          ONESTEP(12);
+        }
       }
+      #ifdef DEBUG
+      unsigned int j,k;
+      for (j = 0; j < 4; ++j)
+        for (k = 0; k < 4; ++k)
+          assert(pmat[j*4+k] >= 0);
+      #endif
       pmat = pmat+16;
     }
   }
diff --git a/src/derivatives.c b/src/derivatives.c
index 56b7b2d..d2672b1 100644
--- a/src/derivatives.c
+++ b/src/derivatives.c
@@ -22,15 +22,19 @@
 #include "pll.h"
 
 static int sumtable_tipinner(pll_partition_t * partition,
-                                unsigned int parent_clv_index,
-                                unsigned int child_clv_index,
-                                const unsigned int * params_indices,
-                                double *sumtable)
+                             unsigned int parent_clv_index,
+                             unsigned int child_clv_index,
+                             const unsigned int * parent_scaler,
+                             const unsigned int * child_scaler,
+                             const unsigned int * params_indices,
+                             double *sumtable)
 {
   unsigned int i, retval;
   unsigned int tip_clv_index;
   unsigned int inner_clv_index;
   unsigned int sites = partition->sites;
+  const unsigned int * scaler;
+
   double ** eigenvecs = (double **)malloc(partition->rate_cats *
                                           sizeof(double *));
   double ** inv_eigenvecs = (double **)malloc(partition->rate_cats *
@@ -64,11 +68,13 @@ static int sumtable_tipinner(pll_partition_t * partition,
   {
     tip_clv_index = parent_clv_index;
     inner_clv_index = child_clv_index;
+    scaler = child_scaler;
   }
   else
   {
     tip_clv_index = child_clv_index;
     inner_clv_index = parent_clv_index;
+    scaler = parent_scaler;
   }
 
   retval = pll_core_update_sumtable_ti(partition->states,
@@ -76,10 +82,12 @@ static int sumtable_tipinner(pll_partition_t * partition,
                                        partition->rate_cats,
                                        partition->clv[inner_clv_index],
                                        partition->tipchars[tip_clv_index],
+                                       scaler,
                                        eigenvecs,
                                        inv_eigenvecs,
                                        freqs,
                                        partition->tipmap,
+                                       partition->maxstates,
                                        sumtable,
                                        partition->attributes);
 
@@ -93,6 +101,8 @@ static int sumtable_tipinner(pll_partition_t * partition,
 static int sumtable_innerinner(pll_partition_t * partition,
                                 unsigned int parent_clv_index,
                                 unsigned int child_clv_index,
+                                const unsigned int * parent_scaler,
+                                const unsigned int * child_scaler,
                                 const unsigned int * params_indices,
                                 double *sumtable)
 {
@@ -133,6 +143,8 @@ static int sumtable_innerinner(pll_partition_t * partition,
                               partition->rate_cats,
                               partition->clv[parent_clv_index],
                               partition->clv[child_clv_index],
+                              parent_scaler,
+                              child_scaler,
                               eigenvecs,
                               inv_eigenvecs,
                               freqs,
@@ -152,48 +164,71 @@ static int sumtable_innerinner(pll_partition_t * partition,
 PLL_EXPORT int pll_update_sumtable(pll_partition_t * partition,
                                       unsigned int parent_clv_index,
                                       unsigned int child_clv_index,
+                                      int parent_scaler_index,
+                                      int child_scaler_index,
                                       const unsigned int * params_indices,
                                       double *sumtable)
 {
   int retval;
 
+  unsigned int * parent_scaler;
+  unsigned int * child_scaler;
+
+  /* get parent scaler */
+  if (parent_scaler_index == PLL_SCALE_BUFFER_NONE)
+    parent_scaler = NULL;
+  else
+    parent_scaler = partition->scale_buffer[parent_scaler_index];
+
+  if (child_scaler_index == PLL_SCALE_BUFFER_NONE)
+    child_scaler = NULL;
+  else
+    child_scaler = partition->scale_buffer[child_scaler_index];
+
+
   if (partition->attributes & PLL_ATTRIB_PATTERN_TIP)
-      {
-        if ((parent_clv_index < partition->tips) &&
-            (child_clv_index < partition->tips))
-        {
-          /* tip-tip case */
-          assert(0);
-        }
-        else if ((parent_clv_index < partition->tips) ||
-                 (child_clv_index < partition->tips))
-        {
-          /* tip-inner */
-          retval = sumtable_tipinner(partition,
-                                     parent_clv_index,
-                                     child_clv_index,
-                                     params_indices,
-                                     sumtable);
-        }
-        else
-        {
-          /* inner-inner */
-          retval = sumtable_innerinner(partition,
-                                       parent_clv_index,
-                                       child_clv_index,
-                                       params_indices,
-                                       sumtable);
-        }
-      }
-      else
-      {
-        /* inner-inner */
-        retval = sumtable_innerinner(partition,
-                                     parent_clv_index,
-                                     child_clv_index,
-                                     params_indices,
-                                     sumtable);
-      }
+  {
+    if ((parent_clv_index < partition->tips) &&
+        (child_clv_index < partition->tips))
+    {
+      /* tip-tip case */
+      assert(0);
+    }
+    else if ((parent_clv_index < partition->tips) ||
+             (child_clv_index < partition->tips))
+    {
+      /* tip-inner */
+      retval = sumtable_tipinner(partition,
+                                 parent_clv_index,
+                                 child_clv_index,
+                                 parent_scaler,
+                                 child_scaler,
+                                 params_indices,
+                                 sumtable);
+    }
+    else
+    {
+      /* inner-inner */
+      retval = sumtable_innerinner(partition,
+                                   parent_clv_index,
+                                   child_clv_index,
+                                   parent_scaler,
+                                   child_scaler,
+                                   params_indices,
+                                   sumtable);
+    }
+  }
+  else
+  {
+    /* inner-inner */
+    retval = sumtable_innerinner(partition,
+                                 parent_clv_index,
+                                 child_clv_index,
+                                 parent_scaler,
+                                 child_scaler,
+                                 params_indices,
+                                 sumtable);
+  }
 
   return retval;
 }
diff --git a/src/fast_parsimony.c b/src/fast_parsimony.c
new file mode 100644
index 0000000..564f7da
--- /dev/null
+++ b/src/fast_parsimony.c
@@ -0,0 +1,774 @@
+/*
+    Copyright (C) 2016 Tomas Flouri
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Contact: Tomas Flouri <Tomas.Flouri at h-its.org>,
+    Exelixis Lab, Heidelberg Instutute for Theoretical Studies
+    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
+*/
+
+#include "pll.h"
+
+#define PLL_BITVECTOR_SIZE 32
+
+static int alloc_pars_structs(pll_parsimony_t * parsimony,
+                              unsigned int bitvectors)
+{
+  unsigned int i,j;
+
+  /* TODO: Test this for compatibility with rooted and unrooted trees */
+  unsigned int nodes_count = parsimony->tips + parsimony->inner_nodes;
+
+  parsimony->node_cost = (unsigned int *)calloc(nodes_count,
+                                                sizeof(unsigned int));
+  if (!parsimony->node_cost)
+  {
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf(pll_errmsg, 200,
+             "Cannot allocate parsimony cost array.");
+    return PLL_FAILURE;
+  }
+
+  /* allocate parsimony vector container */
+  parsimony->packedvector = (unsigned int **)malloc(nodes_count *
+                                                    sizeof(unsigned int *));
+  if (!parsimony->packedvector)
+  {
+    free(parsimony->node_cost);
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf (pll_errmsg, 200,
+              "Cannot allocate parsimony vector container.");
+    return PLL_FAILURE;
+  }
+
+  /* allocate individual vectors */
+  unsigned int ** vector = parsimony->packedvector;
+  for (i = 0; i < nodes_count; ++i)
+  {
+    vector[i] = (unsigned int *)pll_aligned_alloc(parsimony->states *
+                                       bitvectors *
+                                       sizeof(unsigned int),
+                                       parsimony->alignment);
+    if (!vector[i])
+    {
+      free(parsimony->node_cost);
+      pll_errno = PLL_ERROR_MEM_ALLOC;
+      snprintf (pll_errmsg, 200,
+                "Cannot allocate parsimony vector.");
+      
+      /* free all allocated vectors */
+      for (j = 0; j < i; ++j)
+        pll_aligned_free(vector[i]);
+      free(vector);
+
+      return PLL_FAILURE;
+    }
+  }
+  return PLL_SUCCESS;
+}
+
+static int check_informative_extended(const pll_partition_t * partition,
+                                      unsigned int index,
+                                      unsigned int * singleton)
+{
+  unsigned int c;
+  int count = 0;
+  unsigned int * map;
+  unsigned int i,j;
+  unsigned int range = (1 << partition->states);
+
+  /* TODO: Move allocation outside of function such that it happens only once */
+  //map = (int *)malloc(1024*1024*sizeof(int));
+  map = (unsigned int *)malloc(range*sizeof(unsigned int));
+
+  memset(map,0,range*sizeof(unsigned int));
+
+  for (i = 0; i < partition->tips; ++i)
+  {
+    c = 0;
+
+    double * clv = partition->clv[i] +
+                   index*partition->states_padded*partition->rate_cats;
+
+    for (j = 0; j < partition->states; ++j)
+       c = (c << 1) | (unsigned int)(clv[j]);
+
+    map[c]++;
+  }
+
+  /* TODO: change to only required range */
+  for (i=0; i< range; ++i)
+    if (map[i] > 1)
+      count++;
+    else if (map[i] == 1)
+      (*singleton)++;
+
+  free(map);
+
+  if (count <= 1)
+    return 0;
+
+  return 1;
+}
+
+static int check_informative(const pll_partition_t * partition,
+                             unsigned int index,
+                             unsigned int * singleton)
+{
+  unsigned int i,j;
+  unsigned int map[256];
+  int count = 0;
+  unsigned int c;
+
+  /* in case the site is non-informative, count the number of states appearing
+     only once, and which is equal to the number of mutations */
+  *singleton = 0;
+
+  for (i = 0; i < 256; ++i)
+    map[i] = 0;
+
+  /* if tips states are presented by characters */
+  if (partition->attributes & PLL_ATTRIB_PATTERN_TIP)
+  {
+    for (i = 0; i < partition->tips; ++i)
+    {
+      c = partition->tipchars[i][index];
+      map[c]++;
+    }
+  }
+  else
+  {
+    /* otherwise, tips are represented by conditional probabilities */
+
+    /* TODO: Currently this is extremely time-consuming as we have to allocate
+    an array of 2^states elements each time we call check_informative_extended
+    (i.e. for every character). For more than 20 states, this process becomes
+    extremely slow, and we need to think of a better way (or completely disallow
+    the non pattern tip case */
+    assert(partition->states <= 20);
+    if (partition->states > 8)
+      return check_informative_extended(partition, index, singleton);
+
+    for (i = 0; i < partition->tips; ++i)
+    {
+      c = 0;
+
+      double * clv = partition->clv[i] +
+                     index*partition->states_padded*partition->rate_cats;
+
+      for (j = 0; j < partition->states; ++j)
+         c = (c << 1) | (unsigned int)(clv[j]);
+
+      map[c]++;
+    }
+  }
+
+
+  /* TODO: change to only required range */
+  for (i=0; i<256; ++i)
+    if (map[i] > 1)
+      count++;
+    else if (map[i] == 1)
+      (*singleton)++;
+
+  if (count <= 1)
+    return 0;
+
+  return 1;
+}
+
+static int fill_parsimony_vectors(const pll_partition_t * partition,
+                                  pll_parsimony_t * parsimony)
+{
+  unsigned int c;
+  unsigned int i,j,k;
+  unsigned int bitcount = 0;
+  unsigned int bitvectors;
+
+  unsigned int states = parsimony->states;
+
+  /*
+     Example: assume the following tree and encoding
+
+       /\        A = 0001    seq1 = TTAACT
+      /  \       C = 0010    seq2 = TTCAGG
+     /\  /\      G = 0100    seq3 = CCGACT
+    1  23  4     T = 1000    seq4 = CCTAGG
+                      informative = 110011 
+
+    Create 32-bit state vectors for each tip:
+
+    node1:
+      vecA    00110011111111111111111111111111
+      vecC    00001011111111111111111111111111
+      vecG    00000011111111111111111111111111
+      vecT    11000111111111111111111111111111
+
+    node2:
+      vecA    00010011111111111111111111111111
+      vecC    00100011111111111111111111111111
+      vecG    00001111111111111111111111111111
+      vecT    11000011111111111111111111111111
+
+    node3:
+      vecA    00010011111111111111111111111111
+      vecC    11001011111111111111111111111111
+      vecG    00100011111111111111111111111111
+      vecT    00000111111111111111111111111111
+
+    node4:
+      vecA    00010011111111111111111111111111
+      vecC    11000011111111111111111111111111
+      vecG    00001111111111111111111111111111
+      vecT    00100011111111111111111111111111
+  */
+
+  /* compute total number of bits required */
+  for (i=0; i<parsimony->sites; ++i)
+    if (parsimony->informative[i])
+      bitcount += partition->pattern_weights[i];
+
+  /* number of 32-bit bit-vectors required */
+  bitvectors = (bitcount / PLL_BITVECTOR_SIZE) +
+               (bitcount % PLL_BITVECTOR_SIZE != 0);
+  
+#ifdef HAVE_SSE3
+  if (parsimony->attributes & PLL_ATTRIB_ARCH_SSE && PLL_STAT(sse3_present))
+    bitvectors = (bitvectors+3) & 0xFFFFFFFC;
+#endif
+
+#ifdef HAVE_AVX
+  if (parsimony->attributes & PLL_ATTRIB_ARCH_AVX && PLL_STAT(avx_present))
+    bitvectors = (bitvectors+7) & 0xFFFFFFF8;
+#endif
+
+#ifdef HAVE_AVX2
+  if (parsimony->attributes & PLL_ATTRIB_ARCH_AVX2 && PLL_STAT(avx2_present))
+    bitvectors = (bitvectors+7) & 0xFFFFFFF8;
+#endif
+  
+  /* allocate necessary data structures */
+  if (!alloc_pars_structs(parsimony, bitvectors))
+    return PLL_FAILURE;
+  
+  unsigned int ** statevec = (unsigned int **)malloc(states *
+                                                     sizeof(unsigned int *));
+  unsigned int * val = (unsigned int *)calloc(states,sizeof(unsigned int));
+  if (!val || !statevec)
+  {
+    if (val) free(val);
+    if (statevec) free(statevec);
+
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf (pll_errmsg, 200,
+              "Cannot allocate bitvector data.");
+    return PLL_FAILURE;
+  }
+
+  /* TODO: Separate tip pattern and clv case */
+  for (i = 0; i < parsimony->tips; ++i)
+  {
+    for (k = 0; k < parsimony->states; ++k) val[k] = 0;
+    bitcount = 0;
+
+    for (j = 0; j < parsimony->states; ++j)
+      statevec[j] = parsimony->packedvector[i]+bitvectors*j;
+
+    unsigned int vec_index = 0;
+    for (j = 0; j < parsimony->sites; ++j)
+    {
+      if (parsimony->informative[j])
+      {
+        /* TODO: check for tip map */
+        unsigned int m;
+        for (m = 0; m < partition->pattern_weights[j]; ++m)
+        {
+          if (parsimony->attributes & PLL_ATTRIB_PATTERN_TIP)
+          {
+            c = partition->tipchars[i][j];
+            if (states != 4) c = partition->tipmap[c];
+            for (k = 0; k < parsimony->states; ++k, c >>= 1)
+              if (c & 1) 
+                val[k] |= (1 << bitcount);
+          }
+          else
+          {
+            double * clv = partition->clv[i] + 
+                           j*partition->states_padded * partition->rate_cats;
+
+            for (k = 0; k < states; ++k)
+              if ((int)(clv[k]))
+              {
+                val[k] |= (1 << bitcount);
+              }
+          }
+
+          bitcount++;
+
+          if (bitcount == PLL_BITVECTOR_SIZE)
+          {
+            for (k = 0; k < states; ++k)
+            {
+              statevec[k][vec_index] = val[k];
+              val[k] = 0;
+            }
+
+            vec_index++;
+            bitcount = 0;
+          }
+        }
+
+      }
+    }
+
+    /* fill up the remaining bit entries in the current vector with ones */
+    if (bitcount && (bitcount != PLL_BITVECTOR_SIZE))
+    {
+      for (; bitcount < PLL_BITVECTOR_SIZE; ++bitcount)
+        for (k = 0; k < states; ++k)
+          val[k] |= (1 << bitcount);
+      
+      for (k = 0; k < states; ++k)
+        statevec[k][vec_index] = val[k];
+
+      vec_index++;
+    }
+
+    /* fill up the remaining bit vectors due to padding with ones */
+    for (; vec_index < bitvectors; ++vec_index)
+      for (k = 0; k < states; ++k)
+        statevec[k][vec_index] = ~0u;
+  }
+  parsimony->packedvector_count = bitvectors;
+
+  free(statevec);
+  free(val);
+
+  return PLL_SUCCESS;
+}
+
+static int pll_set_informative(const pll_partition_t * partition,
+                               pll_parsimony_t * parsimony)
+{
+  unsigned int i;
+  unsigned int singletons = 0;
+  unsigned int count = 0;
+
+  /* allocate array for indicating whether a site is informative or not */
+  parsimony->informative = (int *)malloc(parsimony->sites * sizeof(int));
+  if (!parsimony->informative)
+  {
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf (pll_errmsg, 200,
+              "Cannot allocate informative array.");
+    return PLL_FAILURE;
+  }
+
+  /* identify and mark informative sites */
+  for (i = 0; i < parsimony->sites; ++i)
+  {
+    if (check_informative(partition,i,&singletons))
+      parsimony->informative[i] = 1;
+    else
+    {
+      parsimony->informative[i] = 0;
+      count++;
+      parsimony->const_cost += singletons *
+                               partition->pattern_weights[i];
+    }
+  }
+
+  parsimony->informative_count = parsimony->sites - count;
+
+  return PLL_SUCCESS;
+}
+
+PLL_EXPORT unsigned int pll_fastparsimony_edge_score_4x4(const pll_parsimony_t * parsimony,
+                                                         unsigned int node1_score_index,
+                                                         unsigned int node2_score_index)
+{
+  unsigned int i;
+
+  unsigned int * node1[4];
+  unsigned int * node2[4];
+
+  unsigned int ** vector = parsimony->packedvector;
+  unsigned int vector_count = parsimony->packedvector_count;
+
+  unsigned int score = 0;
+
+  /* point to the parsimony vectors for each node and for each state */
+  for (i = 0; i < 4; ++i)
+  {
+    node1[i] = vector[node1_score_index] + i*vector_count;
+    node2[i] = vector[node2_score_index] + i*vector_count;
+  }
+
+  unsigned int xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6;
+
+  /* set all bits to one */
+  xmm1 = ~0u;
+
+  for (i = 0; i < parsimony->packedvector_count; ++i)
+  {
+    /* compute AND bit vectors for state 0 */
+    xmm2 = node1[0][i] & node2[0][i];
+
+    /* compute AND bit vectors for state 1 */
+    xmm3 = node1[1][i] & node2[1][i];
+
+    /* compute AND bit vectors for state 2 */
+    xmm4 = node1[2][i] & node2[2][i];
+
+    /* compute AND bit vectors for state 3 */
+    xmm5 = node1[3][i] & node2[3][i];
+
+    /* OR the ANDs of states 0,1,2,3 */
+    xmm6 = xmm2 | xmm3 | xmm4 | xmm5;
+
+    xmm0 = ~xmm6 & xmm1;
+
+    score += (unsigned int)__builtin_popcount(xmm0);
+  }
+  unsigned int score1 = parsimony->node_cost[node1_score_index];
+  unsigned int score2 = parsimony->node_cost[node2_score_index];
+
+  return score+score1+score2+parsimony->const_cost;
+}
+
+PLL_EXPORT void pll_fastparsimony_update_vector_4x4(pll_parsimony_t * parsimony,
+                                                    const pll_pars_buildop_t * op)
+{
+  unsigned int i;
+  unsigned int * parent[4];
+  unsigned int * child1[4];
+  unsigned int * child2[4];
+
+  unsigned int ** vector = parsimony->packedvector;
+  unsigned int vector_count = parsimony->packedvector_count;
+
+  unsigned int score = 0;
+
+  /* point to the parsimony vectors for each node and for each state */
+  for (i = 0; i < 4; ++i)
+  {
+    parent[i] = vector[op->parent_score_index] + i*vector_count;
+    child1[i] = vector[op->child1_score_index] + i*vector_count;
+    child2[i] = vector[op->child2_score_index] + i*vector_count;
+  }
+
+  unsigned int xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7,xmm8,xmm9;
+
+  /* set all bits to one */
+  xmm9 = ~0u;
+
+  for (i = 0; i < parsimony->packedvector_count; ++i)
+  {
+    /* load, and, or bit vectors for state 0 */
+
+    xmm0 = child1[0][i] & child2[0][i];
+    xmm1 = child1[0][i] | child2[0][i];
+
+    /* load, and, or bit vectors for state 1 */
+
+    xmm2 = child1[1][i] & child2[1][i];
+    xmm3 = child1[1][i] | child2[1][i];
+
+    /* load, and, or bit vectors for state 2 */
+
+    xmm4 = child1[2][i] & child2[2][i];
+    xmm5 = child1[2][i] | child2[2][i];
+
+    /* load, and, or bit vectors for state 3 */
+
+    xmm6 = child1[3][i] & child2[3][i];
+    xmm7 = child1[3][i] | child2[3][i];
+    
+    /* OR the ANDs of states 0,1,2,3 */
+
+    xmm8 = xmm0 | xmm2 | xmm4 | xmm6;
+
+    /* store them */
+    parent[0][i] = xmm0 | (~xmm8 & xmm1);
+    parent[1][i] = xmm2 | (~xmm8 & xmm3);
+    parent[2][i] = xmm4 | (~xmm8 & xmm5);
+    parent[3][i] = xmm6 | (~xmm8 & xmm7);
+
+    score += (unsigned int)__builtin_popcount(~xmm8 & xmm9);
+  }
+  unsigned int score1 = parsimony->node_cost[op->child1_score_index];
+  unsigned int score2 = parsimony->node_cost[op->child2_score_index];
+  parsimony->node_cost[op->parent_score_index] = score+score1+score2;
+}
+
+PLL_EXPORT pll_parsimony_t * pll_fastparsimony_init(const pll_partition_t * partition)
+{
+  pll_parsimony_t * parsimony;
+
+  /* TODO: Currently only upto 20 states are supported with non pattern-tip
+     compression */
+  if (partition->states > 20 && 
+      (partition->attributes & PLL_ATTRIB_PATTERN_TIP) == 0)
+  {
+    pll_errno = PLL_ERROR_STEPWISE_UNSUPPORTED;
+    snprintf(pll_errmsg,
+             200,
+             "Use PLL_ATTRIB_PATTERN_TIP for more than 20 states.");
+    return NULL;
+  }
+  
+  parsimony = (pll_parsimony_t *)calloc(1,sizeof(pll_parsimony_t));
+
+  parsimony->tips = partition->tips;
+  parsimony->inner_nodes = partition->tips-1;
+  parsimony->sites = partition->sites;
+  parsimony->attributes = partition->attributes;
+  parsimony->states = partition->states;
+  parsimony->alignment = partition->alignment;
+
+  if (!pll_set_informative(partition,parsimony))
+    return NULL;
+
+  if (!fill_parsimony_vectors(partition,parsimony))
+    return NULL;
+
+  return parsimony;
+}
+
+PLL_EXPORT void pll_fastparsimony_update_vector(pll_parsimony_t * parsimony,
+                                                const pll_pars_buildop_t * op)
+{
+  unsigned int i,j;
+  unsigned int states = parsimony->states;
+  unsigned int vector_count = parsimony->packedvector_count;
+  unsigned int ** vector = parsimony->packedvector;
+
+  unsigned int * child1;
+  unsigned int * child2;
+  unsigned int * parent;
+
+  unsigned int score = 0;
+
+  /* set all bits to one */
+  unsigned int vones = ~0u;
+
+  for (i = 0; i < parsimony->packedvector_count; ++i)
+  {
+
+    /* OR the ANDs of all states */
+    unsigned int orvand = 0;
+    child1 = vector[op->child1_score_index];
+    child2 = vector[op->child2_score_index];
+    for (j = 0; j < states; ++j)
+    {
+      orvand |= (child1[i] & child2[i]);
+
+      child1 += vector_count;
+      child2 += vector_count;
+    }
+
+    /* store vectors at parent */
+    child1 = vector[op->child1_score_index];
+    child2 = vector[op->child2_score_index];
+    parent = vector[op->parent_score_index];
+    for (j = 0; j < states; ++j)
+    {
+      parent[i] = (child1[i] & child2[i]) | 
+                     (~orvand & (child1[i] | child2[i]));
+
+      child1 += vector_count;
+      child2 += vector_count;
+      parent += vector_count;
+
+    }
+
+    score += (unsigned int)__builtin_popcount(~orvand & vones);
+  }
+  unsigned int score1 = parsimony->node_cost[op->child1_score_index];
+  unsigned int score2 = parsimony->node_cost[op->child2_score_index];
+  parsimony->node_cost[op->parent_score_index] = score+score1+score2;
+}
+
+static unsigned int fastparsimony_edge_score(const pll_parsimony_t * parsimony,
+                                             unsigned int node1_score_index,
+                                             unsigned int node2_score_index)
+{
+  unsigned int i,j;
+  unsigned int states = parsimony->states;
+  unsigned int vector_count = parsimony->packedvector_count;
+  unsigned int ** vector = parsimony->packedvector;
+
+  unsigned int * node1;
+  unsigned int * node2;
+
+  unsigned int score = 0;
+
+  /* set all bits to one */
+  unsigned int vones = ~0u;
+
+  for (i = 0; i < parsimony->packedvector_count; ++i)
+  {
+    /* OR the ANDs of all states */
+    unsigned int orvand = 0;
+    node1 = vector[node1_score_index];
+    node2 = vector[node2_score_index];
+    for (j = 0; j < states; ++j)
+    {
+      orvand |= (node1[i] & node2[i]);
+      
+      node1 += vector_count;
+      node2 += vector_count;
+    }
+
+    score += (unsigned int )__builtin_popcount(~orvand & vones);
+  }
+  unsigned int score1 = parsimony->node_cost[node1_score_index];
+  unsigned int score2 = parsimony->node_cost[node2_score_index];
+
+  return score+score1+score2+parsimony->const_cost;
+}
+
+static void fastparsimony_update_vectors_4x4(pll_parsimony_t * parsimony,
+                                             const pll_pars_buildop_t * ops,
+                                             unsigned int count)
+{
+  unsigned int i;
+  const pll_pars_buildop_t * op;
+
+  for (i = 0; i < count; ++i)
+  {
+    op = &(ops[i]);
+#ifdef HAVE_SSE3
+    if (parsimony->attributes & PLL_ATTRIB_ARCH_SSE && PLL_STAT(sse3_present))
+      pll_fastparsimony_update_vector_4x4_sse(parsimony,op);
+    else
+#endif
+#ifdef HAVE_AVX
+    if (parsimony->attributes & PLL_ATTRIB_ARCH_AVX && PLL_STAT(avx_present))
+      pll_fastparsimony_update_vector_4x4_avx(parsimony,op);
+    else
+#endif
+#ifdef HAVE_AVX2
+    if (parsimony->attributes & PLL_ATTRIB_ARCH_AVX2 && PLL_STAT(avx2_present))
+      pll_fastparsimony_update_vector_4x4_avx2(parsimony,op);
+    else
+#endif
+      pll_fastparsimony_update_vector_4x4(parsimony,op);
+  }
+}
+
+static int fastparsimony_update_vectors(pll_parsimony_t * parsimony,
+                                        const pll_pars_buildop_t * ops,
+                                        unsigned int count)
+{
+  unsigned int i;
+  const pll_pars_buildop_t * op;
+
+  for (i = 0; i < count; ++i)
+  {
+    op = &(ops[i]);
+#ifdef HAVE_SSE3
+    if (parsimony->attributes & PLL_ATTRIB_ARCH_SSE && PLL_STAT(sse3_present))
+      pll_fastparsimony_update_vector_sse(parsimony,op);
+    else
+#endif
+#ifdef HAVE_AVX
+    if (parsimony->attributes & PLL_ATTRIB_ARCH_AVX && PLL_STAT(avx_present))
+      pll_fastparsimony_update_vector_avx(parsimony,op);
+    else
+#endif
+#ifdef HAVE_AVX2
+    if (parsimony->attributes & PLL_ATTRIB_ARCH_AVX2 && PLL_STAT(avx2_present))
+      pll_fastparsimony_update_vector_avx2(parsimony,op);
+    else
+#endif
+      pll_fastparsimony_update_vector(parsimony,op);
+  }
+  return PLL_SUCCESS;
+}
+
+PLL_EXPORT void pll_fastparsimony_update_vectors(pll_parsimony_t * parsimony,
+                                                 const pll_pars_buildop_t * ops,
+                                                 unsigned int count)
+{
+  if (parsimony->states == 4)
+    fastparsimony_update_vectors_4x4(parsimony,ops,count);
+  else
+    fastparsimony_update_vectors(parsimony,ops,count);
+}
+
+PLL_EXPORT unsigned int pll_fastparsimony_edge_score(const pll_parsimony_t * parsimony,
+                                                     unsigned int node1_score_index,
+                                                     unsigned int node2_score_index)
+{
+  if (parsimony->states == 4)
+  {
+#ifdef HAVE_SSE3
+    if (parsimony->attributes & PLL_ATTRIB_ARCH_SSE && PLL_STAT(sse3_present))
+      return pll_fastparsimony_edge_score_4x4_sse(parsimony,
+                                                  node1_score_index,
+                                                  node2_score_index);
+#endif
+#ifdef HAVE_AVX
+    if (parsimony->attributes & PLL_ATTRIB_ARCH_AVX && PLL_STAT(avx_present))
+      return pll_fastparsimony_edge_score_4x4_avx(parsimony,
+                                                  node1_score_index,
+                                                  node2_score_index);
+#endif
+#ifdef HAVE_AVX2
+    if (parsimony->attributes & PLL_ATTRIB_ARCH_AVX2 && PLL_STAT(avx2_present))
+      return pll_fastparsimony_edge_score_4x4_avx2(parsimony,
+                                                   node1_score_index,
+                                                   node2_score_index);
+#endif
+    return pll_fastparsimony_edge_score_4x4(parsimony,
+                                            node1_score_index,
+                                            node2_score_index);
+  }
+
+#ifdef HAVE_SSE3
+  if (parsimony->attributes & PLL_ATTRIB_ARCH_SSE && PLL_STAT(sse3_present))
+    return pll_fastparsimony_edge_score_sse(parsimony,
+                                            node1_score_index,
+                                            node2_score_index);
+  else
+#endif
+#ifdef HAVE_AVX
+  if (parsimony->attributes & PLL_ATTRIB_ARCH_AVX && PLL_STAT(avx_present))
+    return pll_fastparsimony_edge_score_avx(parsimony,
+                                            node1_score_index,
+                                            node2_score_index);
+  else
+#endif
+#ifdef HAVE_AVX2
+  if (parsimony->attributes & PLL_ATTRIB_ARCH_AVX2 && PLL_STAT(avx2_present))
+    return pll_fastparsimony_edge_score_avx2(parsimony,
+                                             node1_score_index,
+                                             node2_score_index);
+  else
+#endif
+  return fastparsimony_edge_score(parsimony,
+                                  node1_score_index,
+                                  node2_score_index);
+
+}
+
+
+PLL_EXPORT unsigned int pll_fastparsimony_root_score(const pll_parsimony_t * parsimony,
+                                                     unsigned int root_index)
+{
+  return parsimony->node_cost[root_index] +
+         parsimony->const_cost;
+}
diff --git a/src/fast_parsimony_avx.c b/src/fast_parsimony_avx.c
new file mode 100644
index 0000000..ec0e9ad
--- /dev/null
+++ b/src/fast_parsimony_avx.c
@@ -0,0 +1,404 @@
+/*
+    Copyright (C) 2016 Tomas Flouri
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Contact: Tomas Flouri <Tomas.Flouri at h-its.org>,
+    Exelixis Lab, Heidelberg Instutute for Theoretical Studies
+    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
+*/
+
+#include "pll.h"
+
+PLL_EXPORT
+unsigned int pll_fastparsimony_edge_score_4x4_avx(const pll_parsimony_t * parsimony,
+                                                  unsigned int node1_score_index,
+                                                  unsigned int node2_score_index)
+{
+  unsigned int i;
+
+  unsigned int bits[32] __attribute__ ((aligned(PLL_ALIGNMENT_AVX)));
+
+  unsigned int * node1[8];
+  unsigned int * node2[8];
+
+  unsigned int * const * vector = parsimony->packedvector;
+  unsigned int vector_count = parsimony->packedvector_count;
+
+  unsigned int score = 0;
+
+  /* point to the parsimony vectors for each node and for each state */
+  for (i = 0; i < 4; ++i)
+  {
+    node1[i] = vector[node1_score_index] + i*vector_count;
+    node2[i] = vector[node2_score_index] + i*vector_count;
+  }
+
+  __m256d xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7;
+
+  /* set all bits to one */
+  xmm7 = (__m256d)_mm256_set1_epi32(-1);
+  
+  for (i = 0; i < parsimony->packedvector_count; i += 8)
+  {
+    /* load, and, or bit vectors for state 0 */
+    xmm0 = _mm256_load_pd((double *)(void *)(node1[0]+i));
+    xmm1 = _mm256_load_pd((double *)(void *)(node2[0]+i));
+
+    xmm2 = _mm256_and_pd(xmm0,xmm1);
+
+    /* load, and, or bit vectors for state 1 */
+    xmm0 = _mm256_load_pd((double *)(void *)(node1[1]+i));
+    xmm1 = _mm256_load_pd((double *)(void *)(node2[1]+i));
+
+    xmm3 = _mm256_and_pd(xmm0,xmm1);
+
+    /* load, and, or bit vectors for state 2 */
+    xmm0 = _mm256_load_pd((double *)(void *)(node1[2]+i));
+    xmm1 = _mm256_load_pd((double *)(void *)(node2[2]+i));
+
+    xmm4 = _mm256_and_pd(xmm0,xmm1);
+
+    /* load, and, or bit vectors for state 3 */
+    xmm0 = _mm256_load_pd((double *)(void *)(node1[3]+i));
+    xmm1 = _mm256_load_pd((double *)(void *)(node2[3]+i));
+
+    xmm5 = _mm256_and_pd(xmm0,xmm1);
+
+    
+    /* OR the ANDs of states 0 and 1 */
+    xmm0 = _mm256_or_pd(xmm2,xmm3);
+    /* OR the ANDs of states 2 and 3 */
+    xmm1 = _mm256_or_pd(xmm4,xmm5);
+    /* OR The two vectors */
+    xmm6 = _mm256_or_pd(xmm0,xmm1);
+
+
+    xmm0 = _mm256_andnot_pd(xmm6, xmm7);
+
+    _mm256_store_pd((double *)(void *)bits, xmm0);
+
+#if 0
+    /* seems there is no difference in speed between popcnt32 and popcnt64 */
+
+    unsigned long long * p = (unsigned long long *)bits;
+    score += __builtin_popcountl(p[0]);
+    score += __builtin_popcountl(p[1]);
+    score += __builtin_popcountl(p[2]);
+    score += __builtin_popcountl(p[3]);
+#else
+
+    score += (unsigned int)__builtin_popcount(bits[0]);
+    score += (unsigned int)__builtin_popcount(bits[1]);
+    score += (unsigned int)__builtin_popcount(bits[2]);
+    score += (unsigned int)__builtin_popcount(bits[3]);
+    score += (unsigned int)__builtin_popcount(bits[4]);
+    score += (unsigned int)__builtin_popcount(bits[5]);
+    score += (unsigned int)__builtin_popcount(bits[6]);
+    score += (unsigned int)__builtin_popcount(bits[7]);
+#endif
+  }
+
+  unsigned int score1 = parsimony->node_cost[node1_score_index];
+  unsigned int score2 = parsimony->node_cost[node2_score_index];
+
+  return score+score1+score2+parsimony->const_cost;
+}
+
+PLL_EXPORT
+void pll_fastparsimony_update_vector_4x4_avx(pll_parsimony_t * parsimony,
+                                             const pll_pars_buildop_t * op)
+{
+  unsigned int i;
+
+  unsigned int bits[32] __attribute__ ((aligned(PLL_ALIGNMENT_AVX)));
+
+  unsigned int * parent[8];
+  unsigned int * child1[8];
+  unsigned int * child2[8];
+
+  unsigned int ** vector = parsimony->packedvector;
+  unsigned int vector_count = parsimony->packedvector_count;
+
+  unsigned int score = 0;
+
+  /* point to the parsimony vectors for each node and for each state */
+  for (i = 0; i < 4; ++i)
+  {
+    parent[i] = vector[op->parent_score_index] + i*vector_count;
+    child1[i] = vector[op->child1_score_index] + i*vector_count;
+    child2[i] = vector[op->child2_score_index] + i*vector_count;
+  }
+
+  __m256d xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7,xmm8,xmm9,xmm10,xmm11;
+
+  /* set all bits to one */
+  xmm11 = (__m256d)_mm256_set1_epi32(-1);
+
+
+  for (i = 0; i < parsimony->packedvector_count; i += 8)
+  {
+    /* load, and, or bit vectors for state 0 */
+    xmm0 = _mm256_load_pd((double *)(void *)(child1[0]+i));
+    xmm1 = _mm256_load_pd((double *)(void *)(child2[0]+i));
+
+    xmm2 = _mm256_and_pd(xmm0,xmm1);
+    xmm3 = _mm256_or_pd(xmm0,xmm1);
+
+    /* load, and, or bit vectors for state 1 */
+    xmm0 = _mm256_load_pd((double *)(void *)(child1[1]+i));
+    xmm1 = _mm256_load_pd((double *)(void *)(child2[1]+i));
+
+    xmm4 = _mm256_and_pd(xmm0,xmm1);
+    xmm5 = _mm256_or_pd(xmm0,xmm1);
+
+    /* load, and, or bit vectors for state 2 */
+    xmm0 = _mm256_load_pd((double *)(void *)(child1[2]+i));
+    xmm1 = _mm256_load_pd((double *)(void *)(child2[2]+i));
+
+    xmm6 = _mm256_and_pd(xmm0,xmm1);
+    xmm7 = _mm256_or_pd(xmm0,xmm1);
+
+    /* load, and, or bit vectors for state 3 */
+    xmm0 = _mm256_load_pd((double *)(void *)(child1[3]+i));
+    xmm1 = _mm256_load_pd((double *)(void *)(child2[3]+i));
+
+    xmm8 = _mm256_and_pd(xmm0,xmm1);
+    xmm9 = _mm256_or_pd(xmm0,xmm1);
+
+    
+    /* OR the ANDs of states 0 and 1 */
+    xmm0 = _mm256_or_pd(xmm2,xmm4);
+    /* OR the ANDs of states 2 and 3 */
+    xmm1 = _mm256_or_pd(xmm6,xmm8);
+    /* OR The two vectors */
+    xmm10 = _mm256_or_pd(xmm0,xmm1);
+
+
+    /* store them */
+    xmm0 = _mm256_andnot_pd(xmm10,xmm3);
+    xmm1 = _mm256_or_pd(xmm2,xmm0);
+    _mm256_store_pd((double *)(void *)(parent[0]+i),xmm1);
+
+    xmm0 = _mm256_andnot_pd(xmm10,xmm5);
+    xmm1 = _mm256_or_pd(xmm4,xmm0);
+    _mm256_store_pd((double *)(void *)(parent[1]+i),xmm1);
+
+    xmm0 = _mm256_andnot_pd(xmm10,xmm7);
+    xmm1 = _mm256_or_pd(xmm6,xmm0);
+    _mm256_store_pd((double *)(void *)(parent[2]+i),xmm1);
+
+    xmm0 = _mm256_andnot_pd(xmm10,xmm9);
+    xmm1 = _mm256_or_pd(xmm8,xmm0);
+    _mm256_store_pd((double *)(void *)(parent[3]+i),xmm1);
+
+
+    xmm0 = _mm256_andnot_pd(xmm10, xmm11);
+
+    _mm256_store_pd((double *)(void *)bits, xmm0);
+
+#if 0
+    /* seems there is no difference in speed between popcnt32 and popcnt64 */
+
+    unsigned long long * p = (unsigned long long *)bits;
+    score += __builtin_popcountl(p[0]);
+    score += __builtin_popcountl(p[1]);
+    score += __builtin_popcountl(p[2]);
+    score += __builtin_popcountl(p[3]);
+#else
+
+    score += (unsigned int)__builtin_popcount(bits[0]);
+    score += (unsigned int)__builtin_popcount(bits[1]);
+    score += (unsigned int)__builtin_popcount(bits[2]);
+    score += (unsigned int)__builtin_popcount(bits[3]);
+    score += (unsigned int)__builtin_popcount(bits[4]);
+    score += (unsigned int)__builtin_popcount(bits[5]);
+    score += (unsigned int)__builtin_popcount(bits[6]);
+    score += (unsigned int)__builtin_popcount(bits[7]);
+#endif
+  }
+
+  unsigned int score1 = parsimony->node_cost[op->child1_score_index];
+  unsigned int score2 = parsimony->node_cost[op->child2_score_index];
+
+  parsimony->node_cost[op->parent_score_index] = score+score1+score2;
+}
+
+PLL_EXPORT
+void pll_fastparsimony_update_vector_avx(pll_parsimony_t * parsimony,
+                                         const pll_pars_buildop_t * op)
+{
+  unsigned int i,j;
+  unsigned int states = parsimony->states;
+
+  unsigned int bits[32] __attribute__ ((aligned(PLL_ALIGNMENT_AVX)));
+
+  unsigned int * parent;
+  unsigned int * child1;
+  unsigned int * child2;
+
+  unsigned int vector_count = parsimony->packedvector_count;
+  unsigned int ** vector = parsimony->packedvector;
+
+  unsigned int score = 0;
+
+  __m256d xmm0,xmm1,xmm2,xmm3,xmm4,xmm5;
+
+  /* set all bits to one */
+  xmm5 = (__m256d)_mm256_set1_epi32(-1);
+
+  for (i = 0; i < parsimony->packedvector_count; i += 8)
+  {
+    xmm4 = _mm256_setzero_pd();
+
+    /* load, and, or bit vectors for each state */
+    child1 = vector[op->child1_score_index];
+    child2 = vector[op->child2_score_index];
+    for (j = 0; j < states; ++j)
+    {
+      xmm0 = _mm256_load_pd((double *)(void *)(child1+i));
+      xmm1 = _mm256_load_pd((double *)(void *)(child2+i));
+
+      xmm2 = _mm256_and_pd(xmm0,xmm1);
+
+      /* combine (OR) all ANDs for all states */
+      xmm4 = _mm256_or_pd(xmm4,xmm2);
+
+      child1 += vector_count;
+      child2 += vector_count;
+    }
+
+    child1 = vector[op->child1_score_index];
+    child2 = vector[op->child2_score_index];
+    parent = vector[op->parent_score_index];
+    for (j=0; j<states; ++j)
+    {
+      /* load, and, or bit vectors for state j */
+      xmm0 = _mm256_load_pd((double *)(void *)(child1+i));
+      xmm1 = _mm256_load_pd((double *)(void *)(child2+i));
+
+      xmm2 = _mm256_and_pd(xmm0,xmm1);          /* vand */
+      xmm3 = _mm256_or_pd(xmm0,xmm1);           /* vor */
+
+      xmm0 = _mm256_andnot_pd(xmm4,xmm3);
+      xmm1 = _mm256_or_pd(xmm2,xmm0);
+      _mm256_store_pd((double *)(void *)(parent+i),xmm1); 
+
+      child1 += vector_count;
+      child2 += vector_count;
+      parent += vector_count;
+    }
+    xmm0 = _mm256_andnot_pd(xmm4,xmm5);
+    
+    _mm256_store_pd((double *)(void *)bits, xmm0);
+
+#if 0
+    /* seems there is no difference in speed between popcnt32 and popcnt64 */
+
+    unsigned long long * p = (unsigned long long *)bits;
+    score += __builtin_popcountl(p[0]);
+    score += __builtin_popcountl(p[1]);
+    score += __builtin_popcountl(p[2]);
+    score += __builtin_popcountl(p[3]);
+#else
+    score += (unsigned int)__builtin_popcount(bits[0]);
+    score += (unsigned int)__builtin_popcount(bits[1]);
+    score += (unsigned int)__builtin_popcount(bits[2]);
+    score += (unsigned int)__builtin_popcount(bits[3]);
+    score += (unsigned int)__builtin_popcount(bits[4]);
+    score += (unsigned int)__builtin_popcount(bits[5]);
+    score += (unsigned int)__builtin_popcount(bits[6]);
+    score += (unsigned int)__builtin_popcount(bits[7]);
+#endif
+  }
+
+  unsigned int score1 = parsimony->node_cost[op->child1_score_index];
+  unsigned int score2 = parsimony->node_cost[op->child2_score_index];
+
+  parsimony->node_cost[op->parent_score_index] = score+score1+score2;
+}
+
+PLL_EXPORT
+unsigned int pll_fastparsimony_edge_score_avx(const pll_parsimony_t * parsimony,
+                                              unsigned int node1_score_index,
+                                              unsigned int node2_score_index)
+{
+  unsigned int i,j;
+  unsigned int states = parsimony->states;
+
+  unsigned int bits[32] __attribute__ ((aligned(PLL_ALIGNMENT_AVX)));
+
+  unsigned int * node1;
+  unsigned int * node2;
+
+  unsigned int vector_count = parsimony->packedvector_count;
+  unsigned int ** vector = parsimony->packedvector;
+
+  unsigned int score = 0;
+
+  __m256d xmm0,xmm1,xmm2,xmm4,xmm5;
+
+  /* set all bits to one */
+  xmm5 = (__m256d)_mm256_set1_epi32(-1);
+
+  for (i = 0; i < parsimony->packedvector_count; i += 8)
+  {
+    xmm4 = _mm256_setzero_pd();
+
+    /* load, and, or bit vectors for each state */
+    node1 = vector[node1_score_index];
+    node2 = vector[node2_score_index];
+    for (j = 0; j < states; ++j)
+    {
+      xmm0 = _mm256_load_pd((double *)(void *)(node1+i));
+      xmm1 = _mm256_load_pd((double *)(void *)(node2+i));
+
+      xmm2 = _mm256_and_pd(xmm0,xmm1);
+
+      /* combine (OR) all ANDs for all states */
+      xmm4 = _mm256_or_pd(xmm4,xmm2);
+
+      node1 += vector_count;
+      node2 += vector_count;
+    }
+
+    xmm0 = _mm256_andnot_pd(xmm4,xmm5);
+    
+    _mm256_store_pd((double *)(void *)bits, xmm0);
+
+#if 0
+    /* seems there is no difference in speed between popcnt32 and popcnt64 */
+
+    unsigned long long * p = (unsigned long long *)bits;
+    score += __builtin_popcountl(p[0]);
+    score += __builtin_popcountl(p[1]);
+    score += __builtin_popcountl(p[2]);
+    score += __builtin_popcountl(p[3]);
+#else
+    score += (unsigned int)__builtin_popcount(bits[0]);
+    score += (unsigned int)__builtin_popcount(bits[1]);
+    score += (unsigned int)__builtin_popcount(bits[2]);
+    score += (unsigned int)__builtin_popcount(bits[3]);
+    score += (unsigned int)__builtin_popcount(bits[4]);
+    score += (unsigned int)__builtin_popcount(bits[5]);
+    score += (unsigned int)__builtin_popcount(bits[6]);
+    score += (unsigned int)__builtin_popcount(bits[7]);
+#endif
+  }
+
+  unsigned int score1 = parsimony->node_cost[node1_score_index];
+  unsigned int score2 = parsimony->node_cost[node2_score_index];
+
+  return score+score1+score2+parsimony->const_cost;
+}
diff --git a/src/fast_parsimony_avx2.c b/src/fast_parsimony_avx2.c
new file mode 100644
index 0000000..763aa88
--- /dev/null
+++ b/src/fast_parsimony_avx2.c
@@ -0,0 +1,399 @@
+/*
+    Copyright (C) 2016 Tomas Flouri
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Contact: Tomas Flouri <Tomas.Flouri at h-its.org>,
+    Exelixis Lab, Heidelberg Instutute for Theoretical Studies
+    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
+*/
+
+#include "pll.h"
+
+PLL_EXPORT
+unsigned int pll_fastparsimony_edge_score_4x4_avx2(const pll_parsimony_t * parsimony,
+                                                   unsigned int node1_score_index,
+                                                   unsigned int node2_score_index)
+{
+  unsigned int i;
+
+  unsigned int bits[32] __attribute__ ((aligned(PLL_ALIGNMENT_AVX)));
+
+  unsigned int const * node1[8];
+  unsigned int const * node2[8];
+
+  unsigned int * const * vector = parsimony->packedvector;
+  unsigned int vector_count = parsimony->packedvector_count;
+
+  unsigned int score = 0;
+
+  /* point to the parsimony vectors for each node and for each state */
+  for (i = 0; i < 4; ++i)
+  {
+    node1[i] = vector[node1_score_index] + i*vector_count;
+    node2[i] = vector[node2_score_index] + i*vector_count;
+  }
+
+  __m256i xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7;
+
+  /* set all bits to one */
+  xmm7 = _mm256_set1_epi32(-1);
+  
+  for (i = 0; i < parsimony->packedvector_count; i += 8)
+  {
+    /* load, and, or bit vectors for state 0 */
+    xmm0 = _mm256_load_si256((__m256i *)(void *)(node1[0]+i));
+    xmm1 = _mm256_load_si256((__m256i *)(void *)(node2[0]+i));
+
+    xmm2 = _mm256_and_si256(xmm0,xmm1);
+
+    /* load, and, or bit vectors for state 1 */
+    xmm0 = _mm256_load_si256((__m256i *)(void *)(node1[1]+i));
+    xmm1 = _mm256_load_si256((__m256i *)(void *)(node2[1]+i));
+
+    xmm3 = _mm256_and_si256(xmm0,xmm1);
+
+    /* load, and, or bit vectors for state 2 */
+    xmm0 = _mm256_load_si256((__m256i *)(void *)(node1[2]+i));
+    xmm1 = _mm256_load_si256((__m256i *)(void *)(node2[2]+i));
+
+    xmm4 = _mm256_and_si256(xmm0,xmm1);
+
+    /* load, and, or bit vectors for state 3 */
+    xmm0 = _mm256_load_si256((__m256i *)(void *)(node1[3]+i));
+    xmm1 = _mm256_load_si256((__m256i *)(void *)(node2[3]+i));
+
+    xmm5 = _mm256_and_si256(xmm0,xmm1);
+
+    
+    /* OR the ANDs of states 0 and 1 */
+    xmm0 = _mm256_or_si256(xmm2,xmm3);
+    /* OR the ANDs of states 2 and 3 */
+    xmm1 = _mm256_or_si256(xmm4,xmm5);
+    /* OR The two vectors */
+    xmm6 = _mm256_or_si256(xmm0,xmm1);
+
+
+    xmm0 = _mm256_andnot_si256(xmm6, xmm7);
+
+    _mm256_store_si256((__m256i *)(void *)bits, xmm0);
+
+#if 0
+    unsigned long long * p = (unsigned long long *)bits;
+    score += __builtin_popcountl(p[0]);
+    //score += __builtin_popcount(((unsigned long long)bits)[0]);
+    score += __builtin_popcountl(p[1]);
+    score += __builtin_popcountl(p[2]);
+    score += __builtin_popcountl(p[3]);
+#else
+    score += (unsigned int)__builtin_popcount(bits[0]);
+    score += (unsigned int)__builtin_popcount(bits[1]);
+    score += (unsigned int)__builtin_popcount(bits[2]);
+    score += (unsigned int)__builtin_popcount(bits[3]);
+    score += (unsigned int)__builtin_popcount(bits[4]);
+    score += (unsigned int)__builtin_popcount(bits[5]);
+    score += (unsigned int)__builtin_popcount(bits[6]);
+    score += (unsigned int)__builtin_popcount(bits[7]);
+#endif
+  }
+
+  unsigned int score1 = parsimony->node_cost[node1_score_index];
+  unsigned int score2 = parsimony->node_cost[node2_score_index];
+
+  return score+score1+score2+parsimony->const_cost;
+}
+
+PLL_EXPORT
+void pll_fastparsimony_update_vector_4x4_avx2(pll_parsimony_t * parsimony,
+                                              const pll_pars_buildop_t * op)
+{
+  unsigned int i;
+
+  unsigned int bits[32] __attribute__ ((aligned(PLL_ALIGNMENT_AVX)));
+
+  unsigned int * parent[8];
+  unsigned int * child1[8];
+  unsigned int * child2[8];
+
+  unsigned int ** vector = parsimony->packedvector;
+  unsigned int vector_count = parsimony->packedvector_count;
+
+  unsigned int score = 0;
+
+  /* point to the parsimony vectors for each node and for each state */
+  for (i = 0; i < 4; ++i)
+  {
+    parent[i] = vector[op->parent_score_index] + i*vector_count;
+    child1[i] = vector[op->child1_score_index] + i*vector_count;
+    child2[i] = vector[op->child2_score_index] + i*vector_count;
+  }
+
+  __m256i xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7,xmm8,xmm9,xmm10,xmm11;
+
+  /* set all bits to one */
+  xmm11 = _mm256_set1_epi32(-1);
+
+
+  for (i = 0; i < parsimony->packedvector_count; i += 8)
+  {
+    /* load, and, or bit vectors for state 0 */
+    xmm0 = _mm256_load_si256((__m256i *)(void *)(child1[0]+i));
+    xmm1 = _mm256_load_si256((__m256i *)(void *)(child2[0]+i));
+
+    xmm2 = _mm256_and_si256(xmm0,xmm1);
+    xmm3 = _mm256_or_si256(xmm0,xmm1);
+
+    /* load, and, or bit vectors for state 1 */
+    xmm0 = _mm256_load_si256((__m256i *)(void *)(child1[1]+i));
+    xmm1 = _mm256_load_si256((__m256i *)(void *)(child2[1]+i));
+
+    xmm4 = _mm256_and_si256(xmm0,xmm1);
+    xmm5 = _mm256_or_si256(xmm0,xmm1);
+
+    /* load, and, or bit vectors for state 2 */
+    xmm0 = _mm256_load_si256((__m256i *)(void *)(child1[2]+i));
+    xmm1 = _mm256_load_si256((__m256i *)(void *)(child2[2]+i));
+
+    xmm6 = _mm256_and_si256(xmm0,xmm1);
+    xmm7 = _mm256_or_si256(xmm0,xmm1);
+
+    /* load, and, or bit vectors for state 3 */
+    xmm0 = _mm256_load_si256((__m256i *)(void *)(child1[3]+i));
+    xmm1 = _mm256_load_si256((__m256i *)(void *)(child2[3]+i));
+
+    xmm8 = _mm256_and_si256(xmm0,xmm1);
+    xmm9 = _mm256_or_si256(xmm0,xmm1);
+
+    
+    /* OR the ANDs of states 0 and 1 */
+    xmm0 = _mm256_or_si256(xmm2,xmm4);
+    /* OR the ANDs of states 2 and 3 */
+    xmm1 = _mm256_or_si256(xmm6,xmm8);
+    /* OR The two vectors */
+    xmm10 = _mm256_or_si256(xmm0,xmm1);
+
+
+    /* store them */
+    xmm0 = _mm256_andnot_si256(xmm10,xmm3);
+    xmm1 = _mm256_or_si256(xmm2,xmm0);
+    _mm256_store_si256((__m256i *)(void *)(parent[0]+i),xmm1);
+
+    xmm0 = _mm256_andnot_si256(xmm10,xmm5);
+    xmm1 = _mm256_or_si256(xmm4,xmm0);
+    _mm256_store_si256((__m256i *)(void *)(parent[1]+i),xmm1);
+
+    xmm0 = _mm256_andnot_si256(xmm10,xmm7);
+    xmm1 = _mm256_or_si256(xmm6,xmm0);
+    _mm256_store_si256((__m256i *)(void *)(parent[2]+i),xmm1);
+
+    xmm0 = _mm256_andnot_si256(xmm10,xmm9);
+    xmm1 = _mm256_or_si256(xmm8,xmm0);
+    _mm256_store_si256((__m256i *)(void *)(parent[3]+i),xmm1);
+
+
+    xmm0 = _mm256_andnot_si256(xmm10, xmm11);
+
+    _mm256_store_si256((__m256i *)(void *)bits, xmm0);
+#if 0
+    unsigned long long * p = (unsigned long long *)bits;
+    score += __builtin_popcountl(p[0]);
+    //score += __builtin_popcount(((unsigned long long)bits)[0]);
+    score += __builtin_popcountl(p[1]);
+    score += __builtin_popcountl(p[2]);
+    score += __builtin_popcountl(p[3]);
+#else
+    score += (unsigned int)__builtin_popcount(bits[0]);
+    score += (unsigned int)__builtin_popcount(bits[1]);
+    score += (unsigned int)__builtin_popcount(bits[2]);
+    score += (unsigned int)__builtin_popcount(bits[3]);
+    score += (unsigned int)__builtin_popcount(bits[4]);
+    score += (unsigned int)__builtin_popcount(bits[5]);
+    score += (unsigned int)__builtin_popcount(bits[6]);
+    score += (unsigned int)__builtin_popcount(bits[7]);
+#endif
+  }
+
+  unsigned int score1 = parsimony->node_cost[op->child1_score_index];
+  unsigned int score2 = parsimony->node_cost[op->child2_score_index];
+
+  parsimony->node_cost[op->parent_score_index] = score+score1+score2;
+}
+
+PLL_EXPORT
+void pll_fastparsimony_update_vector_avx2(pll_parsimony_t * parsimony,
+                                          const pll_pars_buildop_t * op)
+{
+  unsigned int i,j;
+  unsigned int states = parsimony->states;
+
+  unsigned int bits[32] __attribute__ ((aligned(PLL_ALIGNMENT_AVX)));
+
+  unsigned int * parent;
+  unsigned int * child1;
+  unsigned int * child2;
+
+  unsigned int vector_count = parsimony->packedvector_count;
+  unsigned int ** vector = parsimony->packedvector;
+
+  unsigned int score = 0;
+
+  __m256i xmm0,xmm1,xmm2,xmm3,xmm4,xmm5;
+
+  /* set all bits to one */
+  xmm5 = _mm256_set1_epi32(-1);
+
+  for (i = 0; i < parsimony->packedvector_count; i += 8)
+  {
+    xmm4 = _mm256_setzero_si256();
+
+    /* load, and, or bit vectors for each state */
+    child1 = vector[op->child1_score_index];
+    child2 = vector[op->child2_score_index];
+    for (j = 0; j < states; ++j)
+    {
+      xmm0 = _mm256_load_si256((__m256i *)(void *)(child1+i));
+      xmm1 = _mm256_load_si256((__m256i *)(void *)(child2+i));
+
+      xmm2 = _mm256_and_si256(xmm0,xmm1);
+
+      /* combine (OR) all ANDs for all states */
+      xmm4 = _mm256_or_si256(xmm4,xmm2);
+
+      child1 += vector_count;
+      child2 += vector_count;
+    }
+
+    child1 = vector[op->child1_score_index];
+    child2 = vector[op->child2_score_index];
+    parent = vector[op->parent_score_index];
+    for (j=0; j<states; ++j)
+    {
+      /* load, and, or bit vectors for state j */
+      xmm0 = _mm256_load_si256((__m256i *)(void *)(child1+i));
+      xmm1 = _mm256_load_si256((__m256i *)(void *)(child2+i));
+
+      xmm2 = _mm256_and_si256(xmm0,xmm1);          /* vand */
+      xmm3 = _mm256_or_si256(xmm0,xmm1);           /* vor */
+
+      xmm0 = _mm256_andnot_si256(xmm4,xmm3);
+      xmm1 = _mm256_or_si256(xmm2,xmm0);
+      _mm256_store_si256((__m256i *)(void *)(parent+i),xmm1); 
+
+      child1 += vector_count;
+      child2 += vector_count;
+      parent += vector_count;
+    }
+    xmm0 = _mm256_andnot_si256(xmm4,xmm5);
+    
+    _mm256_store_si256((__m256i *)(void *)bits, xmm0);
+
+#if 0
+    /* seems there is no difference in speed between popcnt32 and popcnt64 */
+
+    unsigned long long * p = (unsigned long long *)bits;
+    score += __builtin_popcountl(p[0]);
+    score += __builtin_popcountl(p[1]);
+    score += __builtin_popcountl(p[2]);
+    score += __builtin_popcountl(p[3]);
+#else
+    score += (unsigned int)__builtin_popcount(bits[0]);
+    score += (unsigned int)__builtin_popcount(bits[1]);
+    score += (unsigned int)__builtin_popcount(bits[2]);
+    score += (unsigned int)__builtin_popcount(bits[3]);
+    score += (unsigned int)__builtin_popcount(bits[4]);
+    score += (unsigned int)__builtin_popcount(bits[5]);
+    score += (unsigned int)__builtin_popcount(bits[6]);
+    score += (unsigned int)__builtin_popcount(bits[7]);
+#endif
+  }
+
+  unsigned int score1 = parsimony->node_cost[op->child1_score_index];
+  unsigned int score2 = parsimony->node_cost[op->child2_score_index];
+
+  parsimony->node_cost[op->parent_score_index] = score+score1+score2;
+}
+
+PLL_EXPORT
+unsigned int pll_fastparsimony_edge_score_avx2(const pll_parsimony_t * parsimony,
+                                               unsigned int node1_score_index,
+                                               unsigned int node2_score_index)
+{
+  unsigned int i,j;
+  unsigned int states = parsimony->states;
+
+  unsigned int bits[32] __attribute__ ((aligned(PLL_ALIGNMENT_AVX)));
+
+  unsigned int const * node1;
+  unsigned int const * node2;
+
+  unsigned int vector_count = parsimony->packedvector_count;
+  unsigned int * const * vector = parsimony->packedvector;
+
+  unsigned int score = 0;
+
+  __m256i xmm0,xmm1,xmm2,xmm4,xmm5;
+
+  /* set all bits to one */
+  xmm5 = _mm256_set1_epi32(-1);
+
+  for (i = 0; i < parsimony->packedvector_count; i += 8)
+  {
+    xmm4 = _mm256_setzero_si256();
+
+    /* load, and, or bit vectors for each state */
+    node1 = vector[node1_score_index];
+    node2 = vector[node2_score_index];
+    for (j = 0; j < states; ++j)
+    {
+      xmm0 = _mm256_load_si256((__m256i *)(void *)(node1+i));
+      xmm1 = _mm256_load_si256((__m256i *)(void *)(node2+i));
+
+      xmm2 = _mm256_and_si256(xmm0,xmm1);
+
+      /* combine (OR) all ANDs for all states */
+      xmm4 = _mm256_or_si256(xmm4,xmm2);
+
+      node1 += vector_count;
+      node2 += vector_count;
+    }
+
+    xmm0 = _mm256_andnot_si256(xmm4,xmm5);
+    
+    _mm256_store_si256((__m256i *)(void *)bits, xmm0);
+
+#if 0
+    /* seems there is no difference in speed between popcnt32 and popcnt64 */
+
+    unsigned long long * p = (unsigned long long *)bits;
+    score += __builtin_popcountl(p[0]);
+    score += __builtin_popcountl(p[1]);
+    score += __builtin_popcountl(p[2]);
+    score += __builtin_popcountl(p[3]);
+#else
+    score += (unsigned int)__builtin_popcount(bits[0]);
+    score += (unsigned int)__builtin_popcount(bits[1]);
+    score += (unsigned int)__builtin_popcount(bits[2]);
+    score += (unsigned int)__builtin_popcount(bits[3]);
+    score += (unsigned int)__builtin_popcount(bits[4]);
+    score += (unsigned int)__builtin_popcount(bits[5]);
+    score += (unsigned int)__builtin_popcount(bits[6]);
+    score += (unsigned int)__builtin_popcount(bits[7]);
+#endif
+  }
+
+  unsigned int score1 = parsimony->node_cost[node1_score_index];
+  unsigned int score2 = parsimony->node_cost[node2_score_index];
+
+  return score+score1+score2+parsimony->const_cost;
+}
diff --git a/src/fast_parsimony_sse.c b/src/fast_parsimony_sse.c
new file mode 100644
index 0000000..48d0ba5
--- /dev/null
+++ b/src/fast_parsimony_sse.c
@@ -0,0 +1,345 @@
+/*
+    Copyright (C) 2016 Tomas Flouri
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Contact: Tomas Flouri <Tomas.Flouri at h-its.org>,
+    Exelixis Lab, Heidelberg Instutute for Theoretical Studies
+    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
+*/
+
+#include "pll.h"
+
+PLL_EXPORT
+unsigned int pll_fastparsimony_edge_score_4x4_sse(const pll_parsimony_t * parsimony,
+                                                  unsigned int node1_score_index,
+                                                  unsigned int node2_score_index)
+{
+  unsigned int i;
+
+  unsigned int bits[16] __attribute__ ((aligned(PLL_ALIGNMENT_SSE)));
+
+  unsigned int * node1[4];
+  unsigned int * node2[4];
+
+  unsigned int ** vector = parsimony->packedvector;
+  unsigned int vector_count = parsimony->packedvector_count;
+
+  unsigned int score = 0;
+
+  /* point to the parsimony vectors for each node and for each state */
+  for (i = 0; i < 4; ++i)
+  {
+    node1[i] = vector[node1_score_index] + i*vector_count;
+    node2[i] = vector[node2_score_index] + i*vector_count;
+  }
+
+  __m128i xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7;
+
+  /* set all bits to one */
+  xmm7 = _mm_set1_epi32(-1);
+
+  for (i = 0; i < parsimony->packedvector_count; i += 4)
+  {
+    /* load, and, or bit vectors for state 0 */
+    xmm0 = _mm_load_si128((__m128i *)(void *)(node1[0]+i));
+    xmm1 = _mm_load_si128((__m128i *)(void *)(node2[0]+i));
+
+    xmm2 = _mm_and_si128(xmm0,xmm1);
+
+    /* load, and, or bit vectors for state 1 */
+    xmm0 = _mm_load_si128((__m128i *)(void *)(node1[1]+i));
+    xmm1 = _mm_load_si128((__m128i *)(void *)(node2[1]+i));
+
+    xmm3 = _mm_and_si128(xmm0,xmm1);
+
+    /* load, and, or bit vectors for state 2 */
+    xmm0 = _mm_load_si128((__m128i *)(void *)(node1[2]+i));
+    xmm1 = _mm_load_si128((__m128i *)(void *)(node2[2]+i));
+
+    xmm4 = _mm_and_si128(xmm0,xmm1);
+
+    /* load, and, or bit vectors for state 3 */
+    xmm0 = _mm_load_si128((__m128i *)(void *)(node1[3]+i));
+    xmm1 = _mm_load_si128((__m128i *)(void *)(node2[3]+i));
+
+    xmm5 = _mm_and_si128(xmm0,xmm1);
+
+
+    /* OR the ANDs of states 0 and 1 */
+    xmm0 = _mm_or_si128(xmm2,xmm3);
+    /* OR the ANDs of states 2 and 3 */
+    xmm1 = _mm_or_si128(xmm4,xmm5);
+    /* OR The two vectors */
+    xmm6 = _mm_or_si128(xmm0,xmm1);
+
+
+    xmm0 = _mm_andnot_si128(xmm6, xmm7);
+
+    _mm_store_si128((__m128i *)(void *)bits, xmm0);
+
+    score += (unsigned int)__builtin_popcount(bits[0]);
+    score += (unsigned int)__builtin_popcount(bits[1]);
+    score += (unsigned int)__builtin_popcount(bits[2]);
+    score += (unsigned int)__builtin_popcount(bits[3]);
+  }
+
+  unsigned int score1 = parsimony->node_cost[node1_score_index];
+  unsigned int score2 = parsimony->node_cost[node2_score_index];
+
+  return score+score1+score2+parsimony->const_cost;
+}
+
+PLL_EXPORT
+void pll_fastparsimony_update_vector_4x4_sse(pll_parsimony_t * parsimony,
+                                             const pll_pars_buildop_t * op)
+{
+  unsigned int i;
+
+  unsigned int bits[16] __attribute__ ((aligned(PLL_ALIGNMENT_SSE)));
+
+  unsigned int * parent[4];
+  unsigned int * child1[4];
+  unsigned int * child2[4];
+
+  unsigned int ** vector = parsimony->packedvector;
+  unsigned int vector_count = parsimony->packedvector_count;
+
+  unsigned int score = 0;
+
+  /* point to the parsimony vectors for each node and for each state */
+  for (i = 0; i < 4; ++i)
+  {
+    parent[i] = vector[op->parent_score_index] + i*vector_count;
+    child1[i] = vector[op->child1_score_index] + i*vector_count;
+    child2[i] = vector[op->child2_score_index] + i*vector_count;
+  }
+
+  __m128i xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7,xmm8,xmm9,xmm10,xmm11;
+
+  /* set all bits to one */
+  xmm11 = _mm_set1_epi32(-1);
+
+  for (i = 0; i < parsimony->packedvector_count; i += 4)
+  {
+    /* load, and, or bit vectors for state 0 */
+    xmm0 = _mm_load_si128((__m128i *)(void *)(child1[0]+i));
+    xmm1 = _mm_load_si128((__m128i *)(void *)(child2[0]+i));
+
+    xmm2 = _mm_and_si128(xmm0,xmm1);
+    xmm3 = _mm_or_si128(xmm0,xmm1);
+
+    /* load, and, or bit vectors for state 1 */
+    xmm0 = _mm_load_si128((__m128i *)(void *)(child1[1]+i));
+    xmm1 = _mm_load_si128((__m128i *)(void *)(child2[1]+i));
+
+    xmm4 = _mm_and_si128(xmm0,xmm1);
+    xmm5 = _mm_or_si128(xmm0,xmm1);
+
+    /* load, and, or bit vectors for state 2 */
+    xmm0 = _mm_load_si128((__m128i *)(void *)(child1[2]+i));
+    xmm1 = _mm_load_si128((__m128i *)(void *)(child2[2]+i));
+
+    xmm6 = _mm_and_si128(xmm0,xmm1);
+    xmm7 = _mm_or_si128(xmm0,xmm1);
+
+    /* load, and, or bit vectors for state 3 */
+    xmm0 = _mm_load_si128((__m128i *)(void *)(child1[3]+i));
+    xmm1 = _mm_load_si128((__m128i *)(void *)(child2[3]+i));
+
+    xmm8 = _mm_and_si128(xmm0,xmm1);
+    xmm9 = _mm_or_si128(xmm0,xmm1);
+
+    
+    /* OR the ANDs of states 0 and 1 */
+    xmm0 = _mm_or_si128(xmm2,xmm4);
+    /* OR the ANDs of states 2 and 3 */
+    xmm1 = _mm_or_si128(xmm6,xmm8);
+    /* OR The two vectors */
+    xmm10 = _mm_or_si128(xmm0,xmm1);
+
+
+    /* store them */
+    xmm0 = _mm_andnot_si128(xmm10,xmm3);
+    xmm1 = _mm_or_si128(xmm2,xmm0);
+    _mm_store_si128((__m128i *)(void *)(parent[0]+i),xmm1);
+
+    xmm0 = _mm_andnot_si128(xmm10,xmm5);
+    xmm1 = _mm_or_si128(xmm4,xmm0);
+    _mm_store_si128((__m128i *)(void *)(parent[1]+i),xmm1);
+
+    xmm0 = _mm_andnot_si128(xmm10,xmm7);
+    xmm1 = _mm_or_si128(xmm6,xmm0);
+    _mm_store_si128((__m128i *)(void *)(parent[2]+i),xmm1);
+
+    xmm0 = _mm_andnot_si128(xmm10,xmm9);
+    xmm1 = _mm_or_si128(xmm8,xmm0);
+    _mm_store_si128((__m128i *)(void *)(parent[3]+i),xmm1);
+
+
+    xmm0 = _mm_andnot_si128(xmm10, xmm11);
+
+    _mm_store_si128((__m128i *)(void *)bits, xmm0);
+
+    score += (unsigned int)__builtin_popcount(bits[0]);
+    score += (unsigned int)__builtin_popcount(bits[1]);
+    score += (unsigned int)__builtin_popcount(bits[2]);
+    score += (unsigned int)__builtin_popcount(bits[3]);
+  }
+
+  unsigned int score1 = parsimony->node_cost[op->child1_score_index];
+  unsigned int score2 = parsimony->node_cost[op->child2_score_index];
+
+  parsimony->node_cost[op->parent_score_index] = score+score1+score2;
+}
+
+PLL_EXPORT
+void pll_fastparsimony_update_vector_sse(pll_parsimony_t * parsimony,
+                                         const pll_pars_buildop_t * op)
+{
+  unsigned int i,j;
+  unsigned int states = parsimony->states;
+
+  unsigned int bits[16] __attribute__ ((aligned(PLL_ALIGNMENT_SSE)));
+
+  unsigned int * parent;
+  unsigned int * child1;
+  unsigned int * child2;
+
+  unsigned int ** vector = parsimony->packedvector;
+  unsigned int vector_count = parsimony->packedvector_count;
+
+  unsigned int score = 0;
+
+  __m128i xmm0,xmm1,xmm2,xmm3,xmm4,xmm5;
+
+  /* set all bits to one */
+  xmm5 = _mm_set1_epi32(-1);
+
+  for (i = 0; i < parsimony->packedvector_count; i += 4)
+  {
+    xmm4 = _mm_setzero_si128();
+
+    /* load, and, or bit vectors for state 0 */
+    child1 = vector[op->child1_score_index];
+    child2 = vector[op->child2_score_index];
+    for (j = 0; j < states; ++j)
+    {
+      xmm0 = _mm_load_si128((__m128i *)(void *)(child1+i));
+      xmm1 = _mm_load_si128((__m128i *)(void *)(child2+i));
+
+      xmm2 = _mm_and_si128(xmm0,xmm1);
+
+      /* combine (OR) all ANDs for all states */
+      xmm4 = _mm_or_si128(xmm4,xmm2);
+
+      child1 += vector_count;
+      child2 += vector_count;
+    }
+
+    child1 = vector[op->child1_score_index];
+    child2 = vector[op->child2_score_index];
+    parent = vector[op->parent_score_index];
+    for (j=0; j<states; ++j)
+    {
+      /* load, and, or bit vectors for state j */
+      xmm0 = _mm_load_si128((__m128i *)(void *)(child1+i));
+      xmm1 = _mm_load_si128((__m128i *)(void *)(child2+i));
+
+      xmm2 = _mm_and_si128(xmm0,xmm1);          /* vand */
+      xmm3 = _mm_or_si128(xmm0,xmm1);           /* vor */
+
+      xmm0 = _mm_andnot_si128(xmm4,xmm3);
+      xmm1 = _mm_or_si128(xmm2,xmm0);
+      _mm_store_si128((__m128i *)(void *)(parent+i),xmm1); 
+
+      child1 += vector_count;
+      child2 += vector_count;
+      parent += vector_count;
+    }
+    xmm0 = _mm_andnot_si128(xmm4,xmm5);
+
+    _mm_store_si128((__m128i *)(void *)bits, xmm0);
+
+    score += (unsigned int)__builtin_popcount(bits[0]);
+    score += (unsigned int)__builtin_popcount(bits[1]);
+    score += (unsigned int)__builtin_popcount(bits[2]);
+    score += (unsigned int)__builtin_popcount(bits[3]);
+  }
+
+  unsigned int score1 = parsimony->node_cost[op->child1_score_index];
+  unsigned int score2 = parsimony->node_cost[op->child2_score_index];
+
+  parsimony->node_cost[op->parent_score_index] = score+score1+score2;
+}
+
+PLL_EXPORT
+unsigned int pll_fastparsimony_edge_score_sse(const pll_parsimony_t * parsimony,
+                                              unsigned int node1_score_index,
+                                              unsigned int node2_score_index)
+{
+  unsigned int i,j;
+  unsigned int states = parsimony->states;
+
+  unsigned int bits[16] __attribute__ ((aligned(PLL_ALIGNMENT_SSE)));
+
+  unsigned int * node1;
+  unsigned int * node2;
+
+  unsigned int vector_count = parsimony->packedvector_count;
+  unsigned int ** vector = parsimony->packedvector;
+
+  unsigned int score = 0;
+
+  __m128i xmm0,xmm1,xmm2,xmm4,xmm5;
+
+  /* set all bits to one */
+  xmm5 = _mm_set1_epi32(-1);
+
+  for (i = 0; i < parsimony->packedvector_count; i += 4)
+  {
+    xmm4 = _mm_setzero_si128();
+
+    /* load, and, or bit vectors for each state */
+    node1 = vector[node1_score_index];
+    node2 = vector[node2_score_index];
+    for (j = 0; j < states; ++j)
+    {
+      xmm0 = _mm_load_si128((__m128i *)(void *)(node1+i));
+      xmm1 = _mm_load_si128((__m128i *)(void *)(node2+i));
+
+      xmm2 = _mm_and_si128(xmm0,xmm1);
+
+      /* combine (OR) all ANDs for all states */
+      xmm4 = _mm_or_si128(xmm4,xmm2);
+
+      node1 += vector_count;
+      node2 += vector_count;
+    }
+
+    xmm0 = _mm_andnot_si128(xmm4,xmm5);
+    
+    _mm_store_si128((__m128i *)(void *)bits, xmm0);
+
+    score += (unsigned int)__builtin_popcount(bits[0]);
+    score += (unsigned int)__builtin_popcount(bits[1]);
+    score += (unsigned int)__builtin_popcount(bits[2]);
+    score += (unsigned int)__builtin_popcount(bits[3]);
+  }
+
+  unsigned int score1 = parsimony->node_cost[node1_score_index];
+  unsigned int score2 = parsimony->node_cost[node2_score_index];
+
+  return score+score1+score2+parsimony->const_cost;
+}
diff --git a/src/fasta.c b/src/fasta.c
index fec2fe7..1ddcaa3 100644
--- a/src/fasta.c
+++ b/src/fasta.c
@@ -313,7 +313,7 @@ PLL_EXPORT int pll_fasta_getnext(pll_fasta_t * fd, char ** head,
   return PLL_FAILURE;
 }
 
-PLL_EXPORT long pll_fasta_getfilesize(pll_fasta_t * fd)
+PLL_EXPORT long pll_fasta_getfilesize(const pll_fasta_t * fd)
 {
   return fd->filesize;
 }
diff --git a/src/gamma.c b/src/gamma.c
index b0591df..106e183 100644
--- a/src/gamma.c
+++ b/src/gamma.c
@@ -219,7 +219,8 @@ l4:
 
 PLL_EXPORT int pll_compute_gamma_cats(double alpha,
                                       unsigned int categories,
-                                      double * output_rates)
+                                      double * output_rates,
+                                      int rates_mode)
 {
   unsigned int i;
 
@@ -245,7 +246,21 @@ PLL_EXPORT int pll_compute_gamma_cats(double alpha,
   {
     output_rates[0] = 1.0;
   }
-  else
+  else if (rates_mode == PLL_GAMMA_RATES_MEDIAN)
+  {
+    double
+      middle = 1.0 / (2.0 * categories),
+      t = 0.0;
+
+    for(i = 0; i < categories; i++)
+      output_rates[i] = POINT_GAMMA((double)(i * 2 + 1) * middle, alfa, beta);
+
+    for (i = 0; i < categories; i++)
+      t += output_rates[i];
+     for( i = 0; i < categories; i++)
+       output_rates[i] *= factor / t;
+  }
+  else if (rates_mode == PLL_GAMMA_RATES_MEAN)
   {
     gammaProbs = (double *)malloc(categories * sizeof(double));
 
@@ -266,6 +281,12 @@ PLL_EXPORT int pll_compute_gamma_cats(double alpha,
 
     free(gammaProbs);
   }
+  else
+  {
+    pll_errno = PLL_ERROR_PARAM_INVALID;
+    snprintf(pll_errmsg, 200, "Invalid GAMMA disrcretization mode (%d)", rates_mode);
+    return PLL_FAILURE;
+  }
 
   return PLL_SUCCESS;
 }
diff --git a/src/hardware.c b/src/hardware.c
new file mode 100644
index 0000000..49d414a
--- /dev/null
+++ b/src/hardware.c
@@ -0,0 +1,121 @@
+/*
+    Copyright (C) 2017 Tomas Flouri
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Contact: Tomas Flouri <Tomas.Flouri at h-its.org>,
+    Exelixis Lab, Heidelberg Instutute for Theoretical Studies
+    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
+*/
+
+#include "pll.h"
+
+#ifndef __PPC__
+#define cpuid(f1, f2, a, b, c, d)                                \
+  __asm__ __volatile__ ("cpuid"                                  \
+                        : "=a" (a), "=b" (b), "=c" (c), "=d" (d) \
+                        : "a" (f1), "c" (f2));
+#endif
+
+static void cpu_features_detect()
+{
+  unsigned int a,b,c,d;
+
+  memset(pll_hardware,0,sizeof(pll_hardware_t));
+
+#ifdef __PPC__
+  pll_hardware->altivec_present = 1;
+#else
+
+  cpuid(0,0,a,b,c,d);
+  unsigned int maxlevel = a & 0xff;
+
+  if (maxlevel >= 1)
+  {
+    cpuid(1,0,a,b,c,d);
+    pll_hardware->mmx_present    = (d >> 23) & 1;
+    pll_hardware->sse_present    = (d >> 25) & 1;
+    pll_hardware->sse2_present   = (d >> 26) & 1;
+    pll_hardware->sse3_present   = (c >>  0) & 1;
+    pll_hardware->ssse3_present  = (c >>  9) & 1;
+    pll_hardware->sse41_present  = (c >> 19) & 1;
+    pll_hardware->sse42_present  = (c >> 20) & 1;
+    pll_hardware->popcnt_present = (c >> 23) & 1;
+    pll_hardware->avx_present    = (c >> 28) & 1;
+
+    if (maxlevel >= 7)
+    {
+      cpuid(7,0,a,b,c,d);
+      pll_hardware->avx2_present = (b >> 5) & 1;
+    }
+  }
+#endif
+}
+
+static void cpu_features_show()
+{
+  if (!pll_hardware)
+  {
+    /* TODO: Add proper error control after we figure out
+       cross-platform compatibility */
+    return;
+  }
+    
+  fprintf(stderr, "CPU features:");
+  if (pll_hardware->altivec_present)
+    fprintf(stderr, " altivec");
+  if (pll_hardware->mmx_present)
+    fprintf(stderr, " mmx");
+  if (pll_hardware->sse_present)
+    fprintf(stderr, " sse");
+  if (pll_hardware->sse2_present)
+    fprintf(stderr, " sse2");
+  if (pll_hardware->sse3_present)
+    fprintf(stderr, " sse3");
+  if (pll_hardware->ssse3_present)
+    fprintf(stderr, " ssse3");
+  if (pll_hardware->sse41_present)
+    fprintf(stderr, " sse4.1");
+  if (pll_hardware->sse42_present)
+    fprintf(stderr, " sse4.2");
+  if (pll_hardware->popcnt_present)
+    fprintf(stderr, " popcnt");
+  if (pll_hardware->avx_present)
+    fprintf(stderr, " avx");
+  if (pll_hardware->avx2_present)
+    fprintf(stderr, " avx2");
+  fprintf(stderr, "\n");
+}
+
+PLL_EXPORT int pll_hardware_probe()
+{
+  /* probe cpu features */
+  if (!pll_hardware)
+  {
+    if (!(pll_hardware = (pll_hardware_t *)calloc(1,sizeof(pll_hardware_t))))
+    {
+      pll_errno = PLL_ERROR_MEM_ALLOC;
+      snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+      return PLL_FAILURE;
+    }
+  }
+  cpu_features_detect();
+
+  return PLL_SUCCESS;
+}
+
+PLL_EXPORT void pll_hardware_dump()
+{
+  cpu_features_show(); 
+}
diff --git a/test/src/common.h b/src/init.c
similarity index 53%
copy from test/src/common.h
copy to src/init.c
index 4d8f52c..90d5bd3 100644
--- a/test/src/common.h
+++ b/src/init.c
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2015 Diego Darriba, Tomas Flouri
+    Copyright (C) 2017 Tomas Flouri
 
     This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU Affero General Public License as
@@ -14,30 +14,21 @@
     You should have received a copy of the GNU Affero General Public License
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-    Contact: Diego Darriba <Diego.Darriba at h-its.org>,
+    Contact: Tomas Flouri <Tomas.Flouri at h-its.org>,
     Exelixis Lab, Heidelberg Instutute for Theoretical Studies
     Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
 */
-#ifndef COMMON_H_
-#define COMMON_H_
 
-#ifndef PLL_H_
-#define PLL_H_
 #include "pll.h"
-#endif
 
-unsigned int get_attributes(int argc, char **argv);
-void skip_test();
-
-pll_partition_t * parse_msa(const char * filename,
-                            unsigned int taxa_count,
-                            unsigned int states,
-                            unsigned int rate_cats,
-                            unsigned int rate_matrices,
-                            pll_utree_t * tree,
-                            unsigned int attributes);
-
-int cb_full_traversal(pll_utree_t * node);
-int cb_rfull_traversal(pll_rtree_t * node);
-
-#endif /* COMMON_H_ */
+PLL_EXPORT void pll_init()
+{
+  pll_hardware_probe();
+}
+
+PLL_EXPORT void pll_fini()
+{
+  if (pll_hardware)
+    free(pll_hardware);
+  pll_hardware = NULL;
+}
diff --git a/src/lex_phylip.l b/src/lex_phylip.l
deleted file mode 100644
index e798568..0000000
--- a/src/lex_phylip.l
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-    Copyright (C) 2015 Tomas Flouri
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU Affero 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 Affero General Public License for more details.
-
-    You should have received a copy of the GNU Affero General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-    Contact: Tomas Flouri <Tomas.Flouri at h-its.org>,
-    Heidelberg Institute for Theoretical Studies,
-    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
-*/
-%{
-#include "pll.h"
-#include "parse_phylip.h"
-
-static size_t string_length = 0;
-
-static char * xstrndup(const char * s, size_t len)
-{
-  char * p = (char *)malloc(len+1);
-  if (!p)
-  {
-    pll_errno = PLL_ERROR_MEM_ALLOC;
-    snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
-    return PLL_FAILURE;
-  }
-  strncpy(p,s,len);
-  p[len] = 0;
-  return p;
-}
-
-static char * append(size_t * dstlen, const char * src, size_t srclen)
-{
-  char * mem = (char *)realloc(pll_phylip_lval.s, (*dstlen + srclen + 1));
-  if (!mem)
-  {
-    pll_errno = PLL_ERROR_MEM_ALLOC;
-    snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
-    return PLL_FAILURE;
-  }
-  pll_phylip_lval.s =  mem;
-  strncpy(&pll_phylip_lval.s[*dstlen], src, srclen);
-  pll_phylip_lval.s[*dstlen + srclen] = 0;
-  *dstlen += srclen;
-  return pll_phylip_lval.s;
-}
-
-%}
-%option noyywrap
-%option prefix="pll_phylip_"
-%option nounput
-%option noinput
-%s apos
-%s quot
-
-%%
-<quot>{
-\\\"                                         append(&string_length, "\"", 1);
-\'                                           append(&string_length, "\'", 1);
-\"                                           {BEGIN(INITIAL);return STRING;}
-}
-
-<apos>{
-\\\'                                         append(&string_length, "\'", 1);
-\"                                           append(&string_length, "\"", 1);
-\'                                           {BEGIN(INITIAL);return STRING;}
-}
-
-<apos,quot>{
-\\n                                          append(&string_length, "\n", 1);
-\\t                                          append(&string_length, "\t", 1);
-\\\\                                         append(&string_length, "\\", 1);
-([^\"\'\\]|\n)+                              append(&string_length, pll_phylip_text, pll_phylip_leng);
-}
-
-\"                                           {string_length =0; pll_phylip_lval.s = NULL; ;BEGIN(quot);}
-\'                                           {string_length =0; pll_phylip_lval.s = NULL; ;BEGIN(apos);}
-([a-zA-Z_0-9]|(\.|\-|\^|\?))+                {pll_phylip_lval.s = xstrndup(pll_phylip_text, pll_phylip_leng); return STRING;}
-[ \t\n\r]*\#[^\n]*                           ;
-[ \t\n\r]                                    ;
-.                                            {snprintf(pll_errmsg, 200, "Syntax error (%c)\n", pll_phylip_text[0]);
-                                              pll_errno = PLL_ERROR_PHYLIP_SYNTAX;
-                                              return PLL_FAILURE;}
-%%
diff --git a/src/lex_rtree.l b/src/lex_rtree.l
index 3182564..91157ac 100644
--- a/src/lex_rtree.l
+++ b/src/lex_rtree.l
@@ -79,38 +79,44 @@ static char * append(size_t * dstlen, const char * src, size_t srclen)
 
 %%
 <quot>{
-\\\"                                             {append(&string_length, "\\\"", 2);}
-\'                                               {append(&string_length, "\'", 1);}
-\"                                               {BEGIN(INITIAL);return STRING;}
+\\\"              { append(&string_length, "\\\"", 2);                         }
+\'                { append(&string_length, "\'", 1);                           }
+\"                { BEGIN(INITIAL); return STRING;                             }
 }
 
 <apos>{
-\\\'                                             {append(&string_length, "\\\'", 2);}
-\"                                               {append(&string_length, "\"", 1);}
-\'                                               {BEGIN(INITIAL);return STRING;}
+\\\'              { append(&string_length, "\\\'", 2);                         }
+\"                { append(&string_length, "\"", 1);                           }
+\'                { BEGIN(INITIAL); return STRING;                             }
 }
 
 <apos,quot>{
-\\n                                              {append(&string_length, "\\n", 2);}
-\\t                                              {append(&string_length, "\\t", 2);}
-\\                                               {append(&string_length, "\\", 1);}
-\\\\                                             {append(&string_length, "\\\\", 2);}
-([^\"\'\\]|\n)+                                  {append(&string_length, pll_rtree_text, pll_rtree_leng);}
+\\n               { append(&string_length, "\\n", 2);                          }
+\\t               { append(&string_length, "\\t", 2);                          }
+\\                { append(&string_length, "\\", 1);                           }
+\\\\              { append(&string_length, "\\\\", 2);                         }
+([^\"\'\\]|\n)+   { append(&string_length, pll_rtree_text, pll_rtree_leng);    }
 }
 
-\:                                               return COLON;
-\;                                               return SEMICOLON;
-\)                                               return CPAR;
-\(                                               return OPAR;
-\,                                               return COMMA;
-\"                                               {string_length = 0; BEGIN(quot);}
-\'                                               {string_length = 0; BEGIN(apos);}
-\n                                               {pll_rtree_colstart = pll_rtree_colend = 0;}
-[\+|\-]?[0-9]+                                   {pll_rtree_lval.d = xstrndup(pll_rtree_text, pll_rtree_leng); return NUMBER;}
-[\+|\-]?[0-9]+\.[0-9]+([e|E][\+|\-]?[0-9]+)?     {pll_rtree_lval.d = xstrndup(pll_rtree_text, pll_rtree_leng); return NUMBER;}
-[^ \'\",\(\):;\[\]\t\n\r][^ \t\n\r\)\(\[\]\,:;]* {pll_rtree_lval.s = xstrndup(pll_rtree_text, pll_rtree_leng); return STRING;}
-[ \t\r]                                        ;
-.                                                {snprintf(pll_errmsg, 200, "Syntax error (%c)\n", pll_rtree_text[0]);
-                                                  pll_errno = PLL_ERROR_NEWICK_SYNTAX;
-                                                  return PLL_FAILURE;}
+\:                { return COLON;                                              }
+\;                { return SEMICOLON;                                          }
+\)                { return CPAR;                                               }
+\(                { return OPAR;                                               }
+\,                { return COMMA;                                              }
+\"                { string_length = 0; BEGIN(quot);                            }
+\'                { string_length = 0; BEGIN(apos);                            }
+\n                { pll_rtree_colstart = pll_rtree_colend = 0;                 }
+[-+]?[0-9]+       { pll_rtree_lval.d = xstrndup(pll_rtree_text,pll_rtree_leng);
+                    return NUMBER;                                             }
+[+-]?(([0-9]+[\.]?[0-9]*)|([0-9]*[\.]?[0-9]+))([eE][+-]?[0-9]+)? {
+                    pll_rtree_lval.d = xstrndup(pll_rtree_text,pll_rtree_leng); 
+                    return NUMBER;                                             }
+[^ \'\",\(\):;\[\]\t\n\r][^ \t\n\r\)\(\[\]\,:;]* {
+                    pll_rtree_lval.s = xstrndup(pll_rtree_text,pll_rtree_leng);
+                    return STRING;                                             }
+[ \t\r]           { ;                                                          }
+.                 { snprintf(pll_errmsg, 200, 
+                             "Syntax error (%c)\n", pll_rtree_text[0]);
+                    pll_errno = PLL_ERROR_NEWICK_SYNTAX;
+                    return PLL_FAILURE;                                        }
 %%
diff --git a/src/lex_utree.l b/src/lex_utree.l
index 3cc91ae..c820aca 100644
--- a/src/lex_utree.l
+++ b/src/lex_utree.l
@@ -79,38 +79,44 @@ static char * append(size_t * dstlen, const char * src, size_t srclen)
 
 %%
 <quot>{
-\\\"                                             {append(&string_length, "\\\"", 2);}
-\'                                               {append(&string_length, "\'", 1);}
-\"                                               {BEGIN(INITIAL);return STRING;}
+\\\"              { append(&string_length, "\\\"", 2);                         }
+\'                { append(&string_length, "\'", 1);                           }
+\"                { BEGIN(INITIAL); return STRING;                             }
 }
 
 <apos>{
-\\\'                                             {append(&string_length, "\\\'", 2);}
-\"                                               {append(&string_length, "\"", 1);}
-\'                                               {BEGIN(INITIAL);return STRING;}
+\\\'              { append(&string_length, "\\\'", 2);                         }
+\"                { append(&string_length, "\"", 1);                           }
+\'                { BEGIN(INITIAL);return STRING;}
 }
 
 <apos,quot>{
-\\n                                              {append(&string_length, "\\n", 2);}
-\\t                                              {append(&string_length, "\\t", 2);}
-\\                                               {append(&string_length, "\\", 1);}
-\\\\                                             {append(&string_length, "\\\\", 2);}
-([^\"\'\\]|\n)+                                  {append(&string_length, pll_utree_text, pll_utree_leng);}
+\\n               { append(&string_length, "\\n", 2);                          }
+\\t               { append(&string_length, "\\t", 2);                          }
+\\                { append(&string_length, "\\", 1);                           }
+\\\\              { append(&string_length, "\\\\", 2);                         }
+([^\"\'\\]|\n)+   { append(&string_length, pll_utree_text, pll_utree_leng);    }
 }
 
-\:                                               return COLON;
-\;                                               return SEMICOLON;
-\)                                               return CPAR;
-\(                                               return OPAR;
-\,                                               return COMMA;
-\"                                               {string_length = 0; BEGIN(quot);}
-\'                                               {string_length = 0; BEGIN(apos);}
-\n                                               {pll_utree_colstart = pll_utree_colend = 0;}
-[\+|\-]?[0-9]+                                   {pll_utree_lval.d = xstrndup(pll_utree_text, pll_utree_leng); return NUMBER;}
-[\+|\-]?[0-9]+\.[0-9]+([e|E][\+|\-]?[0-9]+)?     {pll_utree_lval.d = xstrndup(pll_utree_text, pll_utree_leng); return NUMBER;}
-[^ \'\",\(\):;\[\]\t\n\r][^ \t\n\r\)\(\[\]\,:;]* {pll_utree_lval.s = xstrndup(pll_utree_text, pll_utree_leng); return STRING;}
-[ \t\r]                                        ;
-.                                                {snprintf(pll_errmsg, 200, "Syntax error (%c)\n", pll_utree_text[0]);
-                                                  pll_errno = PLL_ERROR_NEWICK_SYNTAX;
-                                                  return PLL_FAILURE;}
+\:                { return COLON;                                              }
+\;                { return SEMICOLON;                                          }
+\)                { return CPAR;                                               }
+\(                { return OPAR;                                               }
+\,                { return COMMA;                                              }
+\"                { string_length = 0; BEGIN(quot);                            }
+\'                { string_length = 0; BEGIN(apos);                            }                           
+\n                { pll_utree_colstart = pll_utree_colend = 0;                 }
+[-+]?[0-9]+       { pll_utree_lval.d = xstrndup(pll_utree_text,pll_utree_leng);
+                    return NUMBER;                                             }
+[+-]?(([0-9]+[\.]?[0-9]*)|([0-9]*[\.]?[0-9]+))([eE][+-]?[0-9]+)? {
+                    pll_utree_lval.d = xstrndup(pll_utree_text,pll_utree_leng);
+                    return NUMBER;                                             }
+[^ \'\",\(\):;\[\]\t\n\r][^ \t\n\r\)\(\[\]\,:;]* {
+                    pll_utree_lval.s = xstrndup(pll_utree_text,pll_utree_leng);
+                    return STRING;                                             }
+[ \t\r]           { ;                                                          }
+.                 { snprintf(pll_errmsg, 200,
+                             "Syntax error (%c)\n", pll_utree_text[0]);
+                    pll_errno = PLL_ERROR_NEWICK_SYNTAX;
+                    return PLL_FAILURE;                                        }
 %%
diff --git a/src/likelihood.c b/src/likelihood.c
index f6301f6..0f82bd3 100644
--- a/src/likelihood.c
+++ b/src/likelihood.c
@@ -68,6 +68,9 @@ static double root_loglikelihood_asc_bias(pll_partition_t * partition,
    unsigned int sum_w_inv = 0;
    int asc_bias_type = partition->attributes & PLL_ATTRIB_AB_MASK;
 
+   /* point clvp to state sites */
+   clv += partition->sites * partition->rate_cats * partition->states_padded;
+
    /* 1. compute per-site logl for each state */
    for (i = 0; i < states; ++i)
    {
@@ -146,7 +149,7 @@ PLL_EXPORT double pll_compute_root_loglikelihood(pll_partition_t * partition,
                                      partition->attributes);
 
 
-                              
+
 
   /* ascertainment bias correction */
   if (partition->attributes & PLL_ATTRIB_AB_MASK)
@@ -181,12 +184,19 @@ static double edge_loglikelihood_asc_bias_ti(pll_partition_t * partition,
   unsigned int states = partition->states;
   unsigned int states_padded = partition->states_padded;
   unsigned int scale_factors;
-  double * weights = partition->rate_weights;
+  unsigned int * pattern_weights = partition->pattern_weights;
+  double * rate_weights = partition->rate_weights;
 
   double logl_correction = 0;
   unsigned int sum_w_inv = 0;
   int asc_bias_type = partition->attributes & PLL_ATTRIB_AB_MASK;
 
+  /* point clvp to state sites */
+  clvp += partition->sites * partition->rate_cats * partition->states_padded;
+  pattern_weights += partition->sites;
+  if (parent_scaler)
+    parent_scaler += partition->sites;
+
   /* 1. compute per-site logl for each state */
   for (n = 0; n < partition->states; ++n)
   {
@@ -202,18 +212,18 @@ static double edge_loglikelihood_asc_bias_ti(pll_partition_t * partition,
         pmatrix += states_padded;
       }
 
-      terma += terma_r * weights[i];
+      terma += terma_r * rate_weights[i];
       clvp += states_padded;
     }
 
     /* count number of scaling factors to acount for */
-    scale_factors = (parent_scaler) ? parent_scaler[partition->sites + n] : 0;
+    scale_factors = (parent_scaler) ? parent_scaler[n] : 0;
 
-    sum_w_inv += partition->pattern_weights[partition->sites + n];
+    sum_w_inv += pattern_weights[n];
     if (asc_bias_type == PLL_ATTRIB_AB_STAMATAKIS)
     {
       /* 2a. site_lk is the lnl weighted by the number of occurences */
-      site_lk = log(terma) * partition->pattern_weights[partition->sites + n];
+      site_lk = log(terma) * pattern_weights[n];
       if (scale_factors)
         site_lk += scale_factors * log(PLL_SCALE_THRESHOLD);
     }
@@ -280,6 +290,7 @@ static double edge_loglikelihood_tipinner(pll_partition_t * partition,
                                           parent_scaler,
                                           partition->tipchars[child_clv_index],
                                           partition->tipmap,
+                                          partition->maxstates,
                                           partition->pmatrix[matrix_index],
                                           partition->frequencies,
                                           partition->rate_weights,
@@ -329,15 +340,17 @@ static double edge_loglikelihood_asc_bias_ii(pll_partition_t * partition,
   double * rate_weights = partition->rate_weights;
 
   /* point clv, clvc, scalers and pattern weights to state sites */
-  unsigned int offset = partition->sites * 
+  unsigned int offset = partition->sites *
                         partition->rate_cats *
                         partition->states_padded;
 
   pattern_weights += partition->sites;
   clvp += offset;
   clvc += offset;
-  parent_scaler += partition->sites;
-  child_scaler += partition->sites;
+  if (parent_scaler)
+    parent_scaler += partition->sites;
+  if (child_scaler)
+    child_scaler += partition->sites;
 
   double logl_correction = 0;
   unsigned int sum_w_inv = 0;
@@ -396,7 +409,7 @@ static double edge_loglikelihood_asc_bias_ii(pll_partition_t * partition,
                                       partition->pattern_weight_sum,
                                       sum_w_inv,
                                       asc_bias_type);
-  
+
   return logl;
 }
 
@@ -498,4 +511,3 @@ PLL_EXPORT double pll_compute_edge_loglikelihood(pll_partition_t * partition,
 
   return logl;
 }
-
diff --git a/src/maps.c b/src/maps.c
index 0f9b5e9..83398f6 100644
--- a/src/maps.c
+++ b/src/maps.c
@@ -101,16 +101,45 @@ const unsigned int pll_map_aa[256] =
 
 
 /*
-  map for fasta parsing
+  maps for fasta and phylip parsing
 
-  legal symbols: *abcdefghiklmnpqrstuvxyz (all except j and o), also upper case
-  fatal symbols: .-
-  fatal: ascii 0-26 except tab (9), newline (10 and 13), vt (11), formfeed (12)
-  stripped: !"#$&'()+,/0123456789:;<=>?@JO^_`joæøåÆØŧ¨´ as well as chrs 9-13
+  legal symbols: ?*- 0123456789 abcdefghijklmnopqrstuvxyz (also upper case)
+  fatal symbols: period (.), ascii 0-8, ascii 14-31
+  silently stripped: tab (9), newline (10 and 13), vt (11), formfeed (12)
+  stripped: !"#$&'()+,/:;<=>@^_`æøåÆØŧ¨´
 
   includes both amino acid and nucleotide sequences, adapt to nt only
+
+  TODO: Would be more suitable to create separate maps for parsing nt data,
+  aa data, binary, etc
 */
 
+const unsigned int pll_map_phylip[256] =
+  {
+    /*
+    0=stripped, 1=legal, 2=fatal, 3=silently stripped
+    @   A   B   C   D   E   F   G   H   I   J   K   L   M   N   O
+    P   Q   R   S   T   U   V   W   X   Y   Z   [   \   ]   ^   _
+    */
+
+/*  0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F        */
+    2,  2,  2,  2,  2,  2,  2,  2,  2,  3,  3,  3,  3,  3,  2,  2,  /* 0 */
+    2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  /* 1 */
+    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  2,  0,  /* 2 */
+    1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  1,  /* 3 */
+    0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  /* 4 */
+    1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  /* 5 */
+    0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  1,  1,  1,  1,  0,  /* 6 */
+    1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  /* 7 */
+    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 8 */
+    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 9 */
+    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* A */
+    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* B */
+    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* C */
+    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* D */
+    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* E */
+    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0   /* F */
+  };
 const unsigned int pll_map_fasta[256] =
   {
     /*
@@ -119,22 +148,23 @@ const unsigned int pll_map_fasta[256] =
     P   Q   R   S   T   U   V   W   X   Y   Z   [   \   ]   ^   _
     */
 
-    2,  2,  2,  2,  2,  2,  2,  2,  2,  3,  3,  3,  3,  3,  2,  2,
-    2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,
-    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  2,  0,
-    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-    0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  1,  1,  1,  1,  0,
-    1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,
-    0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  1,  1,  1,  1,  0,
-    1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,
-    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
+/*  0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F        */
+    2,  2,  2,  2,  2,  2,  2,  2,  2,  3,  3,  3,  3,  3,  2,  2,  /* 0 */
+    2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  2,  /* 1 */
+    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  2,  0,  /* 2 */
+    1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  1,  /* 3 */
+    0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  /* 4 */
+    1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  /* 5 */
+    0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  1,  1,  1,  1,  0,  /* 6 */
+    1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  /* 7 */
+    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 8 */
+    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 9 */
+    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* A */
+    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* B */
+    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* C */
+    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* D */
+    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* E */
+    0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0   /* F */
   };
 
 /* GTR protein substitution rate parameters (values above main diagonal) */
diff --git a/src/models.c b/src/models.c
index bf2f677..6081283 100644
--- a/src/models.c
+++ b/src/models.c
@@ -445,14 +445,13 @@ PLL_EXPORT int pll_update_invariant_sites_proportion(pll_partition_t * partition
 PLL_EXPORT unsigned int pll_count_invariant_sites(pll_partition_t * partition,
                                                   unsigned int * state_inv_count)
 {
-  int inv_site;
   unsigned int i,j,k;
   unsigned int invariant_count = 0;
   unsigned int tips = partition->tips;
   unsigned int sites = partition->sites;
   unsigned int states = partition->states;
   unsigned int gap_state = 0;
-  unsigned int state;
+  unsigned int cur_state;
   int * invariant = partition->invariant;
   double * tipclv;
 
@@ -473,15 +472,15 @@ PLL_EXPORT unsigned int pll_count_invariant_sites(pll_partition_t * partition,
     {
       if (invariant[i] > -1)
       {
-        state = invariant[i];
+        cur_state = invariant[i];
         /* since the invariant sites array is generated in the library,
            it should not contain invalid values */
-        assert (state < states);
+        assert (cur_state < states);
 
         /* increase the counter and per-state count */
-        invariant_count++;
+        invariant_count += partition->pattern_weights[i];
         if (state_inv_count)
-          state_inv_count[state]++;
+          state_inv_count[cur_state]++;
       }
     }
   }
@@ -489,52 +488,22 @@ PLL_EXPORT unsigned int pll_count_invariant_sites(pll_partition_t * partition,
   {
     if (partition->attributes & PLL_ATTRIB_PATTERN_TIP)
     {
-      if (states == 4)
+      for (j = 0; j < sites; ++j)
       {
-        for (j = 0; j < sites; ++j)
+        cur_state = gap_state;
+        for (i = 0; i < tips; ++i)
         {
-          state = (unsigned int)(partition->tipchars[0][j]);
-          if (state >= gap_state || __builtin_popcount(state) > 1)
-            continue;
-          inv_site = 1;
-          for (i = 1; i < tips; ++i)
+          cur_state &= ((unsigned int)(partition->tipchars[i][j]));
+          if  (!cur_state)
           {
-            if ((unsigned int)(partition->tipchars[i][j]) != state)
-            {
-              inv_site = 0;
-              break;
-            }
-          }
-          if (inv_site)
-          {
-            invariant_count++;
-            if (state_inv_count)
-              state_inv_count[__builtin_ctz(state)]++;
+            break;
           }
         }
-      }
-      else
-      {
-        for (j = 0; j < sites; ++j)
+        if (__builtin_popcount(cur_state) == 1)
         {
-          state = partition->tipmap[(int)(partition->tipchars[0][j])];
-          if (state >= gap_state || __builtin_popcount(state) > 1)
-            continue;
-          inv_site = 1;
-          for (i = 1; i < tips; ++i)
-          {
-            if (partition->tipmap[(int)(partition->tipchars[i][j])] != state)
-            {
-              inv_site = 0;
-              break;
-            }
-          }
-          if (inv_site)
-          {
-            invariant_count++;
-            if (state_inv_count)
-              state_inv_count[__builtin_ctz(state)]++;
-          }
+          invariant_count += partition->pattern_weights[j];
+          if (state_inv_count)
+            state_inv_count[__builtin_ctz(cur_state)]++;
         }
       }
     }
@@ -551,31 +520,24 @@ PLL_EXPORT unsigned int pll_count_invariant_sites(pll_partition_t * partition,
       {
         unsigned int clv_shift = j*span_padded;
         tipclv = partition->clv[0] + clv_shift;
-        state = 0;
-        for (k = 0; k < states; ++k)
-        {
-          state |= ((unsigned int)tipclv[k] << k);
-        }
-        if (__builtin_popcount(state) > 1)
-          continue;
-        inv_site = 1;
+        unsigned int state = gap_state;
         for (i = 0; i < tips; ++i)
         {
-          unsigned int cur_state = 0;
           tipclv = partition->clv[i] + clv_shift;
+          cur_state = 0;
           for (k = 0; k < states; ++k)
           {
             cur_state |= ((unsigned int)tipclv[k] << k);
           }
-          if (cur_state != state)
+          state &= cur_state;
+          if (!state)
           {
-            inv_site = 0;
             break;
           }
         }
-        if (inv_site)
+        if (__builtin_popcount(state) == 1)
         {
-          invariant_count++;
+          invariant_count += partition->pattern_weights[j];
           if (state_inv_count)
             state_inv_count[__builtin_ctz(state)]++;
         }
@@ -620,10 +582,10 @@ PLL_EXPORT int pll_update_invariant_sites(pll_partition_t * partition)
   invariant = partition->invariant;
 
   /* initialize all elements to zero */
-  memset(partition->invariant, 0, sites*sizeof(int));
+  memset(partition->invariant, gap_state, sites*sizeof(int));
 
   /* depending on the attribute flag, fill each element of the invariant array
-     with the bitwise OR of all states in the corresponding site */
+     with the bitwise AND of gap and all states in the corresponding site */
   if (partition->attributes & PLL_ATTRIB_PATTERN_TIP)
   {
     if (states == 4)
@@ -632,8 +594,7 @@ PLL_EXPORT int pll_update_invariant_sites(pll_partition_t * partition)
         for (j = 0; j < sites; ++j)
         {
           state = (unsigned int)(partition->tipchars[i][j]);
-          if (state < gap_state)
-            invariant[j] |= state;
+            invariant[j] &= state;
         }
     }
     else
@@ -642,15 +603,13 @@ PLL_EXPORT int pll_update_invariant_sites(pll_partition_t * partition)
         for (j = 0; j < sites; ++j)
         {
           state = partition->tipmap[(int)(partition->tipchars[i][j])];
-          if (state < gap_state)
-            invariant[j] |= state;
+            invariant[j] &= state;
         }
     }
   }
   else
   {
     unsigned int span_padded = rate_cats * states_padded;
-
     for (i = 0; i < tips; ++i)
     {
       tipclv = partition->clv[i];
@@ -661,8 +620,7 @@ PLL_EXPORT int pll_update_invariant_sites(pll_partition_t * partition)
         {
           state |= ((unsigned int)tipclv[k] << k);
         }
-        if (state < gap_state)
-          invariant[j] |= state;
+          invariant[j] &= state;
         tipclv += span_padded;
       }
     }
diff --git a/src/output.c b/src/output.c
index 37ad872..f07368b 100644
--- a/src/output.c
+++ b/src/output.c
@@ -23,7 +23,7 @@
 
 static void unscale(double * prob, unsigned int times);
 
-PLL_EXPORT void pll_show_pmatrix(pll_partition_t * partition,
+PLL_EXPORT void pll_show_pmatrix(const pll_partition_t * partition,
                                  unsigned int index,
                                  unsigned int float_precision)
 {
@@ -53,7 +53,7 @@ static void unscale(double * prob, unsigned int times)
     *prob *= PLL_SCALE_THRESHOLD;
 }
 
-PLL_EXPORT void pll_show_clv(pll_partition_t * partition,
+PLL_EXPORT void pll_show_clv(const pll_partition_t * partition,
                              unsigned int clv_index,
                              int scaler_index,
                              unsigned int float_precision)
diff --git a/src/parse_phylip.y b/src/parse_phylip.y
deleted file mode 100644
index 72c5a20..0000000
--- a/src/parse_phylip.y
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
-    Copyright (C) 2015 Tomas Flouri
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU Affero 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 Affero General Public License for more details.
-
-    You should have received a copy of the GNU Affero General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-    Contact: Tomas Flouri <Tomas.Flouri at h-its.org>,
-    Heidelberg Institute for Theoretical Studies,
-    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
-*/
-%{
-#include "pll.h"
-
-extern int pll_phylip_lex();
-extern FILE * pll_phylip_in;
-extern void pll_phylip_lex_destroy();
-extern int pll_phylip_lineno;
-
-static int seq_count = 0;
-static int g_error = 0;
-
-struct sequence_s
-{
-  int len;
-  char * label;
-  char * sequence;
-};
-
-void pll_phylip_error(pll_msa_t ** msa, const char * s)
-{
-  fprintf(stderr, "%s.\n", s);
-}
-
-PLL_EXPORT void pll_msa_destroy(pll_msa_t * msa)
-{
-  if (!msa) return;
-
-  int i;
-
-  for (i = 0; i < seq_count; ++i)
-  {
-    free(msa->sequence[i]);
-    free(msa->label[i]);
-  }
-  free(msa->sequence);
-  free(msa->label);
-
-  free(msa);
-}
-%}
-
-%union
-{
-  char * s;
-  pll_msa_t * msa;
-  struct sequence_s ** sequence;
-}
-
-%error-verbose
-%parse-param {pll_msa_t ** msa}
-%destructor { pll_msa_destroy($$); } msa
-
-%token<s> STRING
-%type<msa> msa
-%type<sequence> sequence_list
-%start input
-%%
-
-input: msa
-{
-  *msa = $1;
-}
-
-msa: STRING STRING sequence_list
-{
-  int i;
-
-  if (!g_error)
-    for (i = 0 ; $1[i]; ++i)
-      if (!isdigit($1[i]))
-      {
-        pll_errno = PLL_ERROR_PHYLIP_SYNTAX;
-        snprintf(pll_errmsg, 200, "Number of taxa must be an integer");
-        g_error = 1;
-        break;
-      }
-
-  if (!g_error)
-    for (i = 0 ; $2[i]; ++i)
-      if (!isdigit($2[i]))
-      {
-        pll_errno = PLL_ERROR_PHYLIP_SYNTAX;
-        snprintf(pll_errmsg, 200, "Sequence length must be an integer");
-        g_error = 1;
-        break;
-      }
-
-  if (!g_error)
-    if (atoi($1) != seq_count)
-    {
-      pll_errno = PLL_ERROR_PHYLIP_SYNTAX;
-      snprintf(pll_errmsg, 200,
-              "Number of sequences read is %d but expected %d\n",
-              seq_count,
-              atoi($1));
-      g_error = 1;
-    }
-
-  if (!g_error)
-    if (atoi($2) != $3[seq_count-1]->len)
-    {
-      pll_errno = PLL_ERROR_PHYLIP_SYNTAX;
-      snprintf(pll_errmsg, 200,
-              "Sequence length is %d but expected %d\n",
-              $3[seq_count-1]->len,
-              atoi($2));
-      g_error = 1;
-    }
-
-  $$ = NULL;
-
-  if (!g_error)
-  {
-    $$ = (pll_msa_t *)calloc(1,sizeof(pll_msa_t));
-
-    $$->count = atoi($1);
-    $$->length = atoi($2);
-    $$->sequence = (char **)malloc(seq_count*sizeof(char *));
-    $$->label = (char **)malloc(seq_count*sizeof(char *));
-
-    for (i = 0; i < seq_count; ++i)
-    {
-      $$->sequence[i] = $3[seq_count-i-1]->sequence;
-      $$->label[i]    = $3[seq_count-i-1]->label;
-      free($3[seq_count-i-1]);
-    }
-  }
-  else
-  {
-    for (i = 0; i < seq_count; ++i)
-    {
-      free($3[seq_count-i-1]->sequence);
-      free($3[seq_count-i-1]->label);
-      free($3[seq_count-i-1]);
-    }
-    seq_count = 0;
-  }
-
-  free($1);
-  free($2);
-  free($3);
-}
-
-sequence_list: STRING STRING sequence_list
-{
-  $$ = (struct sequence_s **)realloc((void *)$3,
-                                     (seq_count+1)*sizeof(struct sequence_s *));
-  $$[seq_count] = (struct sequence_s *)malloc(sizeof(struct sequence_s));
-  $$[seq_count]->label = $1;
-  $$[seq_count]->sequence = $2;
-  $$[seq_count]->len = strlen($2);
-
-  if ($$[seq_count]->len != $$[seq_count-1]->len)
-  {
-    pll_errno = PLL_ERROR_PHYLIP_SYNTAX;
-    snprintf(pll_errmsg, 200, "Lengths of sequences %s and %s differ",
-             $$[seq_count]->label, $$[seq_count-1]->label);
-    g_error = 1;
-
-  }
-  seq_count++;
-
-}
-        | STRING STRING
-{
-  $$ = (struct sequence_s **)calloc(1,sizeof(struct sequence_s *));
-  $$[seq_count] = (struct sequence_s *)malloc(sizeof(struct sequence_s));
-  $$[seq_count]->label = $1;
-  $$[seq_count]->sequence = $2;
-  $$[seq_count]->len = strlen($2);
-  seq_count++;
-}
-
-%%
-
-PLL_EXPORT pll_msa_t * pll_phylip_parse_msa(const char * filename,
-                                            unsigned int * msa_count)
-{
-  pll_msa_t * msa = NULL;
-
-  pll_phylip_lineno = 1;
-  seq_count= 0;
-  g_error = 0;
-
-  pll_phylip_in = fopen(filename, "r");
-  if (!pll_phylip_in)
-  {
-    pll_msa_destroy(msa);
-    pll_errno = PLL_ERROR_FILE_OPEN;
-    snprintf(pll_errmsg, 200, "Unable to open file (%s)", filename);
-    return PLL_FAILURE;
-  }
-  else if (pll_phylip_parse(&msa))
-  {
-    pll_msa_destroy(msa);
-    msa = NULL;
-    fclose(pll_phylip_in);
-    pll_phylip_lex_destroy();
-    return PLL_FAILURE;
-  }
-
-  if (pll_phylip_in) fclose(pll_phylip_in);
-
-  pll_phylip_lex_destroy();
-
-  *msa_count = seq_count;
-
-  return msa;
-}
diff --git a/src/parse_rtree.y b/src/parse_rtree.y
index c44f33a..300a9b8 100644
--- a/src/parse_rtree.y
+++ b/src/parse_rtree.y
@@ -28,21 +28,58 @@ extern int pll_rtree_lineno;
 extern int pll_rtree_colstart;
 extern int pll_rtree_colend;
 
+extern int pll_rtree_parse();
+extern struct pll_rtree_buffer_state * pll_rtree__scan_string(const char * str);
+extern void pll_rtree__delete_buffer(struct pll_rtree_buffer_state * buffer);
+
 static unsigned int tip_cnt = 0;
 
-PLL_EXPORT void pll_rtree_destroy(pll_rtree_t * root)
+static void dealloc_data(pll_rnode_t * node, void (*cb_destroy)(void *))
+{
+  if (node->data)
+  {
+    if (cb_destroy)
+      cb_destroy(node->data);
+  }
+}
+
+PLL_EXPORT void pll_rtree_graph_destroy(pll_rnode_t * root,
+                                        void (*cb_destroy)(void *))
 {
   if (!root) return;
 
-  pll_rtree_destroy(root->left);
-  pll_rtree_destroy(root->right);
+  pll_rtree_graph_destroy(root->left, cb_destroy);
+  pll_rtree_graph_destroy(root->right, cb_destroy);
 
+  dealloc_data(root, cb_destroy);
   free(root->label);
   free(root);
 }
 
+PLL_EXPORT void pll_rtree_destroy(pll_rtree_t * tree,
+                                  void (*cb_destroy)(void *))
+{
+  unsigned int i;
+  pll_rnode_t * node;
+
+  /* deallocate all nodes */
+  for (i = 0; i < tree->tip_count + tree->inner_count; ++i)
+  {
+    node = tree->nodes[i];
+    dealloc_data(node, cb_destroy);
+
+    if (node->label)
+      free(node->label);
+
+    free(node);
+  }
+
+  /* deallocate tree structure */
+  free(tree->nodes);
+  free(tree);
+}
 
-static void pll_rtree_error(pll_rtree_t * tree, const char * s)
+static void pll_rtree_error(pll_rnode_t * node, const char * s)
 {
   pll_errno = PLL_ERROR_NEWICK_SYNTAX;
   if (pll_rtree_colstart == pll_rtree_colend)
@@ -59,12 +96,15 @@ static void pll_rtree_error(pll_rtree_t * tree, const char * s)
 {
   char * s;
   char * d;
-  struct pll_rtree * tree;
+  struct pll_rnode_s * tree;
 }
 
 %error-verbose
-%parse-param {struct pll_rtree * tree}
-%destructor { pll_rtree_destroy($$); } subtree
+%parse-param {struct pll_rnode_s * tree}
+%destructor { pll_rtree_graph_destroy($$,NULL); } subtree
+%destructor { free($$); } STRING
+%destructor { free($$); } NUMBER
+%destructor { free($$); } label
 
 %token OPAR
 %token CPAR
@@ -94,7 +134,7 @@ input: OPAR subtree COMMA subtree CPAR optional_label optional_length SEMICOLON
 
 subtree: OPAR subtree COMMA subtree CPAR optional_label optional_length
 {
-  $$ = (pll_rtree_t *)calloc(1, sizeof(pll_rtree_t));
+  $$ = (pll_rnode_t *)calloc(1, sizeof(pll_rnode_t));
   $$->left   = $2;
   $$->right  = $4;
   $$->label  = $6;
@@ -107,7 +147,7 @@ subtree: OPAR subtree COMMA subtree CPAR optional_label optional_length
 }
        | label optional_length
 {
-  $$ = (pll_rtree_t *)calloc(1, sizeof(pll_rtree_t));
+  $$ = (pll_rnode_t *)calloc(1, sizeof(pll_rnode_t));
   $$->label  = $1;
   $$->length = $2 ? atof($2) : 0;
   $$->left   = NULL;
@@ -124,7 +164,7 @@ number: NUMBER   {$$=$1;};
 
 %%
 
-static void recursive_assign_indices(pll_rtree_t * node,
+static void recursive_assign_indices(pll_rnode_t * node,
                                      unsigned int * tip_clv_index,
                                      unsigned int * inner_clv_index,
                                      int * inner_scaler_index,
@@ -162,7 +202,8 @@ static void recursive_assign_indices(pll_rtree_t * node,
   *inner_node_index = *inner_node_index + 1;
 }
 
-static void assign_indices(pll_rtree_t * root, unsigned int tip_count)
+PLL_EXPORT void pll_rtree_reset_template_indices(pll_rnode_t * root,
+                                                 unsigned int tip_count)
 {
   unsigned int tip_clv_index = 0;
   unsigned int inner_clv_index = tip_count;
@@ -189,28 +230,122 @@ static void assign_indices(pll_rtree_t * root, unsigned int tip_count)
   root->pmatrix_index = 0;
 }
 
-PLL_EXPORT pll_rtree_t * pll_rtree_parse_newick(const char * filename,
-                                                unsigned int * tip_count)
+static void fill_nodes_recursive(pll_rnode_t * node,
+                                 pll_rnode_t ** array,
+                                 unsigned int * tip_index,
+                                 unsigned int * inner_index)
+{
+  if (!node->left)
+  {
+    array[*tip_index] = node;
+    *tip_index = *tip_index + 1;
+    return;
+  }
+
+  fill_nodes_recursive(node->left,  array, tip_index, inner_index);
+  fill_nodes_recursive(node->right, array, tip_index, inner_index);
+
+  array[*inner_index] = node;
+  *inner_index = *inner_index + 1;
+}
+
+static unsigned int rtree_count_tips(pll_rnode_t * root)
+{
+  unsigned int count = 0;
+
+  if (root->left)
+    count += rtree_count_tips(root->left);
+  if (root->right)
+    count += rtree_count_tips(root->right);
+
+  if (!root->left && !root->right)
+    return 1;
+
+  return count;
+}
+
+PLL_EXPORT pll_rtree_t * pll_rtree_wraptree(pll_rnode_t * root,
+                                            unsigned int tip_count)
+{
+  pll_rtree_t * tree = (pll_rtree_t *)malloc(sizeof(pll_rtree_t));
+  if (!tree)
+  {
+    snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    return PLL_FAILURE;
+  }
+
+  if (tip_count < 2 && tip_count != 0)
+  {
+    snprintf(pll_errmsg, 200, "Invalid tip_count value (%u).", tip_count);
+    pll_errno = PLL_ERROR_PARAM_INVALID;
+    return PLL_FAILURE;
+  }
+
+  if (tip_count == 0)
+  {
+    tip_count = rtree_count_tips(root);
+    if (tip_count < 2)
+    {
+      snprintf(pll_errmsg, 200, "Input tree contains no inner nodes.");
+      pll_errno = PLL_ERROR_PARAM_INVALID;
+      return PLL_FAILURE;
+    }
+  }
+
+  tree->nodes = (pll_rnode_t **)malloc((2*tip_count-1)*sizeof(pll_rnode_t *));
+  if (!tree->nodes)
+  {
+    snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    return PLL_FAILURE;
+  }
+  
+  unsigned int tip_index = 0;
+  unsigned int inner_index = tip_count;
+
+  fill_nodes_recursive(root->left, tree->nodes, &tip_index, &inner_index);
+  fill_nodes_recursive(root->right,tree->nodes, &tip_index, &inner_index);
+  tree->nodes[inner_index] = root;
+
+  tree->tip_count = tip_count;
+  tree->edge_count = 2*tip_count-2;
+  tree->inner_count = tip_count-1;
+  tree->root = root;
+
+  return tree;
+}
+
+PLL_EXPORT pll_rtree_t * pll_rtree_parse_newick(const char * filename)
 {
-  struct pll_rtree * tree;
+  pll_rtree_t * tree;
+
+  struct pll_rnode_s * root;
 
   /* reset tip count */
   tip_cnt = 0;
 
-  tree = (pll_rtree_t *)calloc(1, sizeof(pll_rtree_t));
-
+  /* open input file */
   pll_rtree_in = fopen(filename, "r");
   if (!pll_rtree_in)
   {
-    pll_rtree_destroy(tree);
     pll_errno = PLL_ERROR_FILE_OPEN;
     snprintf(pll_errmsg, 200, "Unable to open file (%s)", filename);
     return PLL_FAILURE;
   }
-  else if (pll_rtree_parse(tree))
+
+  /* create root node */
+  if (!(root = (pll_rnode_t *)calloc(1, sizeof(pll_rnode_t))))
+  {
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+    return PLL_FAILURE;
+  }
+
+  if (pll_rtree_parse(root))
   {
-    pll_rtree_destroy(tree);
-    tree = NULL;
+    pll_rtree_graph_destroy(root,NULL);
+    root = NULL;
     fclose(pll_rtree_in);
     pll_rtree_lex_destroy();
     return PLL_FAILURE;
@@ -220,51 +355,46 @@ PLL_EXPORT pll_rtree_t * pll_rtree_parse_newick(const char * filename,
 
   pll_rtree_lex_destroy();
 
-  *tip_count = tip_cnt;
-
   /* initialize clv and scaler indices */
-  assign_indices(tree, tip_cnt);
+  pll_rtree_reset_template_indices(root, tip_cnt);
+
+  /* wrap tree */
+  tree = pll_rtree_wraptree(root,tip_cnt);
 
   return tree;
 }
 
-#ifdef __linux__
-PLL_EXPORT pll_rtree_t * pll_rtree_parse_newick_string(char * s,
-                                                       unsigned int * tip_count)
+PLL_EXPORT pll_rtree_t * pll_rtree_parse_newick_string(const char * s)
 {
-  struct pll_rtree * tree;
+  int rc;
+  struct pll_rnode_s * root;
+  pll_rtree_t * tree = NULL;
 
   /* reset tip count */
   tip_cnt = 0;
 
-  tree = (pll_rtree_t *)calloc(1, sizeof(pll_rtree_t));
-
-  pll_rtree_in = fmemopen(s, strlen(s), "r");
-  if (!pll_rtree_in)
-  {
-    pll_rtree_destroy(tree);
-    pll_errno = PLL_ERROR_FILE_OPEN;
-    snprintf(pll_errmsg, 200, "Unable to map string (%s)", s);
-    return PLL_FAILURE;
-  }
-  else if (pll_rtree_parse(tree))
+  if (!(root = (pll_rnode_t *)calloc(1, sizeof(pll_rnode_t))))
   {
-    pll_rtree_destroy(tree);
-    tree = NULL;
-    fclose(pll_rtree_in);
-    pll_rtree_lex_destroy();
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
     return PLL_FAILURE;
   }
 
-  if (pll_rtree_in) fclose(pll_rtree_in);
+  struct pll_rtree_buffer_state * buffer = pll_rtree__scan_string(s);
+  rc = pll_rtree_parse(root);
+  pll_rtree__delete_buffer(buffer);
 
   pll_rtree_lex_destroy();
 
-  *tip_count = tip_cnt;
+  if (!rc)
+  {
+    /* initialize clv and scaler indices */
+    pll_rtree_reset_template_indices(root, tip_cnt);
 
-  /* initialize clv and scaler indices */
-  assign_indices(tree, tip_cnt);
+    tree = pll_rtree_wraptree(root,tip_cnt);
+  }
+  else
+    free(root);
 
   return tree;
 }
-#endif
diff --git a/src/parse_utree.y b/src/parse_utree.y
index f177c5d..c615423 100644
--- a/src/parse_utree.y
+++ b/src/parse_utree.y
@@ -28,19 +28,39 @@ extern int pll_utree_lineno;
 extern int pll_utree_colstart;
 extern int pll_utree_colend;
 
+extern int pll_utree_parse();
+extern struct pll_utree_buffer_state * pll_utree__scan_string(const char * str);
+extern void pll_utree__delete_buffer(struct pll_utree_buffer_state * buffer);
+
 static unsigned int tip_cnt = 0;
 
-static void dealloc_tree_recursive(pll_utree_t * node)
+static void dealloc_data(pll_unode_t * node, void (*cb_destroy)(void *))
+{
+  if (node->data)
+  {
+    if (cb_destroy)
+      cb_destroy(node->data);
+  }
+}
+
+static void dealloc_graph_recursive(pll_unode_t * node,
+                                   void (*cb_destroy)(void *))
 {
   if (!node->next)
   {
+    dealloc_data(node,cb_destroy);
     free(node->label);
     free(node);
     return;
   }
 
-  dealloc_tree_recursive(node->next->back);
-  dealloc_tree_recursive(node->next->next->back);
+  dealloc_graph_recursive(node->next->back, cb_destroy);
+  dealloc_graph_recursive(node->next->next->back, cb_destroy);
+
+  /* deallocate any extra data */
+  dealloc_data(node,cb_destroy);
+  dealloc_data(node->next,cb_destroy);
+  dealloc_data(node->next->next,cb_destroy);
 
   free(node->next->next);
   free(node->next);
@@ -48,30 +68,75 @@ static void dealloc_tree_recursive(pll_utree_t * node)
   free(node);
 }
 
-PLL_EXPORT void pll_utree_destroy(pll_utree_t * root)
+PLL_EXPORT void pll_utree_graph_destroy(pll_unode_t * root,
+                                        void (*cb_destroy)(void *))
 {
   if (!root) return;
   if (!(root->next))
   {
+    dealloc_data(root,cb_destroy);
     free(root->label);
     free(root);
     return;
   }
 
   if (root->next)
-    dealloc_tree_recursive(root->next->back);
+    dealloc_graph_recursive(root->next->back,cb_destroy);
   if (root->next->next)
-    dealloc_tree_recursive(root->next->next->back);
+    dealloc_graph_recursive(root->next->next->back,cb_destroy);
   if (root->back)
-    dealloc_tree_recursive(root->back);
+    dealloc_graph_recursive(root->back,cb_destroy);
+
+  /* deallocate any extra data */
+  dealloc_data(root,cb_destroy);
+  dealloc_data(root->next,cb_destroy);
+  dealloc_data(root->next->next,cb_destroy);
 
   free(root->label);
+
   free(root->next->next);
   free(root->next);
   free(root);
 }
 
-static void pll_utree_error(pll_utree_t * tree, const char * s)
+PLL_EXPORT void pll_utree_destroy(pll_utree_t * tree,
+                                  void (*cb_destroy)(void *))
+{
+  unsigned int i;
+  pll_unode_t * node;
+
+  /* deallocate tip nodes */
+  for (i = 0; i < tree->tip_count; ++i)
+  {
+    dealloc_data(tree->nodes[i], cb_destroy);
+    if (tree->nodes[i]->label)
+      free(tree->nodes[i]->label);
+    free(tree->nodes[i]);
+  }
+
+  /* deallocate inner nodes */
+  for (i = tree->tip_count; i < tree->tip_count + tree->inner_count; ++i)
+  {
+    node = tree->nodes[i];
+
+    dealloc_data(node, cb_destroy);
+    dealloc_data(node->next, cb_destroy);
+    dealloc_data(node->next->next, cb_destroy);
+
+    if (node->label)
+      free(node->label);
+
+    free(node->next->next);
+    free(node->next);
+    free(node);
+  }
+
+  /* deallocate tree structure */
+  free(tree->nodes);
+  free(tree);
+}
+
+static void pll_utree_error(pll_unode_t * node, const char * s)
 {
   pll_errno = PLL_ERROR_NEWICK_SYNTAX;
   if (pll_utree_colstart == pll_utree_colend)
@@ -88,12 +153,16 @@ static void pll_utree_error(pll_utree_t * tree, const char * s)
 {
   char * s;
   char * d;
-  struct pll_utree * tree;
+  struct pll_unode_s * tree;
 }
 
 %error-verbose
-%parse-param {struct pll_utree * tree}
-%destructor { pll_utree_destroy($$); } subtree
+%parse-param {struct pll_unode_s * tree}
+%destructor { pll_utree_graph_destroy($$,NULL); } subtree
+%destructor { free($$); } STRING
+%destructor { free($$); } NUMBER
+%destructor { free($$); } label
+
 
 %token OPAR
 %token CPAR
@@ -109,12 +178,11 @@ static void pll_utree_error(pll_utree_t * tree, const char * s)
 
 input: OPAR subtree COMMA subtree COMMA subtree CPAR optional_label optional_length SEMICOLON
 {
-  tree->next               = (pll_utree_t *)calloc(1, sizeof(pll_utree_t));
+  tree->next               = (pll_unode_t *)calloc(1, sizeof(pll_unode_t));
 
-  tree->next->next         = (pll_utree_t *)calloc(1, sizeof(pll_utree_t));
+  tree->next->next         = (pll_unode_t *)calloc(1, sizeof(pll_unode_t));
   tree->next->next->next   = tree;
 
-
   tree->back               = $2;
   tree->next->back         = $4;
   tree->next->next->back   = $6;
@@ -136,11 +204,11 @@ input: OPAR subtree COMMA subtree COMMA subtree CPAR optional_label optional_len
 
 subtree: OPAR subtree COMMA subtree CPAR optional_label optional_length
 {
-  $$                     = (pll_utree_t *)calloc(1, sizeof(pll_utree_t));
+  $$                     = (pll_unode_t *)calloc(1, sizeof(pll_unode_t));
 
-  $$->next               = (pll_utree_t *)calloc(1, sizeof(pll_utree_t));
+  $$->next               = (pll_unode_t *)calloc(1, sizeof(pll_unode_t));
 
-  $$->next->next         = (pll_utree_t *)calloc(1, sizeof(pll_utree_t));
+  $$->next->next         = (pll_unode_t *)calloc(1, sizeof(pll_unode_t));
   $$->next->next->next   = $$;
 
 
@@ -162,7 +230,7 @@ subtree: OPAR subtree COMMA subtree CPAR optional_label optional_length
 }
        | label optional_length
 {
-  $$ = (pll_utree_t *)calloc(1, sizeof(pll_utree_t));
+  $$ = (pll_unode_t *)calloc(1, sizeof(pll_unode_t));
 
   $$->label  = $1;
   $$->length = $2 ? atof($2) : 0;
@@ -179,7 +247,7 @@ number: NUMBER   { $$=$1;};
 
 %%
 
-static void recursive_assign_indices(pll_utree_t * node,
+static void recursive_assign_indices(pll_unode_t * node,
                                     unsigned int * tip_clv_index,
                                     unsigned int * inner_clv_index,
                                     int * inner_scaler_index,
@@ -228,7 +296,7 @@ static void recursive_assign_indices(pll_utree_t * node,
   *inner_node_index = *inner_node_index + 3;
 }
 
-PLL_EXPORT void pll_utree_reset_template_indices(pll_utree_t * node,
+PLL_EXPORT void pll_utree_reset_template_indices(pll_unode_t * node,
                                                  unsigned int tip_count)
 {
   unsigned int tip_clv_index = 0;
@@ -271,28 +339,139 @@ PLL_EXPORT void pll_utree_reset_template_indices(pll_utree_t * node,
   node->next->next->pmatrix_index = node->next->next->back->pmatrix_index;
 }
 
-PLL_EXPORT pll_utree_t * pll_utree_parse_newick(const char * filename,
-                                                unsigned int * tip_count)
+static void fill_nodes_recursive(pll_unode_t * node,
+                                 pll_unode_t ** array,
+                                 unsigned int * tip_index,
+                                 unsigned int * inner_index)
+{
+  if (!node->next)
+  {
+    array[*tip_index] = node;
+    *tip_index = *tip_index + 1;
+    return;
+  }
+
+  fill_nodes_recursive(node->next->back,       array, tip_index, inner_index);
+  fill_nodes_recursive(node->next->next->back, array, tip_index, inner_index);
+
+  array[*inner_index] = node;
+  *inner_index = *inner_index + 1;
+}
+
+static unsigned int utree_count_tips_recursive(pll_unode_t * node)
 {
-  struct pll_utree * tree;
+  unsigned int count = 0;
+
+  if (!node->next)
+    return 1;
+
+  count += utree_count_tips_recursive(node->next->back);
+  count += utree_count_tips_recursive(node->next->next->back);
+
+  return count;
+}
+
+static unsigned int utree_count_tips(pll_unode_t * root)
+{
+  unsigned int count = 0;
+
+  if (!root->next && !root->back->next)
+    return 0;
+
+  if (!root->next)
+    root = root->back;
+
+  count += utree_count_tips_recursive(root->back);
+  count += utree_count_tips_recursive(root->next->back);
+  count += utree_count_tips_recursive(root->next->next->back);
+
+  return count;
+}
+
+/* wraps/encalupsates the unrooted tree graph into a tree structure
+   that contains a list of nodes, number of tips and number of inner
+   nodes. If 0 is passed as tip_count, then an additional recrursion
+   of the tree structure is done to detect the number of tips */
+PLL_EXPORT pll_utree_t * pll_utree_wraptree(pll_unode_t * root,
+                                            unsigned int tip_count)
+{
+  pll_utree_t * tree = (pll_utree_t *)malloc(sizeof(pll_utree_t));
+  if (!tree)
+  {
+    snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    return PLL_FAILURE;
+  }
+
+  if (tip_count < 3 && tip_count != 0)
+  {
+    snprintf(pll_errmsg, 200, "Invalid tip_count value (%u).", tip_count);
+    pll_errno = PLL_ERROR_PARAM_INVALID;
+    return PLL_FAILURE;
+  }
+
+  if (tip_count == 0)
+  {
+    tip_count = utree_count_tips(root);
+    if (!tip_count)
+    {
+      snprintf(pll_errmsg, 200, "Input tree contains no inner nodes.");
+      pll_errno = PLL_ERROR_PARAM_INVALID;
+      return PLL_FAILURE;
+    }
+  }
+
+  tree->nodes = (pll_unode_t **)malloc((2*tip_count-2)*sizeof(pll_unode_t *));
+  if (!tree->nodes)
+  {
+    snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    return PLL_FAILURE;
+  }
+  
+  unsigned int tip_index = 0;
+  unsigned int inner_index = tip_count;
+
+  fill_nodes_recursive(root->back,             tree->nodes, &tip_index, &inner_index);
+  fill_nodes_recursive(root->next->back,       tree->nodes, &tip_index, &inner_index);
+  fill_nodes_recursive(root->next->next->back, tree->nodes, &tip_index, &inner_index);
+
+  tree->nodes[inner_index] = root;
+  tree->tip_count = tip_count;
+  tree->edge_count = 2*tip_count-3;
+  tree->inner_count = tip_count-2;
+
+  return tree;
+}
+
+PLL_EXPORT pll_utree_t * pll_utree_parse_newick(const char * filename)
+{
+  pll_utree_t * tree;
+
+  struct pll_unode_s * root;
 
   /* reset tip count */
   tip_cnt = 0;
 
-  tree = (pll_utree_t *)calloc(1, sizeof(pll_utree_t));
-
   pll_utree_in = fopen(filename, "r");
   if (!pll_utree_in)
   {
-    pll_utree_destroy(tree);
     pll_errno = PLL_ERROR_FILE_OPEN;
     snprintf(pll_errmsg, 200, "Unable to open file (%s)", filename);
     return PLL_FAILURE;
   }
-  else if (pll_utree_parse(tree))
+
+  if (!(root = (pll_unode_t *)calloc(1, sizeof(pll_unode_t))))
   {
-    pll_utree_destroy(tree);
-    tree = NULL;
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+    return PLL_FAILURE;
+  }
+
+  if (pll_utree_parse(root))
+  {
+    pll_utree_graph_destroy(root,NULL);
+    root = NULL;
     fclose(pll_utree_in);
     pll_utree_lex_destroy();
     return PLL_FAILURE;
@@ -302,51 +481,46 @@ PLL_EXPORT pll_utree_t * pll_utree_parse_newick(const char * filename,
 
   pll_utree_lex_destroy();
 
-  *tip_count = tip_cnt;
+  /* initialize clv and scaler indices to the default template */
+  pll_utree_reset_template_indices(root, tip_cnt);
 
-  /* initialize clv and scaler indices */
-  pll_utree_reset_template_indices(tree, tip_cnt);
+  /* wrap tree */
+  tree = pll_utree_wraptree(root,tip_cnt);
 
   return tree;
 }
 
-#ifdef __linux__
-PLL_EXPORT pll_utree_t * pll_utree_parse_newick_string(char * s,
-                                                       unsigned int * tip_count)
+PLL_EXPORT pll_utree_t * pll_utree_parse_newick_string(const char * s)
 {
-  struct pll_utree * tree;
+  int rc;
+  struct pll_unode_s * root;
+  pll_utree_t * tree = NULL;
 
   /* reset tip count */
   tip_cnt = 0;
 
-  tree = (pll_utree_t *)calloc(1, sizeof(pll_utree_t));
-
-  pll_utree_in = fmemopen(s, strlen(s), "r");
-  if (!pll_utree_in)
+  if (!(root = (pll_unode_t *)calloc(1, sizeof(pll_unode_t))))
   {
-    pll_utree_destroy(tree);
-    pll_errno = PLL_ERROR_FILE_OPEN;
-    snprintf(pll_errmsg, 200, "Unable to map string (%s)", s);
-    return PLL_FAILURE;
-  }
-  else if (pll_utree_parse(tree))
-  {
-    pll_utree_destroy(tree);
-    tree = NULL;
-    fclose(pll_utree_in);
-    pll_utree_lex_destroy();
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
     return PLL_FAILURE;
   }
 
-  if (pll_utree_in) fclose(pll_utree_in);
+  struct pll_utree_buffer_state * buffer = pll_utree__scan_string(s);
+  rc = pll_utree_parse(root);
+  pll_utree__delete_buffer(buffer);
 
   pll_utree_lex_destroy();
 
-  *tip_count = tip_cnt;
+  if (!rc)
+  {
+    /* initialize clv and scaler indices */
+    pll_utree_reset_template_indices(root, tip_cnt);
 
-  /* initialize clv and scaler indices */
-  pll_utree_reset_template_indices(tree, tip_cnt);
+    tree = pll_utree_wraptree(root,tip_cnt);
+  }
+  else
+    free(root);
 
   return tree;
 }
-#endif
diff --git a/src/parsimony.c b/src/parsimony.c
index fc35933..e86c723 100644
--- a/src/parsimony.c
+++ b/src/parsimony.c
@@ -66,45 +66,62 @@ PLL_EXPORT int pll_set_parsimony_sequence(pll_parsimony_t * pars,
   return PLL_SUCCESS;
 }
 
-static void dealloc_pars_data(pll_parsimony_t * pars)
+PLL_EXPORT void pll_parsimony_destroy(pll_parsimony_t * parsimony)
 {
   unsigned int i;
+  unsigned int nodes_count = parsimony->tips + parsimony->inner_nodes;
 
-  if (!pars) return;
+  if (!parsimony) return;
 
-  /* deallocate score buffers */
-  if (pars->sbuffer)
+  /* deallocate fast parsimony structures */
+  if (parsimony->packedvector)
   {
-    for (i = 0; i < pars->score_buffers + pars->tips; ++i)
-      free(pars->sbuffer[i]);
-    free(pars->sbuffer);
+    for (i=0; i < nodes_count; ++i)
+      pll_aligned_free(parsimony->packedvector[i]);
+    free(parsimony->packedvector);
   }
 
-  /* deallocate ancestral state buffers */
-  if (pars->anc_states)
+  if (parsimony->node_cost)
+    free(parsimony->node_cost);
+
+  if (parsimony->informative)
+    free(parsimony->informative);
+
+  /* if available, deallocate structures for weighted parsimony */
+
+  /* score buffers */
+  if (parsimony->sbuffer)
   {
-    for (i = pars->tips; i < pars->ancestral_buffers+pars->tips; ++i)
-      free(pars->anc_states[i]);
-    free(pars->anc_states);
+    for (i = 0; i < parsimony->score_buffers + parsimony->tips; ++i)
+      free(parsimony->sbuffer[i]);
+    free(parsimony->sbuffer);
   }
 
-  /* deallocate scoring matrix */
-  if (pars->score_matrix) free(pars->score_matrix);
+  /* ancestral state buffers */
+  if (parsimony->anc_states)
+  {
+    for (i=parsimony->tips; i<parsimony->ancestral_buffers+parsimony->tips; ++i)
+      free(parsimony->anc_states[i]);
+    free(parsimony->anc_states);
+  }
 
-  free(pars);
+  /* scoring matrix */
+  if (parsimony->score_matrix) free(parsimony->score_matrix);
+
+  free(parsimony);
 }
 
 PLL_EXPORT pll_parsimony_t * pll_parsimony_create(unsigned int tips,
                                                   unsigned int states,
                                                   unsigned int sites,
-                                                  double * score_matrix,
+                                                  const double * score_matrix,
                                                   unsigned int score_buffers,
                                                   unsigned int ancestral_buffers)
 {
   unsigned int i;
 
   /* create parsimony instance */
-  pll_parsimony_t * pars = (pll_parsimony_t *)malloc(sizeof(pll_parsimony_t));
+  pll_parsimony_t * pars = (pll_parsimony_t *)calloc(1,sizeof(pll_parsimony_t));
   if (!pars)
   {
     pll_errno = PLL_ERROR_MEM_ALLOC;
@@ -123,7 +140,7 @@ PLL_EXPORT pll_parsimony_t * pll_parsimony_create(unsigned int tips,
   pars->score_matrix = (double *)calloc(states*states, sizeof(double));
   if (!pars->score_matrix)
   {
-    dealloc_pars_data(pars);
+    pll_parsimony_destroy(pars);
     pll_errno = PLL_ERROR_MEM_ALLOC;
     snprintf(pll_errmsg, 200,
              "Unable to allocate enough memory for scoring matrix.");
@@ -135,7 +152,7 @@ PLL_EXPORT pll_parsimony_t * pll_parsimony_create(unsigned int tips,
   pars->sbuffer = (double **)calloc(score_buffers+tips, sizeof(double *));
   if (!pars->sbuffer)
   {
-    dealloc_pars_data(pars);
+    pll_parsimony_destroy(pars);
     pll_errno = PLL_ERROR_MEM_ALLOC;
     snprintf(pll_errmsg, 200,
              "Unable to allocate enough memory for score buffers.");
@@ -146,7 +163,7 @@ PLL_EXPORT pll_parsimony_t * pll_parsimony_create(unsigned int tips,
     pars->sbuffer[i] = (double *)calloc(sites*states, sizeof(double *));
     if (!pars->sbuffer[i])
     {
-      dealloc_pars_data(pars);
+      pll_parsimony_destroy(pars);
       pll_errno = PLL_ERROR_MEM_ALLOC;
       snprintf(pll_errmsg, 200,
                "Unable to allocate enough memory for score buffers.");
@@ -159,7 +176,7 @@ PLL_EXPORT pll_parsimony_t * pll_parsimony_create(unsigned int tips,
                                              sizeof(unsigned int *));
   if (!pars->anc_states)
   {
-    dealloc_pars_data(pars);
+    pll_parsimony_destroy(pars);
     pll_errno = PLL_ERROR_MEM_ALLOC;
     snprintf(pll_errmsg, 200,
              "Unable to allocate enough memory for score buffers.");
@@ -170,7 +187,7 @@ PLL_EXPORT pll_parsimony_t * pll_parsimony_create(unsigned int tips,
     pars->anc_states[i] = (unsigned int *)calloc(sites, sizeof(unsigned int));
     if (!pars->anc_states[i])
     {
-      dealloc_pars_data(pars);
+      pll_parsimony_destroy(pars);
       pll_errno = PLL_ERROR_MEM_ALLOC;
       snprintf(pll_errmsg, 200,
                "Unable to allocate enough memory for score buffers.");
@@ -182,7 +199,7 @@ PLL_EXPORT pll_parsimony_t * pll_parsimony_create(unsigned int tips,
 }
                                                   
 PLL_EXPORT double pll_parsimony_build(pll_parsimony_t * pars,
-                                      pll_pars_buildop_t * operations,
+                                      const pll_pars_buildop_t * operations,
                                       unsigned int count)
 {
   unsigned int i,j,k,n;
@@ -288,7 +305,7 @@ PLL_EXPORT double pll_parsimony_score(pll_parsimony_t * pars,
 
 PLL_EXPORT void pll_parsimony_reconstruct(pll_parsimony_t * pars,
                                           const unsigned int * map,
-                                          pll_pars_recop_t * operations,
+                                          const pll_pars_recop_t * operations,
                                           unsigned int count)
 {
   unsigned int i,j,n;
@@ -361,8 +378,3 @@ PLL_EXPORT void pll_parsimony_reconstruct(pll_parsimony_t * pars,
     }
   }
 }
-
-PLL_EXPORT void pll_parsimony_destroy(pll_parsimony_t * pars)
-{
-  dealloc_pars_data(pars);
-}
diff --git a/src/partials.c b/src/partials.c
index 6237059..e95c077 100644
--- a/src/partials.c
+++ b/src/partials.c
@@ -122,6 +122,7 @@ static void case_tipinner(pll_partition_t * partition,
                              partition->pmatrix[inner_matrix_index],
                              right_scaler,
                              partition->tipmap,
+                             partition->maxstates,
                              partition->attributes);
 }
 
diff --git a/src/phylip.c b/src/phylip.c
new file mode 100644
index 0000000..3b0bea4
--- /dev/null
+++ b/src/phylip.c
@@ -0,0 +1,736 @@
+/*
+    Copyright (C) 2017 Tomas Flouri
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Contact: Tomas Flouri <Tomas.Flouri at h-its.org>,
+    Exelixis Lab, Heidelberg Instutute for Theoretical Studies
+    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
+*/
+
+#include "pll.h"
+
+#define PLL_PHYLIP_SEQUENTIAL  1
+#define PLL_PHYLIP_INTERLEAVED 2
+
+static int dfa_parse(pll_phylip_t * fd,
+                     pll_msa_t * msa,
+                     char * p,
+                     int seqno,
+                     int offset)
+{
+  int j = 0;
+  char c,m;
+
+  char * seqdata = msa->sequence[seqno] + offset;
+
+  /* read sequence data */
+  while((c = *p++))
+  {
+    m = (char) fd->chrstatus[(int)c];
+    switch(m)
+    {
+      case 0:
+        /* characters to be stripped */
+        fd->stripped_count++;
+        fd->stripped[(int)c]++;
+        break;
+
+      case 1:
+        /* legal character */
+        if (offset + j >= msa->length)
+        {
+          pll_errno = PLL_ERROR_PHYLIP_LONGSEQ;
+          snprintf(pll_errmsg, 200, "Sequence %d (%.100s) longer than expected",
+                   seqno+1, msa->label[seqno]);
+          return -1;
+        }
+        seqdata[j++] = c;
+        break;
+
+      case 2:
+        /* fatal character */
+        if (c>=32)
+        {
+          pll_errno = PLL_ERROR_PHYLIP_ILLEGALCHAR;
+          snprintf(pll_errmsg, 200, "illegal character '%c' "
+                                    "on line %ld in the fasta file",
+                                    c, fd->lineno);
+        }
+        else
+        {
+          pll_errno = PLL_ERROR_PHYLIP_UNPRINTABLECHAR;
+          snprintf(pll_errmsg, 200, "illegal unprintable character "
+                                    "%#.2x (hexadecimal) on line %ld "
+                                    "in the fasta file",
+                                    c, fd->lineno);
+        }
+        return -1;
+
+      case 3:
+        /* silently stripped chars */
+        break;
+    }
+  }
+  return j;
+}
+
+/* define strchrnul in case this is not a GNU system */
+static char * xstrchrnul(char * s, int c)
+{
+  char * r = strchr(s,c);
+  if (r)
+    return r;
+
+  return (char *)s + strlen(s);
+}
+
+static char * reallocline(pll_phylip_t * fd, size_t newmaxsize)
+{
+  char * temp = (char *)malloc((size_t)newmaxsize*sizeof(char));
+  if (!temp)
+  {
+    pll_errno = PLL_ERROR_MEM_ALLOC; 
+    snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+    return NULL;
+  }
+
+  memcpy(temp,fd->line,fd->line_size*sizeof(char));
+  free(fd->line);
+  fd->line = temp;
+  fd->line_maxsize = newmaxsize;
+
+  return temp;
+}
+
+static char * getnextline(pll_phylip_t * fd)
+{
+  size_t len = 0;
+
+  fd->line_size = 0;
+
+  /* read from file until newline or eof */
+  while (fgets(fd->buffer, PLL_LINEALLOC, fd->fp))
+  {
+    len = strlen(fd->buffer);
+
+    if (fd->line_size + len > fd->line_maxsize)
+      if (!reallocline(fd, fd->line_maxsize + PLL_LINEALLOC))
+        return NULL;
+
+    memcpy(fd->line+fd->line_size,fd->buffer,len*sizeof(char));
+    fd->line_size += len;
+
+    if (fd->buffer[len-1] == '\n')
+    {
+      #if 0
+      if (line_size+1 > line_maxsize)
+        reallocline(line_maxsize+1);
+
+      line[line_size] = 0;
+      #else
+        fd->line[fd->line_size-1] = 0;
+      #endif
+
+      return fd->line;
+    }
+  }
+
+  if (!fd->line_size)
+  {
+    free(fd->line);
+    fd->line = NULL;
+    return NULL;
+  }
+
+  if (fd->line_size == fd->line_maxsize)
+    if (!reallocline(fd,fd->line_maxsize+1))
+      return NULL;
+
+  fd->line[fd->line_size] = 0;
+  return fd->line;
+
+}
+
+static int args_getint(const char * arg, int * len)
+{
+  int temp;
+  *len = 0;
+  
+  int ret = sscanf(arg, "%d%n", &temp, len);
+  if ((ret == 0) || (!*len)) 
+    return 0;
+
+  return temp;
+}
+
+static int whitechar(char c)
+{
+  if (c == ' ' || c == '\t') return 1;
+
+  return 0;
+}
+
+static int parse_header(const char * line,
+                        int * seq_count,
+                        int * seq_len,
+                        int format)
+{
+  int len;
+
+  /* read number of sequences */
+  if (!(*seq_count = args_getint(line,&len)))
+  {
+    pll_errno = PLL_ERROR_PHYLIP_SYNTAX;
+    snprintf(pll_errmsg, 200, "Invalid number of sequences in header");
+    return PLL_FAILURE;
+  }
+
+  line += len;
+
+  /* read sequence length */
+  if (!(*seq_len = args_getint(line,&len)))
+  {
+    pll_errno = PLL_ERROR_PHYLIP_SYNTAX;
+    snprintf(pll_errmsg, 200, "Invalid sequence length in header");
+    return PLL_FAILURE;
+  }
+
+  line += len;
+
+  /* go through all white spaces */
+  while (*line && whitechar(*line)) ++line;
+
+  /* if end of line then return successfully */
+  if (!*line)
+    return 1;
+
+  /* otherwise, continue only if interleaved format specified, otherwise die */
+  if (format == PLL_PHYLIP_SEQUENTIAL)
+    return 0;
+
+  if (*line != 's' && *line != 'S' && *line != 'i' && *line != 'I')
+    return 0;
+
+  /* go through all white spaces */
+  while (*line && whitechar(*line)) ++line;
+
+  /* if end of line then return successfully */
+  if (!*line)
+    return 1;
+
+  return 0;
+}
+
+static int whitespace(char c)
+{
+  if (c == ' ' || c == '\t' || c == '\n' || c == '\r')
+    return 1;
+  return 0;
+}
+
+static char * parse_oneline_sequence(pll_phylip_t * fd,
+                                     pll_msa_t * msa,
+                                     char * p,
+                                     int seqno,
+                                     int offset,
+                                     int * aln_len,
+                                     int * error)
+{
+  int j = 0;
+
+  while (p && !j)
+  {
+    /* read data */
+    if ((j = dfa_parse(fd,msa,p,seqno,offset)) == -1)
+    {
+      *error = 1;
+      return NULL;
+    }
+
+    if (j)
+    {
+      if (!(*aln_len))
+      {
+        *aln_len = j;
+      }
+      else if (*aln_len != j)
+      {
+        *error = 1;
+        pll_errno = PLL_ERROR_PHYLIP_NONALIGNED;
+        snprintf(pll_errmsg, 200, "Sequence %d (%.100s) data out of alignment",
+                 seqno+1, msa->label[seqno]); 
+        return NULL;
+      }
+    }
+    else
+      p = getnextline(fd);
+  }
+
+  return p;
+}
+
+PLL_EXPORT pll_phylip_t * pll_phylip_open(const char * filename,
+                                          const unsigned int * map)
+{
+  int i;
+
+  pll_phylip_t * fd = (pll_phylip_t *)malloc(sizeof(pll_phylip_t));
+  if (!fd)
+  {
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+    return NULL;
+  }
+
+  /* allocate space */
+  fd->line = NULL;
+  fd->line_size = 0;
+  fd->line_maxsize = 0;
+
+  fd->lineno = 0;
+
+  fd->no = -1;
+
+  fd->chrstatus = map;
+
+  /* open file */
+  fd->fp = fopen(filename, "r");
+  if (!(fd->fp))
+  {
+    pll_errno = PLL_ERROR_FILE_OPEN;
+    snprintf(pll_errmsg, 200, "Unable to open file (%s)", filename);
+    free(fd);
+    return NULL;
+  }
+
+  /* get filesize */
+  if (fseek(fd->fp, 0, SEEK_END))
+  {
+    pll_errno = PLL_ERROR_FILE_SEEK;
+    snprintf(pll_errmsg, 200, "Unable to seek in file (%s)", filename);
+    fclose(fd->fp);
+    free(fd);
+    return NULL;
+  }
+  fd->filesize = ftell(fd->fp);
+
+  rewind(fd->fp);
+
+  /* reset stripped char frequencies */
+  fd->stripped_count = 0;
+  for(i=0; i<256; i++)
+    fd->stripped[i] = 0;
+
+  /* cache line */
+  if (!getnextline(fd))
+  {
+    if (fd->line)
+      free(fd->line);
+    fclose(fd->fp);
+    free(fd);
+    return NULL;
+  }
+
+  fd->lineno = 1;
+
+  return fd;
+}
+
+PLL_EXPORT int pll_phylip_rewind(pll_phylip_t * fd)
+{
+  int i;
+
+  rewind(fd->fp);
+
+  /* reset stripped char frequencies */
+  fd->stripped_count = 0;
+  for(i=0; i<256; i++)
+    fd->stripped[i] = 0;
+
+  if (!getnextline(fd))
+  {
+    pll_errno = PLL_ERROR_FILE_SEEK;
+    snprintf(pll_errmsg, 200, "Unable to rewind and cache data");
+    return PLL_FAILURE;
+  }
+  fd->lineno = 1;
+  fd->no = -1;
+
+  return PLL_SUCCESS;
+}
+
+PLL_EXPORT void pll_phylip_close(pll_phylip_t * fd)
+{
+  fclose(fd->fp);
+  if (fd->line)
+    free(fd->line);
+  free(fd);
+}
+
+PLL_EXPORT pll_msa_t * pll_phylip_parse_interleaved(pll_phylip_t * fd)
+{
+  int i;
+  int aln_len;
+  int sumlen;
+  int seqno;
+  long headerlen;
+
+  pll_msa_t * msa = (pll_msa_t *)malloc(sizeof(pll_msa_t));
+  if (!msa)
+  {
+    pll_errno = PLL_ERROR_MEM_ALLOC; 
+    snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+    return NULL;
+  }
+
+  /* read header */
+  if (!parse_header(fd->line,
+                    &(msa->count),
+                    &(msa->length),
+                    PLL_PHYLIP_INTERLEAVED))
+    return NULL;
+
+  /* allocate msa placeholders */
+  msa->sequence = (char **)calloc((size_t)(msa->count),sizeof(char *));
+  msa->label = (char **)calloc((size_t)(msa->count),sizeof(char *));
+  if (!msa->label || !msa->sequence)
+  {
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+    pll_msa_destroy(msa);
+    return NULL;
+  }
+
+  /* allocate sequence data placeholders */
+  for (i = 0; i < msa->count; ++i)
+  {
+    msa->sequence[i] = (char *)malloc((size_t)(msa->length+1) * sizeof(char));
+    if (!msa->sequence[i])
+    {
+      pll_errno = PLL_ERROR_MEM_ALLOC;
+      snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+      pll_msa_destroy(msa);
+      return NULL;
+    }
+
+    msa->sequence[i][msa->length] = 0;
+  }
+
+  /* read sequences with headers */
+  seqno = 0;
+  aln_len = 0;
+  int error = 0;
+  while (1)
+  {
+    /* get next line */
+    char * p = getnextline(fd);
+
+    /* if no more lines break */
+    if (!p) break;
+
+    /* skip whitespace before sequence header */
+    while (*p && whitespace(*p)) ++p;
+
+    /* restart loop if blank line */
+    if (!*p) continue;
+
+    /* error if there are more sequences than specified */
+    if (seqno == msa->count)
+    {
+      pll_errno = PLL_ERROR_PHYLIP_SYNTAX;
+      snprintf(pll_errmsg, 200, "Found at least %d sequences but expected %d",
+               seqno+1, msa->count);
+      pll_msa_destroy(msa);
+      return NULL;
+    }
+
+    /* find first blank after header */
+    if (strchr(p,' '))
+      headerlen = xstrchrnul(p,' ') - p;
+    else if (strchr(p,'\t'))
+      headerlen = xstrchrnul(p,'\t') - p;
+    else if (strchr(p,'\r'))
+      headerlen = xstrchrnul(p,'\r') - p;
+    else
+      headerlen = xstrchrnul(p,'\n') - p;
+
+    /* headerlen cannot be zero */
+    assert(headerlen > 0);
+
+    /* store sequence header */
+    msa->label[seqno] = (char *)malloc((size_t)(headerlen+1)*sizeof(char));
+    if (!msa->label[seqno])
+    {
+      pll_errno = PLL_ERROR_MEM_ALLOC;
+      snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+      pll_msa_destroy(msa);
+      return NULL;
+    }
+    memcpy(msa->label[seqno], p, (size_t)headerlen);
+    msa->label[seqno][headerlen] = 0;
+
+    p += headerlen;
+
+    /* read (and parse) the first line (starting from p) that contains at
+       least one character */
+    if (!parse_oneline_sequence(fd,msa,p,seqno,0,&aln_len,&error))
+      break;
+
+    ++seqno;
+
+    if (seqno == msa->count)
+      break;
+  }
+
+  /* was the last block of sequences non-aligned? */
+  if (error)
+  {
+    pll_msa_destroy(msa);
+    return NULL;
+  }
+
+  if (seqno != msa->count)
+  {
+    pll_errno = PLL_ERROR_PHYLIP_SYNTAX;
+    snprintf(pll_errmsg, 200, "Found %d sequence(s) but expected %d",
+             seqno, msa->count);
+    pll_msa_destroy(msa);
+    return NULL;
+  }
+
+  /* update the length of the alignment read so far, which will be used as the
+     offset when appending data to the end of the sequences */
+  sumlen = aln_len;
+
+  /* now read the remaining blocks */
+  seqno = 0;
+  aln_len = 0;
+  int block_count = 2;
+  while (1)
+  {
+    char * p = getnextline(fd);
+
+    /* read (and parse) the first line (starting from p) that contains at
+       least one character */
+    if (!parse_oneline_sequence(fd,msa,p,seqno,sumlen,&aln_len,&error))
+      break;
+    
+    seqno = (seqno+1) % msa->count;
+
+    /* if data for all sequences were read, then append the alignment length
+       to the sum, and go for the next block */
+    if (!seqno)
+    {
+      sumlen += aln_len;
+      aln_len = 0;
+      block_count++;
+    }
+  }
+
+  /* was the last block of sequences non-aligned? */
+  if (error)
+  {
+    pll_msa_destroy(msa);
+    return NULL;
+  }
+
+  /* if seqno != 0 then there were more (or less) sequences than expected */
+  if (seqno)
+  {
+    pll_errno = PLL_ERROR_PHYLIP_SYNTAX;
+    snprintf(pll_errmsg, 200, "Found %d sequences in block %d but expected %d",
+             seqno, block_count, msa->count);
+    pll_msa_destroy(msa);
+    return NULL;
+  }
+  if (sumlen != msa->length)
+  {
+    snprintf(pll_errmsg, 200, "Sequence length is %d but expected %d",
+             sumlen, msa->length);
+    pll_msa_destroy(msa);
+    return NULL;
+  }
+
+  return msa;
+}
+
+PLL_EXPORT pll_msa_t * pll_phylip_parse_sequential(pll_phylip_t * fd)
+{
+  int i,j;
+  long headerlen;
+
+  pll_msa_t * msa = (pll_msa_t *)malloc(sizeof(pll_msa_t));
+  if (!msa)
+  {
+    pll_errno = PLL_ERROR_MEM_ALLOC; 
+    snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+    return NULL;
+  }
+
+  /* read header */
+  if (!parse_header(fd->line,
+                    &(msa->count),
+                    &(msa->length),
+                    PLL_PHYLIP_SEQUENTIAL))
+    return NULL;
+
+  msa->sequence = (char **)calloc((size_t)(msa->count),sizeof(char *));
+  msa->label = (char **)calloc((size_t)(msa->count),sizeof(char *));
+  if (!msa->label || !msa->sequence)
+  {
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+    pll_msa_destroy(msa);
+    return NULL;
+  }
+
+  for (i = 0; i < msa->count; ++i)
+  {
+    msa->sequence[i] = (char *)malloc((size_t)(msa->length+1) * sizeof(char));
+    if (!msa->sequence[i])
+    {
+      pll_errno = PLL_ERROR_MEM_ALLOC;
+      snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+      pll_msa_destroy(msa);
+      return NULL;
+    }
+    msa->sequence[i][msa->length] = 0;
+  }
+  
+  /* read sequences */
+  int seqno = 0;
+  while (1)
+  {
+    /* get next line */
+    fd->line = getnextline(fd);
+    char * p = fd->line;
+
+    /* if no more lines break */
+    if (!p) break;
+
+    /* skip whitespace before sequence header */
+    while (*p && whitespace(*p)) ++p;
+
+    /* restart loop if blank line */
+    if (!*p) continue;
+
+    /* error if there are more sequences than specified */
+    if (seqno == msa->count)
+    {
+      pll_errno = PLL_ERROR_PHYLIP_SYNTAX;
+      snprintf(pll_errmsg, 200, "Found at least %d sequences but expected %d",
+               seqno+1, msa->count);
+      pll_msa_destroy(msa);
+      return NULL;
+    }
+
+    /* find first blank after header */
+    if (strchr(p,' '))
+      headerlen = xstrchrnul(p,' ') - p;
+    else if (strchr(p,'\t'))
+      headerlen = xstrchrnul(p,'\t') - p;
+    else if (strchr(p,'\r'))
+      headerlen = xstrchrnul(p,'\r') - p;
+    else
+      headerlen = xstrchrnul(p,'\n') - p;
+
+    /* headerlen cannot be zero */
+    assert(headerlen > 0);
+
+    /* store sequence header */
+    msa->label[seqno] = (char *)malloc((size_t)(headerlen+1)*sizeof(char));
+    if (!msa->label[seqno])
+    {
+      pll_errno = PLL_ERROR_MEM_ALLOC;
+      snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+      pll_msa_destroy(msa);
+      return NULL;
+    }
+    memcpy(msa->label[seqno], p, (size_t)headerlen);
+    msa->label[seqno][headerlen] = 0;
+
+    p += headerlen;
+
+    /* go through possibly multiple sequence data lines */
+    j=0;
+    while (1)
+    {
+      /* read sequence data */
+      int chars_count = dfa_parse(fd,msa,p,seqno,j);
+      if (chars_count == -1)
+      {
+        pll_msa_destroy(msa);
+        return NULL;
+      }
+
+      j += chars_count;
+
+      /* break if we read all sequence data */
+      if (j == msa->length)
+        break;
+
+      p = getnextline(fd);
+
+      if (!p)
+      {
+        pll_errno = PLL_ERROR_PHYLIP_SYNTAX;
+        snprintf(pll_errmsg, 200,
+                 "Sequence %d (%.100s) has %d characters but expected %d",
+                seqno+1,msa->label[seqno],j,msa->length);
+        pll_msa_destroy(msa);
+        return NULL;
+      }
+    }
+
+    ++seqno;
+  }
+  
+  if (seqno != msa->count)
+  {
+    pll_errno = PLL_ERROR_PHYLIP_SYNTAX;
+    snprintf(pll_errmsg, 200, "Found %d sequence(s) but expected %d",
+             seqno, msa->count);
+    pll_msa_destroy(msa);
+    return NULL;
+  }
+
+  return msa;
+}
+
+PLL_EXPORT void pll_msa_destroy(pll_msa_t * msa)
+{
+  if (!msa) return;
+
+  int i;
+
+  if (msa->label)
+  {
+    for (i = 0; i < msa->count; ++i)
+      if (msa->label[i])
+        free(msa->label[i]);
+    free(msa->label);
+  }
+  
+  if (msa->sequence)
+  {
+    for (i = 0; i < msa->count; ++i)
+      if (msa->sequence[i])
+        free(msa->sequence[i]);
+    free(msa->sequence);
+  }
+
+  free(msa);
+}
+
diff --git a/src/pll.c b/src/pll.c
index c9f79df..50254aa 100644
--- a/src/pll.c
+++ b/src/pll.c
@@ -24,6 +24,8 @@
 __thread int pll_errno;
 __thread char pll_errmsg[200] = {0};
 
+pll_hardware_t * pll_hardware = NULL;
+
 static void dealloc_partition_data(pll_partition_t * partition);
 
 static void dealloc_partition_data(pll_partition_t * partition)
@@ -240,7 +242,9 @@ static int update_charmap(pll_partition_t * partition, const unsigned int * map)
                         (partition->states_padded * partition->rate_cats);
 
     /* for AVX we do not need to reallocate ttlookup as it has fixed size */
-    if ((partition->states == 4) && (partition->attributes & PLL_ATTRIB_ARCH_AVX))
+    if ((partition->states == 4) &&
+        (partition->attributes & PLL_ATTRIB_ARCH_AVX) &&
+        PLL_STAT(avx_present))
       return PLL_SUCCESS;
 
     free(partition->ttlookup);
@@ -337,7 +341,9 @@ static int create_charmap(pll_partition_t * partition, const unsigned int * user
 
   /* dedicated 4x4 function  - if AVX is not used we can allocate less space
      in case not all 16 possible ambiguities are present */
-  if ((partition->states == 4) && (partition->attributes & PLL_ATTRIB_ARCH_AVX))
+  if ((partition->states == 4) &&
+      (partition->attributes & PLL_ATTRIB_ARCH_AVX) &&
+      PLL_STAT(avx_present))
   {
     partition->ttlookup = pll_aligned_alloc(1024 * partition->rate_cats *
                                             sizeof(double),
@@ -424,20 +430,28 @@ PLL_EXPORT pll_partition_t * pll_partition_create(unsigned int tips,
   partition->alignment = PLL_ALIGNMENT_CPU;
   partition->attributes = attributes;
   partition->states_padded = states;
-#ifdef HAVE_SSE
-  if (attributes & PLL_ATTRIB_ARCH_SSE)
+#ifdef HAVE_SSE3
+  if (attributes & PLL_ATTRIB_ARCH_SSE && PLL_STAT(sse3_present))
   {
     partition->alignment = PLL_ALIGNMENT_SSE;
     partition->states_padded = (states+1) & 0xFFFFFFFE;
   }
 #endif
 #ifdef HAVE_AVX
-  if (attributes & PLL_ATTRIB_ARCH_AVX)
+  if (attributes & PLL_ATTRIB_ARCH_AVX && PLL_STAT(avx_present))
+  {
+    partition->alignment = PLL_ALIGNMENT_AVX;
+    partition->states_padded = (states+3) & 0xFFFFFFFC;
+  }
+#endif
+#ifdef HAVE_AVX2
+  if (attributes & PLL_ATTRIB_ARCH_AVX2 && PLL_STAT(avx2_present))
   {
     partition->alignment = PLL_ALIGNMENT_AVX;
     partition->states_padded = (states+3) & 0xFFFFFFFC;
   }
 #endif
+
   unsigned int states_padded = partition->states_padded;
 
   /* initialize properties */
@@ -782,7 +796,9 @@ PLL_EXPORT pll_partition_t * pll_partition_create(unsigned int tips,
   }
   for (i = 0; i < partition->scale_buffers; ++i)
   {
-    partition->scale_buffer[i] = (unsigned int *)calloc(sites_alloc,
+    size_t scaler_size = (attributes & PLL_ATTRIB_RATE_SCALERS) ?
+                                                             sites_alloc * rate_cats : sites_alloc;
+    partition->scale_buffer[i] = (unsigned int *)calloc(scaler_size,
                                                         sizeof(unsigned int));
     if (!partition->scale_buffer[i])
     {
@@ -865,13 +881,18 @@ static int set_tipchars(pll_partition_t * partition,
   /* if asc_bias is set, we initialize the additional positions */
   if (partition->asc_bias_alloc)
   {
+    /* this part needs to be fixed */
+    /* tip chars should go in the same order as expected, or the pattern
+       weights for the invariant sites would not match the correct character.
+       For example, the expected order of amino acids is A,R,N,..., and the
+       tipchars order is 1,16,13,... (i.e., not sequential)  */
+    assert(0);
     for (i = 0; i < partition->states; ++i)
     {
       partition->tipchars[tip_index][partition->sites + i] =
-        partition->charmap[i];
+        (unsigned char)i+1;
     }
   }
-
   return PLL_SUCCESS;
 }
 
@@ -973,7 +994,8 @@ PLL_EXPORT int pll_set_tip_states(pll_partition_t * partition,
 //TODO: <DOC> We should account for padding before calling this function
 PLL_EXPORT int pll_set_tip_clv(pll_partition_t * partition,
                                unsigned int tip_index,
-                               const double * clv)
+                               const double * clv,
+                               int padding)
 {
   unsigned int i,j,k;
 
@@ -994,7 +1016,7 @@ PLL_EXPORT int pll_set_tip_clv(pll_partition_t * partition,
       memcpy(tipclv, clv, partition->states*sizeof(double));
       tipclv += partition->states_padded;
     }
-    clv += partition->states_padded;
+    clv += padding ? partition->states_padded : partition->states;
   }
 
   /* if asc_bias is set, we initialize the additional positions */
diff --git a/src/pll.h b/src/pll.h
index 13387d2..fe38a76 100644
--- a/src/pll.h
+++ b/src/pll.h
@@ -23,6 +23,7 @@
 #include <math.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdint.h>
 #include <string.h>
 #include <ctype.h>
 #include <x86intrin.h>
@@ -48,12 +49,16 @@
 #define PLL_MIN(a,b) ((a) < (b) ? (a) : (b))
 #define PLL_MAX(a,b) ((a) > (b) ? (a) : (b))
 #define PLL_SWAP(x,y) do { __typeof__ (x) _t = x; x = y; y = _t; } while(0)
+#define PLL_STAT(x) (pll_hardware && pll_hardware->x)
 
 /* constants */
 
 #define PLL_FAILURE  0
 #define PLL_SUCCESS  1
 
+#define PLL_FALSE  0
+#define PLL_TRUE   1
+
 #define PLL_ALIGNMENT_CPU   8
 #define PLL_ALIGNMENT_SSE  16
 #define PLL_ALIGNMENT_AVX  32
@@ -67,7 +72,15 @@
 #define PLL_SCALE_FACTOR_SQRT 340282366920938463463374607431768211456.0 /* 2**128 */
 #define PLL_SCALE_THRESHOLD_SQRT (1.0/PLL_SCALE_FACTOR_SQRT)
 #define PLL_SCALE_BUFFER_NONE -1
+
+/* in per-rate scaling mode, maximum difference between scalers
+ * please see https://github.com/xflouris/libpll/issues/44  */
+#define PLL_SCALE_RATE_MAXDIFF 4
+
 #define PLL_MISC_EPSILON 1e-8
+#define PLL_ONE_EPSILON 1e-15
+#define PLL_ONE_MIN (1-PLL_ONE_EPSILON)
+#define PLL_ONE_MAX (1+PLL_ONE_EPSILON)
 
 /* attribute flags */
 
@@ -87,6 +100,8 @@
 #define PLL_ATTRIB_AB_MASK         (7 << 5)
 #define PLL_ATTRIB_AB_FLAG         (1 << 8)
 
+#define PLL_ATTRIB_RATE_SCALERS    (1 << 9)
+
 /* topological rearrangements */
 
 #define PLL_UTREE_MOVE_SPR                  1
@@ -95,6 +110,9 @@
 #define PLL_UTREE_MOVE_NNI_LEFT             1
 #define PLL_UTREE_MOVE_NNI_RIGHT            2
 
+#define PLL_TREE_TRAVERSE_POSTORDER         1
+#define PLL_TREE_TRAVERSE_PREORDER          2
+
 /* error codes */
 
 #define PLL_ERROR_FILE_OPEN                100
@@ -104,23 +122,30 @@
 #define PLL_ERROR_FASTA_UNPRINTABLECHAR    104
 #define PLL_ERROR_FASTA_INVALIDHEADER      105
 #define PLL_ERROR_PHYLIP_SYNTAX            106
-#define PLL_ERROR_NEWICK_SYNTAX            107
-#define PLL_ERROR_MEM_ALLOC                108
-#define PLL_ERROR_PARAM_INVALID            109
-#define PLL_ERROR_TIPDATA_ILLEGALSTATE     110
-#define PLL_ERROR_TIPDATA_ILLEGALFUNCTION  111
-#define PLL_ERROR_TREE_CONVERSION          112
-#define PLL_ERROR_INVAR_INCOMPAT           113
-#define PLL_ERROR_INVAR_PROPORTION         114
-#define PLL_ERROR_INVAR_PARAMINDEX         115
-#define PLL_ERROR_INVAR_NONEFOUND          116
-#define PLL_ERROR_AB_INVALIDMETHOD         117
-#define PLL_ERROR_AB_NOSUPPORT             118
-#define PLL_ERROR_SPR_TERMINALBRANCH       119
-#define PLL_ERROR_SPR_NOCHANGE             120
-#define PLL_ERROR_NNI_INVALIDMOVE          121
-#define PLL_ERROR_NNI_TERMINALBRANCH       122
-
+#define PLL_ERROR_PHYLIP_LONGSEQ           107
+#define PLL_ERROR_PHYLIP_NONALIGNED        108
+#define PLL_ERROR_PHYLIP_ILLEGALCHAR       109
+#define PLL_ERROR_PHYLIP_UNPRINTABLECHAR   110
+#define PLL_ERROR_NEWICK_SYNTAX            111
+#define PLL_ERROR_MEM_ALLOC                112
+#define PLL_ERROR_PARAM_INVALID            113
+#define PLL_ERROR_TIPDATA_ILLEGALSTATE     114
+#define PLL_ERROR_TIPDATA_ILLEGALFUNCTION  115
+#define PLL_ERROR_TREE_CONVERSION          116
+#define PLL_ERROR_INVAR_INCOMPAT           117
+#define PLL_ERROR_INVAR_PROPORTION         118
+#define PLL_ERROR_INVAR_PARAMINDEX         119
+#define PLL_ERROR_INVAR_NONEFOUND          120
+#define PLL_ERROR_AB_INVALIDMETHOD         121
+#define PLL_ERROR_AB_NOSUPPORT             122
+#define PLL_ERROR_SPR_TERMINALBRANCH       123
+#define PLL_ERROR_SPR_NOCHANGE             124
+#define PLL_ERROR_NNI_INVALIDMOVE          125
+#define PLL_ERROR_NNI_TERMINALBRANCH       126
+#define PLL_ERROR_STEPWISE_STRUCT          127
+#define PLL_ERROR_STEPWISE_TIPS            128
+#define PLL_ERROR_STEPWISE_UNSUPPORTED     129
+#define PLL_ERROR_EINVAL                   130
 
 /* utree specific */
 
@@ -130,8 +155,30 @@
 #define PLL_UTREE_SHOW_SCALER_INDEX      (1 << 3)
 #define PLL_UTREE_SHOW_PMATRIX_INDEX     (1 << 4)
 
+/* GAMMA discretization modes */
+#define PLL_GAMMA_RATES_MEAN             0
+#define PLL_GAMMA_RATES_MEDIAN           1
+
 /* structures and data types */
 
+typedef struct pll_hardware_s
+{
+  /* cpu features */
+  int altivec_present;
+  int mmx_present;
+  int sse_present;
+  int sse2_present;
+  int sse3_present;
+  int ssse3_present;
+  int sse41_present;
+  int sse42_present;
+  int popcnt_present;
+  int avx_present;
+  int avx2_present;
+
+  /* TODO: add chip,core,mem info */
+} pll_hardware_t;
+
 typedef struct pll_partition
 {
   unsigned int tips;
@@ -193,7 +240,6 @@ typedef struct pll_operation
   int child2_scaler_index;
 } pll_operation_t;
 
-
 /* Doubly-linked list */
 
 typedef struct pll_dlist
@@ -227,9 +273,25 @@ typedef struct pll_fasta
   long stripped[256];
 } pll_fasta_t;
 
+/* Simple structure for handling PHYLIP parsing */
+typedef struct pll_phylip_s
+{
+  FILE * fp;
+  char * line;
+  size_t line_size;
+  size_t line_maxsize;
+  char buffer[PLL_LINEALLOC];
+  const unsigned int * chrstatus;
+  long no;
+  long filesize;
+  long lineno;
+  long stripped_count;
+  long stripped[256];
+} pll_phylip_t;
+
 /* Simple unrooted and rooted tree structure for parsing newick */
 
-typedef struct pll_utree
+typedef struct pll_unode_s
 {
   char * label;
   double length;
@@ -237,13 +299,23 @@ typedef struct pll_utree
   unsigned int clv_index;
   int scaler_index;
   unsigned int pmatrix_index;
-  struct pll_utree * next;
-  struct pll_utree * back;
+  struct pll_unode_s * next;
+  struct pll_unode_s * back;
 
   void * data;
+} pll_unode_t;
+
+typedef struct pll_utree_s
+{
+  unsigned int tip_count;
+  unsigned int inner_count;
+  unsigned int edge_count;
+
+  pll_unode_t ** nodes;
+
 } pll_utree_t;
 
-typedef struct pll_rtree
+typedef struct pll_rnode_s
 {
   char * label;
   double length;
@@ -251,11 +323,23 @@ typedef struct pll_rtree
   unsigned int clv_index;
   int scaler_index;
   unsigned int pmatrix_index;
-  struct pll_rtree * left;
-  struct pll_rtree * right;
-  struct pll_rtree * parent;
+  struct pll_rnode_s * left;
+  struct pll_rnode_s * right;
+  struct pll_rnode_s * parent;
 
   void * data;
+} pll_rnode_t;
+
+typedef struct pll_rtree_s
+{
+  unsigned int tip_count;
+  unsigned int inner_count;
+  unsigned int edge_count;
+
+  pll_rnode_t ** nodes;
+
+  pll_rnode_t * root;
+
 } pll_rtree_t;
 
 /* structures for handling topological rearrangement move rollbacks */
@@ -267,18 +351,18 @@ typedef struct pll_utree_rb_s
   {
     struct
     {
-      pll_utree_t * p;
-      pll_utree_t * r;
-      pll_utree_t * rb;
-      pll_utree_t * pnb;
-      pll_utree_t * pnnb;
+      pll_unode_t * p;
+      pll_unode_t * r;
+      pll_unode_t * rb;
+      pll_unode_t * pnb;
+      pll_unode_t * pnnb;
       double r_len;
       double pnb_len;
       double pnnb_len;
     } spr;
     struct
     {
-      pll_utree_t * p;
+      pll_unode_t * p;
       int nni_type;
     } nni;
   };
@@ -288,17 +372,31 @@ typedef struct pll_utree_rb_s
 
 typedef struct pll_parsimony_s
 {
+  /* common information */
   unsigned int tips;
-  unsigned int states;
+  unsigned int inner_nodes;
   unsigned int sites;
+  unsigned int states;
+  unsigned int attributes;
+  size_t alignment;
+
+  /* fast unweighted parsimony */
+  unsigned int ** packedvector;
+  unsigned int * node_cost;
+  unsigned int packedvector_count;
+  unsigned int const_cost;
+  int * informative;
+  unsigned int informative_count;
+
+  /* weighted parsimony */
   unsigned int score_buffers;
   unsigned int ancestral_buffers;
-
   double * score_matrix;
   double ** sbuffer;
   unsigned int ** anc_states;
 } pll_parsimony_t;
 
+
 typedef struct pll_pars_buildop_s
 {
   unsigned int parent_score_index;
@@ -333,15 +431,33 @@ typedef struct pll_svg_attrib_s
   double legend_ratio;
 } pll_svg_attrib_t;
 
+/* Reentrant versions of the `random' family of functions.
+   These functions all use the following data structure to contain
+   state, rather than global state variables. Taken and modified from
+   glibc 2.23 */
+
+struct pll_random_data
+{
+  int32_t *fptr;        /* Front pointer.  */
+  int32_t *rptr;        /* Rear pointer.  */
+  int32_t *state;       /* Array of state values.  */
+  int rand_type;        /* Type of random number generator.  */
+  int rand_deg;         /* Degree of random number generator.  */
+  int rand_sep;         /* Distance between front and rear.  */
+  int32_t *end_ptr;     /* Pointer behind state table.  */
+};
+
 /* common data */
 
 PLL_EXPORT extern __thread int pll_errno;
 PLL_EXPORT extern __thread char pll_errmsg[200];
+PLL_EXPORT extern pll_hardware_t * pll_hardware;
 
 PLL_EXPORT extern const unsigned int pll_map_bin[256];
 PLL_EXPORT extern const unsigned int pll_map_nt[256];
 PLL_EXPORT extern const unsigned int pll_map_aa[256];
 PLL_EXPORT extern const unsigned int pll_map_fasta[256];
+PLL_EXPORT extern const unsigned int pll_map_phylip[256];
 
 PLL_EXPORT extern const double pll_aa_rates_dayhoff[190];
 PLL_EXPORT extern const double pll_aa_rates_lg[190];
@@ -412,7 +528,8 @@ PLL_EXPORT int pll_set_tip_states(pll_partition_t * partition,
 
 PLL_EXPORT int pll_set_tip_clv(pll_partition_t * partition,
                                unsigned int tip_index,
-                               const double * clv);
+                               const double * clv,
+                               int padding);
 
 PLL_EXPORT void pll_set_pattern_weights(pll_partition_t * partition,
                                         const unsigned int * pattern_weights);
@@ -496,6 +613,8 @@ PLL_EXPORT void pll_update_partials(pll_partition_t * partition,
 PLL_EXPORT int pll_update_sumtable(pll_partition_t * partition,
                                       unsigned int parent_clv_index,
                                       unsigned int child_clv_index,
+                                      int parent_scaler_index,
+                                      int child_scaler_index,
                                       const unsigned int * params_indices,
                                       double *sumtable);
 
@@ -512,15 +631,16 @@ PLL_EXPORT int pll_compute_likelihood_derivatives(pll_partition_t * partition,
 
 PLL_EXPORT int pll_compute_gamma_cats(double alpha,
                                       unsigned int categories,
-                                      double * output_rates);
+                                      double * output_rates,
+                                      int rates_mode);
 
 /* functions in output.c */
 
-PLL_EXPORT void pll_show_pmatrix(pll_partition_t * partition,
+PLL_EXPORT void pll_show_pmatrix(const pll_partition_t * partition,
                                  unsigned int index,
                                  unsigned int float_precision);
 
-PLL_EXPORT void pll_show_clv(pll_partition_t * partition,
+PLL_EXPORT void pll_show_clv(const pll_partition_t * partition,
                              unsigned int clv_index,
                              int scaler_index,
                              unsigned int float_precision);
@@ -536,7 +656,7 @@ PLL_EXPORT int pll_fasta_getnext(pll_fasta_t * fd, char ** head,
 
 PLL_EXPORT void pll_fasta_close(pll_fasta_t * fd);
 
-PLL_EXPORT long pll_fasta_getfilesize(pll_fasta_t * fd);
+PLL_EXPORT long pll_fasta_getfilesize(const pll_fasta_t * fd);
 
 PLL_EXPORT long pll_fasta_getfilepos(pll_fasta_t * fd);
 
@@ -544,49 +664,61 @@ PLL_EXPORT int pll_fasta_rewind(pll_fasta_t * fd);
 
 /* functions in parse_rtree.y */
 
-PLL_EXPORT pll_rtree_t * pll_rtree_parse_newick(const char * filename,
-                                                unsigned int * tip_count);
+PLL_EXPORT pll_rtree_t * pll_rtree_parse_newick(const char * filename);
 
-#ifdef __linux__
-PLL_EXPORT pll_rtree_t * pll_rtree_parse_newick_string(char * s,
-                                                       unsigned int * tip_count);
-#endif
+PLL_EXPORT pll_rtree_t * pll_rtree_parse_newick_string(const char * s);
 
-PLL_EXPORT void pll_rtree_destroy(pll_rtree_t * root);
+PLL_EXPORT void pll_rtree_destroy(pll_rtree_t * root,
+                                  void (*cb_destroy)(void *));
 
+PLL_EXPORT void pll_rtree_reset_template_indices(pll_rnode_t * node,
+                                                 unsigned int tip_count);
+
+PLL_EXPORT void pll_rtree_graph_destroy(pll_rnode_t * root,
+                                        void (*cb_destroy)(void *));
+
+PLL_EXPORT pll_rtree_t * pll_rtree_wraptree(pll_rnode_t * root,
+                                            unsigned int tip_count);
 /* functions in parse_utree.y */
 
-PLL_EXPORT pll_utree_t * pll_utree_parse_newick(const char * filename,
-                                                unsigned int * tip_count);
+PLL_EXPORT pll_utree_t * pll_utree_parse_newick(const char * filename);
 
-#ifdef __linux__
-PLL_EXPORT pll_utree_t * pll_utree_parse_newick_string(char * s,
-                                                       unsigned int * tip_count);
-#endif
+PLL_EXPORT pll_utree_t * pll_utree_parse_newick_string(const char * s);
 
-PLL_EXPORT void pll_utree_destroy(pll_utree_t * root);
+PLL_EXPORT void pll_utree_destroy(pll_utree_t * tree,
+                                  void (*cb_destroy)(void *));
 
-PLL_EXPORT void pll_utree_reset_template_indices(pll_utree_t * node,
+PLL_EXPORT void pll_utree_reset_template_indices(pll_unode_t * node,
                                                  unsigned int tip_count);
 
+PLL_EXPORT void pll_utree_graph_destroy(pll_unode_t * root,
+                                        void (*cb_destroy)(void *));
+
+PLL_EXPORT pll_utree_t * pll_utree_wraptree(pll_unode_t * root,
+                                            unsigned int tip_count);
+
 /* functions in utree.c */
 
-PLL_EXPORT void pll_utree_show_ascii(pll_utree_t * tree, int options);
+PLL_EXPORT void pll_utree_show_ascii(const pll_unode_t * tree, int options);
 
-PLL_EXPORT char * pll_utree_export_newick(pll_utree_t * root);
+PLL_EXPORT char * pll_utree_export_newick(const pll_unode_t * root,
+                                   char * (*cb_serialize)(const pll_unode_t *));
 
-PLL_EXPORT int pll_utree_traverse(pll_utree_t * root,
-                                  int (*cbtrav)(pll_utree_t *),
-                                  pll_utree_t ** outbuffer,
+PLL_EXPORT int pll_utree_traverse(pll_unode_t * root,
+                                  int traversal,
+                                  int (*cbtrav)(pll_unode_t *),
+                                  pll_unode_t ** outbuffer,
                                   unsigned int * trav_size);
 
+#if 0
 PLL_EXPORT unsigned int pll_utree_query_tipnodes(pll_utree_t * root,
                                                  pll_utree_t ** node_list);
 
 PLL_EXPORT unsigned int pll_utree_query_innernodes(pll_utree_t * root,
                                                    pll_utree_t ** node_list);
+#endif
 
-PLL_EXPORT void pll_utree_create_operations(pll_utree_t ** trav_buffer,
+PLL_EXPORT void pll_utree_create_operations(pll_unode_t * const* trav_buffer,
                                             unsigned int trav_buffer_size,
                                             double * branches,
                                             unsigned int * pmatrix_indices,
@@ -594,38 +726,62 @@ PLL_EXPORT void pll_utree_create_operations(pll_utree_t ** trav_buffer,
                                             unsigned int * matrix_count,
                                             unsigned int * ops_count);
 
-PLL_EXPORT int pll_utree_check_integrity(pll_utree_t * root);
+PLL_EXPORT int pll_utree_check_integrity(const pll_utree_t * root);
+
+PLL_EXPORT pll_unode_t * pll_utree_graph_clone(const pll_unode_t * root);
 
-PLL_EXPORT pll_utree_t * pll_utree_clone(pll_utree_t * root);
-PLL_EXPORT pll_utree_t * pll_rtree_unroot(pll_rtree_t * root);
-PLL_EXPORT int pll_utree_every(pll_utree_t * node,
-                               int (*cb)(pll_utree_t *));
+PLL_EXPORT pll_utree_t * pll_utree_clone(const pll_utree_t * root);
 
-/* functions in parse_phylip.y */
+PLL_EXPORT pll_utree_t * pll_rtree_unroot(pll_rtree_t * tree);
+
+PLL_EXPORT int pll_utree_every(pll_utree_t * tree,
+                               int (*cb)(pll_unode_t *));
+
+PLL_EXPORT int pll_utree_every_const(const pll_utree_t * tree,
+                                     int (*cb)(const pll_unode_t *));
+
+PLL_EXPORT void pll_utree_create_pars_buildops(pll_unode_t * const* trav_buffer,
+                                               unsigned int trav_buffer_size,
+                                               pll_pars_buildop_t * ops,
+                                               unsigned int * ops_count);
 
-PLL_EXPORT pll_msa_t * pll_phylip_parse_msa(const char * filename,
-                                            unsigned int * msa_count);
+/* functions in phylip.c */
 
 PLL_EXPORT void pll_msa_destroy(pll_msa_t * msa);
 
+PLL_EXPORT pll_phylip_t * pll_phylip_open(const char * filename,
+                                          const unsigned int * map);
+
+PLL_EXPORT int pll_phylip_rewind(pll_phylip_t * fd);
+
+PLL_EXPORT void pll_phylip_close(pll_phylip_t * fd);
+
+PLL_EXPORT pll_msa_t * pll_phylip_parse_interleaved(pll_phylip_t * fd);
+
+PLL_EXPORT pll_msa_t * pll_phylip_parse_sequential(pll_phylip_t * fd);
+
 /* functions in rtree.c */
 
-PLL_EXPORT void pll_rtree_show_ascii(pll_rtree_t * tree, int options);
+PLL_EXPORT void pll_rtree_show_ascii(const pll_rnode_t * root, int options);
 
-PLL_EXPORT char * pll_rtree_export_newick(pll_rtree_t * root);
+PLL_EXPORT char * pll_rtree_export_newick(const pll_rnode_t * root,
+                                   char * (*cb_serialize)(const pll_rnode_t *));
 
-PLL_EXPORT int pll_rtree_traverse(pll_rtree_t * root,
-                                  int (*cbtrav)(pll_rtree_t *),
-                                  pll_rtree_t ** outbuffer,
+PLL_EXPORT int pll_rtree_traverse(pll_rnode_t * root,
+                                  int traversal,
+                                  int (*cbtrav)(pll_rnode_t *),
+                                  pll_rnode_t ** outbuffer,
                                   unsigned int * trav_size);
 
+#if 0
 PLL_EXPORT unsigned int pll_rtree_query_tipnodes(pll_rtree_t * root,
                                                  pll_rtree_t ** node_list);
 
 PLL_EXPORT unsigned int pll_rtree_query_innernodes(pll_rtree_t * root,
                                                    pll_rtree_t ** node_list);
+#endif
 
-PLL_EXPORT void pll_rtree_create_operations(pll_rtree_t ** trav_buffer,
+PLL_EXPORT void pll_rtree_create_operations(pll_rnode_t * const* trav_buffer,
                                             unsigned int trav_buffer_size,
                                             double * branches,
                                             unsigned int * pmatrix_indices,
@@ -633,17 +789,19 @@ PLL_EXPORT void pll_rtree_create_operations(pll_rtree_t ** trav_buffer,
                                             unsigned int * matrix_count,
                                             unsigned int * ops_count);
 
+#if 0
 PLL_EXPORT int pll_rtree_traverse_preorder(pll_rtree_t * root,
                                            int (*cbtrav)(pll_rtree_t *),
                                            pll_rtree_t ** outbuffer,
                                            unsigned int * trav_size);
+#endif
 
-PLL_EXPORT void pll_rtree_create_pars_buildops(pll_rtree_t ** trav_buffer,
+PLL_EXPORT void pll_rtree_create_pars_buildops(pll_rnode_t * const* trav_buffer,
                                                unsigned int trav_buffer_size,
                                                pll_pars_buildop_t * ops,
                                                unsigned int * ops_count);
 
-PLL_EXPORT void pll_rtree_create_pars_recops(pll_rtree_t ** trav_buffer,
+PLL_EXPORT void pll_rtree_create_pars_recops(pll_rnode_t * const* trav_buffer,
                                              unsigned int trav_buffer_size,
                                              pll_pars_recop_t * ops,
                                              unsigned int * ops_count);
@@ -655,7 +813,7 @@ PLL_EXPORT void pll_core_create_lookup(unsigned int states,
                                        double * lookup,
                                        const double * left_matrix,
                                        const double * right_matrix,
-                                       unsigned int * tipmap,
+                                       const unsigned int * tipmap,
                                        unsigned int tipmap_size,
                                        unsigned int attrib);
 
@@ -682,6 +840,7 @@ PLL_EXPORT void pll_core_update_partial_ti(unsigned int states,
                                            const double * right_matrix,
                                            const unsigned int * right_scaler,
                                            const unsigned int * tipmap,
+                                           unsigned int tipmap_size,
                                            unsigned int attrib);
 
 PLL_EXPORT void pll_core_update_partial_ii(unsigned int states,
@@ -708,7 +867,8 @@ PLL_EXPORT void pll_core_update_partial_tt_4x4(unsigned int sites,
                                                unsigned int * parent_scaler,
                                                const unsigned char * left_tipchars,
                                                const unsigned char * right_tipchars,
-                                               const double * lookup);
+                                               const double * lookup,
+                                               unsigned int attrib);
 
 PLL_EXPORT void pll_core_update_partial_ti_4x4(unsigned int sites,
                                                unsigned int rate_cats,
@@ -727,11 +887,12 @@ PLL_EXPORT int pll_core_update_sumtable_ti_4x4(unsigned int sites,
                                                unsigned int rate_cats,
                                                const double * parent_clv,
                                                const unsigned char * left_tipchars,
-                                               double ** eigenvecs,
-                                               double ** inv_eigenvecs,
-                                               double ** freqs,
-                                               unsigned int * tipmap,
-                                               double *sumtable,
+                                               const unsigned int * parent_scaler,
+                                               double * const * eigenvecs,
+                                               double * const * inv_eigenvecs,
+                                               double * const * freqs,
+                                               const unsigned int * tipmap,
+                                               double * sumtable,
                                                unsigned int attrib);
 
 PLL_EXPORT int pll_core_update_sumtable_ii(unsigned int states,
@@ -739,10 +900,12 @@ PLL_EXPORT int pll_core_update_sumtable_ii(unsigned int states,
                                            unsigned int rate_cats,
                                            const double * parent_clv,
                                            const double * child_clv,
-                                           double ** eigenvecs,
-                                           double ** inv_eigenvecs,
-                                           double ** freqs,
-                                           double *sumtable,
+                                           const unsigned int * parent_scaler,
+                                           const unsigned int * child_scaler,
+                                           double * const * eigenvecs,
+                                           double * const * inv_eigenvecs,
+                                           double * const * freqs,
+                                           double * sumtable,
                                            unsigned int attrib);
 
 PLL_EXPORT int pll_core_update_sumtable_ti(unsigned int states,
@@ -750,11 +913,13 @@ PLL_EXPORT int pll_core_update_sumtable_ti(unsigned int states,
                                            unsigned int rate_cats,
                                            const double * parent_clv,
                                            const unsigned char * left_tipchars,
-                                           double ** eigenvecs,
-                                           double ** inv_eigenvecs,
-                                           double ** freqs,
-                                           unsigned int * tipmap,
-                                           double *sumtable,
+                                           const unsigned int * parent_scaler,
+                                           double * const * eigenvecs,
+                                           double * const * inv_eigenvecs,
+                                           double * const * freqs,
+                                           const unsigned int * tipmap,
+                                           unsigned int tipmap_size,
+                                           double * sumtable,
                                            unsigned int attrib);
 
 PLL_EXPORT int pll_core_likelihood_derivatives(unsigned int states,
@@ -767,9 +932,9 @@ PLL_EXPORT int pll_core_likelihood_derivatives(unsigned int states,
                                                const unsigned int * pattern_weights,
                                                double branch_length,
                                                const double * prop_invar,
-                                               double ** freqs,
+                                               double * const * freqs,
                                                const double * rates,
-                                               double ** eigenvals,
+                                               double * const * eigenvals,
                                                const double * sumtable,
                                                double * d_f,
                                                double * dd_f,
@@ -785,7 +950,7 @@ PLL_EXPORT double pll_core_edge_loglikelihood_ii(unsigned int states,
                                                  const double * child_clv,
                                                  const unsigned int * child_scaler,
                                                  const double * pmatrix,
-                                                 double ** frequencies,
+                                                 double * const * frequencies,
                                                  const double * rate_weights,
                                                  const unsigned int * pattern_weights,
                                                  const double * invar_proportion,
@@ -801,8 +966,9 @@ PLL_EXPORT double pll_core_edge_loglikelihood_ti(unsigned int states,
                                                  const unsigned int * parent_scaler,
                                                  const unsigned char * tipchars,
                                                  const unsigned int * tipmap,
+                                                 unsigned int tipmap_size,
                                                  const double * pmatrix,
-                                                 double ** frequencies,
+                                                 double * const * frequencies,
                                                  const double * rate_weights,
                                                  const unsigned int * pattern_weights,
                                                  const double * invar_proportion,
@@ -817,7 +983,7 @@ PLL_EXPORT double pll_core_edge_loglikelihood_ti_4x4(unsigned int sites,
                                                      const unsigned int * parent_scaler,
                                                      const unsigned char * tipchars,
                                                      const double * pmatrix,
-                                                     double ** frequencies,
+                                                     double * const * frequencies,
                                                      const double * rate_weights,
                                                      const unsigned int * pattern_weights,
                                                      const double * invar_proportion,
@@ -831,7 +997,7 @@ PLL_EXPORT double pll_core_root_loglikelihood(unsigned int states,
                                               unsigned int rate_cats,
                                               const double * clv,
                                               const unsigned int * scaler,
-                                              double ** frequencies,
+                                              double * const * frequencies,
                                               const double * rate_weights,
                                               const unsigned int * pattern_weights,
                                               const double * invar_proportion,
@@ -842,12 +1008,13 @@ PLL_EXPORT double pll_core_root_loglikelihood(unsigned int states,
 
 /* functions in core_partials_sse.c */
 
+#ifdef HAVE_SSE3
 PLL_EXPORT void pll_core_create_lookup_sse(unsigned int states,
                                            unsigned int rate_cats,
                                            double * ttlookup,
                                            const double * left_matrix,
                                            const double * right_matrix,
-                                           unsigned int * tipmap,
+                                           const unsigned int * tipmap,
                                            unsigned int tipmap_size);
 
 PLL_EXPORT void pll_core_create_lookup_4x4_sse(unsigned int rate_cats,
@@ -863,7 +1030,8 @@ PLL_EXPORT void pll_core_update_partial_tt_sse(unsigned int states,
                                                const unsigned char * left_tipchars,
                                                const unsigned char * right_tipchars,
                                                const double * lookup,
-                                               unsigned int tipstates_count);
+                                               unsigned int tipstates_count,
+                                               unsigned int attrib);
 
 PLL_EXPORT void pll_core_update_partial_tt_4x4_sse(unsigned int sites,
                                                    unsigned int rate_cats,
@@ -871,7 +1039,8 @@ PLL_EXPORT void pll_core_update_partial_tt_4x4_sse(unsigned int sites,
                                                    unsigned int * parent_scaler,
                                                    const unsigned char * left_tipchars,
                                                    const unsigned char * right_tipchars,
-                                                   const double * lookup);
+                                                   const double * lookup,
+                                                   unsigned int attrib);
 
 PLL_EXPORT void pll_core_update_partial_ti_sse(unsigned int states,
                                                unsigned int sites,
@@ -883,7 +1052,9 @@ PLL_EXPORT void pll_core_update_partial_ti_sse(unsigned int states,
                                                const double * left_matrix,
                                                const double * right_matrix,
                                                const unsigned int * right_scaler,
-                                               const unsigned int * tipmap);
+                                               const unsigned int * tipmap,
+                                               unsigned int tipmap_size,
+                                               unsigned int attrib);
 
 
 PLL_EXPORT void pll_core_update_partial_ti_4x4_sse(unsigned int sites,
@@ -894,7 +1065,8 @@ PLL_EXPORT void pll_core_update_partial_ti_4x4_sse(unsigned int sites,
                                                    const double * right_clv,
                                                    const double * left_matrix,
                                                    const double * right_matrix,
-                                                   const unsigned int * right_scaler);
+                                                   const unsigned int * right_scaler,
+                                                   unsigned int attrib);
 
 PLL_EXPORT void pll_core_update_partial_ii_sse(unsigned int states,
                                                unsigned int sites,
@@ -906,7 +1078,8 @@ PLL_EXPORT void pll_core_update_partial_ii_sse(unsigned int states,
                                                const double * left_matrix,
                                                const double * right_matrix,
                                                const unsigned int * left_scaler,
-                                               const unsigned int * right_scaler);
+                                               const unsigned int * right_scaler,
+                                               unsigned int attrib);
 
 PLL_EXPORT void pll_core_update_partial_ii_4x4_sse(unsigned int sites,
                                                    unsigned int rate_cats,
@@ -917,16 +1090,19 @@ PLL_EXPORT void pll_core_update_partial_ii_4x4_sse(unsigned int sites,
                                                    const double * left_matrix,
                                                    const double * right_matrix,
                                                    const unsigned int * left_scaler,
-                                                   const unsigned int * right_scaler);
+                                                   const unsigned int * right_scaler,
+                                                   unsigned int attrib);
+#endif
 
 /* functions in core_partials_avx.c */
 
+#ifdef HAVE_AVX
 PLL_EXPORT void pll_core_create_lookup_avx(unsigned int states,
                                            unsigned int rate_cats,
                                            double * lookup,
                                            const double * left_matrix,
                                            const double * right_matrix,
-                                           unsigned int * tipmap,
+                                           const unsigned int * tipmap,
                                            unsigned int tipmap_size);
 
 PLL_EXPORT void pll_core_create_lookup_4x4_avx(unsigned int rate_cats,
@@ -934,6 +1110,13 @@ PLL_EXPORT void pll_core_create_lookup_4x4_avx(unsigned int rate_cats,
                                                const double * left_matrix,
                                                const double * right_matrix);
 
+PLL_EXPORT void pll_core_create_lookup_20x20_avx(unsigned int rate_cats,
+                                               double * ttlookup,
+                                               const double * left_matrix,
+                                               const double * right_matrix,
+                                               const unsigned int * tipmap,
+                                               unsigned int tipmap_size);
+
 PLL_EXPORT void pll_core_update_partial_tt_avx(unsigned int states,
                                                unsigned int sites,
                                                unsigned int rate_cats,
@@ -942,7 +1125,8 @@ PLL_EXPORT void pll_core_update_partial_tt_avx(unsigned int states,
                                                const unsigned char * left_tipchars,
                                                const unsigned char * right_tipchars,
                                                const double * lookup,
-                                               unsigned int tipstates_count);
+                                               unsigned int tipstates_count,
+                                               unsigned int attrib);
 
 PLL_EXPORT void pll_core_update_partial_tt_4x4_avx(unsigned int sites,
                                                    unsigned int rate_cats,
@@ -950,7 +1134,8 @@ PLL_EXPORT void pll_core_update_partial_tt_4x4_avx(unsigned int sites,
                                                    unsigned int * parent_scaler,
                                                    const unsigned char * left_tipchars,
                                                    const unsigned char * right_tipchars,
-                                                   const double * lookup);
+                                                   const double * lookup,
+                                                   unsigned int attrib);
 
 PLL_EXPORT void pll_core_update_partial_ti_avx(unsigned int states,
                                                unsigned int sites,
@@ -962,7 +1147,9 @@ PLL_EXPORT void pll_core_update_partial_ti_avx(unsigned int states,
                                                const double * left_matrix,
                                                const double * right_matrix,
                                                const unsigned int * right_scaler,
-                                               const unsigned int * tipmap);
+                                               const unsigned int * tipmap,
+                                               unsigned int tipmap_size,
+                                               unsigned int attrib);
 
 PLL_EXPORT void pll_core_update_partial_ti_4x4_avx(unsigned int sites,
                                                    unsigned int rate_cats,
@@ -972,7 +1159,20 @@ PLL_EXPORT void pll_core_update_partial_ti_4x4_avx(unsigned int sites,
                                                    const double * right_clv,
                                                    const double * left_matrix,
                                                    const double * right_matrix,
-                                                   const unsigned int * right_scaler);
+                                                   const unsigned int * right_scaler,
+                                                   unsigned int attrib);
+
+PLL_EXPORT void pll_core_update_partial_ti_20x20_avx(unsigned int sites,
+                                                     unsigned int rate_cats,
+                                                     double * parent_clv,
+                                                     unsigned int * parent_scaler,
+                                                     const unsigned char * left_tipchar,
+                                                     const double * right_clv,
+                                                     const double * left_matrix,
+                                                     const double * right_matrix,
+                                                     const unsigned int * right_scaler,
+                                                     const unsigned int * tipmap,
+                                                     unsigned int tipmap_size);
 
 PLL_EXPORT void pll_core_update_partial_ii_avx(unsigned int states,
                                                unsigned int sites,
@@ -984,7 +1184,8 @@ PLL_EXPORT void pll_core_update_partial_ii_avx(unsigned int states,
                                                const double * left_matrix,
                                                const double * right_matrix,
                                                const unsigned int * left_scaler,
-                                               const unsigned int * right_scaler);
+                                               const unsigned int * right_scaler,
+                                               unsigned int attrib);
 
 PLL_EXPORT void pll_core_update_partial_ii_4x4_avx(unsigned int sites,
                                                    unsigned int rate_cats,
@@ -995,108 +1196,182 @@ PLL_EXPORT void pll_core_update_partial_ii_4x4_avx(unsigned int sites,
                                                    const double * left_matrix,
                                                    const double * right_matrix,
                                                    const unsigned int * left_scaler,
-                                                   const unsigned int * right_scaler);
+                                                   const unsigned int * right_scaler,
+                                                   unsigned int attrib);
+#endif
+
+/* functions in core_partials_avx2.c */
+
+#ifdef HAVE_AVX2
+PLL_EXPORT void pll_core_update_partial_ti_avx2(unsigned int states,
+                                                unsigned int sites,
+                                                unsigned int rate_cats,
+                                                double * parent_clv,
+                                                unsigned int * parent_scaler,
+                                                const unsigned char * left_tipchars,
+                                                const double * right_clv,
+                                                const double * left_matrix,
+                                                const double * right_matrix,
+                                                const unsigned int * right_scaler,
+                                                const unsigned int * tipmap,
+                                                unsigned int tipmap_size,
+                                                unsigned int attrib);
+
+PLL_EXPORT
+void pll_core_update_partial_ti_20x20_avx2(unsigned int sites,
+                                           unsigned int rate_cats,
+                                           double * parent_clv,
+                                           unsigned int * parent_scaler,
+                                           const unsigned char * left_tipchar,
+                                           const double * right_clv,
+                                           const double * left_matrix,
+                                           const double * right_matrix,
+                                           const unsigned int * right_scaler,
+                                           const unsigned int * tipmap,
+                                           unsigned int tipmap_size);
+
+PLL_EXPORT void pll_core_update_partial_ii_avx2(unsigned int states,
+                                                unsigned int sites,
+                                                unsigned int rate_cats,
+                                                double * parent_clv,
+                                                unsigned int * parent_scaler,
+                                                const double * left_clv,
+                                                const double * right_clv,
+                                                const double * left_matrix,
+                                                const double * right_matrix,
+                                                const unsigned int * left_scaler,
+                                                const unsigned int * right_scaler,
+                                                unsigned int attrib);
+#endif
+
 
 /* functions in core_derivatives_sse.c */
 
+#ifdef HAVE_SSE3
 PLL_EXPORT int pll_core_update_sumtable_ii_sse(unsigned int states,
                                                unsigned int sites,
                                                unsigned int rate_cats,
                                                const double * parent_clv,
                                                const double * child_clv,
-                                               double ** eigenvecs,
-                                               double ** inv_eigenvecs,
-                                               double ** freqs,
-                                               double *sumtable);
+                                               const unsigned int * parent_scaler,
+                                               const unsigned int * child_scaler,
+                                               double * const * eigenvecs,
+                                               double * const * inv_eigenvecs,
+                                               double * const * freqs,
+                                               double * sumtable,
+                                               unsigned int attrib);
 
 PLL_EXPORT int pll_core_update_sumtable_ti_sse(unsigned int states,
                                                unsigned int sites,
                                                unsigned int rate_cats,
                                                const double * parent_clv,
                                                const unsigned char * left_tipchars,
-                                               double ** eigenvecs,
-                                               double ** inv_eigenvecs,
-                                               double ** freqs,
-                                               unsigned int * tipmap,
-                                               double *sumtable);
+                                               const unsigned int * parent_scaler,
+                                               double * const * eigenvecs,
+                                               double * const * inv_eigenvecs,
+                                               double * const * freqs,
+                                               const unsigned int * tipmap,
+                                               double * sumtable,
+                                               unsigned int attrib);
 
-PLL_EXPORT int pll_core_update_sumtable_ti_4x4_sse(unsigned int sites,
-                                                   unsigned int rate_cats,
-                                                   const double * parent_clv,
-                                                   const unsigned char * left_tipchars,
-                                                   double ** eigenvecs,
-                                                   double ** inv_eigenvecs,
-                                                   double ** freqs,
-                                                   unsigned int * tipmap,
-                                                   double *sumtable);
+#endif
 
 /* functions in core_derivatives_avx.c */
 
-PLL_EXPORT int pll_core_update_sumtable_ii_4x4_avx(unsigned int sites,
-                                                   unsigned int rate_cats,
-                                                   const double * clvp,
-                                                   const double * clvc,
-                                                   double ** eigenvecs,
-                                                   double ** inv_eigenvecs,
-                                                   double ** freqs,
-                                                   double * sumtable);
+#ifdef HAVE_AVX
 
 PLL_EXPORT int pll_core_update_sumtable_ii_avx(unsigned int states,
                                                unsigned int sites,
                                                unsigned int rate_cats,
                                                const double * clvp,
                                                const double * clvc,
-                                               double ** eigenvecs,
-                                               double ** inv_eigenvecs,
-                                               double ** freqs,
-                                               double * sumtable);
+                                               const unsigned int * parent_scaler,
+                                               const unsigned int * child_scaler,
+                                               double * const * eigenvecs,
+                                               double * const * inv_eigenvecs,
+                                               double * const * freqs,
+                                               double * sumtable,
+                                               unsigned int attrib);
 
 PLL_EXPORT int pll_core_update_sumtable_ti_avx(unsigned int states,
                                                unsigned int sites,
                                                unsigned int rate_cats,
                                                const double * parent_clv,
                                                const unsigned char * left_tipchars,
-                                               double ** eigenvecs,
-                                               double ** inv_eigenvecs,
-                                               double ** freqs,
-                                               unsigned int * tipmap,
+                                               const unsigned int * parent_scaler,
+                                               double * const * eigenvecs,
+                                               double * const * inv_eigenvecs,
+                                               double * const * freqs,
+                                               const unsigned int * tipmap,
+                                               unsigned int tipmap_size,
                                                double * sumtable,
                                                unsigned int attrib);
 
-PLL_EXPORT void core_site_likelihood_derivatives_avx(unsigned int states,
-                                                     unsigned int states_padded,
-                                                     unsigned int rate_cats,
-                                                     const double * rate_weights,
-                                                     const double * prop_invar,
-                                                     const double * lk_invar,
-                                                     const double * sumtable,
-                                                     const double * diagptable,
-                                                     double * site_lk);
+PLL_EXPORT int pll_core_likelihood_derivatives_avx(unsigned int states,
+                                                   unsigned int states_padded,
+                                                   unsigned int rate_cats,
+                                                   unsigned int ef_sites,
+                                                   const unsigned int * pattern_weights,
+                                                   const double * rate_weights,
+                                                   const int * invariant,
+                                                   const double * prop_invar,
+                                                   double * const * freqs,
+                                                   const double * sumtable,
+                                                   const double * diagptable,
+                                                   double * d_f,
+                                                   double * dd_f);
+#endif
 
-PLL_EXPORT void core_site_likelihood_derivatives_4x4_avx(unsigned int rate_cats,
-                                                         const double * rate_weights,
-                                                         const double * prop_invar,
-                                                         const double * lk_invar,
-                                                         const double * sumtable,
-                                                         const double * diagptable,
-                                                         double * site_lk);
-
-PLL_EXPORT int core_likelihood_derivatives_avx(unsigned int states,
-                                               unsigned int states_padded,
-                                               unsigned int rate_cats,
-                                               unsigned int ef_sites,
-                                               const unsigned int * pattern_weights,
-                                               const double * rate_weights,
-                                               const int * invariant,
-                                               const double * prop_invar,
-                                               double ** freqs,
-                                               const double * sumtable,
-                                               const double * diagptable,
-                                               double * d_f,
-                                               double * dd_f);
+/* functions in core_derivatives_avx2.c */
+
+#ifdef HAVE_AVX2
+
+PLL_EXPORT int pll_core_update_sumtable_ii_avx2(unsigned int states,
+                                                unsigned int sites,
+                                                unsigned int rate_cats,
+                                                const double * clvp,
+                                                const double * clvc,
+                                                const unsigned int * parent_scaler,
+                                                const unsigned int * child_scaler,
+                                                double * const * eigenvecs,
+                                                double * const * inv_eigenvecs,
+                                                double * const * freqs,
+                                                double * sumtable,
+                                                unsigned int attrib);
+
+PLL_EXPORT int pll_core_update_sumtable_ti_avx2(unsigned int states,
+                                                unsigned int sites,
+                                                unsigned int rate_cats,
+                                                const double * parent_clv,
+                                                const unsigned char * left_tipchars,
+                                                const unsigned int * parent_scaler,
+                                                double * const * eigenvecs,
+                                                double * const * inv_eigenvecs,
+                                                double * const * freqs,
+                                                const unsigned int * tipmap,
+                                                unsigned int tipmap_size,
+                                                double * sumtable,
+                                                unsigned int attrib);
+
+PLL_EXPORT
+int pll_core_likelihood_derivatives_avx2(unsigned int states,
+                                         unsigned int states_padded,
+                                         unsigned int rate_cats,
+                                         unsigned int ef_sites,
+                                         const unsigned int * pattern_weights,
+                                         const double * rate_weights,
+                                         const int * invariant,
+                                         const double * prop_invar,
+                                         double * const * freqs,
+                                         const double * sumtable,
+                                         const double * diagptable,
+                                         double * d_f,
+                                         double * dd_f);
+#endif
 
 /* functions in core_likelihood_sse.c */
 
+#ifdef HAVE_SSE3
 PLL_EXPORT
 double pll_core_edge_loglikelihood_ii_sse(unsigned int states,
                                           unsigned int sites,
@@ -1106,7 +1381,7 @@ double pll_core_edge_loglikelihood_ii_sse(unsigned int states,
                                           const double * child_clv,
                                           const unsigned int * child_scaler,
                                           const double * pmatrix,
-                                          double ** frequencies,
+                                          double * const * frequencies,
                                           const double * rate_weights,
                                           const unsigned int * pattern_weights,
                                           const double * invar_proportion,
@@ -1122,13 +1397,14 @@ double pll_core_edge_loglikelihood_ii_4x4_sse(unsigned int sites,
                                               const double * child_clv,
                                               const unsigned int * child_scaler,
                                               const double * pmatrix,
-                                              double ** frequencies,
+                                              double * const * frequencies,
                                               const double * rate_weights,
                                               const unsigned int * pattern_weights,
                                               const double * invar_proportion,
                                               const int * invar_indices,
                                               const unsigned int * freqs_indices,
-                                              double * persite_lnl);
+                                              double * persite_lnl,
+                                              unsigned int attrib);
 
 PLL_EXPORT
 double pll_core_edge_loglikelihood_ti_sse(unsigned int states,
@@ -1139,7 +1415,7 @@ double pll_core_edge_loglikelihood_ti_sse(unsigned int states,
                                           const unsigned char * tipchars,
                                           const unsigned int * tipmap,
                                           const double * pmatrix,
-                                          double ** frequencies,
+                                          double * const * frequencies,
                                           const double * rate_weights,
                                           const unsigned int * pattern_weights,
                                           const double * invar_proportion,
@@ -1154,19 +1430,20 @@ double pll_core_edge_loglikelihood_ti_4x4_sse(unsigned int sites,
                                               const unsigned int * parent_scaler,
                                               const unsigned char * tipchars,
                                               const double * pmatrix,
-                                              double ** frequencies,
+                                              double * const * frequencies,
                                               const double * rate_weights,
                                               const unsigned int * pattern_weights,
                                               const double * invar_proportion,
                                               const int * invar_indices,
                                               const unsigned int * freqs_indices,
-                                              double * persite_lnl);
+                                              double * persite_lnl,
+                                              unsigned int attrib);
 
 PLL_EXPORT double pll_core_root_loglikelihood_4x4_sse(unsigned int sites,
                                                       unsigned int rate_cats,
                                                       const double * clv,
                                                       const unsigned int * scaler,
-                                                      double ** frequencies,
+                                                      double * const * frequencies,
                                                       const double * rate_weights,
                                                       const unsigned int * pattern_weights,
                                                       const double * invar_proportion,
@@ -1179,16 +1456,18 @@ PLL_EXPORT double pll_core_root_loglikelihood_sse(unsigned int states,
                                                   unsigned int rate_cats,
                                                   const double * clv,
                                                   const unsigned int * scaler,
-                                                  double ** frequencies,
+                                                  double * const * frequencies,
                                                   const double * rate_weights,
                                                   const unsigned int * pattern_weights,
                                                   const double * invar_proportion,
                                                   const int * invar_indices,
                                                   const unsigned int * freqs_indices,
                                                   double * persite_lnl);
+#endif
 
 /* functions in core_likelihood_avx.c */
 
+#ifdef HAVE_AVX
 PLL_EXPORT double pll_core_edge_loglikelihood_ii_avx(unsigned int states,
                                                      unsigned int sites,
                                                      unsigned int rate_cats,
@@ -1197,7 +1476,7 @@ PLL_EXPORT double pll_core_edge_loglikelihood_ii_avx(unsigned int states,
                                                      const double * child_clv,
                                                      const unsigned int * child_scaler,
                                                      const double * pmatrix,
-                                                     double ** frequencies,
+                                                     double * const * frequencies,
                                                      const double * rate_weights,
                                                      const unsigned int * pattern_weights,
                                                      const double * invar_proportion,
@@ -1212,13 +1491,14 @@ PLL_EXPORT double pll_core_edge_loglikelihood_ii_4x4_avx(unsigned int sites,
                                                          const double * child_clv,
                                                          const unsigned int * child_scaler,
                                                          const double * pmatrix,
-                                                         double ** frequencies,
+                                                         double * const * frequencies,
                                                          const double * rate_weights,
                                                          const unsigned int * pattern_weights,
                                                          const double * invar_proportion,
                                                          const int * invar_indices,
                                                          const unsigned int * freqs_indices,
-                                                         double * persite_lnl);
+                                                         double * persite_lnl,
+                                                         unsigned int attrib);
 
 PLL_EXPORT double pll_core_edge_loglikelihood_ti_4x4_avx(unsigned int sites,
                                                          unsigned int rate_cats,
@@ -1226,13 +1506,30 @@ PLL_EXPORT double pll_core_edge_loglikelihood_ti_4x4_avx(unsigned int sites,
                                                          const unsigned int * parent_scaler,
                                                          const unsigned char * tipchars,
                                                          const double * pmatrix,
-                                                         double ** frequencies,
+                                                         double * const * frequencies,
                                                          const double * rate_weights,
                                                          const unsigned int * pattern_weights,
                                                          const double * invar_proportion,
                                                          const int * invar_indices,
                                                          const unsigned int * freqs_indices,
-                                                         double * persite_lnl);
+                                                         double * persite_lnl,
+                                                         unsigned int attrib);
+
+PLL_EXPORT double pll_core_edge_loglikelihood_ti_20x20_avx(unsigned int sites,
+                                                           unsigned int rate_cats,
+                                                           const double * parent_clv,
+                                                           const unsigned int * parent_scaler,
+                                                           const unsigned char * tipchars,
+                                                           const unsigned int * tipmap,
+                                                           unsigned int tipmap_size,
+                                                           const double * pmatrix,
+                                                           double * const * frequencies,
+                                                           const double * rate_weights,
+                                                           const unsigned int * pattern_weights,
+                                                           const double * invar_proportion,
+                                                           const int * invar_indices,
+                                                           const unsigned int * freqs_indices,
+                                                           double * persite_lnl);
 
 PLL_EXPORT double pll_core_edge_loglikelihood_ti_avx(unsigned int states,
                                                      unsigned int sites,
@@ -1242,7 +1539,7 @@ PLL_EXPORT double pll_core_edge_loglikelihood_ti_avx(unsigned int states,
                                                      const unsigned char * tipchars,
                                                      const unsigned int * tipmap,
                                                      const double * pmatrix,
-                                                     double ** frequencies,
+                                                     double * const * frequencies,
                                                      const double * rate_weights,
                                                      const unsigned int * pattern_weights,
                                                      const double * invar_proportion,
@@ -1254,7 +1551,7 @@ PLL_EXPORT double pll_core_root_loglikelihood_4x4_avx(unsigned int sites,
                                                       unsigned int rate_cats,
                                                       const double * clv,
                                                       const unsigned int * scaler,
-                                                      double ** frequencies,
+                                                      double * const * frequencies,
                                                       const double * rate_weights,
                                                       const unsigned int * pattern_weights,
                                                       const double * invar_proportion,
@@ -1267,57 +1564,144 @@ PLL_EXPORT double pll_core_root_loglikelihood_avx(unsigned int states,
                                                   unsigned int rate_cats,
                                                   const double * clv,
                                                   const unsigned int * scaler,
-                                                  double ** frequencies,
+                                                  double * const * frequencies,
                                                   const double * rate_weights,
                                                   const unsigned int * pattern_weights,
                                                   const double * invar_proportion,
                                                   const int * invar_indices,
                                                   const unsigned int * freqs_indices,
                                                   double * persite_lnl);
+#endif
+
+
+/* functions in core_likelihood_avx2.c */
+
+#ifdef HAVE_AVX2
+PLL_EXPORT
+double pll_core_root_loglikelihood_avx2(unsigned int states,
+                                        unsigned int sites,
+                                        unsigned int rate_cats,
+                                        const double * clv,
+                                        const unsigned int * scaler,
+                                        double * const * frequencies,
+                                        const double * rate_weights,
+                                        const unsigned int * pattern_weights,
+                                        const double * invar_proportion,
+                                        const int * invar_indices,
+                                        const unsigned int * freqs_indices,
+                                        double * persite_lnl);
+
+PLL_EXPORT
+double pll_core_edge_loglikelihood_ti_20x20_avx2(unsigned int sites,
+                                                 unsigned int rate_cats,
+                                                 const double * parent_clv,
+                                                 const unsigned int * parent_scaler,
+                                                 const unsigned char * tipchars,
+                                                 const unsigned int * tipmap,
+                                                 unsigned int tipmap_size,
+                                                 const double * pmatrix,
+                                                 double * const * frequencies,
+                                                 const double * rate_weights,
+                                                 const unsigned int * pattern_weights,
+                                                 const double * invar_proportion,
+                                                 const int * invar_indices,
+                                                 const unsigned int * freqs_indices,
+                                                 double * persite_lnl);
+
+
+PLL_EXPORT
+double pll_core_edge_loglikelihood_ii_avx2(unsigned int states,
+                                           unsigned int sites,
+                                           unsigned int rate_cats,
+                                           const double * parent_clv,
+                                           const unsigned int * parent_scaler,
+                                           const double * child_clv,
+                                           const unsigned int * child_scaler,
+                                           const double * pmatrix,
+                                           double * const * frequencies,
+                                           const double * rate_weights,
+                                           const unsigned int * pattern_weights,
+                                           const double * invar_proportion,
+                                           const int * invar_indices,
+                                           const unsigned int * freqs_indices,
+                                           double * persite_lnl);
+#endif
 
 /* functions in core_pmatrix.c */
 
 PLL_EXPORT int pll_core_update_pmatrix(double ** pmatrix,
                                        unsigned int states,
                                        unsigned int rate_cats,
-                                       double * rates,
+                                       const double * rates,
                                        const double * branch_lengths,
                                        const unsigned int * matrix_indices,
                                        const unsigned int * params_indices,
-                                       double * prop_invar,
-                                       double ** eigenvals,
-                                       double ** eigenvecs,
-                                       double ** inv_eigenvecs,
+                                       const double * prop_invar,
+                                       double * const * eigenvals,
+                                       double * const * eigenvecs,
+                                       double * const * inv_eigenvecs,
                                        unsigned int count,
                                        unsigned int attrib);
 
+/* functions in core_pmatrix_avx2.c */
+
+#ifdef HAVE_AVX2
+PLL_EXPORT int pll_core_update_pmatrix_20x20_avx2(double ** pmatrix,
+                                                  unsigned int rate_cats,
+                                                  const double * rates,
+                                                  const double * branch_lengths,
+                                                  const unsigned int * matrix_indices,
+                                                  const unsigned int * params_indices,
+                                                  const double * prop_invar,
+                                                  double * const * eigenvals,
+                                                  double * const * eigenvecs,
+                                                  double * const * inv_eigenvecs,
+                                                  unsigned int count);
+#endif
+
 /* functions in core_pmatrix_avx.c */
 
+#ifdef HAVE_AVX
 PLL_EXPORT int pll_core_update_pmatrix_4x4_avx(double ** pmatrix,
                                                unsigned int rate_cats,
-                                               double * rates,
+                                               const double * rates,
                                                const double * branch_lengths,
                                                const unsigned int * matrix_indices,
                                                const unsigned int * params_indices,
-                                               double * prop_invar,
-                                               double ** eigenvals,
-                                               double ** eigenvecs,
-                                               double ** inv_eigenvecs,
+                                               const double * prop_invar,
+                                               double * const * eigenvals,
+                                               double * const * eigenvecs,
+                                               double * const * inv_eigenvecs,
                                                unsigned int count);
 
+PLL_EXPORT int pll_core_update_pmatrix_20x20_avx(double ** pmatrix,
+                                                 unsigned int rate_cats,
+                                                 const double * rates,
+                                                 const double * branch_lengths,
+                                                 const unsigned int * matrix_indices,
+                                                 const unsigned int * params_indices,
+                                                 const double * prop_invar,
+                                                 double * const * eigenvals,
+                                                 double * const * eigenvecs,
+                                                 double * const * inv_eigenvecs,
+                                                 unsigned int count);
+#endif
+
 /* functions in core_pmatrix_sse.c */
 
+#ifdef HAVE_SSE3
 PLL_EXPORT int pll_core_update_pmatrix_4x4_sse(double ** pmatrix,
                                                unsigned int rate_cats,
-                                               double * rates,
+                                               const double * rates,
                                                const double * branch_lengths,
                                                const unsigned int * matrix_indices,
                                                const unsigned int * params_indices,
-                                               double * prop_invar,
-                                               double ** eigenvals,
-                                               double ** eigenvecs,
-                                               double ** inv_eigenvecs,
+                                               const double * prop_invar,
+                                               double * const * eigenvals,
+                                               double * const * eigenvecs,
+                                               double * const * inv_eigenvecs,
                                                unsigned int count);
+#endif
 
 /* functions in compress.c */
 
@@ -1328,19 +1712,19 @@ PLL_EXPORT unsigned int * pll_compress_site_patterns(char ** sequence,
 
 /* functions in utree_moves.c */
 
-PLL_EXPORT int pll_utree_spr(pll_utree_t * p,
-                             pll_utree_t * r,
+PLL_EXPORT int pll_utree_spr(pll_unode_t * p,
+                             pll_unode_t * r,
                              pll_utree_rb_t * rb,
                              double * branch_lengths,
                              unsigned int * matrix_indices);
 
-PLL_EXPORT int pll_utree_spr_safe(pll_utree_t * p,
-                                  pll_utree_t * r,
+PLL_EXPORT int pll_utree_spr_safe(pll_unode_t * p,
+                                  pll_unode_t * r,
                                   pll_utree_rb_t * rb,
                                   double * branch_lengths,
                                   unsigned int * matrix_indices);
 
-PLL_EXPORT int pll_utree_nni(pll_utree_t * p,
+PLL_EXPORT int pll_utree_nni(pll_unode_t * p,
                              int type,
                              pll_utree_rb_t * rb);
 
@@ -1358,17 +1742,17 @@ PLL_EXPORT int pll_set_parsimony_sequence(pll_parsimony_t * pars,
 PLL_EXPORT pll_parsimony_t * pll_parsimony_create(unsigned int tips,
                                                   unsigned int states,
                                                   unsigned int sites,
-                                                  double * score_matrix,
+                                                  const double * score_matrix,
                                                   unsigned int score_buffers,
                                                   unsigned int ancestral_buffers);
 
 PLL_EXPORT double pll_parsimony_build(pll_parsimony_t * pars,
-                                      pll_pars_buildop_t * operations,
+                                      const pll_pars_buildop_t * operations,
                                       unsigned int count);
 
 PLL_EXPORT void pll_parsimony_reconstruct(pll_parsimony_t * pars,
                                           const unsigned int * map,
-                                          pll_pars_recop_t * operations,
+                                          const pll_pars_recop_t * operations,
                                           unsigned int count);
 
 PLL_EXPORT double pll_parsimony_score(pll_parsimony_t * pars,
@@ -1376,17 +1760,128 @@ PLL_EXPORT double pll_parsimony_score(pll_parsimony_t * pars,
 
 PLL_EXPORT void pll_parsimony_destroy(pll_parsimony_t * pars);
 
-/* functions in svg.c */
+/* functions in utree_svg.c */
 
 PLL_EXPORT pll_svg_attrib_t * pll_svg_attrib_create(void);
 
 PLL_EXPORT void pll_svg_attrib_destroy(pll_svg_attrib_t * attrib);
 
 PLL_EXPORT int pll_utree_export_svg(pll_utree_t * tree,
-                                    unsigned int tip_count, 
+                                    pll_unode_t * root,
                                     const pll_svg_attrib_t * attribs,
                                     const char * filename);
 
+/* functions in fast_parsimony.c */
+
+PLL_EXPORT pll_parsimony_t * pll_fastparsimony_init(const pll_partition_t * partition);
+
+PLL_EXPORT void pll_fastparsimony_update_vectors(pll_parsimony_t * parsimony,
+                                                 const pll_pars_buildop_t * ops,
+                                                 unsigned int count);
+
+PLL_EXPORT unsigned int pll_fastparsimony_root_score(const pll_parsimony_t * parsimony,
+                                                     unsigned int root_index);
+
+PLL_EXPORT unsigned int pll_fastparsimony_edge_score(const pll_parsimony_t * parsimony,
+                                                     unsigned int node1_score_index,
+                                                     unsigned int node2_score_index);
+
+PLL_EXPORT void pll_fastparsimony_update_vector_4x4(pll_parsimony_t * parsimony,
+                                                    const pll_pars_buildop_t * op);
+
+PLL_EXPORT unsigned int pll_fastparsimony_edge_score_4x4(const pll_parsimony_t * parsimony,
+                                                         unsigned int node1_score_index,
+                                                         unsigned int node2_score_index);
+
+PLL_EXPORT void pll_fastparsimony_update_vector(pll_parsimony_t * parsimony,
+                                                const pll_pars_buildop_t * op);
+
+/* functions in fast_parsimony_sse.c */
+
+PLL_EXPORT void pll_fastparsimony_update_vector_4x4_sse(pll_parsimony_t * parsimony,
+                                                         const pll_pars_buildop_t * op);
+
+PLL_EXPORT unsigned int pll_fastparsimony_edge_score_4x4_sse(const pll_parsimony_t * parsimony,
+                                                             unsigned int node1_score_index,
+                                                             unsigned int node2_score_index);
+
+PLL_EXPORT unsigned int pll_fastparsimony_edge_score_sse(const pll_parsimony_t * parsimony,
+                                                         unsigned int node1_score_index,
+                                                         unsigned int node2_score_index);
+
+PLL_EXPORT void pll_fastparsimony_update_vector_sse(pll_parsimony_t * parsimony,
+                                                    const pll_pars_buildop_t * op);
+
+/* functions in fast_parsimony_avx.c */
+
+PLL_EXPORT void pll_fastparsimony_update_vector_4x4_avx(pll_parsimony_t * parsimony,
+                                                         const pll_pars_buildop_t * op);
+
+PLL_EXPORT unsigned int pll_fastparsimony_edge_score_4x4_avx(const pll_parsimony_t * parsimony,
+                                                             unsigned int node1_score_index,
+                                                             unsigned int node2_score_index);
+
+PLL_EXPORT void pll_fastparsimony_update_vector_avx(pll_parsimony_t * parsimony,
+                                                    const pll_pars_buildop_t * op);
+
+
+PLL_EXPORT unsigned int pll_fastparsimony_edge_score_avx(const pll_parsimony_t * parsimony,
+                                                         unsigned int node1_score_index,
+                                                         unsigned int node2_score_index);
+
+/* functions in fast_parsimony_avx2.c */
+
+PLL_EXPORT void pll_fastparsimony_update_vector_4x4_avx2(pll_parsimony_t * parsimony,
+                                                          const pll_pars_buildop_t * op);
+
+PLL_EXPORT unsigned int pll_fastparsimony_edge_score_4x4_avx2(const pll_parsimony_t * parsimony,
+                                                              unsigned int node1_score_index,
+                                                              unsigned int node2_score_index);
+
+PLL_EXPORT void pll_fastparsimony_update_vector_avx2(pll_parsimony_t * parsimony,
+                                                     const pll_pars_buildop_t * op);
+
+PLL_EXPORT unsigned int pll_fastparsimony_edge_score_avx2(const pll_parsimony_t * parsimony,
+                                                          unsigned int node1_score_index,
+                                                          unsigned int node2_score_index);
+
+/* functions in stepwise.c */
+
+PLL_EXPORT pll_utree_t * pll_fastparsimony_stepwise(pll_parsimony_t ** list,
+                                                    char * const * labels,
+                                                    unsigned int * score,
+                                                    unsigned int count,
+                                                    unsigned int seed);
+
+/* functions in random.c */
+
+PLL_EXPORT extern int pll_random_r(struct pll_random_data * __buf,
+                                   int32_t * __result);
+
+PLL_EXPORT extern int pll_srandom_r(unsigned int __seed,
+                                    struct pll_random_data * __buf);
+
+PLL_EXPORT extern int pll_initstate_r(unsigned int __seed,
+                                      char * __statebuf,
+                                      size_t __statelen,
+                                      struct pll_random_data * __buf);
+
+PLL_EXPORT extern int pll_setstate_r(char * __statebuf,
+                                     struct pll_random_data * __buf);
+
+/* functions in hardware.c */
+
+PLL_EXPORT int pll_hardware_probe(void);
+
+PLL_EXPORT void pll_hardware_dump();
+
+/* functions in init.c */
+
+PLL_EXPORT void pll_init(void) __attribute__((constructor));
+
+PLL_EXPORT void pll_fini(void) __attribute__((destructor));
+
+
 #ifdef __cplusplus
 } /* extern "C" */
 #endif
diff --git a/src/random.c b/src/random.c
new file mode 100644
index 0000000..ab690be
--- /dev/null
+++ b/src/random.c
@@ -0,0 +1,393 @@
+/*
+   Copyright (C) 1995-2016 Free Software Foundation, Inc.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library 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
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+/*
+   Copyright (C) 1983 Regents of the University of California.
+   All rights reserved.
+
+   Redistribution and use in source and binary forms, with or without
+   modification, are permitted provided that the following conditions
+   are met:
+
+   1. Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+   2. Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+   4. Neither the name of the University nor the names of its contributors
+      may be used to endorse or promote products derived from this software
+      without specific prior written permission.
+
+   THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+   ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+   OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+   SUCH DAMAGE.*/
+
+/*
+ * This is derived from the Berkeley source:
+ *	@(#)random.c	5.5 (Berkeley) 7/6/88
+ * It was reworked for the GNU C Library by Roland McGrath.
+ * Rewritten to be reentrant by Ulrich Drepper, 1995
+ * Modified for libpll by Tomas Flouri, 2017
+ */
+
+#include "pll.h"
+
+/* An improved random number generation package.  In addition to the standard
+   rand()/srand() like interface, this package also has a special state info
+   interface.  The initstate() routine is called with a seed, an array of
+   bytes, and a count of how many bytes are being passed in; this array is
+   then initialized to contain information for random number generation with
+   that much state information.  Good sizes for the amount of state
+   information are 32, 64, 128, and 256 bytes.  The state can be switched by
+   calling the setstate() function with the same array as was initialized
+   with initstate().  By default, the package runs with 128 bytes of state
+   information and generates far better random numbers than a linear
+   congruential generator.  If the amount of state information is less than
+   32 bytes, a simple linear congruential R.N.G. is used.  Internally, the
+   state information is treated as an array of longs; the zeroth element of
+   the array is the type of R.N.G. being used (small integer); the remainder
+   of the array is the state information for the R.N.G.  Thus, 32 bytes of
+   state information will give 7 longs worth of state information, which will
+   allow a degree seven polynomial.  (Note: The zeroth word of state
+   information also has some other information stored in it; see setstate
+   for details).  The random number generation technique is a linear feedback
+   shift register approach, employing trinomials (since there are fewer terms
+   to sum up that way).  In this approach, the least significant bit of all
+   the numbers in the state table will act as a linear feedback shift register,
+   and will have period 2^deg - 1 (where deg is the degree of the polynomial
+   being used, assuming that the polynomial is irreducible and primitive).
+   The higher order bits will have longer periods, since their values are
+   also influenced by pseudo-random carries out of the lower bits.  The
+   total period of the generator is approximately deg*(2**deg - 1); thus
+   doubling the amount of state information has a vast influence on the
+   period of the generator.  Note: The deg*(2**deg - 1) is an approximation
+   only good for large deg, when the period of the shift register is the
+   dominant factor.  With deg equal to seven, the period is actually much
+   longer than the 7*(2**7 - 1) predicted by this formula.  */
+
+
+
+/* For each of the currently supported random number generators, we have a
+   break value on the amount of state information (you need at least this many
+   bytes of state info to support this random number generator), a degree for
+   the polynomial (actually a trinomial) that the R.N.G. is based on, and
+   separation between the two lower order coefficients of the trinomial.  */
+
+/* Linear congruential.  */
+#define	TYPE_0		0
+#define	BREAK_0		8
+#define	DEG_0		0
+#define	SEP_0		0
+
+/* x**7 + x**3 + 1.  */
+#define	TYPE_1		1
+#define	BREAK_1		32
+#define	DEG_1		7
+#define	SEP_1		3
+
+/* x**15 + x + 1.  */
+#define	TYPE_2		2
+#define	BREAK_2		64
+#define	DEG_2		15
+#define	SEP_2		1
+
+/* x**31 + x**3 + 1.  */
+#define	TYPE_3		3
+#define	BREAK_3		128
+#define	DEG_3		31
+#define	SEP_3		3
+
+/* x**63 + x + 1.  */
+#define	TYPE_4		4
+#define	BREAK_4		256
+#define	DEG_4		63
+#define	SEP_4		1
+
+
+/* Array versions of the above information to make code run faster.
+   Relies on fact that TYPE_i == i.  */
+
+#define	MAX_TYPES	5	/* Max number of types above.  */
+
+struct random_poly_info
+{
+  int seps[MAX_TYPES];
+  int degrees[MAX_TYPES];
+};
+
+static const struct random_poly_info random_poly_info =
+{
+  { SEP_0, SEP_1, SEP_2, SEP_3, SEP_4 },
+  { DEG_0, DEG_1, DEG_2, DEG_3, DEG_4 }
+};
+
+/* Initialize the random number generator based on the given seed.  If the
+   type is the trivial no-state-information type, just remember the seed.
+   Otherwise, initializes state[] based on the given "seed" via a linear
+   congruential generator.  Then, the pointers are set to known locations
+   that are exactly rand_sep places apart.  Lastly, it cycles the state
+   information a given number of times to get rid of any initial dependencies
+   introduced by the L.C.R.N.G.  Note that the initialization of randtbl[]
+   for default usage relies on values produced by this routine.  */
+int
+pll_srandom_r (unsigned int seed, struct pll_random_data *buf)
+{
+  int type;
+  int32_t *state;
+  long int i;
+  int32_t word;
+  int32_t *dst;
+  int kc;
+
+  if (buf == NULL)
+    goto fail;
+  type = buf->rand_type;
+  if ((unsigned int) type >= MAX_TYPES)
+    goto fail;
+
+  state = buf->state;
+  /* We must make sure the seed is not 0.  Take arbitrarily 1 in this case.  */
+  if (seed == 0)
+    seed = 1;
+  state[0] = seed;
+  if (type == TYPE_0)
+    goto done;
+
+  dst = state;
+  word = seed;
+  kc = buf->rand_deg;
+  for (i = 1; i < kc; ++i)
+    {
+      /* This does:
+	   state[i] = (16807 * state[i - 1]) % 2147483647;
+	 but avoids overflowing 31 bits.  */
+      long int hi = word / 127773;
+      long int lo = word % 127773;
+      word = 16807 * lo - 2836 * hi;
+      if (word < 0)
+	word += 2147483647;
+      *++dst = word;
+    }
+
+  buf->fptr = &state[buf->rand_sep];
+  buf->rptr = &state[0];
+  kc *= 10;
+  while (--kc >= 0)
+    {
+      int32_t discard;
+      (void) pll_random_r (buf, &discard);
+    }
+
+ done:
+  return 0;
+
+ fail:
+  return -1;
+}
+
+/* Initialize the state information in the given array of N bytes for
+   future random number generation.  Based on the number of bytes we
+   are given, and the break values for the different R.N.G.'s, we choose
+   the best (largest) one we can and set things up for it.  srandom is
+   then called to initialize the state information.  Note that on return
+   from srandom, we set state[-1] to be the type multiplexed with the current
+   value of the rear pointer; this is so successive calls to initstate won't
+   lose this information and will be able to restart with setstate.
+   Note: The first thing we do is save the current state, if any, just like
+   setstate so that it doesn't matter when initstate is called.
+   Returns 0 on success, non-zero on failure.  */
+int
+pll_initstate_r (unsigned int seed, char *arg_state, size_t n,
+	       struct pll_random_data *buf)
+{
+  if (buf == NULL)
+    goto fail;
+
+  int32_t *old_state = buf->state;
+  if (old_state != NULL)
+    {
+      int old_type = buf->rand_type;
+      if (old_type == TYPE_0)
+	old_state[-1] = TYPE_0;
+      else
+	old_state[-1] = (MAX_TYPES * (buf->rptr - old_state)) + old_type;
+    }
+
+  int type;
+  if (n >= BREAK_3)
+    type = n < BREAK_4 ? TYPE_3 : TYPE_4;
+  else if (n < BREAK_1)
+    {
+      if (n < BREAK_0)
+	goto fail;
+
+      type = TYPE_0;
+    }
+  else
+    type = n < BREAK_2 ? TYPE_1 : TYPE_2;
+
+  int degree = random_poly_info.degrees[type];
+  int separation = random_poly_info.seps[type];
+
+  buf->rand_type = type;
+  buf->rand_sep = separation;
+  buf->rand_deg = degree;
+  int32_t *state = &((int32_t *) arg_state)[1];	/* First location.  */
+  /* Must set END_PTR before srandom.  */
+  buf->end_ptr = &state[degree];
+
+  buf->state = state;
+
+  pll_srandom_r (seed, buf);
+
+  state[-1] = TYPE_0;
+  if (type != TYPE_0)
+    state[-1] = (buf->rptr - state) * MAX_TYPES + type;
+
+  return 0;
+
+ fail:
+  pll_errno = PLL_ERROR_EINVAL;
+  snprintf(pll_errmsg, 200,
+           "A state array of less than 8 bytes was specified to initstate_r.");
+  return -1;
+}
+
+/* Restore the state from the given state array.
+   Note: It is important that we also remember the locations of the pointers
+   in the current state information, and restore the locations of the pointers
+   from the old state information.  This is done by multiplexing the pointer
+   location into the zeroth word of the state information. Note that due
+   to the order in which things are done, it is OK to call setstate with the
+   same state as the current state
+   Returns 0 on success, non-zero on failure.  */
+int
+pll_setstate_r (char *arg_state, struct pll_random_data *buf)
+{
+  int32_t *new_state = 1 + (int32_t *) arg_state;
+  int type;
+  int old_type;
+  int32_t *old_state;
+  int degree;
+  int separation;
+
+  if (arg_state == NULL || buf == NULL)
+    goto fail;
+
+  old_type = buf->rand_type;
+  old_state = buf->state;
+  if (old_type == TYPE_0)
+    old_state[-1] = TYPE_0;
+  else
+    old_state[-1] = (MAX_TYPES * (buf->rptr - old_state)) + old_type;
+
+  type = new_state[-1] % MAX_TYPES;
+  if (type < TYPE_0 || type > TYPE_4)
+    goto fail;
+
+  buf->rand_deg = degree = random_poly_info.degrees[type];
+  buf->rand_sep = separation = random_poly_info.seps[type];
+  buf->rand_type = type;
+
+  if (type != TYPE_0)
+    {
+      int rear = new_state[-1] / MAX_TYPES;
+      buf->rptr = &new_state[rear];
+      buf->fptr = &new_state[(rear + separation) % degree];
+    }
+  buf->state = new_state;
+  /* Set end_ptr too.  */
+  buf->end_ptr = &new_state[degree];
+
+  return 0;
+
+ fail:
+  pll_errno = PLL_ERROR_EINVAL;
+  snprintf(pll_errmsg, 200,
+           "The statebuf or buf argument to setstate_r() was NULL.");
+  return -1;
+}
+
+/* If we are using the trivial TYPE_0 R.N.G., just do the old linear
+   congruential bit.  Otherwise, we do our fancy trinomial stuff, which is the
+   same in all the other cases due to all the global variables that have been
+   set up.  The basic operation is to add the number at the rear pointer into
+   the one at the front pointer.  Then both pointers are advanced to the next
+   location cyclically in the table.  The value returned is the sum generated,
+   reduced to 31 bits by throwing away the "least random" low bit.
+   Note: The code takes advantage of the fact that both the front and
+   rear pointers can't wrap on the same call by not testing the rear
+   pointer if the front one has wrapped.  Returns a 31-bit random number.  */
+
+int
+pll_random_r (struct pll_random_data *buf, int32_t *result)
+{
+  int32_t *state;
+
+  if (buf == NULL || result == NULL)
+    goto fail;
+
+  state = buf->state;
+
+  if (buf->rand_type == TYPE_0)
+    {
+      int32_t val = state[0];
+      val = ((state[0] * 1103515245) + 12345) & 0x7fffffff;
+      state[0] = val;
+      *result = val;
+    }
+  else
+    {
+      int32_t *fptr = buf->fptr;
+      int32_t *rptr = buf->rptr;
+      int32_t *end_ptr = buf->end_ptr;
+      int32_t val;
+
+      val = *fptr += *rptr;
+      /* Chucking least random bit.  */
+      *result = (val >> 1) & 0x7fffffff;
+      ++fptr;
+      if (fptr >= end_ptr)
+	{
+	  fptr = state;
+	  ++rptr;
+	}
+      else
+	{
+	  ++rptr;
+	  if (rptr >= end_ptr)
+	    rptr = state;
+	}
+      buf->fptr = fptr;
+      buf->rptr = rptr;
+    }
+  return 0;
+
+ fail:
+  pll_errno = PLL_ERROR_EINVAL;
+  snprintf(pll_errmsg, 200,
+           "The buf or result argument to random_r() was NULL.");
+  return -1;
+}
diff --git a/src/rtree.c b/src/rtree.c
index bd0f41d..48e6212 100644
--- a/src/rtree.c
+++ b/src/rtree.c
@@ -23,29 +23,29 @@
 
 static int indent_space = 4;
 
-static void print_node_info(pll_rtree_t * tree, int options)
+static void print_node_info(const pll_rnode_t * root, int options)
 {
   if (options & PLL_UTREE_SHOW_LABEL)
-    printf (" %s", tree->label);
+    printf (" %s", root->label);
   if (options & PLL_UTREE_SHOW_BRANCH_LENGTH)
-    printf (" %f", tree->length);
+    printf (" %f", root->length);
   if (options & PLL_UTREE_SHOW_CLV_INDEX)
-    printf (" %d", tree->clv_index);
+    printf (" %d", root->clv_index);
   if (options & PLL_UTREE_SHOW_SCALER_INDEX)
-    printf (" %d", tree->scaler_index);
+    printf (" %d", root->scaler_index);
   if (options & PLL_UTREE_SHOW_PMATRIX_INDEX)
-    printf (" %d", tree->pmatrix_index);
+    printf (" %d", root->pmatrix_index);
   printf("\n");
 }
 
-static void print_tree_recurse(pll_rtree_t * tree,
+static void print_tree_recurse(const pll_rnode_t * root,
                                int indent_level,
                                int * active_node_order,
                                int options)
 {
   int i,j;
 
-  if (!tree) return;
+  if (!root) return;
 
   for (i = 0; i < indent_level; ++i)
   {
@@ -73,40 +73,40 @@ static void print_tree_recurse(pll_rtree_t * tree,
   printf("+");
   for (j = 0; j < indent_space-1; ++j)
     printf ("-");
-  if (tree->left || tree->right) printf("+");
+  if (root->left || root->right) printf("+");
 
-  print_node_info(tree, options);
+  print_node_info(root, options);
 
   if (active_node_order[indent_level-1] == 2)
     active_node_order[indent_level-1] = 0;
 
   active_node_order[indent_level] = 1;
-  print_tree_recurse(tree->left,
+  print_tree_recurse(root->left,
                      indent_level+1,
                      active_node_order,
                      options);
   active_node_order[indent_level] = 2;
-  print_tree_recurse(tree->right,
+  print_tree_recurse(root->right,
                      indent_level+1,
                      active_node_order,
                      options);
 
 }
 
-static unsigned int tree_indent_level(pll_rtree_t * tree, unsigned int indent)
+static unsigned int tree_indent_level(const pll_rnode_t * root, unsigned int indent)
 {
-  if (!tree) return indent;
+  if (!root) return indent;
 
-  unsigned int a = tree_indent_level(tree->left,  indent+1);
-  unsigned int b = tree_indent_level(tree->right, indent+1);
+  unsigned int a = tree_indent_level(root->left,  indent+1);
+  unsigned int b = tree_indent_level(root->right, indent+1);
 
   return (a > b ? a : b);
 }
 
-void pll_rtree_show_ascii(pll_rtree_t * tree, int options)
+PLL_EXPORT void pll_rtree_show_ascii(const pll_rnode_t * root, int options)
 {
 
-  unsigned int indent_max = tree_indent_level(tree,0);
+  unsigned int indent_max = tree_indent_level(root,0);
 
   int * active_node_order = (int *)malloc((indent_max+1) * sizeof(int));
   if (!active_node_order)
@@ -118,40 +118,64 @@ void pll_rtree_show_ascii(pll_rtree_t * tree, int options)
   active_node_order[0] = 1;
   active_node_order[1] = 1;
 
-  print_node_info(tree, options);
-  print_tree_recurse(tree->left,  1, active_node_order, options);
-  print_tree_recurse(tree->right, 1, active_node_order, options);
+  print_node_info(root, options);
+  print_tree_recurse(root->left,  1, active_node_order, options);
+  print_tree_recurse(root->right, 1, active_node_order, options);
   free(active_node_order);
 }
 
-static char * rtree_export_newick_recursive(pll_rtree_t * root)
+static char * rtree_export_newick_recursive(const pll_rnode_t * root,
+                                  char * (*cb_serialize)(const pll_rnode_t *))
 {
   char * newick;
   int size_alloced;
   assert(root != NULL);
 
   if (!(root->left) || !(root->right))
-    size_alloced = asprintf(&newick, "%s:%f", root->label, root->length);
+  {
+    if (cb_serialize)
+    {
+      newick = cb_serialize(root);
+      size_alloced = strlen(newick);
+    }
+    else
+    {
+      size_alloced = asprintf(&newick, "%s:%f", root->label, root->length);
+    }
+  }
   else
   {
-    char * subtree1 = rtree_export_newick_recursive(root->left);
+    char * subtree1 = rtree_export_newick_recursive(root->left,cb_serialize);
     if (subtree1 == NULL)
     {
       return NULL;
     }
-    char * subtree2 = rtree_export_newick_recursive(root->right);
+    char * subtree2 = rtree_export_newick_recursive(root->right,cb_serialize);
     if (subtree2 == NULL)
     {
       free(subtree1);
       return NULL;
     }
 
-    size_alloced = asprintf(&newick,
-                            "(%s,%s)%s:%f",
-                            subtree1,
-                            subtree2,
-                            root->label ? root->label : "",
-                            root->length);
+    if (cb_serialize)
+    {
+      char * temp = cb_serialize(root);
+      size_alloced = asprintf(&newick,
+                              "(%s,%s)%s",
+                              subtree1,
+                              subtree2,
+                              temp);
+      free(temp);
+    }
+    else
+    {
+      size_alloced = asprintf(&newick,
+                              "(%s,%s)%s:%f",
+                              subtree1,
+                              subtree2,
+                              root->label ? root->label : "",
+                              root->length);
+    }
     free(subtree1);
     free(subtree2);
   }
@@ -165,24 +189,35 @@ static char * rtree_export_newick_recursive(pll_rtree_t * root)
   return newick;
 }
 
-PLL_EXPORT char * pll_rtree_export_newick(pll_rtree_t * root)
+PLL_EXPORT char * pll_rtree_export_newick(const pll_rnode_t * root,
+                                   char * (*cb_serialize)(const pll_rnode_t *))
 {
   char * newick;
   int size_alloced;
   if (!root) return NULL;
 
   if (!(root->left) || !(root->right))
-    size_alloced = asprintf(&newick, "%s:%f", root->label, root->length);
+  {
+    if (cb_serialize)
+    {
+      newick = cb_serialize(root);
+      size_alloced = strlen(newick);
+    }
+    else
+    {
+      size_alloced = asprintf(&newick, "%s:%f", root->label, root->length);
+    }
+  }
   else
   {
-    char * subtree1 = rtree_export_newick_recursive(root->left);
+    char * subtree1 = rtree_export_newick_recursive(root->left,cb_serialize);
     if (subtree1 == NULL)
     {
       pll_errno = PLL_ERROR_MEM_ALLOC;
       snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
       return NULL;
     }
-    char * subtree2 = rtree_export_newick_recursive(root->right);
+    char * subtree2 = rtree_export_newick_recursive(root->right,cb_serialize);
     if (subtree2 == NULL)
     {
       free(subtree1);
@@ -191,12 +226,25 @@ PLL_EXPORT char * pll_rtree_export_newick(pll_rtree_t * root)
       return NULL;
     }
 
-    size_alloced = asprintf(&newick,
-                            "(%s,%s)%s:%f;",
-                            subtree1,
-                            subtree2,
-                            root->label ? root->label : "",
-                            root->length);
+    if (cb_serialize)
+    {
+      char * temp = cb_serialize(root);
+      size_alloced = asprintf(&newick,
+                              "(%s,%s)%s",
+                              subtree1,
+                              subtree2,
+                              temp);
+      free(temp);
+    }
+    else
+    {
+      size_alloced = asprintf(&newick,
+                              "(%s,%s)%s:%f;",
+                              subtree1,
+                              subtree2,
+                              root->label ? root->label : "",
+                              root->length);
+    }
     free(subtree1);
     free(subtree2);
   }
@@ -211,7 +259,7 @@ PLL_EXPORT char * pll_rtree_export_newick(pll_rtree_t * root)
 }
 
 
-PLL_EXPORT void pll_rtree_create_operations(pll_rtree_t ** trav_buffer,
+PLL_EXPORT void pll_rtree_create_operations(pll_rnode_t * const* trav_buffer,
                                             unsigned int trav_buffer_size,
                                             double * branches,
                                             unsigned int * pmatrix_indices,
@@ -219,7 +267,7 @@ PLL_EXPORT void pll_rtree_create_operations(pll_rtree_t ** trav_buffer,
                                             unsigned int * matrix_count,
                                             unsigned int * ops_count)
 {
-  pll_rtree_t * node;
+  pll_rnode_t * node;
   unsigned int i;
 
   *ops_count = 0;
@@ -255,10 +303,10 @@ PLL_EXPORT void pll_rtree_create_operations(pll_rtree_t ** trav_buffer,
   }
 }
 
-static void rtree_traverse(pll_rtree_t * node,
-                           int (*cbtrav)(pll_rtree_t *),
-                           unsigned int * index,
-                           pll_rtree_t ** outbuffer)
+static void rtree_traverse_postorder(pll_rnode_t * node,
+                                     int (*cbtrav)(pll_rnode_t *),
+                                     unsigned int * index,
+                                     pll_rnode_t ** outbuffer)
 {
   if (!node->left)
   {
@@ -271,39 +319,18 @@ static void rtree_traverse(pll_rtree_t * node,
   }
   if (!cbtrav(node))
     return;
-  rtree_traverse(node->left, cbtrav, index, outbuffer);
-  rtree_traverse(node->right, cbtrav, index, outbuffer);
+
+  rtree_traverse_postorder(node->left, cbtrav, index, outbuffer);
+  rtree_traverse_postorder(node->right, cbtrav, index, outbuffer);
 
   outbuffer[*index] = node;
   *index = *index + 1;
 }
 
-int pll_rtree_traverse(pll_rtree_t * root,
-                       int (*cbtrav)(pll_rtree_t *),
-                       pll_rtree_t ** outbuffer,
-                       unsigned int * trav_size)
-{
-  *trav_size = 0;
-  if (!root->left) return PLL_FAILURE;
-
-  /* we will traverse an unrooted tree in the following way
-
-           root
-            /\
-           /  \
-        left   right
-
-     at each node the callback function is called to decide whether we
-     are going to traversing the subtree rooted at the specific node */
-
-  rtree_traverse(root, cbtrav, trav_size, outbuffer);
-  return PLL_SUCCESS;
-}
-
-static void rtree_traverse_preorder(pll_rtree_t * node,
-                                    int (*cbtrav)(pll_rtree_t *),
+static void rtree_traverse_preorder(pll_rnode_t * node,
+                                    int (*cbtrav)(pll_rnode_t *),
                                     unsigned int * index,
-                                    pll_rtree_t ** outbuffer)
+                                    pll_rnode_t ** outbuffer)
 {
   if (!node->left)
   {
@@ -325,10 +352,11 @@ static void rtree_traverse_preorder(pll_rtree_t * node,
 
 }
 
-PLL_EXPORT int pll_rtree_traverse_preorder(pll_rtree_t * root,
-                                           int (*cbtrav)(pll_rtree_t *),
-                                           pll_rtree_t ** outbuffer,
-                                           unsigned int * trav_size)
+PLL_EXPORT int pll_rtree_traverse(pll_rnode_t * root,
+                                  int traversal,
+                                  int (*cbtrav)(pll_rnode_t *),
+                                  pll_rnode_t ** outbuffer,
+                                  unsigned int * trav_size)
 {
   *trav_size = 0;
   if (!root->left) return PLL_FAILURE;
@@ -343,10 +371,21 @@ PLL_EXPORT int pll_rtree_traverse_preorder(pll_rtree_t * root,
      at each node the callback function is called to decide whether we
      are going to traversing the subtree rooted at the specific node */
 
-  rtree_traverse_preorder(root, cbtrav, trav_size, outbuffer);
+  if (traversal == PLL_TREE_TRAVERSE_POSTORDER)
+    rtree_traverse_postorder(root, cbtrav, trav_size, outbuffer);
+  else if (traversal == PLL_TREE_TRAVERSE_PREORDER)
+    rtree_traverse_preorder(root, cbtrav, trav_size, outbuffer);
+  else
+  {
+    snprintf(pll_errmsg, 200, "Invalid traversal value.");
+    pll_errno = PLL_ERROR_PARAM_INVALID;
+    return PLL_FAILURE;
+  }
+
   return PLL_SUCCESS;
 }
 
+#if 0
 static void rtree_query_tipnodes_recursive(pll_rtree_t * node,
                                            pll_rtree_t ** node_list,
                                            unsigned int * index)
@@ -414,13 +453,14 @@ PLL_EXPORT unsigned int pll_rtree_query_innernodes(pll_rtree_t * root,
 
   return index;
 }
+#endif
 
-PLL_EXPORT void pll_rtree_create_pars_buildops(pll_rtree_t ** trav_buffer,
+PLL_EXPORT void pll_rtree_create_pars_buildops(pll_rnode_t * const* trav_buffer,
                                                unsigned int trav_buffer_size,
                                                pll_pars_buildop_t * ops,
                                                unsigned int * ops_count)
 {
-  pll_rtree_t * node;
+  pll_rnode_t * node;
   unsigned int i;
 
   *ops_count = 0;
@@ -440,12 +480,12 @@ PLL_EXPORT void pll_rtree_create_pars_buildops(pll_rtree_t ** trav_buffer,
   }
 }
 
-PLL_EXPORT void pll_rtree_create_pars_recops(pll_rtree_t ** trav_buffer,
+PLL_EXPORT void pll_rtree_create_pars_recops(pll_rnode_t * const* trav_buffer,
                                              unsigned int trav_buffer_size,
                                              pll_pars_recop_t * ops,
                                              unsigned int * ops_count)
 {
-  pll_rtree_t * node;
+  pll_rnode_t * node;
   unsigned int i;
 
   *ops_count = 0;
diff --git a/src/stepwise.c b/src/stepwise.c
new file mode 100644
index 0000000..4586e52
--- /dev/null
+++ b/src/stepwise.c
@@ -0,0 +1,546 @@
+/*
+    Copyright (C) 2016 Tomas Flouri
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Contact: Tomas Flouri <Tomas.Flouri at h-its.org>,
+    Exelixis Lab, Heidelberg Instutute for Theoretical Studies
+    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
+*/
+
+#include "pll.h"
+
+/* simulate exactly the non-reentrant glibc srandom() function */
+#define RAND_STATE_SIZE 128
+
+typedef struct
+{
+  int clv_valid;
+} node_info_t;
+
+static pll_unode_t ** travbuffer;
+static pll_pars_buildop_t * parsops;
+
+static char * xstrdup(const char * s)
+{
+  size_t len = strlen(s);
+  char * p = (char *)malloc(len+1);
+  if (!p)
+  {
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf(pll_errmsg, 200, "Memory allocation failed");
+    return NULL;
+  }
+  return strcpy(p,s);
+}
+
+/* Fisher-Yates shuffle */
+static unsigned int * create_shuffled(unsigned int n, unsigned int seed)
+{
+  unsigned int i,j;
+  char * statebuf;
+  struct pll_random_data * buf;
+  
+  unsigned int * x = (unsigned int *)malloc(n*sizeof(unsigned int));
+  if (!x)
+  {
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+    return NULL;
+  }
+
+  for (i=0; i<n; ++i)
+    x[i] = i;
+
+  /* if seed == 0 then do not shuffle! */
+  if (!seed)
+    return x;
+
+  /* init re-entrant randomizer */
+  buf = (struct pll_random_data *)calloc(1, sizeof(struct pll_random_data));
+  statebuf = (char *)calloc(RAND_STATE_SIZE,sizeof(char));
+
+  pll_initstate_r(seed,statebuf,RAND_STATE_SIZE,buf);
+  pll_srandom_r(seed,buf);
+
+  /* perform Fisher-Yates shuffle */
+  if (n > 1)
+  {
+    i = n - 1;
+    while (1)
+    {
+      int rint;
+      pll_random_r(buf,&rint);
+      double r = ((double)rint / RAND_MAX);
+      j = (unsigned int)(r * (i+1));
+
+      PLL_SWAP(x[i],x[j]);
+
+      if (i == 0) break;
+      --i;
+    }
+  }
+
+  /* dealloc and return shuffled array */
+  free(statebuf);
+  free(buf);
+  return x;
+}
+
+static void dealloc_data_onenode(pll_unode_t * node)
+{
+  if (node->data)
+  {
+    free(node->data);
+    node->data = NULL;
+  }
+}
+
+static void dealloc_data(pll_unode_t * node)
+{
+  dealloc_data_onenode(node);
+  dealloc_data_onenode(node->next);
+  dealloc_data_onenode(node->next->next);
+}
+
+/* a callback function for performing a partial traversal */
+static int cb_partial_traversal(pll_unode_t * node)
+{
+  node_info_t * node_info;
+
+  /* if we don't want tips in the traversal we must return 0 here. For now,
+     allow tips */
+  if (!node->next) return 1;
+
+  /* get the data element from the node and check if the CLV vector is
+     oriented in the direction that we want to traverse. If the data
+     element is not yet allocated then we allocate it, set the direction
+     and instruct the traversal routine to place the node in the traversal array
+     by returning 1 */
+  node_info = (node_info_t *)(node->data);
+  if (!node_info)
+  {
+    /* allocate data element. TODO: Check whether allocation was successful */
+    node->data             = (node_info_t *)calloc(1,sizeof(node_info_t));
+    node->next->data       = (node_info_t *)calloc(1,sizeof(node_info_t));
+    node->next->next->data = (node_info_t *)calloc(1,sizeof(node_info_t));
+
+    /* set orientation on selected direction and traverse the subtree */
+    node_info = node->data;
+    node_info->clv_valid = 1;
+    return 1;
+  }
+
+  /* if the data element was already there and the CLV on this direction is
+     set, i.e. the CLV is valid, we instruct the traversal routine not to
+     traverse the subtree rooted in this node/direction by returning 0 */
+  if (node_info->clv_valid) return 0;
+
+  /* otherwise, set orientation on selected direction */
+  node_info->clv_valid = 1;
+
+  /* reset orientation on the other two directions and return 1 (i.e. traverse
+     the subtree */
+  node_info = node->next->data;
+  node_info->clv_valid = 0;
+  node_info = node->next->next->data;
+  node_info->clv_valid = 0;
+
+  return 1;
+}
+
+static pll_unode_t * utree_inner_create(unsigned int i)
+{
+  pll_unode_t * node = (pll_unode_t *)calloc(1,sizeof(pll_unode_t));
+  if (!node)
+    return NULL;
+  
+  node->next = (pll_unode_t *)calloc(1,sizeof(pll_unode_t));
+  if (!node->next)
+  {
+    free(node);
+    return NULL;
+  }
+  node->next->next = (pll_unode_t *)calloc(1,sizeof(pll_unode_t));
+  if (!node->next->next)
+  {
+    free(node->next);
+    free(node);
+    return NULL;
+  }
+
+  node->next->next->next = node;
+
+  node->clv_index = i;
+  node->next->clv_index = i;
+  node->next->next->clv_index = i;
+
+  return node;
+}
+
+static pll_unode_t * utree_tip_create(unsigned int i)
+{
+  pll_unode_t * node = (pll_unode_t *)calloc(1,sizeof(pll_unode_t));
+  node->next = NULL;
+  node->clv_index = i;
+
+  return node;
+}
+
+static void utree_link(pll_unode_t * a, pll_unode_t * b)
+{
+  /*
+
+    *               *               *                * 
+     \             /                 \              /
+      *---*   *---*        -->        *---*-----*--*
+     /    a   b    \                 /    a     b   \
+    *               *               *                *
+
+  */
+
+  a->back = b;
+  b->back = a;
+}
+
+static void utree_edgesplit(pll_unode_t * a, pll_unode_t * b, pll_unode_t * c)
+{
+  /*
+                *                                      *
+                |                                      |
+                *                                      *
+               / \                                    / \
+            b *   * c                              b *   * c
+                                                    /     \
+    *                      *      -->      *       /       \      * 
+     \                    /                 \     /         \    /
+      *---*----------*---*                   *---*           *--*
+     /    a          d    \                 /    a           d   \
+    *                      *               *                      *
+
+  */
+
+  /* link d<->c */
+  utree_link(a->back,c);
+
+  /* link a<->b */
+  utree_link(a,b);
+}
+
+static unsigned int utree_iterate(pll_parsimony_t ** list,
+                                  pll_unode_t ** edge_list,
+                                  pll_unode_t * inner_node,
+                                  pll_unode_t * tip_node,
+                                  unsigned int edge_count,
+                                  unsigned int partition_count)
+{
+  unsigned int i,j;
+  unsigned int min_cost = 0;
+  unsigned int best_index = 0;
+  unsigned int cost;
+  unsigned int ops_count;
+  unsigned int traversal_size;
+
+  /* set min cost to maximum possible value */
+  min_cost = ~0u;
+
+  /* find first empty slot in edge_list */
+  pll_unode_t ** empty_slot = edge_list + edge_count;
+
+  for (i = 0; i < edge_count; ++i)
+  {
+    /* make the split */
+    pll_unode_t * d = edge_list[i]->back;
+    utree_edgesplit(edge_list[i], inner_node, inner_node->next); 
+    utree_link(inner_node->next->next, tip_node);
+
+    /* add the two new edges to the end of the list */
+    empty_slot[0] = inner_node->next;
+    empty_slot[1] = inner_node->next->next;
+
+    /* make a partial traversal */
+    if (!pll_utree_traverse(tip_node->back,
+                            PLL_TREE_TRAVERSE_POSTORDER,
+                            cb_partial_traversal,
+                            travbuffer,
+                            &traversal_size))
+      assert(0);
+
+    /* create parsimony operations */
+    pll_utree_create_pars_buildops(travbuffer,
+                                   traversal_size,
+                                   parsops,
+                                   &ops_count);
+
+    /* compute the costs for each parsimony partition */
+    cost = 0;
+    for (j = 0; j < partition_count; ++j)
+    {
+      /* update parsimony vectors */
+      pll_fastparsimony_update_vectors(list[j], parsops, ops_count);
+
+      /* get parsimony score */
+      cost += pll_fastparsimony_edge_score(list[j],
+                                           tip_node->clv_index,
+                                           tip_node->back->clv_index);
+    }
+
+    /* if current cost is smaller than minimum cost save topology index */
+    if (cost < min_cost)
+    {
+      min_cost = cost;
+      best_index = i;
+    }
+
+    /* reset direction for the newly placed inner node */
+    node_info_t * node_info = (node_info_t *)(inner_node->next->next->data);
+    node_info->clv_valid = 0;
+
+    /* restore tree to its state before placing the tip (and inner) node */
+    utree_link(edge_list[i], d);
+    inner_node->back = NULL;
+    inner_node->next->back = NULL;
+    inner_node->next->next->back = NULL;
+    tip_node->back = NULL;
+  }
+
+  /* perform the placement yielding the lowest cost */
+  utree_edgesplit(edge_list[best_index], inner_node, inner_node->next); 
+  utree_link(inner_node->next->next, tip_node);
+
+  return min_cost;
+}
+
+static void invalidate_node(pll_unode_t * node)
+{
+  node_info_t * info;
+
+  info = (node_info_t *)(node->data);
+  info->clv_valid = 0;
+  info = (node_info_t *)(node->next->data);
+  info->clv_valid = 0;
+  info = (node_info_t *)(node->next->next->data);
+  info->clv_valid = 0;
+}
+
+PLL_EXPORT pll_utree_t * pll_fastparsimony_stepwise(pll_parsimony_t ** list,
+                                                    char * const * labels,
+                                                    unsigned int * cost,
+                                                    unsigned int count,
+                                                    unsigned int seed)
+{
+  unsigned int i,j;
+
+  unsigned int tips_count = list[0]->tips;
+  unsigned int inner_nodes = list[0]->inner_nodes;
+
+  if (tips_count < 3)
+  {
+    pll_errno = PLL_ERROR_STEPWISE_TIPS;
+    snprintf(pll_errmsg, 200,
+             "Stepwise parsimony requires at least three tips.");
+    return NULL;
+  }
+
+  //if (tips_count != inner_nodes + 2)
+  if (inner_nodes < tips_count-2)
+  {
+    pll_errno = PLL_ERROR_STEPWISE_UNSUPPORTED;
+    snprintf(pll_errmsg, 200,
+             "Stepwise parsimony currently supports only unrooted trees.");
+    return NULL;
+  }
+
+  *cost = ~0u;
+
+
+  pll_unode_t * root;
+
+  /* check that all parsimony structures have the same number of tips and
+     inner nodes */
+
+  for (i = 1; i < count; ++i)
+  {
+    if ((list[i]->tips != tips_count) ||
+        (list[i]->inner_nodes != inner_nodes))
+    {
+      pll_errno = PLL_ERROR_STEPWISE_STRUCT;
+      snprintf(pll_errmsg, 200,
+               "Parsimony structures tips/inner nodes not equal.");
+      return NULL;
+    }
+  }
+    
+
+  /* 1. Make all allocations at the beginning and check everything was
+        allocated, otherwise return an error */
+
+  travbuffer = (pll_unode_t **)malloc((2*tips_count-2) * sizeof(pll_unode_t *));
+
+  root = utree_inner_create(2*tips_count-3);
+
+  /* allocate parsimony operations container */
+  parsops = (pll_pars_buildop_t *)malloc((tips_count-2)*
+                                         sizeof(pll_pars_buildop_t));
+
+  /* create tip node list with a terminating NULL element */
+  pll_unode_t ** tip_node_list = (pll_unode_t **)calloc(tips_count+1,
+                                                        sizeof(pll_unode_t *));
+
+  /* create inner node list for (tips_count - 3) inner nodes (root was already
+     created, and leave the last slot NULL for termination */
+  pll_unode_t ** inner_node_list = (pll_unode_t **)calloc(tips_count - 2,
+                                                          sizeof(pll_unode_t *));
+
+  if (!inner_node_list || !parsops || !tip_node_list || !root || !travbuffer)
+  {
+    pll_utree_graph_destroy(root,NULL);
+    free(parsops);
+    free(inner_node_list);
+    free(tip_node_list);
+    free(travbuffer);
+
+    pll_errno = PLL_ERROR_MEM_ALLOC;
+    snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+    return NULL;
+  }
+
+  /* allocate all inner nodes */
+  for (i=0; i<tips_count-3; ++i)
+  {
+    inner_node_list[i] = utree_inner_create(i+tips_count);
+    if (!inner_node_list[i])
+    {
+      pll_utree_graph_destroy(root,NULL);
+      free(parsops);
+      free(tip_node_list);
+      free(travbuffer);
+      for (j = 0; j < i; ++j)
+        pll_utree_graph_destroy(inner_node_list[j],NULL);
+      free(inner_node_list);
+
+      pll_errno = PLL_ERROR_MEM_ALLOC;
+      snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+      return NULL;
+    }
+  }
+
+  /* shuffle the order of iterating tip sequences */
+  unsigned int * order = create_shuffled(tips_count,seed);
+  if (!order) return NULL;
+
+  /* allocate all tips */
+  for (i=0; i<tips_count; ++i)
+  {
+    unsigned int index = order[i];
+    tip_node_list[i] = utree_tip_create(index);
+    if (tip_node_list[i])
+      tip_node_list[i]->label = xstrdup(labels[index]);
+
+    if (!tip_node_list[i] || !tip_node_list[i]->label)
+    {
+      free(tip_node_list[i]); 
+
+      pll_utree_graph_destroy(root,NULL);
+      free(parsops);
+      free(inner_node_list);
+      free(travbuffer);
+      for (j = 0; j < i; ++j)
+        pll_utree_graph_destroy(tip_node_list[j],NULL);
+      free(tip_node_list);
+
+      pll_errno = PLL_ERROR_MEM_ALLOC;
+      snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
+      return NULL;
+
+    }
+  }
+  free(order);
+
+  /* 2. Create the following topology with three leaves
+          
+            *
+           /
+      *---*
+           \
+            *
+  
+  */
+
+  /* place first three tips */
+  utree_link(root, tip_node_list[0]);
+  utree_link(root->next, tip_node_list[1]);
+  utree_link(root->next->next, tip_node_list[2]);
+
+  /* available placements */
+  pll_unode_t ** edge_list = (pll_unode_t **)calloc(2*tips_count-3,
+                                                    sizeof(pll_unode_t *));
+  edge_list[0] = root;
+  edge_list[1] = root->next;
+  edge_list[2] = root->next->next;
+
+  /* 3. The stepwise parsimony. Current topology is the tree with three leaves,
+        and repeat the following steps for each remaining tip u:
+         (i) compute the parsimony score of all possible topologies by placing
+             u at every possible edge of the current tree topology.
+        (ii) set current toplogy as the tree with the smallest parsimony score
+  */
+
+  if (tips_count > 3)
+  {
+    unsigned int edge_count = 3;
+    
+    for (i = 3; i < tips_count; ++i)
+    {
+      /* printf("%d -- adding %s\n", i, tip_node_list[i]->label); */
+      *cost = utree_iterate(list,
+                            edge_list,
+                            inner_node_list[i-3],
+                            tip_node_list[i],
+                            edge_count,
+                            count);
+
+      /* reset traversal such that parsimony vectors are re-computed */
+      for (j = 0; j < i-2; ++j)
+        invalidate_node(inner_node_list[j]);
+      invalidate_node(root);
+
+      /* after adding a leaf, we have two new edges */
+      edge_count += 2;
+    }
+  }
+  else
+  {
+    *cost = 0;
+    for (i = 0; i < count; ++i)
+      *cost += list[i]->const_cost;
+  }
+
+  /* delete data elements */
+  for (i = 0; i < tips_count-3; ++i)
+    dealloc_data(inner_node_list[i]);
+  dealloc_data(root);
+
+  /* deallocate auxiliary arrays */
+  free(inner_node_list);
+  free(tip_node_list);
+  free(edge_list);
+  free(travbuffer);
+  free(parsops);
+
+  /* wrap tree */
+  pll_utree_t * tree = pll_utree_wraptree(root,tips_count);
+
+  return tree;
+}
diff --git a/src/utree.c b/src/utree.c
index e107789..4dc2f68 100644
--- a/src/utree.c
+++ b/src/utree.c
@@ -23,18 +23,18 @@
 
 static int indent_space = 4;
 
-static void print_node_info(pll_utree_t * tree, int options)
+static void print_node_info(const pll_unode_t * node, int options)
 {
   if (options & PLL_UTREE_SHOW_LABEL)
-    printf (" %s", tree->label);
+    printf (" %s", node->label);
   if (options & PLL_UTREE_SHOW_BRANCH_LENGTH)
-    printf (" %f", tree->length);
+    printf (" %f", node->length);
   if (options & PLL_UTREE_SHOW_CLV_INDEX)
-    printf (" %d", tree->clv_index);
+    printf (" %d", node->clv_index);
   if (options & PLL_UTREE_SHOW_SCALER_INDEX)
-    printf (" %d", tree->scaler_index);
+    printf (" %d", node->scaler_index);
   if (options & PLL_UTREE_SHOW_PMATRIX_INDEX)
-    printf (" %d", tree->pmatrix_index);
+    printf (" %d", node->pmatrix_index);
   printf("\n");
 }
 
@@ -51,14 +51,14 @@ static char * xstrdup(const char * s)
   return strcpy(p,s);
 }
 
-static void print_tree_recurse(pll_utree_t * tree,
+static void print_tree_recurse(pll_unode_t * node,
                                int indent_level,
                                int * active_node_order,
                                int options)
 {
   int i,j;
 
-  if (!tree) return;
+  if (!node) return;
 
   for (i = 0; i < indent_level; ++i)
   {
@@ -86,22 +86,22 @@ static void print_tree_recurse(pll_utree_t * tree,
   printf("+");
   for (j = 0; j < indent_space-1; ++j)
     printf ("-");
-  if (tree->next) printf("+");
+  if (node->next) printf("+");
 
-  print_node_info(tree, options);
+  print_node_info(node, options);
 
   if (active_node_order[indent_level-1] == 2)
     active_node_order[indent_level-1] = 0;
 
-  if (tree->next)
+  if (node->next)
   {
     active_node_order[indent_level] = 1;
-    print_tree_recurse(tree->next->back,
+    print_tree_recurse(node->next->back,
                        indent_level+1,
                        active_node_order,
                        options);
     active_node_order[indent_level] = 2;
-    print_tree_recurse(tree->next->next->back,
+    print_tree_recurse(node->next->next->back,
                        indent_level+1,
                        active_node_order,
                        options);
@@ -109,24 +109,24 @@ static void print_tree_recurse(pll_utree_t * tree,
 
 }
 
-static unsigned int tree_indent_level(pll_utree_t * tree, unsigned int indent)
+static unsigned int tree_indent_level(const pll_unode_t * node, unsigned int indent)
 {
-  if (!tree->next) return indent+1;
+  if (!node->next) return indent+1;
 
-  unsigned int a = tree_indent_level(tree->next->back,       indent+1);
-  unsigned int b = tree_indent_level(tree->next->next->back, indent+1);
+  unsigned int a = tree_indent_level(node->next->back,       indent+1);
+  unsigned int b = tree_indent_level(node->next->next->back, indent+1);
 
   return (a > b ? a : b);
 }
 
-PLL_EXPORT void pll_utree_show_ascii(pll_utree_t * tree, int options)
+PLL_EXPORT void pll_utree_show_ascii(const pll_unode_t * root, int options)
 {
   unsigned int a, b;
 
-  if (!tree->next) tree=tree->back;
+  if (!root->next) root=root->back;
 
-  a = tree_indent_level(tree->back,1);
-  b = tree_indent_level(tree,0);
+  a = tree_indent_level(root->back,1);
+  b = tree_indent_level(root,0);
   unsigned int max_indent_level = (a > b ? a : b);
 
   int * active_node_order = (int *)malloc((max_indent_level+1) * sizeof(int));
@@ -139,30 +139,41 @@ PLL_EXPORT void pll_utree_show_ascii(pll_utree_t * tree, int options)
   active_node_order[0] = 1;
   active_node_order[1] = 1;
 
-  print_tree_recurse(tree->back,             1, active_node_order, options);
-  print_tree_recurse(tree->next->back,       1, active_node_order, options);
+  print_tree_recurse(root->back,       1, active_node_order, options);
+  print_tree_recurse(root->next->back, 1, active_node_order, options);
   active_node_order[0] = 2;
-  print_tree_recurse(tree->next->next->back, 1, active_node_order, options);
+  print_tree_recurse(root->next->next->back, 1, active_node_order, options);
   free(active_node_order);
 }
 
-static char * newick_utree_recurse(pll_utree_t * root)
+static char * newick_utree_recurse(const pll_unode_t * root,
+                                   char * (*cb_serialize)(const pll_unode_t *))
 {
   char * newick;
   int size_alloced;
   assert(root != NULL);
   if (!root->next)
-    size_alloced = asprintf(&newick, "%s:%f", root->label, root->length);
+  {
+    if (cb_serialize)
+    {
+      newick = cb_serialize(root);
+      size_alloced = strlen(newick);
+    }
+    else
+    {
+      size_alloced = asprintf(&newick, "%s:%f", root->label, root->length);
+    }
+  }
   else
   {
-    char * subtree1 = newick_utree_recurse(root->next->back);
+    char * subtree1 = newick_utree_recurse(root->next->back,cb_serialize);
     if (subtree1 == NULL)
     {
       pll_errno = PLL_ERROR_MEM_ALLOC;
       snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
       return NULL;
     }
-    char * subtree2 = newick_utree_recurse(root->next->next->back);
+    char * subtree2 = newick_utree_recurse(root->next->next->back,cb_serialize);
     if (subtree2 == NULL)
     {
       free(subtree1);
@@ -170,12 +181,26 @@ static char * newick_utree_recurse(pll_utree_t * root)
       snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
       return NULL;
     }
-    size_alloced = asprintf(&newick,
-                            "(%s,%s)%s:%f",
-                            subtree1,
-                            subtree2,
-                            root->label ? root->label : "",
-                            root->length);
+
+    if (cb_serialize)
+    {
+      char * temp = cb_serialize(root);
+      size_alloced = asprintf(&newick,
+                              "(%s,%s)%s",
+                              subtree1,
+                              subtree2,
+                              temp);
+      free(temp);
+    }
+    else
+    {
+      size_alloced = asprintf(&newick,
+                              "(%s,%s)%s:%f",
+                              subtree1,
+                              subtree2,
+                              root->label ? root->label : "",
+                              root->length);
+    }
     free(subtree1);
     free(subtree2);
   }
@@ -189,7 +214,8 @@ static char * newick_utree_recurse(pll_utree_t * root)
   return newick;
 }
 
-PLL_EXPORT char * pll_utree_export_newick(pll_utree_t * root)
+PLL_EXPORT char * pll_utree_export_newick(const pll_unode_t * root,
+                                   char * (*cb_serialize)(const pll_unode_t *))
 {
   char * newick;
   int size_alloced;
@@ -197,14 +223,14 @@ PLL_EXPORT char * pll_utree_export_newick(pll_utree_t * root)
 
   if (!root->next) root=root->back;
 
-  char * subtree1 = newick_utree_recurse(root->back);
+  char * subtree1 = newick_utree_recurse(root->back,cb_serialize);
   if (subtree1 == NULL)
   {
     pll_errno = PLL_ERROR_MEM_ALLOC;
     snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
     return NULL;
   }
-  char * subtree2 = newick_utree_recurse(root->next->back);
+  char * subtree2 = newick_utree_recurse(root->next->back,cb_serialize);
   if (subtree2 == NULL)
   {
     free(subtree1);
@@ -212,7 +238,7 @@ PLL_EXPORT char * pll_utree_export_newick(pll_utree_t * root)
     snprintf(pll_errmsg, 200, "Unable to allocate enough memory.");
     return NULL;
   }
-  char * subtree3 = newick_utree_recurse(root->next->next->back);
+  char * subtree3 = newick_utree_recurse(root->next->next->back,cb_serialize);
   if (subtree3 == NULL)
   {
     free(subtree1);
@@ -222,12 +248,26 @@ PLL_EXPORT char * pll_utree_export_newick(pll_utree_t * root)
     return NULL;
   }
 
-  size_alloced = asprintf(&newick,
-                          "(%s,%s,%s)%s:0.0;",
-                          subtree1,
-                          subtree2,
-                          subtree3,
-                          root->label ? root->label : "");
+  if (cb_serialize)
+  {
+    char * temp = cb_serialize(root);
+    size_alloced = asprintf(&newick,
+                            "(%s,%s,%s)%s",
+                            subtree1,
+                            subtree2,
+                            subtree3,
+                            temp);
+    free(temp);
+  }
+  else
+  {
+    size_alloced = asprintf(&newick,
+                            "(%s,%s,%s)%s:0.0;",
+                            subtree1,
+                            subtree2,
+                            subtree3,
+                            root->label ? root->label : "");
+  }  
   free(subtree1);
   free(subtree2);
   free(subtree3);
@@ -241,7 +281,7 @@ PLL_EXPORT char * pll_utree_export_newick(pll_utree_t * root)
   return (newick);
 }
 
-PLL_EXPORT void pll_utree_create_operations(pll_utree_t ** trav_buffer,
+PLL_EXPORT void pll_utree_create_operations(pll_unode_t * const* trav_buffer,
                                             unsigned int trav_buffer_size,
                                             double * branches,
                                             unsigned int * pmatrix_indices,
@@ -249,7 +289,7 @@ PLL_EXPORT void pll_utree_create_operations(pll_utree_t ** trav_buffer,
                                             unsigned int * matrix_count,
                                             unsigned int * ops_count)
 {
-  pll_utree_t * node;
+  const pll_unode_t * node;
   unsigned int i;
 
   *ops_count = 0;
@@ -288,30 +328,34 @@ PLL_EXPORT void pll_utree_create_operations(pll_utree_t ** trav_buffer,
   }
 }
 
-static int utree_every_recursive(pll_utree_t * node,
-                                 int (*cb)(pll_utree_t *))
+PLL_EXPORT int pll_utree_every(pll_utree_t * tree,
+                               int (*cb)(pll_unode_t *))
 {
-  if (!node->next)
-    return cb(node);
+  unsigned int i;
+  int rc = 1;
 
-  if (!cb(node))
-    return 0;
+  for (i = 0; i < tree->tip_count + tree->inner_count; ++i)
+    rc &= cb(tree->nodes[i]);
 
-  return (utree_every_recursive(node->next->back,cb) &&
-          utree_every_recursive(node->next->next->back,cb));
+  return (rc ? PLL_SUCCESS : PLL_FAILURE);
 }
 
-PLL_EXPORT int pll_utree_every(pll_utree_t * node,
-                               int (*cb)(pll_utree_t *))
+PLL_EXPORT int pll_utree_every_const(const pll_utree_t * tree,
+                                     int (*cb)(const pll_unode_t *))
 {
-  return (utree_every_recursive(node,cb) &&
-          utree_every_recursive(node->back,cb));
+  unsigned int i;
+  int rc = 1;
+
+  for (i = 0; i < tree->tip_count + tree->inner_count; ++i)
+    rc &= cb(tree->nodes[i]);
+
+  return (rc ? PLL_SUCCESS : PLL_FAILURE);
 }
 
-static void utree_traverse(pll_utree_t * node,
-                           int (*cbtrav)(pll_utree_t *),
-                           unsigned int * index,
-                           pll_utree_t ** outbuffer)
+static void utree_traverse_preorder(pll_unode_t * node,
+                                    int (*cbtrav)(pll_unode_t *),
+                                    unsigned int * index,
+                                    pll_unode_t ** outbuffer)
 {
   if (!node->next)
   {
@@ -324,39 +368,80 @@ static void utree_traverse(pll_utree_t * node,
   }
   if (!cbtrav(node))
     return;
-  utree_traverse(node->next->back, cbtrav, index, outbuffer);
 
-  utree_traverse(node->next->next->back, cbtrav, index, outbuffer);
+  outbuffer[*index] = node;
+  *index = *index + 1;
+
+  utree_traverse_preorder(node->next->back, cbtrav, index, outbuffer);
+  utree_traverse_preorder(node->next->next->back, cbtrav, index, outbuffer);
+}
+
+static void utree_traverse_postorder(pll_unode_t * node,
+                                     int (*cbtrav)(pll_unode_t *),
+                                     unsigned int * index,
+                                     pll_unode_t ** outbuffer)
+{
+  if (!node->next)
+  {
+    if (cbtrav(node))
+    {
+      outbuffer[*index] = node;
+      *index = *index + 1;
+    }
+    return;
+  }
+  if (!cbtrav(node))
+    return;
+
+  utree_traverse_postorder(node->next->back, cbtrav, index, outbuffer);
+  utree_traverse_postorder(node->next->next->back, cbtrav, index, outbuffer);
 
   outbuffer[*index] = node;
   *index = *index + 1;
 }
 
-PLL_EXPORT int pll_utree_traverse(pll_utree_t * root,
-                                  int (*cbtrav)(pll_utree_t *),
-                                  pll_utree_t ** outbuffer,
+PLL_EXPORT int pll_utree_traverse(pll_unode_t * root,
+                                  int traversal,
+                                  int (*cbtrav)(pll_unode_t *),
+                                  pll_unode_t ** outbuffer,
                                   unsigned int * trav_size)
 {
   *trav_size = 0;
   if (!root->next) return PLL_FAILURE;
 
-  /* we will traverse an unrooted tree in the following way
+  if (traversal == PLL_TREE_TRAVERSE_POSTORDER)
+  {
 
-              2
-            /
-      1  --*
-            \
-              3
+    /* we will traverse an unrooted tree in the following way
 
-     at each node the callback function is called to decide whether we
-     are going to traversing the subtree rooted at the specific node */
+                2
+              /
+        1  --*
+              \
+                3
 
-  utree_traverse(root->back, cbtrav, trav_size, outbuffer);
-  utree_traverse(root, cbtrav, trav_size, outbuffer);
+       at each node the callback function is called to decide whether we
+       are going to traversing the subtree rooted at the specific node */
+
+    utree_traverse_postorder(root->back, cbtrav, trav_size, outbuffer);
+    utree_traverse_postorder(root, cbtrav, trav_size, outbuffer);
+  }
+  else if (traversal == PLL_TREE_TRAVERSE_PREORDER)
+  {
+    utree_traverse_preorder(root->back, cbtrav, trav_size, outbuffer);
+    utree_traverse_preorder(root, cbtrav, trav_size, outbuffer);
+  }
+  else
+  {
+    snprintf(pll_errmsg, 200, "Invalid traversal value.");
+    pll_errno = PLL_ERROR_PARAM_INVALID;
+    return PLL_FAILURE;
+  }
 
   return PLL_SUCCESS;
 }
 
+#if 0
 static void utree_query_tipnodes_recursive(pll_utree_t * node,
                                            pll_utree_t ** node_list,
                                            unsigned int * index)
@@ -422,9 +507,10 @@ PLL_EXPORT unsigned int pll_utree_query_innernodes(pll_utree_t * root,
 
   return index;
 }
+#endif
 
 /* a callback function for checking tree integrity */
-static int cb_check_integrity(pll_utree_t * node)
+static int cb_check_integrity(const pll_unode_t * node)
 {
   unsigned int clv_index = node->clv_index;
   int scaler_index = node->scaler_index;
@@ -452,71 +538,81 @@ static int cb_check_integrity(pll_utree_t * node)
   return 1;
 }
 
-PLL_EXPORT int pll_utree_check_integrity(pll_utree_t * root)
+PLL_EXPORT int pll_utree_check_integrity(const pll_utree_t * tree)
 {
-  pll_utree_t * start_node = root->next?root:root->back;
-
-  return pll_utree_every(start_node->back, cb_check_integrity);
+  return pll_utree_every_const(tree, cb_check_integrity);
 }
 
 /* TODO: Memory allocation checks were not implemented in this function!!! */
-static pll_utree_t * clone_node(pll_utree_t * node)
+static pll_unode_t * clone_node(const pll_unode_t * node)
 {
-  pll_utree_t * new = (pll_utree_t *)malloc(sizeof(pll_utree_t));
-  memcpy(new, node, sizeof(pll_utree_t));
+  pll_unode_t * new_node = (pll_unode_t *)malloc(sizeof(pll_unode_t));
+  memcpy(new_node, node, sizeof(pll_unode_t));
 
   if (node->label)
   {
-    new->label = (char *)malloc(strlen(node->label)+1);
-    strcpy(new->label,node->label);
+    new_node->label = (char *)malloc(strlen(node->label)+1);
+    strcpy(new_node->label,node->label);
   }
 
   if (node->next)
   {
-    new->next = (pll_utree_t *)malloc(sizeof(pll_utree_t));
-    memcpy(new->next, node->next, sizeof(pll_utree_t));
+    new_node->next = (pll_unode_t *)malloc(sizeof(pll_unode_t));
+    memcpy(new_node->next, node->next, sizeof(pll_unode_t));
 
-    new->next->next = (pll_utree_t *)malloc(sizeof(pll_utree_t));
-    memcpy(new->next->next, node->next->next, sizeof(pll_utree_t));
+    new_node->next->next = (pll_unode_t *)malloc(sizeof(pll_unode_t));
+    memcpy(new_node->next->next, node->next->next, sizeof(pll_unode_t));
 
-    new->next->next->next = new;
-    new->next->label = new->next->next->label = new->label;
+    new_node->next->next->next = new_node;
+    new_node->next->label = new_node->next->next->label = new_node->label;
   }
-  return new;
+  return new_node;
 }
 
-static void utree_recurse_clone(pll_utree_t * new, pll_utree_t * root)
+static void utree_recurse_clone(pll_unode_t * new_root, const pll_unode_t * root)
 {
   if (root->back)
   {
-    new->back = clone_node(root->back);
-    new->back->back = new;
+    new_root->back = clone_node(root->back);
+    new_root->back->back = new_root;
 
     if (root->back->next)
     {
-      utree_recurse_clone(new->back->next,       root->back->next);
-      utree_recurse_clone(new->back->next->next, root->back->next->next);
+      utree_recurse_clone(new_root->back->next,       root->back->next);
+      utree_recurse_clone(new_root->back->next->next, root->back->next->next);
     }
   }
 }
 
-PLL_EXPORT pll_utree_t * pll_utree_clone(pll_utree_t * root)
+PLL_EXPORT pll_unode_t * pll_utree_graph_clone(const pll_unode_t * root)
 {
-  pll_utree_t * new = clone_node(root);
+  pll_unode_t * new_root = clone_node(root);
 
-  utree_recurse_clone(new, root);
+  utree_recurse_clone(new_root, root);
   if (root->next)
   {
-    utree_recurse_clone(new->next, root->next);
-    utree_recurse_clone(new->next->next, root->next->next);
+    utree_recurse_clone(new_root->next, root->next);
+    utree_recurse_clone(new_root->next->next, root->next->next);
   }
 
-  return new;
+  return new_root;
+}
+
+PLL_EXPORT pll_utree_t * pll_utree_clone(const pll_utree_t * tree)
+{
+  unsigned int root_index = tree->inner_count + tree->tip_count - 1;
+
+  /* choose the last inner node as the starting point of the clone. It does not
+     really matter which node to choose, but since the newick parser places the
+     root node at the end of the list, we use the same notation here */
+  pll_unode_t * root = pll_utree_graph_clone(tree->nodes[root_index]);
+
+  return pll_utree_wraptree(root, tree->tip_count);
 }
 
-static pll_utree_t * rtree_unroot(pll_rtree_t * root, pll_utree_t * back)
+static pll_unode_t * rtree_unroot(pll_rnode_t * root, pll_unode_t * back)
 {
-  pll_utree_t * uroot = (void *)calloc(1,sizeof(pll_utree_t));
+  pll_unode_t * uroot = (void *)calloc(1,sizeof(pll_unode_t));
   if (!uroot)
   {
     pll_errno = PLL_ERROR_MEM_ALLOC;
@@ -534,7 +630,7 @@ static pll_utree_t * rtree_unroot(pll_rtree_t * root, pll_utree_t * back)
     return uroot;
   }
 
-  uroot->next = (void *)calloc(1,sizeof(pll_utree_t));
+  uroot->next = (void *)calloc(1,sizeof(pll_unode_t));
   if (!uroot->next)
   {
     free(uroot);
@@ -543,7 +639,7 @@ static pll_utree_t * rtree_unroot(pll_rtree_t * root, pll_utree_t * back)
     return NULL;
   }
 
-  uroot->next->next = (void *)calloc(1,sizeof(pll_utree_t));
+  uroot->next->next = (void *)calloc(1,sizeof(pll_unode_t));
   if (!uroot->next->next)
   {
     free(uroot->next);
@@ -563,8 +659,10 @@ static pll_utree_t * rtree_unroot(pll_rtree_t * root, pll_utree_t * back)
   return uroot;
 }
 
-PLL_EXPORT pll_utree_t * pll_rtree_unroot(pll_rtree_t * root)
+PLL_EXPORT pll_utree_t * pll_rtree_unroot(pll_rtree_t * tree)
 {
+  pll_rnode_t * root = tree->root;
+
   if (!root->left->left && !root->right->left)
   {
     pll_errno = PLL_ERROR_TREE_CONVERSION;
@@ -574,9 +672,9 @@ PLL_EXPORT pll_utree_t * pll_rtree_unroot(pll_rtree_t * root)
     return NULL;
   }
 
-  pll_rtree_t * new_root;
+  pll_rnode_t * new_root;
 
-  pll_utree_t * uroot = (void *)calloc(1,sizeof(pll_utree_t));
+  pll_unode_t * uroot = (void *)calloc(1,sizeof(pll_unode_t));
   if (!uroot)
   {
     pll_errno = PLL_ERROR_MEM_ALLOC;
@@ -584,7 +682,7 @@ PLL_EXPORT pll_utree_t * pll_rtree_unroot(pll_rtree_t * root)
     return NULL;
   }
 
-  uroot->next = (void *)calloc(1,sizeof(pll_utree_t));
+  uroot->next = (void *)calloc(1,sizeof(pll_unode_t));
   if (!uroot->next)
   {
     free(uroot);
@@ -593,7 +691,7 @@ PLL_EXPORT pll_utree_t * pll_rtree_unroot(pll_rtree_t * root)
     return NULL;
   }
 
-  uroot->next->next = (void *)calloc(1,sizeof(pll_utree_t));
+  uroot->next->next = (void *)calloc(1,sizeof(pll_unode_t));
   if (!uroot->next->next)
   {
     free(uroot->next);
@@ -636,5 +734,30 @@ PLL_EXPORT pll_utree_t * pll_rtree_unroot(pll_rtree_t * root)
   /* TODO: Need to clean uroot in case of error*/
   if (!uroot->next->next->back) return NULL;
 
-  return uroot;
+  return pll_utree_wraptree(uroot,0);
+}
+
+PLL_EXPORT void pll_utree_create_pars_buildops(pll_unode_t * const* trav_buffer,
+                                               unsigned int trav_buffer_size,
+                                               pll_pars_buildop_t * ops,
+                                               unsigned int * ops_count)
+{
+  const pll_unode_t * node;
+  unsigned int i;
+
+  *ops_count = 0;
+
+  for (i = 0; i < trav_buffer_size; ++i)
+  {
+    node = trav_buffer[i];
+
+    if (node->next)
+    {
+      ops[*ops_count].parent_score_index = node->clv_index;
+      ops[*ops_count].child1_score_index = node->next->back->clv_index;
+      ops[*ops_count].child2_score_index = node->next->next->back->clv_index;
+
+      *ops_count = *ops_count + 1;
+    }
+  }
 }
diff --git a/src/utree_moves.c b/src/utree_moves.c
index 9c946a9..33c5beb 100644
--- a/src/utree_moves.c
+++ b/src/utree_moves.c
@@ -21,7 +21,7 @@
 
 #include "pll.h"
 
-static int utree_find(pll_utree_t * start, pll_utree_t * target)
+static int utree_find(pll_unode_t * start, pll_unode_t * target)
 {
   /* checks whether the subtree rooted at 'start' (in the direction of
      start->next and start->next->next) contains the node 'target' */
@@ -44,8 +44,8 @@ static int utree_find(pll_utree_t * start, pll_utree_t * target)
   return 0;
 }
 
-static void utree_link(pll_utree_t * a,
-                       pll_utree_t * b,
+static void utree_link(pll_unode_t * a,
+                       pll_unode_t * b,
                        double length,
                        unsigned int pmatrix_index)
 {
@@ -57,24 +57,24 @@ static void utree_link(pll_utree_t * a,
   a->pmatrix_index = b->pmatrix_index = pmatrix_index;
 }
 
-static void utree_swap(pll_utree_t * t1, pll_utree_t * t2)
+static void utree_swap(pll_unode_t * t1, pll_unode_t * t2)
 {
   /* swaps the positions of trees t1 and t2. The two trees retain the branch
   lengths from their root to their respective parent nodes, and retain their
   pmatrix indices (i.e. no updating of pmatrices is required) */
 
-  pll_utree_t * temp = t1->back;
+  pll_unode_t * temp = t1->back;
 
   utree_link(t1, t2->back, t2->back->length, t2->back->pmatrix_index);
   utree_link(t2, temp, temp->length, temp->pmatrix_index);
 }
 
-PLL_EXPORT int pll_utree_nni(pll_utree_t * p,
+PLL_EXPORT int pll_utree_nni(pll_unode_t * p,
                              int type,
                              pll_utree_rb_t * rb)
 {
-  pll_utree_t * subtree1;
-  pll_utree_t * subtree2;
+  pll_unode_t * subtree1;
+  pll_unode_t * subtree2;
 
   if ((type != PLL_UTREE_MOVE_NNI_LEFT) && (type != PLL_UTREE_MOVE_NNI_RIGHT))
   {
@@ -116,8 +116,8 @@ static int utree_nni_rollback(pll_utree_rb_t * rb)
                        NULL);
 }
 
-PLL_EXPORT int pll_utree_spr(pll_utree_t * p,
-                             pll_utree_t * r,
+PLL_EXPORT int pll_utree_spr(pll_unode_t * p,
+                             pll_unode_t * r,
                              pll_utree_rb_t * rb,
                              double * branch_lengths,
                              unsigned int * matrix_indices)
@@ -202,8 +202,8 @@ PLL_EXPORT int pll_utree_spr(pll_utree_t * p,
   }
 
   /* (b) connect u and v */
-  pll_utree_t * u = p->next->back;
-  pll_utree_t * v = p->next->next->back;
+  pll_unode_t * u = p->next->back;
+  pll_unode_t * v = p->next->next->back;
   utree_link(u,
              v,
              u->length + v->length,
@@ -304,8 +304,8 @@ static int utree_spr_rollback(pll_utree_rb_t * rb,
 /* this is a safer (but slower) function for performing an spr move, than
    pll_utree_spr(). See the last paragraph in the comments section of the
    pll_utree_spr() function for more details */
-PLL_EXPORT int pll_utree_spr_safe(pll_utree_t * p,
-                                  pll_utree_t * r,
+PLL_EXPORT int pll_utree_spr_safe(pll_unode_t * p,
+                                  pll_unode_t * r,
                                   pll_utree_rb_t * rb,
                                   double * branch_lengths,
                                   unsigned int * matrix_indices)
diff --git a/src/utree_svg.c b/src/utree_svg.c
index 8f7a3b2..4637421 100644
--- a/src/utree_svg.c
+++ b/src/utree_svg.c
@@ -38,45 +38,6 @@ typedef struct pll_svg_aux_s
   double max_tree_len;
 } pll_svg_aux_t;
 
-static void data_destroy_recursive(pll_utree_t * node)
-{
-  if (!node->next)
-  {
-    if (node->data)
-    {
-      free(node->data);
-      node->data = NULL;
-    }
-    return;
-  }
-
-  data_destroy_recursive(node->next->back);
-  data_destroy_recursive(node->next->next->back);
-
-  if (node->data)
-  {
-    free(node->data);
-    node->data = NULL;
-  }
-}
-
-static void data_destroy(pll_utree_t * root)
-{
-  if (!root) return;
-  if (!root->next)
-  {
-    if (root->data)
-    {
-      free(root->data);
-      root->data = NULL;
-    }
-    return;
-  }
-
-  data_destroy_recursive(root->back);
-  data_destroy_recursive(root);
-}
-
 static pll_svg_data_t * create_data(int height, double x, double y)
 {
   pll_svg_data_t * data = (pll_svg_data_t *)malloc(sizeof(pll_svg_data_t));
@@ -89,7 +50,7 @@ static pll_svg_data_t * create_data(int height, double x, double y)
   return data;
 }
 
-static int utree_height_recursive(pll_utree_t * node)
+static int utree_height_recursive(pll_unode_t * node)
 {
   if (!node->next)
   {
@@ -116,7 +77,7 @@ static int utree_height_recursive(pll_utree_t * node)
   return 1;
 }
 
-static int utree_set_height(pll_utree_t * root)
+static int utree_set_height(pll_unode_t * root)
 {
   if (!root->next) return PLL_FAILURE;
 
@@ -152,11 +113,11 @@ static void draw_circle(FILE * fp, double cx, double cy, double r)
           cx, cy, r);
 }
 
-static void utree_set_offset(pll_utree_t * node,
+static void utree_set_offset(pll_unode_t * node,
                              const pll_svg_attrib_t * attr,
                              const pll_svg_aux_t * aux)
 {
-  pll_utree_t * parent = NULL;
+  pll_unode_t * parent = NULL;
 
   /* scale node's branch length (edge towards parent) */
   pll_svg_data_t * data = (pll_svg_data_t *)(node->data);
@@ -188,13 +149,13 @@ static void utree_set_offset(pll_utree_t * node,
 }
 
 static void utree_plot(FILE * fp,
-                       pll_utree_t * node,
+                       pll_unode_t * node,
                        const pll_svg_attrib_t * attr,
                        pll_svg_aux_t * aux)
 {
   double y;
 //  static int tip_occ = 0;
-  pll_utree_t * parent = NULL;
+  pll_unode_t * parent = NULL;
 
   pll_svg_data_t * data = (pll_svg_data_t *)(node->data);
   pll_svg_data_t * parent_data = (pll_svg_data_t *)(node->back->data);
@@ -276,23 +237,17 @@ static void utree_plot(FILE * fp,
 
 static void utree_scaler_init(const pll_svg_attrib_t * attr,
                               pll_svg_aux_t * aux,
-                              pll_utree_t * root,
-                              unsigned int tip_count)
+                              pll_utree_t * tree)
 {
   unsigned int i;
   double len = 0;
   double label_len;
 
-  pll_utree_t ** node_list = (pll_utree_t **)malloc((size_t)tip_count *
-                                                    sizeof(pll_utree_t *));
-
-  pll_utree_query_tipnodes(root, node_list);
-
   /* compute the length of all tip-to-root paths and store the longest one in
      max_tree_len */
-  for (i = 0; i < tip_count; ++i)
+  for (i = 0; i < tree->tip_count; ++i)
   {
-    pll_utree_t * node = node_list[i];
+    pll_unode_t * node = tree->nodes[i];
 
     len = node->length;
     node = node->back;
@@ -316,7 +271,7 @@ static void utree_scaler_init(const pll_svg_attrib_t * attr,
       aux->max_tree_len = len;
 
     label_len = (attr->font_size / 1.5) * 
-                (node_list[i]->label ? strlen(node_list[i]->label) : 0);
+                (tree->nodes[i]->label ? strlen(tree->nodes[i]->label) : 0);
 
     len = (aux->canvas_width - label_len) / len;
     if (i == 0)
@@ -331,14 +286,12 @@ static void utree_scaler_init(const pll_svg_attrib_t * attr,
         aux->max_font_len = label_len;
       }
   }
-  free(node_list);
 }
 
 static void print_header(FILE * fp,
-                         pll_utree_t * root,
+                         pll_utree_t * tree,
                          const pll_svg_attrib_t * attr,
-                         pll_svg_aux_t * aux,
-                         unsigned int tip_count)
+                         pll_svg_aux_t * aux)
 {
   long svg_height;
 
@@ -346,10 +299,10 @@ static void print_header(FILE * fp,
 
   /* initialize pixel scaler (scaler) and compute max tree 
      length (max_tree_len) */
-  utree_scaler_init(attr, aux, root, tip_count);
+  utree_scaler_init(attr, aux, tree);
 
   svg_height = attr->margin_top + attr->legend_spacing + attr->margin_bottom + 
-               attr->tip_spacing * tip_count;
+               attr->tip_spacing * tree->tip_count;
 
   /* print svg header tag with dimensions and grey border */
   fprintf(fp, "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"%ld\" "
@@ -393,8 +346,8 @@ static void print_header(FILE * fp,
 }
 
 static void svg_make(FILE * fp,
-                     pll_utree_t * root,
-                     unsigned int tip_count,
+                     pll_utree_t * tree,
+                     pll_unode_t * root,
                      const pll_svg_attrib_t * attr)
 {
 
@@ -406,7 +359,7 @@ static void svg_make(FILE * fp,
   aux.tip_occ = 0;
 
   /* print SVG header */
-  print_header(fp,root,attr,&aux,tip_count);
+  print_header(fp,tree,attr,&aux);
 
   /* compute position for each node */
   utree_set_offset(root,attr,&aux);
@@ -449,40 +402,61 @@ PLL_EXPORT void pll_svg_attrib_destroy(pll_svg_attrib_t * attrib)
 }
 
 PLL_EXPORT int pll_utree_export_svg(pll_utree_t * tree,
-                                    unsigned int tip_count,
+                                    pll_unode_t * root,
                                     const pll_svg_attrib_t * attribs,
                                     const char * filename)
 {
+  unsigned int i;
+
   /* clone the tree */
-  pll_utree_t * cloned = pll_utree_clone(tree);
-  if (!cloned)
-    return PLL_FAILURE;
+  int rc = PLL_SUCCESS;
 
-  /* treat unrooted tree as rooted binary with a ternary root
-     and compute the height of each node */
-  if (!utree_set_height(cloned))
-  {
-    pll_utree_destroy(cloned);
+  if (!root || !(root->next))
     return PLL_FAILURE;
-  }
 
   /* open output file for writing */
   FILE * fp = fopen(filename, "w");
   if (!fp)
   {
-    pll_utree_destroy(cloned);
     return PLL_FAILURE;
   }
 
-  /* create the svg */
-  svg_make(fp, cloned, tip_count, attribs);
 
-  /* destroy data element from nodes in the cloned tree, and deallocate
-     the tree */
-  data_destroy(cloned);
-  pll_utree_destroy(cloned);
+  /* backup data */
+  void ** data_old = (void **)malloc((tree->tip_count+tree->inner_count) *
+                                      sizeof(void *));
+  if (!data_old)
+  {
+    return PLL_FAILURE;
+  }
+
+  /* copy old data */
+  for (i = 0; i < tree->tip_count+tree->inner_count; ++i)
+  {
+    data_old[i] = tree->nodes[i]->data;
+    tree->nodes[i]->data = NULL;
+  }
+
+
+  /* treat unrooted tree as rooted binary with a ternary root
+     and compute the height of each node */
+  //if (!utree_set_height(cloned))
+  if (!utree_set_height(root))
+    rc = PLL_FAILURE;
+  else
+    svg_make(fp, tree, root, attribs);
 
   fclose(fp);
 
-  return PLL_SUCCESS;
+  /* restore old data */
+  for (i = 0; i < tree->tip_count+tree->inner_count; ++i)
+  {
+    if (tree->nodes[i]->data)
+      free(tree->nodes[i]->data);
+    tree->nodes[i]->data = data_old[i];
+  }
+  free(data_old);
+
+
+  return rc;
 }
diff --git a/test/.gitignore b/test/.gitignore
new file mode 100644
index 0000000..78f83f8
--- /dev/null
+++ b/test/.gitignore
@@ -0,0 +1,5 @@
+obj
+testdata
+tmp
+tmperr
+result
diff --git a/test/Makefile b/test/Makefile
index 0fa265a..62941a7 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -18,21 +18,10 @@
 #    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
 
 CC = gcc
-CFLAGS = -L. -g -O3 -Wall 
+CFLAGS = -L. -g -O3 -Wall -std=c99
 CLIBS = -lpll -lm
 
-CFILES = src/alpha-cats.c \
-	 src/asc-bias.c \
-         src/derivatives.c \
-         src/derivatives-oddstates.c \
-         src/fasta-dna.c \
-         src/fasta-prot.c \
-         src/rooted.c \
-         src/rooted-tipinner.c \
-         src/hky.c \
-         src/odd-states.c \
-         src/partial-traversal.c \
-         src/protein-models.c
+CFILES = $(shell find src -name '*.c' ! -name 'common.c')
 
 OBJFILES = $(patsubst src/%.c, obj/%, $(CFILES))
 
@@ -44,9 +33,11 @@ RESULTDIR = result
 DEPFILES = worms16s.fas \
 					 small.fas small.tree small.rooted.tree small.rooted.tip.tree \
 					 246x4465.fas 246x4465.tree \
-					 ribosomal_l5_pf00673.fas \
+					 ribosomal_l5_pf00673.fas ribosomal_l5_pf00673.tree \
 					 medium.fas medium.tree \
-					 2000.fas 2000.tree
+					 2000.fas 2000.tree \
+					 200.fas 200.tree \
+					 1000x5.dna.fas 1000.tree
 
 REQFILES = $(patsubst %, $(DATADIR)/%, $(DEPFILES))
 ASSETS = https://raw.githubusercontent.com/xflouris/assets/master/libpll
diff --git a/test/README.md b/test/README.md
index 0d428bd..a27e022 100644
--- a/test/README.md
+++ b/test/README.md
@@ -60,6 +60,32 @@ subset of test cases.
 
 e.g., ./runtest.py speed hky alpha-cats
 
+## Naming convention
+
+Source files for testing are named after the following convention:
+
+```
+NNNNN_FLAGS_NAME.c
+```
+
+NNNNN is a 5-digit code with format Class (1 digit) Subclass (1 digit) and ID (3 digits)
+FLAGS is a set of characters identifying different features:
+
+* A/N: [A]scertainment Bias Correction or [N]ot
+* P/M: FASTA/PHYLIP [P]arsing or [M]anual CLVs
+* D/A/O: [D]NA (4 states), [A]mino acid (20 states) or [O]dd number of states
+* R/U: [R]ooted or [U]nrooted
+
+
+## Configure the test framework
+
+Some additional features can be configured inside the test script, in the
+configuration section at the beginning of runtest.py file.
+
+1. do_memtest = [0,1]  : if 0, memory errors and leaks are not checked
+2. num_replicates = #  : number of samples evaluated in the speed test
+3. all_args = [0,1,..] : set of PLL attributes that are evaluated
+
 ## Build tests for Windows
 
 1. Build the library dll file and place them in current directory
diff --git a/test/out/00010_NMDU_lkcalc.out b/test/out/00010_NMDU_lkcalc.out
new file mode 100644
index 0000000..1a5094c
--- /dev/null
+++ b/test/out/00010_NMDU_lkcalc.out
@@ -0,0 +1,98 @@
+[1] P-matrix for branch length 0.100000
++0.9973   +0.0013   +0.0008   +0.0006   
++0.0010   +0.9971   +0.0003   +0.0016   
++0.0024   +0.0013   +0.9956   +0.0006   
++0.0010   +0.0032   +0.0003   +0.9955   
+
++0.9795   +0.0097   +0.0060   +0.0048   
++0.0072   +0.9784   +0.0024   +0.0119   
++0.0179   +0.0097   +0.9676   +0.0048   
++0.0072   +0.0238   +0.0024   +0.9665   
+
++0.9356   +0.0306   +0.0184   +0.0153   
++0.0230   +0.9328   +0.0077   +0.0366   
++0.0553   +0.0306   +0.8988   +0.0153   
++0.0230   +0.0732   +0.0077   +0.8962   
+
++0.7992   +0.0980   +0.0538   +0.0490   
++0.0735   +0.7968   +0.0245   +0.1052   
++0.1614   +0.0980   +0.6917   +0.0490   
++0.0735   +0.2105   +0.0245   +0.6915   
+
+
+[2] P-matrix for branch length 0.200000
++0.9945   +0.0026   +0.0016   +0.0013   
++0.0019   +0.9942   +0.0006   +0.0032   
++0.0048   +0.0026   +0.9913   +0.0013   
++0.0019   +0.0064   +0.0006   +0.9910   
+
++0.9597   +0.0191   +0.0117   +0.0095   
++0.0143   +0.9577   +0.0048   +0.0232   
++0.0350   +0.0191   +0.9364   +0.0095   
++0.0143   +0.0464   +0.0048   +0.9345   
+
++0.8775   +0.0589   +0.0342   +0.0294   
++0.0442   +0.8737   +0.0147   +0.0674   
++0.1025   +0.0589   +0.8092   +0.0294   
++0.0442   +0.1348   +0.0147   +0.8063   
+
++0.6582   +0.1720   +0.0838   +0.0860   
++0.1290   +0.6666   +0.0430   +0.1614   
++0.2514   +0.1720   +0.4907   +0.0860   
++0.1290   +0.3228   +0.0430   +0.5052   
+
+
+[3] P-matrix for branch length 1.000000
++0.9730   +0.0128   +0.0079   +0.0064   
++0.0096   +0.9716   +0.0032   +0.0157   
++0.0236   +0.0128   +0.9573   +0.0064   
++0.0096   +0.0313   +0.0032   +0.9559   
+
++0.8214   +0.0868   +0.0484   +0.0434   
++0.0651   +0.8183   +0.0217   +0.0950   
++0.1452   +0.0868   +0.7246   +0.0434   
++0.0651   +0.1899   +0.0217   +0.7233   
+
++0.5728   +0.2196   +0.0977   +0.1098   
++0.1647   +0.5937   +0.0549   +0.1867   
++0.2932   +0.2196   +0.3774   +0.1098   
++0.1647   +0.3734   +0.0549   +0.4069   
+
++0.3299   +0.3759   +0.1062   +0.1880   
++0.2819   +0.4177   +0.0940   +0.2064   
++0.3187   +0.3759   +0.1174   +0.1880   
++0.2819   +0.4129   +0.0940   +0.2112   
+
+
+[4] P-matrix for branch length 1.000000
++0.9730   +0.0128   +0.0079   +0.0064   
++0.0096   +0.9716   +0.0032   +0.0157   
++0.0236   +0.0128   +0.9573   +0.0064   
++0.0096   +0.0313   +0.0032   +0.9559   
+
++0.8214   +0.0868   +0.0484   +0.0434   
++0.0651   +0.8183   +0.0217   +0.0950   
++0.1452   +0.0868   +0.7246   +0.0434   
++0.0651   +0.1899   +0.0217   +0.7233   
+
++0.5728   +0.2196   +0.0977   +0.1098   
++0.1647   +0.5937   +0.0549   +0.1867   
++0.2932   +0.2196   +0.3774   +0.1098   
++0.1647   +0.3734   +0.0549   +0.4069   
+
++0.3299   +0.3759   +0.1062   +0.1880   
++0.2819   +0.4177   +0.0940   +0.2064   
++0.3187   +0.3759   +0.1174   +0.1880   
++0.2819   +0.4129   +0.0940   +0.2112   
+
+
+[5] CLV 5: [ {(0.00257,0.00513,0.00002,0.00639),(0.01851,0.03595,0.00085,0.04406),(0.05342,0.09749,0.00777,0.11466),(0.12799,0.19359,0.05802,0.20474)} {(0.00257,0.00193,0.00001,0.00001),(0.01833,0.01372,0.00067,0.00067),(0.05168,0.03859,0.00603,0.00596),(0.11320,0.08598,0.04323,0.04164)} {(0.00001,0.98843,0.00001,0.00004),(0.00036,0.91716,0.00036,0.00216),(0.00347,0.76334,0.00347,0.01818),(0.02958,0.44435,0.02958,0.10423)} {(1.00000,1.00000,1.00000,1.00000),(1.00000,1.00000,1.00000,1.000 [...]
+[6] CLV 6: [ {(0.00256,0.00001,0.00000,0.00001),(0.01794,0.00051,0.00006,0.00062),(0.04814,0.00426,0.00150,0.00491),(0.08848,0.02407,0.02257,0.02491)} {(0.00257,0.00192,0.00002,0.00002),(0.01809,0.01356,0.00111,0.00110),(0.04974,0.03745,0.00955,0.00939),(0.10327,0.08227,0.05863,0.05627)} {(0.00000,0.97983,0.00000,0.00002),(0.00018,0.85943,0.00018,0.00111),(0.00159,0.62277,0.00159,0.00974),(0.01271,0.24525,0.01271,0.05440)} {(1.00000,1.00000,1.00000,1.00000),(1.00000,1.00000,1.00000,1.000 [...]
+[7] CLV 7: [ {(0.00001,0.98843,0.00001,0.00004),(0.00036,0.91716,0.00036,0.00216),(0.00347,0.76334,0.00347,0.01818),(0.02958,0.44435,0.02958,0.10423)} {(0.00129,0.00001,0.00001,0.00192),(0.00916,0.00033,0.00033,0.01338),(0.02584,0.00298,0.00302,0.03561),(0.05660,0.02082,0.02161,0.06516)} {(0.00001,0.98843,0.00001,0.00004),(0.00036,0.91716,0.00036,0.00216),(0.00347,0.76334,0.00347,0.01818),(0.02958,0.44435,0.02958,0.10423)} {(0.00129,0.00322,0.00129,0.99098),(0.00955,0.02322,0.00955,0.934 [...]
+
+inner-inner logL: -58.887310
+persite logL:     -6.1622140  -6.9407523  -1.4797267  -1.6094379  -5.2773906  -8.1327377  -5.7500211  -0.0000000  -5.1947970  -2.1438344  -8.0304760  -8.1659221  
+checksum logL:    -58.887310
+tip-inner logL:   -58.887310
+persite logL:     -6.1622140  -6.9407523  -1.4797267  -1.6094379  -5.2773906  -8.1327377  -5.7500211  -0.0000000  -5.1947970  -2.1438344  -8.0304760  -8.1659221  
+checksum logL:    -58.887310
diff --git a/test/out/00011_NMAU_lkcalc.out b/test/out/00011_NMAU_lkcalc.out
new file mode 100644
index 0000000..b32fb9b
--- /dev/null
+++ b/test/out/00011_NMAU_lkcalc.out
@@ -0,0 +1,354 @@
+[1] P-matrix for branch length 0.100000
++0.9956   +0.0000   +0.0001   +0.0002   +0.0000   +0.0001   +0.0003   +0.0007   +0.0000   +0.0001   +0.0001   +0.0001   +0.0000   +0.0000   +0.0004   +0.0009   +0.0007   +0.0000   +0.0000   +0.0004   
++0.0001   +0.9971   +0.0000   +0.0000   +0.0000   +0.0003   +0.0000   +0.0000   +0.0003   +0.0001   +0.0000   +0.0012   +0.0000   +0.0000   +0.0002   +0.0004   +0.0001   +0.0001   +0.0000   +0.0001   
++0.0003   +0.0000   +0.9941   +0.0014   +0.0000   +0.0001   +0.0002   +0.0004   +0.0006   +0.0001   +0.0001   +0.0008   +0.0000   +0.0000   +0.0001   +0.0011   +0.0004   +0.0000   +0.0001   +0.0000   
++0.0003   +0.0000   +0.0012   +0.9953   +0.0000   +0.0002   +0.0019   +0.0004   +0.0001   +0.0000   +0.0000   +0.0002   +0.0000   +0.0000   +0.0000   +0.0002   +0.0001   +0.0000   +0.0000   +0.0000   
++0.0001   +0.0000   +0.0000   +0.0000   +0.9991   +0.0000   +0.0000   +0.0000   +0.0000   +0.0001   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0004   +0.0000   +0.0000   +0.0001   +0.0001   
++0.0003   +0.0003   +0.0001   +0.0002   +0.0000   +0.9959   +0.0012   +0.0001   +0.0007   +0.0000   +0.0002   +0.0004   +0.0001   +0.0000   +0.0003   +0.0001   +0.0001   +0.0000   +0.0000   +0.0001   
++0.0006   +0.0000   +0.0002   +0.0018   +0.0000   +0.0009   +0.9955   +0.0002   +0.0000   +0.0001   +0.0000   +0.0002   +0.0000   +0.0000   +0.0001   +0.0002   +0.0001   +0.0000   +0.0000   +0.0001   
++0.0007   +0.0000   +0.0002   +0.0002   +0.0000   +0.0000   +0.0001   +0.9978   +0.0000   +0.0000   +0.0000   +0.0001   +0.0000   +0.0000   +0.0001   +0.0005   +0.0001   +0.0000   +0.0000   +0.0001   
++0.0001   +0.0003   +0.0007   +0.0001   +0.0000   +0.0008   +0.0001   +0.0000   +0.9971   +0.0000   +0.0001   +0.0001   +0.0000   +0.0001   +0.0002   +0.0001   +0.0000   +0.0000   +0.0001   +0.0001   
++0.0002   +0.0001   +0.0001   +0.0000   +0.0000   +0.0000   +0.0001   +0.0000   +0.0000   +0.9957   +0.0007   +0.0001   +0.0002   +0.0003   +0.0000   +0.0001   +0.0004   +0.0000   +0.0000   +0.0019   
++0.0001   +0.0000   +0.0000   +0.0000   +0.0000   +0.0001   +0.0000   +0.0000   +0.0000   +0.0003   +0.9982   +0.0000   +0.0003   +0.0002   +0.0001   +0.0000   +0.0001   +0.0000   +0.0000   +0.0004   
++0.0001   +0.0006   +0.0004   +0.0001   +0.0000   +0.0002   +0.0001   +0.0001   +0.0000   +0.0001   +0.0001   +0.9975   +0.0001   +0.0000   +0.0001   +0.0002   +0.0003   +0.0000   +0.0000   +0.0000   
++0.0002   +0.0001   +0.0000   +0.0000   +0.0000   +0.0001   +0.0000   +0.0001   +0.0000   +0.0004   +0.0015   +0.0006   +0.9958   +0.0001   +0.0000   +0.0001   +0.0002   +0.0000   +0.0000   +0.0006   
++0.0001   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0001   +0.0002   +0.0004   +0.0000   +0.0000   +0.9982   +0.0000   +0.0001   +0.0000   +0.0000   +0.0007   +0.0000   
++0.0007   +0.0001   +0.0001   +0.0000   +0.0000   +0.0002   +0.0001   +0.0001   +0.0001   +0.0000   +0.0001   +0.0001   +0.0000   +0.0000   +0.9975   +0.0006   +0.0002   +0.0000   +0.0000   +0.0001   
++0.0012   +0.0002   +0.0007   +0.0001   +0.0002   +0.0001   +0.0001   +0.0007   +0.0000   +0.0000   +0.0000   +0.0003   +0.0000   +0.0001   +0.0004   +0.9947   +0.0011   +0.0000   +0.0000   +0.0001   
++0.0011   +0.0000   +0.0003   +0.0001   +0.0000   +0.0001   +0.0001   +0.0001   +0.0000   +0.0002   +0.0001   +0.0004   +0.0001   +0.0000   +0.0001   +0.0013   +0.9957   +0.0000   +0.0000   +0.0003   
++0.0000   +0.0003   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0001   +0.0000   +0.0000   +0.0001   +0.0000   +0.0002   +0.0000   +0.9992   +0.0001   +0.0000   
++0.0001   +0.0000   +0.0001   +0.0000   +0.0001   +0.0000   +0.0000   +0.0000   +0.0001   +0.0000   +0.0001   +0.0000   +0.0000   +0.0009   +0.0000   +0.0001   +0.0001   +0.0000   +0.9982   +0.0001   
++0.0006   +0.0000   +0.0000   +0.0000   +0.0001   +0.0000   +0.0001   +0.0002   +0.0000   +0.0011   +0.0005   +0.0000   +0.0001   +0.0000   +0.0001   +0.0001   +0.0003   +0.0000   +0.0000   +0.9967   
+
++0.9671   +0.0003   +0.0010   +0.0014   +0.0003   +0.0008   +0.0024   +0.0052   +0.0002   +0.0006   +0.0009   +0.0005   +0.0003   +0.0002   +0.0031   +0.0069   +0.0053   +0.0000   +0.0002   +0.0033   
++0.0006   +0.9785   +0.0003   +0.0000   +0.0002   +0.0023   +0.0000   +0.0002   +0.0020   +0.0006   +0.0003   +0.0092   +0.0003   +0.0001   +0.0013   +0.0026   +0.0004   +0.0005   +0.0001   +0.0004   
++0.0021   +0.0003   +0.9561   +0.0102   +0.0000   +0.0010   +0.0019   +0.0030   +0.0044   +0.0007   +0.0007   +0.0062   +0.0000   +0.0001   +0.0005   +0.0083   +0.0033   +0.0001   +0.0007   +0.0003   
++0.0026   +0.0000   +0.0088   +0.9652   +0.0000   +0.0013   +0.0138   +0.0027   +0.0007   +0.0002   +0.0000   +0.0014   +0.0000   +0.0000   +0.0002   +0.0017   +0.0010   +0.0000   +0.0000   +0.0003   
++0.0008   +0.0002   +0.0000   +0.0000   +0.9933   +0.0000   +0.0000   +0.0003   +0.0002   +0.0004   +0.0000   +0.0000   +0.0000   +0.0000   +0.0002   +0.0027   +0.0002   +0.0000   +0.0007   +0.0008   
++0.0019   +0.0025   +0.0010   +0.0016   +0.0000   +0.9694   +0.0086   +0.0006   +0.0050   +0.0002   +0.0015   +0.0030   +0.0004   +0.0000   +0.0019   +0.0010   +0.0008   +0.0000   +0.0000   +0.0006   
++0.0042   +0.0000   +0.0015   +0.0131   +0.0000   +0.0067   +0.9665   +0.0018   +0.0004   +0.0006   +0.0002   +0.0017   +0.0001   +0.0000   +0.0006   +0.0014   +0.0005   +0.0000   +0.0002   +0.0006   
++0.0051   +0.0001   +0.0014   +0.0015   +0.0001   +0.0003   +0.0010   +0.9838   +0.0001   +0.0000   +0.0002   +0.0005   +0.0001   +0.0001   +0.0004   +0.0040   +0.0005   +0.0000   +0.0000   +0.0009   
++0.0005   +0.0024   +0.0053   +0.0010   +0.0002   +0.0057   +0.0006   +0.0002   +0.9782   +0.0001   +0.0009   +0.0006   +0.0000   +0.0005   +0.0012   +0.0006   +0.0003   +0.0001   +0.0009   +0.0007   
++0.0014   +0.0006   +0.0008   +0.0003   +0.0004   +0.0002   +0.0007   +0.0000   +0.0001   +0.9684   +0.0054   +0.0009   +0.0012   +0.0019   +0.0002   +0.0004   +0.0028   +0.0000   +0.0003   +0.0140   
++0.0009   +0.0002   +0.0003   +0.0000   +0.0000   +0.0007   +0.0001   +0.0002   +0.0004   +0.0023   +0.9868   +0.0004   +0.0019   +0.0015   +0.0004   +0.0003   +0.0005   +0.0001   +0.0002   +0.0028   
++0.0006   +0.0047   +0.0031   +0.0008   +0.0000   +0.0014   +0.0010   +0.0006   +0.0002   +0.0004   +0.0004   +0.9815   +0.0009   +0.0000   +0.0004   +0.0017   +0.0020   +0.0000   +0.0001   +0.0002   
++0.0016   +0.0009   +0.0000   +0.0000   +0.0000   +0.0011   +0.0004   +0.0004   +0.0000   +0.0030   +0.0110   +0.0048   +0.9690   +0.0009   +0.0002   +0.0011   +0.0015   +0.0000   +0.0000   +0.0041   
++0.0004   +0.0001   +0.0001   +0.0000   +0.0000   +0.0000   +0.0000   +0.0003   +0.0004   +0.0018   +0.0033   +0.0000   +0.0003   +0.9864   +0.0001   +0.0008   +0.0002   +0.0002   +0.0052   +0.0002   
++0.0053   +0.0010   +0.0004   +0.0002   +0.0002   +0.0014   +0.0006   +0.0008   +0.0008   +0.0001   +0.0007   +0.0007   +0.0001   +0.0001   +0.9815   +0.0042   +0.0012   +0.0000   +0.0000   +0.0008   
++0.0087   +0.0015   +0.0048   +0.0011   +0.0013   +0.0005   +0.0010   +0.0051   +0.0003   +0.0002   +0.0004   +0.0019   +0.0002   +0.0005   +0.0030   +0.9606   +0.0078   +0.0002   +0.0003   +0.0005   
++0.0079   +0.0003   +0.0023   +0.0008   +0.0001   +0.0005   +0.0004   +0.0007   +0.0002   +0.0017   +0.0007   +0.0027   +0.0004   +0.0001   +0.0010   +0.0093   +0.9681   +0.0000   +0.0003   +0.0025   
++0.0000   +0.0020   +0.0002   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0002   +0.0000   +0.0010   +0.0000   +0.0000   +0.0008   +0.0000   +0.0013   +0.0000   +0.9940   +0.0005   +0.0000   
++0.0005   +0.0001   +0.0009   +0.0000   +0.0008   +0.0000   +0.0003   +0.0000   +0.0011   +0.0003   +0.0006   +0.0003   +0.0000   +0.0069   +0.0000   +0.0006   +0.0006   +0.0002   +0.9864   +0.0005   
++0.0044   +0.0002   +0.0002   +0.0002   +0.0004   +0.0003   +0.0005   +0.0012   +0.0004   +0.0080   +0.0037   +0.0002   +0.0009   +0.0001   +0.0006   +0.0005   +0.0023   +0.0000   +0.0002   +0.9756   
+
++0.8974   +0.0009   +0.0032   +0.0044   +0.0010   +0.0027   +0.0074   +0.0163   +0.0007   +0.0020   +0.0028   +0.0018   +0.0008   +0.0006   +0.0097   +0.0211   +0.0163   +0.0000   +0.0006   +0.0102   
++0.0020   +0.9318   +0.0012   +0.0001   +0.0006   +0.0072   +0.0002   +0.0008   +0.0062   +0.0018   +0.0011   +0.0286   +0.0011   +0.0005   +0.0041   +0.0081   +0.0014   +0.0016   +0.0002   +0.0013   
++0.0070   +0.0013   +0.8646   +0.0306   +0.0001   +0.0032   +0.0062   +0.0096   +0.0133   +0.0021   +0.0023   +0.0191   +0.0001   +0.0005   +0.0018   +0.0249   +0.0102   +0.0002   +0.0022   +0.0009   
++0.0082   +0.0001   +0.0264   +0.8920   +0.0000   +0.0043   +0.0418   +0.0087   +0.0024   +0.0008   +0.0001   +0.0047   +0.0000   +0.0000   +0.0007   +0.0055   +0.0032   +0.0000   +0.0001   +0.0010   
++0.0026   +0.0008   +0.0001   +0.0000   +0.9784   +0.0000   +0.0000   +0.0009   +0.0007   +0.0013   +0.0000   +0.0001   +0.0000   +0.0000   +0.0008   +0.0085   +0.0009   +0.0000   +0.0023   +0.0025   
++0.0061   +0.0077   +0.0034   +0.0053   +0.0000   +0.9040   +0.0262   +0.0021   +0.0153   +0.0006   +0.0048   +0.0096   +0.0013   +0.0000   +0.0060   +0.0032   +0.0025   +0.0000   +0.0000   +0.0018   
++0.0130   +0.0002   +0.0050   +0.0396   +0.0000   +0.0202   +0.8958   +0.0058   +0.0013   +0.0017   +0.0008   +0.0053   +0.0004   +0.0000   +0.0021   +0.0044   +0.0018   +0.0000   +0.0005   +0.0020   
++0.0160   +0.0003   +0.0044   +0.0046   +0.0003   +0.0009   +0.0032   +0.9484   +0.0003   +0.0001   +0.0005   +0.0018   +0.0002   +0.0005   +0.0015   +0.0124   +0.0017   +0.0000   +0.0000   +0.0028   
++0.0017   +0.0076   +0.0160   +0.0034   +0.0007   +0.0174   +0.0020   +0.0008   +0.9310   +0.0003   +0.0030   +0.0020   +0.0000   +0.0015   +0.0038   +0.0022   +0.0012   +0.0002   +0.0030   +0.0022   
++0.0047   +0.0020   +0.0024   +0.0010   +0.0012   +0.0006   +0.0023   +0.0002   +0.0003   +0.9012   +0.0170   +0.0029   +0.0038   +0.0060   +0.0006   +0.0015   +0.0085   +0.0000   +0.0009   +0.0430   
++0.0029   +0.0005   +0.0011   +0.0001   +0.0000   +0.0022   +0.0005   +0.0006   +0.0012   +0.0074   +0.9577   +0.0012   +0.0059   +0.0049   +0.0013   +0.0010   +0.0016   +0.0004   +0.0007   +0.0089   
++0.0020   +0.0145   +0.0096   +0.0028   +0.0000   +0.0045   +0.0033   +0.0020   +0.0008   +0.0014   +0.0013   +0.9412   +0.0027   +0.0000   +0.0014   +0.0053   +0.0062   +0.0000   +0.0003   +0.0006   
++0.0049   +0.0029   +0.0002   +0.0001   +0.0000   +0.0033   +0.0012   +0.0013   +0.0001   +0.0095   +0.0343   +0.0148   +0.9026   +0.0029   +0.0008   +0.0034   +0.0047   +0.0000   +0.0001   +0.0129   
++0.0013   +0.0005   +0.0005   +0.0000   +0.0000   +0.0000   +0.0000   +0.0011   +0.0013   +0.0055   +0.0106   +0.0001   +0.0011   +0.9567   +0.0005   +0.0025   +0.0007   +0.0006   +0.0163   +0.0008   
++0.0166   +0.0033   +0.0015   +0.0006   +0.0005   +0.0045   +0.0021   +0.0026   +0.0025   +0.0004   +0.0022   +0.0022   +0.0002   +0.0004   +0.9411   +0.0130   +0.0038   +0.0000   +0.0000   +0.0025   
++0.0264   +0.0048   +0.0145   +0.0037   +0.0041   +0.0018   +0.0031   +0.0158   +0.0010   +0.0008   +0.0012   +0.0061   +0.0007   +0.0014   +0.0094   +0.8781   +0.0237   +0.0006   +0.0008   +0.0018   
++0.0243   +0.0010   +0.0070   +0.0025   +0.0005   +0.0016   +0.0015   +0.0025   +0.0007   +0.0054   +0.0023   +0.0085   +0.0012   +0.0005   +0.0033   +0.0282   +0.9002   +0.0000   +0.0010   +0.0079   
++0.0001   +0.0064   +0.0007   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0007   +0.0000   +0.0031   +0.0001   +0.0000   +0.0024   +0.0000   +0.0040   +0.0001   +0.9806   +0.0015   +0.0000   
++0.0017   +0.0003   +0.0029   +0.0001   +0.0025   +0.0001   +0.0009   +0.0001   +0.0033   +0.0011   +0.0020   +0.0009   +0.0000   +0.0217   +0.0000   +0.0019   +0.0019   +0.0005   +0.9566   +0.0015   
++0.0137   +0.0008   +0.0006   +0.0007   +0.0013   +0.0011   +0.0015   +0.0038   +0.0012   +0.0245   +0.0118   +0.0008   +0.0029   +0.0005   +0.0020   +0.0019   +0.0071   +0.0000   +0.0007   +0.9232   
+
++0.6893   +0.0036   +0.0110   +0.0143   +0.0035   +0.0087   +0.0217   +0.0493   +0.0027   +0.0070   +0.0095   +0.0074   +0.0027   +0.0021   +0.0291   +0.0591   +0.0469   +0.0001   +0.0020   +0.0300   
++0.0077   +0.7819   +0.0055   +0.0013   +0.0022   +0.0217   +0.0021   +0.0034   +0.0191   +0.0057   +0.0043   +0.0865   +0.0035   +0.0016   +0.0132   +0.0238   +0.0059   +0.0052   +0.0009   +0.0046   
++0.0238   +0.0056   +0.6050   +0.0802   +0.0008   +0.0110   +0.0220   +0.0300   +0.0366   +0.0064   +0.0073   +0.0545   +0.0007   +0.0019   +0.0069   +0.0659   +0.0301   +0.0007   +0.0064   +0.0042   
++0.0265   +0.0012   +0.0692   +0.6780   +0.0002   +0.0157   +0.1130   +0.0279   +0.0087   +0.0028   +0.0011   +0.0169   +0.0003   +0.0002   +0.0033   +0.0191   +0.0112   +0.0001   +0.0006   +0.0040   
++0.0090   +0.0026   +0.0009   +0.0003   +0.9262   +0.0003   +0.0004   +0.0036   +0.0025   +0.0042   +0.0005   +0.0006   +0.0001   +0.0004   +0.0031   +0.0255   +0.0038   +0.0000   +0.0074   +0.0083   
++0.0197   +0.0232   +0.0116   +0.0192   +0.0003   +0.7043   +0.0725   +0.0080   +0.0443   +0.0025   +0.0152   +0.0299   +0.0039   +0.0004   +0.0184   +0.0112   +0.0085   +0.0001   +0.0005   +0.0064   
++0.0383   +0.0018   +0.0179   +0.1069   +0.0003   +0.0560   +0.6872   +0.0197   +0.0058   +0.0053   +0.0034   +0.0175   +0.0013   +0.0003   +0.0075   +0.0150   +0.0073   +0.0000   +0.0017   +0.0069   
++0.0485   +0.0016   +0.0137   +0.0148   +0.0014   +0.0034   +0.0110   +0.8317   +0.0015   +0.0008   +0.0022   +0.0067   +0.0008   +0.0017   +0.0058   +0.0372   +0.0075   +0.0001   +0.0003   +0.0093   
++0.0070   +0.0232   +0.0440   +0.0121   +0.0025   +0.0504   +0.0085   +0.0039   +0.7793   +0.0015   +0.0100   +0.0091   +0.0004   +0.0051   +0.0121   +0.0087   +0.0048   +0.0008   +0.0093   +0.0072   
++0.0166   +0.0063   +0.0070   +0.0036   +0.0038   +0.0026   +0.0071   +0.0020   +0.0014   +0.6980   +0.0530   +0.0098   +0.0113   +0.0181   +0.0026   +0.0064   +0.0252   +0.0001   +0.0034   +0.1217   
++0.0097   +0.0020   +0.0035   +0.0006   +0.0002   +0.0068   +0.0020   +0.0023   +0.0039   +0.0229   +0.8608   +0.0047   +0.0177   +0.0159   +0.0044   +0.0039   +0.0058   +0.0013   +0.0027   +0.0288   
++0.0080   +0.0439   +0.0274   +0.0098   +0.0002   +0.0142   +0.0108   +0.0074   +0.0038   +0.0045   +0.0050   +0.8109   +0.0080   +0.0003   +0.0051   +0.0175   +0.0190   +0.0002   +0.0012   +0.0028   
++0.0159   +0.0096   +0.0019   +0.0010   +0.0003   +0.0101   +0.0044   +0.0048   +0.0009   +0.0283   +0.1027   +0.0438   +0.6979   +0.0095   +0.0031   +0.0108   +0.0149   +0.0001   +0.0006   +0.0394   
++0.0047   +0.0017   +0.0020   +0.0003   +0.0004   +0.0004   +0.0004   +0.0037   +0.0043   +0.0168   +0.0342   +0.0007   +0.0035   +0.8572   +0.0017   +0.0076   +0.0028   +0.0021   +0.0515   +0.0041   
++0.0500   +0.0106   +0.0055   +0.0030   +0.0021   +0.0139   +0.0073   +0.0102   +0.0081   +0.0019   +0.0075   +0.0081   +0.0009   +0.0014   +0.8086   +0.0385   +0.0135   +0.0001   +0.0003   +0.0087   
++0.0740   +0.0140   +0.0383   +0.0128   +0.0123   +0.0061   +0.0107   +0.0474   +0.0042   +0.0034   +0.0047   +0.0202   +0.0023   +0.0043   +0.0280   +0.6400   +0.0652   +0.0018   +0.0028   +0.0073   
++0.0698   +0.0041   +0.0208   +0.0090   +0.0022   +0.0056   +0.0062   +0.0114   +0.0027   +0.0159   +0.0084   +0.0262   +0.0037   +0.0019   +0.0117   +0.0775   +0.6952   +0.0001   +0.0032   +0.0244   
++0.0008   +0.0204   +0.0025   +0.0002   +0.0002   +0.0004   +0.0002   +0.0005   +0.0026   +0.0003   +0.0104   +0.0014   +0.0002   +0.0081   +0.0004   +0.0121   +0.0007   +0.9332   +0.0050   +0.0003   
++0.0058   +0.0012   +0.0087   +0.0009   +0.0083   +0.0006   +0.0027   +0.0008   +0.0105   +0.0042   +0.0076   +0.0032   +0.0003   +0.0685   +0.0005   +0.0065   +0.0063   +0.0018   +0.8567   +0.0050   
++0.0404   +0.0029   +0.0026   +0.0029   +0.0043   +0.0038   +0.0053   +0.0127   +0.0037   +0.0694   +0.0380   +0.0035   +0.0090   +0.0025   +0.0068   +0.0078   +0.0221   +0.0001   +0.0023   +0.7599   
+
+
+[2] P-matrix for branch length 0.200000
++0.9912   +0.0001   +0.0003   +0.0004   +0.0001   +0.0002   +0.0006   +0.0014   +0.0001   +0.0002   +0.0002   +0.0001   +0.0001   +0.0000   +0.0008   +0.0019   +0.0014   +0.0000   +0.0000   +0.0009   
++0.0002   +0.9942   +0.0001   +0.0000   +0.0001   +0.0006   +0.0000   +0.0001   +0.0005   +0.0002   +0.0001   +0.0025   +0.0001   +0.0000   +0.0003   +0.0007   +0.0001   +0.0001   +0.0000   +0.0001   
++0.0006   +0.0001   +0.9881   +0.0028   +0.0000   +0.0003   +0.0005   +0.0008   +0.0012   +0.0002   +0.0002   +0.0017   +0.0000   +0.0000   +0.0001   +0.0023   +0.0009   +0.0000   +0.0002   +0.0001   
++0.0007   +0.0000   +0.0024   +0.9906   +0.0000   +0.0003   +0.0038   +0.0007   +0.0002   +0.0001   +0.0000   +0.0004   +0.0000   +0.0000   +0.0000   +0.0004   +0.0003   +0.0000   +0.0000   +0.0001   
++0.0002   +0.0001   +0.0000   +0.0000   +0.9982   +0.0000   +0.0000   +0.0001   +0.0001   +0.0001   +0.0000   +0.0000   +0.0000   +0.0000   +0.0001   +0.0007   +0.0001   +0.0000   +0.0002   +0.0002   
++0.0005   +0.0007   +0.0003   +0.0004   +0.0000   +0.9918   +0.0023   +0.0002   +0.0013   +0.0000   +0.0004   +0.0008   +0.0001   +0.0000   +0.0005   +0.0003   +0.0002   +0.0000   +0.0000   +0.0002   
++0.0011   +0.0000   +0.0004   +0.0036   +0.0000   +0.0018   +0.9910   +0.0005   +0.0001   +0.0001   +0.0001   +0.0004   +0.0000   +0.0000   +0.0002   +0.0004   +0.0001   +0.0000   +0.0000   +0.0002   
++0.0014   +0.0000   +0.0004   +0.0004   +0.0000   +0.0001   +0.0003   +0.9957   +0.0000   +0.0000   +0.0000   +0.0001   +0.0000   +0.0000   +0.0001   +0.0011   +0.0001   +0.0000   +0.0000   +0.0002   
++0.0001   +0.0006   +0.0014   +0.0003   +0.0001   +0.0015   +0.0001   +0.0001   +0.9942   +0.0000   +0.0002   +0.0001   +0.0000   +0.0001   +0.0003   +0.0002   +0.0001   +0.0000   +0.0003   +0.0002   
++0.0004   +0.0002   +0.0002   +0.0001   +0.0001   +0.0000   +0.0002   +0.0000   +0.0000   +0.9915   +0.0015   +0.0002   +0.0003   +0.0005   +0.0000   +0.0001   +0.0007   +0.0000   +0.0001   +0.0038   
++0.0002   +0.0000   +0.0001   +0.0000   +0.0000   +0.0002   +0.0000   +0.0000   +0.0001   +0.0006   +0.9965   +0.0001   +0.0005   +0.0004   +0.0001   +0.0001   +0.0001   +0.0000   +0.0001   +0.0007   
++0.0002   +0.0013   +0.0008   +0.0002   +0.0000   +0.0004   +0.0003   +0.0002   +0.0001   +0.0001   +0.0001   +0.9950   +0.0002   +0.0000   +0.0001   +0.0004   +0.0005   +0.0000   +0.0000   +0.0000   
++0.0004   +0.0002   +0.0000   +0.0000   +0.0000   +0.0003   +0.0001   +0.0001   +0.0000   +0.0008   +0.0030   +0.0013   +0.9917   +0.0002   +0.0001   +0.0003   +0.0004   +0.0000   +0.0000   +0.0011   
++0.0001   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0001   +0.0001   +0.0005   +0.0009   +0.0000   +0.0001   +0.9964   +0.0000   +0.0002   +0.0001   +0.0001   +0.0014   +0.0001   
++0.0014   +0.0003   +0.0001   +0.0000   +0.0000   +0.0004   +0.0002   +0.0002   +0.0002   +0.0000   +0.0002   +0.0002   +0.0000   +0.0000   +0.9951   +0.0011   +0.0003   +0.0000   +0.0000   +0.0002   
++0.0023   +0.0004   +0.0013   +0.0003   +0.0004   +0.0001   +0.0003   +0.0014   +0.0001   +0.0001   +0.0001   +0.0005   +0.0001   +0.0001   +0.0008   +0.9894   +0.0021   +0.0001   +0.0001   +0.0001   
++0.0021   +0.0001   +0.0006   +0.0002   +0.0000   +0.0001   +0.0001   +0.0002   +0.0000   +0.0005   +0.0002   +0.0007   +0.0001   +0.0000   +0.0003   +0.0025   +0.9914   +0.0000   +0.0001   +0.0007   
++0.0000   +0.0005   +0.0001   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0001   +0.0000   +0.0003   +0.0000   +0.0000   +0.0002   +0.0000   +0.0003   +0.0000   +0.9984   +0.0001   +0.0000   
++0.0001   +0.0000   +0.0003   +0.0000   +0.0002   +0.0000   +0.0001   +0.0000   +0.0003   +0.0001   +0.0002   +0.0001   +0.0000   +0.0018   +0.0000   +0.0002   +0.0002   +0.0000   +0.9964   +0.0001   
++0.0012   +0.0001   +0.0000   +0.0001   +0.0001   +0.0001   +0.0001   +0.0003   +0.0001   +0.0022   +0.0010   +0.0001   +0.0003   +0.0000   +0.0002   +0.0001   +0.0006   +0.0000   +0.0001   +0.9935   
+
++0.9355   +0.0006   +0.0020   +0.0028   +0.0006   +0.0017   +0.0047   +0.0103   +0.0004   +0.0012   +0.0017   +0.0011   +0.0005   +0.0004   +0.0061   +0.0134   +0.0103   +0.0000   +0.0004   +0.0064   
++0.0012   +0.9575   +0.0007   +0.0000   +0.0004   +0.0045   +0.0001   +0.0004   +0.0039   +0.0011   +0.0007   +0.0180   +0.0007   +0.0003   +0.0026   +0.0051   +0.0008   +0.0010   +0.0001   +0.0008   
++0.0043   +0.0007   +0.9143   +0.0197   +0.0000   +0.0020   +0.0037   +0.0060   +0.0085   +0.0014   +0.0014   +0.0121   +0.0000   +0.0003   +0.0011   +0.0160   +0.0064   +0.0001   +0.0014   +0.0005   
++0.0051   +0.0000   +0.0170   +0.9318   +0.0000   +0.0026   +0.0268   +0.0054   +0.0015   +0.0005   +0.0000   +0.0029   +0.0000   +0.0000   +0.0004   +0.0033   +0.0019   +0.0000   +0.0000   +0.0006   
++0.0016   +0.0005   +0.0000   +0.0000   +0.9867   +0.0000   +0.0000   +0.0005   +0.0005   +0.0008   +0.0000   +0.0000   +0.0000   +0.0000   +0.0005   +0.0054   +0.0005   +0.0000   +0.0014   +0.0016   
++0.0038   +0.0048   +0.0021   +0.0032   +0.0000   +0.9398   +0.0167   +0.0013   +0.0097   +0.0004   +0.0030   +0.0060   +0.0008   +0.0000   +0.0038   +0.0020   +0.0015   +0.0000   +0.0000   +0.0011   
++0.0082   +0.0001   +0.0031   +0.0253   +0.0000   +0.0129   +0.9343   +0.0036   +0.0008   +0.0011   +0.0005   +0.0033   +0.0002   +0.0000   +0.0013   +0.0027   +0.0011   +0.0000   +0.0003   +0.0012   
++0.0101   +0.0002   +0.0027   +0.0029   +0.0002   +0.0005   +0.0020   +0.9679   +0.0002   +0.0000   +0.0003   +0.0011   +0.0001   +0.0003   +0.0009   +0.0078   +0.0010   +0.0000   +0.0000   +0.0017   
++0.0010   +0.0047   +0.0102   +0.0021   +0.0005   +0.0111   +0.0012   +0.0005   +0.9570   +0.0002   +0.0019   +0.0012   +0.0000   +0.0009   +0.0023   +0.0013   +0.0007   +0.0001   +0.0019   +0.0014   
++0.0029   +0.0013   +0.0015   +0.0006   +0.0007   +0.0004   +0.0015   +0.0001   +0.0001   +0.9379   +0.0107   +0.0018   +0.0024   +0.0038   +0.0003   +0.0009   +0.0054   +0.0000   +0.0006   +0.0273   
++0.0018   +0.0003   +0.0007   +0.0000   +0.0000   +0.0014   +0.0003   +0.0003   +0.0007   +0.0046   +0.9737   +0.0007   +0.0037   +0.0031   +0.0008   +0.0006   +0.0010   +0.0002   +0.0004   +0.0056   
++0.0012   +0.0092   +0.0061   +0.0017   +0.0000   +0.0028   +0.0020   +0.0012   +0.0005   +0.0008   +0.0008   +0.9634   +0.0017   +0.0000   +0.0008   +0.0033   +0.0039   +0.0000   +0.0002   +0.0004   
++0.0031   +0.0018   +0.0001   +0.0000   +0.0000   +0.0021   +0.0007   +0.0008   +0.0000   +0.0060   +0.0216   +0.0094   +0.9389   +0.0018   +0.0005   +0.0021   +0.0030   +0.0000   +0.0000   +0.0081   
++0.0008   +0.0003   +0.0003   +0.0000   +0.0000   +0.0000   +0.0000   +0.0007   +0.0008   +0.0035   +0.0066   +0.0000   +0.0007   +0.9731   +0.0003   +0.0015   +0.0004   +0.0004   +0.0102   +0.0005   
++0.0105   +0.0021   +0.0009   +0.0003   +0.0003   +0.0028   +0.0013   +0.0016   +0.0015   +0.0002   +0.0014   +0.0013   +0.0001   +0.0002   +0.9633   +0.0082   +0.0023   +0.0000   +0.0000   +0.0015   
++0.0168   +0.0030   +0.0093   +0.0022   +0.0026   +0.0011   +0.0019   +0.0100   +0.0006   +0.0005   +0.0007   +0.0038   +0.0004   +0.0009   +0.0060   +0.9230   +0.0152   +0.0004   +0.0005   +0.0010   
++0.0154   +0.0006   +0.0044   +0.0016   +0.0003   +0.0010   +0.0009   +0.0015   +0.0004   +0.0034   +0.0014   +0.0053   +0.0007   +0.0003   +0.0020   +0.0180   +0.9373   +0.0000   +0.0006   +0.0049   
++0.0000   +0.0040   +0.0005   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0005   +0.0000   +0.0019   +0.0000   +0.0000   +0.0015   +0.0000   +0.0025   +0.0000   +0.9880   +0.0009   +0.0000   
++0.0010   +0.0002   +0.0018   +0.0000   +0.0016   +0.0000   +0.0005   +0.0000   +0.0021   +0.0007   +0.0012   +0.0005   +0.0000   +0.0135   +0.0000   +0.0012   +0.0012   +0.0003   +0.9731   +0.0009   
++0.0087   +0.0005   +0.0003   +0.0004   +0.0008   +0.0007   +0.0009   +0.0024   +0.0007   +0.0156   +0.0073   +0.0004   +0.0018   +0.0003   +0.0012   +0.0011   +0.0045   +0.0000   +0.0004   +0.9519   
+
++0.8071   +0.0020   +0.0064   +0.0085   +0.0020   +0.0052   +0.0138   +0.0306   +0.0014   +0.0040   +0.0055   +0.0039   +0.0016   +0.0012   +0.0181   +0.0385   +0.0301   +0.0000   +0.0011   +0.0189   
++0.0042   +0.8689   +0.0028   +0.0004   +0.0012   +0.0135   +0.0008   +0.0017   +0.0118   +0.0035   +0.0023   +0.0538   +0.0020   +0.0009   +0.0079   +0.0150   +0.0030   +0.0032   +0.0005   +0.0026   
++0.0138   +0.0028   +0.7493   +0.0544   +0.0003   +0.0063   +0.0125   +0.0183   +0.0240   +0.0040   +0.0044   +0.0351   +0.0003   +0.0010   +0.0038   +0.0444   +0.0190   +0.0004   +0.0040   +0.0021   
++0.0159   +0.0004   +0.0469   +0.7983   +0.0001   +0.0088   +0.0751   +0.0168   +0.0049   +0.0016   +0.0004   +0.0096   +0.0001   +0.0001   +0.0016   +0.0109   +0.0064   +0.0000   +0.0002   +0.0021   
++0.0051   +0.0015   +0.0003   +0.0001   +0.9574   +0.0001   +0.0001   +0.0019   +0.0015   +0.0025   +0.0002   +0.0002   +0.0000   +0.0001   +0.0017   +0.0160   +0.0019   +0.0000   +0.0044   +0.0049   
++0.0118   +0.0144   +0.0067   +0.0108   +0.0001   +0.8182   +0.0476   +0.0043   +0.0283   +0.0013   +0.0092   +0.0182   +0.0024   +0.0001   +0.0113   +0.0064   +0.0049   +0.0000   +0.0002   +0.0037   
++0.0242   +0.0006   +0.0102   +0.0711   +0.0001   +0.0367   +0.8048   +0.0114   +0.0030   +0.0033   +0.0018   +0.0103   +0.0007   +0.0001   +0.0043   +0.0087   +0.0038   +0.0000   +0.0010   +0.0039   
++0.0301   +0.0008   +0.0083   +0.0089   +0.0007   +0.0019   +0.0064   +0.9000   +0.0007   +0.0003   +0.0011   +0.0037   +0.0004   +0.0010   +0.0031   +0.0233   +0.0038   +0.0000   +0.0001   +0.0054   
++0.0037   +0.0143   +0.0289   +0.0068   +0.0015   +0.0322   +0.0044   +0.0019   +0.8674   +0.0007   +0.0059   +0.0045   +0.0001   +0.0030   +0.0073   +0.0046   +0.0025   +0.0005   +0.0057   +0.0043   
++0.0094   +0.0038   +0.0044   +0.0020   +0.0023   +0.0013   +0.0044   +0.0007   +0.0006   +0.8135   +0.0324   +0.0058   +0.0071   +0.0113   +0.0013   +0.0033   +0.0159   +0.0000   +0.0019   +0.0787   
++0.0056   +0.0011   +0.0021   +0.0002   +0.0001   +0.0041   +0.0010   +0.0012   +0.0023   +0.0140   +0.9177   +0.0025   +0.0111   +0.0095   +0.0026   +0.0021   +0.0032   +0.0008   +0.0015   +0.0172   
++0.0042   +0.0273   +0.0176   +0.0056   +0.0001   +0.0087   +0.0063   +0.0041   +0.0019   +0.0026   +0.0027   +0.8867   +0.0051   +0.0001   +0.0028   +0.0103   +0.0117   +0.0001   +0.0007   +0.0014   
++0.0095   +0.0057   +0.0007   +0.0004   +0.0001   +0.0063   +0.0025   +0.0026   +0.0003   +0.0177   +0.0643   +0.0276   +0.8150   +0.0056   +0.0016   +0.0065   +0.0090   +0.0000   +0.0002   +0.0243   
++0.0026   +0.0009   +0.0010   +0.0001   +0.0001   +0.0001   +0.0001   +0.0021   +0.0025   +0.0104   +0.0204   +0.0002   +0.0021   +0.9157   +0.0010   +0.0047   +0.0015   +0.0013   +0.0312   +0.0019   
++0.0312   +0.0064   +0.0030   +0.0014   +0.0011   +0.0085   +0.0042   +0.0055   +0.0048   +0.0009   +0.0043   +0.0045   +0.0005   +0.0007   +0.8860   +0.0242   +0.0076   +0.0000   +0.0001   +0.0050   
++0.0482   +0.0088   +0.0258   +0.0074   +0.0077   +0.0035   +0.0062   +0.0296   +0.0022   +0.0017   +0.0026   +0.0120   +0.0014   +0.0027   +0.0176   +0.7732   +0.0429   +0.0011   +0.0016   +0.0038   
++0.0447   +0.0021   +0.0131   +0.0051   +0.0011   +0.0032   +0.0032   +0.0057   +0.0014   +0.0100   +0.0047   +0.0160   +0.0023   +0.0010   +0.0066   +0.0510   +0.8117   +0.0000   +0.0019   +0.0150   
++0.0003   +0.0123   +0.0015   +0.0001   +0.0001   +0.0002   +0.0000   +0.0002   +0.0015   +0.0001   +0.0061   +0.0005   +0.0001   +0.0047   +0.0001   +0.0075   +0.0002   +0.9616   +0.0029   +0.0001   
++0.0033   +0.0006   +0.0054   +0.0003   +0.0049   +0.0002   +0.0016   +0.0003   +0.0064   +0.0023   +0.0042   +0.0018   +0.0001   +0.0415   +0.0002   +0.0038   +0.0038   +0.0010   +0.9155   +0.0029   
++0.0255   +0.0016   +0.0013   +0.0015   +0.0025   +0.0022   +0.0030   +0.0075   +0.0022   +0.0449   +0.0227   +0.0017   +0.0055   +0.0012   +0.0039   +0.0041   +0.0135   +0.0000   +0.0013   +0.8537   
+
++0.4899   +0.0076   +0.0204   +0.0251   +0.0068   +0.0154   +0.0345   +0.0804   +0.0060   +0.0135   +0.0180   +0.0162   +0.0048   +0.0043   +0.0469   +0.0873   +0.0714   +0.0003   +0.0038   +0.0474   
++0.0162   +0.6169   +0.0126   +0.0047   +0.0042   +0.0351   +0.0068   +0.0085   +0.0316   +0.0097   +0.0093   +0.1400   +0.0062   +0.0033   +0.0231   +0.0380   +0.0133   +0.0091   +0.0020   +0.0093   
++0.0439   +0.0127   +0.3793   +0.1085   +0.0024   +0.0207   +0.0411   +0.0512   +0.0529   +0.0104   +0.0133   +0.0827   +0.0021   +0.0042   +0.0144   +0.0908   +0.0477   +0.0012   +0.0104   +0.0101   
++0.0467   +0.0041   +0.0936   +0.4790   +0.0009   +0.0300   +0.1583   +0.0492   +0.0169   +0.0059   +0.0039   +0.0327   +0.0011   +0.0009   +0.0083   +0.0356   +0.0217   +0.0002   +0.0018   +0.0090   
++0.0176   +0.0051   +0.0029   +0.0013   +0.8583   +0.0011   +0.0014   +0.0082   +0.0046   +0.0078   +0.0018   +0.0022   +0.0005   +0.0016   +0.0066   +0.0414   +0.0087   +0.0002   +0.0135   +0.0152   
++0.0350   +0.0376   +0.0219   +0.0368   +0.0009   +0.5044   +0.1050   +0.0170   +0.0677   +0.0056   +0.0260   +0.0510   +0.0064   +0.0015   +0.0306   +0.0217   +0.0162   +0.0004   +0.0016   +0.0126   
++0.0606   +0.0056   +0.0335   +0.1498   +0.0009   +0.0811   +0.4904   +0.0369   +0.0130   +0.0091   +0.0079   +0.0320   +0.0026   +0.0011   +0.0147   +0.0282   +0.0161   +0.0001   +0.0030   +0.0134   
++0.0790   +0.0039   +0.0234   +0.0260   +0.0031   +0.0073   +0.0206   +0.6974   +0.0037   +0.0029   +0.0053   +0.0139   +0.0017   +0.0032   +0.0126   +0.0602   +0.0173   +0.0002   +0.0009   +0.0172   
++0.0155   +0.0385   +0.0636   +0.0236   +0.0046   +0.0770   +0.0192   +0.0098   +0.6122   +0.0039   +0.0186   +0.0213   +0.0013   +0.0094   +0.0216   +0.0186   +0.0107   +0.0016   +0.0160   +0.0129   
++0.0319   +0.0108   +0.0114   +0.0074   +0.0070   +0.0058   +0.0122   +0.0069   +0.0036   +0.4982   +0.0897   +0.0182   +0.0182   +0.0299   +0.0063   +0.0142   +0.0402   +0.0003   +0.0069   +0.1809   
++0.0184   +0.0044   +0.0063   +0.0021   +0.0007   +0.0117   +0.0046   +0.0055   +0.0073   +0.0388   +0.7460   +0.0099   +0.0284   +0.0283   +0.0085   +0.0083   +0.0116   +0.0024   +0.0057   +0.0510   
++0.0176   +0.0712   +0.0416   +0.0190   +0.0009   +0.0243   +0.0197   +0.0153   +0.0089   +0.0083   +0.0105   +0.6651   +0.0127   +0.0012   +0.0105   +0.0313   +0.0321   +0.0006   +0.0024   +0.0069   
++0.0282   +0.0172   +0.0057   +0.0035   +0.0011   +0.0166   +0.0087   +0.0103   +0.0030   +0.0455   +0.1641   +0.0692   +0.4902   +0.0173   +0.0071   +0.0191   +0.0255   +0.0005   +0.0021   +0.0652   
++0.0095   +0.0034   +0.0043   +0.0011   +0.0013   +0.0014   +0.0013   +0.0072   +0.0079   +0.0277   +0.0607   +0.0024   +0.0064   +0.7393   +0.0036   +0.0130   +0.0063   +0.0040   +0.0886   +0.0104   
++0.0806   +0.0187   +0.0115   +0.0077   +0.0044   +0.0231   +0.0144   +0.0220   +0.0143   +0.0046   +0.0143   +0.0167   +0.0021   +0.0029   +0.6573   +0.0615   +0.0261   +0.0003   +0.0010   +0.0166   
++0.1093   +0.0224   +0.0527   +0.0240   +0.0199   +0.0119   +0.0200   +0.0766   +0.0090   +0.0075   +0.0102   +0.0362   +0.0040   +0.0074   +0.0448   +0.4262   +0.0935   +0.0030   +0.0053   +0.0159   
++0.1063   +0.0093   +0.0329   +0.0174   +0.0050   +0.0106   +0.0136   +0.0262   +0.0062   +0.0253   +0.0169   +0.0441   +0.0064   +0.0043   +0.0226   +0.1112   +0.4943   +0.0004   +0.0058   +0.0411   
++0.0028   +0.0353   +0.0048   +0.0009   +0.0005   +0.0015   +0.0007   +0.0017   +0.0052   +0.0012   +0.0192   +0.0047   +0.0006   +0.0152   +0.0015   +0.0201   +0.0024   +0.8711   +0.0095   +0.0012   
++0.0111   +0.0028   +0.0140   +0.0028   +0.0151   +0.0021   +0.0050   +0.0028   +0.0180   +0.0085   +0.0163   +0.0066   +0.0010   +0.1178   +0.0017   +0.0123   +0.0114   +0.0033   +0.7377   +0.0097   
++0.0638   +0.0059   +0.0063   +0.0065   +0.0079   +0.0074   +0.0102   +0.0236   +0.0067   +0.1031   +0.0672   +0.0086   +0.0149   +0.0064   +0.0130   +0.0171   +0.0372   +0.0002   +0.0045   +0.5896   
+
+
+[3] P-matrix for branch length 1.000000
++0.9567   +0.0004   +0.0013   +0.0018   +0.0004   +0.0011   +0.0032   +0.0069   +0.0003   +0.0008   +0.0012   +0.0007   +0.0003   +0.0002   +0.0041   +0.0091   +0.0070   +0.0000   +0.0002   +0.0043   
++0.0008   +0.9716   +0.0005   +0.0000   +0.0003   +0.0030   +0.0000   +0.0003   +0.0026   +0.0008   +0.0004   +0.0121   +0.0004   +0.0002   +0.0017   +0.0034   +0.0005   +0.0007   +0.0001   +0.0005   
++0.0028   +0.0005   +0.9422   +0.0134   +0.0000   +0.0013   +0.0025   +0.0040   +0.0057   +0.0009   +0.0009   +0.0082   +0.0000   +0.0002   +0.0007   +0.0109   +0.0043   +0.0001   +0.0009   +0.0003   
++0.0034   +0.0000   +0.0116   +0.9542   +0.0000   +0.0017   +0.0181   +0.0036   +0.0010   +0.0003   +0.0000   +0.0019   +0.0000   +0.0000   +0.0002   +0.0022   +0.0013   +0.0000   +0.0000   +0.0004   
++0.0010   +0.0003   +0.0000   +0.0000   +0.9912   +0.0000   +0.0000   +0.0003   +0.0003   +0.0005   +0.0000   +0.0000   +0.0000   +0.0000   +0.0003   +0.0036   +0.0003   +0.0000   +0.0009   +0.0010   
++0.0025   +0.0033   +0.0014   +0.0021   +0.0000   +0.9596   +0.0113   +0.0008   +0.0065   +0.0002   +0.0020   +0.0040   +0.0005   +0.0000   +0.0025   +0.0013   +0.0010   +0.0000   +0.0000   +0.0008   
++0.0055   +0.0000   +0.0020   +0.0172   +0.0000   +0.0087   +0.9558   +0.0024   +0.0005   +0.0007   +0.0003   +0.0022   +0.0001   +0.0000   +0.0009   +0.0018   +0.0007   +0.0000   +0.0002   +0.0008   
++0.0068   +0.0001   +0.0018   +0.0019   +0.0001   +0.0004   +0.0013   +0.9786   +0.0001   +0.0000   +0.0002   +0.0007   +0.0001   +0.0002   +0.0006   +0.0053   +0.0006   +0.0000   +0.0000   +0.0011   
++0.0007   +0.0032   +0.0069   +0.0014   +0.0003   +0.0074   +0.0007   +0.0003   +0.9712   +0.0001   +0.0012   +0.0007   +0.0000   +0.0006   +0.0016   +0.0008   +0.0004   +0.0001   +0.0012   +0.0009   
++0.0019   +0.0008   +0.0010   +0.0004   +0.0005   +0.0002   +0.0010   +0.0000   +0.0001   +0.9584   +0.0071   +0.0012   +0.0016   +0.0025   +0.0002   +0.0006   +0.0036   +0.0000   +0.0004   +0.0184   
++0.0012   +0.0002   +0.0004   +0.0000   +0.0000   +0.0009   +0.0002   +0.0002   +0.0005   +0.0031   +0.9825   +0.0005   +0.0025   +0.0020   +0.0005   +0.0004   +0.0006   +0.0002   +0.0003   +0.0037   
++0.0008   +0.0061   +0.0041   +0.0011   +0.0000   +0.0019   +0.0013   +0.0008   +0.0003   +0.0006   +0.0005   +0.9755   +0.0012   +0.0000   +0.0006   +0.0022   +0.0026   +0.0000   +0.0001   +0.0002   
++0.0021   +0.0012   +0.0000   +0.0000   +0.0000   +0.0014   +0.0005   +0.0005   +0.0000   +0.0040   +0.0145   +0.0063   +0.9591   +0.0012   +0.0003   +0.0014   +0.0020   +0.0000   +0.0000   +0.0054   
++0.0005   +0.0002   +0.0002   +0.0000   +0.0000   +0.0000   +0.0000   +0.0004   +0.0005   +0.0023   +0.0044   +0.0000   +0.0004   +0.9821   +0.0002   +0.0010   +0.0003   +0.0003   +0.0068   +0.0003   
++0.0070   +0.0014   +0.0006   +0.0002   +0.0002   +0.0019   +0.0008   +0.0010   +0.0010   +0.0002   +0.0009   +0.0009   +0.0001   +0.0001   +0.9755   +0.0055   +0.0015   +0.0000   +0.0000   +0.0010   
++0.0114   +0.0020   +0.0063   +0.0015   +0.0017   +0.0007   +0.0013   +0.0067   +0.0004   +0.0003   +0.0005   +0.0025   +0.0003   +0.0006   +0.0040   +0.9482   +0.0103   +0.0003   +0.0003   +0.0007   
++0.0104   +0.0004   +0.0030   +0.0010   +0.0002   +0.0007   +0.0006   +0.0009   +0.0003   +0.0023   +0.0009   +0.0036   +0.0005   +0.0002   +0.0013   +0.0122   +0.9579   +0.0000   +0.0004   +0.0033   
++0.0000   +0.0027   +0.0003   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0003   +0.0000   +0.0013   +0.0000   +0.0000   +0.0010   +0.0000   +0.0017   +0.0000   +0.9920   +0.0006   +0.0000   
++0.0007   +0.0001   +0.0012   +0.0000   +0.0011   +0.0000   +0.0004   +0.0000   +0.0014   +0.0005   +0.0008   +0.0004   +0.0000   +0.0091   +0.0000   +0.0008   +0.0008   +0.0002   +0.9820   +0.0006   
++0.0058   +0.0003   +0.0002   +0.0003   +0.0005   +0.0004   +0.0006   +0.0016   +0.0005   +0.0105   +0.0049   +0.0003   +0.0012   +0.0002   +0.0008   +0.0007   +0.0030   +0.0000   +0.0003   +0.9678   
+
++0.7222   +0.0031   +0.0097   +0.0126   +0.0030   +0.0077   +0.0195   +0.0441   +0.0023   +0.0061   +0.0083   +0.0063   +0.0024   +0.0018   +0.0260   +0.0536   +0.0424   +0.0001   +0.0017   +0.0269   
++0.0066   +0.8069   +0.0047   +0.0010   +0.0019   +0.0194   +0.0017   +0.0029   +0.0170   +0.0050   +0.0036   +0.0774   +0.0030   +0.0014   +0.0116   +0.0214   +0.0050   +0.0046   +0.0007   +0.0040   
++0.0209   +0.0047   +0.6446   +0.0736   +0.0006   +0.0096   +0.0192   +0.0267   +0.0333   +0.0057   +0.0065   +0.0492   +0.0005   +0.0017   +0.0060   +0.0604   +0.0271   +0.0006   +0.0058   +0.0036   
++0.0235   +0.0009   +0.0635   +0.7114   +0.0002   +0.0136   +0.1031   +0.0247   +0.0076   +0.0024   +0.0009   +0.0147   +0.0002   +0.0002   +0.0027   +0.0167   +0.0098   +0.0000   +0.0004   +0.0035   
++0.0079   +0.0023   +0.0007   +0.0003   +0.9354   +0.0002   +0.0003   +0.0031   +0.0022   +0.0037   +0.0004   +0.0005   +0.0001   +0.0003   +0.0027   +0.0229   +0.0032   +0.0000   +0.0066   +0.0073   
++0.0175   +0.0207   +0.0102   +0.0167   +0.0002   +0.7364   +0.0659   +0.0069   +0.0400   +0.0021   +0.0135   +0.0266   +0.0035   +0.0003   +0.0164   +0.0098   +0.0074   +0.0001   +0.0004   +0.0056   
++0.0344   +0.0014   +0.0157   +0.0976   +0.0002   +0.0509   +0.7199   +0.0173   +0.0049   +0.0047   +0.0029   +0.0154   +0.0011   +0.0002   +0.0065   +0.0132   +0.0062   +0.0000   +0.0015   +0.0060   
++0.0434   +0.0013   +0.0122   +0.0131   +0.0012   +0.0030   +0.0096   +0.8515   +0.0012   +0.0007   +0.0019   +0.0058   +0.0007   +0.0015   +0.0050   +0.0334   +0.0063   +0.0000   +0.0002   +0.0082   
++0.0060   +0.0207   +0.0400   +0.0106   +0.0022   +0.0455   +0.0072   +0.0033   +0.8046   +0.0012   +0.0088   +0.0076   +0.0003   +0.0045   +0.0107   +0.0075   +0.0041   +0.0007   +0.0083   +0.0063   
++0.0145   +0.0056   +0.0062   +0.0031   +0.0034   +0.0022   +0.0064   +0.0016   +0.0011   +0.7304   +0.0472   +0.0086   +0.0101   +0.0162   +0.0022   +0.0054   +0.0227   +0.0001   +0.0029   +0.1102   
++0.0085   +0.0017   +0.0031   +0.0005   +0.0001   +0.0060   +0.0017   +0.0020   +0.0035   +0.0204   +0.8773   +0.0040   +0.0159   +0.0141   +0.0039   +0.0033   +0.0050   +0.0011   +0.0023   +0.0255   
++0.0068   +0.0393   +0.0247   +0.0086   +0.0002   +0.0126   +0.0095   +0.0064   +0.0032   +0.0040   +0.0043   +0.8327   +0.0072   +0.0002   +0.0044   +0.0154   +0.0170   +0.0001   +0.0010   +0.0024   
++0.0141   +0.0085   +0.0015   +0.0008   +0.0002   +0.0090   +0.0038   +0.0041   +0.0007   +0.0254   +0.0920   +0.0394   +0.7310   +0.0084   +0.0027   +0.0095   +0.0132   +0.0001   +0.0005   +0.0352   
++0.0040   +0.0015   +0.0017   +0.0002   +0.0003   +0.0003   +0.0003   +0.0032   +0.0038   +0.0150   +0.0302   +0.0005   +0.0031   +0.8742   +0.0015   +0.0068   +0.0024   +0.0019   +0.0457   +0.0034   
++0.0448   +0.0094   +0.0048   +0.0025   +0.0018   +0.0124   +0.0064   +0.0088   +0.0071   +0.0016   +0.0066   +0.0070   +0.0008   +0.0012   +0.8309   +0.0345   +0.0117   +0.0001   +0.0002   +0.0076   
++0.0671   +0.0126   +0.0351   +0.0112   +0.0110   +0.0054   +0.0094   +0.0425   +0.0036   +0.0029   +0.0041   +0.0178   +0.0020   +0.0039   +0.0252   +0.6768   +0.0593   +0.0016   +0.0024   +0.0062   
++0.0630   +0.0035   +0.0187   +0.0078   +0.0018   +0.0049   +0.0053   +0.0096   +0.0023   +0.0143   +0.0073   +0.0233   +0.0033   +0.0016   +0.0102   +0.0705   +0.7279   +0.0001   +0.0029   +0.0218   
++0.0006   +0.0181   +0.0022   +0.0002   +0.0001   +0.0003   +0.0001   +0.0004   +0.0023   +0.0002   +0.0091   +0.0010   +0.0001   +0.0071   +0.0003   +0.0108   +0.0006   +0.9416   +0.0044   +0.0002   
++0.0050   +0.0010   +0.0078   +0.0007   +0.0074   +0.0005   +0.0024   +0.0006   +0.0093   +0.0036   +0.0066   +0.0028   +0.0002   +0.0608   +0.0004   +0.0057   +0.0056   +0.0015   +0.8738   +0.0044   
++0.0363   +0.0025   +0.0022   +0.0025   +0.0038   +0.0033   +0.0046   +0.0112   +0.0033   +0.0628   +0.0336   +0.0029   +0.0080   +0.0021   +0.0059   +0.0067   +0.0197   +0.0000   +0.0020   +0.7866   
+
++0.3787   +0.0109   +0.0265   +0.0320   +0.0093   +0.0198   +0.0410   +0.0969   +0.0089   +0.0181   +0.0244   +0.0238   +0.0062   +0.0062   +0.0560   +0.0978   +0.0816   +0.0006   +0.0052   +0.0560   
++0.0233   +0.5100   +0.0184   +0.0085   +0.0058   +0.0422   +0.0114   +0.0134   +0.0386   +0.0123   +0.0137   +0.1671   +0.0080   +0.0047   +0.0295   +0.0457   +0.0195   +0.0115   +0.0032   +0.0133   
++0.0571   +0.0186   +0.2657   +0.1134   +0.0041   +0.0274   +0.0529   +0.0641   +0.0583   +0.0130   +0.0178   +0.0950   +0.0034   +0.0062   +0.0203   +0.0970   +0.0562   +0.0017   +0.0126   +0.0153   
++0.0595   +0.0074   +0.0978   +0.3699   +0.0018   +0.0395   +0.1694   +0.0629   +0.0228   +0.0083   +0.0070   +0.0440   +0.0020   +0.0018   +0.0131   +0.0465   +0.0294   +0.0004   +0.0030   +0.0134   
++0.0242   +0.0070   +0.0049   +0.0025   +0.8058   +0.0020   +0.0026   +0.0125   +0.0063   +0.0103   +0.0035   +0.0041   +0.0009   +0.0029   +0.0096   +0.0500   +0.0130   +0.0003   +0.0176   +0.0202   
++0.0451   +0.0451   +0.0290   +0.0484   +0.0017   +0.3874   +0.1154   +0.0247   +0.0773   +0.0083   +0.0329   +0.0638   +0.0078   +0.0027   +0.0377   +0.0297   +0.0221   +0.0008   +0.0028   +0.0174   
++0.0721   +0.0094   +0.0432   +0.1603   +0.0017   +0.0891   +0.3810   +0.0492   +0.0189   +0.0116   +0.0120   +0.0421   +0.0036   +0.0020   +0.0203   +0.0375   +0.0233   +0.0003   +0.0041   +0.0184   
++0.0953   +0.0062   +0.0292   +0.0333   +0.0047   +0.0107   +0.0275   +0.6058   +0.0059   +0.0051   +0.0084   +0.0199   +0.0025   +0.0045   +0.0182   +0.0722   +0.0256   +0.0004   +0.0017   +0.0229   
++0.0230   +0.0469   +0.0701   +0.0317   +0.0062   +0.0879   +0.0278   +0.0155   +0.5036   +0.0062   +0.0248   +0.0319   +0.0023   +0.0125   +0.0279   +0.0264   +0.0159   +0.0023   +0.0201   +0.0170   
++0.0428   +0.0137   +0.0142   +0.0105   +0.0093   +0.0086   +0.0155   +0.0122   +0.0057   +0.3834   +0.1112   +0.0242   +0.0217   +0.0364   +0.0098   +0.0206   +0.0478   +0.0006   +0.0097   +0.2020   
++0.0249   +0.0066   +0.0084   +0.0039   +0.0014   +0.0147   +0.0069   +0.0087   +0.0098   +0.0480   +0.6655   +0.0145   +0.0336   +0.0364   +0.0116   +0.0122   +0.0163   +0.0032   +0.0083   +0.0651   
++0.0257   +0.0849   +0.0477   +0.0256   +0.0017   +0.0303   +0.0259   +0.0219   +0.0133   +0.0111   +0.0153   +0.5687   +0.0149   +0.0022   +0.0150   +0.0404   +0.0397   +0.0011   +0.0035   +0.0109   
++0.0365   +0.0222   +0.0092   +0.0063   +0.0019   +0.0203   +0.0121   +0.0152   +0.0053   +0.0542   +0.1943   +0.0812   +0.3673   +0.0226   +0.0107   +0.0248   +0.0321   +0.0008   +0.0038   +0.0793   
++0.0135   +0.0048   +0.0063   +0.0021   +0.0024   +0.0026   +0.0025   +0.0101   +0.0106   +0.0338   +0.0782   +0.0044   +0.0084   +0.6565   +0.0053   +0.0165   +0.0094   +0.0054   +0.1108   +0.0163   
++0.0963   +0.0238   +0.0162   +0.0121   +0.0063   +0.0284   +0.0198   +0.0318   +0.0185   +0.0072   +0.0196   +0.0239   +0.0031   +0.0042   +0.5554   +0.0731   +0.0352   +0.0006   +0.0018   +0.0226   
++0.1225   +0.0268   +0.0563   +0.0313   +0.0241   +0.0163   +0.0267   +0.0920   +0.0127   +0.0109   +0.0150   +0.0467   +0.0053   +0.0094   +0.0533   +0.3147   +0.1022   +0.0037   +0.0071   +0.0229   
++0.1214   +0.0137   +0.0388   +0.0236   +0.0074   +0.0144   +0.0197   +0.0387   +0.0091   +0.0301   +0.0237   +0.0546   +0.0081   +0.0064   +0.0305   +0.1214   +0.3792   +0.0007   +0.0077   +0.0507   
++0.0049   +0.0446   +0.0065   +0.0017   +0.0010   +0.0027   +0.0013   +0.0032   +0.0072   +0.0021   +0.0256   +0.0083   +0.0011   +0.0203   +0.0028   +0.0247   +0.0041   +0.8225   +0.0129   +0.0023   
++0.0153   +0.0043   +0.0170   +0.0047   +0.0197   +0.0036   +0.0068   +0.0051   +0.0226   +0.0119   +0.0238   +0.0094   +0.0019   +0.1474   +0.0031   +0.0165   +0.0150   +0.0045   +0.6539   +0.0135   
++0.0754   +0.0084   +0.0096   +0.0097   +0.0104   +0.0103   +0.0141   +0.0314   +0.0088   +0.1151   +0.0858   +0.0135   +0.0181   +0.0100   +0.0177   +0.0246   +0.0458   +0.0004   +0.0062   +0.4846   
+
++0.1200   +0.0312   +0.0426   +0.0508   +0.0226   +0.0359   +0.0535   +0.1162   +0.0267   +0.0337   +0.0596   +0.0664   +0.0120   +0.0197   +0.0640   +0.0861   +0.0737   +0.0033   +0.0149   +0.0673   
++0.0664   +0.1372   +0.0420   +0.0387   +0.0159   +0.0501   +0.0425   +0.0559   +0.0470   +0.0248   +0.0476   +0.1644   +0.0136   +0.0163   +0.0499   +0.0662   +0.0510   +0.0174   +0.0130   +0.0402   
++0.0917   +0.0425   +0.0574   +0.0698   +0.0163   +0.0460   +0.0670   +0.0975   +0.0457   +0.0260   +0.0486   +0.0991   +0.0107   +0.0198   +0.0477   +0.0793   +0.0640   +0.0046   +0.0193   +0.0469   
++0.0945   +0.0337   +0.0602   +0.0979   +0.0123   +0.0544   +0.0969   +0.1034   +0.0399   +0.0234   +0.0395   +0.0847   +0.0091   +0.0131   +0.0443   +0.0753   +0.0586   +0.0027   +0.0125   +0.0436   
++0.0588   +0.0194   +0.0197   +0.0172   +0.4742   +0.0132   +0.0175   +0.0461   +0.0167   +0.0234   +0.0257   +0.0275   +0.0052   +0.0174   +0.0297   +0.0698   +0.0383   +0.0022   +0.0336   +0.0443   
++0.0817   +0.0536   +0.0486   +0.0667   +0.0116   +0.0806   +0.0807   +0.0728   +0.0606   +0.0252   +0.0597   +0.0961   +0.0122   +0.0160   +0.0540   +0.0650   +0.0518   +0.0041   +0.0135   +0.0456   
++0.0942   +0.0351   +0.0547   +0.0917   +0.0118   +0.0623   +0.1027   +0.0956   +0.0399   +0.0249   +0.0445   +0.0826   +0.0099   +0.0136   +0.0472   +0.0716   +0.0562   +0.0026   +0.0126   +0.0462   
++0.1143   +0.0258   +0.0445   +0.0547   +0.0174   +0.0314   +0.0534   +0.2294   +0.0231   +0.0231   +0.0390   +0.0600   +0.0087   +0.0149   +0.0481   +0.0876   +0.0608   +0.0026   +0.0106   +0.0506   
++0.0691   +0.0571   +0.0550   +0.0556   +0.0166   +0.0689   +0.0588   +0.0608   +0.1209   +0.0233   +0.0567   +0.0838   +0.0100   +0.0281   +0.0495   +0.0609   +0.0468   +0.0063   +0.0295   +0.0422   
++0.0797   +0.0275   +0.0286   +0.0298   +0.0212   +0.0261   +0.0334   +0.0554   +0.0213   +0.0878   +0.1466   +0.0554   +0.0234   +0.0504   +0.0350   +0.0536   +0.0594   +0.0038   +0.0257   +0.1359   
++0.0608   +0.0228   +0.0230   +0.0217   +0.0101   +0.0267   +0.0258   +0.0405   +0.0223   +0.0633   +0.2959   +0.0462   +0.0324   +0.0614   +0.0309   +0.0406   +0.0428   +0.0073   +0.0267   +0.0988   
++0.0719   +0.0835   +0.0498   +0.0493   +0.0114   +0.0457   +0.0508   +0.0661   +0.0350   +0.0254   +0.0491   +0.2033   +0.0158   +0.0141   +0.0422   +0.0687   +0.0592   +0.0054   +0.0122   +0.0411   
++0.0706   +0.0378   +0.0293   +0.0289   +0.0119   +0.0315   +0.0332   +0.0521   +0.0228   +0.0586   +0.1873   +0.0861   +0.0490   +0.0430   +0.0346   +0.0517   +0.0526   +0.0046   +0.0193   +0.0952   
++0.0432   +0.0168   +0.0201   +0.0154   +0.0146   +0.0154   +0.0170   +0.0333   +0.0237   +0.0468   +0.1317   +0.0285   +0.0160   +0.2794   +0.0204   +0.0361   +0.0316   +0.0120   +0.1442   +0.0538   
++0.1100   +0.0403   +0.0381   +0.0410   +0.0196   +0.0408   +0.0462   +0.0842   +0.0329   +0.0255   +0.0521   +0.0670   +0.0101   +0.0160   +0.1606   +0.0849   +0.0641   +0.0034   +0.0113   +0.0521   
++0.1078   +0.0389   +0.0461   +0.0507   +0.0336   +0.0357   +0.0510   +0.1116   +0.0294   +0.0284   +0.0498   +0.0795   +0.0110   +0.0207   +0.0619   +0.0917   +0.0749   +0.0063   +0.0168   +0.0544   
++0.1096   +0.0356   +0.0442   +0.0469   +0.0219   +0.0339   +0.0475   +0.0921   +0.0269   +0.0374   +0.0623   +0.0814   +0.0133   +0.0215   +0.0555   +0.0890   +0.0911   +0.0037   +0.0171   +0.0690   
++0.0272   +0.0677   +0.0179   +0.0122   +0.0069   +0.0150   +0.0124   +0.0216   +0.0201   +0.0132   +0.0591   +0.0415   +0.0064   +0.0454   +0.0165   +0.0415   +0.0209   +0.5047   +0.0312   +0.0187   
++0.0433   +0.0178   +0.0260   +0.0196   +0.0376   +0.0172   +0.0208   +0.0313   +0.0331   +0.0317   +0.0762   +0.0328   +0.0095   +0.1918   +0.0192   +0.0391   +0.0335   +0.0109   +0.2678   +0.0406   
++0.0906   +0.0254   +0.0293   +0.0316   +0.0229   +0.0270   +0.0353   +0.0693   +0.0219   +0.0775   +0.1303   +0.0511   +0.0217   +0.0331   +0.0408   +0.0585   +0.0624   +0.0030   +0.0188   +0.1496   
+
+
+[4] P-matrix for branch length 1.000000
++0.9567   +0.0004   +0.0013   +0.0018   +0.0004   +0.0011   +0.0032   +0.0069   +0.0003   +0.0008   +0.0012   +0.0007   +0.0003   +0.0002   +0.0041   +0.0091   +0.0070   +0.0000   +0.0002   +0.0043   
++0.0008   +0.9716   +0.0005   +0.0000   +0.0003   +0.0030   +0.0000   +0.0003   +0.0026   +0.0008   +0.0004   +0.0121   +0.0004   +0.0002   +0.0017   +0.0034   +0.0005   +0.0007   +0.0001   +0.0005   
++0.0028   +0.0005   +0.9422   +0.0134   +0.0000   +0.0013   +0.0025   +0.0040   +0.0057   +0.0009   +0.0009   +0.0082   +0.0000   +0.0002   +0.0007   +0.0109   +0.0043   +0.0001   +0.0009   +0.0003   
++0.0034   +0.0000   +0.0116   +0.9542   +0.0000   +0.0017   +0.0181   +0.0036   +0.0010   +0.0003   +0.0000   +0.0019   +0.0000   +0.0000   +0.0002   +0.0022   +0.0013   +0.0000   +0.0000   +0.0004   
++0.0010   +0.0003   +0.0000   +0.0000   +0.9912   +0.0000   +0.0000   +0.0003   +0.0003   +0.0005   +0.0000   +0.0000   +0.0000   +0.0000   +0.0003   +0.0036   +0.0003   +0.0000   +0.0009   +0.0010   
++0.0025   +0.0033   +0.0014   +0.0021   +0.0000   +0.9596   +0.0113   +0.0008   +0.0065   +0.0002   +0.0020   +0.0040   +0.0005   +0.0000   +0.0025   +0.0013   +0.0010   +0.0000   +0.0000   +0.0008   
++0.0055   +0.0000   +0.0020   +0.0172   +0.0000   +0.0087   +0.9558   +0.0024   +0.0005   +0.0007   +0.0003   +0.0022   +0.0001   +0.0000   +0.0009   +0.0018   +0.0007   +0.0000   +0.0002   +0.0008   
++0.0068   +0.0001   +0.0018   +0.0019   +0.0001   +0.0004   +0.0013   +0.9786   +0.0001   +0.0000   +0.0002   +0.0007   +0.0001   +0.0002   +0.0006   +0.0053   +0.0006   +0.0000   +0.0000   +0.0011   
++0.0007   +0.0032   +0.0069   +0.0014   +0.0003   +0.0074   +0.0007   +0.0003   +0.9712   +0.0001   +0.0012   +0.0007   +0.0000   +0.0006   +0.0016   +0.0008   +0.0004   +0.0001   +0.0012   +0.0009   
++0.0019   +0.0008   +0.0010   +0.0004   +0.0005   +0.0002   +0.0010   +0.0000   +0.0001   +0.9584   +0.0071   +0.0012   +0.0016   +0.0025   +0.0002   +0.0006   +0.0036   +0.0000   +0.0004   +0.0184   
++0.0012   +0.0002   +0.0004   +0.0000   +0.0000   +0.0009   +0.0002   +0.0002   +0.0005   +0.0031   +0.9825   +0.0005   +0.0025   +0.0020   +0.0005   +0.0004   +0.0006   +0.0002   +0.0003   +0.0037   
++0.0008   +0.0061   +0.0041   +0.0011   +0.0000   +0.0019   +0.0013   +0.0008   +0.0003   +0.0006   +0.0005   +0.9755   +0.0012   +0.0000   +0.0006   +0.0022   +0.0026   +0.0000   +0.0001   +0.0002   
++0.0021   +0.0012   +0.0000   +0.0000   +0.0000   +0.0014   +0.0005   +0.0005   +0.0000   +0.0040   +0.0145   +0.0063   +0.9591   +0.0012   +0.0003   +0.0014   +0.0020   +0.0000   +0.0000   +0.0054   
++0.0005   +0.0002   +0.0002   +0.0000   +0.0000   +0.0000   +0.0000   +0.0004   +0.0005   +0.0023   +0.0044   +0.0000   +0.0004   +0.9821   +0.0002   +0.0010   +0.0003   +0.0003   +0.0068   +0.0003   
++0.0070   +0.0014   +0.0006   +0.0002   +0.0002   +0.0019   +0.0008   +0.0010   +0.0010   +0.0002   +0.0009   +0.0009   +0.0001   +0.0001   +0.9755   +0.0055   +0.0015   +0.0000   +0.0000   +0.0010   
++0.0114   +0.0020   +0.0063   +0.0015   +0.0017   +0.0007   +0.0013   +0.0067   +0.0004   +0.0003   +0.0005   +0.0025   +0.0003   +0.0006   +0.0040   +0.9482   +0.0103   +0.0003   +0.0003   +0.0007   
++0.0104   +0.0004   +0.0030   +0.0010   +0.0002   +0.0007   +0.0006   +0.0009   +0.0003   +0.0023   +0.0009   +0.0036   +0.0005   +0.0002   +0.0013   +0.0122   +0.9579   +0.0000   +0.0004   +0.0033   
++0.0000   +0.0027   +0.0003   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0003   +0.0000   +0.0013   +0.0000   +0.0000   +0.0010   +0.0000   +0.0017   +0.0000   +0.9920   +0.0006   +0.0000   
++0.0007   +0.0001   +0.0012   +0.0000   +0.0011   +0.0000   +0.0004   +0.0000   +0.0014   +0.0005   +0.0008   +0.0004   +0.0000   +0.0091   +0.0000   +0.0008   +0.0008   +0.0002   +0.9820   +0.0006   
++0.0058   +0.0003   +0.0002   +0.0003   +0.0005   +0.0004   +0.0006   +0.0016   +0.0005   +0.0105   +0.0049   +0.0003   +0.0012   +0.0002   +0.0008   +0.0007   +0.0030   +0.0000   +0.0003   +0.9678   
+
++0.7222   +0.0031   +0.0097   +0.0126   +0.0030   +0.0077   +0.0195   +0.0441   +0.0023   +0.0061   +0.0083   +0.0063   +0.0024   +0.0018   +0.0260   +0.0536   +0.0424   +0.0001   +0.0017   +0.0269   
++0.0066   +0.8069   +0.0047   +0.0010   +0.0019   +0.0194   +0.0017   +0.0029   +0.0170   +0.0050   +0.0036   +0.0774   +0.0030   +0.0014   +0.0116   +0.0214   +0.0050   +0.0046   +0.0007   +0.0040   
++0.0209   +0.0047   +0.6446   +0.0736   +0.0006   +0.0096   +0.0192   +0.0267   +0.0333   +0.0057   +0.0065   +0.0492   +0.0005   +0.0017   +0.0060   +0.0604   +0.0271   +0.0006   +0.0058   +0.0036   
++0.0235   +0.0009   +0.0635   +0.7114   +0.0002   +0.0136   +0.1031   +0.0247   +0.0076   +0.0024   +0.0009   +0.0147   +0.0002   +0.0002   +0.0027   +0.0167   +0.0098   +0.0000   +0.0004   +0.0035   
++0.0079   +0.0023   +0.0007   +0.0003   +0.9354   +0.0002   +0.0003   +0.0031   +0.0022   +0.0037   +0.0004   +0.0005   +0.0001   +0.0003   +0.0027   +0.0229   +0.0032   +0.0000   +0.0066   +0.0073   
++0.0175   +0.0207   +0.0102   +0.0167   +0.0002   +0.7364   +0.0659   +0.0069   +0.0400   +0.0021   +0.0135   +0.0266   +0.0035   +0.0003   +0.0164   +0.0098   +0.0074   +0.0001   +0.0004   +0.0056   
++0.0344   +0.0014   +0.0157   +0.0976   +0.0002   +0.0509   +0.7199   +0.0173   +0.0049   +0.0047   +0.0029   +0.0154   +0.0011   +0.0002   +0.0065   +0.0132   +0.0062   +0.0000   +0.0015   +0.0060   
++0.0434   +0.0013   +0.0122   +0.0131   +0.0012   +0.0030   +0.0096   +0.8515   +0.0012   +0.0007   +0.0019   +0.0058   +0.0007   +0.0015   +0.0050   +0.0334   +0.0063   +0.0000   +0.0002   +0.0082   
++0.0060   +0.0207   +0.0400   +0.0106   +0.0022   +0.0455   +0.0072   +0.0033   +0.8046   +0.0012   +0.0088   +0.0076   +0.0003   +0.0045   +0.0107   +0.0075   +0.0041   +0.0007   +0.0083   +0.0063   
++0.0145   +0.0056   +0.0062   +0.0031   +0.0034   +0.0022   +0.0064   +0.0016   +0.0011   +0.7304   +0.0472   +0.0086   +0.0101   +0.0162   +0.0022   +0.0054   +0.0227   +0.0001   +0.0029   +0.1102   
++0.0085   +0.0017   +0.0031   +0.0005   +0.0001   +0.0060   +0.0017   +0.0020   +0.0035   +0.0204   +0.8773   +0.0040   +0.0159   +0.0141   +0.0039   +0.0033   +0.0050   +0.0011   +0.0023   +0.0255   
++0.0068   +0.0393   +0.0247   +0.0086   +0.0002   +0.0126   +0.0095   +0.0064   +0.0032   +0.0040   +0.0043   +0.8327   +0.0072   +0.0002   +0.0044   +0.0154   +0.0170   +0.0001   +0.0010   +0.0024   
++0.0141   +0.0085   +0.0015   +0.0008   +0.0002   +0.0090   +0.0038   +0.0041   +0.0007   +0.0254   +0.0920   +0.0394   +0.7310   +0.0084   +0.0027   +0.0095   +0.0132   +0.0001   +0.0005   +0.0352   
++0.0040   +0.0015   +0.0017   +0.0002   +0.0003   +0.0003   +0.0003   +0.0032   +0.0038   +0.0150   +0.0302   +0.0005   +0.0031   +0.8742   +0.0015   +0.0068   +0.0024   +0.0019   +0.0457   +0.0034   
++0.0448   +0.0094   +0.0048   +0.0025   +0.0018   +0.0124   +0.0064   +0.0088   +0.0071   +0.0016   +0.0066   +0.0070   +0.0008   +0.0012   +0.8309   +0.0345   +0.0117   +0.0001   +0.0002   +0.0076   
++0.0671   +0.0126   +0.0351   +0.0112   +0.0110   +0.0054   +0.0094   +0.0425   +0.0036   +0.0029   +0.0041   +0.0178   +0.0020   +0.0039   +0.0252   +0.6768   +0.0593   +0.0016   +0.0024   +0.0062   
++0.0630   +0.0035   +0.0187   +0.0078   +0.0018   +0.0049   +0.0053   +0.0096   +0.0023   +0.0143   +0.0073   +0.0233   +0.0033   +0.0016   +0.0102   +0.0705   +0.7279   +0.0001   +0.0029   +0.0218   
++0.0006   +0.0181   +0.0022   +0.0002   +0.0001   +0.0003   +0.0001   +0.0004   +0.0023   +0.0002   +0.0091   +0.0010   +0.0001   +0.0071   +0.0003   +0.0108   +0.0006   +0.9416   +0.0044   +0.0002   
++0.0050   +0.0010   +0.0078   +0.0007   +0.0074   +0.0005   +0.0024   +0.0006   +0.0093   +0.0036   +0.0066   +0.0028   +0.0002   +0.0608   +0.0004   +0.0057   +0.0056   +0.0015   +0.8738   +0.0044   
++0.0363   +0.0025   +0.0022   +0.0025   +0.0038   +0.0033   +0.0046   +0.0112   +0.0033   +0.0628   +0.0336   +0.0029   +0.0080   +0.0021   +0.0059   +0.0067   +0.0197   +0.0000   +0.0020   +0.7866   
+
++0.3787   +0.0109   +0.0265   +0.0320   +0.0093   +0.0198   +0.0410   +0.0969   +0.0089   +0.0181   +0.0244   +0.0238   +0.0062   +0.0062   +0.0560   +0.0978   +0.0816   +0.0006   +0.0052   +0.0560   
++0.0233   +0.5100   +0.0184   +0.0085   +0.0058   +0.0422   +0.0114   +0.0134   +0.0386   +0.0123   +0.0137   +0.1671   +0.0080   +0.0047   +0.0295   +0.0457   +0.0195   +0.0115   +0.0032   +0.0133   
++0.0571   +0.0186   +0.2657   +0.1134   +0.0041   +0.0274   +0.0529   +0.0641   +0.0583   +0.0130   +0.0178   +0.0950   +0.0034   +0.0062   +0.0203   +0.0970   +0.0562   +0.0017   +0.0126   +0.0153   
++0.0595   +0.0074   +0.0978   +0.3699   +0.0018   +0.0395   +0.1694   +0.0629   +0.0228   +0.0083   +0.0070   +0.0440   +0.0020   +0.0018   +0.0131   +0.0465   +0.0294   +0.0004   +0.0030   +0.0134   
++0.0242   +0.0070   +0.0049   +0.0025   +0.8058   +0.0020   +0.0026   +0.0125   +0.0063   +0.0103   +0.0035   +0.0041   +0.0009   +0.0029   +0.0096   +0.0500   +0.0130   +0.0003   +0.0176   +0.0202   
++0.0451   +0.0451   +0.0290   +0.0484   +0.0017   +0.3874   +0.1154   +0.0247   +0.0773   +0.0083   +0.0329   +0.0638   +0.0078   +0.0027   +0.0377   +0.0297   +0.0221   +0.0008   +0.0028   +0.0174   
++0.0721   +0.0094   +0.0432   +0.1603   +0.0017   +0.0891   +0.3810   +0.0492   +0.0189   +0.0116   +0.0120   +0.0421   +0.0036   +0.0020   +0.0203   +0.0375   +0.0233   +0.0003   +0.0041   +0.0184   
++0.0953   +0.0062   +0.0292   +0.0333   +0.0047   +0.0107   +0.0275   +0.6058   +0.0059   +0.0051   +0.0084   +0.0199   +0.0025   +0.0045   +0.0182   +0.0722   +0.0256   +0.0004   +0.0017   +0.0229   
++0.0230   +0.0469   +0.0701   +0.0317   +0.0062   +0.0879   +0.0278   +0.0155   +0.5036   +0.0062   +0.0248   +0.0319   +0.0023   +0.0125   +0.0279   +0.0264   +0.0159   +0.0023   +0.0201   +0.0170   
++0.0428   +0.0137   +0.0142   +0.0105   +0.0093   +0.0086   +0.0155   +0.0122   +0.0057   +0.3834   +0.1112   +0.0242   +0.0217   +0.0364   +0.0098   +0.0206   +0.0478   +0.0006   +0.0097   +0.2020   
++0.0249   +0.0066   +0.0084   +0.0039   +0.0014   +0.0147   +0.0069   +0.0087   +0.0098   +0.0480   +0.6655   +0.0145   +0.0336   +0.0364   +0.0116   +0.0122   +0.0163   +0.0032   +0.0083   +0.0651   
++0.0257   +0.0849   +0.0477   +0.0256   +0.0017   +0.0303   +0.0259   +0.0219   +0.0133   +0.0111   +0.0153   +0.5687   +0.0149   +0.0022   +0.0150   +0.0404   +0.0397   +0.0011   +0.0035   +0.0109   
++0.0365   +0.0222   +0.0092   +0.0063   +0.0019   +0.0203   +0.0121   +0.0152   +0.0053   +0.0542   +0.1943   +0.0812   +0.3673   +0.0226   +0.0107   +0.0248   +0.0321   +0.0008   +0.0038   +0.0793   
++0.0135   +0.0048   +0.0063   +0.0021   +0.0024   +0.0026   +0.0025   +0.0101   +0.0106   +0.0338   +0.0782   +0.0044   +0.0084   +0.6565   +0.0053   +0.0165   +0.0094   +0.0054   +0.1108   +0.0163   
++0.0963   +0.0238   +0.0162   +0.0121   +0.0063   +0.0284   +0.0198   +0.0318   +0.0185   +0.0072   +0.0196   +0.0239   +0.0031   +0.0042   +0.5554   +0.0731   +0.0352   +0.0006   +0.0018   +0.0226   
++0.1225   +0.0268   +0.0563   +0.0313   +0.0241   +0.0163   +0.0267   +0.0920   +0.0127   +0.0109   +0.0150   +0.0467   +0.0053   +0.0094   +0.0533   +0.3147   +0.1022   +0.0037   +0.0071   +0.0229   
++0.1214   +0.0137   +0.0388   +0.0236   +0.0074   +0.0144   +0.0197   +0.0387   +0.0091   +0.0301   +0.0237   +0.0546   +0.0081   +0.0064   +0.0305   +0.1214   +0.3792   +0.0007   +0.0077   +0.0507   
++0.0049   +0.0446   +0.0065   +0.0017   +0.0010   +0.0027   +0.0013   +0.0032   +0.0072   +0.0021   +0.0256   +0.0083   +0.0011   +0.0203   +0.0028   +0.0247   +0.0041   +0.8225   +0.0129   +0.0023   
++0.0153   +0.0043   +0.0170   +0.0047   +0.0197   +0.0036   +0.0068   +0.0051   +0.0226   +0.0119   +0.0238   +0.0094   +0.0019   +0.1474   +0.0031   +0.0165   +0.0150   +0.0045   +0.6539   +0.0135   
++0.0754   +0.0084   +0.0096   +0.0097   +0.0104   +0.0103   +0.0141   +0.0314   +0.0088   +0.1151   +0.0858   +0.0135   +0.0181   +0.0100   +0.0177   +0.0246   +0.0458   +0.0004   +0.0062   +0.4846   
+
++0.1200   +0.0312   +0.0426   +0.0508   +0.0226   +0.0359   +0.0535   +0.1162   +0.0267   +0.0337   +0.0596   +0.0664   +0.0120   +0.0197   +0.0640   +0.0861   +0.0737   +0.0033   +0.0149   +0.0673   
++0.0664   +0.1372   +0.0420   +0.0387   +0.0159   +0.0501   +0.0425   +0.0559   +0.0470   +0.0248   +0.0476   +0.1644   +0.0136   +0.0163   +0.0499   +0.0662   +0.0510   +0.0174   +0.0130   +0.0402   
++0.0917   +0.0425   +0.0574   +0.0698   +0.0163   +0.0460   +0.0670   +0.0975   +0.0457   +0.0260   +0.0486   +0.0991   +0.0107   +0.0198   +0.0477   +0.0793   +0.0640   +0.0046   +0.0193   +0.0469   
++0.0945   +0.0337   +0.0602   +0.0979   +0.0123   +0.0544   +0.0969   +0.1034   +0.0399   +0.0234   +0.0395   +0.0847   +0.0091   +0.0131   +0.0443   +0.0753   +0.0586   +0.0027   +0.0125   +0.0436   
++0.0588   +0.0194   +0.0197   +0.0172   +0.4742   +0.0132   +0.0175   +0.0461   +0.0167   +0.0234   +0.0257   +0.0275   +0.0052   +0.0174   +0.0297   +0.0698   +0.0383   +0.0022   +0.0336   +0.0443   
++0.0817   +0.0536   +0.0486   +0.0667   +0.0116   +0.0806   +0.0807   +0.0728   +0.0606   +0.0252   +0.0597   +0.0961   +0.0122   +0.0160   +0.0540   +0.0650   +0.0518   +0.0041   +0.0135   +0.0456   
++0.0942   +0.0351   +0.0547   +0.0917   +0.0118   +0.0623   +0.1027   +0.0956   +0.0399   +0.0249   +0.0445   +0.0826   +0.0099   +0.0136   +0.0472   +0.0716   +0.0562   +0.0026   +0.0126   +0.0462   
++0.1143   +0.0258   +0.0445   +0.0547   +0.0174   +0.0314   +0.0534   +0.2294   +0.0231   +0.0231   +0.0390   +0.0600   +0.0087   +0.0149   +0.0481   +0.0876   +0.0608   +0.0026   +0.0106   +0.0506   
++0.0691   +0.0571   +0.0550   +0.0556   +0.0166   +0.0689   +0.0588   +0.0608   +0.1209   +0.0233   +0.0567   +0.0838   +0.0100   +0.0281   +0.0495   +0.0609   +0.0468   +0.0063   +0.0295   +0.0422   
++0.0797   +0.0275   +0.0286   +0.0298   +0.0212   +0.0261   +0.0334   +0.0554   +0.0213   +0.0878   +0.1466   +0.0554   +0.0234   +0.0504   +0.0350   +0.0536   +0.0594   +0.0038   +0.0257   +0.1359   
++0.0608   +0.0228   +0.0230   +0.0217   +0.0101   +0.0267   +0.0258   +0.0405   +0.0223   +0.0633   +0.2959   +0.0462   +0.0324   +0.0614   +0.0309   +0.0406   +0.0428   +0.0073   +0.0267   +0.0988   
++0.0719   +0.0835   +0.0498   +0.0493   +0.0114   +0.0457   +0.0508   +0.0661   +0.0350   +0.0254   +0.0491   +0.2033   +0.0158   +0.0141   +0.0422   +0.0687   +0.0592   +0.0054   +0.0122   +0.0411   
++0.0706   +0.0378   +0.0293   +0.0289   +0.0119   +0.0315   +0.0332   +0.0521   +0.0228   +0.0586   +0.1873   +0.0861   +0.0490   +0.0430   +0.0346   +0.0517   +0.0526   +0.0046   +0.0193   +0.0952   
++0.0432   +0.0168   +0.0201   +0.0154   +0.0146   +0.0154   +0.0170   +0.0333   +0.0237   +0.0468   +0.1317   +0.0285   +0.0160   +0.2794   +0.0204   +0.0361   +0.0316   +0.0120   +0.1442   +0.0538   
++0.1100   +0.0403   +0.0381   +0.0410   +0.0196   +0.0408   +0.0462   +0.0842   +0.0329   +0.0255   +0.0521   +0.0670   +0.0101   +0.0160   +0.1606   +0.0849   +0.0641   +0.0034   +0.0113   +0.0521   
++0.1078   +0.0389   +0.0461   +0.0507   +0.0336   +0.0357   +0.0510   +0.1116   +0.0294   +0.0284   +0.0498   +0.0795   +0.0110   +0.0207   +0.0619   +0.0917   +0.0749   +0.0063   +0.0168   +0.0544   
++0.1096   +0.0356   +0.0442   +0.0469   +0.0219   +0.0339   +0.0475   +0.0921   +0.0269   +0.0374   +0.0623   +0.0814   +0.0133   +0.0215   +0.0555   +0.0890   +0.0911   +0.0037   +0.0171   +0.0690   
++0.0272   +0.0677   +0.0179   +0.0122   +0.0069   +0.0150   +0.0124   +0.0216   +0.0201   +0.0132   +0.0591   +0.0415   +0.0064   +0.0454   +0.0165   +0.0415   +0.0209   +0.5047   +0.0312   +0.0187   
++0.0433   +0.0178   +0.0260   +0.0196   +0.0376   +0.0172   +0.0208   +0.0313   +0.0331   +0.0317   +0.0762   +0.0328   +0.0095   +0.1918   +0.0192   +0.0391   +0.0335   +0.0109   +0.2678   +0.0406   
++0.0906   +0.0254   +0.0293   +0.0316   +0.0229   +0.0270   +0.0353   +0.0693   +0.0219   +0.0775   +0.1303   +0.0511   +0.0217   +0.0331   +0.0408   +0.0585   +0.0624   +0.0030   +0.0188   +0.1496   
+
+
+[5] CLV 5: [ {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00004,0.00000,0.00000,0.00000,0.00000,0.00003,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00001,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00031,0.00000,0.00000,0.00000,0.00000,0.00023,0.00000,0.00001,0.00000,0.00000,0.00002),(0.00007,0.00003,0.00002,0.00000,0.00000,0.00001,0.00001,0.00000,0.00000,0.00104,0.00004,0.00001,0.00003,0.00001,0.00083,0.00003,0.00007,0.00000,0.00000,0 [...]
+[6] CLV 6: [ {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00004,0.00000,0.00000,0.00000,0.00000,0.00003,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00001,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00030,0.00000,0.00000,0.00000,0.00000,0.00023,0.00000,0.00001,0.00000,0.00000,0.00002),(0.00008,0.00003,0.00002,0.00001,0.00001,0.00002,0.00002,0.00000,0.00001,0.00095,0.00005,0.00001,0.00004,0.00002,0.00078,0.00004,0.00007,0.00000,0.00000,0 [...]
+[7] CLV 7: [ {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00002,0.00000,0.00000,0.00000,0.00000,0.00010,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00001,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00012,0.00000,0.00000,0.00000,0.00000,0.00072,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00005,0.00000,0.00000,0.00000,0.00000,0.00001,0.00001,0.00039,0.00000,0.00000,0.00001,0.00002,0.00214,0.00000,0.00000,0.00004,0.00001,0.00000,0.00000,0 [...]
+
+inner-inner logL: -227.371279
+persite logL:     -17.0447253  -16.2610663  -13.8755725  -18.8408367  -19.4698136  -13.1932024  -13.4231282  -14.6838719  -14.4485103  -15.7189636  -11.5030979  -13.2395572  -12.6869279  -18.5235207  -14.4584843  
+checksum logL:    -227.371279
+tip-inner logL:   -227.371279
+persite logL:     -17.0447253  -16.2610663  -13.8755725  -18.8408367  -19.4698136  -13.1932024  -13.4231282  -14.6838719  -14.4485103  -15.7189636  -11.5030979  -13.2395572  -12.6869279  -18.5235207  -14.4584843  
+checksum logL:    -227.371279
diff --git a/test/out/00012_NMOU_lkcalc.out b/test/out/00012_NMOU_lkcalc.out
new file mode 100644
index 0000000..1b54b7f
--- /dev/null
+++ b/test/out/00012_NMOU_lkcalc.out
@@ -0,0 +1,146 @@
+[1] P-matrix for branch length 0.100000
++0.9959   +0.0001   +0.0005   +0.0007   +0.0012   +0.0013   +0.0003   
++0.0001   +0.9979   +0.0003   +0.0003   +0.0004   +0.0004   +0.0005   
++0.0005   +0.0003   +0.9967   +0.0005   +0.0007   +0.0006   +0.0006   
++0.0007   +0.0004   +0.0006   +0.9957   +0.0009   +0.0008   +0.0008   
++0.0010   +0.0004   +0.0006   +0.0007   +0.9956   +0.0009   +0.0009   
++0.0012   +0.0004   +0.0006   +0.0007   +0.0010   +0.9957   +0.0002   
++0.0003   +0.0006   +0.0007   +0.0007   +0.0011   +0.0003   +0.9964   
+
++0.9692   +0.0011   +0.0039   +0.0050   +0.0090   +0.0097   +0.0020   
++0.0009   +0.9845   +0.0024   +0.0022   +0.0032   +0.0030   +0.0038   
++0.0036   +0.0026   +0.9757   +0.0037   +0.0052   +0.0047   +0.0045   
++0.0054   +0.0028   +0.0043   +0.9683   +0.0070   +0.0063   +0.0060   
++0.0072   +0.0030   +0.0045   +0.0051   +0.9672   +0.0066   +0.0063   
++0.0090   +0.0032   +0.0047   +0.0053   +0.0077   +0.9683   +0.0019   
++0.0020   +0.0045   +0.0049   +0.0055   +0.0079   +0.0020   +0.9733   
+
++0.9039   +0.0037   +0.0125   +0.0155   +0.0278   +0.0299   +0.0067   
++0.0032   +0.9507   +0.0076   +0.0070   +0.0102   +0.0093   +0.0120   
++0.0115   +0.0082   +0.9233   +0.0115   +0.0164   +0.0148   +0.0142   
++0.0169   +0.0089   +0.0136   +0.9008   +0.0218   +0.0194   +0.0185   
++0.0222   +0.0095   +0.0142   +0.0160   +0.8980   +0.0206   +0.0195   
++0.0276   +0.0101   +0.0148   +0.0165   +0.0238   +0.9012   +0.0061   
++0.0067   +0.0140   +0.0154   +0.0169   +0.0244   +0.0066   +0.9160   
+
++0.7077   +0.0145   +0.0399   +0.0471   +0.0812   +0.0861   +0.0235   
++0.0124   +0.8387   +0.0253   +0.0229   +0.0330   +0.0298   +0.0378   
++0.0368   +0.0273   +0.7589   +0.0363   +0.0512   +0.0458   +0.0439   
++0.0514   +0.0292   +0.0429   +0.6976   +0.0656   +0.0582   +0.0551   
++0.0650   +0.0308   +0.0444   +0.0481   +0.6930   +0.0613   +0.0574   
++0.0795   +0.0321   +0.0458   +0.0493   +0.0707   +0.7006   +0.0221   
++0.0235   +0.0441   +0.0475   +0.0505   +0.0717   +0.0239   +0.7388   
+
+
+[2] P-matrix for branch length 0.200000
++0.9917   +0.0003   +0.0011   +0.0013   +0.0024   +0.0026   +0.0005   
++0.0002   +0.9959   +0.0006   +0.0006   +0.0009   +0.0008   +0.0010   
++0.0010   +0.0007   +0.9935   +0.0010   +0.0014   +0.0013   +0.0012   
++0.0015   +0.0007   +0.0012   +0.9915   +0.0019   +0.0017   +0.0016   
++0.0019   +0.0008   +0.0012   +0.0014   +0.9912   +0.0018   +0.0017   
++0.0024   +0.0009   +0.0013   +0.0014   +0.0021   +0.9915   +0.0005   
++0.0005   +0.0012   +0.0013   +0.0015   +0.0021   +0.0005   +0.9928   
+
++0.9396   +0.0022   +0.0078   +0.0098   +0.0176   +0.0190   +0.0041   
++0.0019   +0.9694   +0.0047   +0.0043   +0.0063   +0.0058   +0.0075   
++0.0072   +0.0051   +0.9520   +0.0072   +0.0103   +0.0093   +0.0089   
++0.0106   +0.0055   +0.0085   +0.9377   +0.0137   +0.0123   +0.0117   
++0.0141   +0.0059   +0.0089   +0.0101   +0.9358   +0.0130   +0.0123   
++0.0175   +0.0063   +0.0093   +0.0104   +0.0150   +0.9378   +0.0037   
++0.0041   +0.0088   +0.0097   +0.0107   +0.0154   +0.0040   +0.9474   
+
++0.8190   +0.0078   +0.0240   +0.0292   +0.0515   +0.0551   +0.0133   
++0.0067   +0.9044   +0.0149   +0.0135   +0.0197   +0.0179   +0.0230   
++0.0222   +0.0160   +0.8535   +0.0220   +0.0312   +0.0281   +0.0269   
++0.0319   +0.0172   +0.0261   +0.8130   +0.0409   +0.0364   +0.0345   
++0.0412   +0.0183   +0.0271   +0.0300   +0.8087   +0.0385   +0.0362   
++0.0509   +0.0193   +0.0281   +0.0308   +0.0444   +0.8141   +0.0124   
++0.0133   +0.0268   +0.0292   +0.0316   +0.0453   +0.0134   +0.8403   
+
++0.5176   +0.0312   +0.0695   +0.0774   +0.1271   +0.1318   +0.0454   
++0.0267   +0.7087   +0.0465   +0.0417   +0.0592   +0.0524   +0.0648   
++0.0642   +0.0501   +0.5860   +0.0621   +0.0870   +0.0771   +0.0735   
++0.0844   +0.0530   +0.0734   +0.5001   +0.1067   +0.0940   +0.0883   
++0.1017   +0.0553   +0.0754   +0.0782   +0.5005   +0.0981   +0.0908   
++0.1217   +0.0564   +0.0771   +0.0795   +0.1132   +0.5084   +0.0437   
++0.0454   +0.0756   +0.0796   +0.0810   +0.1135   +0.0473   +0.5575   
+
+
+[3] P-matrix for branch length 1.000000
++0.9595   +0.0015   +0.0052   +0.0066   +0.0118   +0.0128   +0.0027   
++0.0013   +0.9796   +0.0031   +0.0029   +0.0042   +0.0039   +0.0050   
++0.0048   +0.0034   +0.9679   +0.0048   +0.0069   +0.0062   +0.0060   
++0.0071   +0.0037   +0.0057   +0.9582   +0.0092   +0.0082   +0.0078   
++0.0095   +0.0039   +0.0060   +0.0068   +0.9568   +0.0087   +0.0083   
++0.0118   +0.0042   +0.0062   +0.0070   +0.0101   +0.9583   +0.0025   
++0.0027   +0.0059   +0.0065   +0.0072   +0.0104   +0.0027   +0.9647   
+
++0.7389   +0.0124   +0.0353   +0.0421   +0.0731   +0.0777   +0.0204   
++0.0107   +0.8577   +0.0223   +0.0202   +0.0292   +0.0264   +0.0336   
++0.0326   +0.0240   +0.7858   +0.0322   +0.0455   +0.0408   +0.0391   
++0.0460   +0.0257   +0.0381   +0.7299   +0.0587   +0.0522   +0.0494   
++0.0584   +0.0272   +0.0395   +0.0431   +0.7252   +0.0550   +0.0516   
++0.0717   +0.0284   +0.0408   +0.0441   +0.0634   +0.7323   +0.0192   
++0.0204   +0.0392   +0.0423   +0.0453   +0.0645   +0.0208   +0.7675   
+
++0.4103   +0.0452   +0.0881   +0.0939   +0.1492   +0.1518   +0.0614   
++0.0388   +0.6195   +0.0615   +0.0546   +0.0769   +0.0672   +0.0814   
++0.0814   +0.0662   +0.4799   +0.0778   +0.1084   +0.0955   +0.0907   
++0.1025   +0.0695   +0.0920   +0.3888   +0.1287   +0.1129   +0.1056   
++0.1194   +0.0718   +0.0939   +0.0944   +0.3958   +0.1171   +0.1076   
++0.1401   +0.0724   +0.0955   +0.0955   +0.1352   +0.4015   +0.0598   
++0.0614   +0.0950   +0.0983   +0.0968   +0.1345   +0.0648   +0.4493   
+
++0.1563   +0.1247   +0.1415   +0.1246   +0.1731   +0.1559   +0.1238   
++0.1069   +0.2592   +0.1253   +0.1073   +0.1469   +0.1258   +0.1285   
++0.1306   +0.1350   +0.1771   +0.1199   +0.1638   +0.1421   +0.1315   
++0.1360   +0.1366   +0.1417   +0.1370   +0.1685   +0.1462   +0.1341   
++0.1385   +0.1371   +0.1420   +0.1236   +0.1781   +0.1471   +0.1336   
++0.1439   +0.1355   +0.1421   +0.1237   +0.1697   +0.1615   +0.1236   
++0.1238   +0.1499   +0.1425   +0.1229   +0.1671   +0.1339   +0.1600   
+
+
+[4] P-matrix for branch length 1.000000
++0.9595   +0.0015   +0.0052   +0.0066   +0.0118   +0.0128   +0.0027   
++0.0013   +0.9796   +0.0031   +0.0029   +0.0042   +0.0039   +0.0050   
++0.0048   +0.0034   +0.9679   +0.0048   +0.0069   +0.0062   +0.0060   
++0.0071   +0.0037   +0.0057   +0.9582   +0.0092   +0.0082   +0.0078   
++0.0095   +0.0039   +0.0060   +0.0068   +0.9568   +0.0087   +0.0083   
++0.0118   +0.0042   +0.0062   +0.0070   +0.0101   +0.9583   +0.0025   
++0.0027   +0.0059   +0.0065   +0.0072   +0.0104   +0.0027   +0.9647   
+
++0.7389   +0.0124   +0.0353   +0.0421   +0.0731   +0.0777   +0.0204   
++0.0107   +0.8577   +0.0223   +0.0202   +0.0292   +0.0264   +0.0336   
++0.0326   +0.0240   +0.7858   +0.0322   +0.0455   +0.0408   +0.0391   
++0.0460   +0.0257   +0.0381   +0.7299   +0.0587   +0.0522   +0.0494   
++0.0584   +0.0272   +0.0395   +0.0431   +0.7252   +0.0550   +0.0516   
++0.0717   +0.0284   +0.0408   +0.0441   +0.0634   +0.7323   +0.0192   
++0.0204   +0.0392   +0.0423   +0.0453   +0.0645   +0.0208   +0.7675   
+
++0.4103   +0.0452   +0.0881   +0.0939   +0.1492   +0.1518   +0.0614   
++0.0388   +0.6195   +0.0615   +0.0546   +0.0769   +0.0672   +0.0814   
++0.0814   +0.0662   +0.4799   +0.0778   +0.1084   +0.0955   +0.0907   
++0.1025   +0.0695   +0.0920   +0.3888   +0.1287   +0.1129   +0.1056   
++0.1194   +0.0718   +0.0939   +0.0944   +0.3958   +0.1171   +0.1076   
++0.1401   +0.0724   +0.0955   +0.0955   +0.1352   +0.4015   +0.0598   
++0.0614   +0.0950   +0.0983   +0.0968   +0.1345   +0.0648   +0.4493   
+
++0.1563   +0.1247   +0.1415   +0.1246   +0.1731   +0.1559   +0.1238   
++0.1069   +0.2592   +0.1253   +0.1073   +0.1469   +0.1258   +0.1285   
++0.1306   +0.1350   +0.1771   +0.1199   +0.1638   +0.1421   +0.1315   
++0.1360   +0.1366   +0.1417   +0.1370   +0.1685   +0.1462   +0.1341   
++0.1385   +0.1371   +0.1420   +0.1236   +0.1781   +0.1471   +0.1336   
++0.1439   +0.1355   +0.1421   +0.1237   +0.1697   +0.1615   +0.1236   
++0.1238   +0.1499   +0.1425   +0.1229   +0.1671   +0.1339   +0.1600   
+
+
+[5] CLV 5: [ {(0.98353,0.00000,0.00000,0.00000,0.00000,0.00001,0.00000),(0.88284,0.00000,0.00005,0.00011,0.00020,0.00031,0.00002),(0.67077,0.00004,0.00049,0.00102,0.00170,0.00259,0.00018),(0.26793,0.00071,0.00412,0.00712,0.01034,0.01480,0.00206)} {(0.00105,0.00000,0.00097,0.00000,0.00000,0.00000,0.00000),(0.00732,0.00001,0.00685,0.00009,0.00013,0.00016,0.00004),(0.01966,0.00010,0.01891,0.00083,0.00112,0.00143,0.00039),(0.03598,0.00124,0.03760,0.00620,0.00767,0.00938,0.00361)} {(0.00000,0 [...]
+[6] CLV 6: [ {(0.97135,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.80400,0.00000,0.00002,0.00005,0.00009,0.00014,0.00001),(0.49672,0.00001,0.00018,0.00039,0.00068,0.00106,0.00006),(0.09954,0.00014,0.00093,0.00174,0.00266,0.00402,0.00043)} {(0.00104,0.00000,0.00096,0.00000,0.00000,0.00000,0.00000),(0.00710,0.00003,0.00665,0.00016,0.00020,0.00026,0.00000),(0.01785,0.00033,0.01727,0.00135,0.00169,0.00213,0.00013),(0.02748,0.00304,0.02881,0.00827,0.00949,0.01159,0.00285)} {(0.00000,0 [...]
+[7] CLV 7: [ {(0.98353,0.00000,0.00000,0.00000,0.00000,0.00001,0.00000),(0.88284,0.00000,0.00005,0.00011,0.00020,0.00031,0.00002),(0.67077,0.00004,0.00049,0.00102,0.00170,0.00259,0.00018),(0.26793,0.00071,0.00412,0.00712,0.01034,0.01480,0.00206)} {(0.00000,0.00058,0.00000,0.00073,0.00000,0.00000,0.00000),(0.00002,0.00419,0.00004,0.00515,0.00006,0.00007,0.00009),(0.00023,0.01224,0.00035,0.01401,0.00055,0.00060,0.00085),(0.00241,0.02953,0.00311,0.02653,0.00432,0.00449,0.00612)} {(0.00000,0 [...]
+
+inner-inner logL: -95.791417
+persite logL:     -2.8335795  -10.7142648  -7.5776319  -2.0675460  -12.0672153  -12.2778810  -9.6698751  -0.3875789  -9.0486143  -8.0535214  -11.8215995  -9.2721097  
+checksum logL:    -95.791417
+tip-inner logL:   -95.791417
+persite logL:     -2.8335795  -10.7142648  -7.5776319  -2.0675460  -12.0672153  -12.2778810  -9.6698751  -0.3875789  -9.0486143  -8.0535214  -11.8215995  -9.2721097  
+checksum logL:    -95.791417
diff --git a/test/out/00020_NMDR_lkcalc.out b/test/out/00020_NMDR_lkcalc.out
new file mode 100644
index 0000000..48a796a
--- /dev/null
+++ b/test/out/00020_NMDR_lkcalc.out
@@ -0,0 +1,98 @@
+[1] P-matrix for branch length 0.500000
++0.9864   +0.0064   +0.0040   +0.0032   
++0.0048   +0.9856   +0.0016   +0.0080   
++0.0120   +0.0064   +0.9784   +0.0032   
++0.0048   +0.0159   +0.0016   +0.9776   
+
++0.9038   +0.0460   +0.0272   +0.0230   
++0.0345   +0.9002   +0.0115   +0.0538   
++0.0815   +0.0460   +0.8495   +0.0230   
++0.0345   +0.1075   +0.0115   +0.8464   
+
++0.7344   +0.1314   +0.0685   +0.0657   
++0.0985   +0.7355   +0.0328   +0.1331   
++0.2056   +0.1314   +0.5973   +0.0657   
++0.0985   +0.2662   +0.0328   +0.6024   
+
++0.4368   +0.3019   +0.1104   +0.1509   
++0.2264   +0.4885   +0.0755   +0.2096   
++0.3312   +0.3019   +0.2160   +0.1509   
++0.2264   +0.4192   +0.0755   +0.2789   
+
+
+[2] P-matrix for branch length 0.500000
++0.9864   +0.0064   +0.0040   +0.0032   
++0.0048   +0.9856   +0.0016   +0.0080   
++0.0120   +0.0064   +0.9784   +0.0032   
++0.0048   +0.0159   +0.0016   +0.9776   
+
++0.9038   +0.0460   +0.0272   +0.0230   
++0.0345   +0.9002   +0.0115   +0.0538   
++0.0815   +0.0460   +0.8495   +0.0230   
++0.0345   +0.1075   +0.0115   +0.8464   
+
++0.7344   +0.1314   +0.0685   +0.0657   
++0.0985   +0.7355   +0.0328   +0.1331   
++0.2056   +0.1314   +0.5973   +0.0657   
++0.0985   +0.2662   +0.0328   +0.6024   
+
++0.4368   +0.3019   +0.1104   +0.1509   
++0.2264   +0.4885   +0.0755   +0.2096   
++0.3312   +0.3019   +0.2160   +0.1509   
++0.2264   +0.4192   +0.0755   +0.2789   
+
+
+[3] P-matrix for branch length 0.300000
++0.9918   +0.0039   +0.0024   +0.0019   
++0.0029   +0.9913   +0.0010   +0.0048   
++0.0072   +0.0039   +0.9870   +0.0019   
++0.0029   +0.0096   +0.0010   +0.9865   
+
++0.9405   +0.0283   +0.0171   +0.0141   
++0.0212   +0.9378   +0.0071   +0.0339   
++0.0512   +0.0283   +0.9063   +0.0141   
++0.0212   +0.0679   +0.0071   +0.9038   
+
++0.8249   +0.0850   +0.0475   +0.0425   
++0.0638   +0.8217   +0.0213   +0.0933   
++0.1426   +0.0850   +0.7299   +0.0425   
++0.0638   +0.1866   +0.0213   +0.7284   
+
++0.5586   +0.2278   +0.0997   +0.1139   
++0.1709   +0.5820   +0.0570   +0.1902   
++0.2990   +0.2278   +0.3592   +0.1139   
++0.1709   +0.3804   +0.0570   +0.3917   
+
+
+[4] P-matrix for branch length 0.200000
++0.9945   +0.0026   +0.0016   +0.0013   
++0.0019   +0.9942   +0.0006   +0.0032   
++0.0048   +0.0026   +0.9913   +0.0013   
++0.0019   +0.0064   +0.0006   +0.9910   
+
++0.9597   +0.0191   +0.0117   +0.0095   
++0.0143   +0.9577   +0.0048   +0.0232   
++0.0350   +0.0191   +0.9364   +0.0095   
++0.0143   +0.0464   +0.0048   +0.9345   
+
++0.8775   +0.0589   +0.0342   +0.0294   
++0.0442   +0.8737   +0.0147   +0.0674   
++0.1025   +0.0589   +0.8092   +0.0294   
++0.0442   +0.1348   +0.0147   +0.8063   
+
++0.6582   +0.1720   +0.0838   +0.0860   
++0.1290   +0.6666   +0.0430   +0.1614   
++0.2514   +0.1720   +0.4907   +0.0860   
++0.1290   +0.3228   +0.0430   +0.5052   
+
+
+[5] CLV 5: [ {(0.00636,0.01260,0.00010,0.01565),(0.04267,0.07948,0.00481,0.09473),(0.10512,0.17038,0.03564,0.18660),(0.17741,0.21300,0.14554,0.21184)} {(0.00634,0.00475,0.00008,0.00008),(0.04161,0.03109,0.00375,0.00371),(0.09649,0.07248,0.02701,0.02623),(0.13185,0.11060,0.09998,0.09491)} {(0.00004,0.97142,0.00004,0.00025),(0.00212,0.81035,0.00212,0.01156),(0.01726,0.54096,0.01726,0.07088),(0.09112,0.23865,0.09112,0.17576)} {(1.00000,1.00000,1.00000,1.00000),(1.00000,1.00000,1.00000,1.000 [...]
+[6] CLV 6: [ {(0.00632,0.00006,0.00000,0.00007),(0.04025,0.00270,0.00109,0.00312),(0.08393,0.01593,0.01594,0.01668),(0.08292,0.04519,0.06176,0.04517)} {(0.00629,0.00472,0.00018,0.00018),(0.03923,0.02966,0.00809,0.00797),(0.08396,0.06719,0.04722,0.04549),(0.11634,0.11132,0.11298,0.11023)} {(0.00004,0.94365,0.00004,0.00025),(0.00182,0.65731,0.00182,0.01043),(0.01177,0.30125,0.01177,0.05031),(0.04480,0.08839,0.04480,0.07403)} {(1.00000,1.00000,1.00000,1.00000),(1.00000,1.00000,1.00000,1.000 [...]
+[7] CLV 7: [ {(0.00004,0.97142,0.00004,0.00025),(0.00212,0.81035,0.00212,0.01156),(0.01726,0.54096,0.01726,0.07088),(0.09112,0.23865,0.09112,0.17576)} {(0.00317,0.00004,0.00004,0.00472),(0.02081,0.00186,0.00188,0.02923),(0.04824,0.01312,0.01350,0.05936),(0.06593,0.04746,0.04999,0.06314)} {(0.00004,0.97142,0.00004,0.00025),(0.00212,0.81035,0.00212,0.01156),(0.01726,0.54096,0.01726,0.07088),(0.09112,0.23865,0.09112,0.17576)} {(0.00322,0.00796,0.00322,0.97764),(0.02302,0.05376,0.02302,0.846 [...]
+
+inner-inner logL: -56.794804
+persite logL:     -5.4918656  -6.1108011  -1.8692434  -1.6094379  -5.5400058  -7.3473984  -5.8428678  -0.0000000  -5.2305290  -2.5066511  -7.5044254  -7.7415788  
+checksum logL:    -56.794804
+tip-inner logL:   -56.794804
+persite logL:     -5.4918656  -6.1108011  -1.8692434  -1.6094379  -5.5400058  -7.3473984  -5.8428678  -0.0000000  -5.2305290  -2.5066511  -7.5044254  -7.7415788  
+checksum logL:    -56.794804
diff --git a/test/out/00021_NMAR_lkcalc.out b/test/out/00021_NMAR_lkcalc.out
new file mode 100644
index 0000000..26dd3e2
--- /dev/null
+++ b/test/out/00021_NMAR_lkcalc.out
@@ -0,0 +1,354 @@
+[1] P-matrix for branch length 0.500000
++0.9781   +0.0002   +0.0007   +0.0009   +0.0002   +0.0006   +0.0016   +0.0035   +0.0001   +0.0004   +0.0006   +0.0004   +0.0002   +0.0001   +0.0021   +0.0046   +0.0035   +0.0000   +0.0001   +0.0022   
++0.0004   +0.9857   +0.0002   +0.0000   +0.0001   +0.0015   +0.0000   +0.0001   +0.0013   +0.0004   +0.0002   +0.0061   +0.0002   +0.0001   +0.0009   +0.0018   +0.0003   +0.0003   +0.0000   +0.0003   
++0.0014   +0.0002   +0.9706   +0.0069   +0.0000   +0.0007   +0.0012   +0.0020   +0.0029   +0.0005   +0.0005   +0.0042   +0.0000   +0.0001   +0.0004   +0.0056   +0.0022   +0.0000   +0.0005   +0.0002   
++0.0017   +0.0000   +0.0059   +0.9767   +0.0000   +0.0009   +0.0093   +0.0018   +0.0005   +0.0001   +0.0000   +0.0010   +0.0000   +0.0000   +0.0001   +0.0011   +0.0006   +0.0000   +0.0000   +0.0002   
++0.0005   +0.0002   +0.0000   +0.0000   +0.9956   +0.0000   +0.0000   +0.0002   +0.0002   +0.0003   +0.0000   +0.0000   +0.0000   +0.0000   +0.0002   +0.0018   +0.0002   +0.0000   +0.0005   +0.0005   
++0.0013   +0.0016   +0.0007   +0.0011   +0.0000   +0.9796   +0.0058   +0.0004   +0.0033   +0.0001   +0.0010   +0.0020   +0.0003   +0.0000   +0.0013   +0.0006   +0.0005   +0.0000   +0.0000   +0.0004   
++0.0028   +0.0000   +0.0010   +0.0088   +0.0000   +0.0045   +0.9776   +0.0012   +0.0002   +0.0004   +0.0002   +0.0011   +0.0001   +0.0000   +0.0004   +0.0009   +0.0003   +0.0000   +0.0001   +0.0004   
++0.0034   +0.0001   +0.0009   +0.0010   +0.0001   +0.0002   +0.0007   +0.9892   +0.0001   +0.0000   +0.0001   +0.0004   +0.0000   +0.0001   +0.0003   +0.0027   +0.0003   +0.0000   +0.0000   +0.0006   
++0.0003   +0.0016   +0.0035   +0.0007   +0.0002   +0.0038   +0.0004   +0.0002   +0.9855   +0.0000   +0.0006   +0.0004   +0.0000   +0.0003   +0.0008   +0.0004   +0.0002   +0.0000   +0.0006   +0.0005   
++0.0009   +0.0004   +0.0005   +0.0002   +0.0002   +0.0001   +0.0005   +0.0000   +0.0000   +0.9789   +0.0036   +0.0006   +0.0008   +0.0013   +0.0001   +0.0003   +0.0018   +0.0000   +0.0002   +0.0094   
++0.0006   +0.0001   +0.0002   +0.0000   +0.0000   +0.0005   +0.0001   +0.0001   +0.0002   +0.0016   +0.9912   +0.0002   +0.0013   +0.0010   +0.0003   +0.0002   +0.0003   +0.0001   +0.0001   +0.0019   
++0.0004   +0.0031   +0.0021   +0.0006   +0.0000   +0.0010   +0.0007   +0.0004   +0.0002   +0.0003   +0.0003   +0.9877   +0.0006   +0.0000   +0.0003   +0.0011   +0.0013   +0.0000   +0.0001   +0.0001   
++0.0010   +0.0006   +0.0000   +0.0000   +0.0000   +0.0007   +0.0002   +0.0003   +0.0000   +0.0020   +0.0074   +0.0032   +0.9793   +0.0006   +0.0001   +0.0007   +0.0010   +0.0000   +0.0000   +0.0027   
++0.0003   +0.0001   +0.0001   +0.0000   +0.0000   +0.0000   +0.0000   +0.0002   +0.0003   +0.0012   +0.0022   +0.0000   +0.0002   +0.9910   +0.0001   +0.0005   +0.0001   +0.0001   +0.0034   +0.0001   
++0.0036   +0.0007   +0.0003   +0.0001   +0.0001   +0.0010   +0.0004   +0.0005   +0.0005   +0.0001   +0.0005   +0.0004   +0.0000   +0.0001   +0.9877   +0.0028   +0.0008   +0.0000   +0.0000   +0.0005   
++0.0058   +0.0010   +0.0032   +0.0007   +0.0009   +0.0004   +0.0006   +0.0034   +0.0002   +0.0002   +0.0002   +0.0013   +0.0002   +0.0003   +0.0020   +0.9737   +0.0052   +0.0001   +0.0002   +0.0003   
++0.0053   +0.0002   +0.0015   +0.0005   +0.0001   +0.0003   +0.0003   +0.0005   +0.0001   +0.0012   +0.0005   +0.0018   +0.0003   +0.0001   +0.0007   +0.0062   +0.9787   +0.0000   +0.0002   +0.0017   
++0.0000   +0.0014   +0.0002   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0002   +0.0000   +0.0006   +0.0000   +0.0000   +0.0005   +0.0000   +0.0009   +0.0000   +0.9960   +0.0003   +0.0000   
++0.0003   +0.0001   +0.0006   +0.0000   +0.0005   +0.0000   +0.0002   +0.0000   +0.0007   +0.0002   +0.0004   +0.0002   +0.0000   +0.0046   +0.0000   +0.0004   +0.0004   +0.0001   +0.9910   +0.0003   
++0.0030   +0.0002   +0.0001   +0.0001   +0.0003   +0.0002   +0.0003   +0.0008   +0.0002   +0.0053   +0.0025   +0.0001   +0.0006   +0.0001   +0.0004   +0.0004   +0.0015   +0.0000   +0.0001   +0.9837   
+
++0.8476   +0.0015   +0.0049   +0.0067   +0.0015   +0.0040   +0.0109   +0.0242   +0.0011   +0.0031   +0.0043   +0.0029   +0.0013   +0.0009   +0.0144   +0.0308   +0.0240   +0.0000   +0.0009   +0.0150   
++0.0031   +0.8975   +0.0020   +0.0003   +0.0010   +0.0107   +0.0005   +0.0012   +0.0093   +0.0027   +0.0017   +0.0425   +0.0016   +0.0007   +0.0062   +0.0119   +0.0022   +0.0025   +0.0003   +0.0020   
++0.0106   +0.0021   +0.8005   +0.0441   +0.0002   +0.0049   +0.0095   +0.0143   +0.0193   +0.0032   +0.0034   +0.0280   +0.0002   +0.0008   +0.0029   +0.0360   +0.0151   +0.0003   +0.0032   +0.0015   
++0.0124   +0.0002   +0.0381   +0.8402   +0.0000   +0.0067   +0.0606   +0.0131   +0.0037   +0.0012   +0.0002   +0.0073   +0.0001   +0.0000   +0.0011   +0.0084   +0.0049   +0.0000   +0.0001   +0.0016   
++0.0039   +0.0012   +0.0002   +0.0001   +0.9671   +0.0001   +0.0001   +0.0014   +0.0011   +0.0019   +0.0001   +0.0001   +0.0000   +0.0001   +0.0013   +0.0126   +0.0014   +0.0000   +0.0034   +0.0038   
++0.0092   +0.0114   +0.0052   +0.0082   +0.0001   +0.8569   +0.0382   +0.0033   +0.0226   +0.0010   +0.0072   +0.0143   +0.0019   +0.0001   +0.0089   +0.0049   +0.0038   +0.0000   +0.0001   +0.0028   
++0.0192   +0.0004   +0.0078   +0.0574   +0.0001   +0.0295   +0.8455   +0.0088   +0.0022   +0.0026   +0.0013   +0.0080   +0.0006   +0.0001   +0.0033   +0.0067   +0.0029   +0.0000   +0.0008   +0.0030   
++0.0238   +0.0006   +0.0065   +0.0069   +0.0005   +0.0014   +0.0049   +0.9220   +0.0005   +0.0002   +0.0009   +0.0028   +0.0003   +0.0007   +0.0024   +0.0184   +0.0028   +0.0000   +0.0001   +0.0042   
++0.0028   +0.0113   +0.0232   +0.0052   +0.0011   +0.0257   +0.0032   +0.0014   +0.8963   +0.0005   +0.0046   +0.0033   +0.0001   +0.0023   +0.0057   +0.0035   +0.0018   +0.0004   +0.0044   +0.0033   
++0.0072   +0.0030   +0.0035   +0.0015   +0.0018   +0.0010   +0.0035   +0.0004   +0.0004   +0.8530   +0.0254   +0.0045   +0.0056   +0.0089   +0.0009   +0.0024   +0.0126   +0.0000   +0.0014   +0.0629   
++0.0044   +0.0008   +0.0016   +0.0001   +0.0000   +0.0032   +0.0008   +0.0009   +0.0018   +0.0110   +0.9360   +0.0019   +0.0088   +0.0074   +0.0020   +0.0016   +0.0025   +0.0006   +0.0011   +0.0135   
++0.0032   +0.0216   +0.0141   +0.0043   +0.0000   +0.0068   +0.0049   +0.0031   +0.0014   +0.0020   +0.0020   +0.9115   +0.0040   +0.0001   +0.0022   +0.0080   +0.0092   +0.0000   +0.0005   +0.0010   
++0.0074   +0.0044   +0.0004   +0.0002   +0.0001   +0.0050   +0.0019   +0.0020   +0.0002   +0.0140   +0.0509   +0.0219   +0.8545   +0.0044   +0.0012   +0.0051   +0.0071   +0.0000   +0.0001   +0.0192   
++0.0020   +0.0007   +0.0008   +0.0001   +0.0001   +0.0001   +0.0001   +0.0016   +0.0019   +0.0082   +0.0159   +0.0001   +0.0016   +0.9344   +0.0007   +0.0037   +0.0011   +0.0010   +0.0245   +0.0014   
++0.0247   +0.0050   +0.0023   +0.0010   +0.0008   +0.0067   +0.0032   +0.0041   +0.0038   +0.0007   +0.0033   +0.0034   +0.0004   +0.0006   +0.9111   +0.0192   +0.0058   +0.0000   +0.0001   +0.0038   
++0.0386   +0.0070   +0.0209   +0.0057   +0.0061   +0.0027   +0.0048   +0.0234   +0.0017   +0.0013   +0.0019   +0.0093   +0.0011   +0.0021   +0.0140   +0.8200   +0.0345   +0.0009   +0.0013   +0.0028   
++0.0357   +0.0016   +0.0104   +0.0039   +0.0008   +0.0025   +0.0024   +0.0042   +0.0011   +0.0079   +0.0036   +0.0126   +0.0018   +0.0007   +0.0051   +0.0410   +0.8515   +0.0000   +0.0015   +0.0118   
++0.0002   +0.0096   +0.0011   +0.0000   +0.0000   +0.0001   +0.0000   +0.0001   +0.0011   +0.0001   +0.0047   +0.0003   +0.0000   +0.0037   +0.0001   +0.0059   +0.0001   +0.9703   +0.0022   +0.0001   
++0.0026   +0.0005   +0.0043   +0.0002   +0.0038   +0.0001   +0.0013   +0.0002   +0.0050   +0.0018   +0.0032   +0.0013   +0.0001   +0.0325   +0.0001   +0.0029   +0.0029   +0.0008   +0.9343   +0.0022   
++0.0202   +0.0012   +0.0010   +0.0012   +0.0020   +0.0017   +0.0023   +0.0058   +0.0017   +0.0359   +0.0177   +0.0013   +0.0044   +0.0008   +0.0030   +0.0030   +0.0106   +0.0000   +0.0010   +0.8851   
+
++0.5954   +0.0052   +0.0152   +0.0192   +0.0049   +0.0117   +0.0279   +0.0641   +0.0040   +0.0098   +0.0132   +0.0110   +0.0036   +0.0030   +0.0376   +0.0736   +0.0592   +0.0002   +0.0028   +0.0384   
++0.0112   +0.7075   +0.0084   +0.0025   +0.0030   +0.0281   +0.0039   +0.0054   +0.0250   +0.0075   +0.0063   +0.1121   +0.0047   +0.0023   +0.0177   +0.0306   +0.0089   +0.0070   +0.0013   +0.0066   
++0.0327   +0.0085   +0.4956   +0.0962   +0.0014   +0.0152   +0.0305   +0.0398   +0.0451   +0.0082   +0.0099   +0.0686   +0.0012   +0.0029   +0.0101   +0.0796   +0.0387   +0.0009   +0.0083   +0.0066   
++0.0357   +0.0022   +0.0830   +0.5836   +0.0005   +0.0220   +0.1377   +0.0375   +0.0123   +0.0041   +0.0021   +0.0237   +0.0006   +0.0005   +0.0052   +0.0264   +0.0157   +0.0001   +0.0010   +0.0060   
++0.0127   +0.0037   +0.0017   +0.0007   +0.8972   +0.0006   +0.0007   +0.0054   +0.0034   +0.0058   +0.0010   +0.0012   +0.0003   +0.0008   +0.0045   +0.0330   +0.0058   +0.0001   +0.0101   +0.0113   
++0.0266   +0.0300   +0.0161   +0.0269   +0.0005   +0.6114   +0.0896   +0.0117   +0.0560   +0.0037   +0.0201   +0.0396   +0.0051   +0.0008   +0.0241   +0.0157   +0.0118   +0.0002   +0.0009   +0.0090   
++0.0490   +0.0032   +0.0249   +0.1303   +0.0005   +0.0692   +0.5943   +0.0272   +0.0087   +0.0070   +0.0052   +0.0238   +0.0018   +0.0006   +0.0106   +0.0207   +0.0109   +0.0001   +0.0023   +0.0096   
++0.0630   +0.0025   +0.0181   +0.0199   +0.0021   +0.0050   +0.0152   +0.7721   +0.0024   +0.0016   +0.0034   +0.0096   +0.0012   +0.0023   +0.0086   +0.0482   +0.0115   +0.0001   +0.0005   +0.0127   
++0.0104   +0.0304   +0.0543   +0.0171   +0.0034   +0.0638   +0.0129   +0.0062   +0.7041   +0.0024   +0.0138   +0.0140   +0.0007   +0.0069   +0.0164   +0.0129   +0.0072   +0.0012   +0.0124   +0.0097   
++0.0232   +0.0083   +0.0090   +0.0052   +0.0052   +0.0039   +0.0094   +0.0038   +0.0022   +0.6047   +0.0700   +0.0135   +0.0146   +0.0237   +0.0040   +0.0095   +0.0324   +0.0002   +0.0048   +0.1521   
++0.0134   +0.0030   +0.0047   +0.0012   +0.0004   +0.0090   +0.0030   +0.0036   +0.0054   +0.0303   +0.8103   +0.0068   +0.0229   +0.0215   +0.0062   +0.0057   +0.0082   +0.0018   +0.0039   +0.0388   
++0.0119   +0.0570   +0.0345   +0.0138   +0.0005   +0.0188   +0.0147   +0.0106   +0.0058   +0.0062   +0.0072   +0.7455   +0.0103   +0.0006   +0.0074   +0.0237   +0.0251   +0.0003   +0.0017   +0.0044   
++0.0214   +0.0130   +0.0033   +0.0019   +0.0006   +0.0131   +0.0062   +0.0071   +0.0017   +0.0366   +0.1324   +0.0562   +0.6018   +0.0130   +0.0047   +0.0145   +0.0198   +0.0002   +0.0011   +0.0516   
++0.0067   +0.0024   +0.0029   +0.0006   +0.0007   +0.0008   +0.0007   +0.0052   +0.0059   +0.0219   +0.0461   +0.0013   +0.0048   +0.8053   +0.0025   +0.0101   +0.0042   +0.0029   +0.0685   +0.0065   
++0.0646   +0.0142   +0.0080   +0.0048   +0.0030   +0.0182   +0.0103   +0.0151   +0.0109   +0.0029   +0.0104   +0.0117   +0.0014   +0.0020   +0.7412   +0.0495   +0.0189   +0.0002   +0.0005   +0.0121   
++0.0921   +0.0180   +0.0462   +0.0178   +0.0159   +0.0086   +0.0148   +0.0614   +0.0062   +0.0051   +0.0070   +0.0274   +0.0031   +0.0057   +0.0361   +0.5374   +0.0802   +0.0024   +0.0039   +0.0108   
++0.0882   +0.0062   +0.0267   +0.0126   +0.0033   +0.0077   +0.0092   +0.0174   +0.0041   +0.0204   +0.0120   +0.0345   +0.0050   +0.0029   +0.0164   +0.0953   +0.6013   +0.0002   +0.0044   +0.0322   
++0.0015   +0.0272   +0.0035   +0.0005   +0.0003   +0.0008   +0.0003   +0.0009   +0.0037   +0.0006   +0.0143   +0.0026   +0.0003   +0.0112   +0.0008   +0.0158   +0.0013   +0.9068   +0.0069   +0.0006   
++0.0080   +0.0018   +0.0112   +0.0016   +0.0113   +0.0012   +0.0037   +0.0015   +0.0139   +0.0060   +0.0112   +0.0046   +0.0006   +0.0911   +0.0009   +0.0090   +0.0086   +0.0024   +0.8044   +0.0070   
++0.0517   +0.0042   +0.0041   +0.0044   +0.0059   +0.0053   +0.0074   +0.0174   +0.0050   +0.0867   +0.0512   +0.0055   +0.0118   +0.0040   +0.0094   +0.0116   +0.0291   +0.0001   +0.0032   +0.6819   
+
++0.2209   +0.0189   +0.0364   +0.0432   +0.0147   +0.0277   +0.0494   +0.1167   +0.0159   +0.0266   +0.0384   +0.0414   +0.0088   +0.0108   +0.0661   +0.1013   +0.0869   +0.0014   +0.0086   +0.0658   
++0.0402   +0.3218   +0.0303   +0.0195   +0.0094   +0.0505   +0.0236   +0.0274   +0.0473   +0.0174   +0.0254   +0.1928   +0.0111   +0.0083   +0.0404   +0.0567   +0.0335   +0.0152   +0.0063   +0.0229   
++0.0785   +0.0306   +0.1260   +0.1009   +0.0084   +0.0392   +0.0682   +0.0842   +0.0580   +0.0180   +0.0284   +0.1050   +0.0064   +0.0110   +0.0328   +0.0931   +0.0648   +0.0027   +0.0159   +0.0280   
++0.0804   +0.0170   +0.0870   +0.2131   +0.0047   +0.0533   +0.1543   +0.0861   +0.0331   +0.0140   +0.0168   +0.0652   +0.0045   +0.0048   +0.0255   +0.0642   +0.0443   +0.0010   +0.0063   +0.0246   
++0.0384   +0.0115   +0.0101   +0.0066   +0.6850   +0.0051   +0.0066   +0.0239   +0.0100   +0.0155   +0.0092   +0.0105   +0.0021   +0.0071   +0.0169   +0.0621   +0.0231   +0.0008   +0.0254   +0.0303   
++0.0632   +0.0540   +0.0414   +0.0653   +0.0044   +0.2097   +0.1122   +0.0434   +0.0808   +0.0148   +0.0449   +0.0838   +0.0100   +0.0066   +0.0479   +0.0460   +0.0349   +0.0018   +0.0064   +0.0283   
++0.0868   +0.0195   +0.0556   +0.1460   +0.0045   +0.0867   +0.2218   +0.0727   +0.0307   +0.0167   +0.0228   +0.0618   +0.0060   +0.0052   +0.0321   +0.0552   +0.0388   +0.0008   +0.0068   +0.0295   
++0.1148   +0.0126   +0.0384   +0.0456   +0.0090   +0.0188   +0.0406   +0.4314   +0.0118   +0.0114   +0.0175   +0.0348   +0.0046   +0.0078   +0.0311   +0.0867   +0.0431   +0.0009   +0.0042   +0.0347   
++0.0413   +0.0575   +0.0697   +0.0461   +0.0099   +0.0920   +0.0452   +0.0312   +0.3111   +0.0124   +0.0377   +0.0558   +0.0051   +0.0190   +0.0391   +0.0423   +0.0284   +0.0038   +0.0262   +0.0261   
++0.0627   +0.0193   +0.0197   +0.0178   +0.0141   +0.0154   +0.0224   +0.0273   +0.0113   +0.2123   +0.1413   +0.0368   +0.0253   +0.0456   +0.0192   +0.0350   +0.0570   +0.0015   +0.0161   +0.2001   
++0.0392   +0.0122   +0.0135   +0.0092   +0.0036   +0.0201   +0.0133   +0.0182   +0.0149   +0.0611   +0.5048   +0.0258   +0.0382   +0.0505   +0.0188   +0.0221   +0.0269   +0.0048   +0.0150   +0.0879   
++0.0449   +0.0980   +0.0528   +0.0380   +0.0044   +0.0399   +0.0381   +0.0383   +0.0233   +0.0169   +0.0273   +0.3927   +0.0169   +0.0055   +0.0258   +0.0558   +0.0513   +0.0025   +0.0063   +0.0215   
++0.0521   +0.0309   +0.0177   +0.0142   +0.0048   +0.0259   +0.0201   +0.0278   +0.0116   +0.0632   +0.2208   +0.0923   +0.1801   +0.0326   +0.0196   +0.0361   +0.0430   +0.0020   +0.0088   +0.0967   
++0.0237   +0.0086   +0.0112   +0.0056   +0.0060   +0.0064   +0.0064   +0.0173   +0.0161   +0.0423   +0.1085   +0.0111   +0.0121   +0.4919   +0.0099   +0.0237   +0.0173   +0.0082   +0.1427   +0.0312   
++0.1136   +0.0326   +0.0262   +0.0236   +0.0112   +0.0362   +0.0314   +0.0544   +0.0259   +0.0139   +0.0316   +0.0409   +0.0057   +0.0078   +0.3659   +0.0861   +0.0518   +0.0014   +0.0046   +0.0352   
++0.1268   +0.0333   +0.0541   +0.0432   +0.0299   +0.0253   +0.0393   +0.1105   +0.0205   +0.0186   +0.0271   +0.0646   +0.0077   +0.0135   +0.0627   +0.1705   +0.0989   +0.0049   +0.0110   +0.0377   
++0.1293   +0.0234   +0.0447   +0.0355   +0.0132   +0.0228   +0.0328   +0.0653   +0.0163   +0.0359   +0.0393   +0.0706   +0.0108   +0.0118   +0.0448   +0.1175   +0.2090   +0.0017   +0.0114   +0.0640   
++0.0114   +0.0594   +0.0104   +0.0043   +0.0025   +0.0065   +0.0039   +0.0080   +0.0120   +0.0052   +0.0391   +0.0192   +0.0028   +0.0310   +0.0068   +0.0323   +0.0093   +0.7091   +0.0203   +0.0064   
++0.0251   +0.0086   +0.0214   +0.0098   +0.0284   +0.0081   +0.0113   +0.0125   +0.0295   +0.0199   +0.0429   +0.0169   +0.0043   +0.1897   +0.0077   +0.0255   +0.0223   +0.0071   +0.4861   +0.0228   
++0.0885   +0.0145   +0.0175   +0.0178   +0.0157   +0.0167   +0.0226   +0.0476   +0.0136   +0.1140   +0.1159   +0.0267   +0.0220   +0.0192   +0.0276   +0.0405   +0.0579   +0.0010   +0.0105   +0.3101   
+
+
+[2] P-matrix for branch length 0.500000
++0.9781   +0.0002   +0.0007   +0.0009   +0.0002   +0.0006   +0.0016   +0.0035   +0.0001   +0.0004   +0.0006   +0.0004   +0.0002   +0.0001   +0.0021   +0.0046   +0.0035   +0.0000   +0.0001   +0.0022   
++0.0004   +0.9857   +0.0002   +0.0000   +0.0001   +0.0015   +0.0000   +0.0001   +0.0013   +0.0004   +0.0002   +0.0061   +0.0002   +0.0001   +0.0009   +0.0018   +0.0003   +0.0003   +0.0000   +0.0003   
++0.0014   +0.0002   +0.9706   +0.0069   +0.0000   +0.0007   +0.0012   +0.0020   +0.0029   +0.0005   +0.0005   +0.0042   +0.0000   +0.0001   +0.0004   +0.0056   +0.0022   +0.0000   +0.0005   +0.0002   
++0.0017   +0.0000   +0.0059   +0.9767   +0.0000   +0.0009   +0.0093   +0.0018   +0.0005   +0.0001   +0.0000   +0.0010   +0.0000   +0.0000   +0.0001   +0.0011   +0.0006   +0.0000   +0.0000   +0.0002   
++0.0005   +0.0002   +0.0000   +0.0000   +0.9956   +0.0000   +0.0000   +0.0002   +0.0002   +0.0003   +0.0000   +0.0000   +0.0000   +0.0000   +0.0002   +0.0018   +0.0002   +0.0000   +0.0005   +0.0005   
++0.0013   +0.0016   +0.0007   +0.0011   +0.0000   +0.9796   +0.0058   +0.0004   +0.0033   +0.0001   +0.0010   +0.0020   +0.0003   +0.0000   +0.0013   +0.0006   +0.0005   +0.0000   +0.0000   +0.0004   
++0.0028   +0.0000   +0.0010   +0.0088   +0.0000   +0.0045   +0.9776   +0.0012   +0.0002   +0.0004   +0.0002   +0.0011   +0.0001   +0.0000   +0.0004   +0.0009   +0.0003   +0.0000   +0.0001   +0.0004   
++0.0034   +0.0001   +0.0009   +0.0010   +0.0001   +0.0002   +0.0007   +0.9892   +0.0001   +0.0000   +0.0001   +0.0004   +0.0000   +0.0001   +0.0003   +0.0027   +0.0003   +0.0000   +0.0000   +0.0006   
++0.0003   +0.0016   +0.0035   +0.0007   +0.0002   +0.0038   +0.0004   +0.0002   +0.9855   +0.0000   +0.0006   +0.0004   +0.0000   +0.0003   +0.0008   +0.0004   +0.0002   +0.0000   +0.0006   +0.0005   
++0.0009   +0.0004   +0.0005   +0.0002   +0.0002   +0.0001   +0.0005   +0.0000   +0.0000   +0.9789   +0.0036   +0.0006   +0.0008   +0.0013   +0.0001   +0.0003   +0.0018   +0.0000   +0.0002   +0.0094   
++0.0006   +0.0001   +0.0002   +0.0000   +0.0000   +0.0005   +0.0001   +0.0001   +0.0002   +0.0016   +0.9912   +0.0002   +0.0013   +0.0010   +0.0003   +0.0002   +0.0003   +0.0001   +0.0001   +0.0019   
++0.0004   +0.0031   +0.0021   +0.0006   +0.0000   +0.0010   +0.0007   +0.0004   +0.0002   +0.0003   +0.0003   +0.9877   +0.0006   +0.0000   +0.0003   +0.0011   +0.0013   +0.0000   +0.0001   +0.0001   
++0.0010   +0.0006   +0.0000   +0.0000   +0.0000   +0.0007   +0.0002   +0.0003   +0.0000   +0.0020   +0.0074   +0.0032   +0.9793   +0.0006   +0.0001   +0.0007   +0.0010   +0.0000   +0.0000   +0.0027   
++0.0003   +0.0001   +0.0001   +0.0000   +0.0000   +0.0000   +0.0000   +0.0002   +0.0003   +0.0012   +0.0022   +0.0000   +0.0002   +0.9910   +0.0001   +0.0005   +0.0001   +0.0001   +0.0034   +0.0001   
++0.0036   +0.0007   +0.0003   +0.0001   +0.0001   +0.0010   +0.0004   +0.0005   +0.0005   +0.0001   +0.0005   +0.0004   +0.0000   +0.0001   +0.9877   +0.0028   +0.0008   +0.0000   +0.0000   +0.0005   
++0.0058   +0.0010   +0.0032   +0.0007   +0.0009   +0.0004   +0.0006   +0.0034   +0.0002   +0.0002   +0.0002   +0.0013   +0.0002   +0.0003   +0.0020   +0.9737   +0.0052   +0.0001   +0.0002   +0.0003   
++0.0053   +0.0002   +0.0015   +0.0005   +0.0001   +0.0003   +0.0003   +0.0005   +0.0001   +0.0012   +0.0005   +0.0018   +0.0003   +0.0001   +0.0007   +0.0062   +0.9787   +0.0000   +0.0002   +0.0017   
++0.0000   +0.0014   +0.0002   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0002   +0.0000   +0.0006   +0.0000   +0.0000   +0.0005   +0.0000   +0.0009   +0.0000   +0.9960   +0.0003   +0.0000   
++0.0003   +0.0001   +0.0006   +0.0000   +0.0005   +0.0000   +0.0002   +0.0000   +0.0007   +0.0002   +0.0004   +0.0002   +0.0000   +0.0046   +0.0000   +0.0004   +0.0004   +0.0001   +0.9910   +0.0003   
++0.0030   +0.0002   +0.0001   +0.0001   +0.0003   +0.0002   +0.0003   +0.0008   +0.0002   +0.0053   +0.0025   +0.0001   +0.0006   +0.0001   +0.0004   +0.0004   +0.0015   +0.0000   +0.0001   +0.9837   
+
++0.8476   +0.0015   +0.0049   +0.0067   +0.0015   +0.0040   +0.0109   +0.0242   +0.0011   +0.0031   +0.0043   +0.0029   +0.0013   +0.0009   +0.0144   +0.0308   +0.0240   +0.0000   +0.0009   +0.0150   
++0.0031   +0.8975   +0.0020   +0.0003   +0.0010   +0.0107   +0.0005   +0.0012   +0.0093   +0.0027   +0.0017   +0.0425   +0.0016   +0.0007   +0.0062   +0.0119   +0.0022   +0.0025   +0.0003   +0.0020   
++0.0106   +0.0021   +0.8005   +0.0441   +0.0002   +0.0049   +0.0095   +0.0143   +0.0193   +0.0032   +0.0034   +0.0280   +0.0002   +0.0008   +0.0029   +0.0360   +0.0151   +0.0003   +0.0032   +0.0015   
++0.0124   +0.0002   +0.0381   +0.8402   +0.0000   +0.0067   +0.0606   +0.0131   +0.0037   +0.0012   +0.0002   +0.0073   +0.0001   +0.0000   +0.0011   +0.0084   +0.0049   +0.0000   +0.0001   +0.0016   
++0.0039   +0.0012   +0.0002   +0.0001   +0.9671   +0.0001   +0.0001   +0.0014   +0.0011   +0.0019   +0.0001   +0.0001   +0.0000   +0.0001   +0.0013   +0.0126   +0.0014   +0.0000   +0.0034   +0.0038   
++0.0092   +0.0114   +0.0052   +0.0082   +0.0001   +0.8569   +0.0382   +0.0033   +0.0226   +0.0010   +0.0072   +0.0143   +0.0019   +0.0001   +0.0089   +0.0049   +0.0038   +0.0000   +0.0001   +0.0028   
++0.0192   +0.0004   +0.0078   +0.0574   +0.0001   +0.0295   +0.8455   +0.0088   +0.0022   +0.0026   +0.0013   +0.0080   +0.0006   +0.0001   +0.0033   +0.0067   +0.0029   +0.0000   +0.0008   +0.0030   
++0.0238   +0.0006   +0.0065   +0.0069   +0.0005   +0.0014   +0.0049   +0.9220   +0.0005   +0.0002   +0.0009   +0.0028   +0.0003   +0.0007   +0.0024   +0.0184   +0.0028   +0.0000   +0.0001   +0.0042   
++0.0028   +0.0113   +0.0232   +0.0052   +0.0011   +0.0257   +0.0032   +0.0014   +0.8963   +0.0005   +0.0046   +0.0033   +0.0001   +0.0023   +0.0057   +0.0035   +0.0018   +0.0004   +0.0044   +0.0033   
++0.0072   +0.0030   +0.0035   +0.0015   +0.0018   +0.0010   +0.0035   +0.0004   +0.0004   +0.8530   +0.0254   +0.0045   +0.0056   +0.0089   +0.0009   +0.0024   +0.0126   +0.0000   +0.0014   +0.0629   
++0.0044   +0.0008   +0.0016   +0.0001   +0.0000   +0.0032   +0.0008   +0.0009   +0.0018   +0.0110   +0.9360   +0.0019   +0.0088   +0.0074   +0.0020   +0.0016   +0.0025   +0.0006   +0.0011   +0.0135   
++0.0032   +0.0216   +0.0141   +0.0043   +0.0000   +0.0068   +0.0049   +0.0031   +0.0014   +0.0020   +0.0020   +0.9115   +0.0040   +0.0001   +0.0022   +0.0080   +0.0092   +0.0000   +0.0005   +0.0010   
++0.0074   +0.0044   +0.0004   +0.0002   +0.0001   +0.0050   +0.0019   +0.0020   +0.0002   +0.0140   +0.0509   +0.0219   +0.8545   +0.0044   +0.0012   +0.0051   +0.0071   +0.0000   +0.0001   +0.0192   
++0.0020   +0.0007   +0.0008   +0.0001   +0.0001   +0.0001   +0.0001   +0.0016   +0.0019   +0.0082   +0.0159   +0.0001   +0.0016   +0.9344   +0.0007   +0.0037   +0.0011   +0.0010   +0.0245   +0.0014   
++0.0247   +0.0050   +0.0023   +0.0010   +0.0008   +0.0067   +0.0032   +0.0041   +0.0038   +0.0007   +0.0033   +0.0034   +0.0004   +0.0006   +0.9111   +0.0192   +0.0058   +0.0000   +0.0001   +0.0038   
++0.0386   +0.0070   +0.0209   +0.0057   +0.0061   +0.0027   +0.0048   +0.0234   +0.0017   +0.0013   +0.0019   +0.0093   +0.0011   +0.0021   +0.0140   +0.8200   +0.0345   +0.0009   +0.0013   +0.0028   
++0.0357   +0.0016   +0.0104   +0.0039   +0.0008   +0.0025   +0.0024   +0.0042   +0.0011   +0.0079   +0.0036   +0.0126   +0.0018   +0.0007   +0.0051   +0.0410   +0.8515   +0.0000   +0.0015   +0.0118   
++0.0002   +0.0096   +0.0011   +0.0000   +0.0000   +0.0001   +0.0000   +0.0001   +0.0011   +0.0001   +0.0047   +0.0003   +0.0000   +0.0037   +0.0001   +0.0059   +0.0001   +0.9703   +0.0022   +0.0001   
++0.0026   +0.0005   +0.0043   +0.0002   +0.0038   +0.0001   +0.0013   +0.0002   +0.0050   +0.0018   +0.0032   +0.0013   +0.0001   +0.0325   +0.0001   +0.0029   +0.0029   +0.0008   +0.9343   +0.0022   
++0.0202   +0.0012   +0.0010   +0.0012   +0.0020   +0.0017   +0.0023   +0.0058   +0.0017   +0.0359   +0.0177   +0.0013   +0.0044   +0.0008   +0.0030   +0.0030   +0.0106   +0.0000   +0.0010   +0.8851   
+
++0.5954   +0.0052   +0.0152   +0.0192   +0.0049   +0.0117   +0.0279   +0.0641   +0.0040   +0.0098   +0.0132   +0.0110   +0.0036   +0.0030   +0.0376   +0.0736   +0.0592   +0.0002   +0.0028   +0.0384   
++0.0112   +0.7075   +0.0084   +0.0025   +0.0030   +0.0281   +0.0039   +0.0054   +0.0250   +0.0075   +0.0063   +0.1121   +0.0047   +0.0023   +0.0177   +0.0306   +0.0089   +0.0070   +0.0013   +0.0066   
++0.0327   +0.0085   +0.4956   +0.0962   +0.0014   +0.0152   +0.0305   +0.0398   +0.0451   +0.0082   +0.0099   +0.0686   +0.0012   +0.0029   +0.0101   +0.0796   +0.0387   +0.0009   +0.0083   +0.0066   
++0.0357   +0.0022   +0.0830   +0.5836   +0.0005   +0.0220   +0.1377   +0.0375   +0.0123   +0.0041   +0.0021   +0.0237   +0.0006   +0.0005   +0.0052   +0.0264   +0.0157   +0.0001   +0.0010   +0.0060   
++0.0127   +0.0037   +0.0017   +0.0007   +0.8972   +0.0006   +0.0007   +0.0054   +0.0034   +0.0058   +0.0010   +0.0012   +0.0003   +0.0008   +0.0045   +0.0330   +0.0058   +0.0001   +0.0101   +0.0113   
++0.0266   +0.0300   +0.0161   +0.0269   +0.0005   +0.6114   +0.0896   +0.0117   +0.0560   +0.0037   +0.0201   +0.0396   +0.0051   +0.0008   +0.0241   +0.0157   +0.0118   +0.0002   +0.0009   +0.0090   
++0.0490   +0.0032   +0.0249   +0.1303   +0.0005   +0.0692   +0.5943   +0.0272   +0.0087   +0.0070   +0.0052   +0.0238   +0.0018   +0.0006   +0.0106   +0.0207   +0.0109   +0.0001   +0.0023   +0.0096   
++0.0630   +0.0025   +0.0181   +0.0199   +0.0021   +0.0050   +0.0152   +0.7721   +0.0024   +0.0016   +0.0034   +0.0096   +0.0012   +0.0023   +0.0086   +0.0482   +0.0115   +0.0001   +0.0005   +0.0127   
++0.0104   +0.0304   +0.0543   +0.0171   +0.0034   +0.0638   +0.0129   +0.0062   +0.7041   +0.0024   +0.0138   +0.0140   +0.0007   +0.0069   +0.0164   +0.0129   +0.0072   +0.0012   +0.0124   +0.0097   
++0.0232   +0.0083   +0.0090   +0.0052   +0.0052   +0.0039   +0.0094   +0.0038   +0.0022   +0.6047   +0.0700   +0.0135   +0.0146   +0.0237   +0.0040   +0.0095   +0.0324   +0.0002   +0.0048   +0.1521   
++0.0134   +0.0030   +0.0047   +0.0012   +0.0004   +0.0090   +0.0030   +0.0036   +0.0054   +0.0303   +0.8103   +0.0068   +0.0229   +0.0215   +0.0062   +0.0057   +0.0082   +0.0018   +0.0039   +0.0388   
++0.0119   +0.0570   +0.0345   +0.0138   +0.0005   +0.0188   +0.0147   +0.0106   +0.0058   +0.0062   +0.0072   +0.7455   +0.0103   +0.0006   +0.0074   +0.0237   +0.0251   +0.0003   +0.0017   +0.0044   
++0.0214   +0.0130   +0.0033   +0.0019   +0.0006   +0.0131   +0.0062   +0.0071   +0.0017   +0.0366   +0.1324   +0.0562   +0.6018   +0.0130   +0.0047   +0.0145   +0.0198   +0.0002   +0.0011   +0.0516   
++0.0067   +0.0024   +0.0029   +0.0006   +0.0007   +0.0008   +0.0007   +0.0052   +0.0059   +0.0219   +0.0461   +0.0013   +0.0048   +0.8053   +0.0025   +0.0101   +0.0042   +0.0029   +0.0685   +0.0065   
++0.0646   +0.0142   +0.0080   +0.0048   +0.0030   +0.0182   +0.0103   +0.0151   +0.0109   +0.0029   +0.0104   +0.0117   +0.0014   +0.0020   +0.7412   +0.0495   +0.0189   +0.0002   +0.0005   +0.0121   
++0.0921   +0.0180   +0.0462   +0.0178   +0.0159   +0.0086   +0.0148   +0.0614   +0.0062   +0.0051   +0.0070   +0.0274   +0.0031   +0.0057   +0.0361   +0.5374   +0.0802   +0.0024   +0.0039   +0.0108   
++0.0882   +0.0062   +0.0267   +0.0126   +0.0033   +0.0077   +0.0092   +0.0174   +0.0041   +0.0204   +0.0120   +0.0345   +0.0050   +0.0029   +0.0164   +0.0953   +0.6013   +0.0002   +0.0044   +0.0322   
++0.0015   +0.0272   +0.0035   +0.0005   +0.0003   +0.0008   +0.0003   +0.0009   +0.0037   +0.0006   +0.0143   +0.0026   +0.0003   +0.0112   +0.0008   +0.0158   +0.0013   +0.9068   +0.0069   +0.0006   
++0.0080   +0.0018   +0.0112   +0.0016   +0.0113   +0.0012   +0.0037   +0.0015   +0.0139   +0.0060   +0.0112   +0.0046   +0.0006   +0.0911   +0.0009   +0.0090   +0.0086   +0.0024   +0.8044   +0.0070   
++0.0517   +0.0042   +0.0041   +0.0044   +0.0059   +0.0053   +0.0074   +0.0174   +0.0050   +0.0867   +0.0512   +0.0055   +0.0118   +0.0040   +0.0094   +0.0116   +0.0291   +0.0001   +0.0032   +0.6819   
+
++0.2209   +0.0189   +0.0364   +0.0432   +0.0147   +0.0277   +0.0494   +0.1167   +0.0159   +0.0266   +0.0384   +0.0414   +0.0088   +0.0108   +0.0661   +0.1013   +0.0869   +0.0014   +0.0086   +0.0658   
++0.0402   +0.3218   +0.0303   +0.0195   +0.0094   +0.0505   +0.0236   +0.0274   +0.0473   +0.0174   +0.0254   +0.1928   +0.0111   +0.0083   +0.0404   +0.0567   +0.0335   +0.0152   +0.0063   +0.0229   
++0.0785   +0.0306   +0.1260   +0.1009   +0.0084   +0.0392   +0.0682   +0.0842   +0.0580   +0.0180   +0.0284   +0.1050   +0.0064   +0.0110   +0.0328   +0.0931   +0.0648   +0.0027   +0.0159   +0.0280   
++0.0804   +0.0170   +0.0870   +0.2131   +0.0047   +0.0533   +0.1543   +0.0861   +0.0331   +0.0140   +0.0168   +0.0652   +0.0045   +0.0048   +0.0255   +0.0642   +0.0443   +0.0010   +0.0063   +0.0246   
++0.0384   +0.0115   +0.0101   +0.0066   +0.6850   +0.0051   +0.0066   +0.0239   +0.0100   +0.0155   +0.0092   +0.0105   +0.0021   +0.0071   +0.0169   +0.0621   +0.0231   +0.0008   +0.0254   +0.0303   
++0.0632   +0.0540   +0.0414   +0.0653   +0.0044   +0.2097   +0.1122   +0.0434   +0.0808   +0.0148   +0.0449   +0.0838   +0.0100   +0.0066   +0.0479   +0.0460   +0.0349   +0.0018   +0.0064   +0.0283   
++0.0868   +0.0195   +0.0556   +0.1460   +0.0045   +0.0867   +0.2218   +0.0727   +0.0307   +0.0167   +0.0228   +0.0618   +0.0060   +0.0052   +0.0321   +0.0552   +0.0388   +0.0008   +0.0068   +0.0295   
++0.1148   +0.0126   +0.0384   +0.0456   +0.0090   +0.0188   +0.0406   +0.4314   +0.0118   +0.0114   +0.0175   +0.0348   +0.0046   +0.0078   +0.0311   +0.0867   +0.0431   +0.0009   +0.0042   +0.0347   
++0.0413   +0.0575   +0.0697   +0.0461   +0.0099   +0.0920   +0.0452   +0.0312   +0.3111   +0.0124   +0.0377   +0.0558   +0.0051   +0.0190   +0.0391   +0.0423   +0.0284   +0.0038   +0.0262   +0.0261   
++0.0627   +0.0193   +0.0197   +0.0178   +0.0141   +0.0154   +0.0224   +0.0273   +0.0113   +0.2123   +0.1413   +0.0368   +0.0253   +0.0456   +0.0192   +0.0350   +0.0570   +0.0015   +0.0161   +0.2001   
++0.0392   +0.0122   +0.0135   +0.0092   +0.0036   +0.0201   +0.0133   +0.0182   +0.0149   +0.0611   +0.5048   +0.0258   +0.0382   +0.0505   +0.0188   +0.0221   +0.0269   +0.0048   +0.0150   +0.0879   
++0.0449   +0.0980   +0.0528   +0.0380   +0.0044   +0.0399   +0.0381   +0.0383   +0.0233   +0.0169   +0.0273   +0.3927   +0.0169   +0.0055   +0.0258   +0.0558   +0.0513   +0.0025   +0.0063   +0.0215   
++0.0521   +0.0309   +0.0177   +0.0142   +0.0048   +0.0259   +0.0201   +0.0278   +0.0116   +0.0632   +0.2208   +0.0923   +0.1801   +0.0326   +0.0196   +0.0361   +0.0430   +0.0020   +0.0088   +0.0967   
++0.0237   +0.0086   +0.0112   +0.0056   +0.0060   +0.0064   +0.0064   +0.0173   +0.0161   +0.0423   +0.1085   +0.0111   +0.0121   +0.4919   +0.0099   +0.0237   +0.0173   +0.0082   +0.1427   +0.0312   
++0.1136   +0.0326   +0.0262   +0.0236   +0.0112   +0.0362   +0.0314   +0.0544   +0.0259   +0.0139   +0.0316   +0.0409   +0.0057   +0.0078   +0.3659   +0.0861   +0.0518   +0.0014   +0.0046   +0.0352   
++0.1268   +0.0333   +0.0541   +0.0432   +0.0299   +0.0253   +0.0393   +0.1105   +0.0205   +0.0186   +0.0271   +0.0646   +0.0077   +0.0135   +0.0627   +0.1705   +0.0989   +0.0049   +0.0110   +0.0377   
++0.1293   +0.0234   +0.0447   +0.0355   +0.0132   +0.0228   +0.0328   +0.0653   +0.0163   +0.0359   +0.0393   +0.0706   +0.0108   +0.0118   +0.0448   +0.1175   +0.2090   +0.0017   +0.0114   +0.0640   
++0.0114   +0.0594   +0.0104   +0.0043   +0.0025   +0.0065   +0.0039   +0.0080   +0.0120   +0.0052   +0.0391   +0.0192   +0.0028   +0.0310   +0.0068   +0.0323   +0.0093   +0.7091   +0.0203   +0.0064   
++0.0251   +0.0086   +0.0214   +0.0098   +0.0284   +0.0081   +0.0113   +0.0125   +0.0295   +0.0199   +0.0429   +0.0169   +0.0043   +0.1897   +0.0077   +0.0255   +0.0223   +0.0071   +0.4861   +0.0228   
++0.0885   +0.0145   +0.0175   +0.0178   +0.0157   +0.0167   +0.0226   +0.0476   +0.0136   +0.1140   +0.1159   +0.0267   +0.0220   +0.0192   +0.0276   +0.0405   +0.0579   +0.0010   +0.0105   +0.3101   
+
+
+[3] P-matrix for branch length 0.300000
++0.9868   +0.0001   +0.0004   +0.0006   +0.0001   +0.0003   +0.0010   +0.0021   +0.0001   +0.0002   +0.0003   +0.0002   +0.0001   +0.0001   +0.0013   +0.0028   +0.0021   +0.0000   +0.0001   +0.0013   
++0.0002   +0.9914   +0.0001   +0.0000   +0.0001   +0.0009   +0.0000   +0.0001   +0.0008   +0.0002   +0.0001   +0.0037   +0.0001   +0.0001   +0.0005   +0.0011   +0.0002   +0.0002   +0.0000   +0.0002   
++0.0009   +0.0001   +0.9823   +0.0042   +0.0000   +0.0004   +0.0007   +0.0012   +0.0018   +0.0003   +0.0003   +0.0025   +0.0000   +0.0001   +0.0002   +0.0034   +0.0013   +0.0000   +0.0003   +0.0001   
++0.0010   +0.0000   +0.0036   +0.9860   +0.0000   +0.0005   +0.0056   +0.0011   +0.0003   +0.0001   +0.0000   +0.0006   +0.0000   +0.0000   +0.0001   +0.0007   +0.0004   +0.0000   +0.0000   +0.0001   
++0.0003   +0.0001   +0.0000   +0.0000   +0.9973   +0.0000   +0.0000   +0.0001   +0.0001   +0.0002   +0.0000   +0.0000   +0.0000   +0.0000   +0.0001   +0.0011   +0.0001   +0.0000   +0.0003   +0.0003   
++0.0008   +0.0010   +0.0004   +0.0006   +0.0000   +0.9877   +0.0035   +0.0002   +0.0020   +0.0001   +0.0006   +0.0012   +0.0002   +0.0000   +0.0008   +0.0004   +0.0003   +0.0000   +0.0000   +0.0002   
++0.0017   +0.0000   +0.0006   +0.0053   +0.0000   +0.0027   +0.9865   +0.0007   +0.0001   +0.0002   +0.0001   +0.0007   +0.0000   +0.0000   +0.0003   +0.0005   +0.0002   +0.0000   +0.0001   +0.0002   
++0.0021   +0.0000   +0.0006   +0.0006   +0.0000   +0.0001   +0.0004   +0.9935   +0.0000   +0.0000   +0.0001   +0.0002   +0.0000   +0.0001   +0.0002   +0.0016   +0.0002   +0.0000   +0.0000   +0.0003   
++0.0002   +0.0010   +0.0021   +0.0004   +0.0001   +0.0023   +0.0002   +0.0001   +0.9913   +0.0000   +0.0004   +0.0002   +0.0000   +0.0002   +0.0005   +0.0002   +0.0001   +0.0000   +0.0004   +0.0003   
++0.0006   +0.0003   +0.0003   +0.0001   +0.0001   +0.0001   +0.0003   +0.0000   +0.0000   +0.9873   +0.0022   +0.0004   +0.0005   +0.0008   +0.0001   +0.0002   +0.0011   +0.0000   +0.0001   +0.0057   
++0.0004   +0.0001   +0.0001   +0.0000   +0.0000   +0.0003   +0.0001   +0.0001   +0.0001   +0.0009   +0.9947   +0.0001   +0.0008   +0.0006   +0.0002   +0.0001   +0.0002   +0.0000   +0.0001   +0.0011   
++0.0002   +0.0019   +0.0013   +0.0003   +0.0000   +0.0006   +0.0004   +0.0002   +0.0001   +0.0002   +0.0002   +0.9926   +0.0004   +0.0000   +0.0002   +0.0007   +0.0008   +0.0000   +0.0000   +0.0001   
++0.0006   +0.0004   +0.0000   +0.0000   +0.0000   +0.0004   +0.0001   +0.0002   +0.0000   +0.0012   +0.0044   +0.0019   +0.9875   +0.0004   +0.0001   +0.0004   +0.0006   +0.0000   +0.0000   +0.0017   
++0.0002   +0.0001   +0.0001   +0.0000   +0.0000   +0.0000   +0.0000   +0.0001   +0.0002   +0.0007   +0.0013   +0.0000   +0.0001   +0.9946   +0.0001   +0.0003   +0.0001   +0.0001   +0.0021   +0.0001   
++0.0022   +0.0004   +0.0002   +0.0001   +0.0001   +0.0006   +0.0003   +0.0003   +0.0003   +0.0000   +0.0003   +0.0003   +0.0000   +0.0000   +0.9926   +0.0017   +0.0005   +0.0000   +0.0000   +0.0003   
++0.0035   +0.0006   +0.0020   +0.0004   +0.0005   +0.0002   +0.0004   +0.0020   +0.0001   +0.0001   +0.0001   +0.0008   +0.0001   +0.0002   +0.0012   +0.9841   +0.0032   +0.0001   +0.0001   +0.0002   
++0.0032   +0.0001   +0.0009   +0.0003   +0.0001   +0.0002   +0.0002   +0.0003   +0.0001   +0.0007   +0.0003   +0.0011   +0.0002   +0.0001   +0.0004   +0.0038   +0.9872   +0.0000   +0.0001   +0.0010   
++0.0000   +0.0008   +0.0001   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0001   +0.0000   +0.0004   +0.0000   +0.0000   +0.0003   +0.0000   +0.0005   +0.0000   +0.9976   +0.0002   +0.0000   
++0.0002   +0.0000   +0.0004   +0.0000   +0.0003   +0.0000   +0.0001   +0.0000   +0.0004   +0.0001   +0.0002   +0.0001   +0.0000   +0.0027   +0.0000   +0.0002   +0.0002   +0.0001   +0.9946   +0.0002   
++0.0018   +0.0001   +0.0001   +0.0001   +0.0002   +0.0001   +0.0002   +0.0005   +0.0001   +0.0032   +0.0015   +0.0001   +0.0004   +0.0000   +0.0002   +0.0002   +0.0009   +0.0000   +0.0001   +0.9902   
+
++0.9050   +0.0009   +0.0030   +0.0041   +0.0009   +0.0025   +0.0069   +0.0151   +0.0006   +0.0018   +0.0026   +0.0017   +0.0008   +0.0005   +0.0090   +0.0196   +0.0151   +0.0000   +0.0005   +0.0094   
++0.0018   +0.9370   +0.0011   +0.0001   +0.0006   +0.0067   +0.0002   +0.0007   +0.0058   +0.0017   +0.0010   +0.0265   +0.0010   +0.0004   +0.0038   +0.0075   +0.0013   +0.0015   +0.0002   +0.0012   
++0.0064   +0.0011   +0.8745   +0.0285   +0.0001   +0.0029   +0.0057   +0.0089   +0.0123   +0.0020   +0.0021   +0.0177   +0.0001   +0.0004   +0.0017   +0.0232   +0.0094   +0.0002   +0.0020   +0.0008   
++0.0076   +0.0001   +0.0246   +0.8999   +0.0000   +0.0040   +0.0388   +0.0080   +0.0022   +0.0007   +0.0001   +0.0044   +0.0000   +0.0000   +0.0006   +0.0050   +0.0029   +0.0000   +0.0000   +0.0009   
++0.0024   +0.0007   +0.0001   +0.0000   +0.9801   +0.0000   +0.0000   +0.0008   +0.0007   +0.0012   +0.0000   +0.0000   +0.0000   +0.0000   +0.0008   +0.0079   +0.0008   +0.0000   +0.0021   +0.0023   
++0.0056   +0.0071   +0.0031   +0.0049   +0.0000   +0.9112   +0.0243   +0.0019   +0.0142   +0.0005   +0.0045   +0.0088   +0.0012   +0.0000   +0.0055   +0.0029   +0.0023   +0.0000   +0.0000   +0.0017   
++0.0121   +0.0002   +0.0046   +0.0368   +0.0000   +0.0188   +0.9035   +0.0053   +0.0012   +0.0016   +0.0008   +0.0049   +0.0003   +0.0000   +0.0020   +0.0041   +0.0016   +0.0000   +0.0005   +0.0018   
++0.0148   +0.0003   +0.0040   +0.0043   +0.0003   +0.0008   +0.0030   +0.9523   +0.0003   +0.0001   +0.0005   +0.0017   +0.0002   +0.0004   +0.0014   +0.0115   +0.0015   +0.0000   +0.0000   +0.0026   
++0.0016   +0.0070   +0.0148   +0.0031   +0.0007   +0.0162   +0.0018   +0.0008   +0.9362   +0.0003   +0.0028   +0.0018   +0.0000   +0.0014   +0.0035   +0.0020   +0.0011   +0.0002   +0.0027   +0.0021   
++0.0043   +0.0019   +0.0022   +0.0009   +0.0011   +0.0006   +0.0021   +0.0002   +0.0002   +0.9086   +0.0157   +0.0027   +0.0035   +0.0055   +0.0005   +0.0014   +0.0079   +0.0000   +0.0008   +0.0399   
++0.0026   +0.0005   +0.0010   +0.0000   +0.0000   +0.0020   +0.0004   +0.0005   +0.0011   +0.0068   +0.9610   +0.0011   +0.0055   +0.0045   +0.0012   +0.0009   +0.0015   +0.0004   +0.0007   +0.0082   
++0.0018   +0.0135   +0.0089   +0.0025   +0.0000   +0.0042   +0.0030   +0.0018   +0.0008   +0.0012   +0.0012   +0.9457   +0.0025   +0.0000   +0.0013   +0.0049   +0.0057   +0.0000   +0.0003   +0.0006   
++0.0046   +0.0027   +0.0002   +0.0001   +0.0000   +0.0031   +0.0011   +0.0012   +0.0001   +0.0088   +0.0318   +0.0138   +0.9099   +0.0027   +0.0007   +0.0031   +0.0044   +0.0000   +0.0000   +0.0119   
++0.0012   +0.0004   +0.0005   +0.0000   +0.0000   +0.0000   +0.0000   +0.0010   +0.0012   +0.0051   +0.0098   +0.0000   +0.0010   +0.9600   +0.0004   +0.0023   +0.0006   +0.0006   +0.0151   +0.0007   
++0.0154   +0.0031   +0.0013   +0.0006   +0.0005   +0.0042   +0.0019   +0.0024   +0.0023   +0.0004   +0.0020   +0.0020   +0.0002   +0.0003   +0.9456   +0.0120   +0.0035   +0.0000   +0.0000   +0.0023   
++0.0245   +0.0044   +0.0135   +0.0034   +0.0038   +0.0016   +0.0029   +0.0146   +0.0010   +0.0007   +0.0011   +0.0057   +0.0007   +0.0013   +0.0087   +0.8871   +0.0220   +0.0006   +0.0008   +0.0016   
++0.0225   +0.0009   +0.0065   +0.0023   +0.0005   +0.0015   +0.0014   +0.0023   +0.0006   +0.0050   +0.0021   +0.0078   +0.0011   +0.0004   +0.0030   +0.0262   +0.9076   +0.0000   +0.0009   +0.0073   
++0.0001   +0.0059   +0.0007   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0007   +0.0000   +0.0029   +0.0001   +0.0000   +0.0022   +0.0000   +0.0037   +0.0001   +0.9821   +0.0014   +0.0000   
++0.0016   +0.0003   +0.0027   +0.0001   +0.0023   +0.0000   +0.0008   +0.0001   +0.0031   +0.0010   +0.0019   +0.0008   +0.0000   +0.0200   +0.0000   +0.0018   +0.0018   +0.0005   +0.9599   +0.0013   
++0.0127   +0.0007   +0.0005   +0.0007   +0.0012   +0.0010   +0.0014   +0.0035   +0.0011   +0.0227   +0.0109   +0.0007   +0.0027   +0.0004   +0.0018   +0.0017   +0.0066   +0.0000   +0.0006   +0.9290   
+
++0.7275   +0.0030   +0.0095   +0.0124   +0.0030   +0.0075   +0.0192   +0.0433   +0.0022   +0.0060   +0.0082   +0.0062   +0.0023   +0.0018   +0.0255   +0.0527   +0.0416   +0.0001   +0.0017   +0.0264   
++0.0064   +0.8108   +0.0045   +0.0010   +0.0018   +0.0190   +0.0016   +0.0028   +0.0167   +0.0049   +0.0036   +0.0759   +0.0030   +0.0014   +0.0114   +0.0210   +0.0049   +0.0045   +0.0007   +0.0039   
++0.0204   +0.0046   +0.6510   +0.0725   +0.0006   +0.0094   +0.0187   +0.0261   +0.0327   +0.0056   +0.0063   +0.0484   +0.0005   +0.0016   +0.0058   +0.0594   +0.0266   +0.0006   +0.0057   +0.0035   
++0.0230   +0.0008   +0.0626   +0.7167   +0.0002   +0.0133   +0.1015   +0.0242   +0.0074   +0.0024   +0.0008   +0.0144   +0.0002   +0.0002   +0.0026   +0.0163   +0.0096   +0.0000   +0.0004   +0.0034   
++0.0077   +0.0023   +0.0007   +0.0003   +0.9368   +0.0002   +0.0003   +0.0030   +0.0021   +0.0037   +0.0004   +0.0004   +0.0001   +0.0003   +0.0026   +0.0224   +0.0031   +0.0000   +0.0064   +0.0072   
++0.0171   +0.0204   +0.0099   +0.0163   +0.0002   +0.7415   +0.0648   +0.0067   +0.0393   +0.0021   +0.0132   +0.0261   +0.0034   +0.0003   +0.0161   +0.0095   +0.0073   +0.0001   +0.0004   +0.0055   
++0.0338   +0.0013   +0.0153   +0.0960   +0.0002   +0.0501   +0.7252   +0.0169   +0.0048   +0.0046   +0.0028   +0.0151   +0.0011   +0.0002   +0.0064   +0.0129   +0.0061   +0.0000   +0.0014   +0.0058   
++0.0425   +0.0013   +0.0119   +0.0128   +0.0011   +0.0029   +0.0094   +0.8546   +0.0012   +0.0006   +0.0018   +0.0056   +0.0007   +0.0014   +0.0049   +0.0327   +0.0062   +0.0000   +0.0002   +0.0080   
++0.0058   +0.0203   +0.0393   +0.0103   +0.0021   +0.0447   +0.0070   +0.0032   +0.8086   +0.0012   +0.0086   +0.0074   +0.0003   +0.0044   +0.0105   +0.0073   +0.0039   +0.0007   +0.0081   +0.0062   
++0.0141   +0.0055   +0.0061   +0.0030   +0.0033   +0.0021   +0.0062   +0.0015   +0.0011   +0.7356   +0.0463   +0.0084   +0.0100   +0.0159   +0.0021   +0.0053   +0.0222   +0.0001   +0.0028   +0.1083   
++0.0083   +0.0017   +0.0030   +0.0005   +0.0001   +0.0059   +0.0017   +0.0019   +0.0034   +0.0200   +0.8799   +0.0039   +0.0156   +0.0138   +0.0038   +0.0032   +0.0049   +0.0011   +0.0022   +0.0250   
++0.0067   +0.0386   +0.0243   +0.0084   +0.0002   +0.0124   +0.0093   +0.0062   +0.0031   +0.0039   +0.0042   +0.8362   +0.0071   +0.0002   +0.0043   +0.0151   +0.0166   +0.0001   +0.0010   +0.0023   
++0.0138   +0.0083   +0.0014   +0.0008   +0.0002   +0.0088   +0.0037   +0.0040   +0.0007   +0.0249   +0.0903   +0.0387   +0.7363   +0.0082   +0.0026   +0.0093   +0.0130   +0.0001   +0.0004   +0.0345   
++0.0040   +0.0014   +0.0016   +0.0002   +0.0003   +0.0003   +0.0003   +0.0032   +0.0037   +0.0148   +0.0296   +0.0005   +0.0030   +0.8769   +0.0015   +0.0066   +0.0023   +0.0018   +0.0448   +0.0033   
++0.0439   +0.0092   +0.0047   +0.0024   +0.0017   +0.0121   +0.0062   +0.0085   +0.0070   +0.0015   +0.0064   +0.0069   +0.0008   +0.0011   +0.8345   +0.0339   +0.0115   +0.0001   +0.0002   +0.0074   
++0.0660   +0.0124   +0.0345   +0.0110   +0.0108   +0.0052   +0.0092   +0.0417   +0.0035   +0.0028   +0.0040   +0.0174   +0.0020   +0.0038   +0.0247   +0.6827   +0.0583   +0.0016   +0.0024   +0.0060   
++0.0619   +0.0034   +0.0183   +0.0077   +0.0018   +0.0048   +0.0051   +0.0093   +0.0023   +0.0140   +0.0071   +0.0229   +0.0033   +0.0016   +0.0099   +0.0693   +0.7331   +0.0001   +0.0028   +0.0213   
++0.0006   +0.0177   +0.0022   +0.0002   +0.0001   +0.0003   +0.0001   +0.0004   +0.0022   +0.0002   +0.0089   +0.0010   +0.0001   +0.0070   +0.0003   +0.0106   +0.0005   +0.9429   +0.0043   +0.0002   
++0.0049   +0.0010   +0.0076   +0.0007   +0.0072   +0.0005   +0.0024   +0.0006   +0.0091   +0.0035   +0.0064   +0.0027   +0.0002   +0.0596   +0.0003   +0.0056   +0.0055   +0.0015   +0.8765   +0.0043   
++0.0356   +0.0025   +0.0022   +0.0024   +0.0037   +0.0032   +0.0045   +0.0109   +0.0032   +0.0617   +0.0329   +0.0028   +0.0079   +0.0020   +0.0058   +0.0065   +0.0193   +0.0000   +0.0020   +0.7908   
+
++0.3609   +0.0116   +0.0276   +0.0332   +0.0098   +0.0206   +0.0420   +0.0995   +0.0094   +0.0190   +0.0256   +0.0253   +0.0064   +0.0065   +0.0574   +0.0990   +0.0829   +0.0006   +0.0055   +0.0573   
++0.0247   +0.4914   +0.0194   +0.0093   +0.0061   +0.0433   +0.0124   +0.0145   +0.0397   +0.0128   +0.0146   +0.1710   +0.0083   +0.0050   +0.0306   +0.0469   +0.0207   +0.0119   +0.0034   +0.0140   
++0.0594   +0.0197   +0.2486   +0.1133   +0.0044   +0.0286   +0.0548   +0.0662   +0.0588   +0.0134   +0.0187   +0.0967   +0.0036   +0.0066   +0.0214   +0.0974   +0.0574   +0.0018   +0.0129   +0.0164   
++0.0617   +0.0081   +0.0978   +0.3524   +0.0020   +0.0411   +0.1699   +0.0653   +0.0238   +0.0088   +0.0077   +0.0461   +0.0022   +0.0020   +0.0141   +0.0484   +0.0308   +0.0004   +0.0033   +0.0143   
++0.0254   +0.0074   +0.0053   +0.0028   +0.7958   +0.0022   +0.0028   +0.0134   +0.0066   +0.0107   +0.0038   +0.0045   +0.0009   +0.0032   +0.0102   +0.0514   +0.0138   +0.0003   +0.0183   +0.0211   
++0.0469   +0.0463   +0.0303   +0.0503   +0.0019   +0.3682   +0.1163   +0.0262   +0.0784   +0.0088   +0.0340   +0.0660   +0.0080   +0.0030   +0.0388   +0.0311   +0.0232   +0.0008   +0.0031   +0.0183   
++0.0739   +0.0102   +0.0447   +0.1608   +0.0019   +0.0898   +0.3634   +0.0514   +0.0200   +0.0120   +0.0128   +0.0440   +0.0038   +0.0022   +0.0213   +0.0392   +0.0246   +0.0003   +0.0043   +0.0194   
++0.0978   +0.0067   +0.0302   +0.0345   +0.0051   +0.0113   +0.0287   +0.5894   +0.0063   +0.0055   +0.0091   +0.0211   +0.0027   +0.0048   +0.0193   +0.0741   +0.0271   +0.0004   +0.0019   +0.0240   
++0.0245   +0.0483   +0.0708   +0.0332   +0.0065   +0.0892   +0.0294   +0.0167   +0.4847   +0.0067   +0.0260   +0.0339   +0.0025   +0.0131   +0.0290   +0.0278   +0.0169   +0.0024   +0.0207   +0.0178   
++0.0448   +0.0142   +0.0147   +0.0111   +0.0097   +0.0092   +0.0162   +0.0133   +0.0061   +0.3647   +0.1146   +0.0253   +0.0222   +0.0375   +0.0106   +0.0219   +0.0490   +0.0007   +0.0102   +0.2041   
++0.0261   +0.0070   +0.0088   +0.0042   +0.0015   +0.0153   +0.0074   +0.0094   +0.0102   +0.0495   +0.6509   +0.0154   +0.0343   +0.0378   +0.0122   +0.0130   +0.0172   +0.0033   +0.0089   +0.0675   
++0.0273   +0.0869   +0.0486   +0.0268   +0.0019   +0.0314   +0.0271   +0.0232   +0.0142   +0.0116   +0.0163   +0.5517   +0.0152   +0.0024   +0.0159   +0.0419   +0.0410   +0.0012   +0.0037   +0.0117   
++0.0380   +0.0231   +0.0099   +0.0069   +0.0021   +0.0209   +0.0128   +0.0161   +0.0058   +0.0554   +0.1985   +0.0829   +0.3471   +0.0235   +0.0114   +0.0258   +0.0332   +0.0009   +0.0041   +0.0815   
++0.0143   +0.0051   +0.0067   +0.0023   +0.0027   +0.0029   +0.0028   +0.0106   +0.0111   +0.0348   +0.0812   +0.0048   +0.0087   +0.6415   +0.0057   +0.0172   +0.0101   +0.0056   +0.1145   +0.0175   
++0.0987   +0.0247   +0.0171   +0.0130   +0.0067   +0.0293   +0.0208   +0.0338   +0.0192   +0.0077   +0.0206   +0.0253   +0.0033   +0.0045   +0.5374   +0.0749   +0.0368   +0.0006   +0.0020   +0.0237   
++0.1240   +0.0276   +0.0566   +0.0326   +0.0247   +0.0171   +0.0279   +0.0943   +0.0134   +0.0116   +0.0159   +0.0485   +0.0055   +0.0098   +0.0545   +0.2975   +0.1029   +0.0038   +0.0074   +0.0242   
++0.1233   +0.0145   +0.0396   +0.0247   +0.0079   +0.0152   +0.0208   +0.0411   +0.0097   +0.0309   +0.0250   +0.0563   +0.0084   +0.0068   +0.0319   +0.1223   +0.3605   +0.0008   +0.0080   +0.0522   
++0.0054   +0.0462   +0.0068   +0.0018   +0.0011   +0.0030   +0.0015   +0.0035   +0.0076   +0.0023   +0.0268   +0.0091   +0.0013   +0.0212   +0.0031   +0.0255   +0.0045   +0.8132   +0.0135   +0.0026   
++0.0161   +0.0046   +0.0175   +0.0051   +0.0205   +0.0040   +0.0072   +0.0056   +0.0233   +0.0126   +0.0253   +0.0100   +0.0020   +0.1522   +0.0034   +0.0173   +0.0156   +0.0047   +0.6386   +0.0142   
++0.0772   +0.0089   +0.0102   +0.0103   +0.0109   +0.0108   +0.0148   +0.0328   +0.0092   +0.1163   +0.0890   +0.0145   +0.0186   +0.0108   +0.0185   +0.0261   +0.0472   +0.0004   +0.0066   +0.4668   
+
+
+[4] P-matrix for branch length 0.200000
++0.9912   +0.0001   +0.0003   +0.0004   +0.0001   +0.0002   +0.0006   +0.0014   +0.0001   +0.0002   +0.0002   +0.0001   +0.0001   +0.0000   +0.0008   +0.0019   +0.0014   +0.0000   +0.0000   +0.0009   
++0.0002   +0.9942   +0.0001   +0.0000   +0.0001   +0.0006   +0.0000   +0.0001   +0.0005   +0.0002   +0.0001   +0.0025   +0.0001   +0.0000   +0.0003   +0.0007   +0.0001   +0.0001   +0.0000   +0.0001   
++0.0006   +0.0001   +0.9881   +0.0028   +0.0000   +0.0003   +0.0005   +0.0008   +0.0012   +0.0002   +0.0002   +0.0017   +0.0000   +0.0000   +0.0001   +0.0023   +0.0009   +0.0000   +0.0002   +0.0001   
++0.0007   +0.0000   +0.0024   +0.9906   +0.0000   +0.0003   +0.0038   +0.0007   +0.0002   +0.0001   +0.0000   +0.0004   +0.0000   +0.0000   +0.0000   +0.0004   +0.0003   +0.0000   +0.0000   +0.0001   
++0.0002   +0.0001   +0.0000   +0.0000   +0.9982   +0.0000   +0.0000   +0.0001   +0.0001   +0.0001   +0.0000   +0.0000   +0.0000   +0.0000   +0.0001   +0.0007   +0.0001   +0.0000   +0.0002   +0.0002   
++0.0005   +0.0007   +0.0003   +0.0004   +0.0000   +0.9918   +0.0023   +0.0002   +0.0013   +0.0000   +0.0004   +0.0008   +0.0001   +0.0000   +0.0005   +0.0003   +0.0002   +0.0000   +0.0000   +0.0002   
++0.0011   +0.0000   +0.0004   +0.0036   +0.0000   +0.0018   +0.9910   +0.0005   +0.0001   +0.0001   +0.0001   +0.0004   +0.0000   +0.0000   +0.0002   +0.0004   +0.0001   +0.0000   +0.0000   +0.0002   
++0.0014   +0.0000   +0.0004   +0.0004   +0.0000   +0.0001   +0.0003   +0.9957   +0.0000   +0.0000   +0.0000   +0.0001   +0.0000   +0.0000   +0.0001   +0.0011   +0.0001   +0.0000   +0.0000   +0.0002   
++0.0001   +0.0006   +0.0014   +0.0003   +0.0001   +0.0015   +0.0001   +0.0001   +0.9942   +0.0000   +0.0002   +0.0001   +0.0000   +0.0001   +0.0003   +0.0002   +0.0001   +0.0000   +0.0003   +0.0002   
++0.0004   +0.0002   +0.0002   +0.0001   +0.0001   +0.0000   +0.0002   +0.0000   +0.0000   +0.9915   +0.0015   +0.0002   +0.0003   +0.0005   +0.0000   +0.0001   +0.0007   +0.0000   +0.0001   +0.0038   
++0.0002   +0.0000   +0.0001   +0.0000   +0.0000   +0.0002   +0.0000   +0.0000   +0.0001   +0.0006   +0.9965   +0.0001   +0.0005   +0.0004   +0.0001   +0.0001   +0.0001   +0.0000   +0.0001   +0.0007   
++0.0002   +0.0013   +0.0008   +0.0002   +0.0000   +0.0004   +0.0003   +0.0002   +0.0001   +0.0001   +0.0001   +0.9950   +0.0002   +0.0000   +0.0001   +0.0004   +0.0005   +0.0000   +0.0000   +0.0000   
++0.0004   +0.0002   +0.0000   +0.0000   +0.0000   +0.0003   +0.0001   +0.0001   +0.0000   +0.0008   +0.0030   +0.0013   +0.9917   +0.0002   +0.0001   +0.0003   +0.0004   +0.0000   +0.0000   +0.0011   
++0.0001   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0001   +0.0001   +0.0005   +0.0009   +0.0000   +0.0001   +0.9964   +0.0000   +0.0002   +0.0001   +0.0001   +0.0014   +0.0001   
++0.0014   +0.0003   +0.0001   +0.0000   +0.0000   +0.0004   +0.0002   +0.0002   +0.0002   +0.0000   +0.0002   +0.0002   +0.0000   +0.0000   +0.9951   +0.0011   +0.0003   +0.0000   +0.0000   +0.0002   
++0.0023   +0.0004   +0.0013   +0.0003   +0.0004   +0.0001   +0.0003   +0.0014   +0.0001   +0.0001   +0.0001   +0.0005   +0.0001   +0.0001   +0.0008   +0.9894   +0.0021   +0.0001   +0.0001   +0.0001   
++0.0021   +0.0001   +0.0006   +0.0002   +0.0000   +0.0001   +0.0001   +0.0002   +0.0000   +0.0005   +0.0002   +0.0007   +0.0001   +0.0000   +0.0003   +0.0025   +0.9914   +0.0000   +0.0001   +0.0007   
++0.0000   +0.0005   +0.0001   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0001   +0.0000   +0.0003   +0.0000   +0.0000   +0.0002   +0.0000   +0.0003   +0.0000   +0.9984   +0.0001   +0.0000   
++0.0001   +0.0000   +0.0003   +0.0000   +0.0002   +0.0000   +0.0001   +0.0000   +0.0003   +0.0001   +0.0002   +0.0001   +0.0000   +0.0018   +0.0000   +0.0002   +0.0002   +0.0000   +0.9964   +0.0001   
++0.0012   +0.0001   +0.0000   +0.0001   +0.0001   +0.0001   +0.0001   +0.0003   +0.0001   +0.0022   +0.0010   +0.0001   +0.0003   +0.0000   +0.0002   +0.0001   +0.0006   +0.0000   +0.0001   +0.9935   
+
++0.9355   +0.0006   +0.0020   +0.0028   +0.0006   +0.0017   +0.0047   +0.0103   +0.0004   +0.0012   +0.0017   +0.0011   +0.0005   +0.0004   +0.0061   +0.0134   +0.0103   +0.0000   +0.0004   +0.0064   
++0.0012   +0.9575   +0.0007   +0.0000   +0.0004   +0.0045   +0.0001   +0.0004   +0.0039   +0.0011   +0.0007   +0.0180   +0.0007   +0.0003   +0.0026   +0.0051   +0.0008   +0.0010   +0.0001   +0.0008   
++0.0043   +0.0007   +0.9143   +0.0197   +0.0000   +0.0020   +0.0037   +0.0060   +0.0085   +0.0014   +0.0014   +0.0121   +0.0000   +0.0003   +0.0011   +0.0160   +0.0064   +0.0001   +0.0014   +0.0005   
++0.0051   +0.0000   +0.0170   +0.9318   +0.0000   +0.0026   +0.0268   +0.0054   +0.0015   +0.0005   +0.0000   +0.0029   +0.0000   +0.0000   +0.0004   +0.0033   +0.0019   +0.0000   +0.0000   +0.0006   
++0.0016   +0.0005   +0.0000   +0.0000   +0.9867   +0.0000   +0.0000   +0.0005   +0.0005   +0.0008   +0.0000   +0.0000   +0.0000   +0.0000   +0.0005   +0.0054   +0.0005   +0.0000   +0.0014   +0.0016   
++0.0038   +0.0048   +0.0021   +0.0032   +0.0000   +0.9398   +0.0167   +0.0013   +0.0097   +0.0004   +0.0030   +0.0060   +0.0008   +0.0000   +0.0038   +0.0020   +0.0015   +0.0000   +0.0000   +0.0011   
++0.0082   +0.0001   +0.0031   +0.0253   +0.0000   +0.0129   +0.9343   +0.0036   +0.0008   +0.0011   +0.0005   +0.0033   +0.0002   +0.0000   +0.0013   +0.0027   +0.0011   +0.0000   +0.0003   +0.0012   
++0.0101   +0.0002   +0.0027   +0.0029   +0.0002   +0.0005   +0.0020   +0.9679   +0.0002   +0.0000   +0.0003   +0.0011   +0.0001   +0.0003   +0.0009   +0.0078   +0.0010   +0.0000   +0.0000   +0.0017   
++0.0010   +0.0047   +0.0102   +0.0021   +0.0005   +0.0111   +0.0012   +0.0005   +0.9570   +0.0002   +0.0019   +0.0012   +0.0000   +0.0009   +0.0023   +0.0013   +0.0007   +0.0001   +0.0019   +0.0014   
++0.0029   +0.0013   +0.0015   +0.0006   +0.0007   +0.0004   +0.0015   +0.0001   +0.0001   +0.9379   +0.0107   +0.0018   +0.0024   +0.0038   +0.0003   +0.0009   +0.0054   +0.0000   +0.0006   +0.0273   
++0.0018   +0.0003   +0.0007   +0.0000   +0.0000   +0.0014   +0.0003   +0.0003   +0.0007   +0.0046   +0.9737   +0.0007   +0.0037   +0.0031   +0.0008   +0.0006   +0.0010   +0.0002   +0.0004   +0.0056   
++0.0012   +0.0092   +0.0061   +0.0017   +0.0000   +0.0028   +0.0020   +0.0012   +0.0005   +0.0008   +0.0008   +0.9634   +0.0017   +0.0000   +0.0008   +0.0033   +0.0039   +0.0000   +0.0002   +0.0004   
++0.0031   +0.0018   +0.0001   +0.0000   +0.0000   +0.0021   +0.0007   +0.0008   +0.0000   +0.0060   +0.0216   +0.0094   +0.9389   +0.0018   +0.0005   +0.0021   +0.0030   +0.0000   +0.0000   +0.0081   
++0.0008   +0.0003   +0.0003   +0.0000   +0.0000   +0.0000   +0.0000   +0.0007   +0.0008   +0.0035   +0.0066   +0.0000   +0.0007   +0.9731   +0.0003   +0.0015   +0.0004   +0.0004   +0.0102   +0.0005   
++0.0105   +0.0021   +0.0009   +0.0003   +0.0003   +0.0028   +0.0013   +0.0016   +0.0015   +0.0002   +0.0014   +0.0013   +0.0001   +0.0002   +0.9633   +0.0082   +0.0023   +0.0000   +0.0000   +0.0015   
++0.0168   +0.0030   +0.0093   +0.0022   +0.0026   +0.0011   +0.0019   +0.0100   +0.0006   +0.0005   +0.0007   +0.0038   +0.0004   +0.0009   +0.0060   +0.9230   +0.0152   +0.0004   +0.0005   +0.0010   
++0.0154   +0.0006   +0.0044   +0.0016   +0.0003   +0.0010   +0.0009   +0.0015   +0.0004   +0.0034   +0.0014   +0.0053   +0.0007   +0.0003   +0.0020   +0.0180   +0.9373   +0.0000   +0.0006   +0.0049   
++0.0000   +0.0040   +0.0005   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0005   +0.0000   +0.0019   +0.0000   +0.0000   +0.0015   +0.0000   +0.0025   +0.0000   +0.9880   +0.0009   +0.0000   
++0.0010   +0.0002   +0.0018   +0.0000   +0.0016   +0.0000   +0.0005   +0.0000   +0.0021   +0.0007   +0.0012   +0.0005   +0.0000   +0.0135   +0.0000   +0.0012   +0.0012   +0.0003   +0.9731   +0.0009   
++0.0087   +0.0005   +0.0003   +0.0004   +0.0008   +0.0007   +0.0009   +0.0024   +0.0007   +0.0156   +0.0073   +0.0004   +0.0018   +0.0003   +0.0012   +0.0011   +0.0045   +0.0000   +0.0004   +0.9519   
+
++0.8071   +0.0020   +0.0064   +0.0085   +0.0020   +0.0052   +0.0138   +0.0306   +0.0014   +0.0040   +0.0055   +0.0039   +0.0016   +0.0012   +0.0181   +0.0385   +0.0301   +0.0000   +0.0011   +0.0189   
++0.0042   +0.8689   +0.0028   +0.0004   +0.0012   +0.0135   +0.0008   +0.0017   +0.0118   +0.0035   +0.0023   +0.0538   +0.0020   +0.0009   +0.0079   +0.0150   +0.0030   +0.0032   +0.0005   +0.0026   
++0.0138   +0.0028   +0.7493   +0.0544   +0.0003   +0.0063   +0.0125   +0.0183   +0.0240   +0.0040   +0.0044   +0.0351   +0.0003   +0.0010   +0.0038   +0.0444   +0.0190   +0.0004   +0.0040   +0.0021   
++0.0159   +0.0004   +0.0469   +0.7983   +0.0001   +0.0088   +0.0751   +0.0168   +0.0049   +0.0016   +0.0004   +0.0096   +0.0001   +0.0001   +0.0016   +0.0109   +0.0064   +0.0000   +0.0002   +0.0021   
++0.0051   +0.0015   +0.0003   +0.0001   +0.9574   +0.0001   +0.0001   +0.0019   +0.0015   +0.0025   +0.0002   +0.0002   +0.0000   +0.0001   +0.0017   +0.0160   +0.0019   +0.0000   +0.0044   +0.0049   
++0.0118   +0.0144   +0.0067   +0.0108   +0.0001   +0.8182   +0.0476   +0.0043   +0.0283   +0.0013   +0.0092   +0.0182   +0.0024   +0.0001   +0.0113   +0.0064   +0.0049   +0.0000   +0.0002   +0.0037   
++0.0242   +0.0006   +0.0102   +0.0711   +0.0001   +0.0367   +0.8048   +0.0114   +0.0030   +0.0033   +0.0018   +0.0103   +0.0007   +0.0001   +0.0043   +0.0087   +0.0038   +0.0000   +0.0010   +0.0039   
++0.0301   +0.0008   +0.0083   +0.0089   +0.0007   +0.0019   +0.0064   +0.9000   +0.0007   +0.0003   +0.0011   +0.0037   +0.0004   +0.0010   +0.0031   +0.0233   +0.0038   +0.0000   +0.0001   +0.0054   
++0.0037   +0.0143   +0.0289   +0.0068   +0.0015   +0.0322   +0.0044   +0.0019   +0.8674   +0.0007   +0.0059   +0.0045   +0.0001   +0.0030   +0.0073   +0.0046   +0.0025   +0.0005   +0.0057   +0.0043   
++0.0094   +0.0038   +0.0044   +0.0020   +0.0023   +0.0013   +0.0044   +0.0007   +0.0006   +0.8135   +0.0324   +0.0058   +0.0071   +0.0113   +0.0013   +0.0033   +0.0159   +0.0000   +0.0019   +0.0787   
++0.0056   +0.0011   +0.0021   +0.0002   +0.0001   +0.0041   +0.0010   +0.0012   +0.0023   +0.0140   +0.9177   +0.0025   +0.0111   +0.0095   +0.0026   +0.0021   +0.0032   +0.0008   +0.0015   +0.0172   
++0.0042   +0.0273   +0.0176   +0.0056   +0.0001   +0.0087   +0.0063   +0.0041   +0.0019   +0.0026   +0.0027   +0.8867   +0.0051   +0.0001   +0.0028   +0.0103   +0.0117   +0.0001   +0.0007   +0.0014   
++0.0095   +0.0057   +0.0007   +0.0004   +0.0001   +0.0063   +0.0025   +0.0026   +0.0003   +0.0177   +0.0643   +0.0276   +0.8150   +0.0056   +0.0016   +0.0065   +0.0090   +0.0000   +0.0002   +0.0243   
++0.0026   +0.0009   +0.0010   +0.0001   +0.0001   +0.0001   +0.0001   +0.0021   +0.0025   +0.0104   +0.0204   +0.0002   +0.0021   +0.9157   +0.0010   +0.0047   +0.0015   +0.0013   +0.0312   +0.0019   
++0.0312   +0.0064   +0.0030   +0.0014   +0.0011   +0.0085   +0.0042   +0.0055   +0.0048   +0.0009   +0.0043   +0.0045   +0.0005   +0.0007   +0.8860   +0.0242   +0.0076   +0.0000   +0.0001   +0.0050   
++0.0482   +0.0088   +0.0258   +0.0074   +0.0077   +0.0035   +0.0062   +0.0296   +0.0022   +0.0017   +0.0026   +0.0120   +0.0014   +0.0027   +0.0176   +0.7732   +0.0429   +0.0011   +0.0016   +0.0038   
++0.0447   +0.0021   +0.0131   +0.0051   +0.0011   +0.0032   +0.0032   +0.0057   +0.0014   +0.0100   +0.0047   +0.0160   +0.0023   +0.0010   +0.0066   +0.0510   +0.8117   +0.0000   +0.0019   +0.0150   
++0.0003   +0.0123   +0.0015   +0.0001   +0.0001   +0.0002   +0.0000   +0.0002   +0.0015   +0.0001   +0.0061   +0.0005   +0.0001   +0.0047   +0.0001   +0.0075   +0.0002   +0.9616   +0.0029   +0.0001   
++0.0033   +0.0006   +0.0054   +0.0003   +0.0049   +0.0002   +0.0016   +0.0003   +0.0064   +0.0023   +0.0042   +0.0018   +0.0001   +0.0415   +0.0002   +0.0038   +0.0038   +0.0010   +0.9155   +0.0029   
++0.0255   +0.0016   +0.0013   +0.0015   +0.0025   +0.0022   +0.0030   +0.0075   +0.0022   +0.0449   +0.0227   +0.0017   +0.0055   +0.0012   +0.0039   +0.0041   +0.0135   +0.0000   +0.0013   +0.8537   
+
++0.4899   +0.0076   +0.0204   +0.0251   +0.0068   +0.0154   +0.0345   +0.0804   +0.0060   +0.0135   +0.0180   +0.0162   +0.0048   +0.0043   +0.0469   +0.0873   +0.0714   +0.0003   +0.0038   +0.0474   
++0.0162   +0.6169   +0.0126   +0.0047   +0.0042   +0.0351   +0.0068   +0.0085   +0.0316   +0.0097   +0.0093   +0.1400   +0.0062   +0.0033   +0.0231   +0.0380   +0.0133   +0.0091   +0.0020   +0.0093   
++0.0439   +0.0127   +0.3793   +0.1085   +0.0024   +0.0207   +0.0411   +0.0512   +0.0529   +0.0104   +0.0133   +0.0827   +0.0021   +0.0042   +0.0144   +0.0908   +0.0477   +0.0012   +0.0104   +0.0101   
++0.0467   +0.0041   +0.0936   +0.4790   +0.0009   +0.0300   +0.1583   +0.0492   +0.0169   +0.0059   +0.0039   +0.0327   +0.0011   +0.0009   +0.0083   +0.0356   +0.0217   +0.0002   +0.0018   +0.0090   
++0.0176   +0.0051   +0.0029   +0.0013   +0.8583   +0.0011   +0.0014   +0.0082   +0.0046   +0.0078   +0.0018   +0.0022   +0.0005   +0.0016   +0.0066   +0.0414   +0.0087   +0.0002   +0.0135   +0.0152   
++0.0350   +0.0376   +0.0219   +0.0368   +0.0009   +0.5044   +0.1050   +0.0170   +0.0677   +0.0056   +0.0260   +0.0510   +0.0064   +0.0015   +0.0306   +0.0217   +0.0162   +0.0004   +0.0016   +0.0126   
++0.0606   +0.0056   +0.0335   +0.1498   +0.0009   +0.0811   +0.4904   +0.0369   +0.0130   +0.0091   +0.0079   +0.0320   +0.0026   +0.0011   +0.0147   +0.0282   +0.0161   +0.0001   +0.0030   +0.0134   
++0.0790   +0.0039   +0.0234   +0.0260   +0.0031   +0.0073   +0.0206   +0.6974   +0.0037   +0.0029   +0.0053   +0.0139   +0.0017   +0.0032   +0.0126   +0.0602   +0.0173   +0.0002   +0.0009   +0.0172   
++0.0155   +0.0385   +0.0636   +0.0236   +0.0046   +0.0770   +0.0192   +0.0098   +0.6122   +0.0039   +0.0186   +0.0213   +0.0013   +0.0094   +0.0216   +0.0186   +0.0107   +0.0016   +0.0160   +0.0129   
++0.0319   +0.0108   +0.0114   +0.0074   +0.0070   +0.0058   +0.0122   +0.0069   +0.0036   +0.4982   +0.0897   +0.0182   +0.0182   +0.0299   +0.0063   +0.0142   +0.0402   +0.0003   +0.0069   +0.1809   
++0.0184   +0.0044   +0.0063   +0.0021   +0.0007   +0.0117   +0.0046   +0.0055   +0.0073   +0.0388   +0.7460   +0.0099   +0.0284   +0.0283   +0.0085   +0.0083   +0.0116   +0.0024   +0.0057   +0.0510   
++0.0176   +0.0712   +0.0416   +0.0190   +0.0009   +0.0243   +0.0197   +0.0153   +0.0089   +0.0083   +0.0105   +0.6651   +0.0127   +0.0012   +0.0105   +0.0313   +0.0321   +0.0006   +0.0024   +0.0069   
++0.0282   +0.0172   +0.0057   +0.0035   +0.0011   +0.0166   +0.0087   +0.0103   +0.0030   +0.0455   +0.1641   +0.0692   +0.4902   +0.0173   +0.0071   +0.0191   +0.0255   +0.0005   +0.0021   +0.0652   
++0.0095   +0.0034   +0.0043   +0.0011   +0.0013   +0.0014   +0.0013   +0.0072   +0.0079   +0.0277   +0.0607   +0.0024   +0.0064   +0.7393   +0.0036   +0.0130   +0.0063   +0.0040   +0.0886   +0.0104   
++0.0806   +0.0187   +0.0115   +0.0077   +0.0044   +0.0231   +0.0144   +0.0220   +0.0143   +0.0046   +0.0143   +0.0167   +0.0021   +0.0029   +0.6573   +0.0615   +0.0261   +0.0003   +0.0010   +0.0166   
++0.1093   +0.0224   +0.0527   +0.0240   +0.0199   +0.0119   +0.0200   +0.0766   +0.0090   +0.0075   +0.0102   +0.0362   +0.0040   +0.0074   +0.0448   +0.4262   +0.0935   +0.0030   +0.0053   +0.0159   
++0.1063   +0.0093   +0.0329   +0.0174   +0.0050   +0.0106   +0.0136   +0.0262   +0.0062   +0.0253   +0.0169   +0.0441   +0.0064   +0.0043   +0.0226   +0.1112   +0.4943   +0.0004   +0.0058   +0.0411   
++0.0028   +0.0353   +0.0048   +0.0009   +0.0005   +0.0015   +0.0007   +0.0017   +0.0052   +0.0012   +0.0192   +0.0047   +0.0006   +0.0152   +0.0015   +0.0201   +0.0024   +0.8711   +0.0095   +0.0012   
++0.0111   +0.0028   +0.0140   +0.0028   +0.0151   +0.0021   +0.0050   +0.0028   +0.0180   +0.0085   +0.0163   +0.0066   +0.0010   +0.1178   +0.0017   +0.0123   +0.0114   +0.0033   +0.7377   +0.0097   
++0.0638   +0.0059   +0.0063   +0.0065   +0.0079   +0.0074   +0.0102   +0.0236   +0.0067   +0.1031   +0.0672   +0.0086   +0.0149   +0.0064   +0.0130   +0.0171   +0.0372   +0.0002   +0.0045   +0.5896   
+
+
+[5] CLV 5: [ {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00010,0.00000,0.00000,0.00000,0.00000,0.00007,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00004,0.00002,0.00001,0.00000,0.00000,0.00001,0.00001,0.00000,0.00000,0.00080,0.00002,0.00000,0.00002,0.00001,0.00062,0.00002,0.00004,0.00000,0.00000,0.00011),(0.00037,0.00013,0.00008,0.00002,0.00003,0.00009,0.00007,0.00001,0.00004,0.00245,0.00019,0.00005,0.00017,0.00006,0.00218,0.00018,0.00034,0.00000,0.00001,0 [...]
+[6] CLV 6: [ {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00010,0.00000,0.00000,0.00000,0.00000,0.00007,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00005,0.00002,0.00001,0.00000,0.00001,0.00002,0.00001,0.00000,0.00001,0.00069,0.00003,0.00001,0.00003,0.00001,0.00057,0.00003,0.00005,0.00000,0.00000,0.00013),(0.00040,0.00018,0.00014,0.00008,0.00007,0.00016,0.00013,0.00009,0.00011,0.00165,0.00029,0.00010,0.00030,0.00013,0.00168,0.00027,0.00037,0.00002,0.00004,0 [...]
+[7] CLV 7: [ {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00004,0.00000,0.00000,0.00000,0.00000,0.00025,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00003,0.00000,0.00000,0.00000,0.00000,0.00001,0.00000,0.00031,0.00000,0.00000,0.00001,0.00001,0.00170,0.00000,0.00000,0.00003,0.00001,0.00000,0.00000,0.00003),(0.00023,0.00003,0.00005,0.00002,0.00000,0.00006,0.00005,0.00091,0.00000,0.00006,0.00008,0.00011,0.00424,0.00002,0.00002,0.00019,0.00009,0.00000,0.00000,0 [...]
+
+inner-inner logL: -165.415219
+persite logL:     -15.1027349  -14.4745285  -13.0941374  -16.6015569  -17.2163821  -13.0496614  -13.3573518  -13.3502665  -13.2075588  -14.0316208  -10.0930399  -11.8363799  
+checksum logL:    -165.415219
+tip-inner logL:   -165.415219
+persite logL:     -15.1027349  -14.4745285  -13.0941374  -16.6015569  -17.2163821  -13.0496614  -13.3573518  -13.3502665  -13.2075588  -14.0316208  -10.0930399  -11.8363799  
+checksum logL:    -165.415219
diff --git a/test/out/00022_NMOR_lkcalc.out b/test/out/00022_NMOR_lkcalc.out
new file mode 100644
index 0000000..5a395c9
--- /dev/null
+++ b/test/out/00022_NMOR_lkcalc.out
@@ -0,0 +1,146 @@
+[1] P-matrix for branch length 0.500000
++0.9795   +0.0007   +0.0026   +0.0033   +0.0060   +0.0065   +0.0013   
++0.0006   +0.9897   +0.0016   +0.0014   +0.0021   +0.0020   +0.0025   
++0.0024   +0.0017   +0.9838   +0.0024   +0.0035   +0.0031   +0.0030   
++0.0036   +0.0018   +0.0029   +0.9788   +0.0047   +0.0042   +0.0040   
++0.0048   +0.0020   +0.0030   +0.0034   +0.9781   +0.0044   +0.0042   
++0.0060   +0.0021   +0.0031   +0.0035   +0.0051   +0.9789   +0.0012   
++0.0013   +0.0030   +0.0033   +0.0036   +0.0053   +0.0013   +0.9822   
+
++0.8572   +0.0059   +0.0188   +0.0231   +0.0409   +0.0440   +0.0102   
++0.0050   +0.9255   +0.0116   +0.0105   +0.0153   +0.0140   +0.0180   
++0.0173   +0.0124   +0.8851   +0.0173   +0.0245   +0.0221   +0.0212   
++0.0252   +0.0134   +0.0204   +0.8525   +0.0323   +0.0288   +0.0274   
++0.0328   +0.0143   +0.0213   +0.0237   +0.8487   +0.0305   +0.0288   
++0.0406   +0.0151   +0.0221   +0.0244   +0.0352   +0.8532   +0.0095   
++0.0102   +0.0210   +0.0230   +0.0251   +0.0360   +0.0103   +0.8745   
+
++0.6185   +0.0213   +0.0533   +0.0614   +0.1036   +0.1089   +0.0329   
++0.0183   +0.7811   +0.0346   +0.0312   +0.0447   +0.0399   +0.0502   
++0.0492   +0.0373   +0.6798   +0.0481   +0.0677   +0.0603   +0.0576   
++0.0670   +0.0397   +0.0569   +0.6050   +0.0851   +0.0753   +0.0710   
++0.0829   +0.0417   +0.0587   +0.0624   +0.6018   +0.0790   +0.0736   
++0.1005   +0.0430   +0.0603   +0.0637   +0.0911   +0.6100   +0.0313   
++0.0329   +0.0585   +0.0624   +0.0651   +0.0920   +0.0339   +0.6551   
+
++0.2559   +0.0779   +0.1187   +0.1158   +0.1721   +0.1669   +0.0927   
++0.0668   +0.4500   +0.0909   +0.0794   +0.1102   +0.0947   +0.1080   
++0.1095   +0.0979   +0.3093   +0.1025   +0.1414   +0.1234   +0.1160   
++0.1263   +0.1011   +0.1212   +0.2309   +0.1570   +0.1369   +0.1266   
++0.1377   +0.1028   +0.1225   +0.1152   +0.2546   +0.1400   +0.1271   
++0.1541   +0.1020   +0.1234   +0.1158   +0.1616   +0.2516   +0.0916   
++0.0927   +0.1260   +0.1257   +0.1161   +0.1589   +0.0992   +0.2815   
+
+
+[2] P-matrix for branch length 0.500000
++0.9795   +0.0007   +0.0026   +0.0033   +0.0060   +0.0065   +0.0013   
++0.0006   +0.9897   +0.0016   +0.0014   +0.0021   +0.0020   +0.0025   
++0.0024   +0.0017   +0.9838   +0.0024   +0.0035   +0.0031   +0.0030   
++0.0036   +0.0018   +0.0029   +0.9788   +0.0047   +0.0042   +0.0040   
++0.0048   +0.0020   +0.0030   +0.0034   +0.9781   +0.0044   +0.0042   
++0.0060   +0.0021   +0.0031   +0.0035   +0.0051   +0.9789   +0.0012   
++0.0013   +0.0030   +0.0033   +0.0036   +0.0053   +0.0013   +0.9822   
+
++0.8572   +0.0059   +0.0188   +0.0231   +0.0409   +0.0440   +0.0102   
++0.0050   +0.9255   +0.0116   +0.0105   +0.0153   +0.0140   +0.0180   
++0.0173   +0.0124   +0.8851   +0.0173   +0.0245   +0.0221   +0.0212   
++0.0252   +0.0134   +0.0204   +0.8525   +0.0323   +0.0288   +0.0274   
++0.0328   +0.0143   +0.0213   +0.0237   +0.8487   +0.0305   +0.0288   
++0.0406   +0.0151   +0.0221   +0.0244   +0.0352   +0.8532   +0.0095   
++0.0102   +0.0210   +0.0230   +0.0251   +0.0360   +0.0103   +0.8745   
+
++0.6185   +0.0213   +0.0533   +0.0614   +0.1036   +0.1089   +0.0329   
++0.0183   +0.7811   +0.0346   +0.0312   +0.0447   +0.0399   +0.0502   
++0.0492   +0.0373   +0.6798   +0.0481   +0.0677   +0.0603   +0.0576   
++0.0670   +0.0397   +0.0569   +0.6050   +0.0851   +0.0753   +0.0710   
++0.0829   +0.0417   +0.0587   +0.0624   +0.6018   +0.0790   +0.0736   
++0.1005   +0.0430   +0.0603   +0.0637   +0.0911   +0.6100   +0.0313   
++0.0329   +0.0585   +0.0624   +0.0651   +0.0920   +0.0339   +0.6551   
+
++0.2559   +0.0779   +0.1187   +0.1158   +0.1721   +0.1669   +0.0927   
++0.0668   +0.4500   +0.0909   +0.0794   +0.1102   +0.0947   +0.1080   
++0.1095   +0.0979   +0.3093   +0.1025   +0.1414   +0.1234   +0.1160   
++0.1263   +0.1011   +0.1212   +0.2309   +0.1570   +0.1369   +0.1266   
++0.1377   +0.1028   +0.1225   +0.1152   +0.2546   +0.1400   +0.1271   
++0.1541   +0.1020   +0.1234   +0.1158   +0.1616   +0.2516   +0.0916   
++0.0927   +0.1260   +0.1257   +0.1161   +0.1589   +0.0992   +0.2815   
+
+
+[3] P-matrix for branch length 0.300000
++0.9876   +0.0004   +0.0016   +0.0020   +0.0036   +0.0039   +0.0008   
++0.0004   +0.9938   +0.0009   +0.0009   +0.0013   +0.0012   +0.0015   
++0.0015   +0.0010   +0.9902   +0.0015   +0.0021   +0.0019   +0.0018   
++0.0022   +0.0011   +0.0017   +0.9872   +0.0028   +0.0025   +0.0024   
++0.0029   +0.0012   +0.0018   +0.0021   +0.9868   +0.0027   +0.0025   
++0.0036   +0.0013   +0.0019   +0.0021   +0.0031   +0.9873   +0.0007   
++0.0008   +0.0018   +0.0020   +0.0022   +0.0032   +0.0008   +0.9893   
+
++0.9111   +0.0034   +0.0115   +0.0144   +0.0257   +0.0277   +0.0061   
++0.0029   +0.9545   +0.0070   +0.0064   +0.0094   +0.0086   +0.0111   
++0.0107   +0.0076   +0.9291   +0.0107   +0.0152   +0.0137   +0.0131   
++0.0157   +0.0082   +0.0126   +0.9082   +0.0202   +0.0180   +0.0171   
++0.0206   +0.0088   +0.0132   +0.0148   +0.9055   +0.0191   +0.0181   
++0.0256   +0.0093   +0.0137   +0.0152   +0.0220   +0.9085   +0.0056   
++0.0061   +0.0130   +0.0142   +0.0157   +0.0226   +0.0061   +0.9223   
+
++0.7439   +0.0121   +0.0346   +0.0413   +0.0717   +0.0763   +0.0200   
++0.0104   +0.8607   +0.0218   +0.0198   +0.0285   +0.0259   +0.0329   
++0.0319   +0.0235   +0.7901   +0.0316   +0.0446   +0.0400   +0.0383   
++0.0451   +0.0252   +0.0373   +0.7351   +0.0576   +0.0512   +0.0485   
++0.0574   +0.0266   +0.0387   +0.0423   +0.7304   +0.0540   +0.0506   
++0.0705   +0.0279   +0.0400   +0.0433   +0.0623   +0.7374   +0.0188   
++0.0200   +0.0384   +0.0415   +0.0444   +0.0633   +0.0203   +0.7721   
+
++0.3931   +0.0480   +0.0913   +0.0965   +0.1524   +0.1544   +0.0644   
++0.0411   +0.6036   +0.0642   +0.0570   +0.0801   +0.0698   +0.0842   
++0.0843   +0.0692   +0.4621   +0.0805   +0.1120   +0.0985   +0.0935   
++0.1053   +0.0725   +0.0951   +0.3710   +0.1321   +0.1158   +0.1082   
++0.1219   +0.0747   +0.0970   +0.0969   +0.3794   +0.1200   +0.1101   
++0.1425   +0.0752   +0.0985   +0.0980   +0.1385   +0.3845   +0.0627   
++0.0644   +0.0982   +0.1013   +0.0992   +0.1376   +0.0680   +0.4313   
+
+
+[4] P-matrix for branch length 0.200000
++0.9917   +0.0003   +0.0011   +0.0013   +0.0024   +0.0026   +0.0005   
++0.0002   +0.9959   +0.0006   +0.0006   +0.0009   +0.0008   +0.0010   
++0.0010   +0.0007   +0.9935   +0.0010   +0.0014   +0.0013   +0.0012   
++0.0015   +0.0007   +0.0012   +0.9915   +0.0019   +0.0017   +0.0016   
++0.0019   +0.0008   +0.0012   +0.0014   +0.9912   +0.0018   +0.0017   
++0.0024   +0.0009   +0.0013   +0.0014   +0.0021   +0.9915   +0.0005   
++0.0005   +0.0012   +0.0013   +0.0015   +0.0021   +0.0005   +0.9928   
+
++0.9396   +0.0022   +0.0078   +0.0098   +0.0176   +0.0190   +0.0041   
++0.0019   +0.9694   +0.0047   +0.0043   +0.0063   +0.0058   +0.0075   
++0.0072   +0.0051   +0.9520   +0.0072   +0.0103   +0.0093   +0.0089   
++0.0106   +0.0055   +0.0085   +0.9377   +0.0137   +0.0123   +0.0117   
++0.0141   +0.0059   +0.0089   +0.0101   +0.9358   +0.0130   +0.0123   
++0.0175   +0.0063   +0.0093   +0.0104   +0.0150   +0.9378   +0.0037   
++0.0041   +0.0088   +0.0097   +0.0107   +0.0154   +0.0040   +0.9474   
+
++0.8190   +0.0078   +0.0240   +0.0292   +0.0515   +0.0551   +0.0133   
++0.0067   +0.9044   +0.0149   +0.0135   +0.0197   +0.0179   +0.0230   
++0.0222   +0.0160   +0.8535   +0.0220   +0.0312   +0.0281   +0.0269   
++0.0319   +0.0172   +0.0261   +0.8130   +0.0409   +0.0364   +0.0345   
++0.0412   +0.0183   +0.0271   +0.0300   +0.8087   +0.0385   +0.0362   
++0.0509   +0.0193   +0.0281   +0.0308   +0.0444   +0.8141   +0.0124   
++0.0133   +0.0268   +0.0292   +0.0316   +0.0453   +0.0134   +0.8403   
+
++0.5176   +0.0312   +0.0695   +0.0774   +0.1271   +0.1318   +0.0454   
++0.0267   +0.7087   +0.0465   +0.0417   +0.0592   +0.0524   +0.0648   
++0.0642   +0.0501   +0.5860   +0.0621   +0.0870   +0.0771   +0.0735   
++0.0844   +0.0530   +0.0734   +0.5001   +0.1067   +0.0940   +0.0883   
++0.1017   +0.0553   +0.0754   +0.0782   +0.5005   +0.0981   +0.0908   
++0.1217   +0.0564   +0.0771   +0.0795   +0.1132   +0.5084   +0.0437   
++0.0454   +0.0756   +0.0796   +0.0810   +0.1135   +0.0473   +0.5575   
+
+
+[5] CLV 5: [ {(0.95937,0.00000,0.00001,0.00001,0.00002,0.00004,0.00000),(0.73472,0.00003,0.00030,0.00063,0.00107,0.00165,0.00010),(0.38257,0.00033,0.00242,0.00449,0.00687,0.01010,0.00108),(0.06551,0.00446,0.01200,0.01595,0.01896,0.02374,0.00858)} {(0.00257,0.00000,0.00238,0.00001,0.00001,0.00002,0.00000),(0.01609,0.00006,0.01534,0.00051,0.00070,0.00090,0.00023),(0.03298,0.00063,0.03345,0.00381,0.00486,0.00606,0.00205),(0.03037,0.00607,0.03387,0.01530,0.01687,0.01902,0.01164)} {(0.00000,0 [...]
+[6] CLV 6: [ {(0.92040,0.00000,0.00001,0.00001,0.00002,0.00003,0.00000),(0.53992,0.00002,0.00023,0.00048,0.00082,0.00127,0.00008),(0.14775,0.00015,0.00107,0.00200,0.00308,0.00459,0.00048),(0.00727,0.00094,0.00214,0.00267,0.00303,0.00365,0.00165)} {(0.00252,0.00001,0.00234,0.00003,0.00003,0.00004,0.00000),(0.01402,0.00034,0.01361,0.00118,0.00145,0.00178,0.00010),(0.02288,0.00279,0.02392,0.00693,0.00789,0.00950,0.00188),(0.01923,0.01246,0.01949,0.01643,0.01672,0.01801,0.01254)} {(0.00000,0 [...]
+[7] CLV 7: [ {(0.95937,0.00000,0.00001,0.00001,0.00002,0.00004,0.00000),(0.73472,0.00003,0.00030,0.00063,0.00107,0.00165,0.00010),(0.38257,0.00033,0.00242,0.00449,0.00687,0.01010,0.00108),(0.06551,0.00446,0.01200,0.01595,0.01896,0.02374,0.00858)} {(0.00000,0.00143,0.00000,0.00180,0.00001,0.00001,0.00001),(0.00014,0.00974,0.00022,0.01142,0.00034,0.00037,0.00053),(0.00131,0.02437,0.00180,0.02402,0.00260,0.00274,0.00381),(0.00902,0.03575,0.01003,0.02335,0.01184,0.01181,0.01463)} {(0.00001,0 [...]
+
+inner-inner logL: -91.354267
+persite logL:     -3.2903602  -9.4980286  -7.8246442  -2.1734041  -10.9373875  -11.2036761  -9.6507114  -0.4935143  -9.0099294  -7.1581318  -10.8856090  -9.2288708  
+checksum logL:    -91.354267
+tip-inner logL:   -91.354267
+persite logL:     -3.2903602  -9.4980286  -7.8246442  -2.1734041  -10.9373875  -11.2036761  -9.6507114  -0.4935143  -9.0099294  -7.1581318  -10.8856090  -9.2288708  
+checksum logL:    -91.354267
diff --git a/test/out/00030_NMDU_gamma.out b/test/out/00030_NMDU_gamma.out
new file mode 100644
index 0000000..c127167
--- /dev/null
+++ b/test/out/00030_NMDU_gamma.out
@@ -0,0 +1,205 @@
+[MEAN] Discrete GAMMA rates: 0.033388 0.251916 0.820268 2.894428 
+[MEAN][1] P-matrix for branch length 0.100000
++0.9973   +0.0013   +0.0008   +0.0006   
++0.0010   +0.9971   +0.0003   +0.0016   
++0.0024   +0.0013   +0.9956   +0.0006   
++0.0010   +0.0032   +0.0003   +0.9955   
+
++0.9795   +0.0097   +0.0060   +0.0048   
++0.0072   +0.9784   +0.0024   +0.0119   
++0.0179   +0.0097   +0.9676   +0.0048   
++0.0072   +0.0238   +0.0024   +0.9665   
+
++0.9356   +0.0306   +0.0184   +0.0153   
++0.0230   +0.9328   +0.0077   +0.0366   
++0.0553   +0.0306   +0.8988   +0.0153   
++0.0230   +0.0732   +0.0077   +0.8962   
+
++0.7992   +0.0980   +0.0538   +0.0490   
++0.0735   +0.7968   +0.0245   +0.1052   
++0.1614   +0.0980   +0.6917   +0.0490   
++0.0735   +0.2105   +0.0245   +0.6915   
+
+
+[MEAN][2] P-matrix for branch length 0.200000
++0.9945   +0.0026   +0.0016   +0.0013   
++0.0019   +0.9942   +0.0006   +0.0032   
++0.0048   +0.0026   +0.9913   +0.0013   
++0.0019   +0.0064   +0.0006   +0.9910   
+
++0.9597   +0.0191   +0.0117   +0.0095   
++0.0143   +0.9577   +0.0048   +0.0232   
++0.0350   +0.0191   +0.9364   +0.0095   
++0.0143   +0.0464   +0.0048   +0.9345   
+
++0.8775   +0.0589   +0.0342   +0.0294   
++0.0442   +0.8737   +0.0147   +0.0674   
++0.1025   +0.0589   +0.8092   +0.0294   
++0.0442   +0.1348   +0.0147   +0.8063   
+
++0.6582   +0.1720   +0.0838   +0.0860   
++0.1290   +0.6666   +0.0430   +0.1614   
++0.2514   +0.1720   +0.4907   +0.0860   
++0.1290   +0.3228   +0.0430   +0.5052   
+
+
+[MEAN][3] P-matrix for branch length 1.000000
++0.9730   +0.0128   +0.0079   +0.0064   
++0.0096   +0.9716   +0.0032   +0.0157   
++0.0236   +0.0128   +0.9573   +0.0064   
++0.0096   +0.0313   +0.0032   +0.9559   
+
++0.8214   +0.0868   +0.0484   +0.0434   
++0.0651   +0.8183   +0.0217   +0.0950   
++0.1452   +0.0868   +0.7246   +0.0434   
++0.0651   +0.1899   +0.0217   +0.7233   
+
++0.5728   +0.2196   +0.0977   +0.1098   
++0.1647   +0.5937   +0.0549   +0.1867   
++0.2932   +0.2196   +0.3774   +0.1098   
++0.1647   +0.3734   +0.0549   +0.4069   
+
++0.3299   +0.3759   +0.1062   +0.1880   
++0.2819   +0.4177   +0.0940   +0.2064   
++0.3187   +0.3759   +0.1174   +0.1880   
++0.2819   +0.4129   +0.0940   +0.2112   
+
+
+[MEAN][4] P-matrix for branch length 1.000000
++0.9730   +0.0128   +0.0079   +0.0064   
++0.0096   +0.9716   +0.0032   +0.0157   
++0.0236   +0.0128   +0.9573   +0.0064   
++0.0096   +0.0313   +0.0032   +0.9559   
+
++0.8214   +0.0868   +0.0484   +0.0434   
++0.0651   +0.8183   +0.0217   +0.0950   
++0.1452   +0.0868   +0.7246   +0.0434   
++0.0651   +0.1899   +0.0217   +0.7233   
+
++0.5728   +0.2196   +0.0977   +0.1098   
++0.1647   +0.5937   +0.0549   +0.1867   
++0.2932   +0.2196   +0.3774   +0.1098   
++0.1647   +0.3734   +0.0549   +0.4069   
+
++0.3299   +0.3759   +0.1062   +0.1880   
++0.2819   +0.4177   +0.0940   +0.2064   
++0.3187   +0.3759   +0.1174   +0.1880   
++0.2819   +0.4129   +0.0940   +0.2112   
+
+
+[MEAN][5] CLV 5: [ {(0.00257,0.00513,0.00002,0.00639),(0.01851,0.03595,0.00085,0.04406),(0.05342,0.09749,0.00777,0.11466),(0.12799,0.19359,0.05802,0.20474)} {(0.00257,0.00193,0.00001,0.00001),(0.01833,0.01372,0.00067,0.00067),(0.05168,0.03859,0.00603,0.00596),(0.11320,0.08598,0.04323,0.04164)} {(0.00001,0.98843,0.00001,0.00004),(0.00036,0.91716,0.00036,0.00216),(0.00347,0.76334,0.00347,0.01818),(0.02958,0.44435,0.02958,0.10423)} {(1.00000,1.00000,1.00000,1.00000),(1.00000,1.00000,1.00000 [...]
+
+[MEAN][6] CLV 6: [ {(0.00256,0.00001,0.00000,0.00001),(0.01794,0.00051,0.00006,0.00062),(0.04814,0.00426,0.00150,0.00491),(0.08848,0.02407,0.02257,0.02491)} {(0.00257,0.00192,0.00002,0.00002),(0.01809,0.01356,0.00111,0.00110),(0.04974,0.03745,0.00955,0.00939),(0.10327,0.08227,0.05863,0.05627)} {(0.00000,0.97983,0.00000,0.00002),(0.00018,0.85943,0.00018,0.00111),(0.00159,0.62277,0.00159,0.00974),(0.01271,0.24525,0.01271,0.05440)} {(1.00000,1.00000,1.00000,1.00000),(1.00000,1.00000,1.00000 [...]
+
+[MEAN][7] CLV 7: [ {(0.00001,0.98843,0.00001,0.00004),(0.00036,0.91716,0.00036,0.00216),(0.00347,0.76334,0.00347,0.01818),(0.02958,0.44435,0.02958,0.10423)} {(0.00129,0.00001,0.00001,0.00192),(0.00916,0.00033,0.00033,0.01338),(0.02584,0.00298,0.00302,0.03561),(0.05660,0.02082,0.02161,0.06516)} {(0.00001,0.98843,0.00001,0.00004),(0.00036,0.91716,0.00036,0.00216),(0.00347,0.76334,0.00347,0.01818),(0.02958,0.44435,0.02958,0.10423)} {(0.00129,0.00322,0.00129,0.99098),(0.00955,0.02322,0.00955 [...]
+
+[MEAN] inner-inner logL: -58.887310
+[MEAN] persite logL:     -6.1622140  -6.9407523  -1.4797267  -1.6094379  -5.2773906  -8.1327377  -5.7500211  -0.0000000  -5.1947970  -2.1438344  -8.0304760  -8.1659221  
+[MEAN] checksum logL:    -58.887310
+[MEAN] tip-inner logL:   -58.887310
+[MEAN] persite logL:     -6.1622140  -6.9407523  -1.4797267  -1.6094379  -5.2773906  -8.1327377  -5.7500211  -0.0000000  -5.1947970  -2.1438344  -8.0304760  -8.1659221  
+[MEAN] checksum logL:    -58.887310
+
+[MEDIAN] Discrete GAMMA rates: 0.029078 0.280715 0.924773 2.765435 
+[MEDIAN][1] P-matrix for branch length 0.100000
++0.9976   +0.0011   +0.0007   +0.0006   
++0.0008   +0.9975   +0.0003   +0.0014   
++0.0021   +0.0011   +0.9962   +0.0006   
++0.0008   +0.0028   +0.0003   +0.9961   
+
++0.9772   +0.0108   +0.0066   +0.0054   
++0.0081   +0.9760   +0.0027   +0.0132   
++0.0199   +0.0108   +0.9640   +0.0054   
++0.0081   +0.0265   +0.0027   +0.9628   
+
++0.9279   +0.0343   +0.0206   +0.0172   
++0.0258   +0.9248   +0.0086   +0.0408   
++0.0617   +0.0343   +0.8868   +0.0172   
++0.0258   +0.0817   +0.0086   +0.8840   
+
++0.8067   +0.0942   +0.0520   +0.0471   
++0.0706   +0.8040   +0.0235   +0.1018   
++0.1560   +0.0942   +0.7028   +0.0471   
++0.0706   +0.2036   +0.0235   +0.7022   
+
+
+[MEDIAN][2] P-matrix for branch length 0.200000
++0.9952   +0.0023   +0.0014   +0.0011   
++0.0017   +0.9949   +0.0006   +0.0028   
++0.0042   +0.0023   +0.9924   +0.0011   
++0.0017   +0.0056   +0.0006   +0.9921   
+
++0.9552   +0.0212   +0.0129   +0.0106   
++0.0159   +0.9531   +0.0053   +0.0257   
++0.0388   +0.0212   +0.9294   +0.0106   
++0.0159   +0.0514   +0.0053   +0.9273   
+
++0.8636   +0.0657   +0.0378   +0.0329   
++0.0493   +0.8598   +0.0164   +0.0744   
++0.1133   +0.0657   +0.7881   +0.0329   
++0.0493   +0.1489   +0.0164   +0.7854   
+
++0.6689   +0.1662   +0.0818   +0.0831   
++0.1246   +0.6760   +0.0415   +0.1578   
++0.2454   +0.1662   +0.5053   +0.0831   
++0.1246   +0.3155   +0.0415   +0.5183   
+
+
+[MEDIAN][3] P-matrix for branch length 1.000000
++0.9764   +0.0111   +0.0069   +0.0056   
++0.0084   +0.9752   +0.0028   +0.0137   
++0.0206   +0.0111   +0.9627   +0.0056   
++0.0084   +0.0274   +0.0028   +0.9615   
+
++0.8043   +0.0954   +0.0526   +0.0477   
++0.0716   +0.8017   +0.0239   +0.1029   
++0.1577   +0.0954   +0.6992   +0.0477   
++0.0716   +0.2058   +0.0239   +0.6987   
+
++0.5428   +0.2370   +0.1017   +0.1185   
++0.1778   +0.5692   +0.0593   +0.1938   
++0.3050   +0.2370   +0.3394   +0.1185   
++0.1778   +0.3876   +0.0593   +0.3754   
+
++0.3341   +0.3727   +0.1068   +0.1864   
++0.2795   +0.4202   +0.0932   +0.2071   
++0.3205   +0.3727   +0.1205   +0.1864   
++0.2795   +0.4141   +0.0932   +0.2132   
+
+
+[MEDIAN][4] P-matrix for branch length 1.000000
++0.9764   +0.0111   +0.0069   +0.0056   
++0.0084   +0.9752   +0.0028   +0.0137   
++0.0206   +0.0111   +0.9627   +0.0056   
++0.0084   +0.0274   +0.0028   +0.9615   
+
++0.8043   +0.0954   +0.0526   +0.0477   
++0.0716   +0.8017   +0.0239   +0.1029   
++0.1577   +0.0954   +0.6992   +0.0477   
++0.0716   +0.2058   +0.0239   +0.6987   
+
++0.5428   +0.2370   +0.1017   +0.1185   
++0.1778   +0.5692   +0.0593   +0.1938   
++0.3050   +0.2370   +0.3394   +0.1185   
++0.1778   +0.3876   +0.0593   +0.3754   
+
++0.3341   +0.3727   +0.1068   +0.1864   
++0.2795   +0.4202   +0.0932   +0.2071   
++0.3205   +0.3727   +0.1205   +0.1864   
++0.2795   +0.4141   +0.0932   +0.2132   
+
+
+[MEDIAN][5] CLV 5: [ {(0.00224,0.00447,0.00001,0.00558),(0.02050,0.03968,0.00105,0.04852),(0.05894,0.10640,0.00961,0.12427),(0.12498,0.19092,0.05459,0.20286)} {(0.00224,0.00168,0.00001,0.00001),(0.02027,0.01517,0.00082,0.00082),(0.05678,0.04240,0.00745,0.00734),(0.11117,0.08427,0.04078,0.03933)} {(0.00001,0.98991,0.00001,0.00003),(0.00045,0.90832,0.00045,0.00265),(0.00432,0.73928,0.00432,0.02217),(0.02762,0.45703,0.02762,0.09956)} {(1.00000,1.00000,1.00000,1.00000),(1.00000,1.00000,1.000 [...]
+
+[MEDIAN][6] CLV 6: [ {(0.00224,0.00001,0.00000,0.00001),(0.01980,0.00063,0.00008,0.00076),(0.05240,0.00518,0.00203,0.00592),(0.08776,0.02297,0.02096,0.02386)} {(0.00224,0.00168,0.00002,0.00002),(0.01998,0.01498,0.00136,0.00136),(0.05442,0.04104,0.01169,0.01148),(0.10159,0.08057,0.05579,0.05359)} {(0.00000,0.98241,0.00000,0.00002),(0.00022,0.84495,0.00022,0.00137),(0.00196,0.58876,0.00196,0.01193),(0.01188,0.25702,0.01188,0.05224)} {(1.00000,1.00000,1.00000,1.00000),(1.00000,1.00000,1.000 [...]
+
+[MEDIAN][7] CLV 7: [ {(0.00001,0.98991,0.00001,0.00003),(0.00045,0.90832,0.00045,0.00265),(0.00432,0.73928,0.00432,0.02217),(0.02762,0.45703,0.02762,0.09956)} {(0.00112,0.00000,0.00000,0.00168),(0.01013,0.00041,0.00041,0.01476),(0.02839,0.00367,0.00373,0.03873),(0.05558,0.01967,0.02039,0.06460)} {(0.00001,0.98991,0.00001,0.00003),(0.00045,0.90832,0.00045,0.00265),(0.00432,0.73928,0.00432,0.02217),(0.02762,0.45703,0.02762,0.09956)} {(0.00113,0.00281,0.00113,0.99214),(0.01061,0.02572,0.010 [...]
+
+[MEDIAN] inner-inner logL: -58.770643
+[MEDIAN] persite logL:     -6.1427884  -6.9489336  -1.5024934  -1.6094379  -5.2628707  -8.1164519  -5.7110281  -0.0000000  -5.1565451  -2.1652071  -8.0078758  -8.1470110  
+[MEDIAN] checksum logL:    -58.770643
+[MEDIAN] tip-inner logL:   -58.770643
+[MEDIAN] persite logL:     -6.1427884  -6.9489336  -1.5024934  -1.6094379  -5.2628707  -8.1164519  -5.7110281  -0.0000000  -5.1565451  -2.1652071  -8.0078758  -8.1470110  
+[MEDIAN] checksum logL:    -58.770643
+
+logL MEAN: -58.887310, logL MEDIAN: -58.770643
diff --git a/test/out/00032_NMOU_gamma.out b/test/out/00032_NMOU_gamma.out
new file mode 100644
index 0000000..dc929f5
--- /dev/null
+++ b/test/out/00032_NMOU_gamma.out
@@ -0,0 +1,2443 @@
+Subst params:  0.50000  2.00000  3.00000  4.00000  5.00000  1.10000  1.20000 
+               1.30000  1.40000  1.50000  2.10000  2.20000  2.30000  2.40000 
+               2.50000  3.10000  3.20000  3.30000  3.40000  3.50000  1.00000 
+              
+
+
+ TEST alpha(ncats) =   0.10( 1), mode = MEAN
+
+Rates:  1.00000 
+[0] P-matrix for branch length 0.100000
++0.8844   +0.0046   +0.0151   +0.0187   +0.0333   +0.0358   +0.0081   
++0.0039   +0.9403   +0.0092   +0.0084   +0.0123   +0.0113   +0.0145   
++0.0139   +0.0100   +0.9075   +0.0139   +0.0198   +0.0178   +0.0171   
++0.0204   +0.0107   +0.0165   +0.8807   +0.0262   +0.0234   +0.0222   
++0.0266   +0.0115   +0.0172   +0.0192   +0.8774   +0.0247   +0.0234   
++0.0331   +0.0122   +0.0178   +0.0198   +0.0286   +0.8812   +0.0075   
++0.0081   +0.0169   +0.0185   +0.0203   +0.0292   +0.0081   +0.8987   
+
+
+[0] P-matrix for branch length 0.200000
++0.7850   +0.0097   +0.0288   +0.0347   +0.0608   +0.0649   +0.0163   
++0.0083   +0.8849   +0.0180   +0.0163   +0.0236   +0.0215   +0.0274   
++0.0265   +0.0193   +0.8250   +0.0263   +0.0373   +0.0334   +0.0321   
++0.0379   +0.0208   +0.0311   +0.7777   +0.0485   +0.0431   +0.0409   
++0.0486   +0.0221   +0.0323   +0.0356   +0.7731   +0.0455   +0.0428   
++0.0599   +0.0231   +0.0334   +0.0365   +0.0525   +0.7793   +0.0152   
++0.0163   +0.0320   +0.0347   +0.0375   +0.0535   +0.0165   +0.8095   
+
+
+[0] P-matrix for branch length 1.000000
++0.3514   +0.0553   +0.0992   +0.1027   +0.1595   +0.1600   +0.0719   
++0.0474   +0.5627   +0.0712   +0.0629   +0.0881   +0.0765   +0.0911   
++0.0915   +0.0767   +0.4179   +0.0869   +0.1206   +0.1059   +0.1003   
++0.1120   +0.0801   +0.1027   +0.3281   +0.1401   +0.1227   +0.1143   
++0.1276   +0.0822   +0.1046   +0.1028   +0.3403   +0.1267   +0.1158   
++0.1477   +0.0824   +0.1059   +0.1038   +0.1462   +0.3436   +0.0704   
++0.0719   +0.1063   +0.1087   +0.1048   +0.1448   +0.0763   +0.3873   
+
+
+[0] P-matrix for branch length 1.000000
++0.3514   +0.0553   +0.0992   +0.1027   +0.1595   +0.1600   +0.0719   
++0.0474   +0.5627   +0.0712   +0.0629   +0.0881   +0.0765   +0.0911   
++0.0915   +0.0767   +0.4179   +0.0869   +0.1206   +0.1059   +0.1003   
++0.1120   +0.0801   +0.1027   +0.3281   +0.1401   +0.1227   +0.1143   
++0.1276   +0.0822   +0.1046   +0.1028   +0.3403   +0.1267   +0.1158   
++0.1477   +0.0824   +0.1059   +0.1038   +0.1462   +0.3436   +0.0704   
++0.0719   +0.1063   +0.1087   +0.1048   +0.1448   +0.0763   +0.3873   
+
+
+[0] CLV 5: [ {(0.00028,0.01589,0.01595,0.00065,0.00071,0.00077,0.00111)} {(0.61615,0.00007,0.00070,0.00144,0.00236,0.00359,0.00026)} {(0.02257,0.00015,0.02190,0.00118,0.00157,0.00200,0.00056)} {(0.00083,0.00032,0.68061,0.00097,0.00104,0.00112,0.00121)} {(0.02726,0.00013,0.00070,0.02946,0.00173,0.00219,0.00061)} {(0.00028,0.01589,0.01595,0.00065,0.00071,0.00077,0.00111)} {(0.00421,0.00046,0.00112,0.00186,0.00207,0.60730,0.00027)} {(0.00083,0.00032,0.68061,0.00097,0.00104,0.00112,0.00121)} [...]
+[0] CLV 6: [ {(0.00050,0.00013,0.00039,0.00004,0.00006,0.00007,0.00003)} {(0.03537,0.00006,0.00031,0.00060,0.00085,0.01842,0.00009)} {(0.02011,0.00048,0.01963,0.00188,0.00234,0.00293,0.00023)} {(0.00032,0.00012,0.50961,0.00038,0.00041,0.00044,0.00048)} {(0.02441,0.00053,0.00146,0.02554,0.00277,0.00342,0.00028)} {(0.00002,0.00027,0.01212,0.00003,0.00004,0.00004,0.00006)} {(0.00166,0.00016,0.00040,0.00069,0.00078,0.41723,0.00009)} {(0.00032,0.00012,0.50961,0.00038,0.00041,0.00044,0.00048)} [...]
+[0] CLV 7: [ {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0042,0.0005,0.0011,0.0019,0.0021,0.6073,0.0003)} {(0.0273,0.0001,0.0007,0.0295,0.0017,0.0022,0.0006)} {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0006,0.0209,0.0007,0.0010,0.0170,0.0012,0.0017)} {(0.0021,0.0004,0.0010,0.0377,0.0275,0.0019,0.0020)} {(0.0042,0.0005,0.0011,0.0019,0.0021,0.6073,0.0003)} {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0226,0.0001,0.0219,0.0012,0.0016,0.0020,0.0006)} {( [...]
+
+
+ TEST alpha(ncats) =   0.10( 1), mode = MEDIAN
+
+Rates:  1.00000 
+[0] P-matrix for branch length 0.100000
++0.8844   +0.0046   +0.0151   +0.0187   +0.0333   +0.0358   +0.0081   
++0.0039   +0.9403   +0.0092   +0.0084   +0.0123   +0.0113   +0.0145   
++0.0139   +0.0100   +0.9075   +0.0139   +0.0198   +0.0178   +0.0171   
++0.0204   +0.0107   +0.0165   +0.8807   +0.0262   +0.0234   +0.0222   
++0.0266   +0.0115   +0.0172   +0.0192   +0.8774   +0.0247   +0.0234   
++0.0331   +0.0122   +0.0178   +0.0198   +0.0286   +0.8812   +0.0075   
++0.0081   +0.0169   +0.0185   +0.0203   +0.0292   +0.0081   +0.8987   
+
+
+[0] P-matrix for branch length 0.200000
++0.7850   +0.0097   +0.0288   +0.0347   +0.0608   +0.0649   +0.0163   
++0.0083   +0.8849   +0.0180   +0.0163   +0.0236   +0.0215   +0.0274   
++0.0265   +0.0193   +0.8250   +0.0263   +0.0373   +0.0334   +0.0321   
++0.0379   +0.0208   +0.0311   +0.7777   +0.0485   +0.0431   +0.0409   
++0.0486   +0.0221   +0.0323   +0.0356   +0.7731   +0.0455   +0.0428   
++0.0599   +0.0231   +0.0334   +0.0365   +0.0525   +0.7793   +0.0152   
++0.0163   +0.0320   +0.0347   +0.0375   +0.0535   +0.0165   +0.8095   
+
+
+[0] P-matrix for branch length 1.000000
++0.3514   +0.0553   +0.0992   +0.1027   +0.1595   +0.1600   +0.0719   
++0.0474   +0.5627   +0.0712   +0.0629   +0.0881   +0.0765   +0.0911   
++0.0915   +0.0767   +0.4179   +0.0869   +0.1206   +0.1059   +0.1003   
++0.1120   +0.0801   +0.1027   +0.3281   +0.1401   +0.1227   +0.1143   
++0.1276   +0.0822   +0.1046   +0.1028   +0.3403   +0.1267   +0.1158   
++0.1477   +0.0824   +0.1059   +0.1038   +0.1462   +0.3436   +0.0704   
++0.0719   +0.1063   +0.1087   +0.1048   +0.1448   +0.0763   +0.3873   
+
+
+[0] P-matrix for branch length 1.000000
++0.3514   +0.0553   +0.0992   +0.1027   +0.1595   +0.1600   +0.0719   
++0.0474   +0.5627   +0.0712   +0.0629   +0.0881   +0.0765   +0.0911   
++0.0915   +0.0767   +0.4179   +0.0869   +0.1206   +0.1059   +0.1003   
++0.1120   +0.0801   +0.1027   +0.3281   +0.1401   +0.1227   +0.1143   
++0.1276   +0.0822   +0.1046   +0.1028   +0.3403   +0.1267   +0.1158   
++0.1477   +0.0824   +0.1059   +0.1038   +0.1462   +0.3436   +0.0704   
++0.0719   +0.1063   +0.1087   +0.1048   +0.1448   +0.0763   +0.3873   
+
+
+[0] CLV 5: [ {(0.00028,0.01589,0.01595,0.00065,0.00071,0.00077,0.00111)} {(0.61615,0.00007,0.00070,0.00144,0.00236,0.00359,0.00026)} {(0.02257,0.00015,0.02190,0.00118,0.00157,0.00200,0.00056)} {(0.00083,0.00032,0.68061,0.00097,0.00104,0.00112,0.00121)} {(0.02726,0.00013,0.00070,0.02946,0.00173,0.00219,0.00061)} {(0.00028,0.01589,0.01595,0.00065,0.00071,0.00077,0.00111)} {(0.00421,0.00046,0.00112,0.00186,0.00207,0.60730,0.00027)} {(0.00083,0.00032,0.68061,0.00097,0.00104,0.00112,0.00121)} [...]
+[0] CLV 6: [ {(0.00050,0.00013,0.00039,0.00004,0.00006,0.00007,0.00003)} {(0.03537,0.00006,0.00031,0.00060,0.00085,0.01842,0.00009)} {(0.02011,0.00048,0.01963,0.00188,0.00234,0.00293,0.00023)} {(0.00032,0.00012,0.50961,0.00038,0.00041,0.00044,0.00048)} {(0.02441,0.00053,0.00146,0.02554,0.00277,0.00342,0.00028)} {(0.00002,0.00027,0.01212,0.00003,0.00004,0.00004,0.00006)} {(0.00166,0.00016,0.00040,0.00069,0.00078,0.41723,0.00009)} {(0.00032,0.00012,0.50961,0.00038,0.00041,0.00044,0.00048)} [...]
+[0] CLV 7: [ {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0042,0.0005,0.0011,0.0019,0.0021,0.6073,0.0003)} {(0.0273,0.0001,0.0007,0.0295,0.0017,0.0022,0.0006)} {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0006,0.0209,0.0007,0.0010,0.0170,0.0012,0.0017)} {(0.0021,0.0004,0.0010,0.0377,0.0275,0.0019,0.0020)} {(0.0042,0.0005,0.0011,0.0019,0.0021,0.6073,0.0003)} {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0226,0.0001,0.0219,0.0012,0.0016,0.0020,0.0006)} {( [...]
+
+
+ TEST alpha(ncats) =   1.25( 1), mode = MEAN
+
+Rates:  1.00000 
+[1] P-matrix for branch length 0.100000
++0.8844   +0.0046   +0.0151   +0.0187   +0.0333   +0.0358   +0.0081   
++0.0039   +0.9403   +0.0092   +0.0084   +0.0123   +0.0113   +0.0145   
++0.0139   +0.0100   +0.9075   +0.0139   +0.0198   +0.0178   +0.0171   
++0.0204   +0.0107   +0.0165   +0.8807   +0.0262   +0.0234   +0.0222   
++0.0266   +0.0115   +0.0172   +0.0192   +0.8774   +0.0247   +0.0234   
++0.0331   +0.0122   +0.0178   +0.0198   +0.0286   +0.8812   +0.0075   
++0.0081   +0.0169   +0.0185   +0.0203   +0.0292   +0.0081   +0.8987   
+
+
+[1] P-matrix for branch length 0.200000
++0.7850   +0.0097   +0.0288   +0.0347   +0.0608   +0.0649   +0.0163   
++0.0083   +0.8849   +0.0180   +0.0163   +0.0236   +0.0215   +0.0274   
++0.0265   +0.0193   +0.8250   +0.0263   +0.0373   +0.0334   +0.0321   
++0.0379   +0.0208   +0.0311   +0.7777   +0.0485   +0.0431   +0.0409   
++0.0486   +0.0221   +0.0323   +0.0356   +0.7731   +0.0455   +0.0428   
++0.0599   +0.0231   +0.0334   +0.0365   +0.0525   +0.7793   +0.0152   
++0.0163   +0.0320   +0.0347   +0.0375   +0.0535   +0.0165   +0.8095   
+
+
+[1] P-matrix for branch length 1.000000
++0.3514   +0.0553   +0.0992   +0.1027   +0.1595   +0.1600   +0.0719   
++0.0474   +0.5627   +0.0712   +0.0629   +0.0881   +0.0765   +0.0911   
++0.0915   +0.0767   +0.4179   +0.0869   +0.1206   +0.1059   +0.1003   
++0.1120   +0.0801   +0.1027   +0.3281   +0.1401   +0.1227   +0.1143   
++0.1276   +0.0822   +0.1046   +0.1028   +0.3403   +0.1267   +0.1158   
++0.1477   +0.0824   +0.1059   +0.1038   +0.1462   +0.3436   +0.0704   
++0.0719   +0.1063   +0.1087   +0.1048   +0.1448   +0.0763   +0.3873   
+
+
+[1] P-matrix for branch length 1.000000
++0.3514   +0.0553   +0.0992   +0.1027   +0.1595   +0.1600   +0.0719   
++0.0474   +0.5627   +0.0712   +0.0629   +0.0881   +0.0765   +0.0911   
++0.0915   +0.0767   +0.4179   +0.0869   +0.1206   +0.1059   +0.1003   
++0.1120   +0.0801   +0.1027   +0.3281   +0.1401   +0.1227   +0.1143   
++0.1276   +0.0822   +0.1046   +0.1028   +0.3403   +0.1267   +0.1158   
++0.1477   +0.0824   +0.1059   +0.1038   +0.1462   +0.3436   +0.0704   
++0.0719   +0.1063   +0.1087   +0.1048   +0.1448   +0.0763   +0.3873   
+
+
+[1] CLV 5: [ {(0.00028,0.01589,0.01595,0.00065,0.00071,0.00077,0.00111)} {(0.61615,0.00007,0.00070,0.00144,0.00236,0.00359,0.00026)} {(0.02257,0.00015,0.02190,0.00118,0.00157,0.00200,0.00056)} {(0.00083,0.00032,0.68061,0.00097,0.00104,0.00112,0.00121)} {(0.02726,0.00013,0.00070,0.02946,0.00173,0.00219,0.00061)} {(0.00028,0.01589,0.01595,0.00065,0.00071,0.00077,0.00111)} {(0.00421,0.00046,0.00112,0.00186,0.00207,0.60730,0.00027)} {(0.00083,0.00032,0.68061,0.00097,0.00104,0.00112,0.00121)} [...]
+[1] CLV 6: [ {(0.00050,0.00013,0.00039,0.00004,0.00006,0.00007,0.00003)} {(0.03537,0.00006,0.00031,0.00060,0.00085,0.01842,0.00009)} {(0.02011,0.00048,0.01963,0.00188,0.00234,0.00293,0.00023)} {(0.00032,0.00012,0.50961,0.00038,0.00041,0.00044,0.00048)} {(0.02441,0.00053,0.00146,0.02554,0.00277,0.00342,0.00028)} {(0.00002,0.00027,0.01212,0.00003,0.00004,0.00004,0.00006)} {(0.00166,0.00016,0.00040,0.00069,0.00078,0.41723,0.00009)} {(0.00032,0.00012,0.50961,0.00038,0.00041,0.00044,0.00048)} [...]
+[1] CLV 7: [ {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0042,0.0005,0.0011,0.0019,0.0021,0.6073,0.0003)} {(0.0273,0.0001,0.0007,0.0295,0.0017,0.0022,0.0006)} {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0006,0.0209,0.0007,0.0010,0.0170,0.0012,0.0017)} {(0.0021,0.0004,0.0010,0.0377,0.0275,0.0019,0.0020)} {(0.0042,0.0005,0.0011,0.0019,0.0021,0.6073,0.0003)} {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0226,0.0001,0.0219,0.0012,0.0016,0.0020,0.0006)} {( [...]
+
+
+ TEST alpha(ncats) =   1.25( 1), mode = MEDIAN
+
+Rates:  1.00000 
+[1] P-matrix for branch length 0.100000
++0.8844   +0.0046   +0.0151   +0.0187   +0.0333   +0.0358   +0.0081   
++0.0039   +0.9403   +0.0092   +0.0084   +0.0123   +0.0113   +0.0145   
++0.0139   +0.0100   +0.9075   +0.0139   +0.0198   +0.0178   +0.0171   
++0.0204   +0.0107   +0.0165   +0.8807   +0.0262   +0.0234   +0.0222   
++0.0266   +0.0115   +0.0172   +0.0192   +0.8774   +0.0247   +0.0234   
++0.0331   +0.0122   +0.0178   +0.0198   +0.0286   +0.8812   +0.0075   
++0.0081   +0.0169   +0.0185   +0.0203   +0.0292   +0.0081   +0.8987   
+
+
+[1] P-matrix for branch length 0.200000
++0.7850   +0.0097   +0.0288   +0.0347   +0.0608   +0.0649   +0.0163   
++0.0083   +0.8849   +0.0180   +0.0163   +0.0236   +0.0215   +0.0274   
++0.0265   +0.0193   +0.8250   +0.0263   +0.0373   +0.0334   +0.0321   
++0.0379   +0.0208   +0.0311   +0.7777   +0.0485   +0.0431   +0.0409   
++0.0486   +0.0221   +0.0323   +0.0356   +0.7731   +0.0455   +0.0428   
++0.0599   +0.0231   +0.0334   +0.0365   +0.0525   +0.7793   +0.0152   
++0.0163   +0.0320   +0.0347   +0.0375   +0.0535   +0.0165   +0.8095   
+
+
+[1] P-matrix for branch length 1.000000
++0.3514   +0.0553   +0.0992   +0.1027   +0.1595   +0.1600   +0.0719   
++0.0474   +0.5627   +0.0712   +0.0629   +0.0881   +0.0765   +0.0911   
++0.0915   +0.0767   +0.4179   +0.0869   +0.1206   +0.1059   +0.1003   
++0.1120   +0.0801   +0.1027   +0.3281   +0.1401   +0.1227   +0.1143   
++0.1276   +0.0822   +0.1046   +0.1028   +0.3403   +0.1267   +0.1158   
++0.1477   +0.0824   +0.1059   +0.1038   +0.1462   +0.3436   +0.0704   
++0.0719   +0.1063   +0.1087   +0.1048   +0.1448   +0.0763   +0.3873   
+
+
+[1] P-matrix for branch length 1.000000
++0.3514   +0.0553   +0.0992   +0.1027   +0.1595   +0.1600   +0.0719   
++0.0474   +0.5627   +0.0712   +0.0629   +0.0881   +0.0765   +0.0911   
++0.0915   +0.0767   +0.4179   +0.0869   +0.1206   +0.1059   +0.1003   
++0.1120   +0.0801   +0.1027   +0.3281   +0.1401   +0.1227   +0.1143   
++0.1276   +0.0822   +0.1046   +0.1028   +0.3403   +0.1267   +0.1158   
++0.1477   +0.0824   +0.1059   +0.1038   +0.1462   +0.3436   +0.0704   
++0.0719   +0.1063   +0.1087   +0.1048   +0.1448   +0.0763   +0.3873   
+
+
+[1] CLV 5: [ {(0.00028,0.01589,0.01595,0.00065,0.00071,0.00077,0.00111)} {(0.61615,0.00007,0.00070,0.00144,0.00236,0.00359,0.00026)} {(0.02257,0.00015,0.02190,0.00118,0.00157,0.00200,0.00056)} {(0.00083,0.00032,0.68061,0.00097,0.00104,0.00112,0.00121)} {(0.02726,0.00013,0.00070,0.02946,0.00173,0.00219,0.00061)} {(0.00028,0.01589,0.01595,0.00065,0.00071,0.00077,0.00111)} {(0.00421,0.00046,0.00112,0.00186,0.00207,0.60730,0.00027)} {(0.00083,0.00032,0.68061,0.00097,0.00104,0.00112,0.00121)} [...]
+[1] CLV 6: [ {(0.00050,0.00013,0.00039,0.00004,0.00006,0.00007,0.00003)} {(0.03537,0.00006,0.00031,0.00060,0.00085,0.01842,0.00009)} {(0.02011,0.00048,0.01963,0.00188,0.00234,0.00293,0.00023)} {(0.00032,0.00012,0.50961,0.00038,0.00041,0.00044,0.00048)} {(0.02441,0.00053,0.00146,0.02554,0.00277,0.00342,0.00028)} {(0.00002,0.00027,0.01212,0.00003,0.00004,0.00004,0.00006)} {(0.00166,0.00016,0.00040,0.00069,0.00078,0.41723,0.00009)} {(0.00032,0.00012,0.50961,0.00038,0.00041,0.00044,0.00048)} [...]
+[1] CLV 7: [ {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0042,0.0005,0.0011,0.0019,0.0021,0.6073,0.0003)} {(0.0273,0.0001,0.0007,0.0295,0.0017,0.0022,0.0006)} {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0006,0.0209,0.0007,0.0010,0.0170,0.0012,0.0017)} {(0.0021,0.0004,0.0010,0.0377,0.0275,0.0019,0.0020)} {(0.0042,0.0005,0.0011,0.0019,0.0021,0.6073,0.0003)} {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0226,0.0001,0.0219,0.0012,0.0016,0.0020,0.0006)} {( [...]
+
+
+ TEST alpha(ncats) = 100.00( 1), mode = MEAN
+
+Rates:  1.00000 
+[2] P-matrix for branch length 0.100000
++0.8844   +0.0046   +0.0151   +0.0187   +0.0333   +0.0358   +0.0081   
++0.0039   +0.9403   +0.0092   +0.0084   +0.0123   +0.0113   +0.0145   
++0.0139   +0.0100   +0.9075   +0.0139   +0.0198   +0.0178   +0.0171   
++0.0204   +0.0107   +0.0165   +0.8807   +0.0262   +0.0234   +0.0222   
++0.0266   +0.0115   +0.0172   +0.0192   +0.8774   +0.0247   +0.0234   
++0.0331   +0.0122   +0.0178   +0.0198   +0.0286   +0.8812   +0.0075   
++0.0081   +0.0169   +0.0185   +0.0203   +0.0292   +0.0081   +0.8987   
+
+
+[2] P-matrix for branch length 0.200000
++0.7850   +0.0097   +0.0288   +0.0347   +0.0608   +0.0649   +0.0163   
++0.0083   +0.8849   +0.0180   +0.0163   +0.0236   +0.0215   +0.0274   
++0.0265   +0.0193   +0.8250   +0.0263   +0.0373   +0.0334   +0.0321   
++0.0379   +0.0208   +0.0311   +0.7777   +0.0485   +0.0431   +0.0409   
++0.0486   +0.0221   +0.0323   +0.0356   +0.7731   +0.0455   +0.0428   
++0.0599   +0.0231   +0.0334   +0.0365   +0.0525   +0.7793   +0.0152   
++0.0163   +0.0320   +0.0347   +0.0375   +0.0535   +0.0165   +0.8095   
+
+
+[2] P-matrix for branch length 1.000000
++0.3514   +0.0553   +0.0992   +0.1027   +0.1595   +0.1600   +0.0719   
++0.0474   +0.5627   +0.0712   +0.0629   +0.0881   +0.0765   +0.0911   
++0.0915   +0.0767   +0.4179   +0.0869   +0.1206   +0.1059   +0.1003   
++0.1120   +0.0801   +0.1027   +0.3281   +0.1401   +0.1227   +0.1143   
++0.1276   +0.0822   +0.1046   +0.1028   +0.3403   +0.1267   +0.1158   
++0.1477   +0.0824   +0.1059   +0.1038   +0.1462   +0.3436   +0.0704   
++0.0719   +0.1063   +0.1087   +0.1048   +0.1448   +0.0763   +0.3873   
+
+
+[2] P-matrix for branch length 1.000000
++0.3514   +0.0553   +0.0992   +0.1027   +0.1595   +0.1600   +0.0719   
++0.0474   +0.5627   +0.0712   +0.0629   +0.0881   +0.0765   +0.0911   
++0.0915   +0.0767   +0.4179   +0.0869   +0.1206   +0.1059   +0.1003   
++0.1120   +0.0801   +0.1027   +0.3281   +0.1401   +0.1227   +0.1143   
++0.1276   +0.0822   +0.1046   +0.1028   +0.3403   +0.1267   +0.1158   
++0.1477   +0.0824   +0.1059   +0.1038   +0.1462   +0.3436   +0.0704   
++0.0719   +0.1063   +0.1087   +0.1048   +0.1448   +0.0763   +0.3873   
+
+
+[2] CLV 5: [ {(0.00028,0.01589,0.01595,0.00065,0.00071,0.00077,0.00111)} {(0.61615,0.00007,0.00070,0.00144,0.00236,0.00359,0.00026)} {(0.02257,0.00015,0.02190,0.00118,0.00157,0.00200,0.00056)} {(0.00083,0.00032,0.68061,0.00097,0.00104,0.00112,0.00121)} {(0.02726,0.00013,0.00070,0.02946,0.00173,0.00219,0.00061)} {(0.00028,0.01589,0.01595,0.00065,0.00071,0.00077,0.00111)} {(0.00421,0.00046,0.00112,0.00186,0.00207,0.60730,0.00027)} {(0.00083,0.00032,0.68061,0.00097,0.00104,0.00112,0.00121)} [...]
+[2] CLV 6: [ {(0.00050,0.00013,0.00039,0.00004,0.00006,0.00007,0.00003)} {(0.03537,0.00006,0.00031,0.00060,0.00085,0.01842,0.00009)} {(0.02011,0.00048,0.01963,0.00188,0.00234,0.00293,0.00023)} {(0.00032,0.00012,0.50961,0.00038,0.00041,0.00044,0.00048)} {(0.02441,0.00053,0.00146,0.02554,0.00277,0.00342,0.00028)} {(0.00002,0.00027,0.01212,0.00003,0.00004,0.00004,0.00006)} {(0.00166,0.00016,0.00040,0.00069,0.00078,0.41723,0.00009)} {(0.00032,0.00012,0.50961,0.00038,0.00041,0.00044,0.00048)} [...]
+[2] CLV 7: [ {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0042,0.0005,0.0011,0.0019,0.0021,0.6073,0.0003)} {(0.0273,0.0001,0.0007,0.0295,0.0017,0.0022,0.0006)} {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0006,0.0209,0.0007,0.0010,0.0170,0.0012,0.0017)} {(0.0021,0.0004,0.0010,0.0377,0.0275,0.0019,0.0020)} {(0.0042,0.0005,0.0011,0.0019,0.0021,0.6073,0.0003)} {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0226,0.0001,0.0219,0.0012,0.0016,0.0020,0.0006)} {( [...]
+
+
+ TEST alpha(ncats) = 100.00( 1), mode = MEDIAN
+
+Rates:  1.00000 
+[2] P-matrix for branch length 0.100000
++0.8844   +0.0046   +0.0151   +0.0187   +0.0333   +0.0358   +0.0081   
++0.0039   +0.9403   +0.0092   +0.0084   +0.0123   +0.0113   +0.0145   
++0.0139   +0.0100   +0.9075   +0.0139   +0.0198   +0.0178   +0.0171   
++0.0204   +0.0107   +0.0165   +0.8807   +0.0262   +0.0234   +0.0222   
++0.0266   +0.0115   +0.0172   +0.0192   +0.8774   +0.0247   +0.0234   
++0.0331   +0.0122   +0.0178   +0.0198   +0.0286   +0.8812   +0.0075   
++0.0081   +0.0169   +0.0185   +0.0203   +0.0292   +0.0081   +0.8987   
+
+
+[2] P-matrix for branch length 0.200000
++0.7850   +0.0097   +0.0288   +0.0347   +0.0608   +0.0649   +0.0163   
++0.0083   +0.8849   +0.0180   +0.0163   +0.0236   +0.0215   +0.0274   
++0.0265   +0.0193   +0.8250   +0.0263   +0.0373   +0.0334   +0.0321   
++0.0379   +0.0208   +0.0311   +0.7777   +0.0485   +0.0431   +0.0409   
++0.0486   +0.0221   +0.0323   +0.0356   +0.7731   +0.0455   +0.0428   
++0.0599   +0.0231   +0.0334   +0.0365   +0.0525   +0.7793   +0.0152   
++0.0163   +0.0320   +0.0347   +0.0375   +0.0535   +0.0165   +0.8095   
+
+
+[2] P-matrix for branch length 1.000000
++0.3514   +0.0553   +0.0992   +0.1027   +0.1595   +0.1600   +0.0719   
++0.0474   +0.5627   +0.0712   +0.0629   +0.0881   +0.0765   +0.0911   
++0.0915   +0.0767   +0.4179   +0.0869   +0.1206   +0.1059   +0.1003   
++0.1120   +0.0801   +0.1027   +0.3281   +0.1401   +0.1227   +0.1143   
++0.1276   +0.0822   +0.1046   +0.1028   +0.3403   +0.1267   +0.1158   
++0.1477   +0.0824   +0.1059   +0.1038   +0.1462   +0.3436   +0.0704   
++0.0719   +0.1063   +0.1087   +0.1048   +0.1448   +0.0763   +0.3873   
+
+
+[2] P-matrix for branch length 1.000000
++0.3514   +0.0553   +0.0992   +0.1027   +0.1595   +0.1600   +0.0719   
++0.0474   +0.5627   +0.0712   +0.0629   +0.0881   +0.0765   +0.0911   
++0.0915   +0.0767   +0.4179   +0.0869   +0.1206   +0.1059   +0.1003   
++0.1120   +0.0801   +0.1027   +0.3281   +0.1401   +0.1227   +0.1143   
++0.1276   +0.0822   +0.1046   +0.1028   +0.3403   +0.1267   +0.1158   
++0.1477   +0.0824   +0.1059   +0.1038   +0.1462   +0.3436   +0.0704   
++0.0719   +0.1063   +0.1087   +0.1048   +0.1448   +0.0763   +0.3873   
+
+
+[2] CLV 5: [ {(0.00028,0.01589,0.01595,0.00065,0.00071,0.00077,0.00111)} {(0.61615,0.00007,0.00070,0.00144,0.00236,0.00359,0.00026)} {(0.02257,0.00015,0.02190,0.00118,0.00157,0.00200,0.00056)} {(0.00083,0.00032,0.68061,0.00097,0.00104,0.00112,0.00121)} {(0.02726,0.00013,0.00070,0.02946,0.00173,0.00219,0.00061)} {(0.00028,0.01589,0.01595,0.00065,0.00071,0.00077,0.00111)} {(0.00421,0.00046,0.00112,0.00186,0.00207,0.60730,0.00027)} {(0.00083,0.00032,0.68061,0.00097,0.00104,0.00112,0.00121)} [...]
+[2] CLV 6: [ {(0.00050,0.00013,0.00039,0.00004,0.00006,0.00007,0.00003)} {(0.03537,0.00006,0.00031,0.00060,0.00085,0.01842,0.00009)} {(0.02011,0.00048,0.01963,0.00188,0.00234,0.00293,0.00023)} {(0.00032,0.00012,0.50961,0.00038,0.00041,0.00044,0.00048)} {(0.02441,0.00053,0.00146,0.02554,0.00277,0.00342,0.00028)} {(0.00002,0.00027,0.01212,0.00003,0.00004,0.00004,0.00006)} {(0.00166,0.00016,0.00040,0.00069,0.00078,0.41723,0.00009)} {(0.00032,0.00012,0.50961,0.00038,0.00041,0.00044,0.00048)} [...]
+[2] CLV 7: [ {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0042,0.0005,0.0011,0.0019,0.0021,0.6073,0.0003)} {(0.0273,0.0001,0.0007,0.0295,0.0017,0.0022,0.0006)} {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0006,0.0209,0.0007,0.0010,0.0170,0.0012,0.0017)} {(0.0021,0.0004,0.0010,0.0377,0.0275,0.0019,0.0020)} {(0.0042,0.0005,0.0011,0.0019,0.0021,0.6073,0.0003)} {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0226,0.0001,0.0219,0.0012,0.0016,0.0020,0.0006)} {( [...]
+Subst params:  0.50000  2.00000  3.00000  4.00000  5.00000  1.10000  1.20000 
+               1.30000  1.40000  1.50000  2.10000  2.20000  2.30000  2.40000 
+               2.50000  3.10000  3.20000  3.30000  3.40000  3.50000  1.00000 
+              
+
+
+ TEST alpha(ncats) =   0.10( 4), mode = MEAN
+
+Rates:  0.00000  0.00069  0.11451  3.88480 
+       
+[0] P-matrix for branch length 0.100000
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9999   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.9999   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.9999   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.9999   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.9999   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.9999   
+
++0.9859   +0.0005   +0.0018   +0.0023   +0.0041   +0.0045   +0.0009   
++0.0004   +0.9929   +0.0011   +0.0010   +0.0015   +0.0014   +0.0017   
++0.0017   +0.0012   +0.9889   +0.0017   +0.0024   +0.0022   +0.0021   
++0.0025   +0.0013   +0.0020   +0.9854   +0.0032   +0.0029   +0.0027   
++0.0033   +0.0014   +0.0021   +0.0024   +0.9849   +0.0031   +0.0029   
++0.0041   +0.0015   +0.0022   +0.0024   +0.0035   +0.9854   +0.0008   
++0.0009   +0.0020   +0.0023   +0.0025   +0.0036   +0.0009   +0.9877   
+
++0.6334   +0.0201   +0.0510   +0.0590   +0.1000   +0.1052   +0.0312   
++0.0172   +0.7911   +0.0330   +0.0298   +0.0427   +0.0382   +0.0481   
++0.0471   +0.0356   +0.6931   +0.0461   +0.0649   +0.0578   +0.0553   
++0.0644   +0.0379   +0.0545   +0.6204   +0.0819   +0.0725   +0.0684   
++0.0800   +0.0398   +0.0563   +0.0601   +0.6168   +0.0761   +0.0709   
++0.0971   +0.0411   +0.0578   +0.0613   +0.0878   +0.6251   +0.0297   
++0.0312   +0.0561   +0.0599   +0.0627   +0.0887   +0.0322   +0.6692   
+
+
+[0] P-matrix for branch length 0.200000
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9998   +0.0000   +0.0000   +0.0000   +0.0001   +0.0001   +0.0000   
++0.0000   +0.9999   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.9999   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.9998   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.9998   +0.0000   +0.0000   
++0.0001   +0.0000   +0.0000   +0.0000   +0.0000   +0.9998   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.9999   
+
++0.9720   +0.0010   +0.0036   +0.0045   +0.0082   +0.0089   +0.0018   
++0.0009   +0.9859   +0.0022   +0.0020   +0.0029   +0.0027   +0.0035   
++0.0033   +0.0023   +0.9779   +0.0033   +0.0047   +0.0043   +0.0041   
++0.0049   +0.0025   +0.0039   +0.9711   +0.0064   +0.0057   +0.0054   
++0.0066   +0.0027   +0.0041   +0.0047   +0.9701   +0.0061   +0.0057   
++0.0082   +0.0029   +0.0043   +0.0048   +0.0070   +0.9711   +0.0017   
++0.0018   +0.0041   +0.0045   +0.0050   +0.0072   +0.0018   +0.9757   
+
++0.4269   +0.0427   +0.0851   +0.0914   +0.1460   +0.1490   +0.0587   
++0.0366   +0.6344   +0.0590   +0.0525   +0.0740   +0.0648   +0.0788   
++0.0786   +0.0635   +0.4969   +0.0753   +0.1050   +0.0926   +0.0880   
++0.0997   +0.0668   +0.0890   +0.4060   +0.1254   +0.1101   +0.1030   
++0.1168   +0.0690   +0.0910   +0.0919   +0.4117   +0.1143   +0.1051   
++0.1376   +0.0698   +0.0926   +0.0931   +0.1319   +0.4179   +0.0570   
++0.0587   +0.0919   +0.0954   +0.0944   +0.1314   +0.0618   +0.4664   
+
+
+[0] P-matrix for branch length 1.000000
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9991   +0.0000   +0.0001   +0.0001   +0.0003   +0.0003   +0.0001   
++0.0000   +0.9996   +0.0001   +0.0001   +0.0001   +0.0001   +0.0001   
++0.0001   +0.0001   +0.9993   +0.0001   +0.0001   +0.0001   +0.0001   
++0.0002   +0.0001   +0.0001   +0.9991   +0.0002   +0.0002   +0.0002   
++0.0002   +0.0001   +0.0001   +0.0001   +0.9991   +0.0002   +0.0002   
++0.0003   +0.0001   +0.0001   +0.0001   +0.0002   +0.9991   +0.0001   
++0.0001   +0.0001   +0.0001   +0.0002   +0.0002   +0.0001   +0.9993   
+
++0.8690   +0.0053   +0.0172   +0.0212   +0.0376   +0.0404   +0.0093   
++0.0045   +0.9320   +0.0105   +0.0096   +0.0140   +0.0128   +0.0165   
++0.0158   +0.0113   +0.8949   +0.0158   +0.0225   +0.0202   +0.0194   
++0.0231   +0.0122   +0.0187   +0.8648   +0.0297   +0.0264   +0.0251   
++0.0301   +0.0131   +0.0195   +0.0218   +0.8612   +0.0280   +0.0264   
++0.0373   +0.0138   +0.0202   +0.0224   +0.0323   +0.8654   +0.0086   
++0.0093   +0.0192   +0.0210   +0.0230   +0.0330   +0.0093   +0.8851   
+
++0.1419   +0.1398   +0.1444   +0.1240   +0.1701   +0.1498   +0.1300   
++0.1198   +0.2065   +0.1351   +0.1150   +0.1570   +0.1350   +0.1318   
++0.1333   +0.1454   +0.1555   +0.1220   +0.1664   +0.1443   +0.1331   
++0.1353   +0.1463   +0.1442   +0.1264   +0.1681   +0.1458   +0.1338   
++0.1361   +0.1465   +0.1443   +0.1233   +0.1701   +0.1462   +0.1336   
++0.1383   +0.1453   +0.1443   +0.1234   +0.1686   +0.1501   +0.1300   
++0.1300   +0.1537   +0.1442   +0.1227   +0.1670   +0.1408   +0.1417   
+
+
+[0] P-matrix for branch length 1.000000
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9991   +0.0000   +0.0001   +0.0001   +0.0003   +0.0003   +0.0001   
++0.0000   +0.9996   +0.0001   +0.0001   +0.0001   +0.0001   +0.0001   
++0.0001   +0.0001   +0.9993   +0.0001   +0.0001   +0.0001   +0.0001   
++0.0002   +0.0001   +0.0001   +0.9991   +0.0002   +0.0002   +0.0002   
++0.0002   +0.0001   +0.0001   +0.0001   +0.9991   +0.0002   +0.0002   
++0.0003   +0.0001   +0.0001   +0.0001   +0.0002   +0.9991   +0.0001   
++0.0001   +0.0001   +0.0001   +0.0002   +0.0002   +0.0001   +0.9993   
+
++0.8690   +0.0053   +0.0172   +0.0212   +0.0376   +0.0404   +0.0093   
++0.0045   +0.9320   +0.0105   +0.0096   +0.0140   +0.0128   +0.0165   
++0.0158   +0.0113   +0.8949   +0.0158   +0.0225   +0.0202   +0.0194   
++0.0231   +0.0122   +0.0187   +0.8648   +0.0297   +0.0264   +0.0251   
++0.0301   +0.0131   +0.0195   +0.0218   +0.8612   +0.0280   +0.0264   
++0.0373   +0.0138   +0.0202   +0.0224   +0.0323   +0.8654   +0.0086   
++0.0093   +0.0192   +0.0210   +0.0230   +0.0330   +0.0093   +0.8851   
+
++0.1419   +0.1398   +0.1444   +0.1240   +0.1701   +0.1498   +0.1300   
++0.1198   +0.2065   +0.1351   +0.1150   +0.1570   +0.1350   +0.1318   
++0.1333   +0.1454   +0.1555   +0.1220   +0.1664   +0.1443   +0.1331   
++0.1353   +0.1463   +0.1442   +0.1264   +0.1681   +0.1458   +0.1338   
++0.1361   +0.1465   +0.1443   +0.1233   +0.1701   +0.1462   +0.1336   
++0.1383   +0.1453   +0.1443   +0.1234   +0.1686   +0.1501   +0.1300   
++0.1300   +0.1537   +0.1442   +0.1227   +0.1670   +0.1408   +0.1417   
+
+
+[0] CLV 5: [ {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00001,0.00001,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00213,0.00228,0.00001,0.00001,0.00001,0.00002),(0.00364,0.03742,0.03157,0.00595,0.00628,0.00646,0.00876)} {(1.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.99966,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.94473,0.00000,0.00001,0.00002,0.00004,0.00007,0.00000),(0.18225,0.00134,0.00618,0.00994,0.01365,0.01893,0.00345)} {(0.00000,0 [...]
+[0] CLV 6: [ {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00001,0.00000,0.00001,0.00000,0.00000,0.00000,0.00000),(0.00282,0.00117,0.00196,0.00086,0.00104,0.00123,0.00065)} {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00005,0.00000,0.00000,0.00000,0.00000,0.00003,0.00000),(0.00826,0.00000,0.00001,0.00001,0.00002,0.00386,0.00000),(0.01786,0.00040,0.00144,0.00231,0.00294,0.01331,0.00067)} {(0.00000,0 [...]
+[0] CLV 7: [ {(0.0000,0.0000,1.0000,0.0000,0.0000,0.0000,0.0000),(0.0000,0.0000,0.9997,0.0000,0.0000,0.0000,0.0000),(0.0000,0.0000,0.9562,0.0000,0.0000,0.0000,0.0000),(0.0073,0.0035,0.2469,0.0079,0.0083,0.0086,0.0091)} {(0.0000,0.0000,0.0000,0.0000,0.0000,1.0000,0.0000),(0.0000,0.0000,0.0000,0.0000,0.0000,0.9996,0.0000),(0.0001,0.0000,0.0000,0.0000,0.0000,0.9431,0.0000),(0.0222,0.0042,0.0086,0.0121,0.0131,0.1747,0.0038)} {(0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000),(0.0000,0.0000, [...]
+
+
+ TEST alpha(ncats) =   0.10( 4), mode = MEDIAN
+
+Rates:  0.00000  0.00108  0.09375  3.90517 
+       
+[0] P-matrix for branch length 0.100000
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9999   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.9999   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.9999   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.9999   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.9999   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.9999   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.9999   
+
++0.9884   +0.0004   +0.0015   +0.0019   +0.0034   +0.0037   +0.0008   
++0.0003   +0.9942   +0.0009   +0.0008   +0.0012   +0.0011   +0.0014   
++0.0014   +0.0010   +0.9909   +0.0014   +0.0020   +0.0018   +0.0017   
++0.0020   +0.0010   +0.0016   +0.9881   +0.0026   +0.0024   +0.0022   
++0.0027   +0.0011   +0.0017   +0.0019   +0.9876   +0.0025   +0.0024   
++0.0034   +0.0012   +0.0018   +0.0020   +0.0029   +0.9881   +0.0007   
++0.0008   +0.0017   +0.0018   +0.0021   +0.0030   +0.0007   +0.9899   
+
++0.6320   +0.0202   +0.0512   +0.0593   +0.1003   +0.1056   +0.0314   
++0.0173   +0.7901   +0.0332   +0.0299   +0.0429   +0.0384   +0.0483   
++0.0473   +0.0357   +0.6919   +0.0463   +0.0652   +0.0581   +0.0556   
++0.0647   +0.0381   +0.0547   +0.6189   +0.0822   +0.0727   +0.0686   
++0.0803   +0.0400   +0.0565   +0.0603   +0.6154   +0.0764   +0.0712   
++0.0975   +0.0413   +0.0581   +0.0616   +0.0881   +0.6236   +0.0298   
++0.0314   +0.0563   +0.0602   +0.0629   +0.0890   +0.0323   +0.6679   
+
+
+[0] P-matrix for branch length 0.200000
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9997   +0.0000   +0.0000   +0.0000   +0.0001   +0.0001   +0.0000   
++0.0000   +0.9999   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.9998   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.9997   +0.0001   +0.0001   +0.0001   
++0.0001   +0.0000   +0.0000   +0.0000   +0.9997   +0.0001   +0.0001   
++0.0001   +0.0000   +0.0000   +0.0000   +0.0001   +0.9997   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0001   +0.0000   +0.9998   
+
++0.9770   +0.0008   +0.0029   +0.0037   +0.0067   +0.0073   +0.0015   
++0.0007   +0.9885   +0.0018   +0.0016   +0.0024   +0.0022   +0.0028   
++0.0027   +0.0019   +0.9818   +0.0027   +0.0039   +0.0035   +0.0034   
++0.0041   +0.0021   +0.0032   +0.9763   +0.0052   +0.0047   +0.0045   
++0.0054   +0.0022   +0.0034   +0.0038   +0.9755   +0.0050   +0.0047   
++0.0067   +0.0024   +0.0035   +0.0040   +0.0057   +0.9763   +0.0014   
++0.0015   +0.0033   +0.0037   +0.0041   +0.0059   +0.0015   +0.9800   
+
++0.4253   +0.0430   +0.0854   +0.0916   +0.1463   +0.1493   +0.0590   
++0.0368   +0.6330   +0.0592   +0.0527   +0.0743   +0.0650   +0.0790   
++0.0789   +0.0638   +0.4952   +0.0756   +0.1053   +0.0929   +0.0883   
++0.1000   +0.0670   +0.0893   +0.4044   +0.1257   +0.1104   +0.1033   
++0.1171   +0.0693   +0.0913   +0.0922   +0.4102   +0.1146   +0.1054   
++0.1378   +0.0700   +0.0929   +0.0934   +0.1322   +0.4164   +0.0573   
++0.0590   +0.0922   +0.0957   +0.0947   +0.1317   +0.0621   +0.4647   
+
+
+[0] P-matrix for branch length 1.000000
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9987   +0.0000   +0.0002   +0.0002   +0.0004   +0.0004   +0.0001   
++0.0000   +0.9993   +0.0001   +0.0001   +0.0001   +0.0001   +0.0002   
++0.0002   +0.0001   +0.9989   +0.0002   +0.0002   +0.0002   +0.0002   
++0.0002   +0.0001   +0.0002   +0.9986   +0.0003   +0.0003   +0.0003   
++0.0003   +0.0001   +0.0002   +0.0002   +0.9986   +0.0003   +0.0003   
++0.0004   +0.0001   +0.0002   +0.0002   +0.0003   +0.9986   +0.0001   
++0.0001   +0.0002   +0.0002   +0.0002   +0.0003   +0.0001   +0.9988   
+
++0.8911   +0.0043   +0.0142   +0.0176   +0.0314   +0.0338   +0.0076   
++0.0037   +0.9439   +0.0087   +0.0079   +0.0116   +0.0106   +0.0136   
++0.0131   +0.0093   +0.9129   +0.0131   +0.0186   +0.0168   +0.0161   
++0.0192   +0.0101   +0.0155   +0.8876   +0.0247   +0.0220   +0.0209   
++0.0251   +0.0108   +0.0161   +0.0181   +0.8845   +0.0233   +0.0220   
++0.0312   +0.0114   +0.0168   +0.0186   +0.0269   +0.8881   +0.0070   
++0.0076   +0.0159   +0.0175   +0.0192   +0.0276   +0.0076   +0.9047   
+
++0.1417   +0.1400   +0.1444   +0.1240   +0.1701   +0.1497   +0.1301   
++0.1200   +0.2057   +0.1352   +0.1151   +0.1571   +0.1351   +0.1318   
++0.1333   +0.1456   +0.1552   +0.1220   +0.1665   +0.1443   +0.1331   
++0.1353   +0.1465   +0.1442   +0.1263   +0.1681   +0.1458   +0.1338   
++0.1360   +0.1466   +0.1443   +0.1233   +0.1700   +0.1461   +0.1336   
++0.1382   +0.1455   +0.1443   +0.1234   +0.1686   +0.1500   +0.1300   
++0.1301   +0.1538   +0.1442   +0.1227   +0.1670   +0.1409   +0.1415   
+
+
+[0] P-matrix for branch length 1.000000
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9987   +0.0000   +0.0002   +0.0002   +0.0004   +0.0004   +0.0001   
++0.0000   +0.9993   +0.0001   +0.0001   +0.0001   +0.0001   +0.0002   
++0.0002   +0.0001   +0.9989   +0.0002   +0.0002   +0.0002   +0.0002   
++0.0002   +0.0001   +0.0002   +0.9986   +0.0003   +0.0003   +0.0003   
++0.0003   +0.0001   +0.0002   +0.0002   +0.9986   +0.0003   +0.0003   
++0.0004   +0.0001   +0.0002   +0.0002   +0.0003   +0.9986   +0.0001   
++0.0001   +0.0002   +0.0002   +0.0002   +0.0003   +0.0001   +0.9988   
+
++0.8911   +0.0043   +0.0142   +0.0176   +0.0314   +0.0338   +0.0076   
++0.0037   +0.9439   +0.0087   +0.0079   +0.0116   +0.0106   +0.0136   
++0.0131   +0.0093   +0.9129   +0.0131   +0.0186   +0.0168   +0.0161   
++0.0192   +0.0101   +0.0155   +0.8876   +0.0247   +0.0220   +0.0209   
++0.0251   +0.0108   +0.0161   +0.0181   +0.8845   +0.0233   +0.0220   
++0.0312   +0.0114   +0.0168   +0.0186   +0.0269   +0.8881   +0.0070   
++0.0076   +0.0159   +0.0175   +0.0192   +0.0276   +0.0076   +0.9047   
+
++0.1417   +0.1400   +0.1444   +0.1240   +0.1701   +0.1497   +0.1301   
++0.1200   +0.2057   +0.1352   +0.1151   +0.1571   +0.1351   +0.1318   
++0.1333   +0.1456   +0.1552   +0.1220   +0.1665   +0.1443   +0.1331   
++0.1353   +0.1465   +0.1442   +0.1263   +0.1681   +0.1458   +0.1338   
++0.1360   +0.1466   +0.1443   +0.1233   +0.1700   +0.1461   +0.1336   
++0.1382   +0.1455   +0.1443   +0.1234   +0.1686   +0.1500   +0.1300   
++0.1301   +0.1538   +0.1442   +0.1227   +0.1670   +0.1409   +0.1415   
+
+
+[0] CLV 5: [ {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00002,0.00002,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00175,0.00188,0.00001,0.00001,0.00001,0.00001),(0.00367,0.03749,0.03159,0.00599,0.00633,0.00650,0.00882)} {(1.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.99946,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.95450,0.00000,0.00001,0.00002,0.00003,0.00005,0.00000),(0.18089,0.00136,0.00622,0.01000,0.01371,0.01900,0.00348)} {(0.00000,0 [...]
+[0] CLV 6: [ {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00001,0.00000,0.00001,0.00000,0.00000,0.00000,0.00000),(0.00283,0.00117,0.00197,0.00087,0.00105,0.00124,0.00066)} {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00009,0.00000,0.00000,0.00000,0.00000,0.00004,0.00000),(0.00688,0.00000,0.00000,0.00001,0.00001,0.00321,0.00000),(0.01773,0.00040,0.00145,0.00232,0.00294,0.01325,0.00068)} {(0.00000,0 [...]
+[0] CLV 7: [ {(0.0000,0.0000,1.0000,0.0000,0.0000,0.0000,0.0000),(0.0000,0.0000,0.9996,0.0000,0.0000,0.0000,0.0000),(0.0000,0.0000,0.9640,0.0000,0.0000,0.0000,0.0000),(0.0073,0.0035,0.2453,0.0080,0.0083,0.0086,0.0092)} {(0.0000,0.0000,0.0000,0.0000,0.0000,1.0000,0.0000),(0.0000,0.0000,0.0000,0.0000,0.0000,0.9994,0.0000),(0.0001,0.0000,0.0000,0.0000,0.0000,0.9531,0.0000),(0.0223,0.0042,0.0086,0.0122,0.0131,0.1734,0.0039)} {(0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000),(0.0000,0.0000, [...]
+
+
+ TEST alpha(ncats) =   1.25( 4), mode = MEAN
+
+Rates:  0.19913  0.57560  1.09104  2.13423 
+       
+[1] P-matrix for branch length 0.100000
++0.9756   +0.0009   +0.0031   +0.0039   +0.0071   +0.0077   +0.0016   
++0.0007   +0.9878   +0.0019   +0.0017   +0.0025   +0.0023   +0.0030   
++0.0029   +0.0020   +0.9807   +0.0029   +0.0041   +0.0037   +0.0036   
++0.0043   +0.0022   +0.0034   +0.9748   +0.0056   +0.0050   +0.0047   
++0.0057   +0.0024   +0.0036   +0.0041   +0.9740   +0.0053   +0.0050   
++0.0071   +0.0025   +0.0037   +0.0042   +0.0061   +0.9748   +0.0015   
++0.0016   +0.0035   +0.0039   +0.0043   +0.0063   +0.0016   +0.9788   
+
++0.9314   +0.0026   +0.0089   +0.0111   +0.0199   +0.0215   +0.0047   
++0.0022   +0.9651   +0.0054   +0.0049   +0.0072   +0.0066   +0.0086   
++0.0082   +0.0058   +0.9454   +0.0082   +0.0117   +0.0105   +0.0101   
++0.0121   +0.0063   +0.0097   +0.9292   +0.0156   +0.0139   +0.0132   
++0.0160   +0.0067   +0.0101   +0.0114   +0.9270   +0.0148   +0.0140   
++0.0199   +0.0072   +0.0105   +0.0118   +0.0170   +0.9294   +0.0043   
++0.0047   +0.0100   +0.0110   +0.0121   +0.0175   +0.0046   +0.9401   
+
++0.8747   +0.0050   +0.0164   +0.0202   +0.0360   +0.0387   +0.0089   
++0.0043   +0.9351   +0.0101   +0.0092   +0.0134   +0.0123   +0.0157   
++0.0151   +0.0108   +0.8996   +0.0151   +0.0215   +0.0193   +0.0186   
++0.0221   +0.0117   +0.0179   +0.8707   +0.0284   +0.0253   +0.0240   
++0.0288   +0.0125   +0.0186   +0.0208   +0.8672   +0.0268   +0.0253   
++0.0357   +0.0132   +0.0193   +0.0214   +0.0309   +0.8712   +0.0082   
++0.0089   +0.0184   +0.0201   +0.0220   +0.0316   +0.0089   +0.8901   
+
++0.7727   +0.0104   +0.0305   +0.0367   +0.0641   +0.0683   +0.0173   
++0.0089   +0.8778   +0.0191   +0.0173   +0.0251   +0.0228   +0.0291   
++0.0281   +0.0206   +0.8146   +0.0279   +0.0395   +0.0354   +0.0339   
++0.0400   +0.0221   +0.0330   +0.7650   +0.0512   +0.0455   +0.0431   
++0.0513   +0.0234   +0.0342   +0.0376   +0.7603   +0.0481   +0.0452   
++0.0631   +0.0245   +0.0354   +0.0385   +0.0555   +0.7668   +0.0162   
++0.0173   +0.0339   +0.0368   +0.0396   +0.0565   +0.0176   +0.7984   
+
+
+[1] P-matrix for branch length 0.200000
++0.9519   +0.0018   +0.0062   +0.0078   +0.0140   +0.0152   +0.0032   
++0.0015   +0.9757   +0.0037   +0.0034   +0.0050   +0.0046   +0.0060   
++0.0057   +0.0040   +0.9619   +0.0057   +0.0082   +0.0074   +0.0071   
++0.0085   +0.0044   +0.0068   +0.9504   +0.0109   +0.0098   +0.0093   
++0.0112   +0.0047   +0.0071   +0.0080   +0.9488   +0.0104   +0.0098   
++0.0140   +0.0050   +0.0074   +0.0083   +0.0120   +0.9505   +0.0029   
++0.0032   +0.0070   +0.0077   +0.0085   +0.0123   +0.0032   +0.9581   
+
++0.8684   +0.0053   +0.0172   +0.0213   +0.0378   +0.0406   +0.0093   
++0.0046   +0.9317   +0.0106   +0.0097   +0.0141   +0.0129   +0.0166   
++0.0159   +0.0114   +0.8944   +0.0159   +0.0226   +0.0203   +0.0195   
++0.0232   +0.0123   +0.0188   +0.8641   +0.0298   +0.0266   +0.0252   
++0.0302   +0.0131   +0.0196   +0.0219   +0.8605   +0.0281   +0.0266   
++0.0375   +0.0139   +0.0203   +0.0225   +0.0325   +0.8647   +0.0086   
++0.0093   +0.0193   +0.0211   +0.0231   +0.0332   +0.0094   +0.8845   
+
++0.7684   +0.0106   +0.0311   +0.0374   +0.0652   +0.0695   +0.0177   
++0.0091   +0.8753   +0.0195   +0.0177   +0.0256   +0.0232   +0.0296   
++0.0287   +0.0210   +0.8110   +0.0284   +0.0402   +0.0361   +0.0346   
++0.0408   +0.0225   +0.0336   +0.7605   +0.0522   +0.0464   +0.0439   
++0.0522   +0.0239   +0.0349   +0.0383   +0.7558   +0.0490   +0.0460   
++0.0642   +0.0250   +0.0361   +0.0393   +0.0565   +0.7624   +0.0166   
++0.0177   +0.0346   +0.0375   +0.0403   +0.0575   +0.0180   +0.7945   
+
++0.6074   +0.0223   +0.0551   +0.0632   +0.1063   +0.1116   +0.0342   
++0.0191   +0.7735   +0.0359   +0.0323   +0.0462   +0.0413   +0.0517   
++0.0508   +0.0386   +0.6696   +0.0496   +0.0698   +0.0621   +0.0594   
++0.0689   +0.0411   +0.0587   +0.5934   +0.0875   +0.0774   +0.0730   
++0.0851   +0.0431   +0.0605   +0.0642   +0.5905   +0.0812   +0.0755   
++0.1030   +0.0444   +0.0621   +0.0655   +0.0936   +0.5988   +0.0326   
++0.0342   +0.0604   +0.0643   +0.0669   +0.0944   +0.0353   +0.6445   
+
+
+[1] P-matrix for branch length 1.000000
++0.7858   +0.0096   +0.0286   +0.0346   +0.0606   +0.0647   +0.0162   
++0.0082   +0.8854   +0.0179   +0.0162   +0.0235   +0.0214   +0.0273   
++0.0264   +0.0193   +0.8257   +0.0262   +0.0371   +0.0333   +0.0320   
++0.0377   +0.0207   +0.0310   +0.7786   +0.0483   +0.0430   +0.0407   
++0.0484   +0.0220   +0.0322   +0.0354   +0.7739   +0.0454   +0.0427   
++0.0597   +0.0231   +0.0333   +0.0364   +0.0524   +0.7801   +0.0151   
++0.0162   +0.0319   +0.0346   +0.0373   +0.0533   +0.0164   +0.8103   
+
++0.5194   +0.0310   +0.0692   +0.0771   +0.1267   +0.1314   +0.0451   
++0.0266   +0.7100   +0.0463   +0.0415   +0.0589   +0.0521   +0.0646   
++0.0639   +0.0499   +0.5877   +0.0619   +0.0866   +0.0768   +0.0732   
++0.0841   +0.0528   +0.0731   +0.5019   +0.1063   +0.0937   +0.0880   
++0.1014   +0.0550   +0.0751   +0.0780   +0.5022   +0.0978   +0.0905   
++0.1213   +0.0562   +0.0768   +0.0793   +0.1129   +0.5102   +0.0434   
++0.0451   +0.0753   +0.0793   +0.0807   +0.1132   +0.0471   +0.5593   
+
++0.3269   +0.0602   +0.1040   +0.1062   +0.1633   +0.1627   +0.0767   
++0.0516   +0.5367   +0.0757   +0.0667   +0.0932   +0.0807   +0.0953   
++0.0960   +0.0815   +0.3911   +0.0908   +0.1259   +0.1104   +0.1043   
++0.1159   +0.0849   +0.1073   +0.3029   +0.1447   +0.1265   +0.1177   
++0.1307   +0.0870   +0.1091   +0.1061   +0.3176   +0.1304   +0.1190   
++0.1501   +0.0869   +0.1104   +0.1071   +0.1505   +0.3197   +0.0753   
++0.0767   +0.1111   +0.1130   +0.1079   +0.1488   +0.0816   +0.3608   
+
++0.1868   +0.1049   +0.1344   +0.1232   +0.1753   +0.1630   +0.1126   
++0.0899   +0.3348   +0.1115   +0.0963   +0.1324   +0.1133   +0.1218   
++0.1240   +0.1201   +0.2205   +0.1146   +0.1571   +0.1365   +0.1271   
++0.1344   +0.1226   +0.1354   +0.1637   +0.1664   +0.1446   +0.1329   
++0.1402   +0.1236   +0.1362   +0.1221   +0.1989   +0.1464   +0.1326   
++0.1504   +0.1220   +0.1365   +0.1223   +0.1690   +0.1877   +0.1121   
++0.1126   +0.1421   +0.1377   +0.1218   +0.1658   +0.1214   +0.1986   
+
+
+[1] P-matrix for branch length 1.000000
++0.7858   +0.0096   +0.0286   +0.0346   +0.0606   +0.0647   +0.0162   
++0.0082   +0.8854   +0.0179   +0.0162   +0.0235   +0.0214   +0.0273   
++0.0264   +0.0193   +0.8257   +0.0262   +0.0371   +0.0333   +0.0320   
++0.0377   +0.0207   +0.0310   +0.7786   +0.0483   +0.0430   +0.0407   
++0.0484   +0.0220   +0.0322   +0.0354   +0.7739   +0.0454   +0.0427   
++0.0597   +0.0231   +0.0333   +0.0364   +0.0524   +0.7801   +0.0151   
++0.0162   +0.0319   +0.0346   +0.0373   +0.0533   +0.0164   +0.8103   
+
++0.5194   +0.0310   +0.0692   +0.0771   +0.1267   +0.1314   +0.0451   
++0.0266   +0.7100   +0.0463   +0.0415   +0.0589   +0.0521   +0.0646   
++0.0639   +0.0499   +0.5877   +0.0619   +0.0866   +0.0768   +0.0732   
++0.0841   +0.0528   +0.0731   +0.5019   +0.1063   +0.0937   +0.0880   
++0.1014   +0.0550   +0.0751   +0.0780   +0.5022   +0.0978   +0.0905   
++0.1213   +0.0562   +0.0768   +0.0793   +0.1129   +0.5102   +0.0434   
++0.0451   +0.0753   +0.0793   +0.0807   +0.1132   +0.0471   +0.5593   
+
++0.3269   +0.0602   +0.1040   +0.1062   +0.1633   +0.1627   +0.0767   
++0.0516   +0.5367   +0.0757   +0.0667   +0.0932   +0.0807   +0.0953   
++0.0960   +0.0815   +0.3911   +0.0908   +0.1259   +0.1104   +0.1043   
++0.1159   +0.0849   +0.1073   +0.3029   +0.1447   +0.1265   +0.1177   
++0.1307   +0.0870   +0.1091   +0.1061   +0.3176   +0.1304   +0.1190   
++0.1501   +0.0869   +0.1104   +0.1071   +0.1505   +0.3197   +0.0753   
++0.0767   +0.1111   +0.1130   +0.1079   +0.1488   +0.0816   +0.3608   
+
++0.1868   +0.1049   +0.1344   +0.1232   +0.1753   +0.1630   +0.1126   
++0.0899   +0.3348   +0.1115   +0.0963   +0.1324   +0.1133   +0.1218   
++0.1240   +0.1201   +0.2205   +0.1146   +0.1571   +0.1365   +0.1271   
++0.1344   +0.1226   +0.1354   +0.1637   +0.1664   +0.1446   +0.1329   
++0.1402   +0.1236   +0.1362   +0.1221   +0.1989   +0.1464   +0.1326   
++0.1504   +0.1220   +0.1365   +0.1223   +0.1690   +0.1877   +0.1121   
++0.1126   +0.1421   +0.1377   +0.1218   +0.1658   +0.1214   +0.1986   
+
+
+[1] CLV 5: [ {(0.00001,0.00365,0.00388,0.00003,0.00003,0.00004,0.00005),(0.00009,0.00987,0.01020,0.00023,0.00026,0.00028,0.00041),(0.00033,0.01705,0.01702,0.00076,0.00083,0.00090,0.00130),(0.00123,0.02775,0.02587,0.00241,0.00261,0.00276,0.00388)} {(0.90607,0.00000,0.00003,0.00007,0.00013,0.00020,0.00001),(0.75414,0.00002,0.00025,0.00054,0.00091,0.00141,0.00009),(0.59042,0.00008,0.00082,0.00166,0.00272,0.00412,0.00031),(0.36890,0.00037,0.00258,0.00475,0.00724,0.01061,0.00117)} {(0.00589,0 [...]
+[1] CLV 6: [ {(0.00003,0.00001,0.00002,0.00000,0.00000,0.00000,0.00000),(0.00019,0.00004,0.00015,0.00001,0.00001,0.00002,0.00001),(0.00057,0.00015,0.00045,0.00005,0.00007,0.00009,0.00003),(0.00154,0.00048,0.00112,0.00026,0.00034,0.00042,0.00018)} {(0.01340,0.00000,0.00002,0.00004,0.00006,0.00633,0.00000),(0.02853,0.00002,0.00013,0.00026,0.00036,0.01410,0.00003),(0.03594,0.00006,0.00036,0.00068,0.00096,0.01893,0.00010),(0.03197,0.00017,0.00083,0.00150,0.00205,0.01922,0.00029)} {(0.00575,0 [...]
+[1] CLV 7: [ {(0.0000,0.0000,0.9252,0.0000,0.0001,0.0001,0.0001),(0.0003,0.0001,0.7999,0.0004,0.0004,0.0004,0.0004),(0.0010,0.0004,0.6577,0.0011,0.0012,0.0013,0.0014),(0.0030,0.0013,0.4484,0.0034,0.0037,0.0039,0.0041)} {(0.0002,0.0000,0.0001,0.0001,0.0001,0.9034,0.0000),(0.0016,0.0002,0.0004,0.0007,0.0008,0.7478,0.0001),(0.0048,0.0005,0.0013,0.0022,0.0024,0.5812,0.0003),(0.0124,0.0017,0.0039,0.0060,0.0066,0.3585,0.0012)} {(0.0074,0.0000,0.0000,0.0081,0.0001,0.0001,0.0000),(0.0185,0.0000, [...]
+
+
+ TEST alpha(ncats) =   1.25( 4), mode = MEDIAN
+
+Rates:  0.18400  0.54086  1.03161  2.24353 
+       
+[1] P-matrix for branch length 0.100000
++0.9774   +0.0008   +0.0029   +0.0037   +0.0066   +0.0072   +0.0015   
++0.0007   +0.9887   +0.0017   +0.0016   +0.0023   +0.0022   +0.0028   
++0.0027   +0.0019   +0.9822   +0.0027   +0.0038   +0.0035   +0.0033   
++0.0040   +0.0020   +0.0032   +0.9767   +0.0051   +0.0046   +0.0044   
++0.0053   +0.0022   +0.0033   +0.0038   +0.9759   +0.0049   +0.0046   
++0.0066   +0.0023   +0.0035   +0.0039   +0.0056   +0.9767   +0.0014   
++0.0015   +0.0033   +0.0036   +0.0040   +0.0058   +0.0015   +0.9804   
+
++0.9353   +0.0024   +0.0083   +0.0105   +0.0188   +0.0203   +0.0044   
++0.0021   +0.9672   +0.0051   +0.0046   +0.0068   +0.0063   +0.0081   
++0.0077   +0.0055   +0.9486   +0.0077   +0.0110   +0.0099   +0.0095   
++0.0114   +0.0059   +0.0091   +0.9333   +0.0147   +0.0131   +0.0125   
++0.0150   +0.0063   +0.0095   +0.0108   +0.9312   +0.0139   +0.0132   
++0.0187   +0.0067   +0.0099   +0.0111   +0.0161   +0.9334   +0.0040   
++0.0044   +0.0094   +0.0103   +0.0114   +0.0165   +0.0043   +0.9436   
+
++0.8810   +0.0047   +0.0155   +0.0192   +0.0343   +0.0368   +0.0084   
++0.0041   +0.9385   +0.0095   +0.0087   +0.0127   +0.0116   +0.0149   
++0.0144   +0.0103   +0.9047   +0.0143   +0.0204   +0.0183   +0.0176   
++0.0210   +0.0111   +0.0170   +0.8772   +0.0270   +0.0240   +0.0228   
++0.0274   +0.0118   +0.0177   +0.0198   +0.8738   +0.0255   +0.0241   
++0.0340   +0.0125   +0.0183   +0.0203   +0.0294   +0.8777   +0.0077   
++0.0084   +0.0174   +0.0191   +0.0209   +0.0301   +0.0084   +0.8957   
+
++0.7629   +0.0110   +0.0319   +0.0383   +0.0667   +0.0711   +0.0182   
++0.0094   +0.8720   +0.0200   +0.0181   +0.0263   +0.0238   +0.0304   
++0.0294   +0.0215   +0.8063   +0.0291   +0.0412   +0.0369   +0.0354   
++0.0418   +0.0231   +0.0344   +0.7549   +0.0534   +0.0475   +0.0450   
++0.0534   +0.0245   +0.0357   +0.0392   +0.7501   +0.0501   +0.0470   
++0.0656   +0.0257   +0.0369   +0.0402   +0.0578   +0.7568   +0.0171   
++0.0182   +0.0354   +0.0384   +0.0412   +0.0588   +0.0185   +0.7895   
+
+
+[1] P-matrix for branch length 0.200000
++0.9554   +0.0016   +0.0057   +0.0072   +0.0130   +0.0140   +0.0030   
++0.0014   +0.9775   +0.0035   +0.0032   +0.0046   +0.0043   +0.0055   
++0.0053   +0.0037   +0.9647   +0.0053   +0.0076   +0.0068   +0.0066   
++0.0079   +0.0040   +0.0063   +0.9540   +0.0101   +0.0091   +0.0086   
++0.0104   +0.0043   +0.0066   +0.0074   +0.9526   +0.0096   +0.0091   
++0.0130   +0.0046   +0.0068   +0.0077   +0.0111   +0.9541   +0.0027   
++0.0030   +0.0065   +0.0071   +0.0079   +0.0114   +0.0029   +0.9612   
+
++0.8757   +0.0050   +0.0163   +0.0201   +0.0357   +0.0384   +0.0088   
++0.0043   +0.9356   +0.0100   +0.0091   +0.0133   +0.0122   +0.0156   
++0.0150   +0.0107   +0.9004   +0.0150   +0.0213   +0.0192   +0.0184   
++0.0219   +0.0116   +0.0177   +0.8717   +0.0282   +0.0251   +0.0238   
++0.0286   +0.0124   +0.0185   +0.0206   +0.8682   +0.0266   +0.0251   
++0.0355   +0.0131   +0.0192   +0.0212   +0.0307   +0.8722   +0.0081   
++0.0088   +0.0182   +0.0199   +0.0219   +0.0314   +0.0088   +0.8910   
+
++0.7791   +0.0100   +0.0296   +0.0357   +0.0623   +0.0665   +0.0168   
++0.0086   +0.8815   +0.0185   +0.0168   +0.0243   +0.0221   +0.0282   
++0.0273   +0.0199   +0.8201   +0.0271   +0.0383   +0.0344   +0.0330   
++0.0389   +0.0214   +0.0320   +0.7717   +0.0498   +0.0443   +0.0420   
++0.0499   +0.0227   +0.0332   +0.0365   +0.7670   +0.0467   +0.0439   
++0.0614   +0.0238   +0.0344   +0.0375   +0.0539   +0.7734   +0.0157   
++0.0168   +0.0329   +0.0357   +0.0385   +0.0549   +0.0170   +0.8043   
+
++0.5932   +0.0236   +0.0573   +0.0654   +0.1097   +0.1149   +0.0358   
++0.0202   +0.7637   +0.0375   +0.0337   +0.0482   +0.0430   +0.0538   
++0.0529   +0.0404   +0.6567   +0.0516   +0.0725   +0.0644   +0.0616   
++0.0714   +0.0429   +0.0610   +0.5787   +0.0906   +0.0801   +0.0754   
++0.0878   +0.0450   +0.0628   +0.0664   +0.5761   +0.0839   +0.0780   
++0.1061   +0.0463   +0.0644   +0.0677   +0.0968   +0.5845   +0.0342   
++0.0358   +0.0627   +0.0667   +0.0691   +0.0975   +0.0371   +0.6310   
+
+
+[1] P-matrix for branch length 1.000000
++0.7999   +0.0088   +0.0267   +0.0323   +0.0567   +0.0606   +0.0150   
++0.0076   +0.8935   +0.0166   +0.0151   +0.0219   +0.0199   +0.0255   
++0.0246   +0.0179   +0.8376   +0.0244   +0.0346   +0.0311   +0.0298   
++0.0353   +0.0192   +0.0289   +0.7932   +0.0452   +0.0402   +0.0381   
++0.0454   +0.0204   +0.0300   +0.0331   +0.7887   +0.0425   +0.0399   
++0.0560   +0.0215   +0.0311   +0.0340   +0.0490   +0.7946   +0.0139   
++0.0150   +0.0297   +0.0323   +0.0349   +0.0499   +0.0151   +0.8231   
+
++0.5382   +0.0290   +0.0661   +0.0741   +0.1225   +0.1274   +0.0426   
++0.0248   +0.7242   +0.0440   +0.0394   +0.0561   +0.0497   +0.0618   
++0.0610   +0.0474   +0.6056   +0.0592   +0.0830   +0.0736   +0.0702   
++0.0809   +0.0502   +0.0700   +0.5215   +0.1023   +0.0902   +0.0849   
++0.0980   +0.0524   +0.0719   +0.0750   +0.5210   +0.0943   +0.0874   
++0.1176   +0.0536   +0.0736   +0.0764   +0.1088   +0.5291   +0.0410   
++0.0426   +0.0721   +0.0761   +0.0778   +0.1093   +0.0444   +0.5778   
+
++0.3425   +0.0570   +0.1009   +0.1040   +0.1609   +0.1610   +0.0736   
++0.0489   +0.5535   +0.0728   +0.0643   +0.0899   +0.0780   +0.0926   
++0.0931   +0.0784   +0.4083   +0.0883   +0.1225   +0.1075   +0.1018   
++0.1134   +0.0818   +0.1044   +0.3189   +0.1418   +0.1241   +0.1156   
++0.1288   +0.0839   +0.1062   +0.1040   +0.3320   +0.1281   +0.1170   
++0.1486   +0.0840   +0.1075   +0.1050   +0.1478   +0.3349   +0.0721   
++0.0736   +0.1080   +0.1102   +0.1059   +0.1463   +0.0782   +0.3778   
+
++0.1804   +0.1083   +0.1359   +0.1236   +0.1751   +0.1619   +0.1147   
++0.0928   +0.3212   +0.1140   +0.0983   +0.1350   +0.1155   +0.1231   
++0.1254   +0.1228   +0.2118   +0.1157   +0.1585   +0.1377   +0.1281   
++0.1349   +0.1251   +0.1367   +0.1579   +0.1670   +0.1451   +0.1333   
++0.1401   +0.1260   +0.1374   +0.1225   +0.1943   +0.1467   +0.1329   
++0.1495   +0.1244   +0.1377   +0.1227   +0.1693   +0.1821   +0.1143   
++0.1147   +0.1437   +0.1388   +0.1222   +0.1662   +0.1238   +0.1907   
+
+
+[1] P-matrix for branch length 1.000000
++0.7999   +0.0088   +0.0267   +0.0323   +0.0567   +0.0606   +0.0150   
++0.0076   +0.8935   +0.0166   +0.0151   +0.0219   +0.0199   +0.0255   
++0.0246   +0.0179   +0.8376   +0.0244   +0.0346   +0.0311   +0.0298   
++0.0353   +0.0192   +0.0289   +0.7932   +0.0452   +0.0402   +0.0381   
++0.0454   +0.0204   +0.0300   +0.0331   +0.7887   +0.0425   +0.0399   
++0.0560   +0.0215   +0.0311   +0.0340   +0.0490   +0.7946   +0.0139   
++0.0150   +0.0297   +0.0323   +0.0349   +0.0499   +0.0151   +0.8231   
+
++0.5382   +0.0290   +0.0661   +0.0741   +0.1225   +0.1274   +0.0426   
++0.0248   +0.7242   +0.0440   +0.0394   +0.0561   +0.0497   +0.0618   
++0.0610   +0.0474   +0.6056   +0.0592   +0.0830   +0.0736   +0.0702   
++0.0809   +0.0502   +0.0700   +0.5215   +0.1023   +0.0902   +0.0849   
++0.0980   +0.0524   +0.0719   +0.0750   +0.5210   +0.0943   +0.0874   
++0.1176   +0.0536   +0.0736   +0.0764   +0.1088   +0.5291   +0.0410   
++0.0426   +0.0721   +0.0761   +0.0778   +0.1093   +0.0444   +0.5778   
+
++0.3425   +0.0570   +0.1009   +0.1040   +0.1609   +0.1610   +0.0736   
++0.0489   +0.5535   +0.0728   +0.0643   +0.0899   +0.0780   +0.0926   
++0.0931   +0.0784   +0.4083   +0.0883   +0.1225   +0.1075   +0.1018   
++0.1134   +0.0818   +0.1044   +0.3189   +0.1418   +0.1241   +0.1156   
++0.1288   +0.0839   +0.1062   +0.1040   +0.3320   +0.1281   +0.1170   
++0.1486   +0.0840   +0.1075   +0.1050   +0.1478   +0.3349   +0.0721   
++0.0736   +0.1080   +0.1102   +0.1059   +0.1463   +0.0782   +0.3778   
+
++0.1804   +0.1083   +0.1359   +0.1236   +0.1751   +0.1619   +0.1147   
++0.0928   +0.3212   +0.1140   +0.0983   +0.1350   +0.1155   +0.1231   
++0.1254   +0.1228   +0.2118   +0.1157   +0.1585   +0.1377   +0.1281   
++0.1349   +0.1251   +0.1367   +0.1579   +0.1670   +0.1451   +0.1333   
++0.1401   +0.1260   +0.1374   +0.1225   +0.1943   +0.1467   +0.1329   
++0.1495   +0.1244   +0.1377   +0.1227   +0.1693   +0.1821   +0.1143   
++0.1147   +0.1437   +0.1388   +0.1222   +0.1662   +0.1238   +0.1907   
+
+
+[1] CLV 5: [ {(0.00001,0.00339,0.00360,0.00003,0.00003,0.00003,0.00005),(0.00008,0.00933,0.00967,0.00021,0.00023,0.00025,0.00036),(0.00030,0.01630,0.01633,0.00068,0.00075,0.00082,0.00117),(0.00135,0.02862,0.02650,0.00261,0.00282,0.00298,0.00419)} {(0.91285,0.00000,0.00003,0.00006,0.00011,0.00017,0.00001),(0.76689,0.00002,0.00023,0.00048,0.00082,0.00126,0.00008),(0.60707,0.00007,0.00075,0.00151,0.00249,0.00377,0.00028),(0.35189,0.00041,0.00279,0.00510,0.00771,0.01126,0.00128)} {(0.00547,0 [...]
+[1] CLV 6: [ {(0.00002,0.00000,0.00002,0.00000,0.00000,0.00000,0.00000),(0.00017,0.00004,0.00014,0.00001,0.00001,0.00001,0.00000),(0.00052,0.00013,0.00041,0.00004,0.00006,0.00008,0.00003),(0.00164,0.00052,0.00119,0.00029,0.00038,0.00047,0.00020)} {(0.01253,0.00000,0.00002,0.00003,0.00005,0.00591,0.00000),(0.02757,0.00002,0.00012,0.00023,0.00033,0.01357,0.00003),(0.03560,0.00006,0.00033,0.00063,0.00089,0.01861,0.00009),(0.03104,0.00019,0.00087,0.00157,0.00214,0.01893,0.00031)} {(0.00535,0 [...]
+[1] CLV 7: [ {(0.0000,0.0000,0.9306,0.0000,0.0000,0.0000,0.0001),(0.0003,0.0001,0.8106,0.0003,0.0003,0.0004,0.0004),(0.0009,0.0003,0.6725,0.0010,0.0011,0.0012,0.0013),(0.0033,0.0014,0.4313,0.0037,0.0039,0.0042,0.0045)} {(0.0002,0.0000,0.0000,0.0001,0.0001,0.9103,0.0000),(0.0015,0.0001,0.0004,0.0006,0.0007,0.7608,0.0001),(0.0044,0.0005,0.0012,0.0020,0.0022,0.5981,0.0003),(0.0132,0.0018,0.0042,0.0064,0.0070,0.3416,0.0014)} {(0.0069,0.0000,0.0000,0.0075,0.0001,0.0001,0.0000),(0.0176,0.0000, [...]
+
+
+ TEST alpha(ncats) = 100.00( 4), mode = MEAN
+
+Rates:  0.88707  0.96613  1.02980  1.11700 
+       
+[2] P-matrix for branch length 0.100000
++0.8966   +0.0040   +0.0135   +0.0167   +0.0299   +0.0321   +0.0072   
++0.0035   +0.9468   +0.0082   +0.0075   +0.0110   +0.0101   +0.0130   
++0.0124   +0.0089   +0.9174   +0.0124   +0.0177   +0.0159   +0.0153   
++0.0182   +0.0096   +0.0147   +0.8933   +0.0234   +0.0209   +0.0199   
++0.0239   +0.0102   +0.0153   +0.0172   +0.8903   +0.0222   +0.0210   
++0.0297   +0.0108   +0.0159   +0.0177   +0.0256   +0.8937   +0.0066   
++0.0072   +0.0151   +0.0166   +0.0182   +0.0262   +0.0072   +0.9095   
+
++0.8881   +0.0044   +0.0146   +0.0181   +0.0323   +0.0347   +0.0078   
++0.0038   +0.9423   +0.0089   +0.0082   +0.0119   +0.0109   +0.0140   
++0.0135   +0.0096   +0.9104   +0.0135   +0.0192   +0.0173   +0.0166   
++0.0197   +0.0104   +0.0159   +0.8844   +0.0254   +0.0226   +0.0215   
++0.0258   +0.0111   +0.0166   +0.0186   +0.8812   +0.0240   +0.0227   
++0.0320   +0.0118   +0.0173   +0.0192   +0.0277   +0.8849   +0.0072   
++0.0078   +0.0164   +0.0180   +0.0197   +0.0283   +0.0078   +0.9020   
+
++0.8812   +0.0047   +0.0155   +0.0192   +0.0342   +0.0368   +0.0084   
++0.0040   +0.9386   +0.0095   +0.0087   +0.0126   +0.0116   +0.0149   
++0.0143   +0.0102   +0.9049   +0.0143   +0.0203   +0.0183   +0.0176   
++0.0209   +0.0110   +0.0169   +0.8774   +0.0269   +0.0240   +0.0228   
++0.0274   +0.0118   +0.0176   +0.0197   +0.8740   +0.0254   +0.0240   
++0.0339   +0.0125   +0.0183   +0.0203   +0.0293   +0.8779   +0.0077   
++0.0084   +0.0174   +0.0191   +0.0209   +0.0300   +0.0084   +0.8959   
+
++0.8720   +0.0051   +0.0168   +0.0207   +0.0368   +0.0395   +0.0091   
++0.0044   +0.9336   +0.0103   +0.0094   +0.0137   +0.0125   +0.0161   
++0.0155   +0.0111   +0.8973   +0.0155   +0.0219   +0.0198   +0.0190   
++0.0226   +0.0119   +0.0183   +0.8678   +0.0290   +0.0259   +0.0245   
++0.0294   +0.0128   +0.0190   +0.0213   +0.8643   +0.0274   +0.0259   
++0.0365   +0.0135   +0.0198   +0.0219   +0.0316   +0.8684   +0.0084   
++0.0091   +0.0188   +0.0206   +0.0225   +0.0323   +0.0091   +0.8877   
+
+
+[2] P-matrix for branch length 0.200000
++0.8061   +0.0085   +0.0258   +0.0313   +0.0550   +0.0588   +0.0144   
++0.0073   +0.8971   +0.0160   +0.0146   +0.0211   +0.0193   +0.0246   
++0.0238   +0.0173   +0.8428   +0.0237   +0.0335   +0.0301   +0.0289   
++0.0342   +0.0186   +0.0280   +0.7997   +0.0438   +0.0390   +0.0369   
++0.0440   +0.0197   +0.0290   +0.0321   +0.7952   +0.0412   +0.0387   
++0.0543   +0.0208   +0.0301   +0.0330   +0.0475   +0.8009   +0.0134   
++0.0144   +0.0287   +0.0313   +0.0339   +0.0484   +0.0146   +0.8287   
+
++0.7912   +0.0093   +0.0279   +0.0337   +0.0591   +0.0631   +0.0157   
++0.0080   +0.8885   +0.0174   +0.0158   +0.0229   +0.0208   +0.0266   
++0.0257   +0.0187   +0.8303   +0.0255   +0.0362   +0.0324   +0.0311   
++0.0368   +0.0201   +0.0302   +0.7842   +0.0471   +0.0419   +0.0397   
++0.0473   +0.0214   +0.0313   +0.0345   +0.7796   +0.0442   +0.0416   
++0.0582   +0.0224   +0.0324   +0.0355   +0.0511   +0.7857   +0.0147   
++0.0157   +0.0310   +0.0337   +0.0364   +0.0520   +0.0159   +0.8152   
+
++0.7795   +0.0100   +0.0295   +0.0356   +0.0622   +0.0664   +0.0167   
++0.0085   +0.8817   +0.0185   +0.0168   +0.0243   +0.0221   +0.0282   
++0.0273   +0.0199   +0.8204   +0.0270   +0.0383   +0.0343   +0.0329   
++0.0388   +0.0213   +0.0319   +0.7720   +0.0497   +0.0442   +0.0419   
++0.0498   +0.0227   +0.0332   +0.0365   +0.7674   +0.0467   +0.0439   
++0.0613   +0.0238   +0.0343   +0.0374   +0.0538   +0.7737   +0.0156   
++0.0167   +0.0328   +0.0356   +0.0384   +0.0548   +0.0170   +0.8046   
+
++0.7637   +0.0109   +0.0318   +0.0381   +0.0665   +0.0708   +0.0182   
++0.0093   +0.8725   +0.0199   +0.0181   +0.0261   +0.0237   +0.0302   
++0.0293   +0.0215   +0.8070   +0.0290   +0.0411   +0.0368   +0.0353   
++0.0416   +0.0230   +0.0343   +0.7557   +0.0532   +0.0473   +0.0448   
++0.0532   +0.0244   +0.0356   +0.0390   +0.7510   +0.0499   +0.0469   
++0.0654   +0.0256   +0.0368   +0.0400   +0.0576   +0.7576   +0.0170   
++0.0182   +0.0353   +0.0382   +0.0411   +0.0586   +0.0184   +0.7903   
+
+
+[2] P-matrix for branch length 1.000000
++0.3866   +0.0490   +0.0925   +0.0975   +0.1535   +0.1553   +0.0655   
++0.0420   +0.5975   +0.0653   +0.0578   +0.0813   +0.0708   +0.0852   
++0.0854   +0.0703   +0.4554   +0.0814   +0.1133   +0.0997   +0.0946   
++0.1063   +0.0736   +0.0963   +0.3644   +0.1334   +0.1169   +0.1092   
++0.1228   +0.0758   +0.0982   +0.0978   +0.3733   +0.1211   +0.1110   
++0.1434   +0.0763   +0.0997   +0.0989   +0.1397   +0.3782   +0.0639   
++0.0655   +0.0994   +0.1024   +0.1001   +0.1387   +0.0692   +0.4246   
+
++0.3614   +0.0534   +0.0973   +0.1012   +0.1579   +0.1588   +0.0700   
++0.0458   +0.5729   +0.0695   +0.0614   +0.0861   +0.0749   +0.0894   
++0.0898   +0.0748   +0.4287   +0.0854   +0.1185   +0.1042   +0.0987   
++0.1104   +0.0782   +0.1009   +0.3383   +0.1382   +0.1211   +0.1129   
++0.1263   +0.0804   +0.1027   +0.1014   +0.3496   +0.1251   +0.1145   
++0.1466   +0.0806   +0.1042   +0.1024   +0.1444   +0.3534   +0.0685   
++0.0700   +0.1043   +0.1069   +0.1035   +0.1431   +0.0742   +0.3980   
+
++0.3430   +0.0569   +0.1008   +0.1039   +0.1609   +0.1610   +0.0735   
++0.0488   +0.5540   +0.0727   +0.0642   +0.0898   +0.0779   +0.0925   
++0.0930   +0.0783   +0.4089   +0.0882   +0.1224   +0.1074   +0.1017   
++0.1133   +0.0817   +0.1043   +0.3195   +0.1417   +0.1240   +0.1155   
++0.1287   +0.0838   +0.1061   +0.1039   +0.3325   +0.1280   +0.1169   
++0.1486   +0.0839   +0.1074   +0.1049   +0.1477   +0.3354   +0.0720   
++0.0735   +0.1079   +0.1102   +0.1059   +0.1462   +0.0780   +0.3783   
+
++0.3204   +0.0616   +0.1053   +0.1071   +0.1643   +0.1633   +0.0780   
++0.0528   +0.5296   +0.0769   +0.0678   +0.0946   +0.0819   +0.0964   
++0.0972   +0.0829   +0.3839   +0.0919   +0.1272   +0.1115   +0.1054   
++0.1168   +0.0863   +0.1086   +0.2963   +0.1459   +0.1275   +0.1186   
++0.1314   +0.0883   +0.1103   +0.1070   +0.3117   +0.1314   +0.1198   
++0.1507   +0.0882   +0.1115   +0.1079   +0.1516   +0.3134   +0.0766   
++0.0780   +0.1124   +0.1142   +0.1087   +0.1498   +0.0830   +0.3538   
+
+
+[2] P-matrix for branch length 1.000000
++0.3866   +0.0490   +0.0925   +0.0975   +0.1535   +0.1553   +0.0655   
++0.0420   +0.5975   +0.0653   +0.0578   +0.0813   +0.0708   +0.0852   
++0.0854   +0.0703   +0.4554   +0.0814   +0.1133   +0.0997   +0.0946   
++0.1063   +0.0736   +0.0963   +0.3644   +0.1334   +0.1169   +0.1092   
++0.1228   +0.0758   +0.0982   +0.0978   +0.3733   +0.1211   +0.1110   
++0.1434   +0.0763   +0.0997   +0.0989   +0.1397   +0.3782   +0.0639   
++0.0655   +0.0994   +0.1024   +0.1001   +0.1387   +0.0692   +0.4246   
+
++0.3614   +0.0534   +0.0973   +0.1012   +0.1579   +0.1588   +0.0700   
++0.0458   +0.5729   +0.0695   +0.0614   +0.0861   +0.0749   +0.0894   
++0.0898   +0.0748   +0.4287   +0.0854   +0.1185   +0.1042   +0.0987   
++0.1104   +0.0782   +0.1009   +0.3383   +0.1382   +0.1211   +0.1129   
++0.1263   +0.0804   +0.1027   +0.1014   +0.3496   +0.1251   +0.1145   
++0.1466   +0.0806   +0.1042   +0.1024   +0.1444   +0.3534   +0.0685   
++0.0700   +0.1043   +0.1069   +0.1035   +0.1431   +0.0742   +0.3980   
+
++0.3430   +0.0569   +0.1008   +0.1039   +0.1609   +0.1610   +0.0735   
++0.0488   +0.5540   +0.0727   +0.0642   +0.0898   +0.0779   +0.0925   
++0.0930   +0.0783   +0.4089   +0.0882   +0.1224   +0.1074   +0.1017   
++0.1133   +0.0817   +0.1043   +0.3195   +0.1417   +0.1240   +0.1155   
++0.1287   +0.0838   +0.1061   +0.1039   +0.3325   +0.1280   +0.1169   
++0.1486   +0.0839   +0.1074   +0.1049   +0.1477   +0.3354   +0.0720   
++0.0735   +0.1079   +0.1102   +0.1059   +0.1462   +0.0780   +0.3783   
+
++0.3204   +0.0616   +0.1053   +0.1071   +0.1643   +0.1633   +0.0780   
++0.0528   +0.5296   +0.0769   +0.0678   +0.0946   +0.0819   +0.0964   
++0.0972   +0.0829   +0.3839   +0.0919   +0.1272   +0.1115   +0.1054   
++0.1168   +0.0863   +0.1086   +0.2963   +0.1459   +0.1275   +0.1186   
++0.1314   +0.0883   +0.1103   +0.1070   +0.3117   +0.1314   +0.1198   
++0.1507   +0.0882   +0.1115   +0.1079   +0.1516   +0.3134   +0.0766   
++0.0780   +0.1124   +0.1142   +0.1087   +0.1498   +0.0830   +0.3538   
+
+
+[2] CLV 5: [ {(0.00022,0.01438,0.01455,0.00052,0.00057,0.00062,0.00090),(0.00026,0.01544,0.01554,0.00061,0.00067,0.00073,0.00105),(0.00029,0.01627,0.01631,0.00068,0.00075,0.00082,0.00117),(0.00035,0.01738,0.01731,0.00079,0.00087,0.00094,0.00135)} {(0.64985,0.00005,0.00057,0.00117,0.00194,0.00295,0.00021),(0.62605,0.00006,0.00066,0.00135,0.00223,0.00339,0.00025),(0.60759,0.00007,0.00074,0.00151,0.00248,0.00376,0.00028),(0.58331,0.00009,0.00086,0.00173,0.00283,0.00428,0.00033)} {(0.02079,0 [...]
+[2] CLV 6: [ {(0.00040,0.00010,0.00032,0.00003,0.00004,0.00005,0.00002),(0.00047,0.00012,0.00037,0.00004,0.00005,0.00007,0.00002),(0.00052,0.00013,0.00041,0.00004,0.00006,0.00008,0.00003),(0.00060,0.00015,0.00046,0.00005,0.00007,0.00010,0.00004)} {(0.03430,0.00005,0.00026,0.00051,0.00071,0.01762,0.00007),(0.03510,0.00005,0.00030,0.00057,0.00081,0.01820,0.00008),(0.03558,0.00006,0.00033,0.00063,0.00088,0.01860,0.00009),(0.03605,0.00007,0.00037,0.00070,0.00099,0.01906,0.00011)} {(0.01875,0 [...]
+[2] CLV 7: [ {(0.0007,0.0003,0.7103,0.0008,0.0008,0.0009,0.0010),(0.0008,0.0003,0.6894,0.0009,0.0010,0.0011,0.0011),(0.0009,0.0003,0.6730,0.0010,0.0011,0.0012,0.0013),(0.0010,0.0004,0.6513,0.0012,0.0013,0.0014,0.0015)} {(0.0035,0.0004,0.0009,0.0015,0.0017,0.6415,0.0002),(0.0040,0.0004,0.0011,0.0018,0.0020,0.6173,0.0003),(0.0044,0.0005,0.0012,0.0020,0.0022,0.5986,0.0003),(0.0050,0.0006,0.0014,0.0022,0.0025,0.5740,0.0003)} {(0.0252,0.0001,0.0006,0.0273,0.0014,0.0018,0.0005),(0.0267,0.0001, [...]
+
+
+ TEST alpha(ncats) = 100.00( 4), mode = MEDIAN
+
+Rates:  0.87591  0.96474  1.02955  1.12981 
+       
+[2] P-matrix for branch length 0.100000
++0.8978   +0.0040   +0.0133   +0.0165   +0.0295   +0.0318   +0.0071   
++0.0034   +0.9475   +0.0081   +0.0074   +0.0108   +0.0100   +0.0128   
++0.0123   +0.0087   +0.9184   +0.0123   +0.0175   +0.0157   +0.0151   
++0.0180   +0.0094   +0.0145   +0.8945   +0.0232   +0.0207   +0.0196   
++0.0236   +0.0101   +0.0151   +0.0170   +0.8916   +0.0219   +0.0207   
++0.0293   +0.0107   +0.0157   +0.0175   +0.0253   +0.8949   +0.0065   
++0.0071   +0.0149   +0.0164   +0.0180   +0.0259   +0.0071   +0.9106   
+
++0.8882   +0.0044   +0.0146   +0.0181   +0.0322   +0.0347   +0.0078   
++0.0038   +0.9423   +0.0089   +0.0081   +0.0119   +0.0109   +0.0140   
++0.0135   +0.0096   +0.9105   +0.0135   +0.0191   +0.0172   +0.0165   
++0.0197   +0.0104   +0.0159   +0.8846   +0.0253   +0.0226   +0.0215   
++0.0258   +0.0111   +0.0166   +0.0186   +0.8814   +0.0239   +0.0226   
++0.0320   +0.0118   +0.0172   +0.0191   +0.0276   +0.8850   +0.0072   
++0.0078   +0.0164   +0.0179   +0.0197   +0.0283   +0.0078   +0.9021   
+
++0.8813   +0.0047   +0.0155   +0.0192   +0.0342   +0.0368   +0.0084   
++0.0040   +0.9386   +0.0095   +0.0087   +0.0126   +0.0116   +0.0149   
++0.0143   +0.0102   +0.9049   +0.0143   +0.0203   +0.0183   +0.0176   
++0.0209   +0.0110   +0.0169   +0.8774   +0.0269   +0.0240   +0.0228   
++0.0274   +0.0118   +0.0176   +0.0197   +0.8741   +0.0254   +0.0240   
++0.0339   +0.0125   +0.0183   +0.0203   +0.0293   +0.8779   +0.0077   
++0.0084   +0.0174   +0.0191   +0.0209   +0.0300   +0.0084   +0.8959   
+
++0.8707   +0.0052   +0.0169   +0.0209   +0.0372   +0.0399   +0.0092   
++0.0045   +0.9329   +0.0104   +0.0095   +0.0138   +0.0127   +0.0163   
++0.0156   +0.0112   +0.8962   +0.0156   +0.0222   +0.0200   +0.0192   
++0.0228   +0.0121   +0.0185   +0.8664   +0.0293   +0.0261   +0.0248   
++0.0297   +0.0129   +0.0192   +0.0215   +0.8629   +0.0277   +0.0261   
++0.0369   +0.0136   +0.0200   +0.0221   +0.0319   +0.8670   +0.0085   
++0.0092   +0.0190   +0.0208   +0.0227   +0.0326   +0.0092   +0.8865   
+
+
+[2] P-matrix for branch length 0.200000
++0.8083   +0.0084   +0.0255   +0.0310   +0.0544   +0.0582   +0.0142   
++0.0072   +0.8983   +0.0158   +0.0144   +0.0209   +0.0191   +0.0244   
++0.0235   +0.0171   +0.8446   +0.0234   +0.0331   +0.0297   +0.0285   
++0.0338   +0.0183   +0.0276   +0.8019   +0.0433   +0.0385   +0.0365   
++0.0436   +0.0195   +0.0287   +0.0318   +0.7974   +0.0407   +0.0383   
++0.0538   +0.0205   +0.0297   +0.0326   +0.0470   +0.8031   +0.0133   
++0.0142   +0.0284   +0.0309   +0.0335   +0.0479   +0.0144   +0.8306   
+
++0.7915   +0.0093   +0.0278   +0.0337   +0.0590   +0.0630   +0.0157   
++0.0080   +0.8887   +0.0174   +0.0158   +0.0229   +0.0208   +0.0266   
++0.0257   +0.0187   +0.8305   +0.0255   +0.0361   +0.0324   +0.0311   
++0.0367   +0.0201   +0.0301   +0.7845   +0.0471   +0.0418   +0.0397   
++0.0472   +0.0213   +0.0313   +0.0345   +0.7799   +0.0442   +0.0416   
++0.0582   +0.0224   +0.0324   +0.0354   +0.0510   +0.7860   +0.0146   
++0.0157   +0.0310   +0.0337   +0.0364   +0.0520   +0.0159   +0.8155   
+
++0.7795   +0.0100   +0.0295   +0.0356   +0.0622   +0.0664   +0.0167   
++0.0085   +0.8818   +0.0185   +0.0168   +0.0243   +0.0221   +0.0281   
++0.0273   +0.0199   +0.8204   +0.0270   +0.0382   +0.0343   +0.0329   
++0.0388   +0.0213   +0.0319   +0.7721   +0.0497   +0.0442   +0.0419   
++0.0498   +0.0227   +0.0331   +0.0365   +0.7674   +0.0467   +0.0439   
++0.0613   +0.0238   +0.0343   +0.0374   +0.0538   +0.7738   +0.0156   
++0.0167   +0.0328   +0.0356   +0.0384   +0.0548   +0.0169   +0.8046   
+
++0.7615   +0.0110   +0.0321   +0.0385   +0.0671   +0.0715   +0.0184   
++0.0095   +0.8712   +0.0201   +0.0183   +0.0264   +0.0240   +0.0305   
++0.0296   +0.0217   +0.8051   +0.0293   +0.0415   +0.0372   +0.0356   
++0.0420   +0.0233   +0.0347   +0.7534   +0.0537   +0.0477   +0.0452   
++0.0537   +0.0247   +0.0359   +0.0394   +0.7486   +0.0504   +0.0473   
++0.0660   +0.0258   +0.0372   +0.0404   +0.0581   +0.7553   +0.0172   
++0.0184   +0.0356   +0.0386   +0.0415   +0.0591   +0.0186   +0.7882   
+
+
+[2] P-matrix for branch length 1.000000
++0.3904   +0.0484   +0.0918   +0.0969   +0.1529   +0.1548   +0.0648   
++0.0415   +0.6011   +0.0646   +0.0573   +0.0806   +0.0702   +0.0846   
++0.0847   +0.0696   +0.4594   +0.0809   +0.1125   +0.0990   +0.0939   
++0.1057   +0.0730   +0.0956   +0.3683   +0.1326   +0.1163   +0.1086   
++0.1223   +0.0752   +0.0975   +0.0973   +0.3769   +0.1204   +0.1105   
++0.1429   +0.0756   +0.0990   +0.0984   +0.1390   +0.3819   +0.0632   
++0.0648   +0.0987   +0.1018   +0.0995   +0.1381   +0.0685   +0.4286   
+
++0.3618   +0.0534   +0.0972   +0.1012   +0.1578   +0.1587   +0.0700   
++0.0457   +0.5733   +0.0694   +0.0614   +0.0860   +0.0748   +0.0893   
++0.0897   +0.0747   +0.4291   +0.0853   +0.1185   +0.1041   +0.0986   
++0.1103   +0.0781   +0.1008   +0.3388   +0.1382   +0.1210   +0.1128   
++0.1263   +0.0803   +0.1027   +0.1013   +0.3499   +0.1251   +0.1144   
++0.1465   +0.0805   +0.1041   +0.1024   +0.1443   +0.3538   +0.0684   
++0.0700   +0.1042   +0.1068   +0.1034   +0.1430   +0.0741   +0.3984   
+
++0.3431   +0.0569   +0.1008   +0.1039   +0.1609   +0.1610   +0.0735   
++0.0488   +0.5541   +0.0727   +0.0642   +0.0898   +0.0779   +0.0925   
++0.0930   +0.0783   +0.4089   +0.0882   +0.1224   +0.1074   +0.1017   
++0.1133   +0.0817   +0.1043   +0.3195   +0.1417   +0.1240   +0.1155   
++0.1287   +0.0838   +0.1061   +0.1039   +0.3326   +0.1280   +0.1169   
++0.1486   +0.0839   +0.1074   +0.1049   +0.1477   +0.3355   +0.0720   
++0.0735   +0.1079   +0.1101   +0.1059   +0.1462   +0.0780   +0.3784   
+
++0.3173   +0.0623   +0.1059   +0.1075   +0.1647   +0.1636   +0.0787   
++0.0534   +0.5261   +0.0775   +0.0683   +0.0953   +0.0824   +0.0969   
++0.0977   +0.0835   +0.3805   +0.0924   +0.1279   +0.1121   +0.1059   
++0.1173   +0.0869   +0.1091   +0.2931   +0.1465   +0.1280   +0.1190   
++0.1318   +0.0890   +0.1109   +0.1074   +0.3089   +0.1318   +0.1202   
++0.1510   +0.0888   +0.1121   +0.1083   +0.1521   +0.3104   +0.0773   
++0.0787   +0.1131   +0.1147   +0.1091   +0.1503   +0.0837   +0.3504   
+
+
+[2] P-matrix for branch length 1.000000
++0.3904   +0.0484   +0.0918   +0.0969   +0.1529   +0.1548   +0.0648   
++0.0415   +0.6011   +0.0646   +0.0573   +0.0806   +0.0702   +0.0846   
++0.0847   +0.0696   +0.4594   +0.0809   +0.1125   +0.0990   +0.0939   
++0.1057   +0.0730   +0.0956   +0.3683   +0.1326   +0.1163   +0.1086   
++0.1223   +0.0752   +0.0975   +0.0973   +0.3769   +0.1204   +0.1105   
++0.1429   +0.0756   +0.0990   +0.0984   +0.1390   +0.3819   +0.0632   
++0.0648   +0.0987   +0.1018   +0.0995   +0.1381   +0.0685   +0.4286   
+
++0.3618   +0.0534   +0.0972   +0.1012   +0.1578   +0.1587   +0.0700   
++0.0457   +0.5733   +0.0694   +0.0614   +0.0860   +0.0748   +0.0893   
++0.0897   +0.0747   +0.4291   +0.0853   +0.1185   +0.1041   +0.0986   
++0.1103   +0.0781   +0.1008   +0.3388   +0.1382   +0.1210   +0.1128   
++0.1263   +0.0803   +0.1027   +0.1013   +0.3499   +0.1251   +0.1144   
++0.1465   +0.0805   +0.1041   +0.1024   +0.1443   +0.3538   +0.0684   
++0.0700   +0.1042   +0.1068   +0.1034   +0.1430   +0.0741   +0.3984   
+
++0.3431   +0.0569   +0.1008   +0.1039   +0.1609   +0.1610   +0.0735   
++0.0488   +0.5541   +0.0727   +0.0642   +0.0898   +0.0779   +0.0925   
++0.0930   +0.0783   +0.4089   +0.0882   +0.1224   +0.1074   +0.1017   
++0.1133   +0.0817   +0.1043   +0.3195   +0.1417   +0.1240   +0.1155   
++0.1287   +0.0838   +0.1061   +0.1039   +0.3326   +0.1280   +0.1169   
++0.1486   +0.0839   +0.1074   +0.1049   +0.1477   +0.3355   +0.0720   
++0.0735   +0.1079   +0.1101   +0.1059   +0.1462   +0.0780   +0.3784   
+
++0.3173   +0.0623   +0.1059   +0.1075   +0.1647   +0.1636   +0.0787   
++0.0534   +0.5261   +0.0775   +0.0683   +0.0953   +0.0824   +0.0969   
++0.0977   +0.0835   +0.3805   +0.0924   +0.1279   +0.1121   +0.1059   
++0.1173   +0.0869   +0.1091   +0.2931   +0.1465   +0.1280   +0.1190   
++0.1318   +0.0890   +0.1109   +0.1074   +0.3089   +0.1318   +0.1202   
++0.1510   +0.0888   +0.1121   +0.1083   +0.1521   +0.3104   +0.0773   
++0.0787   +0.1131   +0.1147   +0.1091   +0.1503   +0.0837   +0.3504   
+
+
+[2] CLV 5: [ {(0.00021,0.01423,0.01441,0.00051,0.00056,0.00061,0.00088),(0.00026,0.01542,0.01552,0.00061,0.00067,0.00073,0.00104),(0.00029,0.01627,0.01630,0.00068,0.00075,0.00081,0.00117),(0.00035,0.01754,0.01745,0.00081,0.00089,0.00096,0.00138)} {(0.65330,0.00005,0.00055,0.00114,0.00190,0.00289,0.00020),(0.62646,0.00006,0.00066,0.00135,0.00223,0.00338,0.00025),(0.60766,0.00007,0.00074,0.00151,0.00248,0.00376,0.00028),(0.57983,0.00009,0.00088,0.00176,0.00288,0.00435,0.00034)} {(0.02061,0 [...]
+[2] CLV 6: [ {(0.00040,0.00010,0.00032,0.00003,0.00004,0.00005,0.00002),(0.00047,0.00012,0.00037,0.00004,0.00005,0.00007,0.00002),(0.00052,0.00013,0.00041,0.00004,0.00006,0.00008,0.00003),(0.00061,0.00016,0.00047,0.00006,0.00008,0.00010,0.00004)} {(0.03417,0.00004,0.00026,0.00050,0.00070,0.01752,0.00007),(0.03508,0.00005,0.00030,0.00057,0.00081,0.01819,0.00008),(0.03558,0.00006,0.00033,0.00063,0.00088,0.01860,0.00009),(0.03610,0.00007,0.00037,0.00071,0.00100,0.01911,0.00011)} {(0.01860,0 [...]
+[2] CLV 7: [ {(0.0006,0.0003,0.7133,0.0008,0.0008,0.0009,0.0010),(0.0008,0.0003,0.6897,0.0009,0.0010,0.0010,0.0011),(0.0009,0.0003,0.6731,0.0010,0.0011,0.0012,0.0013),(0.0010,0.0004,0.6482,0.0012,0.0013,0.0014,0.0015)} {(0.0034,0.0004,0.0009,0.0015,0.0017,0.6450,0.0002),(0.0040,0.0004,0.0010,0.0018,0.0020,0.6178,0.0003),(0.0044,0.0005,0.0012,0.0020,0.0022,0.5987,0.0003),(0.0051,0.0006,0.0014,0.0023,0.0025,0.5705,0.0003)} {(0.0250,0.0001,0.0006,0.0271,0.0014,0.0018,0.0005),(0.0267,0.0001, [...]
+Subst params:  0.50000  2.00000  3.00000  4.00000  5.00000  1.10000  1.20000 
+               1.30000  1.40000  1.50000  2.10000  2.20000  2.30000  2.40000 
+               2.50000  3.10000  3.20000  3.30000  3.40000  3.50000  1.00000 
+              
+
+
+ TEST alpha(ncats) =   0.10( 6), mode = MEAN
+
+Rates:  0.00000  0.00001  0.00152  0.04420 
+        0.56179  5.39248 
+[0] P-matrix for branch length 0.100000
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9998   +0.0000   +0.0000   +0.0000   +0.0001   +0.0001   +0.0000   
++0.0000   +0.9999   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.9999   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.9998   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.9998   +0.0000   +0.0000   
++0.0001   +0.0000   +0.0000   +0.0000   +0.0000   +0.9998   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.9998   
+
++0.9945   +0.0002   +0.0007   +0.0009   +0.0016   +0.0017   +0.0004   
++0.0002   +0.9973   +0.0004   +0.0004   +0.0006   +0.0005   +0.0007   
++0.0006   +0.0005   +0.9957   +0.0007   +0.0009   +0.0008   +0.0008   
++0.0010   +0.0005   +0.0008   +0.9943   +0.0012   +0.0011   +0.0011   
++0.0013   +0.0005   +0.0008   +0.0009   +0.9942   +0.0012   +0.0011   
++0.0016   +0.0006   +0.0008   +0.0009   +0.0014   +0.9944   +0.0003   
++0.0004   +0.0008   +0.0009   +0.0010   +0.0014   +0.0004   +0.9952   
+
++0.9329   +0.0025   +0.0087   +0.0108   +0.0195   +0.0210   +0.0045   
++0.0021   +0.9659   +0.0053   +0.0048   +0.0070   +0.0065   +0.0084   
++0.0080   +0.0057   +0.9467   +0.0080   +0.0114   +0.0103   +0.0099   
++0.0118   +0.0061   +0.0095   +0.9308   +0.0152   +0.0136   +0.0129   
++0.0156   +0.0066   +0.0099   +0.0112   +0.9287   +0.0144   +0.0137   
++0.0194   +0.0070   +0.0103   +0.0115   +0.0166   +0.9310   +0.0042   
++0.0045   +0.0097   +0.0107   +0.0119   +0.0171   +0.0045   +0.9415   
+
++0.5391   +0.0289   +0.0660   +0.0740   +0.1223   +0.1272   +0.0425   
++0.0247   +0.7249   +0.0439   +0.0393   +0.0560   +0.0496   +0.0616   
++0.0609   +0.0472   +0.6064   +0.0591   +0.0828   +0.0735   +0.0701   
++0.0807   +0.0500   +0.0698   +0.5225   +0.1021   +0.0901   +0.0847   
++0.0979   +0.0522   +0.0718   +0.0749   +0.5218   +0.0942   +0.0873   
++0.1174   +0.0534   +0.0735   +0.0762   +0.1086   +0.5300   +0.0408   
++0.0425   +0.0719   +0.0759   +0.0777   +0.1091   +0.0442   +0.5787   
+
+
+[0] P-matrix for branch length 0.200000
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9996   +0.0000   +0.0000   +0.0001   +0.0001   +0.0001   +0.0000   
++0.0000   +0.9998   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.9997   +0.0000   +0.0001   +0.0001   +0.0001   
++0.0001   +0.0000   +0.0001   +0.9996   +0.0001   +0.0001   +0.0001   
++0.0001   +0.0000   +0.0001   +0.0001   +0.9996   +0.0001   +0.0001   
++0.0001   +0.0000   +0.0001   +0.0001   +0.0001   +0.9996   +0.0000   
++0.0000   +0.0001   +0.0001   +0.0001   +0.0001   +0.0000   +0.9997   
+
++0.9891   +0.0004   +0.0014   +0.0018   +0.0032   +0.0035   +0.0007   
++0.0003   +0.9945   +0.0008   +0.0008   +0.0011   +0.0010   +0.0014   
++0.0013   +0.0009   +0.9914   +0.0013   +0.0018   +0.0017   +0.0016   
++0.0019   +0.0010   +0.0015   +0.9887   +0.0025   +0.0022   +0.0021   
++0.0026   +0.0011   +0.0016   +0.0018   +0.9883   +0.0024   +0.0022   
++0.0032   +0.0011   +0.0017   +0.0019   +0.0027   +0.9887   +0.0006   
++0.0007   +0.0016   +0.0017   +0.0019   +0.0028   +0.0007   +0.9905   
+
++0.8713   +0.0052   +0.0169   +0.0208   +0.0370   +0.0397   +0.0091   
++0.0044   +0.9332   +0.0103   +0.0094   +0.0137   +0.0126   +0.0162   
++0.0156   +0.0111   +0.8967   +0.0155   +0.0221   +0.0199   +0.0191   
++0.0227   +0.0120   +0.0184   +0.8671   +0.0292   +0.0260   +0.0247   
++0.0296   +0.0128   +0.0191   +0.0214   +0.8636   +0.0275   +0.0260   
++0.0367   +0.0136   +0.0199   +0.0220   +0.0317   +0.8677   +0.0084   
++0.0091   +0.0189   +0.0207   +0.0226   +0.0325   +0.0091   +0.8871   
+
++0.3301   +0.0595   +0.1033   +0.1057   +0.1629   +0.1623   +0.0761   
++0.0510   +0.5402   +0.0751   +0.0662   +0.0926   +0.0802   +0.0947   
++0.0954   +0.0809   +0.3946   +0.0903   +0.1252   +0.1098   +0.1038   
++0.1154   +0.0843   +0.1067   +0.3061   +0.1441   +0.1260   +0.1173   
++0.1303   +0.0864   +0.1085   +0.1057   +0.3206   +0.1300   +0.1186   
++0.1499   +0.0863   +0.1098   +0.1067   +0.1499   +0.3228   +0.0746   
++0.0761   +0.1105   +0.1125   +0.1075   +0.1483   +0.0809   +0.3643   
+
+
+[0] P-matrix for branch length 1.000000
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9981   +0.0001   +0.0002   +0.0003   +0.0006   +0.0006   +0.0001   
++0.0001   +0.9991   +0.0001   +0.0001   +0.0002   +0.0002   +0.0002   
++0.0002   +0.0002   +0.9985   +0.0002   +0.0003   +0.0003   +0.0003   
++0.0003   +0.0002   +0.0003   +0.9980   +0.0004   +0.0004   +0.0004   
++0.0004   +0.0002   +0.0003   +0.0003   +0.9980   +0.0004   +0.0004   
++0.0006   +0.0002   +0.0003   +0.0003   +0.0005   +0.9980   +0.0001   
++0.0001   +0.0003   +0.0003   +0.0003   +0.0005   +0.0001   +0.9984   
+
++0.9468   +0.0019   +0.0069   +0.0086   +0.0155   +0.0167   +0.0036   
++0.0017   +0.9731   +0.0042   +0.0038   +0.0056   +0.0051   +0.0066   
++0.0063   +0.0045   +0.9578   +0.0064   +0.0090   +0.0082   +0.0078   
++0.0094   +0.0048   +0.0075   +0.9451   +0.0121   +0.0108   +0.0103   
++0.0124   +0.0052   +0.0078   +0.0089   +0.9434   +0.0115   +0.0109   
++0.0155   +0.0055   +0.0082   +0.0091   +0.0132   +0.9452   +0.0033   
++0.0036   +0.0077   +0.0085   +0.0094   +0.0136   +0.0035   +0.9537   
+
++0.5267   +0.0302   +0.0680   +0.0759   +0.1251   +0.1299   +0.0442   
++0.0259   +0.7156   +0.0454   +0.0407   +0.0578   +0.0512   +0.0635   
++0.0628   +0.0489   +0.5947   +0.0608   +0.0852   +0.0755   +0.0721   
++0.0828   +0.0518   +0.0719   +0.5096   +0.1048   +0.0923   +0.0868   
++0.1001   +0.0540   +0.0738   +0.0768   +0.5095   +0.0965   +0.0893   
++0.1199   +0.0551   +0.0755   +0.0781   +0.1113   +0.5176   +0.0425   
++0.0442   +0.0740   +0.0781   +0.0796   +0.1116   +0.0460   +0.5665   
+
++0.1356   +0.1500   +0.1449   +0.1230   +0.1678   +0.1460   +0.1327   
++0.1286   +0.1728   +0.1413   +0.1198   +0.1634   +0.1411   +0.1330   
++0.1337   +0.1521   +0.1467   +0.1224   +0.1669   +0.1447   +0.1334   
++0.1342   +0.1524   +0.1447   +0.1230   +0.1673   +0.1450   +0.1335   
++0.1343   +0.1525   +0.1447   +0.1227   +0.1674   +0.1451   +0.1334   
++0.1348   +0.1520   +0.1447   +0.1227   +0.1674   +0.1457   +0.1327   
++0.1327   +0.1552   +0.1445   +0.1223   +0.1667   +0.1437   +0.1348   
+
+
+[0] P-matrix for branch length 1.000000
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9981   +0.0001   +0.0002   +0.0003   +0.0006   +0.0006   +0.0001   
++0.0001   +0.9991   +0.0001   +0.0001   +0.0002   +0.0002   +0.0002   
++0.0002   +0.0002   +0.9985   +0.0002   +0.0003   +0.0003   +0.0003   
++0.0003   +0.0002   +0.0003   +0.9980   +0.0004   +0.0004   +0.0004   
++0.0004   +0.0002   +0.0003   +0.0003   +0.9980   +0.0004   +0.0004   
++0.0006   +0.0002   +0.0003   +0.0003   +0.0005   +0.9980   +0.0001   
++0.0001   +0.0003   +0.0003   +0.0003   +0.0005   +0.0001   +0.9984   
+
++0.9468   +0.0019   +0.0069   +0.0086   +0.0155   +0.0167   +0.0036   
++0.0017   +0.9731   +0.0042   +0.0038   +0.0056   +0.0051   +0.0066   
++0.0063   +0.0045   +0.9578   +0.0064   +0.0090   +0.0082   +0.0078   
++0.0094   +0.0048   +0.0075   +0.9451   +0.0121   +0.0108   +0.0103   
++0.0124   +0.0052   +0.0078   +0.0089   +0.9434   +0.0115   +0.0109   
++0.0155   +0.0055   +0.0082   +0.0091   +0.0132   +0.9452   +0.0033   
++0.0036   +0.0077   +0.0085   +0.0094   +0.0136   +0.0035   +0.9537   
+
++0.5267   +0.0302   +0.0680   +0.0759   +0.1251   +0.1299   +0.0442   
++0.0259   +0.7156   +0.0454   +0.0407   +0.0578   +0.0512   +0.0635   
++0.0628   +0.0489   +0.5947   +0.0608   +0.0852   +0.0755   +0.0721   
++0.0828   +0.0518   +0.0719   +0.5096   +0.1048   +0.0923   +0.0868   
++0.1001   +0.0540   +0.0738   +0.0768   +0.5095   +0.0965   +0.0893   
++0.1199   +0.0551   +0.0755   +0.0781   +0.1113   +0.5176   +0.0425   
++0.0442   +0.0740   +0.0781   +0.0796   +0.1116   +0.0460   +0.5665   
+
++0.1356   +0.1500   +0.1449   +0.1230   +0.1678   +0.1460   +0.1327   
++0.1286   +0.1728   +0.1413   +0.1198   +0.1634   +0.1411   +0.1330   
++0.1337   +0.1521   +0.1467   +0.1224   +0.1669   +0.1447   +0.1334   
++0.1342   +0.1524   +0.1447   +0.1230   +0.1673   +0.1450   +0.1335   
++0.1343   +0.1525   +0.1447   +0.1227   +0.1674   +0.1451   +0.1334   
++0.1348   +0.1520   +0.1447   +0.1227   +0.1674   +0.1457   +0.1327   
++0.1327   +0.1552   +0.1445   +0.1223   +0.1667   +0.1437   +0.1348   
+
+
+[0] CLV 5: [ {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00003,0.00003,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00083,0.00090,0.00000,0.00000,0.00000,0.00000),(0.00009,0.00965,0.00999,0.00022,0.00025,0.00027,0.00039),(0.00615,0.04057,0.03192,0.00900,0.00937,0.00948,0.01243)} {(1.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(1.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.99924,0.0 [...]
+[0] CLV 6: [ {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00018,0.00004,0.00015,0.00001,0.00001,0.00002,0.00001),(0.00335,0.00169,0.00234,0.00142,0.00164,0.00187,0.00114)} {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00012,0.0 [...]
+[0] CLV 7: [ {(0.0000,0.0000,1.0000,0.0000,0.0000,0.0000,0.0000),(0.0000,0.0000,1.0000,0.0000,0.0000,0.0000,0.0000),(0.0000,0.0000,0.9994,0.0000,0.0000,0.0000,0.0000),(0.0000,0.0000,0.9828,0.0000,0.0000,0.0000,0.0000),(0.0003,0.0001,0.8042,0.0003,0.0004,0.0004,0.0004),(0.0107,0.0056,0.1557,0.0114,0.0118,0.0121,0.0126)} {(0.0000,0.0000,0.0000,0.0000,0.0000,1.0000,0.0000),(0.0000,0.0000,0.0000,0.0000,0.0000,1.0000,0.0000),(0.0000,0.0000,0.0000,0.0000,0.0000,0.9992,0.0000),(0.0000,0.0000,0. [...]
+
+
+ TEST alpha(ncats) =   0.10( 6), mode = MEDIAN
+
+Rates:  0.00000  0.00002  0.00160  0.03687 
+        0.42992  5.53159 
+[0] P-matrix for branch length 0.100000
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9998   +0.0000   +0.0000   +0.0000   +0.0001   +0.0001   +0.0000   
++0.0000   +0.9999   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.9998   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.9998   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.9998   +0.0000   +0.0000   
++0.0001   +0.0000   +0.0000   +0.0000   +0.0000   +0.9998   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0001   +0.0000   +0.9998   
+
++0.9954   +0.0002   +0.0006   +0.0007   +0.0013   +0.0015   +0.0003   
++0.0001   +0.9977   +0.0004   +0.0003   +0.0005   +0.0004   +0.0006   
++0.0005   +0.0004   +0.9964   +0.0005   +0.0008   +0.0007   +0.0007   
++0.0008   +0.0004   +0.0006   +0.9953   +0.0010   +0.0009   +0.0009   
++0.0011   +0.0004   +0.0007   +0.0008   +0.9951   +0.0010   +0.0009   
++0.0013   +0.0005   +0.0007   +0.0008   +0.0011   +0.9953   +0.0003   
++0.0003   +0.0007   +0.0007   +0.0008   +0.0012   +0.0003   +0.9960   
+
++0.9482   +0.0019   +0.0067   +0.0084   +0.0151   +0.0163   +0.0035   
++0.0016   +0.9738   +0.0040   +0.0037   +0.0054   +0.0050   +0.0064   
++0.0062   +0.0043   +0.9589   +0.0062   +0.0088   +0.0079   +0.0076   
++0.0091   +0.0047   +0.0073   +0.9465   +0.0118   +0.0105   +0.0100   
++0.0121   +0.0050   +0.0076   +0.0086   +0.9449   +0.0112   +0.0106   
++0.0151   +0.0054   +0.0079   +0.0089   +0.0129   +0.9466   +0.0032   
++0.0035   +0.0075   +0.0083   +0.0092   +0.0132   +0.0034   +0.9549   
+
++0.5314   +0.0297   +0.0672   +0.0752   +0.1240   +0.1289   +0.0435   
++0.0254   +0.7191   +0.0448   +0.0402   +0.0571   +0.0506   +0.0628   
++0.0620   +0.0483   +0.5992   +0.0602   +0.0843   +0.0747   +0.0713   
++0.0820   +0.0511   +0.0711   +0.5145   +0.1038   +0.0915   +0.0860   
++0.0992   +0.0533   +0.0731   +0.0761   +0.5142   +0.0956   +0.0885   
++0.1190   +0.0545   +0.0747   +0.0774   +0.1103   +0.5223   +0.0418   
++0.0435   +0.0732   +0.0773   +0.0788   +0.1107   +0.0453   +0.5711   
+
+
+[0] P-matrix for branch length 0.200000
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9996   +0.0000   +0.0001   +0.0001   +0.0001   +0.0001   +0.0000   
++0.0000   +0.9998   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.9997   +0.0000   +0.0001   +0.0001   +0.0001   
++0.0001   +0.0000   +0.0001   +0.9996   +0.0001   +0.0001   +0.0001   
++0.0001   +0.0000   +0.0001   +0.0001   +0.9996   +0.0001   +0.0001   
++0.0001   +0.0000   +0.0001   +0.0001   +0.0001   +0.9996   +0.0000   
++0.0000   +0.0001   +0.0001   +0.0001   +0.0001   +0.0000   +0.9997   
+
++0.9909   +0.0003   +0.0012   +0.0015   +0.0027   +0.0029   +0.0006   
++0.0003   +0.9954   +0.0007   +0.0006   +0.0009   +0.0009   +0.0011   
++0.0011   +0.0008   +0.9928   +0.0011   +0.0015   +0.0014   +0.0013   
++0.0016   +0.0008   +0.0013   +0.9906   +0.0021   +0.0019   +0.0018   
++0.0021   +0.0009   +0.0013   +0.0015   +0.9903   +0.0020   +0.0019   
++0.0027   +0.0009   +0.0014   +0.0016   +0.0023   +0.9906   +0.0005   
++0.0006   +0.0013   +0.0015   +0.0016   +0.0023   +0.0006   +0.9921   
+
++0.8996   +0.0039   +0.0131   +0.0162   +0.0290   +0.0312   +0.0070   
++0.0033   +0.9484   +0.0080   +0.0073   +0.0106   +0.0098   +0.0126   
++0.0121   +0.0086   +0.9198   +0.0121   +0.0172   +0.0155   +0.0149   
++0.0177   +0.0093   +0.0143   +0.8964   +0.0228   +0.0203   +0.0193   
++0.0232   +0.0099   +0.0149   +0.0167   +0.8934   +0.0215   +0.0204   
++0.0288   +0.0105   +0.0155   +0.0172   +0.0248   +0.8967   +0.0064   
++0.0070   +0.0147   +0.0161   +0.0177   +0.0255   +0.0070   +0.9122   
+
++0.3231   +0.0610   +0.1047   +0.1067   +0.1639   +0.1630   +0.0775   
++0.0523   +0.5325   +0.0764   +0.0674   +0.0941   +0.0814   +0.0959   
++0.0967   +0.0823   +0.3869   +0.0914   +0.1267   +0.1111   +0.1050   
++0.1164   +0.0857   +0.1081   +0.2990   +0.1454   +0.1271   +0.1182   
++0.1311   +0.0878   +0.1098   +0.1067   +0.3141   +0.1310   +0.1195   
++0.1505   +0.0877   +0.1111   +0.1076   +0.1511   +0.3160   +0.0761   
++0.0775   +0.1119   +0.1137   +0.1084   +0.1494   +0.0824   +0.3567   
+
+
+[0] P-matrix for branch length 1.000000
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9980   +0.0001   +0.0003   +0.0003   +0.0006   +0.0006   +0.0001   
++0.0001   +0.9990   +0.0002   +0.0001   +0.0002   +0.0002   +0.0002   
++0.0002   +0.0002   +0.9984   +0.0002   +0.0003   +0.0003   +0.0003   
++0.0004   +0.0002   +0.0003   +0.9980   +0.0005   +0.0004   +0.0004   
++0.0005   +0.0002   +0.0003   +0.0003   +0.9979   +0.0004   +0.0004   
++0.0006   +0.0002   +0.0003   +0.0003   +0.0005   +0.9980   +0.0001   
++0.0001   +0.0003   +0.0003   +0.0004   +0.0005   +0.0001   +0.9983   
+
++0.9553   +0.0016   +0.0057   +0.0072   +0.0130   +0.0141   +0.0030   
++0.0014   +0.9775   +0.0035   +0.0032   +0.0047   +0.0043   +0.0055   
++0.0053   +0.0037   +0.9646   +0.0053   +0.0076   +0.0068   +0.0066   
++0.0079   +0.0040   +0.0063   +0.9539   +0.0102   +0.0091   +0.0086   
++0.0104   +0.0043   +0.0066   +0.0074   +0.9525   +0.0096   +0.0091   
++0.0130   +0.0046   +0.0068   +0.0077   +0.0111   +0.9540   +0.0027   
++0.0030   +0.0065   +0.0071   +0.0079   +0.0114   +0.0030   +0.9612   
+
++0.6054   +0.0225   +0.0554   +0.0635   +0.1068   +0.1121   +0.0344   
++0.0193   +0.7721   +0.0361   +0.0325   +0.0465   +0.0415   +0.0520   
++0.0511   +0.0389   +0.6678   +0.0499   +0.0702   +0.0624   +0.0597   
++0.0693   +0.0414   +0.0590   +0.5913   +0.0880   +0.0778   +0.0733   
++0.0855   +0.0434   +0.0608   +0.0645   +0.5884   +0.0815   +0.0759   
++0.1034   +0.0447   +0.0624   +0.0658   +0.0941   +0.5967   +0.0328   
++0.0344   +0.0607   +0.0647   +0.0672   +0.0949   +0.0355   +0.6426   
+
++0.1353   +0.1505   +0.1449   +0.1229   +0.1677   +0.1459   +0.1328   
++0.1290   +0.1712   +0.1416   +0.1200   +0.1637   +0.1414   +0.1331   
++0.1337   +0.1525   +0.1464   +0.1224   +0.1669   +0.1447   +0.1334   
++0.1341   +0.1527   +0.1447   +0.1229   +0.1672   +0.1450   +0.1334   
++0.1342   +0.1528   +0.1447   +0.1226   +0.1673   +0.1450   +0.1334   
++0.1346   +0.1523   +0.1447   +0.1227   +0.1673   +0.1456   +0.1328   
++0.1328   +0.1553   +0.1445   +0.1223   +0.1667   +0.1438   +0.1346   
+
+
+[0] P-matrix for branch length 1.000000
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9980   +0.0001   +0.0003   +0.0003   +0.0006   +0.0006   +0.0001   
++0.0001   +0.9990   +0.0002   +0.0001   +0.0002   +0.0002   +0.0002   
++0.0002   +0.0002   +0.9984   +0.0002   +0.0003   +0.0003   +0.0003   
++0.0004   +0.0002   +0.0003   +0.9980   +0.0005   +0.0004   +0.0004   
++0.0005   +0.0002   +0.0003   +0.0003   +0.9979   +0.0004   +0.0004   
++0.0006   +0.0002   +0.0003   +0.0003   +0.0005   +0.9980   +0.0001   
++0.0001   +0.0003   +0.0003   +0.0004   +0.0005   +0.0001   +0.9983   
+
++0.9553   +0.0016   +0.0057   +0.0072   +0.0130   +0.0141   +0.0030   
++0.0014   +0.9775   +0.0035   +0.0032   +0.0047   +0.0043   +0.0055   
++0.0053   +0.0037   +0.9646   +0.0053   +0.0076   +0.0068   +0.0066   
++0.0079   +0.0040   +0.0063   +0.9539   +0.0102   +0.0091   +0.0086   
++0.0104   +0.0043   +0.0066   +0.0074   +0.9525   +0.0096   +0.0091   
++0.0130   +0.0046   +0.0068   +0.0077   +0.0111   +0.9540   +0.0027   
++0.0030   +0.0065   +0.0071   +0.0079   +0.0114   +0.0030   +0.9612   
+
++0.6054   +0.0225   +0.0554   +0.0635   +0.1068   +0.1121   +0.0344   
++0.0193   +0.7721   +0.0361   +0.0325   +0.0465   +0.0415   +0.0520   
++0.0511   +0.0389   +0.6678   +0.0499   +0.0702   +0.0624   +0.0597   
++0.0693   +0.0414   +0.0590   +0.5913   +0.0880   +0.0778   +0.0733   
++0.0855   +0.0434   +0.0608   +0.0645   +0.5884   +0.0815   +0.0759   
++0.1034   +0.0447   +0.0624   +0.0658   +0.0941   +0.5967   +0.0328   
++0.0344   +0.0607   +0.0647   +0.0672   +0.0949   +0.0355   +0.6426   
+
++0.1353   +0.1505   +0.1449   +0.1229   +0.1677   +0.1459   +0.1328   
++0.1290   +0.1712   +0.1416   +0.1200   +0.1637   +0.1414   +0.1331   
++0.1337   +0.1525   +0.1464   +0.1224   +0.1669   +0.1447   +0.1334   
++0.1341   +0.1527   +0.1447   +0.1229   +0.1672   +0.1450   +0.1334   
++0.1342   +0.1528   +0.1447   +0.1226   +0.1673   +0.1450   +0.1334   
++0.1346   +0.1523   +0.1447   +0.1227   +0.1673   +0.1456   +0.1328   
++0.1328   +0.1553   +0.1445   +0.1223   +0.1667   +0.1438   +0.1346   
+
+
+[0] CLV 5: [ {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00003,0.00003,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00070,0.00075,0.00000,0.00000,0.00000,0.00000),(0.00005,0.00757,0.00790,0.00013,0.00015,0.00016,0.00024),(0.00639,0.04071,0.03185,0.00926,0.00964,0.00974,0.01272)} {(1.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.99999,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.99920,0.0 [...]
+[0] CLV 6: [ {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00011,0.00002,0.00009,0.00000,0.00001,0.00001,0.00000),(0.00337,0.00173,0.00236,0.00147,0.00168,0.00192,0.00118)} {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00013,0.0 [...]
+[0] CLV 7: [ {(0.0000,0.0000,1.0000,0.0000,0.0000,0.0000,0.0000),(0.0000,0.0000,1.0000,0.0000,0.0000,0.0000,0.0000),(0.0000,0.0000,0.9994,0.0000,0.0000,0.0000,0.0000),(0.0000,0.0000,0.9857,0.0000,0.0000,0.0000,0.0000),(0.0002,0.0001,0.8460,0.0002,0.0002,0.0002,0.0003),(0.0110,0.0058,0.1497,0.0117,0.0121,0.0123,0.0129)} {(0.0000,0.0000,0.0000,0.0000,0.0000,1.0000,0.0000),(0.0000,0.0000,0.0000,0.0000,0.0000,1.0000,0.0000),(0.0000,0.0000,0.0000,0.0000,0.0000,0.9992,0.0000),(0.0000,0.0000,0. [...]
+
+
+ TEST alpha(ncats) =   1.25( 6), mode = MEAN
+
+Rates:  0.13643  0.36988  0.63230  0.96404 
+        1.44749  2.44987 
+[1] P-matrix for branch length 0.100000
++0.9832   +0.0006   +0.0021   +0.0027   +0.0049   +0.0053   +0.0011   
++0.0005   +0.9916   +0.0013   +0.0012   +0.0017   +0.0016   +0.0021   
++0.0020   +0.0014   +0.9867   +0.0020   +0.0028   +0.0026   +0.0025   
++0.0030   +0.0015   +0.0024   +0.9827   +0.0038   +0.0034   +0.0033   
++0.0039   +0.0016   +0.0025   +0.0028   +0.9821   +0.0036   +0.0034   
++0.0049   +0.0017   +0.0026   +0.0029   +0.0042   +0.9827   +0.0010   
++0.0011   +0.0024   +0.0027   +0.0030   +0.0043   +0.0011   +0.9854   
+
++0.9552   +0.0016   +0.0058   +0.0072   +0.0131   +0.0141   +0.0030   
++0.0014   +0.9774   +0.0035   +0.0032   +0.0047   +0.0043   +0.0056   
++0.0053   +0.0037   +0.9645   +0.0053   +0.0076   +0.0069   +0.0066   
++0.0079   +0.0041   +0.0063   +0.9538   +0.0102   +0.0091   +0.0087   
++0.0105   +0.0044   +0.0066   +0.0075   +0.9523   +0.0097   +0.0092   
++0.0130   +0.0046   +0.0069   +0.0077   +0.0111   +0.9539   +0.0027   
++0.0030   +0.0065   +0.0071   +0.0079   +0.0114   +0.0030   +0.9610   
+
++0.9249   +0.0028   +0.0097   +0.0121   +0.0218   +0.0235   +0.0051   
++0.0024   +0.9617   +0.0059   +0.0054   +0.0079   +0.0073   +0.0094   
++0.0090   +0.0064   +0.9403   +0.0090   +0.0128   +0.0115   +0.0111   
++0.0132   +0.0069   +0.0106   +0.9225   +0.0170   +0.0152   +0.0145   
++0.0174   +0.0074   +0.0111   +0.0125   +0.9202   +0.0161   +0.0153   
++0.0217   +0.0078   +0.0115   +0.0129   +0.0186   +0.9227   +0.0047   
++0.0051   +0.0109   +0.0120   +0.0133   +0.0191   +0.0051   +0.9345   
+
++0.8883   +0.0044   +0.0146   +0.0181   +0.0322   +0.0347   +0.0078   
++0.0038   +0.9424   +0.0089   +0.0081   +0.0119   +0.0109   +0.0140   
++0.0135   +0.0096   +0.9106   +0.0135   +0.0191   +0.0172   +0.0165   
++0.0197   +0.0104   +0.0159   +0.8847   +0.0253   +0.0226   +0.0215   
++0.0258   +0.0111   +0.0166   +0.0186   +0.8815   +0.0239   +0.0226   
++0.0320   +0.0117   +0.0172   +0.0191   +0.0276   +0.8851   +0.0072   
++0.0078   +0.0163   +0.0179   +0.0197   +0.0283   +0.0078   +0.9022   
+
++0.8381   +0.0068   +0.0214   +0.0262   +0.0463   +0.0496   +0.0118   
++0.0058   +0.9150   +0.0132   +0.0120   +0.0175   +0.0160   +0.0205   
++0.0197   +0.0142   +0.8694   +0.0197   +0.0279   +0.0251   +0.0241   
++0.0285   +0.0153   +0.0232   +0.8327   +0.0366   +0.0326   +0.0310   
++0.0370   +0.0163   +0.0242   +0.0269   +0.8286   +0.0345   +0.0325   
++0.0458   +0.0172   +0.0251   +0.0276   +0.0398   +0.8336   +0.0109   
++0.0118   +0.0239   +0.0261   +0.0284   +0.0407   +0.0118   +0.8574   
+
++0.7448   +0.0121   +0.0345   +0.0412   +0.0715   +0.0761   +0.0199   
++0.0103   +0.8613   +0.0217   +0.0197   +0.0284   +0.0258   +0.0328   
++0.0318   +0.0234   +0.7909   +0.0315   +0.0445   +0.0398   +0.0382   
++0.0449   +0.0251   +0.0372   +0.7361   +0.0574   +0.0510   +0.0483   
++0.0572   +0.0265   +0.0385   +0.0421   +0.7314   +0.0538   +0.0505   
++0.0702   +0.0277   +0.0398   +0.0432   +0.0620   +0.7383   +0.0187   
++0.0199   +0.0382   +0.0414   +0.0443   +0.0631   +0.0202   +0.7730   
+
+
+[1] P-matrix for branch length 0.200000
++0.9667   +0.0012   +0.0043   +0.0054   +0.0097   +0.0105   +0.0022   
++0.0010   +0.9833   +0.0026   +0.0024   +0.0035   +0.0032   +0.0041   
++0.0039   +0.0028   +0.9737   +0.0040   +0.0056   +0.0051   +0.0049   
++0.0059   +0.0030   +0.0047   +0.9657   +0.0076   +0.0068   +0.0064   
++0.0078   +0.0032   +0.0049   +0.0056   +0.9646   +0.0072   +0.0068   
++0.0097   +0.0034   +0.0051   +0.0057   +0.0083   +0.9657   +0.0020   
++0.0022   +0.0048   +0.0053   +0.0059   +0.0085   +0.0022   +0.9711   
+
++0.9128   +0.0033   +0.0113   +0.0141   +0.0252   +0.0272   +0.0060   
++0.0029   +0.9554   +0.0069   +0.0063   +0.0092   +0.0085   +0.0109   
++0.0104   +0.0074   +0.9305   +0.0105   +0.0149   +0.0134   +0.0129   
++0.0154   +0.0080   +0.0124   +0.9101   +0.0198   +0.0177   +0.0168   
++0.0202   +0.0086   +0.0129   +0.0145   +0.9074   +0.0187   +0.0177   
++0.0251   +0.0091   +0.0134   +0.0149   +0.0216   +0.9103   +0.0055   
++0.0060   +0.0127   +0.0140   +0.0154   +0.0221   +0.0060   +0.9239   
+
++0.8566   +0.0059   +0.0188   +0.0232   +0.0411   +0.0441   +0.0103   
++0.0050   +0.9253   +0.0116   +0.0106   +0.0154   +0.0141   +0.0181   
++0.0174   +0.0125   +0.8847   +0.0174   +0.0246   +0.0222   +0.0213   
++0.0253   +0.0135   +0.0205   +0.8519   +0.0325   +0.0289   +0.0275   
++0.0329   +0.0144   +0.0213   +0.0238   +0.8481   +0.0306   +0.0289   
++0.0407   +0.0152   +0.0222   +0.0245   +0.0353   +0.8527   +0.0095   
++0.0103   +0.0211   +0.0230   +0.0252   +0.0361   +0.0103   +0.8740   
+
++0.7916   +0.0093   +0.0278   +0.0337   +0.0590   +0.0630   +0.0157   
++0.0080   +0.8888   +0.0173   +0.0158   +0.0228   +0.0208   +0.0265   
++0.0257   +0.0187   +0.8306   +0.0255   +0.0361   +0.0324   +0.0311   
++0.0367   +0.0201   +0.0301   +0.7846   +0.0470   +0.0418   +0.0396   
++0.0472   +0.0213   +0.0313   +0.0345   +0.7800   +0.0442   +0.0415   
++0.0581   +0.0224   +0.0324   +0.0354   +0.0510   +0.7861   +0.0146   
++0.0157   +0.0310   +0.0337   +0.0363   +0.0519   +0.0158   +0.8156   
+
++0.7077   +0.0145   +0.0399   +0.0472   +0.0812   +0.0861   +0.0235   
++0.0124   +0.8387   +0.0253   +0.0229   +0.0330   +0.0298   +0.0378   
++0.0368   +0.0273   +0.7588   +0.0363   +0.0512   +0.0458   +0.0439   
++0.0514   +0.0292   +0.0429   +0.6976   +0.0656   +0.0582   +0.0551   
++0.0650   +0.0308   +0.0444   +0.0481   +0.6930   +0.0613   +0.0574   
++0.0795   +0.0321   +0.0458   +0.0493   +0.0707   +0.7005   +0.0221   
++0.0235   +0.0441   +0.0475   +0.0505   +0.0718   +0.0240   +0.7388   
+
++0.5677   +0.0260   +0.0613   +0.0695   +0.1158   +0.1209   +0.0389   
++0.0223   +0.7457   +0.0404   +0.0363   +0.0518   +0.0461   +0.0575   
++0.0566   +0.0435   +0.6331   +0.0551   +0.0773   +0.0687   +0.0656   
++0.0758   +0.0462   +0.0651   +0.5521   +0.0961   +0.0848   +0.0798   
++0.0926   +0.0483   +0.0670   +0.0704   +0.5504   +0.0888   +0.0824   
++0.1116   +0.0496   +0.0687   +0.0718   +0.1024   +0.5587   +0.0373   
++0.0389   +0.0670   +0.0711   +0.0732   +0.1030   +0.0404   +0.6064   
+
+
+[1] P-matrix for branch length 1.000000
++0.8465   +0.0064   +0.0202   +0.0248   +0.0439   +0.0471   +0.0111   
++0.0055   +0.9197   +0.0125   +0.0114   +0.0165   +0.0151   +0.0194   
++0.0187   +0.0134   +0.8763   +0.0186   +0.0264   +0.0237   +0.0228   
++0.0271   +0.0145   +0.0220   +0.8414   +0.0347   +0.0309   +0.0294   
++0.0351   +0.0154   +0.0229   +0.0255   +0.8374   +0.0327   +0.0309   
++0.0435   +0.0163   +0.0237   +0.0262   +0.0378   +0.8422   +0.0103   
++0.0111   +0.0226   +0.0247   +0.0269   +0.0386   +0.0111   +0.8649   
+
++0.6465   +0.0190   +0.0490   +0.0570   +0.0967   +0.1020   +0.0298   
++0.0163   +0.7997   +0.0316   +0.0285   +0.0409   +0.0367   +0.0462   
++0.0452   +0.0340   +0.7049   +0.0444   +0.0625   +0.0557   +0.0533   
++0.0621   +0.0363   +0.0524   +0.6341   +0.0790   +0.0700   +0.0661   
++0.0774   +0.0382   +0.0541   +0.0580   +0.6302   +0.0735   +0.0686   
++0.0941   +0.0395   +0.0557   +0.0592   +0.0848   +0.6384   +0.0283   
++0.0298   +0.0539   +0.0577   +0.0606   +0.0857   +0.0306   +0.6816   
+
++0.4905   +0.0343   +0.0741   +0.0816   +0.1330   +0.1373   +0.0491   
++0.0294   +0.6875   +0.0501   +0.0447   +0.0634   +0.0559   +0.0689   
++0.0684   +0.0539   +0.5599   +0.0660   +0.0923   +0.0817   +0.0778   
++0.0890   +0.0569   +0.0780   +0.4720   +0.1123   +0.0989   +0.0928   
++0.1064   +0.0592   +0.0800   +0.0824   +0.4737   +0.1031   +0.0952   
++0.1268   +0.0602   +0.0817   +0.0837   +0.1190   +0.4813   +0.0474   
++0.0491   +0.0804   +0.0843   +0.0851   +0.1190   +0.0514   +0.5307   
+
++0.3620   +0.0533   +0.0971   +0.1011   +0.1578   +0.1587   +0.0699   
++0.0457   +0.5735   +0.0694   +0.0614   +0.0860   +0.0748   +0.0893   
++0.0897   +0.0747   +0.4293   +0.0853   +0.1184   +0.1040   +0.0986   
++0.1103   +0.0781   +0.1008   +0.3390   +0.1381   +0.1210   +0.1128   
++0.1262   +0.0803   +0.1026   +0.1013   +0.3501   +0.1250   +0.1144   
++0.1465   +0.0805   +0.1040   +0.1023   +0.1443   +0.3540   +0.0684   
++0.0699   +0.1042   +0.1068   +0.1034   +0.1430   +0.0741   +0.3987   
+
++0.2559   +0.0780   +0.1187   +0.1158   +0.1721   +0.1669   +0.0927   
++0.0668   +0.4499   +0.0909   +0.0795   +0.1102   +0.0947   +0.1080   
++0.1095   +0.0979   +0.3092   +0.1025   +0.1414   +0.1234   +0.1160   
++0.1263   +0.1011   +0.1212   +0.2309   +0.1570   +0.1369   +0.1266   
++0.1377   +0.1028   +0.1225   +0.1152   +0.2546   +0.1400   +0.1271   
++0.1541   +0.1020   +0.1234   +0.1158   +0.1616   +0.2515   +0.0916   
++0.0927   +0.1260   +0.1257   +0.1161   +0.1589   +0.0992   +0.2814   
+
++0.1706   +0.1142   +0.1382   +0.1242   +0.1746   +0.1599   +0.1183   
++0.0979   +0.2983   +0.1182   +0.1016   +0.1394   +0.1193   +0.1253   
++0.1276   +0.1272   +0.1979   +0.1174   +0.1607   +0.1395   +0.1295   
++0.1355   +0.1294   +0.1388   +0.1491   +0.1678   +0.1457   +0.1337   
++0.1397   +0.1301   +0.1393   +0.1231   +0.1874   +0.1471   +0.1333   
++0.1476   +0.1284   +0.1395   +0.1233   +0.1697   +0.1735   +0.1179   
++0.1183   +0.1461   +0.1403   +0.1226   +0.1667   +0.1278   +0.1783   
+
+
+[1] P-matrix for branch length 1.000000
++0.8465   +0.0064   +0.0202   +0.0248   +0.0439   +0.0471   +0.0111   
++0.0055   +0.9197   +0.0125   +0.0114   +0.0165   +0.0151   +0.0194   
++0.0187   +0.0134   +0.8763   +0.0186   +0.0264   +0.0237   +0.0228   
++0.0271   +0.0145   +0.0220   +0.8414   +0.0347   +0.0309   +0.0294   
++0.0351   +0.0154   +0.0229   +0.0255   +0.8374   +0.0327   +0.0309   
++0.0435   +0.0163   +0.0237   +0.0262   +0.0378   +0.8422   +0.0103   
++0.0111   +0.0226   +0.0247   +0.0269   +0.0386   +0.0111   +0.8649   
+
++0.6465   +0.0190   +0.0490   +0.0570   +0.0967   +0.1020   +0.0298   
++0.0163   +0.7997   +0.0316   +0.0285   +0.0409   +0.0367   +0.0462   
++0.0452   +0.0340   +0.7049   +0.0444   +0.0625   +0.0557   +0.0533   
++0.0621   +0.0363   +0.0524   +0.6341   +0.0790   +0.0700   +0.0661   
++0.0774   +0.0382   +0.0541   +0.0580   +0.6302   +0.0735   +0.0686   
++0.0941   +0.0395   +0.0557   +0.0592   +0.0848   +0.6384   +0.0283   
++0.0298   +0.0539   +0.0577   +0.0606   +0.0857   +0.0306   +0.6816   
+
++0.4905   +0.0343   +0.0741   +0.0816   +0.1330   +0.1373   +0.0491   
++0.0294   +0.6875   +0.0501   +0.0447   +0.0634   +0.0559   +0.0689   
++0.0684   +0.0539   +0.5599   +0.0660   +0.0923   +0.0817   +0.0778   
++0.0890   +0.0569   +0.0780   +0.4720   +0.1123   +0.0989   +0.0928   
++0.1064   +0.0592   +0.0800   +0.0824   +0.4737   +0.1031   +0.0952   
++0.1268   +0.0602   +0.0817   +0.0837   +0.1190   +0.4813   +0.0474   
++0.0491   +0.0804   +0.0843   +0.0851   +0.1190   +0.0514   +0.5307   
+
++0.3620   +0.0533   +0.0971   +0.1011   +0.1578   +0.1587   +0.0699   
++0.0457   +0.5735   +0.0694   +0.0614   +0.0860   +0.0748   +0.0893   
++0.0897   +0.0747   +0.4293   +0.0853   +0.1184   +0.1040   +0.0986   
++0.1103   +0.0781   +0.1008   +0.3390   +0.1381   +0.1210   +0.1128   
++0.1262   +0.0803   +0.1026   +0.1013   +0.3501   +0.1250   +0.1144   
++0.1465   +0.0805   +0.1040   +0.1023   +0.1443   +0.3540   +0.0684   
++0.0699   +0.1042   +0.1068   +0.1034   +0.1430   +0.0741   +0.3987   
+
++0.2559   +0.0780   +0.1187   +0.1158   +0.1721   +0.1669   +0.0927   
++0.0668   +0.4499   +0.0909   +0.0795   +0.1102   +0.0947   +0.1080   
++0.1095   +0.0979   +0.3092   +0.1025   +0.1414   +0.1234   +0.1160   
++0.1263   +0.1011   +0.1212   +0.2309   +0.1570   +0.1369   +0.1266   
++0.1377   +0.1028   +0.1225   +0.1152   +0.2546   +0.1400   +0.1271   
++0.1541   +0.1020   +0.1234   +0.1158   +0.1616   +0.2515   +0.0916   
++0.0927   +0.1260   +0.1257   +0.1161   +0.1589   +0.0992   +0.2814   
+
++0.1706   +0.1142   +0.1382   +0.1242   +0.1746   +0.1599   +0.1183   
++0.0979   +0.2983   +0.1182   +0.1016   +0.1394   +0.1193   +0.1253   
++0.1276   +0.1272   +0.1979   +0.1174   +0.1607   +0.1395   +0.1295   
++0.1355   +0.1294   +0.1388   +0.1491   +0.1678   +0.1457   +0.1337   
++0.1397   +0.1301   +0.1393   +0.1231   +0.1874   +0.1471   +0.1333   
++0.1476   +0.1284   +0.1395   +0.1233   +0.1697   +0.1735   +0.1179   
++0.1183   +0.1461   +0.1403   +0.1226   +0.1667   +0.1278   +0.1783   
+
+
+[1] CLV 5: [ {(0.00001,0.00253,0.00270,0.00001,0.00002,0.00002,0.00003),(0.00004,0.00658,0.00690,0.00010,0.00011,0.00012,0.00018),(0.00011,0.01073,0.01105,0.00028,0.00031,0.00034,0.00049),(0.00026,0.01541,0.01551,0.00060,0.00067,0.00073,0.00104),(0.00058,0.02124,0.02069,0.00125,0.00137,0.00147,0.00209),(0.00159,0.03015,0.02757,0.00301,0.00324,0.00341,0.00476)} {(0.93455,0.00000,0.00002,0.00003,0.00006,0.00009,0.00000),(0.83329,0.00001,0.00011,0.00024,0.00041,0.00063,0.00004),(0.73383,0.0 [...]
+[1] CLV 6: [ {(0.00001,0.00000,0.00001,0.00000,0.00000,0.00000,0.00000),(0.00008,0.00002,0.00007,0.00000,0.00000,0.00000,0.00000),(0.00022,0.00005,0.00018,0.00001,0.00002,0.00002,0.00001),(0.00047,0.00012,0.00037,0.00004,0.00005,0.00007,0.00002),(0.00090,0.00025,0.00068,0.00010,0.00014,0.00018,0.00007),(0.00182,0.00060,0.00131,0.00035,0.00045,0.00056,0.00025)} {(0.00966,0.00000,0.00001,0.00002,0.00003,0.00453,0.00000),(0.02165,0.00001,0.00006,0.00012,0.00017,0.01044,0.00002),(0.02994,0.0 [...]
+[1] CLV 7: [ {(0.0000,0.0000,0.9481,0.0000,0.0000,0.0000,0.0000),(0.0001,0.0000,0.8659,0.0002,0.0002,0.0002,0.0002),(0.0004,0.0001,0.7827,0.0004,0.0005,0.0005,0.0005),(0.0008,0.0003,0.6899,0.0009,0.0010,0.0010,0.0011),(0.0016,0.0006,0.5758,0.0018,0.0020,0.0021,0.0023),(0.0038,0.0016,0.4009,0.0042,0.0045,0.0047,0.0051)} {(0.0001,0.0000,0.0000,0.0000,0.0001,0.9326,0.0000),(0.0007,0.0001,0.0002,0.0003,0.0004,0.8287,0.0000),(0.0019,0.0002,0.0005,0.0008,0.0009,0.7270,0.0001),(0.0040,0.0004,0. [...]
+
+
+ TEST alpha(ncats) =   1.25( 6), mode = MEDIAN
+
+Rates:  0.12797  0.35383  0.60548  0.92469 
+        1.39616  2.59187 
+[1] P-matrix for branch length 0.100000
++0.9842   +0.0006   +0.0020   +0.0026   +0.0046   +0.0050   +0.0010   
++0.0005   +0.9921   +0.0012   +0.0011   +0.0016   +0.0015   +0.0020   
++0.0019   +0.0013   +0.9876   +0.0019   +0.0027   +0.0024   +0.0023   
++0.0028   +0.0014   +0.0022   +0.9837   +0.0036   +0.0032   +0.0031   
++0.0037   +0.0015   +0.0023   +0.0026   +0.9832   +0.0034   +0.0032   
++0.0046   +0.0016   +0.0024   +0.0027   +0.0039   +0.9837   +0.0009   
++0.0010   +0.0023   +0.0025   +0.0028   +0.0040   +0.0010   +0.9863   
+
++0.9571   +0.0016   +0.0055   +0.0069   +0.0125   +0.0135   +0.0029   
++0.0013   +0.9784   +0.0033   +0.0030   +0.0045   +0.0041   +0.0053   
++0.0051   +0.0036   +0.9660   +0.0051   +0.0073   +0.0066   +0.0063   
++0.0076   +0.0039   +0.0060   +0.9558   +0.0098   +0.0087   +0.0083   
++0.0100   +0.0042   +0.0063   +0.0072   +0.9543   +0.0092   +0.0088   
++0.0125   +0.0044   +0.0066   +0.0074   +0.0107   +0.9558   +0.0026   
++0.0029   +0.0062   +0.0068   +0.0076   +0.0110   +0.0028   +0.9627   
+
++0.9280   +0.0027   +0.0093   +0.0116   +0.0209   +0.0226   +0.0049   
++0.0023   +0.9633   +0.0057   +0.0052   +0.0076   +0.0070   +0.0090   
++0.0086   +0.0061   +0.9427   +0.0086   +0.0123   +0.0111   +0.0106   
++0.0127   +0.0066   +0.0102   +0.9257   +0.0164   +0.0146   +0.0139   
++0.0167   +0.0071   +0.0106   +0.0120   +0.9234   +0.0155   +0.0147   
++0.0208   +0.0075   +0.0111   +0.0124   +0.0179   +0.9259   +0.0045   
++0.0049   +0.0105   +0.0115   +0.0127   +0.0183   +0.0049   +0.9372   
+
++0.8925   +0.0042   +0.0140   +0.0174   +0.0310   +0.0334   +0.0075   
++0.0036   +0.9447   +0.0086   +0.0078   +0.0114   +0.0105   +0.0135   
++0.0129   +0.0092   +0.9141   +0.0129   +0.0184   +0.0166   +0.0159   
++0.0189   +0.0099   +0.0153   +0.8891   +0.0244   +0.0217   +0.0206   
++0.0248   +0.0106   +0.0159   +0.0179   +0.8860   +0.0230   +0.0218   
++0.0308   +0.0113   +0.0166   +0.0184   +0.0266   +0.8895   +0.0069   
++0.0075   +0.0157   +0.0172   +0.0189   +0.0272   +0.0075   +0.9059   
+
++0.8432   +0.0065   +0.0207   +0.0253   +0.0448   +0.0481   +0.0113   
++0.0056   +0.9179   +0.0128   +0.0116   +0.0169   +0.0155   +0.0198   
++0.0191   +0.0137   +0.8737   +0.0190   +0.0270   +0.0243   +0.0233   
++0.0276   +0.0148   +0.0225   +0.8381   +0.0355   +0.0316   +0.0300   
++0.0359   +0.0158   +0.0234   +0.0260   +0.8340   +0.0334   +0.0315   
++0.0444   +0.0166   +0.0243   +0.0267   +0.0386   +0.8389   +0.0105   
++0.0113   +0.0231   +0.0252   +0.0275   +0.0394   +0.0114   +0.8620   
+
++0.7327   +0.0128   +0.0362   +0.0431   +0.0747   +0.0794   +0.0210   
++0.0110   +0.8540   +0.0229   +0.0207   +0.0299   +0.0271   +0.0344   
++0.0334   +0.0246   +0.7805   +0.0330   +0.0467   +0.0418   +0.0400   
++0.0471   +0.0264   +0.0390   +0.7235   +0.0601   +0.0534   +0.0505   
++0.0597   +0.0279   +0.0404   +0.0441   +0.7188   +0.0562   +0.0527   
++0.0733   +0.0292   +0.0418   +0.0452   +0.0649   +0.7260   +0.0198   
++0.0210   +0.0401   +0.0434   +0.0463   +0.0659   +0.0214   +0.7618   
+
+
+[1] P-matrix for branch length 0.200000
++0.9687   +0.0011   +0.0040   +0.0051   +0.0091   +0.0099   +0.0021   
++0.0010   +0.9843   +0.0024   +0.0022   +0.0032   +0.0030   +0.0039   
++0.0037   +0.0026   +0.9753   +0.0037   +0.0053   +0.0048   +0.0046   
++0.0055   +0.0028   +0.0044   +0.9678   +0.0071   +0.0064   +0.0060   
++0.0073   +0.0030   +0.0046   +0.0052   +0.9667   +0.0067   +0.0064   
++0.0091   +0.0032   +0.0048   +0.0054   +0.0078   +0.9678   +0.0019   
++0.0021   +0.0045   +0.0050   +0.0055   +0.0080   +0.0020   +0.9728   
+
++0.9164   +0.0032   +0.0108   +0.0135   +0.0242   +0.0261   +0.0057   
++0.0027   +0.9573   +0.0066   +0.0060   +0.0088   +0.0081   +0.0104   
++0.0100   +0.0071   +0.9334   +0.0100   +0.0143   +0.0129   +0.0123   
++0.0147   +0.0077   +0.0118   +0.9138   +0.0190   +0.0169   +0.0161   
++0.0194   +0.0082   +0.0124   +0.0139   +0.9112   +0.0179   +0.0170   
++0.0241   +0.0087   +0.0129   +0.0143   +0.0207   +0.9140   +0.0053   
++0.0057   +0.0122   +0.0134   +0.0148   +0.0212   +0.0057   +0.9270   
+
++0.8622   +0.0056   +0.0181   +0.0223   +0.0395   +0.0425   +0.0098   
++0.0048   +0.9283   +0.0111   +0.0101   +0.0148   +0.0135   +0.0174   
++0.0167   +0.0120   +0.8893   +0.0167   +0.0237   +0.0213   +0.0204   
++0.0243   +0.0129   +0.0197   +0.8577   +0.0312   +0.0278   +0.0264   
++0.0316   +0.0138   +0.0205   +0.0229   +0.8540   +0.0294   +0.0278   
++0.0392   +0.0146   +0.0213   +0.0235   +0.0340   +0.8583   +0.0091   
++0.0098   +0.0203   +0.0221   +0.0242   +0.0347   +0.0099   +0.8790   
+
++0.7990   +0.0089   +0.0268   +0.0325   +0.0570   +0.0609   +0.0150   
++0.0076   +0.8930   +0.0167   +0.0152   +0.0220   +0.0200   +0.0256   
++0.0247   +0.0180   +0.8368   +0.0246   +0.0348   +0.0312   +0.0299   
++0.0354   +0.0193   +0.0290   +0.7923   +0.0454   +0.0404   +0.0383   
++0.0456   +0.0205   +0.0301   +0.0333   +0.7877   +0.0426   +0.0401   
++0.0562   +0.0216   +0.0312   +0.0342   +0.0492   +0.7937   +0.0140   
++0.0150   +0.0298   +0.0324   +0.0351   +0.0502   +0.0152   +0.8223   
+
++0.7160   +0.0139   +0.0386   +0.0458   +0.0790   +0.0839   +0.0226   
++0.0119   +0.8439   +0.0245   +0.0222   +0.0320   +0.0289   +0.0367   
++0.0357   +0.0264   +0.7661   +0.0352   +0.0497   +0.0444   +0.0426   
++0.0500   +0.0282   +0.0416   +0.7062   +0.0638   +0.0566   +0.0535   
++0.0632   +0.0298   +0.0431   +0.0468   +0.7016   +0.0596   +0.0559   
++0.0774   +0.0311   +0.0444   +0.0479   +0.0688   +0.7090   +0.0213   
++0.0226   +0.0428   +0.0461   +0.0491   +0.0698   +0.0231   +0.7465   
+
++0.5510   +0.0276   +0.0640   +0.0721   +0.1196   +0.1246   +0.0410   
++0.0237   +0.7336   +0.0424   +0.0381   +0.0542   +0.0481   +0.0599   
++0.0591   +0.0457   +0.6176   +0.0574   +0.0805   +0.0715   +0.0682   
++0.0787   +0.0484   +0.0679   +0.5348   +0.0996   +0.0879   +0.0827   
++0.0957   +0.0506   +0.0698   +0.0731   +0.5337   +0.0919   +0.0853   
++0.1150   +0.0518   +0.0715   +0.0744   +0.1061   +0.5419   +0.0393   
++0.0410   +0.0699   +0.0739   +0.0758   +0.1066   +0.0426   +0.5902   
+
+
+[1] P-matrix for branch length 1.000000
++0.8551   +0.0060   +0.0191   +0.0234   +0.0415   +0.0446   +0.0104   
++0.0051   +0.9244   +0.0117   +0.0107   +0.0156   +0.0142   +0.0183   
++0.0176   +0.0126   +0.8834   +0.0175   +0.0249   +0.0224   +0.0215   
++0.0255   +0.0136   +0.0207   +0.8503   +0.0328   +0.0292   +0.0277   
++0.0332   +0.0145   +0.0216   +0.0241   +0.8465   +0.0309   +0.0292   
++0.0411   +0.0153   +0.0224   +0.0247   +0.0357   +0.8511   +0.0096   
++0.0104   +0.0213   +0.0233   +0.0254   +0.0365   +0.0104   +0.8726   
+
++0.6582   +0.0181   +0.0472   +0.0551   +0.0938   +0.0990   +0.0285   
++0.0155   +0.8073   +0.0304   +0.0274   +0.0394   +0.0354   +0.0446   
++0.0436   +0.0327   +0.7153   +0.0428   +0.0603   +0.0538   +0.0515   
++0.0601   +0.0349   +0.0506   +0.6462   +0.0765   +0.0678   +0.0640   
++0.0751   +0.0367   +0.0523   +0.0561   +0.6421   +0.0712   +0.0665   
++0.0914   +0.0381   +0.0538   +0.0573   +0.0822   +0.6502   +0.0270   
++0.0285   +0.0520   +0.0558   +0.0587   +0.0831   +0.0293   +0.6926   
+
++0.5039   +0.0328   +0.0718   +0.0795   +0.1301   +0.1346   +0.0473   
++0.0281   +0.6980   +0.0483   +0.0432   +0.0613   +0.0542   +0.0669   
++0.0663   +0.0520   +0.5728   +0.0641   +0.0897   +0.0794   +0.0757   
++0.0868   +0.0550   +0.0757   +0.4859   +0.1096   +0.0965   +0.0906   
++0.1041   +0.0572   +0.0777   +0.0803   +0.4869   +0.1007   +0.0931   
++0.1243   +0.0583   +0.0794   +0.0816   +0.1162   +0.4946   +0.0455   
++0.0473   +0.0780   +0.0820   +0.0831   +0.1163   +0.0493   +0.5440   
+
++0.3743   +0.0511   +0.0948   +0.0993   +0.1557   +0.1571   +0.0677   
++0.0438   +0.5856   +0.0673   +0.0596   +0.0836   +0.0728   +0.0873   
++0.0875   +0.0725   +0.4424   +0.0833   +0.1158   +0.1019   +0.0966   
++0.1083   +0.0758   +0.0985   +0.3516   +0.1358   +0.1190   +0.1110   
++0.1246   +0.0780   +0.1004   +0.0996   +0.3616   +0.1231   +0.1127   
++0.1450   +0.0784   +0.1019   +0.1007   +0.1420   +0.3660   +0.0661   
++0.0677   +0.1018   +0.1046   +0.1017   +0.1409   +0.0716   +0.4116   
+
++0.2641   +0.0756   +0.1169   +0.1147   +0.1713   +0.1668   +0.0906   
++0.0648   +0.4611   +0.0889   +0.0778   +0.1080   +0.0929   +0.1065   
++0.1079   +0.0958   +0.3190   +0.1011   +0.1396   +0.1219   +0.1147   
++0.1252   +0.0990   +0.1195   +0.2391   +0.1557   +0.1358   +0.1257   
++0.1370   +0.1008   +0.1210   +0.1142   +0.2617   +0.1390   +0.1263   
++0.1539   +0.1000   +0.1219   +0.1149   +0.1604   +0.2593   +0.0895   
++0.0906   +0.1242   +0.1242   +0.1152   +0.1579   +0.0970   +0.2908   
+
++0.1652   +0.1179   +0.1395   +0.1244   +0.1742   +0.1585   +0.1203   
++0.1010   +0.2844   +0.1207   +0.1037   +0.1421   +0.1216   +0.1265   
++0.1287   +0.1300   +0.1901   +0.1184   +0.1619   +0.1405   +0.1303   
++0.1357   +0.1319   +0.1399   +0.1444   +0.1682   +0.1459   +0.1339   
++0.1393   +0.1326   +0.1404   +0.1233   +0.1837   +0.1472   +0.1335   
++0.1463   +0.1309   +0.1405   +0.1235   +0.1698   +0.1689   +0.1200   
++0.1203   +0.1476   +0.1412   +0.1227   +0.1669   +0.1300   +0.1714   
+
+
+[1] P-matrix for branch length 1.000000
++0.8551   +0.0060   +0.0191   +0.0234   +0.0415   +0.0446   +0.0104   
++0.0051   +0.9244   +0.0117   +0.0107   +0.0156   +0.0142   +0.0183   
++0.0176   +0.0126   +0.8834   +0.0175   +0.0249   +0.0224   +0.0215   
++0.0255   +0.0136   +0.0207   +0.8503   +0.0328   +0.0292   +0.0277   
++0.0332   +0.0145   +0.0216   +0.0241   +0.8465   +0.0309   +0.0292   
++0.0411   +0.0153   +0.0224   +0.0247   +0.0357   +0.8511   +0.0096   
++0.0104   +0.0213   +0.0233   +0.0254   +0.0365   +0.0104   +0.8726   
+
++0.6582   +0.0181   +0.0472   +0.0551   +0.0938   +0.0990   +0.0285   
++0.0155   +0.8073   +0.0304   +0.0274   +0.0394   +0.0354   +0.0446   
++0.0436   +0.0327   +0.7153   +0.0428   +0.0603   +0.0538   +0.0515   
++0.0601   +0.0349   +0.0506   +0.6462   +0.0765   +0.0678   +0.0640   
++0.0751   +0.0367   +0.0523   +0.0561   +0.6421   +0.0712   +0.0665   
++0.0914   +0.0381   +0.0538   +0.0573   +0.0822   +0.6502   +0.0270   
++0.0285   +0.0520   +0.0558   +0.0587   +0.0831   +0.0293   +0.6926   
+
++0.5039   +0.0328   +0.0718   +0.0795   +0.1301   +0.1346   +0.0473   
++0.0281   +0.6980   +0.0483   +0.0432   +0.0613   +0.0542   +0.0669   
++0.0663   +0.0520   +0.5728   +0.0641   +0.0897   +0.0794   +0.0757   
++0.0868   +0.0550   +0.0757   +0.4859   +0.1096   +0.0965   +0.0906   
++0.1041   +0.0572   +0.0777   +0.0803   +0.4869   +0.1007   +0.0931   
++0.1243   +0.0583   +0.0794   +0.0816   +0.1162   +0.4946   +0.0455   
++0.0473   +0.0780   +0.0820   +0.0831   +0.1163   +0.0493   +0.5440   
+
++0.3743   +0.0511   +0.0948   +0.0993   +0.1557   +0.1571   +0.0677   
++0.0438   +0.5856   +0.0673   +0.0596   +0.0836   +0.0728   +0.0873   
++0.0875   +0.0725   +0.4424   +0.0833   +0.1158   +0.1019   +0.0966   
++0.1083   +0.0758   +0.0985   +0.3516   +0.1358   +0.1190   +0.1110   
++0.1246   +0.0780   +0.1004   +0.0996   +0.3616   +0.1231   +0.1127   
++0.1450   +0.0784   +0.1019   +0.1007   +0.1420   +0.3660   +0.0661   
++0.0677   +0.1018   +0.1046   +0.1017   +0.1409   +0.0716   +0.4116   
+
++0.2641   +0.0756   +0.1169   +0.1147   +0.1713   +0.1668   +0.0906   
++0.0648   +0.4611   +0.0889   +0.0778   +0.1080   +0.0929   +0.1065   
++0.1079   +0.0958   +0.3190   +0.1011   +0.1396   +0.1219   +0.1147   
++0.1252   +0.0990   +0.1195   +0.2391   +0.1557   +0.1358   +0.1257   
++0.1370   +0.1008   +0.1210   +0.1142   +0.2617   +0.1390   +0.1263   
++0.1539   +0.1000   +0.1219   +0.1149   +0.1604   +0.2593   +0.0895   
++0.0906   +0.1242   +0.1242   +0.1152   +0.1579   +0.0970   +0.2908   
+
++0.1652   +0.1179   +0.1395   +0.1244   +0.1742   +0.1585   +0.1203   
++0.1010   +0.2844   +0.1207   +0.1037   +0.1421   +0.1216   +0.1265   
++0.1287   +0.1300   +0.1901   +0.1184   +0.1619   +0.1405   +0.1303   
++0.1357   +0.1319   +0.1399   +0.1444   +0.1682   +0.1459   +0.1339   
++0.1393   +0.1326   +0.1404   +0.1233   +0.1837   +0.1472   +0.1335   
++0.1463   +0.1309   +0.1405   +0.1235   +0.1698   +0.1689   +0.1200   
++0.1203   +0.1476   +0.1412   +0.1227   +0.1669   +0.1300   +0.1714   
+
+
+[1] CLV 5: [ {(0.00000,0.00238,0.00254,0.00001,0.00001,0.00002,0.00002),(0.00003,0.00631,0.00663,0.00009,0.00010,0.00011,0.00016),(0.00010,0.01032,0.01065,0.00025,0.00028,0.00031,0.00045),(0.00024,0.01489,0.01503,0.00056,0.00062,0.00067,0.00097),(0.00054,0.02067,0.02021,0.00117,0.00129,0.00138,0.00197),(0.00177,0.03112,0.02821,0.00329,0.00353,0.00370,0.00517)} {(0.93846,0.00000,0.00001,0.00003,0.00005,0.00008,0.00000),(0.83985,0.00001,0.00010,0.00022,0.00038,0.00058,0.00003),(0.74336,0.0 [...]
+[1] CLV 6: [ {(0.00001,0.00000,0.00001,0.00000,0.00000,0.00000,0.00000),(0.00008,0.00002,0.00006,0.00000,0.00000,0.00000,0.00000),(0.00021,0.00005,0.00017,0.00001,0.00001,0.00002,0.00001),(0.00043,0.00011,0.00034,0.00003,0.00005,0.00006,0.00002),(0.00085,0.00023,0.00065,0.00010,0.00013,0.00016,0.00006),(0.00194,0.00066,0.00139,0.00040,0.00051,0.00062,0.00028)} {(0.00913,0.00000,0.00001,0.00002,0.00002,0.00428,0.00000),(0.02098,0.00001,0.00006,0.00011,0.00016,0.01010,0.00001),(0.02930,0.0 [...]
+[1] CLV 7: [ {(0.0000,0.0000,0.9512,0.0000,0.0000,0.0000,0.0000),(0.0001,0.0000,0.8713,0.0001,0.0002,0.0002,0.0002),(0.0003,0.0001,0.7908,0.0004,0.0004,0.0005,0.0005),(0.0007,0.0003,0.7003,0.0008,0.0009,0.0010,0.0011),(0.0015,0.0006,0.5869,0.0017,0.0019,0.0020,0.0021),(0.0041,0.0018,0.3814,0.0046,0.0049,0.0051,0.0055)} {(0.0001,0.0000,0.0000,0.0000,0.0000,0.9367,0.0000),(0.0007,0.0001,0.0002,0.0003,0.0003,0.8354,0.0000),(0.0018,0.0002,0.0005,0.0008,0.0009,0.7367,0.0001),(0.0037,0.0004,0. [...]
+
+
+ TEST alpha(ncats) = 100.00( 6), mode = MEAN
+
+Rates:  0.86550  0.93147  0.97645  1.01848 
+        1.06621  1.14189 
+[2] P-matrix for branch length 0.100000
++0.8990   +0.0039   +0.0132   +0.0163   +0.0292   +0.0314   +0.0070   
++0.0034   +0.9481   +0.0080   +0.0073   +0.0107   +0.0098   +0.0127   
++0.0121   +0.0086   +0.9193   +0.0122   +0.0173   +0.0156   +0.0149   
++0.0178   +0.0093   +0.0144   +0.8957   +0.0229   +0.0204   +0.0194   
++0.0233   +0.0100   +0.0150   +0.0168   +0.8928   +0.0217   +0.0205   
++0.0290   +0.0106   +0.0156   +0.0173   +0.0250   +0.8961   +0.0065   
++0.0070   +0.0148   +0.0162   +0.0178   +0.0256   +0.0070   +0.9116   
+
++0.8918   +0.0042   +0.0141   +0.0175   +0.0312   +0.0336   +0.0076   
++0.0036   +0.9443   +0.0086   +0.0079   +0.0115   +0.0106   +0.0136   
++0.0130   +0.0093   +0.9135   +0.0130   +0.0185   +0.0167   +0.0160   
++0.0191   +0.0100   +0.0154   +0.8883   +0.0245   +0.0219   +0.0208   
++0.0250   +0.0107   +0.0160   +0.0180   +0.8852   +0.0232   +0.0219   
++0.0310   +0.0114   +0.0167   +0.0185   +0.0267   +0.8887   +0.0070   
++0.0076   +0.0158   +0.0173   +0.0191   +0.0274   +0.0075   +0.9053   
+
++0.8870   +0.0045   +0.0148   +0.0183   +0.0326   +0.0351   +0.0079   
++0.0038   +0.9417   +0.0090   +0.0082   +0.0120   +0.0110   +0.0142   
++0.0136   +0.0097   +0.9095   +0.0136   +0.0194   +0.0174   +0.0167   
++0.0199   +0.0105   +0.0161   +0.8833   +0.0256   +0.0229   +0.0217   
++0.0261   +0.0112   +0.0168   +0.0188   +0.8801   +0.0242   +0.0229   
++0.0324   +0.0119   +0.0174   +0.0193   +0.0279   +0.8837   +0.0073   
++0.0079   +0.0165   +0.0181   +0.0199   +0.0286   +0.0079   +0.9010   
+
++0.8824   +0.0047   +0.0154   +0.0190   +0.0339   +0.0364   +0.0083   
++0.0040   +0.9393   +0.0094   +0.0086   +0.0125   +0.0115   +0.0148   
++0.0142   +0.0101   +0.9058   +0.0142   +0.0201   +0.0181   +0.0174   
++0.0207   +0.0109   +0.0168   +0.8786   +0.0266   +0.0238   +0.0226   
++0.0271   +0.0117   +0.0174   +0.0195   +0.8753   +0.0252   +0.0238   
++0.0336   +0.0124   +0.0181   +0.0201   +0.0290   +0.8791   +0.0076   
++0.0083   +0.0172   +0.0189   +0.0207   +0.0297   +0.0083   +0.8970   
+
++0.8774   +0.0049   +0.0160   +0.0198   +0.0353   +0.0379   +0.0087   
++0.0042   +0.9365   +0.0098   +0.0090   +0.0131   +0.0120   +0.0154   
++0.0148   +0.0106   +0.9017   +0.0148   +0.0210   +0.0189   +0.0182   
++0.0216   +0.0114   +0.0175   +0.8734   +0.0278   +0.0248   +0.0235   
++0.0282   +0.0122   +0.0182   +0.0204   +0.8700   +0.0262   +0.0248   
++0.0350   +0.0129   +0.0189   +0.0210   +0.0303   +0.8739   +0.0080   
++0.0087   +0.0180   +0.0197   +0.0216   +0.0310   +0.0087   +0.8925   
+
++0.8694   +0.0053   +0.0171   +0.0211   +0.0375   +0.0403   +0.0093   
++0.0045   +0.9322   +0.0105   +0.0096   +0.0140   +0.0128   +0.0164   
++0.0158   +0.0113   +0.8952   +0.0158   +0.0224   +0.0202   +0.0194   
++0.0230   +0.0122   +0.0187   +0.8651   +0.0296   +0.0264   +0.0250   
++0.0300   +0.0130   +0.0194   +0.0217   +0.8616   +0.0279   +0.0264   
++0.0372   +0.0138   +0.0202   +0.0223   +0.0322   +0.8657   +0.0086   
++0.0093   +0.0192   +0.0210   +0.0230   +0.0330   +0.0093   +0.8854   
+
+
+[2] P-matrix for branch length 0.200000
++0.8103   +0.0082   +0.0252   +0.0306   +0.0539   +0.0577   +0.0141   
++0.0071   +0.8994   +0.0157   +0.0142   +0.0207   +0.0188   +0.0241   
++0.0233   +0.0169   +0.8463   +0.0231   +0.0328   +0.0294   +0.0282   
++0.0334   +0.0181   +0.0273   +0.8039   +0.0429   +0.0381   +0.0362   
++0.0431   +0.0193   +0.0284   +0.0314   +0.7995   +0.0403   +0.0379   
++0.0532   +0.0203   +0.0294   +0.0323   +0.0465   +0.8052   +0.0131   
++0.0141   +0.0281   +0.0306   +0.0331   +0.0474   +0.0142   +0.8324   
+
++0.7977   +0.0089   +0.0270   +0.0327   +0.0573   +0.0613   +0.0151   
++0.0077   +0.8923   +0.0168   +0.0153   +0.0221   +0.0202   +0.0257   
++0.0249   +0.0181   +0.8357   +0.0247   +0.0350   +0.0314   +0.0301   
++0.0356   +0.0194   +0.0292   +0.7909   +0.0457   +0.0406   +0.0385   
++0.0458   +0.0207   +0.0303   +0.0335   +0.7864   +0.0429   +0.0404   
++0.0565   +0.0217   +0.0314   +0.0344   +0.0495   +0.7923   +0.0141   
++0.0151   +0.0300   +0.0327   +0.0353   +0.0505   +0.0153   +0.8211   
+
++0.7893   +0.0094   +0.0281   +0.0340   +0.0596   +0.0636   +0.0159   
++0.0081   +0.8874   +0.0176   +0.0160   +0.0231   +0.0210   +0.0269   
++0.0260   +0.0189   +0.8287   +0.0258   +0.0365   +0.0327   +0.0314   
++0.0371   +0.0203   +0.0305   +0.7822   +0.0475   +0.0423   +0.0401   
++0.0477   +0.0216   +0.0316   +0.0349   +0.7776   +0.0446   +0.0420   
++0.0588   +0.0227   +0.0327   +0.0358   +0.0515   +0.7838   +0.0148   
++0.0159   +0.0313   +0.0340   +0.0367   +0.0525   +0.0161   +0.8135   
+
++0.7816   +0.0099   +0.0292   +0.0353   +0.0617   +0.0658   +0.0166   
++0.0084   +0.8829   +0.0183   +0.0166   +0.0240   +0.0218   +0.0279   
++0.0270   +0.0197   +0.8221   +0.0268   +0.0379   +0.0340   +0.0326   
++0.0385   +0.0211   +0.0316   +0.7742   +0.0493   +0.0438   +0.0415   
++0.0494   +0.0224   +0.0328   +0.0361   +0.7695   +0.0462   +0.0435   
++0.0608   +0.0235   +0.0340   +0.0371   +0.0534   +0.7758   +0.0155   
++0.0166   +0.0325   +0.0353   +0.0380   +0.0543   +0.0168   +0.8065   
+
++0.7729   +0.0104   +0.0305   +0.0367   +0.0640   +0.0683   +0.0173   
++0.0089   +0.8779   +0.0191   +0.0173   +0.0251   +0.0228   +0.0290   
++0.0281   +0.0205   +0.8148   +0.0279   +0.0394   +0.0354   +0.0339   
++0.0400   +0.0220   +0.0329   +0.7652   +0.0512   +0.0455   +0.0431   
++0.0512   +0.0234   +0.0342   +0.0375   +0.7605   +0.0480   +0.0451   
++0.0630   +0.0245   +0.0354   +0.0385   +0.0554   +0.7669   +0.0162   
++0.0173   +0.0339   +0.0367   +0.0395   +0.0564   +0.0176   +0.7986   
+
++0.7593   +0.0112   +0.0324   +0.0389   +0.0676   +0.0721   +0.0186   
++0.0096   +0.8699   +0.0203   +0.0184   +0.0267   +0.0242   +0.0308   
++0.0299   +0.0219   +0.8033   +0.0296   +0.0419   +0.0375   +0.0360   
++0.0424   +0.0235   +0.0350   +0.7512   +0.0542   +0.0482   +0.0456   
++0.0541   +0.0249   +0.0363   +0.0398   +0.7464   +0.0508   +0.0477   
++0.0665   +0.0261   +0.0375   +0.0408   +0.0586   +0.7531   +0.0174   
++0.0186   +0.0360   +0.0390   +0.0418   +0.0596   +0.0188   +0.7862   
+
+
+[2] P-matrix for branch length 1.000000
++0.3940   +0.0478   +0.0911   +0.0964   +0.1522   +0.1543   +0.0642   
++0.0410   +0.6045   +0.0641   +0.0568   +0.0799   +0.0697   +0.0840   
++0.0841   +0.0690   +0.4631   +0.0803   +0.1117   +0.0984   +0.0934   
++0.1051   +0.0723   +0.0949   +0.3720   +0.1319   +0.1157   +0.1080   
++0.1218   +0.0746   +0.0968   +0.0967   +0.3803   +0.1199   +0.1099   
++0.1424   +0.0751   +0.0984   +0.0979   +0.1383   +0.3854   +0.0626   
++0.0642   +0.0980   +0.1011   +0.0990   +0.1374   +0.0678   +0.4324   
+
++0.3721   +0.0515   +0.0952   +0.0996   +0.1561   +0.1574   +0.0681   
++0.0442   +0.5835   +0.0677   +0.0599   +0.0840   +0.0731   +0.0876   
++0.0879   +0.0729   +0.4401   +0.0837   +0.1163   +0.1022   +0.0969   
++0.1087   +0.0762   +0.0989   +0.3494   +0.1362   +0.1193   +0.1113   
++0.1249   +0.0784   +0.1008   +0.0999   +0.3596   +0.1234   +0.1130   
++0.1453   +0.0788   +0.1022   +0.1010   +0.1424   +0.3639   +0.0665   
++0.0681   +0.1022   +0.1050   +0.1020   +0.1413   +0.0720   +0.4093   
+
++0.3583   +0.0540   +0.0979   +0.1017   +0.1584   +0.1592   +0.0706   
++0.0463   +0.5698   +0.0700   +0.0619   +0.0867   +0.0754   +0.0899   
++0.0903   +0.0754   +0.4254   +0.0858   +0.1192   +0.1047   +0.0992   
++0.1109   +0.0788   +0.1014   +0.3352   +0.1388   +0.1216   +0.1133   
++0.1267   +0.0810   +0.1033   +0.1018   +0.3467   +0.1256   +0.1149   
++0.1469   +0.0812   +0.1047   +0.1029   +0.1449   +0.3503   +0.0691   
++0.0706   +0.1049   +0.1075   +0.1039   +0.1436   +0.0748   +0.3947   
+
++0.3462   +0.0563   +0.1002   +0.1034   +0.1604   +0.1606   +0.0729   
++0.0483   +0.5573   +0.0722   +0.0637   +0.0892   +0.0774   +0.0920   
++0.0925   +0.0777   +0.4123   +0.0877   +0.1218   +0.1069   +0.1012   
++0.1128   +0.0811   +0.1037   +0.3227   +0.1411   +0.1235   +0.1150   
++0.1283   +0.0832   +0.1055   +0.1035   +0.3354   +0.1275   +0.1165   
++0.1482   +0.0833   +0.1069   +0.1045   +0.1471   +0.3385   +0.0714   
++0.0729   +0.1073   +0.1096   +0.1055   +0.1457   +0.0774   +0.3817   
+
++0.3333   +0.0589   +0.1027   +0.1053   +0.1624   +0.1620   +0.0754   
++0.0505   +0.5436   +0.0745   +0.0657   +0.0919   +0.0796   +0.0942   
++0.0948   +0.0802   +0.3982   +0.0898   +0.1245   +0.1092   +0.1033   
++0.1149   +0.0837   +0.1061   +0.3094   +0.1436   +0.1255   +0.1168   
++0.1299   +0.0858   +0.1079   +0.1053   +0.3235   +0.1295   +0.1182   
++0.1496   +0.0857   +0.1092   +0.1062   +0.1494   +0.3259   +0.0740   
++0.0754   +0.1099   +0.1119   +0.1071   +0.1478   +0.0802   +0.3678   
+
++0.3145   +0.0629   +0.1065   +0.1079   +0.1651   +0.1638   +0.0793   
++0.0539   +0.5229   +0.0781   +0.0688   +0.0959   +0.0830   +0.0974   
++0.0983   +0.0841   +0.3773   +0.0928   +0.1285   +0.1126   +0.1064   
++0.1178   +0.0875   +0.1097   +0.2902   +0.1470   +0.1285   +0.1194   
++0.1321   +0.0895   +0.1114   +0.1078   +0.3063   +0.1322   +0.1206   
++0.1512   +0.0893   +0.1126   +0.1087   +0.1526   +0.3076   +0.0779   
++0.0793   +0.1136   +0.1152   +0.1094   +0.1507   +0.0844   +0.3473   
+
+
+[2] P-matrix for branch length 1.000000
++0.3940   +0.0478   +0.0911   +0.0964   +0.1522   +0.1543   +0.0642   
++0.0410   +0.6045   +0.0641   +0.0568   +0.0799   +0.0697   +0.0840   
++0.0841   +0.0690   +0.4631   +0.0803   +0.1117   +0.0984   +0.0934   
++0.1051   +0.0723   +0.0949   +0.3720   +0.1319   +0.1157   +0.1080   
++0.1218   +0.0746   +0.0968   +0.0967   +0.3803   +0.1199   +0.1099   
++0.1424   +0.0751   +0.0984   +0.0979   +0.1383   +0.3854   +0.0626   
++0.0642   +0.0980   +0.1011   +0.0990   +0.1374   +0.0678   +0.4324   
+
++0.3721   +0.0515   +0.0952   +0.0996   +0.1561   +0.1574   +0.0681   
++0.0442   +0.5835   +0.0677   +0.0599   +0.0840   +0.0731   +0.0876   
++0.0879   +0.0729   +0.4401   +0.0837   +0.1163   +0.1022   +0.0969   
++0.1087   +0.0762   +0.0989   +0.3494   +0.1362   +0.1193   +0.1113   
++0.1249   +0.0784   +0.1008   +0.0999   +0.3596   +0.1234   +0.1130   
++0.1453   +0.0788   +0.1022   +0.1010   +0.1424   +0.3639   +0.0665   
++0.0681   +0.1022   +0.1050   +0.1020   +0.1413   +0.0720   +0.4093   
+
++0.3583   +0.0540   +0.0979   +0.1017   +0.1584   +0.1592   +0.0706   
++0.0463   +0.5698   +0.0700   +0.0619   +0.0867   +0.0754   +0.0899   
++0.0903   +0.0754   +0.4254   +0.0858   +0.1192   +0.1047   +0.0992   
++0.1109   +0.0788   +0.1014   +0.3352   +0.1388   +0.1216   +0.1133   
++0.1267   +0.0810   +0.1033   +0.1018   +0.3467   +0.1256   +0.1149   
++0.1469   +0.0812   +0.1047   +0.1029   +0.1449   +0.3503   +0.0691   
++0.0706   +0.1049   +0.1075   +0.1039   +0.1436   +0.0748   +0.3947   
+
++0.3462   +0.0563   +0.1002   +0.1034   +0.1604   +0.1606   +0.0729   
++0.0483   +0.5573   +0.0722   +0.0637   +0.0892   +0.0774   +0.0920   
++0.0925   +0.0777   +0.4123   +0.0877   +0.1218   +0.1069   +0.1012   
++0.1128   +0.0811   +0.1037   +0.3227   +0.1411   +0.1235   +0.1150   
++0.1283   +0.0832   +0.1055   +0.1035   +0.3354   +0.1275   +0.1165   
++0.1482   +0.0833   +0.1069   +0.1045   +0.1471   +0.3385   +0.0714   
++0.0729   +0.1073   +0.1096   +0.1055   +0.1457   +0.0774   +0.3817   
+
++0.3333   +0.0589   +0.1027   +0.1053   +0.1624   +0.1620   +0.0754   
++0.0505   +0.5436   +0.0745   +0.0657   +0.0919   +0.0796   +0.0942   
++0.0948   +0.0802   +0.3982   +0.0898   +0.1245   +0.1092   +0.1033   
++0.1149   +0.0837   +0.1061   +0.3094   +0.1436   +0.1255   +0.1168   
++0.1299   +0.0858   +0.1079   +0.1053   +0.3235   +0.1295   +0.1182   
++0.1496   +0.0857   +0.1092   +0.1062   +0.1494   +0.3259   +0.0740   
++0.0754   +0.1099   +0.1119   +0.1071   +0.1478   +0.0802   +0.3678   
+
++0.3145   +0.0629   +0.1065   +0.1079   +0.1651   +0.1638   +0.0793   
++0.0539   +0.5229   +0.0781   +0.0688   +0.0959   +0.0830   +0.0974   
++0.0983   +0.0841   +0.3773   +0.0928   +0.1285   +0.1126   +0.1064   
++0.1178   +0.0875   +0.1097   +0.2902   +0.1470   +0.1285   +0.1194   
++0.1321   +0.0895   +0.1114   +0.1078   +0.3063   +0.1322   +0.1206   
++0.1512   +0.0893   +0.1126   +0.1087   +0.1526   +0.3076   +0.0779   
++0.0793   +0.1136   +0.1152   +0.1094   +0.1507   +0.0844   +0.3473   
+
+
+[2] CLV 5: [ {(0.00021,0.01409,0.01427,0.00050,0.00055,0.00060,0.00086),(0.00024,0.01498,0.01511,0.00057,0.00063,0.00068,0.00098),(0.00026,0.01558,0.01567,0.00062,0.00068,0.00074,0.00107),(0.00029,0.01613,0.01617,0.00067,0.00074,0.00080,0.00115),(0.00032,0.01674,0.01673,0.00073,0.00080,0.00087,0.00124),(0.00036,0.01769,0.01759,0.00082,0.00090,0.00098,0.00140)} {(0.65653,0.00005,0.00054,0.00112,0.00186,0.00283,0.00020),(0.63636,0.00006,0.00062,0.00127,0.00210,0.00320,0.00023),(0.62301,0.0 [...]
+[2] CLV 6: [ {(0.00039,0.00010,0.00031,0.00003,0.00004,0.00005,0.00002),(0.00044,0.00011,0.00035,0.00003,0.00005,0.00006,0.00002),(0.00048,0.00012,0.00038,0.00004,0.00005,0.00007,0.00002),(0.00051,0.00013,0.00040,0.00004,0.00006,0.00008,0.00003),(0.00055,0.00014,0.00043,0.00005,0.00007,0.00009,0.00003),(0.00062,0.00016,0.00048,0.00006,0.00008,0.00010,0.00004)} {(0.03404,0.00004,0.00025,0.00049,0.00069,0.01744,0.00007),(0.03477,0.00005,0.00028,0.00054,0.00077,0.01796,0.00008),(0.03518,0.0 [...]
+[2] CLV 7: [ {(0.0006,0.0002,0.7161,0.0007,0.0008,0.0009,0.0009),(0.0007,0.0003,0.6985,0.0009,0.0009,0.0010,0.0011),(0.0008,0.0003,0.6867,0.0009,0.0010,0.0011,0.0012),(0.0009,0.0003,0.6759,0.0010,0.0011,0.0012,0.0012),(0.0009,0.0004,0.6638,0.0011,0.0012,0.0012,0.0013),(0.0010,0.0004,0.6452,0.0012,0.0013,0.0014,0.0015)} {(0.0033,0.0004,0.0009,0.0015,0.0016,0.6483,0.0002),(0.0038,0.0004,0.0010,0.0016,0.0018,0.6278,0.0002),(0.0041,0.0004,0.0011,0.0018,0.0020,0.6143,0.0003),(0.0043,0.0005,0. [...]
+
+
+ TEST alpha(ncats) = 100.00( 6), mode = MEDIAN
+
+Rates:  0.85509  0.93017  0.97570  1.01803 
+        1.06643  1.15457 
+[2] P-matrix for branch length 0.100000
++0.9001   +0.0039   +0.0130   +0.0161   +0.0289   +0.0311   +0.0069   
++0.0033   +0.9487   +0.0079   +0.0072   +0.0106   +0.0097   +0.0125   
++0.0120   +0.0085   +0.9202   +0.0120   +0.0171   +0.0154   +0.0148   
++0.0176   +0.0092   +0.0142   +0.8969   +0.0227   +0.0202   +0.0192   
++0.0231   +0.0099   +0.0148   +0.0166   +0.8940   +0.0214   +0.0203   
++0.0287   +0.0105   +0.0154   +0.0171   +0.0247   +0.8973   +0.0064   
++0.0069   +0.0146   +0.0160   +0.0176   +0.0253   +0.0069   +0.9126   
+
++0.8919   +0.0042   +0.0141   +0.0175   +0.0312   +0.0335   +0.0075   
++0.0036   +0.9443   +0.0086   +0.0079   +0.0115   +0.0105   +0.0135   
++0.0130   +0.0093   +0.9136   +0.0130   +0.0185   +0.0166   +0.0160   
++0.0190   +0.0100   +0.0154   +0.8885   +0.0245   +0.0219   +0.0208   
++0.0249   +0.0107   +0.0160   +0.0180   +0.8853   +0.0232   +0.0219   
++0.0310   +0.0114   +0.0166   +0.0185   +0.0267   +0.8889   +0.0070   
++0.0075   +0.0158   +0.0173   +0.0190   +0.0274   +0.0075   +0.9054   
+
++0.8870   +0.0045   +0.0147   +0.0183   +0.0326   +0.0350   +0.0079   
++0.0038   +0.9417   +0.0090   +0.0082   +0.0120   +0.0110   +0.0142   
++0.0136   +0.0097   +0.9096   +0.0136   +0.0193   +0.0174   +0.0167   
++0.0199   +0.0105   +0.0161   +0.8834   +0.0256   +0.0228   +0.0217   
++0.0261   +0.0112   +0.0168   +0.0188   +0.8801   +0.0242   +0.0229   
++0.0323   +0.0119   +0.0174   +0.0193   +0.0279   +0.8838   +0.0073   
++0.0079   +0.0165   +0.0181   +0.0199   +0.0286   +0.0079   +0.9010   
+
++0.8825   +0.0047   +0.0154   +0.0190   +0.0338   +0.0364   +0.0083   
++0.0040   +0.9393   +0.0094   +0.0086   +0.0125   +0.0115   +0.0148   
++0.0142   +0.0101   +0.9059   +0.0142   +0.0201   +0.0181   +0.0174   
++0.0207   +0.0109   +0.0167   +0.8787   +0.0266   +0.0237   +0.0226   
++0.0271   +0.0117   +0.0174   +0.0195   +0.8754   +0.0252   +0.0238   
++0.0336   +0.0124   +0.0181   +0.0201   +0.0290   +0.8792   +0.0076   
++0.0083   +0.0172   +0.0189   +0.0207   +0.0297   +0.0083   +0.8970   
+
++0.8773   +0.0049   +0.0160   +0.0198   +0.0353   +0.0379   +0.0087   
++0.0042   +0.9365   +0.0098   +0.0090   +0.0131   +0.0120   +0.0154   
++0.0148   +0.0106   +0.9017   +0.0148   +0.0210   +0.0189   +0.0182   
++0.0216   +0.0114   +0.0175   +0.8734   +0.0278   +0.0248   +0.0235   
++0.0282   +0.0122   +0.0182   +0.0204   +0.8699   +0.0262   +0.0248   
++0.0350   +0.0129   +0.0189   +0.0210   +0.0303   +0.8739   +0.0080   
++0.0087   +0.0180   +0.0197   +0.0216   +0.0310   +0.0087   +0.8925   
+
++0.8681   +0.0053   +0.0173   +0.0213   +0.0379   +0.0407   +0.0094   
++0.0046   +0.9315   +0.0106   +0.0097   +0.0141   +0.0129   +0.0166   
++0.0160   +0.0114   +0.8941   +0.0159   +0.0226   +0.0204   +0.0196   
++0.0233   +0.0123   +0.0188   +0.8638   +0.0299   +0.0266   +0.0253   
++0.0303   +0.0132   +0.0196   +0.0219   +0.8602   +0.0282   +0.0266   
++0.0376   +0.0139   +0.0204   +0.0225   +0.0325   +0.8644   +0.0087   
++0.0094   +0.0194   +0.0212   +0.0232   +0.0333   +0.0094   +0.8842   
+
+
+[2] P-matrix for branch length 0.200000
++0.8123   +0.0081   +0.0249   +0.0303   +0.0533   +0.0571   +0.0139   
++0.0070   +0.9005   +0.0155   +0.0141   +0.0204   +0.0186   +0.0238   
++0.0230   +0.0167   +0.8479   +0.0229   +0.0324   +0.0291   +0.0279   
++0.0331   +0.0179   +0.0271   +0.8060   +0.0424   +0.0377   +0.0358   
++0.0427   +0.0191   +0.0281   +0.0311   +0.8016   +0.0399   +0.0376   
++0.0527   +0.0201   +0.0291   +0.0319   +0.0460   +0.8072   +0.0129   
++0.0139   +0.0278   +0.0303   +0.0328   +0.0469   +0.0140   +0.8342   
+
++0.7980   +0.0089   +0.0269   +0.0326   +0.0572   +0.0612   +0.0151   
++0.0076   +0.8924   +0.0168   +0.0152   +0.0221   +0.0201   +0.0257   
++0.0249   +0.0181   +0.8359   +0.0247   +0.0350   +0.0314   +0.0301   
++0.0356   +0.0194   +0.0292   +0.7912   +0.0456   +0.0406   +0.0385   
++0.0458   +0.0206   +0.0303   +0.0334   +0.7867   +0.0429   +0.0403   
++0.0565   +0.0217   +0.0314   +0.0343   +0.0494   +0.7926   +0.0141   
++0.0151   +0.0300   +0.0326   +0.0353   +0.0504   +0.0153   +0.8213   
+
++0.7894   +0.0094   +0.0281   +0.0340   +0.0596   +0.0636   +0.0159   
++0.0081   +0.8875   +0.0175   +0.0159   +0.0231   +0.0210   +0.0268   
++0.0260   +0.0189   +0.8288   +0.0258   +0.0365   +0.0327   +0.0314   
++0.0371   +0.0203   +0.0305   +0.7824   +0.0475   +0.0422   +0.0400   
++0.0476   +0.0216   +0.0316   +0.0348   +0.7778   +0.0446   +0.0420   
++0.0587   +0.0226   +0.0327   +0.0357   +0.0515   +0.7839   +0.0148   
++0.0159   +0.0313   +0.0340   +0.0367   +0.0524   +0.0160   +0.8136   
+
++0.7816   +0.0098   +0.0292   +0.0353   +0.0617   +0.0658   +0.0165   
++0.0084   +0.8830   +0.0183   +0.0166   +0.0240   +0.0218   +0.0279   
++0.0270   +0.0197   +0.8222   +0.0268   +0.0379   +0.0340   +0.0326   
++0.0385   +0.0211   +0.0316   +0.7743   +0.0492   +0.0438   +0.0415   
++0.0493   +0.0224   +0.0328   +0.0361   +0.7696   +0.0462   +0.0435   
++0.0608   +0.0235   +0.0340   +0.0371   +0.0533   +0.7759   +0.0155   
++0.0165   +0.0325   +0.0353   +0.0380   +0.0543   +0.0168   +0.8065   
+
++0.7728   +0.0104   +0.0305   +0.0367   +0.0640   +0.0683   +0.0173   
++0.0089   +0.8779   +0.0191   +0.0173   +0.0251   +0.0228   +0.0290   
++0.0281   +0.0205   +0.8147   +0.0279   +0.0394   +0.0354   +0.0339   
++0.0400   +0.0220   +0.0329   +0.7651   +0.0512   +0.0455   +0.0431   
++0.0512   +0.0234   +0.0342   +0.0376   +0.7605   +0.0480   +0.0451   
++0.0630   +0.0245   +0.0354   +0.0385   +0.0554   +0.7669   +0.0162   
++0.0173   +0.0339   +0.0367   +0.0395   +0.0564   +0.0176   +0.7985   
+
++0.7571   +0.0113   +0.0327   +0.0392   +0.0682   +0.0727   +0.0188   
++0.0097   +0.8686   +0.0205   +0.0186   +0.0269   +0.0244   +0.0311   
++0.0302   +0.0221   +0.8014   +0.0299   +0.0423   +0.0379   +0.0363   
++0.0428   +0.0237   +0.0353   +0.7488   +0.0547   +0.0486   +0.0460   
++0.0546   +0.0252   +0.0366   +0.0401   +0.7441   +0.0513   +0.0481   
++0.0671   +0.0263   +0.0379   +0.0411   +0.0592   +0.7509   +0.0176   
++0.0188   +0.0363   +0.0393   +0.0422   +0.0602   +0.0190   +0.7842   
+
+
+[2] P-matrix for branch length 1.000000
++0.3977   +0.0472   +0.0905   +0.0958   +0.1515   +0.1537   +0.0636   
++0.0405   +0.6079   +0.0635   +0.0563   +0.0792   +0.0691   +0.0834   
++0.0835   +0.0684   +0.4669   +0.0798   +0.1110   +0.0977   +0.0928   
++0.1045   +0.0717   +0.0943   +0.3758   +0.1312   +0.1151   +0.1075   
++0.1212   +0.0739   +0.0962   +0.0962   +0.3838   +0.1193   +0.1094   
++0.1419   +0.0744   +0.0977   +0.0974   +0.1376   +0.3890   +0.0619   
++0.0636   +0.0973   +0.1005   +0.0985   +0.1368   +0.0671   +0.4362   
+
++0.3725   +0.0514   +0.0951   +0.0996   +0.1560   +0.1573   +0.0680   
++0.0441   +0.5839   +0.0676   +0.0598   +0.0840   +0.0731   +0.0876   
++0.0878   +0.0728   +0.4405   +0.0836   +0.1162   +0.1022   +0.0969   
++0.1086   +0.0762   +0.0988   +0.3498   +0.1361   +0.1192   +0.1112   
++0.1248   +0.0784   +0.1007   +0.0998   +0.3600   +0.1234   +0.1130   
++0.1452   +0.0787   +0.1022   +0.1009   +0.1423   +0.3643   +0.0664   
++0.0680   +0.1021   +0.1049   +0.1020   +0.1412   +0.0720   +0.4098   
+
++0.3585   +0.0540   +0.0978   +0.1016   +0.1584   +0.1591   +0.0706   
++0.0463   +0.5700   +0.0700   +0.0619   +0.0867   +0.0753   +0.0899   
++0.0903   +0.0754   +0.4256   +0.0858   +0.1191   +0.1047   +0.0992   
++0.1109   +0.0787   +0.1014   +0.3354   +0.1388   +0.1215   +0.1133   
++0.1267   +0.0809   +0.1033   +0.1018   +0.3469   +0.1256   +0.1149   
++0.1469   +0.0811   +0.1047   +0.1028   +0.1449   +0.3506   +0.0690   
++0.0706   +0.1049   +0.1074   +0.1038   +0.1436   +0.0748   +0.3949   
+
++0.3463   +0.0563   +0.1002   +0.1034   +0.1604   +0.1606   +0.0729   
++0.0482   +0.5574   +0.0721   +0.0637   +0.0892   +0.0774   +0.0919   
++0.0925   +0.0777   +0.4124   +0.0877   +0.1217   +0.1069   +0.1012   
++0.1128   +0.0811   +0.1037   +0.3228   +0.1411   +0.1235   +0.1150   
++0.1283   +0.0832   +0.1055   +0.1035   +0.3355   +0.1275   +0.1165   
++0.1482   +0.0833   +0.1069   +0.1045   +0.1471   +0.3386   +0.0714   
++0.0729   +0.1073   +0.1096   +0.1054   +0.1456   +0.0773   +0.3818   
+
++0.3332   +0.0589   +0.1027   +0.1053   +0.1624   +0.1620   +0.0755   
++0.0505   +0.5436   +0.0745   +0.0657   +0.0919   +0.0796   +0.0942   
++0.0948   +0.0803   +0.3981   +0.0898   +0.1245   +0.1092   +0.1033   
++0.1149   +0.0837   +0.1061   +0.3094   +0.1436   +0.1256   +0.1169   
++0.1299   +0.0858   +0.1079   +0.1053   +0.3234   +0.1295   +0.1182   
++0.1496   +0.0857   +0.1092   +0.1062   +0.1494   +0.3258   +0.0740   
++0.0755   +0.1099   +0.1119   +0.1071   +0.1478   +0.0802   +0.3677   
+
++0.3115   +0.0636   +0.1070   +0.1084   +0.1655   +0.1641   +0.0799   
++0.0545   +0.5195   +0.0787   +0.0693   +0.0966   +0.0835   +0.0979   
++0.0988   +0.0847   +0.3740   +0.0933   +0.1292   +0.1132   +0.1069   
++0.1182   +0.0881   +0.1103   +0.2872   +0.1475   +0.1289   +0.1198   
++0.1324   +0.0902   +0.1119   +0.1082   +0.3037   +0.1327   +0.1209   
++0.1514   +0.0899   +0.1132   +0.1091   +0.1531   +0.3048   +0.0785   
++0.0799   +0.1143   +0.1158   +0.1098   +0.1512   +0.0851   +0.3440   
+
+
+[2] P-matrix for branch length 1.000000
++0.3977   +0.0472   +0.0905   +0.0958   +0.1515   +0.1537   +0.0636   
++0.0405   +0.6079   +0.0635   +0.0563   +0.0792   +0.0691   +0.0834   
++0.0835   +0.0684   +0.4669   +0.0798   +0.1110   +0.0977   +0.0928   
++0.1045   +0.0717   +0.0943   +0.3758   +0.1312   +0.1151   +0.1075   
++0.1212   +0.0739   +0.0962   +0.0962   +0.3838   +0.1193   +0.1094   
++0.1419   +0.0744   +0.0977   +0.0974   +0.1376   +0.3890   +0.0619   
++0.0636   +0.0973   +0.1005   +0.0985   +0.1368   +0.0671   +0.4362   
+
++0.3725   +0.0514   +0.0951   +0.0996   +0.1560   +0.1573   +0.0680   
++0.0441   +0.5839   +0.0676   +0.0598   +0.0840   +0.0731   +0.0876   
++0.0878   +0.0728   +0.4405   +0.0836   +0.1162   +0.1022   +0.0969   
++0.1086   +0.0762   +0.0988   +0.3498   +0.1361   +0.1192   +0.1112   
++0.1248   +0.0784   +0.1007   +0.0998   +0.3600   +0.1234   +0.1130   
++0.1452   +0.0787   +0.1022   +0.1009   +0.1423   +0.3643   +0.0664   
++0.0680   +0.1021   +0.1049   +0.1020   +0.1412   +0.0720   +0.4098   
+
++0.3585   +0.0540   +0.0978   +0.1016   +0.1584   +0.1591   +0.0706   
++0.0463   +0.5700   +0.0700   +0.0619   +0.0867   +0.0753   +0.0899   
++0.0903   +0.0754   +0.4256   +0.0858   +0.1191   +0.1047   +0.0992   
++0.1109   +0.0787   +0.1014   +0.3354   +0.1388   +0.1215   +0.1133   
++0.1267   +0.0809   +0.1033   +0.1018   +0.3469   +0.1256   +0.1149   
++0.1469   +0.0811   +0.1047   +0.1028   +0.1449   +0.3506   +0.0690   
++0.0706   +0.1049   +0.1074   +0.1038   +0.1436   +0.0748   +0.3949   
+
++0.3463   +0.0563   +0.1002   +0.1034   +0.1604   +0.1606   +0.0729   
++0.0482   +0.5574   +0.0721   +0.0637   +0.0892   +0.0774   +0.0919   
++0.0925   +0.0777   +0.4124   +0.0877   +0.1217   +0.1069   +0.1012   
++0.1128   +0.0811   +0.1037   +0.3228   +0.1411   +0.1235   +0.1150   
++0.1283   +0.0832   +0.1055   +0.1035   +0.3355   +0.1275   +0.1165   
++0.1482   +0.0833   +0.1069   +0.1045   +0.1471   +0.3386   +0.0714   
++0.0729   +0.1073   +0.1096   +0.1054   +0.1456   +0.0773   +0.3818   
+
++0.3332   +0.0589   +0.1027   +0.1053   +0.1624   +0.1620   +0.0755   
++0.0505   +0.5436   +0.0745   +0.0657   +0.0919   +0.0796   +0.0942   
++0.0948   +0.0803   +0.3981   +0.0898   +0.1245   +0.1092   +0.1033   
++0.1149   +0.0837   +0.1061   +0.3094   +0.1436   +0.1256   +0.1169   
++0.1299   +0.0858   +0.1079   +0.1053   +0.3234   +0.1295   +0.1182   
++0.1496   +0.0857   +0.1092   +0.1062   +0.1494   +0.3258   +0.0740   
++0.0755   +0.1099   +0.1119   +0.1071   +0.1478   +0.0802   +0.3677   
+
++0.3115   +0.0636   +0.1070   +0.1084   +0.1655   +0.1641   +0.0799   
++0.0545   +0.5195   +0.0787   +0.0693   +0.0966   +0.0835   +0.0979   
++0.0988   +0.0847   +0.3740   +0.0933   +0.1292   +0.1132   +0.1069   
++0.1182   +0.0881   +0.1103   +0.2872   +0.1475   +0.1289   +0.1198   
++0.1324   +0.0902   +0.1119   +0.1082   +0.3037   +0.1327   +0.1209   
++0.1514   +0.0899   +0.1132   +0.1091   +0.1531   +0.3048   +0.0785   
++0.0799   +0.1143   +0.1158   +0.1098   +0.1512   +0.0851   +0.3440   
+
+
+[2] CLV 5: [ {(0.00020,0.01394,0.01414,0.00048,0.00054,0.00058,0.00084),(0.00024,0.01496,0.01509,0.00057,0.00063,0.00068,0.00098),(0.00026,0.01557,0.01566,0.00062,0.00068,0.00074,0.00106),(0.00029,0.01612,0.01617,0.00067,0.00074,0.00080,0.00115),(0.00032,0.01674,0.01673,0.00073,0.00080,0.00087,0.00124),(0.00037,0.01784,0.01773,0.00084,0.00092,0.00100,0.00143)} {(0.65978,0.00005,0.00053,0.00109,0.00182,0.00278,0.00019),(0.63675,0.00006,0.00062,0.00127,0.00210,0.00319,0.00023),(0.62323,0.0 [...]
+[2] CLV 6: [ {(0.00038,0.00009,0.00030,0.00003,0.00004,0.00005,0.00002),(0.00044,0.00011,0.00035,0.00003,0.00005,0.00006,0.00002),(0.00048,0.00012,0.00038,0.00004,0.00005,0.00007,0.00002),(0.00051,0.00013,0.00040,0.00004,0.00006,0.00008,0.00003),(0.00055,0.00014,0.00043,0.00005,0.00007,0.00009,0.00003),(0.00063,0.00016,0.00049,0.00006,0.00008,0.00010,0.00004)} {(0.03391,0.00004,0.00025,0.00048,0.00068,0.01735,0.00007),(0.03476,0.00005,0.00028,0.00054,0.00076,0.01795,0.00008),(0.03518,0.0 [...]
+[2] CLV 7: [ {(0.0006,0.0002,0.7190,0.0007,0.0008,0.0008,0.0009),(0.0007,0.0003,0.6988,0.0009,0.0009,0.0010,0.0011),(0.0008,0.0003,0.6869,0.0009,0.0010,0.0011,0.0012),(0.0009,0.0003,0.6760,0.0010,0.0011,0.0012,0.0012),(0.0009,0.0004,0.6638,0.0011,0.0012,0.0013,0.0013),(0.0011,0.0004,0.6422,0.0012,0.0013,0.0014,0.0015)} {(0.0033,0.0003,0.0008,0.0014,0.0016,0.6516,0.0002),(0.0037,0.0004,0.0010,0.0016,0.0018,0.6282,0.0002),(0.0040,0.0004,0.0011,0.0018,0.0020,0.6145,0.0003),(0.0043,0.0005,0. [...]
+
+ti/tv:alpha(ncats) =   0.10( 1), mode = MEDIAN    logL:       -148.836565
+ti/tv:alpha(ncats) =   0.10( 1), mode =   MEAN    logL:       -148.836565
+ti/tv:alpha(ncats) =   1.25( 1), mode = MEDIAN    logL:       -148.836565
+ti/tv:alpha(ncats) =   1.25( 1), mode =   MEAN    logL:       -148.836565
+ti/tv:alpha(ncats) = 100.00( 1), mode = MEDIAN    logL:       -148.836565
+ti/tv:alpha(ncats) = 100.00( 1), mode =   MEAN    logL:       -148.836565
+ti/tv:alpha(ncats) =   0.10( 4), mode = MEDIAN    logL:       -152.266936
+ti/tv:alpha(ncats) =   0.10( 4), mode =   MEAN    logL:       -152.612902
+ti/tv:alpha(ncats) =   1.25( 4), mode = MEDIAN    logL:       -147.510350
+ti/tv:alpha(ncats) =   1.25( 4), mode =   MEAN    logL:       -147.485679
+ti/tv:alpha(ncats) = 100.00( 4), mode = MEDIAN    logL:       -148.803590
+ti/tv:alpha(ncats) = 100.00( 4), mode =   MEAN    logL:       -148.796866
+ti/tv:alpha(ncats) =   0.10( 6), mode = MEDIAN    logL:       -152.949862
+ti/tv:alpha(ncats) =   0.10( 6), mode =   MEAN    logL:       -153.650711
+ti/tv:alpha(ncats) =   1.25( 6), mode = MEDIAN    logL:       -147.522213
+ti/tv:alpha(ncats) =   1.25( 6), mode =   MEAN    logL:       -147.533339
+ti/tv:alpha(ncats) = 100.00( 6), mode = MEDIAN    logL:       -148.799434
+ti/tv:alpha(ncats) = 100.00( 6), mode =   MEAN    logL:       -148.794223
diff --git a/test/out/fasta-dna.exe.out b/test/out/00110_NPDN_fasta.exe.out
similarity index 100%
rename from test/out/fasta-dna.exe.out
rename to test/out/00110_NPDN_fasta.exe.out
diff --git a/test/out/fasta-dna.out b/test/out/00110_NPDN_fasta.out
similarity index 100%
rename from test/out/fasta-dna.out
rename to test/out/00110_NPDN_fasta.out
diff --git a/test/out/fasta-prot.exe.out b/test/out/00120_NPAN_fasta.exe.out
similarity index 100%
rename from test/out/fasta-prot.exe.out
rename to test/out/00120_NPAN_fasta.exe.out
diff --git a/test/out/fasta-prot.out b/test/out/00120_NPAN_fasta.out
similarity index 100%
rename from test/out/fasta-prot.out
rename to test/out/00120_NPAN_fasta.out
diff --git a/test/out/alpha-cats.out b/test/out/alpha-cats.out
index c6c5cf3..561d62b 100644
--- a/test/out/alpha-cats.out
+++ b/test/out/alpha-cats.out
@@ -1,6 +1,6 @@
 
 
- TEST alpha(ncats) =   0.10( 1)
+ TEST alpha(ncats) =   0.10( 1), mode = MEAN
 
 1.000000 
 [0] P-matrix for branch length 0.100000
@@ -36,7 +36,79 @@
 [0] CLV 7: [ {(0.00498,0.72266,0.00498,0.02516)} {(0.00162,0.00031,0.59790,0.00031)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.06027,0.04501,0.00853,0.00840)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
 
 
- TEST alpha(ncats) =   0.50( 1)
+ TEST alpha(ncats) =   0.10( 1), mode = MEDIAN
+
+1.000000 
+[0] P-matrix for branch length 0.100000
++0.9224   +0.0370   +0.0221   +0.0185   
++0.0278   +0.9192   +0.0093   +0.0438   
++0.0663   +0.0370   +0.8782   +0.0185   
++0.0278   +0.0876   +0.0093   +0.8754   
+
+
+[0] P-matrix for branch length 0.200000
++0.8538   +0.0706   +0.0403   +0.0353   
++0.0529   +0.8501   +0.0176   +0.0793   
++0.1209   +0.0706   +0.7732   +0.0353   
++0.0529   +0.1586   +0.0176   +0.7708   
+
+
+[0] P-matrix for branch length 1.000000
++0.5233   +0.2485   +0.1039   +0.1242   
++0.1864   +0.5537   +0.0621   +0.1978   
++0.3118   +0.2485   +0.3155   +0.1242   
++0.1864   +0.3956   +0.0621   +0.3559   
+
+
+[0] P-matrix for branch length 1.000000
++0.5233   +0.2485   +0.1039   +0.1242   
++0.1864   +0.5537   +0.0621   +0.1978   
++0.3118   +0.2485   +0.3155   +0.1242   
++0.1864   +0.3956   +0.0621   +0.3559   
+
+
+[0] CLV 5: [ {(0.06277,0.11243,0.01102,0.13066)} {(0.72901,0.00280,0.01461,0.00280)} {(0.06027,0.04501,0.00853,0.00840)} {(0.00498,0.72266,0.00498,0.02516)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00249,0.06742,0.00249,0.12226)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
+[0] CLV 6: [ {(0.05526,0.00587,0.00247,0.00668)} {(0.02711,0.00041,0.04740,0.00041)} {(0.05761,0.04349,0.01331,0.01305)} {(0.00225,0.56577,0.00225,0.01357)} {(0.02880,0.00652,0.00665,0.03697)} {(0.00025,0.00535,0.00025,0.08712)} {(0.00059,0.00010,0.40611,0.00010)} {(0.00225,0.56577,0.00225,0.01357)} {(0.01059,0.00169,0.00150,0.02757)} {(0.02711,0.00041,0.04740,0.00041)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.04750,0.01961,0.00433,0.00366)} {(0.00044,0 [...]
+[0] CLV 7: [ {(0.00498,0.72266,0.00498,0.02516)} {(0.00162,0.00031,0.59790,0.00031)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.06027,0.04501,0.00853,0.00840)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
+
+
+ TEST alpha(ncats) =   0.50( 1), mode = MEAN
+
+1.000000 
+[1] P-matrix for branch length 0.100000
++0.9224   +0.0370   +0.0221   +0.0185   
++0.0278   +0.9192   +0.0093   +0.0438   
++0.0663   +0.0370   +0.8782   +0.0185   
++0.0278   +0.0876   +0.0093   +0.8754   
+
+
+[1] P-matrix for branch length 0.200000
++0.8538   +0.0706   +0.0403   +0.0353   
++0.0529   +0.8501   +0.0176   +0.0793   
++0.1209   +0.0706   +0.7732   +0.0353   
++0.0529   +0.1586   +0.0176   +0.7708   
+
+
+[1] P-matrix for branch length 1.000000
++0.5233   +0.2485   +0.1039   +0.1242   
++0.1864   +0.5537   +0.0621   +0.1978   
++0.3118   +0.2485   +0.3155   +0.1242   
++0.1864   +0.3956   +0.0621   +0.3559   
+
+
+[1] P-matrix for branch length 1.000000
++0.5233   +0.2485   +0.1039   +0.1242   
++0.1864   +0.5537   +0.0621   +0.1978   
++0.3118   +0.2485   +0.3155   +0.1242   
++0.1864   +0.3956   +0.0621   +0.3559   
+
+
+[1] CLV 5: [ {(0.06277,0.11243,0.01102,0.13066)} {(0.72901,0.00280,0.01461,0.00280)} {(0.06027,0.04501,0.00853,0.00840)} {(0.00498,0.72266,0.00498,0.02516)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00249,0.06742,0.00249,0.12226)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
+[1] CLV 6: [ {(0.05526,0.00587,0.00247,0.00668)} {(0.02711,0.00041,0.04740,0.00041)} {(0.05761,0.04349,0.01331,0.01305)} {(0.00225,0.56577,0.00225,0.01357)} {(0.02880,0.00652,0.00665,0.03697)} {(0.00025,0.00535,0.00025,0.08712)} {(0.00059,0.00010,0.40611,0.00010)} {(0.00225,0.56577,0.00225,0.01357)} {(0.01059,0.00169,0.00150,0.02757)} {(0.02711,0.00041,0.04740,0.00041)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.04750,0.01961,0.00433,0.00366)} {(0.00044,0 [...]
+[1] CLV 7: [ {(0.00498,0.72266,0.00498,0.02516)} {(0.00162,0.00031,0.59790,0.00031)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.06027,0.04501,0.00853,0.00840)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
+
+
+ TEST alpha(ncats) =   0.50( 1), mode = MEDIAN
 
 1.000000 
 [1] P-matrix for branch length 0.100000
@@ -72,7 +144,43 @@
 [1] CLV 7: [ {(0.00498,0.72266,0.00498,0.02516)} {(0.00162,0.00031,0.59790,0.00031)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.06027,0.04501,0.00853,0.00840)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
 
 
- TEST alpha(ncats) =   0.75( 1)
+ TEST alpha(ncats) =   0.75( 1), mode = MEAN
+
+1.000000 
+[2] P-matrix for branch length 0.100000
++0.9224   +0.0370   +0.0221   +0.0185   
++0.0278   +0.9192   +0.0093   +0.0438   
++0.0663   +0.0370   +0.8782   +0.0185   
++0.0278   +0.0876   +0.0093   +0.8754   
+
+
+[2] P-matrix for branch length 0.200000
++0.8538   +0.0706   +0.0403   +0.0353   
++0.0529   +0.8501   +0.0176   +0.0793   
++0.1209   +0.0706   +0.7732   +0.0353   
++0.0529   +0.1586   +0.0176   +0.7708   
+
+
+[2] P-matrix for branch length 1.000000
++0.5233   +0.2485   +0.1039   +0.1242   
++0.1864   +0.5537   +0.0621   +0.1978   
++0.3118   +0.2485   +0.3155   +0.1242   
++0.1864   +0.3956   +0.0621   +0.3559   
+
+
+[2] P-matrix for branch length 1.000000
++0.5233   +0.2485   +0.1039   +0.1242   
++0.1864   +0.5537   +0.0621   +0.1978   
++0.3118   +0.2485   +0.3155   +0.1242   
++0.1864   +0.3956   +0.0621   +0.3559   
+
+
+[2] CLV 5: [ {(0.06277,0.11243,0.01102,0.13066)} {(0.72901,0.00280,0.01461,0.00280)} {(0.06027,0.04501,0.00853,0.00840)} {(0.00498,0.72266,0.00498,0.02516)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00249,0.06742,0.00249,0.12226)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
+[2] CLV 6: [ {(0.05526,0.00587,0.00247,0.00668)} {(0.02711,0.00041,0.04740,0.00041)} {(0.05761,0.04349,0.01331,0.01305)} {(0.00225,0.56577,0.00225,0.01357)} {(0.02880,0.00652,0.00665,0.03697)} {(0.00025,0.00535,0.00025,0.08712)} {(0.00059,0.00010,0.40611,0.00010)} {(0.00225,0.56577,0.00225,0.01357)} {(0.01059,0.00169,0.00150,0.02757)} {(0.02711,0.00041,0.04740,0.00041)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.04750,0.01961,0.00433,0.00366)} {(0.00044,0 [...]
+[2] CLV 7: [ {(0.00498,0.72266,0.00498,0.02516)} {(0.00162,0.00031,0.59790,0.00031)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.06027,0.04501,0.00853,0.00840)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
+
+
+ TEST alpha(ncats) =   0.75( 1), mode = MEDIAN
 
 1.000000 
 [2] P-matrix for branch length 0.100000
@@ -108,7 +216,43 @@
 [2] CLV 7: [ {(0.00498,0.72266,0.00498,0.02516)} {(0.00162,0.00031,0.59790,0.00031)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.06027,0.04501,0.00853,0.00840)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
 
 
- TEST alpha(ncats) =   1.00( 1)
+ TEST alpha(ncats) =   1.00( 1), mode = MEAN
+
+1.000000 
+[3] P-matrix for branch length 0.100000
++0.9224   +0.0370   +0.0221   +0.0185   
++0.0278   +0.9192   +0.0093   +0.0438   
++0.0663   +0.0370   +0.8782   +0.0185   
++0.0278   +0.0876   +0.0093   +0.8754   
+
+
+[3] P-matrix for branch length 0.200000
++0.8538   +0.0706   +0.0403   +0.0353   
++0.0529   +0.8501   +0.0176   +0.0793   
++0.1209   +0.0706   +0.7732   +0.0353   
++0.0529   +0.1586   +0.0176   +0.7708   
+
+
+[3] P-matrix for branch length 1.000000
++0.5233   +0.2485   +0.1039   +0.1242   
++0.1864   +0.5537   +0.0621   +0.1978   
++0.3118   +0.2485   +0.3155   +0.1242   
++0.1864   +0.3956   +0.0621   +0.3559   
+
+
+[3] P-matrix for branch length 1.000000
++0.5233   +0.2485   +0.1039   +0.1242   
++0.1864   +0.5537   +0.0621   +0.1978   
++0.3118   +0.2485   +0.3155   +0.1242   
++0.1864   +0.3956   +0.0621   +0.3559   
+
+
+[3] CLV 5: [ {(0.06277,0.11243,0.01102,0.13066)} {(0.72901,0.00280,0.01461,0.00280)} {(0.06027,0.04501,0.00853,0.00840)} {(0.00498,0.72266,0.00498,0.02516)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00249,0.06742,0.00249,0.12226)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
+[3] CLV 6: [ {(0.05526,0.00587,0.00247,0.00668)} {(0.02711,0.00041,0.04740,0.00041)} {(0.05761,0.04349,0.01331,0.01305)} {(0.00225,0.56577,0.00225,0.01357)} {(0.02880,0.00652,0.00665,0.03697)} {(0.00025,0.00535,0.00025,0.08712)} {(0.00059,0.00010,0.40611,0.00010)} {(0.00225,0.56577,0.00225,0.01357)} {(0.01059,0.00169,0.00150,0.02757)} {(0.02711,0.00041,0.04740,0.00041)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.04750,0.01961,0.00433,0.00366)} {(0.00044,0 [...]
+[3] CLV 7: [ {(0.00498,0.72266,0.00498,0.02516)} {(0.00162,0.00031,0.59790,0.00031)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.06027,0.04501,0.00853,0.00840)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
+
+
+ TEST alpha(ncats) =   1.00( 1), mode = MEDIAN
 
 1.000000 
 [3] P-matrix for branch length 0.100000
@@ -144,7 +288,43 @@
 [3] CLV 7: [ {(0.00498,0.72266,0.00498,0.02516)} {(0.00162,0.00031,0.59790,0.00031)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.06027,0.04501,0.00853,0.00840)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
 
 
- TEST alpha(ncats) =   1.50( 1)
+ TEST alpha(ncats) =   1.50( 1), mode = MEAN
+
+1.000000 
+[4] P-matrix for branch length 0.100000
++0.9224   +0.0370   +0.0221   +0.0185   
++0.0278   +0.9192   +0.0093   +0.0438   
++0.0663   +0.0370   +0.8782   +0.0185   
++0.0278   +0.0876   +0.0093   +0.8754   
+
+
+[4] P-matrix for branch length 0.200000
++0.8538   +0.0706   +0.0403   +0.0353   
++0.0529   +0.8501   +0.0176   +0.0793   
++0.1209   +0.0706   +0.7732   +0.0353   
++0.0529   +0.1586   +0.0176   +0.7708   
+
+
+[4] P-matrix for branch length 1.000000
++0.5233   +0.2485   +0.1039   +0.1242   
++0.1864   +0.5537   +0.0621   +0.1978   
++0.3118   +0.2485   +0.3155   +0.1242   
++0.1864   +0.3956   +0.0621   +0.3559   
+
+
+[4] P-matrix for branch length 1.000000
++0.5233   +0.2485   +0.1039   +0.1242   
++0.1864   +0.5537   +0.0621   +0.1978   
++0.3118   +0.2485   +0.3155   +0.1242   
++0.1864   +0.3956   +0.0621   +0.3559   
+
+
+[4] CLV 5: [ {(0.06277,0.11243,0.01102,0.13066)} {(0.72901,0.00280,0.01461,0.00280)} {(0.06027,0.04501,0.00853,0.00840)} {(0.00498,0.72266,0.00498,0.02516)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00249,0.06742,0.00249,0.12226)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
+[4] CLV 6: [ {(0.05526,0.00587,0.00247,0.00668)} {(0.02711,0.00041,0.04740,0.00041)} {(0.05761,0.04349,0.01331,0.01305)} {(0.00225,0.56577,0.00225,0.01357)} {(0.02880,0.00652,0.00665,0.03697)} {(0.00025,0.00535,0.00025,0.08712)} {(0.00059,0.00010,0.40611,0.00010)} {(0.00225,0.56577,0.00225,0.01357)} {(0.01059,0.00169,0.00150,0.02757)} {(0.02711,0.00041,0.04740,0.00041)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.04750,0.01961,0.00433,0.00366)} {(0.00044,0 [...]
+[4] CLV 7: [ {(0.00498,0.72266,0.00498,0.02516)} {(0.00162,0.00031,0.59790,0.00031)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.06027,0.04501,0.00853,0.00840)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
+
+
+ TEST alpha(ncats) =   1.50( 1), mode = MEDIAN
 
 1.000000 
 [4] P-matrix for branch length 0.100000
@@ -180,7 +360,43 @@
 [4] CLV 7: [ {(0.00498,0.72266,0.00498,0.02516)} {(0.00162,0.00031,0.59790,0.00031)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.06027,0.04501,0.00853,0.00840)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
 
 
- TEST alpha(ncats) =   5.00( 1)
+ TEST alpha(ncats) =   5.00( 1), mode = MEAN
+
+1.000000 
+[5] P-matrix for branch length 0.100000
++0.9224   +0.0370   +0.0221   +0.0185   
++0.0278   +0.9192   +0.0093   +0.0438   
++0.0663   +0.0370   +0.8782   +0.0185   
++0.0278   +0.0876   +0.0093   +0.8754   
+
+
+[5] P-matrix for branch length 0.200000
++0.8538   +0.0706   +0.0403   +0.0353   
++0.0529   +0.8501   +0.0176   +0.0793   
++0.1209   +0.0706   +0.7732   +0.0353   
++0.0529   +0.1586   +0.0176   +0.7708   
+
+
+[5] P-matrix for branch length 1.000000
++0.5233   +0.2485   +0.1039   +0.1242   
++0.1864   +0.5537   +0.0621   +0.1978   
++0.3118   +0.2485   +0.3155   +0.1242   
++0.1864   +0.3956   +0.0621   +0.3559   
+
+
+[5] P-matrix for branch length 1.000000
++0.5233   +0.2485   +0.1039   +0.1242   
++0.1864   +0.5537   +0.0621   +0.1978   
++0.3118   +0.2485   +0.3155   +0.1242   
++0.1864   +0.3956   +0.0621   +0.3559   
+
+
+[5] CLV 5: [ {(0.06277,0.11243,0.01102,0.13066)} {(0.72901,0.00280,0.01461,0.00280)} {(0.06027,0.04501,0.00853,0.00840)} {(0.00498,0.72266,0.00498,0.02516)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00249,0.06742,0.00249,0.12226)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
+[5] CLV 6: [ {(0.05526,0.00587,0.00247,0.00668)} {(0.02711,0.00041,0.04740,0.00041)} {(0.05761,0.04349,0.01331,0.01305)} {(0.00225,0.56577,0.00225,0.01357)} {(0.02880,0.00652,0.00665,0.03697)} {(0.00025,0.00535,0.00025,0.08712)} {(0.00059,0.00010,0.40611,0.00010)} {(0.00225,0.56577,0.00225,0.01357)} {(0.01059,0.00169,0.00150,0.02757)} {(0.02711,0.00041,0.04740,0.00041)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.04750,0.01961,0.00433,0.00366)} {(0.00044,0 [...]
+[5] CLV 7: [ {(0.00498,0.72266,0.00498,0.02516)} {(0.00162,0.00031,0.59790,0.00031)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.06027,0.04501,0.00853,0.00840)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
+
+
+ TEST alpha(ncats) =   5.00( 1), mode = MEDIAN
 
 1.000000 
 [5] P-matrix for branch length 0.100000
@@ -216,7 +432,7 @@
 [5] CLV 7: [ {(0.00498,0.72266,0.00498,0.02516)} {(0.00162,0.00031,0.59790,0.00031)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.06027,0.04501,0.00853,0.00840)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
 
 
- TEST alpha(ncats) =  10.00( 1)
+ TEST alpha(ncats) =  10.00( 1), mode = MEAN
 
 1.000000 
 [6] P-matrix for branch length 0.100000
@@ -252,90 +468,254 @@
 [6] CLV 7: [ {(0.00498,0.72266,0.00498,0.02516)} {(0.00162,0.00031,0.59790,0.00031)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.06027,0.04501,0.00853,0.00840)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
 
 
- TEST alpha(ncats) =  50.00( 1)
+ TEST alpha(ncats) =  10.00( 1), mode = MEDIAN
 
 1.000000 
-[7] P-matrix for branch length 0.100000
+[6] P-matrix for branch length 0.100000
 +0.9224   +0.0370   +0.0221   +0.0185   
 +0.0278   +0.9192   +0.0093   +0.0438   
 +0.0663   +0.0370   +0.8782   +0.0185   
 +0.0278   +0.0876   +0.0093   +0.8754   
 
 
-[7] P-matrix for branch length 0.200000
+[6] P-matrix for branch length 0.200000
 +0.8538   +0.0706   +0.0403   +0.0353   
 +0.0529   +0.8501   +0.0176   +0.0793   
 +0.1209   +0.0706   +0.7732   +0.0353   
 +0.0529   +0.1586   +0.0176   +0.7708   
 
 
-[7] P-matrix for branch length 1.000000
+[6] P-matrix for branch length 1.000000
 +0.5233   +0.2485   +0.1039   +0.1242   
 +0.1864   +0.5537   +0.0621   +0.1978   
 +0.3118   +0.2485   +0.3155   +0.1242   
 +0.1864   +0.3956   +0.0621   +0.3559   
 
 
-[7] P-matrix for branch length 1.000000
+[6] P-matrix for branch length 1.000000
 +0.5233   +0.2485   +0.1039   +0.1242   
 +0.1864   +0.5537   +0.0621   +0.1978   
 +0.3118   +0.2485   +0.3155   +0.1242   
 +0.1864   +0.3956   +0.0621   +0.3559   
 
 
-[7] CLV 5: [ {(0.06277,0.11243,0.01102,0.13066)} {(0.72901,0.00280,0.01461,0.00280)} {(0.06027,0.04501,0.00853,0.00840)} {(0.00498,0.72266,0.00498,0.02516)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00249,0.06742,0.00249,0.12226)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
-[7] CLV 6: [ {(0.05526,0.00587,0.00247,0.00668)} {(0.02711,0.00041,0.04740,0.00041)} {(0.05761,0.04349,0.01331,0.01305)} {(0.00225,0.56577,0.00225,0.01357)} {(0.02880,0.00652,0.00665,0.03697)} {(0.00025,0.00535,0.00025,0.08712)} {(0.00059,0.00010,0.40611,0.00010)} {(0.00225,0.56577,0.00225,0.01357)} {(0.01059,0.00169,0.00150,0.02757)} {(0.02711,0.00041,0.04740,0.00041)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.04750,0.01961,0.00433,0.00366)} {(0.00044,0 [...]
-[7] CLV 7: [ {(0.00498,0.72266,0.00498,0.02516)} {(0.00162,0.00031,0.59790,0.00031)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.06027,0.04501,0.00853,0.00840)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
+[6] CLV 5: [ {(0.06277,0.11243,0.01102,0.13066)} {(0.72901,0.00280,0.01461,0.00280)} {(0.06027,0.04501,0.00853,0.00840)} {(0.00498,0.72266,0.00498,0.02516)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00249,0.06742,0.00249,0.12226)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
+[6] CLV 6: [ {(0.05526,0.00587,0.00247,0.00668)} {(0.02711,0.00041,0.04740,0.00041)} {(0.05761,0.04349,0.01331,0.01305)} {(0.00225,0.56577,0.00225,0.01357)} {(0.02880,0.00652,0.00665,0.03697)} {(0.00025,0.00535,0.00025,0.08712)} {(0.00059,0.00010,0.40611,0.00010)} {(0.00225,0.56577,0.00225,0.01357)} {(0.01059,0.00169,0.00150,0.02757)} {(0.02711,0.00041,0.04740,0.00041)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.04750,0.01961,0.00433,0.00366)} {(0.00044,0 [...]
+[6] CLV 7: [ {(0.00498,0.72266,0.00498,0.02516)} {(0.00162,0.00031,0.59790,0.00031)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.06027,0.04501,0.00853,0.00840)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
 
 
- TEST alpha(ncats) = 100.00( 1)
+ TEST alpha(ncats) =  50.00( 1), mode = MEAN
 
 1.000000 
-[8] P-matrix for branch length 0.100000
+[7] P-matrix for branch length 0.100000
 +0.9224   +0.0370   +0.0221   +0.0185   
 +0.0278   +0.9192   +0.0093   +0.0438   
 +0.0663   +0.0370   +0.8782   +0.0185   
 +0.0278   +0.0876   +0.0093   +0.8754   
 
 
-[8] P-matrix for branch length 0.200000
+[7] P-matrix for branch length 0.200000
 +0.8538   +0.0706   +0.0403   +0.0353   
 +0.0529   +0.8501   +0.0176   +0.0793   
 +0.1209   +0.0706   +0.7732   +0.0353   
 +0.0529   +0.1586   +0.0176   +0.7708   
 
 
-[8] P-matrix for branch length 1.000000
+[7] P-matrix for branch length 1.000000
 +0.5233   +0.2485   +0.1039   +0.1242   
 +0.1864   +0.5537   +0.0621   +0.1978   
 +0.3118   +0.2485   +0.3155   +0.1242   
 +0.1864   +0.3956   +0.0621   +0.3559   
 
 
-[8] P-matrix for branch length 1.000000
+[7] P-matrix for branch length 1.000000
 +0.5233   +0.2485   +0.1039   +0.1242   
 +0.1864   +0.5537   +0.0621   +0.1978   
 +0.3118   +0.2485   +0.3155   +0.1242   
 +0.1864   +0.3956   +0.0621   +0.3559   
 
 
-[8] CLV 5: [ {(0.06277,0.11243,0.01102,0.13066)} {(0.72901,0.00280,0.01461,0.00280)} {(0.06027,0.04501,0.00853,0.00840)} {(0.00498,0.72266,0.00498,0.02516)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00249,0.06742,0.00249,0.12226)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
-[8] CLV 6: [ {(0.05526,0.00587,0.00247,0.00668)} {(0.02711,0.00041,0.04740,0.00041)} {(0.05761,0.04349,0.01331,0.01305)} {(0.00225,0.56577,0.00225,0.01357)} {(0.02880,0.00652,0.00665,0.03697)} {(0.00025,0.00535,0.00025,0.08712)} {(0.00059,0.00010,0.40611,0.00010)} {(0.00225,0.56577,0.00225,0.01357)} {(0.01059,0.00169,0.00150,0.02757)} {(0.02711,0.00041,0.04740,0.00041)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.04750,0.01961,0.00433,0.00366)} {(0.00044,0 [...]
-[8] CLV 7: [ {(0.00498,0.72266,0.00498,0.02516)} {(0.00162,0.00031,0.59790,0.00031)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.06027,0.04501,0.00853,0.00840)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
+[7] CLV 5: [ {(0.06277,0.11243,0.01102,0.13066)} {(0.72901,0.00280,0.01461,0.00280)} {(0.06027,0.04501,0.00853,0.00840)} {(0.00498,0.72266,0.00498,0.02516)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00249,0.06742,0.00249,0.12226)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
+[7] CLV 6: [ {(0.05526,0.00587,0.00247,0.00668)} {(0.02711,0.00041,0.04740,0.00041)} {(0.05761,0.04349,0.01331,0.01305)} {(0.00225,0.56577,0.00225,0.01357)} {(0.02880,0.00652,0.00665,0.03697)} {(0.00025,0.00535,0.00025,0.08712)} {(0.00059,0.00010,0.40611,0.00010)} {(0.00225,0.56577,0.00225,0.01357)} {(0.01059,0.00169,0.00150,0.02757)} {(0.02711,0.00041,0.04740,0.00041)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.04750,0.01961,0.00433,0.00366)} {(0.00044,0 [...]
+[7] CLV 7: [ {(0.00498,0.72266,0.00498,0.02516)} {(0.00162,0.00031,0.59790,0.00031)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.06027,0.04501,0.00853,0.00840)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
 
 
- TEST alpha(ncats) =   0.10( 2)
+ TEST alpha(ncats) =  50.00( 1), mode = MEDIAN
 
-0.000539 1.999461 
-[0] P-matrix for branch length 0.100000
-+1.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +1.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.9999   +0.0000   
-+0.0000   +0.0001   +0.0000   +0.9999   
+1.000000 
+[7] P-matrix for branch length 0.100000
++0.9224   +0.0370   +0.0221   +0.0185   
++0.0278   +0.9192   +0.0093   +0.0438   
++0.0663   +0.0370   +0.8782   +0.0185   
++0.0278   +0.0876   +0.0093   +0.8754   
 
-+0.8539   +0.0706   +0.0403   +0.0353   
+
+[7] P-matrix for branch length 0.200000
++0.8538   +0.0706   +0.0403   +0.0353   
 +0.0529   +0.8501   +0.0176   +0.0793   
-+0.1208   +0.0706   +0.7733   +0.0353   
++0.1209   +0.0706   +0.7732   +0.0353   
++0.0529   +0.1586   +0.0176   +0.7708   
+
+
+[7] P-matrix for branch length 1.000000
++0.5233   +0.2485   +0.1039   +0.1242   
++0.1864   +0.5537   +0.0621   +0.1978   
++0.3118   +0.2485   +0.3155   +0.1242   
++0.1864   +0.3956   +0.0621   +0.3559   
+
+
+[7] P-matrix for branch length 1.000000
++0.5233   +0.2485   +0.1039   +0.1242   
++0.1864   +0.5537   +0.0621   +0.1978   
++0.3118   +0.2485   +0.3155   +0.1242   
++0.1864   +0.3956   +0.0621   +0.3559   
+
+
+[7] CLV 5: [ {(0.06277,0.11243,0.01102,0.13066)} {(0.72901,0.00280,0.01461,0.00280)} {(0.06027,0.04501,0.00853,0.00840)} {(0.00498,0.72266,0.00498,0.02516)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00249,0.06742,0.00249,0.12226)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
+[7] CLV 6: [ {(0.05526,0.00587,0.00247,0.00668)} {(0.02711,0.00041,0.04740,0.00041)} {(0.05761,0.04349,0.01331,0.01305)} {(0.00225,0.56577,0.00225,0.01357)} {(0.02880,0.00652,0.00665,0.03697)} {(0.00025,0.00535,0.00025,0.08712)} {(0.00059,0.00010,0.40611,0.00010)} {(0.00225,0.56577,0.00225,0.01357)} {(0.01059,0.00169,0.00150,0.02757)} {(0.02711,0.00041,0.04740,0.00041)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.04750,0.01961,0.00433,0.00366)} {(0.00044,0 [...]
+[7] CLV 7: [ {(0.00498,0.72266,0.00498,0.02516)} {(0.00162,0.00031,0.59790,0.00031)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.06027,0.04501,0.00853,0.00840)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
+
+
+ TEST alpha(ncats) = 100.00( 1), mode = MEAN
+
+1.000000 
+[8] P-matrix for branch length 0.100000
++0.9224   +0.0370   +0.0221   +0.0185   
++0.0278   +0.9192   +0.0093   +0.0438   
++0.0663   +0.0370   +0.8782   +0.0185   
++0.0278   +0.0876   +0.0093   +0.8754   
+
+
+[8] P-matrix for branch length 0.200000
++0.8538   +0.0706   +0.0403   +0.0353   
++0.0529   +0.8501   +0.0176   +0.0793   
++0.1209   +0.0706   +0.7732   +0.0353   
++0.0529   +0.1586   +0.0176   +0.7708   
+
+
+[8] P-matrix for branch length 1.000000
++0.5233   +0.2485   +0.1039   +0.1242   
++0.1864   +0.5537   +0.0621   +0.1978   
++0.3118   +0.2485   +0.3155   +0.1242   
++0.1864   +0.3956   +0.0621   +0.3559   
+
+
+[8] P-matrix for branch length 1.000000
++0.5233   +0.2485   +0.1039   +0.1242   
++0.1864   +0.5537   +0.0621   +0.1978   
++0.3118   +0.2485   +0.3155   +0.1242   
++0.1864   +0.3956   +0.0621   +0.3559   
+
+
+[8] CLV 5: [ {(0.06277,0.11243,0.01102,0.13066)} {(0.72901,0.00280,0.01461,0.00280)} {(0.06027,0.04501,0.00853,0.00840)} {(0.00498,0.72266,0.00498,0.02516)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00249,0.06742,0.00249,0.12226)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
+[8] CLV 6: [ {(0.05526,0.00587,0.00247,0.00668)} {(0.02711,0.00041,0.04740,0.00041)} {(0.05761,0.04349,0.01331,0.01305)} {(0.00225,0.56577,0.00225,0.01357)} {(0.02880,0.00652,0.00665,0.03697)} {(0.00025,0.00535,0.00025,0.08712)} {(0.00059,0.00010,0.40611,0.00010)} {(0.00225,0.56577,0.00225,0.01357)} {(0.01059,0.00169,0.00150,0.02757)} {(0.02711,0.00041,0.04740,0.00041)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.04750,0.01961,0.00433,0.00366)} {(0.00044,0 [...]
+[8] CLV 7: [ {(0.00498,0.72266,0.00498,0.02516)} {(0.00162,0.00031,0.59790,0.00031)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.06027,0.04501,0.00853,0.00840)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
+
+
+ TEST alpha(ncats) = 100.00( 1), mode = MEDIAN
+
+1.000000 
+[8] P-matrix for branch length 0.100000
++0.9224   +0.0370   +0.0221   +0.0185   
++0.0278   +0.9192   +0.0093   +0.0438   
++0.0663   +0.0370   +0.8782   +0.0185   
++0.0278   +0.0876   +0.0093   +0.8754   
+
+
+[8] P-matrix for branch length 0.200000
++0.8538   +0.0706   +0.0403   +0.0353   
++0.0529   +0.8501   +0.0176   +0.0793   
++0.1209   +0.0706   +0.7732   +0.0353   
++0.0529   +0.1586   +0.0176   +0.7708   
+
+
+[8] P-matrix for branch length 1.000000
++0.5233   +0.2485   +0.1039   +0.1242   
++0.1864   +0.5537   +0.0621   +0.1978   
++0.3118   +0.2485   +0.3155   +0.1242   
++0.1864   +0.3956   +0.0621   +0.3559   
+
+
+[8] P-matrix for branch length 1.000000
++0.5233   +0.2485   +0.1039   +0.1242   
++0.1864   +0.5537   +0.0621   +0.1978   
++0.3118   +0.2485   +0.3155   +0.1242   
++0.1864   +0.3956   +0.0621   +0.3559   
+
+
+[8] CLV 5: [ {(0.06277,0.11243,0.01102,0.13066)} {(0.72901,0.00280,0.01461,0.00280)} {(0.06027,0.04501,0.00853,0.00840)} {(0.00498,0.72266,0.00498,0.02516)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00249,0.06742,0.00249,0.12226)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
+[8] CLV 6: [ {(0.05526,0.00587,0.00247,0.00668)} {(0.02711,0.00041,0.04740,0.00041)} {(0.05761,0.04349,0.01331,0.01305)} {(0.00225,0.56577,0.00225,0.01357)} {(0.02880,0.00652,0.00665,0.03697)} {(0.00025,0.00535,0.00025,0.08712)} {(0.00059,0.00010,0.40611,0.00010)} {(0.00225,0.56577,0.00225,0.01357)} {(0.01059,0.00169,0.00150,0.02757)} {(0.02711,0.00041,0.04740,0.00041)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.04750,0.01961,0.00433,0.00366)} {(0.00044,0 [...]
+[8] CLV 7: [ {(0.00498,0.72266,0.00498,0.02516)} {(0.00162,0.00031,0.59790,0.00031)} {(0.03014,0.00420,0.00427,0.04081)} {(0.00498,0.72266,0.00498,0.02516)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00125,0.00629,0.00125,0.59411)} {(0.00162,0.00031,0.59790,0.00031)} {(0.00498,0.72266,0.00498,0.02516)} {(0.06027,0.04501,0.00853,0.00840)} {(0.72901,0.00280,0.01461,0.00280)} {(1.00000,1.00000,1.00000,1.00000)} {(1.00000,1.00000,1.00000,1.00000)} {(0.72901,0.00280,0.01461,0.00280)} {(0.00125,0 [...]
+
+
+ TEST alpha(ncats) =   0.10( 2), mode = MEAN
+
+0.000033 1.999967 
+[0] P-matrix for branch length 0.100000
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++0.8538   +0.0706   +0.0403   +0.0353   
++0.0529   +0.8501   +0.0176   +0.0793   
++0.1209   +0.0706   +0.7732   +0.0353   
++0.0529   +0.1586   +0.0176   +0.7708   
+
+
+[0] P-matrix for branch length 0.200000
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++0.7395   +0.1287   +0.0674   +0.0644   
++0.0965   +0.7402   +0.0322   +0.1310   
++0.2023   +0.1287   +0.6046   +0.0644   
++0.0965   +0.2621   +0.0322   +0.6092   
+
+
+[0] P-matrix for branch length 1.000000
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++0.3757   +0.3426   +0.1103   +0.1713   
++0.2570   +0.4466   +0.0857   +0.2108   
++0.3310   +0.3426   +0.1551   +0.1713   
++0.2570   +0.4216   +0.0857   +0.2358   
+
+
+[0] P-matrix for branch length 1.000000
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++0.3757   +0.3426   +0.1103   +0.1713   
++0.2570   +0.4466   +0.0857   +0.2108   
++0.3310   +0.3426   +0.1551   +0.1713   
++0.2570   +0.4216   +0.0857   +0.2358   
+
+
+[0] CLV 5: [ {(0.00000,0.00001,0.00000,0.00001),(0.10348,0.16847,0.03432,0.18496)} {(0.99999,0.00000,0.00000,0.00000),(0.54684,0.00932,0.04091,0.00932)} {(0.00000,0.00000,0.00000,0.00000),(0.09519,0.07147,0.02604,0.02530)} {(0.00000,0.99999,0.00000,0.00000),(0.01657,0.54794,0.01657,0.06869)} {(0.00000,0.00000,0.00000,0.00000),(0.04760,0.01265,0.01302,0.05881)} {(0.00000,0.00000,0.00000,0.00001),(0.00829,0.09700,0.00829,0.15966)} {(0.00000,0.00000,0.99998,0.00000),(0.00455,0.00104,0.36559 [...]
+[0] CLV 6: [ {(0.00000,0.00000,0.00000,0.00000),(0.07998,0.01583,0.01162,0.01693)} {(0.00000,0.00000,0.00000,0.00000),(0.03166,0.00123,0.05969,0.00123)} {(0.00000,0.00000,0.00000,0.00000),(0.08826,0.06826,0.03758,0.03634)} {(0.00000,0.99998,0.00000,0.00000),(0.00720,0.34970,0.00720,0.03696)} {(0.00000,0.00000,0.00000,0.00000),(0.04413,0.01817,0.01879,0.05009)} {(0.00000,0.00000,0.00000,0.00001),(0.00128,0.01254,0.00128,0.08470)} {(0.00000,0.00000,0.99997,0.00000),(0.00126,0.00025,0.17132 [...]
+[0] CLV 7: [ {(0.00000,0.99999,0.00000,0.00000),(0.01657,0.54794,0.01657,0.06869)} {(0.00000,0.00000,0.99998,0.00000),(0.00455,0.00104,0.36559,0.00104)} {(0.00000,0.00000,0.00000,0.00000),(0.04760,0.01265,0.01302,0.05881)} {(0.00000,0.99999,0.00000,0.00000),(0.01657,0.54794,0.01657,0.06869)} {(0.00000,0.00000,0.00000,0.99998),(0.00414,0.01717,0.00414,0.37110)} {(0.00000,0.00000,0.00000,0.99998),(0.00414,0.01717,0.00414,0.37110)} {(0.00000,0.00000,0.99998,0.00000),(0.00455,0.00104,0.36559 [...]
+
+
+ TEST alpha(ncats) =   0.10( 2), mode = MEDIAN
+
+0.000539 1.999461 
+[0] P-matrix for branch length 0.100000
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +0.9999   +0.0000   
++0.0000   +0.0001   +0.0000   +0.9999   
+
++0.8539   +0.0706   +0.0403   +0.0353   
++0.0529   +0.8501   +0.0176   +0.0793   
++0.1208   +0.0706   +0.7733   +0.0353   
 +0.0529   +0.1586   +0.0176   +0.7708   
 
 
@@ -380,7 +760,63 @@
 [0] CLV 7: [ {(0.00000,0.99981,0.00000,0.00000),(0.01656,0.54801,0.01656,0.06867)} {(0.00000,0.00000,0.99972,0.00000),(0.00454,0.00104,0.36568,0.00104)} {(0.00002,0.00000,0.00000,0.00003),(0.04759,0.01265,0.01301,0.05881)} {(0.00000,0.99981,0.00000,0.00000),(0.01656,0.54801,0.01656,0.06867)} {(0.00000,0.00000,0.00000,0.99971),(0.00414,0.01717,0.00414,0.37119)} {(0.00000,0.00000,0.00000,0.99971),(0.00414,0.01717,0.00414,0.37119)} {(0.00000,0.00000,0.99972,0.00000),(0.00454,0.00104,0.36568 [...]
 
 
- TEST alpha(ncats) =   0.50( 2)
+ TEST alpha(ncats) =   0.50( 2), mode = MEAN
+
+0.142516 1.857484 
+[1] P-matrix for branch length 0.100000
++0.9883   +0.0055   +0.0034   +0.0027   
++0.0041   +0.9877   +0.0014   +0.0068   
++0.0102   +0.0055   +0.9815   +0.0027   
++0.0041   +0.0136   +0.0014   +0.9809   
+
++0.8631   +0.0660   +0.0379   +0.0330   
++0.0495   +0.8593   +0.0165   +0.0747   
++0.1137   +0.0660   +0.7873   +0.0330   
++0.0495   +0.1494   +0.0165   +0.7846   
+
+
+[1] P-matrix for branch length 0.200000
++0.9769   +0.0109   +0.0067   +0.0055   
++0.0082   +0.9756   +0.0027   +0.0134   
++0.0202   +0.0109   +0.9634   +0.0055   
++0.0082   +0.0269   +0.0027   +0.9622   
+
++0.7541   +0.1211   +0.0642   +0.0606   
++0.0908   +0.7539   +0.0303   +0.1250   
++0.1926   +0.1211   +0.6257   +0.0606   
++0.0908   +0.2500   +0.0303   +0.6289   
+
+
+[1] P-matrix for branch length 1.000000
++0.8922   +0.0517   +0.0303   +0.0258   
++0.0388   +0.8885   +0.0129   +0.0598   
++0.0908   +0.0517   +0.8317   +0.0258   
++0.0388   +0.1197   +0.0129   +0.8287   
+
++0.3881   +0.3341   +0.1108   +0.1671   
++0.2506   +0.4548   +0.0835   +0.2111   
++0.3323   +0.3341   +0.1666   +0.1671   
++0.2506   +0.4223   +0.0835   +0.2436   
+
+
+[1] P-matrix for branch length 1.000000
++0.8922   +0.0517   +0.0303   +0.0258   
++0.0388   +0.8885   +0.0129   +0.0598   
++0.0908   +0.0517   +0.8317   +0.0258   
++0.0388   +0.1197   +0.0129   +0.8287   
+
++0.3881   +0.3341   +0.1108   +0.1671   
++0.2506   +0.4548   +0.0835   +0.2111   
++0.3323   +0.3341   +0.1666   +0.1671   
++0.2506   +0.4223   +0.0835   +0.2436   
+
+
+[1] CLV 5: [ {(0.01072,0.02110,0.00028,0.02607),(0.09867,0.16271,0.03066,0.17991)} {(0.95431,0.00007,0.00041,0.00007),(0.56871,0.00825,0.03709,0.00825)} {(0.01067,0.00799,0.00022,0.00022),(0.09134,0.06848,0.02333,0.02271)} {(0.00012,0.95189,0.00012,0.00072),(0.01467,0.56837,0.01467,0.06248)} {(0.00533,0.00011,0.00011,0.00788),(0.04567,0.01135,0.01166,0.05713)} {(0.00006,0.01311,0.00006,0.02585),(0.00733,0.09422,0.00733,0.15720)} {(0.00005,0.00001,0.92818,0.00001),(0.00412,0.00092,0.39154 [...]
+[1] CLV 6: [ {(0.01054,0.00017,0.00001,0.00021),(0.07768,0.01441,0.01002,0.01552)} {(0.00635,0.00001,0.00980,0.00001),(0.03165,0.00110,0.05925,0.00110)} {(0.01059,0.00794,0.00037,0.00037),(0.08499,0.06545,0.03402,0.03295)} {(0.00006,0.91728,0.00006,0.00037),(0.00639,0.37245,0.00639,0.03372)} {(0.00529,0.00018,0.00019,0.00775),(0.04249,0.01648,0.01701,0.04897)} {(0.00000,0.00018,0.00000,0.02457),(0.00109,0.01165,0.00109,0.08673)} {(0.00002,0.00000,0.87771,0.00000),(0.00119,0.00023,0.19323 [...]
+[1] CLV 7: [ {(0.00012,0.95189,0.00012,0.00072),(0.01467,0.56837,0.01467,0.06248)} {(0.00005,0.00001,0.92818,0.00001),(0.00412,0.00092,0.39154,0.00092)} {(0.00533,0.00011,0.00011,0.00788),(0.04567,0.01135,0.01166,0.05713)} {(0.00012,0.95189,0.00012,0.00072),(0.01467,0.56837,0.01467,0.06248)} {(0.00003,0.00018,0.00003,0.92586),(0.00367,0.01562,0.00367,0.39555)} {(0.00003,0.00018,0.00003,0.92586),(0.00367,0.01562,0.00367,0.39555)} {(0.00005,0.00001,0.92818,0.00001),(0.00412,0.00092,0.39154 [...]
+
+
+ TEST alpha(ncats) =   0.50( 2), mode = MEDIAN
 
 0.142652 1.857348 
 [1] P-matrix for branch length 0.100000
@@ -436,7 +872,63 @@
 [1] CLV 7: [ {(0.00012,0.95185,0.00012,0.00072),(0.01467,0.56839,0.01467,0.06247)} {(0.00005,0.00001,0.92812,0.00001),(0.00412,0.00092,0.39157,0.00092)} {(0.00534,0.00011,0.00011,0.00789),(0.04567,0.01135,0.01166,0.05713)} {(0.00012,0.95185,0.00012,0.00072),(0.01467,0.56839,0.01467,0.06247)} {(0.00003,0.00018,0.00003,0.92579),(0.00367,0.01562,0.00367,0.39557)} {(0.00003,0.00018,0.00003,0.92579),(0.00367,0.01562,0.00367,0.39557)} {(0.00005,0.00001,0.92812,0.00001),(0.00412,0.00092,0.39157 [...]
 
 
- TEST alpha(ncats) =   0.75( 2)
+ TEST alpha(ncats) =   0.75( 2), mode = MEAN
+
+0.258371 1.741629 
+[2] P-matrix for branch length 0.100000
++0.9790   +0.0099   +0.0061   +0.0050   
++0.0074   +0.9779   +0.0025   +0.0122   
++0.0184   +0.0099   +0.9668   +0.0050   
++0.0074   +0.0244   +0.0025   +0.9657   
+
++0.8707   +0.0622   +0.0359   +0.0311   
++0.0467   +0.8669   +0.0156   +0.0708   
++0.1078   +0.0622   +0.7989   +0.0311   
++0.0467   +0.1417   +0.0156   +0.7961   
+
+
+[2] P-matrix for branch length 0.200000
++0.9587   +0.0196   +0.0119   +0.0098   
++0.0147   +0.9566   +0.0049   +0.0238   
++0.0358   +0.0196   +0.9348   +0.0098   
++0.0147   +0.0476   +0.0049   +0.9329   
+
++0.7664   +0.1148   +0.0614   +0.0574   
++0.0861   +0.7655   +0.0287   +0.1198   
++0.1843   +0.1148   +0.6435   +0.0574   
++0.0861   +0.2395   +0.0287   +0.6457   
+
+
+[2] P-matrix for branch length 1.000000
++0.8175   +0.0887   +0.0494   +0.0444   
++0.0666   +0.8145   +0.0222   +0.0968   
++0.1481   +0.0887   +0.7188   +0.0444   
++0.0666   +0.1936   +0.0222   +0.7177   
+
++0.3997   +0.3263   +0.1109   +0.1631   
++0.2447   +0.4626   +0.0816   +0.2112   
++0.3328   +0.3263   +0.1778   +0.1631   
++0.2447   +0.4223   +0.0816   +0.2514   
+
+
+[2] P-matrix for branch length 1.000000
++0.8175   +0.0887   +0.0494   +0.0444   
++0.0666   +0.8145   +0.0222   +0.0968   
++0.1481   +0.0887   +0.7188   +0.0444   
++0.0666   +0.1936   +0.0222   +0.7177   
+
++0.3997   +0.3263   +0.1109   +0.1631   
++0.2447   +0.4626   +0.0816   +0.2112   
++0.3328   +0.3263   +0.1778   +0.1631   
++0.2447   +0.4223   +0.0816   +0.2514   
+
+
+[2] CLV 5: [ {(0.01896,0.03679,0.00089,0.04507),(0.09455,0.15756,0.02774,0.17528)} {(0.91910,0.00022,0.00128,0.00022),(0.58738,0.00741,0.03396,0.00741)} {(0.01876,0.01404,0.00070,0.00070),(0.08796,0.06589,0.02115,0.02062)} {(0.00038,0.91517,0.00038,0.00226),(0.01317,0.58594,0.01317,0.05737)} {(0.00938,0.00035,0.00035,0.01369),(0.04398,0.01031,0.01058,0.05558)} {(0.00019,0.02275,0.00019,0.04437),(0.00659,0.09167,0.00659,0.15466)} {(0.00014,0.00002,0.87387,0.00002),(0.00377,0.00082,0.41415 [...]
+[2] CLV 6: [ {(0.01836,0.00054,0.00006,0.00065),(0.07555,0.01324,0.00877,0.01435)} {(0.01075,0.00003,0.01694,0.00003),(0.03154,0.00100,0.05865,0.00100)} {(0.01852,0.01388,0.00117,0.00116),(0.08209,0.06302,0.03112,0.03018)} {(0.00019,0.85616,0.00019,0.00117),(0.00576,0.39257,0.00576,0.03102)} {(0.00926,0.00058,0.00058,0.01330),(0.04105,0.01509,0.01556,0.04793)} {(0.00001,0.00054,0.00001,0.04049),(0.00095,0.01088,0.00095,0.08815)} {(0.00007,0.00001,0.78977,0.00001),(0.00112,0.00021,0.21323 [...]
+[2] CLV 7: [ {(0.00038,0.91517,0.00038,0.00226),(0.01317,0.58594,0.01317,0.05737)} {(0.00014,0.00002,0.87387,0.00002),(0.00377,0.00082,0.41415,0.00082)} {(0.00938,0.00035,0.00035,0.01369),(0.04398,0.01031,0.01058,0.05558)} {(0.00038,0.91517,0.00038,0.00226),(0.01317,0.58594,0.01317,0.05737)} {(0.00010,0.00057,0.00010,0.87023),(0.00329,0.01434,0.00329,0.41694)} {(0.00010,0.00057,0.00010,0.87023),(0.00329,0.01434,0.00329,0.41694)} {(0.00014,0.00002,0.87387,0.00002),(0.00377,0.00082,0.41415 [...]
+
+
+ TEST alpha(ncats) =   0.75( 2), mode = MEDIAN
 
 0.235541 1.764459 
 [2] P-matrix for branch length 0.100000
@@ -492,7 +984,63 @@
 [2] CLV 7: [ {(0.00032,0.92224,0.00032,0.00190),(0.01346,0.58241,0.01346,0.05838)} {(0.00012,0.00002,0.88430,0.00002),(0.00384,0.00084,0.40958,0.00084)} {(0.00860,0.00029,0.00029,0.01259),(0.04432,0.01051,0.01079,0.05590)} {(0.00032,0.92224,0.00032,0.00190),(0.01346,0.58241,0.01346,0.05838)} {(0.00008,0.00047,0.00008,0.88088),(0.00337,0.01459,0.00337,0.41261)} {(0.00008,0.00047,0.00008,0.88088),(0.00337,0.01459,0.00337,0.41261)} {(0.00012,0.00002,0.88430,0.00002),(0.00384,0.00084,0.40958 [...]
 
 
- TEST alpha(ncats) =   1.00( 2)
+ TEST alpha(ncats) =   1.00( 2), mode = MEAN
+
+0.343711 1.656289 
+[3] P-matrix for branch length 0.100000
++0.9722   +0.0131   +0.0081   +0.0066   
++0.0098   +0.9708   +0.0033   +0.0161   
++0.0242   +0.0131   +0.9561   +0.0066   
++0.0098   +0.0322   +0.0033   +0.9547   
+
++0.8764   +0.0594   +0.0344   +0.0297   
++0.0446   +0.8726   +0.0149   +0.0679   
++0.1033   +0.0594   +0.8076   +0.0297   
++0.0446   +0.1359   +0.0149   +0.8047   
+
+
+[3] P-matrix for branch length 0.200000
++0.9456   +0.0258   +0.0156   +0.0129   
++0.0194   +0.9431   +0.0065   +0.0311   
++0.0469   +0.0258   +0.9144   +0.0129   
++0.0194   +0.0622   +0.0065   +0.9120   
+
++0.7757   +0.1100   +0.0593   +0.0550   
++0.0825   +0.7743   +0.0275   +0.1157   
++0.1779   +0.1100   +0.6571   +0.0550   
++0.0825   +0.2315   +0.0275   +0.6585   
+
+
+[3] P-matrix for branch length 1.000000
++0.7689   +0.1135   +0.0609   +0.0567   
++0.0851   +0.7678   +0.0284   +0.1187   
++0.1826   +0.1135   +0.6472   +0.0567   
++0.0851   +0.2374   +0.0284   +0.6491   
+
++0.4092   +0.3199   +0.1110   +0.1599   
++0.2399   +0.4691   +0.0800   +0.2110   
++0.3329   +0.3199   +0.1873   +0.1599   
++0.2399   +0.4220   +0.0800   +0.2581   
+
+
+[3] P-matrix for branch length 1.000000
++0.7689   +0.1135   +0.0609   +0.0567   
++0.0851   +0.7678   +0.0284   +0.1187   
++0.1826   +0.1135   +0.6472   +0.0567   
++0.0851   +0.2374   +0.0284   +0.6491   
+
++0.4092   +0.3199   +0.1110   +0.1599   
++0.2399   +0.4691   +0.0800   +0.2110   
++0.3329   +0.3199   +0.1873   +0.1599   
++0.2399   +0.4220   +0.0800   +0.2581   
+
+
+[3] CLV 5: [ {(0.02475,0.04759,0.00154,0.05791),(0.09138,0.15349,0.02562,0.17153)} {(0.89421,0.00038,0.00220,0.00038),(0.60168,0.00681,0.03166,0.00681)} {(0.02442,0.01827,0.00121,0.00120),(0.08533,0.06388,0.01957,0.01910)} {(0.00067,0.88941,0.00067,0.00387),(0.01210,0.59947,0.01210,0.05358)} {(0.01221,0.00060,0.00061,0.01766),(0.04267,0.00955,0.00979,0.05433)} {(0.00033,0.02932,0.00033,0.05671),(0.00605,0.08961,0.00605,0.15243)} {(0.00024,0.00004,0.83605,0.00004),(0.00352,0.00076,0.43173 [...]
+[3] CLV 6: [ {(0.02372,0.00092,0.00014,0.00111),(0.07384,0.01238,0.00789,0.01348)} {(0.01359,0.00006,0.02174,0.00006),(0.03138,0.00093,0.05803,0.00093)} {(0.02400,0.01800,0.00200,0.00198),(0.07982,0.06114,0.02898,0.02814)} {(0.00032,0.81434,0.00032,0.00201),(0.00531,0.40840,0.00531,0.02900)} {(0.01200,0.00099,0.00100,0.01700),(0.03991,0.01407,0.01449,0.04706)} {(0.00001,0.00091,0.00001,0.05024),(0.00085,0.01029,0.00085,0.08903)} {(0.00011,0.00002,0.73088,0.00002),(0.00107,0.00020,0.22937 [...]
+[3] CLV 7: [ {(0.00067,0.88941,0.00067,0.00387),(0.01210,0.59947,0.01210,0.05358)} {(0.00024,0.00004,0.83605,0.00004),(0.00352,0.00076,0.43173,0.00076)} {(0.01221,0.00060,0.00061,0.01766),(0.04267,0.00955,0.00979,0.05433)} {(0.00067,0.88941,0.00067,0.00387),(0.01210,0.59947,0.01210,0.05358)} {(0.00017,0.00097,0.00017,0.83173),(0.00303,0.01340,0.00303,0.43364)} {(0.00017,0.00097,0.00017,0.83173),(0.00303,0.01340,0.00303,0.43364)} {(0.00024,0.00004,0.83605,0.00004),(0.00352,0.00076,0.43173 [...]
+
+
+ TEST alpha(ncats) =   1.00( 2), mode = MEDIAN
 
 0.306853 1.693147 
 [3] P-matrix for branch length 0.100000
@@ -548,7 +1096,63 @@
 [3] CLV 7: [ {(0.00054,0.90041,0.00054,0.00313),(0.01256,0.59356,0.01256,0.05522)} {(0.00020,0.00003,0.85216,0.00003),(0.00363,0.00079,0.42404,0.00079)} {(0.01100,0.00049,0.00049,0.01598),(0.04324,0.00988,0.01013,0.05488)} {(0.00054,0.90041,0.00054,0.00313),(0.01256,0.59356,0.01256,0.05522)} {(0.00013,0.00078,0.00013,0.84811),(0.00314,0.01380,0.00314,0.42633)} {(0.00013,0.00078,0.00013,0.84811),(0.00314,0.01380,0.00314,0.42633)} {(0.00020,0.00003,0.85216,0.00003),(0.00363,0.00079,0.42404 [...]
 
 
- TEST alpha(ncats) =   1.50( 2)
+ TEST alpha(ncats) =   1.50( 2), mode = MEAN
+
+0.455764 1.544236 
+[4] P-matrix for branch length 0.100000
++0.9634   +0.0173   +0.0106   +0.0087   
++0.0130   +0.9616   +0.0043   +0.0211   
++0.0318   +0.0173   +0.9422   +0.0087   
++0.0130   +0.0422   +0.0043   +0.9405   
+
++0.8840   +0.0557   +0.0324   +0.0278   
++0.0418   +0.8802   +0.0139   +0.0641   
++0.0973   +0.0557   +0.8192   +0.0278   
++0.0418   +0.1281   +0.0139   +0.8162   
+
+
+[4] P-matrix for branch length 0.200000
++0.9289   +0.0339   +0.0203   +0.0169   
++0.0254   +0.9258   +0.0085   +0.0403   
++0.0609   +0.0339   +0.8883   +0.0169   
++0.0254   +0.0806   +0.0085   +0.8855   
+
++0.7882   +0.1036   +0.0564   +0.0518   
++0.0777   +0.7861   +0.0259   +0.1102   
++0.1692   +0.1036   +0.6753   +0.0518   
++0.0777   +0.2205   +0.0259   +0.6759   
+
+
+[4] P-matrix for branch length 1.000000
++0.7123   +0.1430   +0.0732   +0.0715   
++0.1073   +0.7151   +0.0358   +0.1419   
++0.2196   +0.1430   +0.5658   +0.0715   
++0.1073   +0.2837   +0.0358   +0.5733   
+
++0.4232   +0.3107   +0.1108   +0.1553   
++0.2330   +0.4789   +0.0777   +0.2105   
++0.3324   +0.3107   +0.2016   +0.1553   
++0.2330   +0.4209   +0.0777   +0.2684   
+
+
+[4] P-matrix for branch length 1.000000
++0.7123   +0.1430   +0.0732   +0.0715   
++0.1073   +0.7151   +0.0358   +0.1419   
++0.2196   +0.1430   +0.5658   +0.0715   
++0.1073   +0.2837   +0.0358   +0.5733   
+
++0.4232   +0.3107   +0.1108   +0.1553   
++0.2330   +0.4789   +0.0777   +0.2105   
++0.3324   +0.3107   +0.2016   +0.1553   
++0.2330   +0.4209   +0.0777   +0.2684   
+
+
+[4] CLV 5: [ {(0.03204,0.06083,0.00264,0.07342),(0.08704,0.14776,0.02291,0.16614)} {(0.86282,0.00065,0.00371,0.00065),(0.62118,0.00604,0.02864,0.00604)} {(0.03147,0.02352,0.00206,0.00205),(0.08168,0.06110,0.01754,0.01713)} {(0.00115,0.85715,0.00115,0.00650),(0.01074,0.61802,0.01074,0.04860)} {(0.01573,0.00102,0.00103,0.02250),(0.04084,0.00857,0.00877,0.05253)} {(0.00057,0.03731,0.00057,0.07137),(0.00537,0.08666,0.00537,0.14901)} {(0.00041,0.00007,0.78903,0.00007),(0.00318,0.00067,0.45608 [...]
+[4] CLV 6: [ {(0.03027,0.00154,0.00032,0.00183),(0.07137,0.01124,0.00678,0.01232)} {(0.01688,0.00010,0.02748,0.00010),(0.03106,0.00083,0.05700,0.00083)} {(0.03076,0.02308,0.00337,0.00334),(0.07665,0.05854,0.02619,0.02547)} {(0.00054,0.76323,0.00054,0.00341),(0.00473,0.43059,0.00473,0.02633)} {(0.01538,0.00167,0.00168,0.02141),(0.03833,0.01273,0.01310,0.04580)} {(0.00003,0.00151,0.00003,0.06084),(0.00072,0.00949,0.00072,0.08991)} {(0.00018,0.00003,0.66041,0.00003),(0.00100,0.00018,0.25255 [...]
+[4] CLV 7: [ {(0.00115,0.85715,0.00115,0.00650),(0.01074,0.61802,0.01074,0.04860)} {(0.00041,0.00007,0.78903,0.00007),(0.00318,0.00067,0.45608,0.00067)} {(0.01573,0.00102,0.00103,0.02250),(0.04084,0.00857,0.00877,0.05253)} {(0.00115,0.85715,0.00115,0.00650),(0.01074,0.61802,0.01074,0.04860)} {(0.00029,0.00162,0.00029,0.78416),(0.00268,0.01215,0.00268,0.45686)} {(0.00029,0.00162,0.00029,0.78416),(0.00268,0.01215,0.00268,0.45686)} {(0.00041,0.00007,0.78903,0.00007),(0.00318,0.00067,0.45608 [...]
+
+
+ TEST alpha(ncats) =   1.50( 2), mode = MEDIAN
 
 0.406939 1.593061 
 [4] P-matrix for branch length 0.100000
@@ -604,18 +1208,74 @@
 [4] CLV 7: [ {(0.00092,0.87099,0.00092,0.00528),(0.01133,0.60982,0.01133,0.05077)} {(0.00033,0.00006,0.80916,0.00006),(0.00333,0.00071,0.44529,0.00071)} {(0.01422,0.00083,0.00083,0.02044),(0.04165,0.00899,0.00921,0.05334)} {(0.00092,0.87099,0.00092,0.00528),(0.01133,0.60982,0.01133,0.05077)} {(0.00023,0.00132,0.00023,0.80449),(0.00283,0.01269,0.00283,0.44656)} {(0.00023,0.00132,0.00023,0.80449),(0.00283,0.01269,0.00283,0.44656)} {(0.00033,0.00006,0.80916,0.00006),(0.00333,0.00071,0.44529 [...]
 
 
- TEST alpha(ncats) =   5.00( 2)
+ TEST alpha(ncats) =   5.00( 2), mode = MEAN
 
-0.653019 1.346981 
+0.698660 1.301340 
 [5] P-matrix for branch length 0.100000
-+0.9482   +0.0246   +0.0149   +0.0123   
-+0.0184   +0.9458   +0.0061   +0.0296   
-+0.0447   +0.0246   +0.9184   +0.0123   
-+0.0184   +0.0593   +0.0061   +0.9162   
++0.9448   +0.0262   +0.0159   +0.0131   
++0.0197   +0.9422   +0.0066   +0.0316   
++0.0476   +0.0262   +0.9130   +0.0131   
++0.0197   +0.0631   +0.0066   +0.9106   
 
-+0.8976   +0.0490   +0.0288   +0.0245   
-+0.0368   +0.8940   +0.0123   +0.0570   
-+0.0864   +0.0490   +0.8400   +0.0245   
++0.9008   +0.0475   +0.0280   +0.0237   
++0.0356   +0.8972   +0.0119   +0.0553   
++0.0839   +0.0475   +0.8449   +0.0237   
++0.0356   +0.1106   +0.0119   +0.8419   
+
+
+[5] P-matrix for branch length 0.200000
++0.8941   +0.0507   +0.0298   +0.0254   
++0.0381   +0.8904   +0.0127   +0.0588   
++0.0893   +0.0507   +0.8346   +0.0254   
++0.0381   +0.1176   +0.0127   +0.8316   
+
++0.8164   +0.0893   +0.0496   +0.0447   
++0.0670   +0.8134   +0.0223   +0.0973   
++0.1489   +0.0893   +0.7171   +0.0447   
++0.0670   +0.1946   +0.0223   +0.7160   
+
+
+[5] P-matrix for branch length 1.000000
++0.6128   +0.1970   +0.0917   +0.0985   
++0.1478   +0.6272   +0.0493   +0.1758   
++0.2750   +0.1970   +0.4295   +0.0985   
++0.1478   +0.3516   +0.0493   +0.4514   
+
++0.4603   +0.2869   +0.1093   +0.1435   
++0.2152   +0.5056   +0.0717   +0.2075   
++0.3279   +0.2869   +0.2417   +0.1435   
++0.2152   +0.4149   +0.0717   +0.2981   
+
+
+[5] P-matrix for branch length 1.000000
++0.6128   +0.1970   +0.0917   +0.0985   
++0.1478   +0.6272   +0.0493   +0.1758   
++0.2750   +0.1970   +0.4295   +0.0985   
++0.1478   +0.3516   +0.0493   +0.4514   
+
++0.4603   +0.2869   +0.1093   +0.1435   
++0.2152   +0.5056   +0.0717   +0.2075   
++0.3279   +0.2869   +0.2417   +0.1435   
++0.2152   +0.4149   +0.0717   +0.2981   
+
+
+[5] CLV 5: [ {(0.04666,0.08627,0.00582,0.10231),(0.07690,0.13364,0.01729,0.15241)} {(0.79947,0.00145,0.00797,0.00145),(0.66648,0.00449,0.02218,0.00449)} {(0.04537,0.03389,0.00453,0.00448),(0.07292,0.05448,0.01330,0.01304)} {(0.00258,0.79287,0.00258,0.01384),(0.00798,0.66156,0.00798,0.03789)} {(0.02269,0.00224,0.00226,0.03165),(0.03646,0.00652,0.00665,0.04797)} {(0.00129,0.05238,0.00129,0.09784),(0.00399,0.07916,0.00399,0.13937)} {(0.00089,0.00016,0.69661,0.00016),(0.00246,0.00050,0.51422 [...]
+[5] CLV 6: [ {(0.04272,0.00325,0.00099,0.00379),(0.06509,0.00879,0.00462,0.00978)} {(0.02248,0.00022,0.03790,0.00022),(0.02985,0.00063,0.05375,0.00063)} {(0.04389,0.03299,0.00724,0.00714),(0.06895,0.05236,0.02025,0.01976)} {(0.00119,0.66564,0.00119,0.00738),(0.00355,0.48479,0.00355,0.02053)} {(0.02194,0.00357,0.00362,0.02942),(0.03448,0.00988,0.01013,0.04248)} {(0.00010,0.00309,0.00010,0.07687),(0.00048,0.00768,0.00048,0.09042)} {(0.00035,0.00006,0.53089,0.00006),(0.00083,0.00015,0.31173 [...]
+[5] CLV 7: [ {(0.00258,0.79287,0.00258,0.01384),(0.00798,0.66156,0.00798,0.03789)} {(0.00089,0.00016,0.69661,0.00016),(0.00246,0.00050,0.51422,0.00050)} {(0.02269,0.00224,0.00226,0.03165),(0.03646,0.00652,0.00665,0.04797)} {(0.00258,0.79287,0.00258,0.01384),(0.00798,0.66156,0.00798,0.03789)} {(0.00064,0.00346,0.00064,0.69157),(0.00199,0.00947,0.00199,0.51271)} {(0.00064,0.00346,0.00064,0.69157),(0.00199,0.00947,0.00199,0.51271)} {(0.00089,0.00016,0.69661,0.00016),(0.00246,0.00050,0.51422 [...]
+
+
+ TEST alpha(ncats) =   5.00( 2), mode = MEDIAN
+
+0.653019 1.346981 
+[5] P-matrix for branch length 0.100000
++0.9482   +0.0246   +0.0149   +0.0123   
++0.0184   +0.9458   +0.0061   +0.0296   
++0.0447   +0.0246   +0.9184   +0.0123   
++0.0184   +0.0593   +0.0061   +0.9162   
+
++0.8976   +0.0490   +0.0288   +0.0245   
++0.0368   +0.8940   +0.0123   +0.0570   
++0.0864   +0.0490   +0.8400   +0.0245   
 +0.0368   +0.1140   +0.0123   +0.8370   
 
 
@@ -660,7 +1320,63 @@
 [5] CLV 7: [ {(0.00227,0.80439,0.00227,0.01231),(0.00847,0.65301,0.00847,0.03988)} {(0.00079,0.00014,0.71304,0.00014),(0.00260,0.00053,0.50270,0.00053)} {(0.02145,0.00198,0.00200,0.03006),(0.03733,0.00689,0.00704,0.04890)} {(0.00227,0.80439,0.00227,0.01231),(0.00847,0.65301,0.00847,0.03988)} {(0.00057,0.00308,0.00057,0.70794),(0.00212,0.00997,0.00212,0.50160)} {(0.00057,0.00308,0.00057,0.70794),(0.00212,0.00997,0.00212,0.50160)} {(0.00079,0.00014,0.71304,0.00014),(0.00260,0.00053,0.50270 [...]
 
 
- TEST alpha(ncats) =  10.00( 2)
+ TEST alpha(ncats) =  10.00( 2), mode = MEAN
+
+0.786761 1.213239 
+[6] P-matrix for branch length 0.100000
++0.9381   +0.0294   +0.0177   +0.0147   
++0.0221   +0.9354   +0.0074   +0.0352   
++0.0532   +0.0294   +0.9027   +0.0147   
++0.0221   +0.0704   +0.0074   +0.9001   
+
++0.9071   +0.0444   +0.0263   +0.0222   
++0.0333   +0.9035   +0.0111   +0.0520   
++0.0788   +0.0444   +0.8545   +0.0222   
++0.0333   +0.1041   +0.0111   +0.8515   
+
+
+[6] P-matrix for branch length 0.200000
++0.8820   +0.0567   +0.0330   +0.0283   
++0.0425   +0.8782   +0.0142   +0.0651   
++0.0989   +0.0567   +0.8161   +0.0283   
++0.0425   +0.1302   +0.0142   +0.8132   
+
++0.8270   +0.0840   +0.0470   +0.0420   
++0.0630   +0.8237   +0.0210   +0.0923   
++0.1411   +0.0840   +0.7330   +0.0420   
++0.0630   +0.1846   +0.0210   +0.7315   
+
+
+[6] P-matrix for branch length 1.000000
++0.5833   +0.2137   +0.0962   +0.1068   
++0.1602   +0.6023   +0.0534   +0.1840   
++0.2887   +0.2137   +0.3908   +0.1068   
++0.1602   +0.3681   +0.0534   +0.4183   
+
++0.4765   +0.2768   +0.1082   +0.1384   
++0.2076   +0.5177   +0.0692   +0.2055   
++0.3247   +0.2768   +0.2601   +0.1384   
++0.2076   +0.4110   +0.0692   +0.3122   
+
+
+[6] P-matrix for branch length 1.000000
++0.5833   +0.2137   +0.0962   +0.1068   
++0.1602   +0.6023   +0.0534   +0.1840   
++0.2887   +0.2137   +0.3908   +0.1068   
++0.1602   +0.3681   +0.0534   +0.4183   
+
++0.4765   +0.2768   +0.1082   +0.1384   
++0.2076   +0.5177   +0.0692   +0.2055   
++0.3247   +0.2768   +0.2601   +0.1384   
++0.2076   +0.4110   +0.0692   +0.3122   
+
+
+[6] CLV 5: [ {(0.05159,0.09449,0.00721,0.11139),(0.07296,0.12790,0.01537,0.14664)} {(0.77799,0.00181,0.00978,0.00181),(0.68400,0.00396,0.01990,0.00396)} {(0.04998,0.03733,0.00560,0.00553),(0.06943,0.05187,0.01184,0.01162)} {(0.00321,0.77131,0.00321,0.01695),(0.00705,0.67856,0.00705,0.03407)} {(0.02499,0.00277,0.00280,0.03456),(0.03472,0.00581,0.00592,0.04606)} {(0.00161,0.05716,0.00161,0.10585),(0.00352,0.07603,0.00352,0.13502)} {(0.00109,0.00020,0.66604,0.00020),(0.00221,0.00044,0.53728 [...]
+[6] CLV 6: [ {(0.04670,0.00397,0.00135,0.00459),(0.06246,0.00792,0.00393,0.00886)} {(0.02407,0.00027,0.04104,0.00027),(0.02921,0.00056,0.05218,0.00056)} {(0.04817,0.03625,0.00890,0.00875),(0.06586,0.04992,0.01816,0.01774)} {(0.00147,0.63422,0.00147,0.00907),(0.00315,0.50676,0.00315,0.01845)} {(0.02409,0.00438,0.00445,0.03188),(0.03293,0.00887,0.00908,0.04105)} {(0.00014,0.00373,0.00014,0.08079),(0.00041,0.00700,0.00041,0.09000)} {(0.00042,0.00007,0.49072,0.00007),(0.00076,0.00014,0.33667 [...]
+[6] CLV 7: [ {(0.00321,0.77131,0.00321,0.01695),(0.00705,0.67856,0.00705,0.03407)} {(0.00109,0.00020,0.66604,0.00020),(0.00221,0.00044,0.53728,0.00044)} {(0.02499,0.00277,0.00280,0.03456),(0.03472,0.00581,0.00592,0.04606)} {(0.00321,0.77131,0.00321,0.01695),(0.00705,0.67856,0.00705,0.03407)} {(0.00080,0.00424,0.00080,0.66122),(0.00176,0.00852,0.00176,0.53502)} {(0.00080,0.00424,0.00080,0.66122),(0.00176,0.00852,0.00176,0.53502)} {(0.00109,0.00020,0.66604,0.00020),(0.00221,0.00044,0.53728 [...]
+
+
+ TEST alpha(ncats) =  10.00( 2), mode = MEDIAN
 
 0.751180 1.248820 
 [6] P-matrix for branch length 0.100000
@@ -716,7 +1432,63 @@
 [6] CLV 7: [ {(0.00295,0.77991,0.00295,0.01567),(0.00742,0.67161,0.00742,0.03561)} {(0.00100,0.00018,0.67821,0.00018),(0.00231,0.00046,0.52783,0.00046)} {(0.02407,0.00255,0.00258,0.03341),(0.03543,0.00609,0.00621,0.04684)} {(0.00295,0.77991,0.00295,0.01567),(0.00742,0.67161,0.00742,0.03561)} {(0.00074,0.00392,0.00074,0.67328),(0.00185,0.00890,0.00185,0.52587)} {(0.00074,0.00392,0.00074,0.67328),(0.00185,0.00890,0.00185,0.52587)} {(0.00100,0.00018,0.67821,0.00018),(0.00231,0.00046,0.52783 [...]
 
 
- TEST alpha(ncats) =  50.00( 2)
+ TEST alpha(ncats) =  50.00( 2), mode = MEAN
+
+0.904614 1.095386 
+[7] P-matrix for branch length 0.100000
++0.9294   +0.0336   +0.0202   +0.0168   
++0.0252   +0.9263   +0.0084   +0.0400   
++0.0605   +0.0336   +0.8891   +0.0168   
++0.0252   +0.0800   +0.0084   +0.8863   
+
++0.9155   +0.0404   +0.0240   +0.0202   
++0.0303   +0.9121   +0.0101   +0.0475   
++0.0720   +0.0404   +0.8675   +0.0202   
++0.0303   +0.0951   +0.0101   +0.8646   
+
+
+[7] P-matrix for branch length 0.200000
++0.8663   +0.0644   +0.0371   +0.0322   
++0.0483   +0.8625   +0.0161   +0.0731   
++0.1113   +0.0644   +0.7921   +0.0322   
++0.0483   +0.1462   +0.0161   +0.7893   
+
++0.8417   +0.0766   +0.0434   +0.0383   
++0.0575   +0.8381   +0.0192   +0.0853   
++0.1301   +0.0766   +0.7549   +0.0383   
++0.0575   +0.1705   +0.0192   +0.7528   
+
+
+[7] P-matrix for branch length 1.000000
++0.5483   +0.2338   +0.1010   +0.1169   
++0.1753   +0.5736   +0.0584   +0.1926   
++0.3030   +0.2338   +0.3463   +0.1169   
++0.1753   +0.3851   +0.0584   +0.3811   
+
++0.5010   +0.2619   +0.1062   +0.1309   
++0.1964   +0.5363   +0.0655   +0.2018   
++0.3186   +0.2619   +0.2886   +0.1309   
++0.1964   +0.4037   +0.0655   +0.3344   
+
+
+[7] P-matrix for branch length 1.000000
++0.5483   +0.2338   +0.1010   +0.1169   
++0.1753   +0.5736   +0.0584   +0.1926   
++0.3030   +0.2338   +0.3463   +0.1169   
++0.1753   +0.3851   +0.0584   +0.3811   
+
++0.5010   +0.2619   +0.1062   +0.1309   
++0.1964   +0.5363   +0.0655   +0.2018   
++0.3186   +0.2619   +0.2886   +0.1309   
++0.1964   +0.4037   +0.0655   +0.3344   
+
+
+[7] CLV 5: [ {(0.05789,0.10473,0.00925,0.12248),(0.06744,0.11963,0.01291,0.13818)} {(0.75040,0.00234,0.01238,0.00234),(0.70840,0.00330,0.01693,0.00330)} {(0.05582,0.04168,0.00717,0.00707),(0.06450,0.04817,0.00997,0.00980)} {(0.00415,0.74383,0.00415,0.02138),(0.00587,0.70240,0.00587,0.02908)} {(0.02791,0.00353,0.00358,0.03815),(0.03225,0.00490,0.00499,0.04327)} {(0.00208,0.06305,0.00208,0.11542),(0.00294,0.07146,0.00294,0.12838)} {(0.00138,0.00026,0.62739,0.00026),(0.00188,0.00037,0.56990 [...]
+[7] CLV 6: [ {(0.05161,0.00500,0.00193,0.00573),(0.05864,0.00677,0.00308,0.00765)} {(0.02588,0.00034,0.04476,0.00034),(0.02816,0.00047,0.04972,0.00047)} {(0.05354,0.04036,0.01127,0.01107),(0.06143,0.04646,0.01543,0.01511)} {(0.00189,0.59513,0.00189,0.01150),(0.00264,0.53830,0.00264,0.01572)} {(0.02677,0.00553,0.00564,0.03483),(0.03072,0.00755,0.00772,0.03890)} {(0.00019,0.00461,0.00019,0.08479),(0.00032,0.00609,0.00032,0.08876)} {(0.00052,0.00009,0.44190,0.00009),(0.00067,0.00012,0.37335 [...]
+[7] CLV 7: [ {(0.00415,0.74383,0.00415,0.02138),(0.00587,0.70240,0.00587,0.02908)} {(0.00138,0.00026,0.62739,0.00026),(0.00188,0.00037,0.56990,0.00037)} {(0.02791,0.00353,0.00358,0.03815),(0.03225,0.00490,0.00499,0.04327)} {(0.00415,0.74383,0.00415,0.02138),(0.00587,0.70240,0.00587,0.02908)} {(0.00104,0.00534,0.00104,0.62307),(0.00147,0.00727,0.00147,0.56675)} {(0.00104,0.00534,0.00104,0.62307),(0.00147,0.00727,0.00147,0.56675)} {(0.00138,0.00026,0.62739,0.00026),(0.00188,0.00037,0.56990 [...]
+
+
+ TEST alpha(ncats) =  50.00( 2), mode = MEDIAN
 
 0.887475 1.112525 
 [7] P-matrix for branch length 0.100000
@@ -772,7 +1544,63 @@
 [7] CLV 7: [ {(0.00401,0.74773,0.00401,0.02072),(0.00604,0.69886,0.00604,0.02980)} {(0.00133,0.00025,0.63286,0.00025),(0.00193,0.00038,0.56503,0.00038)} {(0.02750,0.00342,0.00347,0.03765),(0.03262,0.00503,0.00512,0.04369)} {(0.00401,0.74773,0.00401,0.02072),(0.00604,0.69886,0.00604,0.02980)} {(0.00100,0.00518,0.00100,0.62845),(0.00151,0.00745,0.00151,0.56200)} {(0.00100,0.00518,0.00100,0.62845),(0.00151,0.00745,0.00151,0.56200)} {(0.00133,0.00025,0.63286,0.00025),(0.00193,0.00038,0.56503 [...]
 
 
- TEST alpha(ncats) = 100.00( 2)
+ TEST alpha(ncats) = 100.00( 2), mode = MEAN
+
+0.932551 1.067449 
+[8] P-matrix for branch length 0.100000
++0.9273   +0.0346   +0.0207   +0.0173   
++0.0260   +0.9242   +0.0087   +0.0411   
++0.0622   +0.0346   +0.8859   +0.0173   
++0.0260   +0.0823   +0.0087   +0.8831   
+
++0.9175   +0.0394   +0.0234   +0.0197   
++0.0295   +0.9142   +0.0098   +0.0465   
++0.0703   +0.0394   +0.8706   +0.0197   
++0.0295   +0.0929   +0.0098   +0.8677   
+
+
+[8] P-matrix for branch length 0.200000
++0.8626   +0.0663   +0.0380   +0.0331   
++0.0497   +0.8588   +0.0166   +0.0750   
++0.1141   +0.0663   +0.7865   +0.0331   
++0.0497   +0.1499   +0.0166   +0.7838   
+
++0.8452   +0.0749   +0.0425   +0.0374   
++0.0562   +0.8416   +0.0187   +0.0835   
++0.1274   +0.0749   +0.7602   +0.0374   
++0.0562   +0.1671   +0.0187   +0.7580   
+
+
+[8] P-matrix for branch length 1.000000
++0.5407   +0.2382   +0.1019   +0.1191   
++0.1787   +0.5675   +0.0596   +0.1942   
++0.3058   +0.2382   +0.3368   +0.1191   
++0.1787   +0.3885   +0.0596   +0.3733   
+
++0.5073   +0.2581   +0.1056   +0.1291   
++0.1936   +0.5411   +0.0645   +0.2008   
++0.3168   +0.2581   +0.2961   +0.1291   
++0.1936   +0.4015   +0.0645   +0.3404   
+
+
+[8] P-matrix for branch length 1.000000
++0.5407   +0.2382   +0.1019   +0.1191   
++0.1787   +0.5675   +0.0596   +0.1942   
++0.3058   +0.2382   +0.3368   +0.1191   
++0.1787   +0.3885   +0.0596   +0.3733   
+
++0.5073   +0.2581   +0.1056   +0.1291   
++0.1936   +0.5411   +0.0645   +0.2008   
++0.3168   +0.2581   +0.2961   +0.1291   
++0.1936   +0.4015   +0.0645   +0.3404   
+
+
+[8] CLV 5: [ {(0.05934,0.10704,0.00975,0.12495),(0.06609,0.11757,0.01235,0.13605)} {(0.74405,0.00247,0.01302,0.00247),(0.71436,0.00315,0.01624,0.00315)} {(0.05715,0.04267,0.00756,0.00745),(0.06329,0.04726,0.00954,0.00938)} {(0.00439,0.73753,0.00439,0.02247),(0.00561,0.70824,0.00561,0.02792)} {(0.02857,0.00372,0.00378,0.03895),(0.03164,0.00469,0.00477,0.04257)} {(0.00219,0.06437,0.00219,0.11750),(0.00280,0.07031,0.00280,0.12666)} {(0.00145,0.00027,0.61859,0.00027),(0.00180,0.00035,0.57795 [...]
+[8] CLV 6: [ {(0.05271,0.00525,0.00208,0.00600),(0.05767,0.00651,0.00289,0.00736)} {(0.02626,0.00036,0.04557,0.00036),(0.02787,0.00045,0.04907,0.00045)} {(0.05476,0.04130,0.01186,0.01164),(0.06034,0.04561,0.01480,0.01450)} {(0.00199,0.58633,0.00199,0.01209),(0.00252,0.54616,0.00252,0.01508)} {(0.02738,0.00582,0.00593,0.03548),(0.03017,0.00725,0.00740,0.03836)} {(0.00021,0.00483,0.00021,0.08555),(0.00030,0.00587,0.00030,0.08835)} {(0.00054,0.00009,0.43108,0.00009),(0.00065,0.00011,0.38265 [...]
+[8] CLV 7: [ {(0.00439,0.73753,0.00439,0.02247),(0.00561,0.70824,0.00561,0.02792)} {(0.00145,0.00027,0.61859,0.00027),(0.00180,0.00035,0.57795,0.00035)} {(0.02857,0.00372,0.00378,0.03895),(0.03164,0.00469,0.00477,0.04257)} {(0.00439,0.73753,0.00439,0.02247),(0.00561,0.70824,0.00561,0.02792)} {(0.00110,0.00562,0.00110,0.61441),(0.00140,0.00698,0.00140,0.57460)} {(0.00110,0.00562,0.00110,0.61441),(0.00140,0.00698,0.00140,0.57460)} {(0.00145,0.00027,0.61859,0.00027),(0.00180,0.00035,0.57795 [...]
+
+
+ TEST alpha(ncats) = 100.00( 2), mode = MEDIAN
 
 0.920322 1.079678 
 [8] P-matrix for branch length 0.100000
@@ -828,7 +1656,103 @@
 [8] CLV 7: [ {(0.00428,0.74028,0.00428,0.02199),(0.00572,0.70568,0.00572,0.02843)} {(0.00142,0.00027,0.62243,0.00027),(0.00184,0.00036,0.57441,0.00036)} {(0.02828,0.00364,0.00369,0.03860),(0.03191,0.00478,0.00487,0.04288)} {(0.00428,0.74028,0.00428,0.02199),(0.00572,0.70568,0.00572,0.02843)} {(0.00107,0.00550,0.00107,0.61819),(0.00143,0.00711,0.00143,0.57115)} {(0.00107,0.00550,0.00107,0.61819),(0.00143,0.00711,0.00143,0.57115)} {(0.00142,0.00027,0.62243,0.00027),(0.00184,0.00036,0.57441 [...]
 
 
- TEST alpha(ncats) =   0.10( 4)
+ TEST alpha(ncats) =   0.10( 4), mode = MEAN
+
+0.000000 0.000689 0.114514 3.884798 
+[0] P-matrix for branch length 0.100000
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9999   +0.0000   +0.0000   +0.0000   
++0.0000   +0.9999   +0.0000   +0.0000   
++0.0001   +0.0000   +0.9999   +0.0000   
++0.0000   +0.0001   +0.0000   +0.9999   
+
++0.9906   +0.0044   +0.0027   +0.0022   
++0.0033   +0.9901   +0.0011   +0.0055   
++0.0082   +0.0044   +0.9851   +0.0022   
++0.0033   +0.0110   +0.0011   +0.9846   
+
++0.7453   +0.1257   +0.0661   +0.0628   
++0.0943   +0.7457   +0.0314   +0.1286   
++0.1984   +0.1257   +0.6131   +0.0628   
++0.0943   +0.2573   +0.0314   +0.6170   
+
+
+[0] P-matrix for branch length 0.200000
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9999   +0.0001   +0.0000   +0.0000   
++0.0000   +0.9999   +0.0000   +0.0001   
++0.0001   +0.0001   +0.9998   +0.0000   
++0.0000   +0.0001   +0.0000   +0.9998   
+
++0.9814   +0.0088   +0.0054   +0.0044   
++0.0066   +0.9803   +0.0022   +0.0109   
++0.0163   +0.0088   +0.9705   +0.0044   
++0.0066   +0.0217   +0.0022   +0.9695   
+
++0.5864   +0.2119   +0.0958   +0.1059   
++0.1589   +0.6049   +0.0530   +0.1832   
++0.2873   +0.2119   +0.3949   +0.1059   
++0.1589   +0.3664   +0.0530   +0.4217   
+
+
+[0] P-matrix for branch length 1.000000
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9994   +0.0003   +0.0002   +0.0001   
++0.0002   +0.9994   +0.0001   +0.0003   
++0.0005   +0.0003   +0.9991   +0.0001   
++0.0002   +0.0007   +0.0001   +0.9991   
+
++0.9119   +0.0421   +0.0250   +0.0210   
++0.0316   +0.9085   +0.0105   +0.0494   
++0.0749   +0.0421   +0.8620   +0.0210   
++0.0316   +0.0989   +0.0105   +0.8590   
+
++0.3110   +0.3908   +0.1029   +0.1954   
++0.2931   +0.4064   +0.0977   +0.2028   
++0.3086   +0.3908   +0.1052   +0.1954   
++0.2931   +0.4056   +0.0977   +0.2036   
+
+
+[0] P-matrix for branch length 1.000000
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9994   +0.0003   +0.0002   +0.0001   
++0.0002   +0.9994   +0.0001   +0.0003   
++0.0005   +0.0003   +0.9991   +0.0001   
++0.0002   +0.0007   +0.0001   +0.9991   
+
++0.9119   +0.0421   +0.0250   +0.0210   
++0.0316   +0.9085   +0.0105   +0.0494   
++0.0749   +0.0421   +0.8620   +0.0210   
++0.0316   +0.0989   +0.0105   +0.8590   
+
++0.3110   +0.3908   +0.1029   +0.1954   
++0.2931   +0.4064   +0.0977   +0.2028   
++0.3086   +0.3908   +0.1052   +0.1954   
++0.2931   +0.4056   +0.0977   +0.2036   
+
+
+[0] CLV 5: [ {(0.00000,0.00000,0.00000,0.00000),(0.00005,0.00011,0.00000,0.00013),(0.00867,0.01711,0.00018,0.02120),(0.14669,0.20695,0.08332,0.21274)} {(1.00000,0.00000,0.00000,0.00000),(0.99977,0.00000,0.00000,0.00000),(0.96308,0.00004,0.00027,0.00004),(0.34389,0.02525,0.08255,0.02525)} {(0.00000,0.00000,0.00000,0.00000),(0.00005,0.00004,0.00000,0.00000),(0.00863,0.00647,0.00014,0.00014),(0.12425,0.09613,0.06087,0.05822)} {(0.00000,1.00000,0.00000,0.00000),(0.00000,0.99976,0.00000,0.000 [...]
+[0] CLV 6: [ {(0.00000,0.00000,0.00000,0.00000),(0.00005,0.00000,0.00000,0.00000),(0.00855,0.00011,0.00001,0.00014),(0.09044,0.03148,0.03435,0.03193)} {(0.00000,0.00000,0.00000,0.00000),(0.00003,0.00000,0.00005,0.00000),(0.00519,0.00001,0.00796,0.00001),(0.02553,0.00302,0.04881,0.00302)} {(0.00000,0.00000,0.00000,0.00000),(0.00005,0.00004,0.00000,0.00000),(0.00858,0.00643,0.00024,0.00024),(0.11237,0.09279,0.07771,0.07428)} {(0.00000,1.00000,0.00000,0.00000),(0.00000,0.99958,0.00000,0.000 [...]
+[0] CLV 7: [ {(0.00000,1.00000,0.00000,0.00000),(0.00000,0.99976,0.00000,0.00000),(0.00008,0.96108,0.00008,0.00047),(0.04489,0.36594,0.04489,0.13425)} {(0.00000,0.00000,1.00000,0.00000),(0.00000,0.00000,0.99964,0.00000),(0.00003,0.00000,0.94185,0.00000),(0.00917,0.00281,0.15593,0.00281)} {(0.00000,0.00000,0.00000,0.00000),(0.00003,0.00000,0.00000,0.00004),(0.00432,0.00007,0.00007,0.00640),(0.06212,0.02911,0.03044,0.06701)} {(0.00000,1.00000,0.00000,0.00000),(0.00000,0.99976,0.00000,0.000 [...]
+
+
+ TEST alpha(ncats) =   0.10( 4), mode = MEDIAN
 
 0.000001 0.001078 0.093753 3.905168 
 [0] P-matrix for branch length 0.100000
@@ -924,7 +1848,103 @@
 [0] CLV 7: [ {(0.00000,1.00000,0.00000,0.00000),(0.00000,0.99962,0.00000,0.00000),(0.00005,0.96797,0.00005,0.00032),(0.04520,0.36463,0.04520,0.13476)} {(0.00000,0.00000,1.00000,0.00000),(0.00000,0.00000,0.99943,0.00000),(0.00002,0.00000,0.95211,0.00000),(0.00921,0.00283,0.15460,0.00283)} {(0.00000,0.00000,0.00000,0.00000),(0.00004,0.00000,0.00000,0.00006),(0.00355,0.00005,0.00005,0.00528),(0.06220,0.02927,0.03060,0.06702)} {(0.00000,1.00000,0.00000,0.00000),(0.00000,0.99962,0.00000,0.000 [...]
 
 
- TEST alpha(ncats) =   0.50( 4)
+ TEST alpha(ncats) =   0.50( 4), mode = MEAN
+
+0.029078 0.280715 0.924773 2.765435 
+[1] P-matrix for branch length 0.100000
++0.9976   +0.0011   +0.0007   +0.0006   
++0.0008   +0.9975   +0.0003   +0.0014   
++0.0021   +0.0011   +0.9962   +0.0006   
++0.0008   +0.0028   +0.0003   +0.9961   
+
++0.9772   +0.0108   +0.0066   +0.0054   
++0.0081   +0.9760   +0.0027   +0.0132   
++0.0199   +0.0108   +0.9640   +0.0054   
++0.0081   +0.0265   +0.0027   +0.9628   
+
++0.9279   +0.0343   +0.0206   +0.0172   
++0.0258   +0.9248   +0.0086   +0.0408   
++0.0617   +0.0343   +0.8868   +0.0172   
++0.0258   +0.0817   +0.0086   +0.8840   
+
++0.8067   +0.0942   +0.0520   +0.0471   
++0.0706   +0.8040   +0.0235   +0.1018   
++0.1560   +0.0942   +0.7028   +0.0471   
++0.0706   +0.2036   +0.0235   +0.7022   
+
+
+[1] P-matrix for branch length 0.200000
++0.9952   +0.0023   +0.0014   +0.0011   
++0.0017   +0.9949   +0.0006   +0.0028   
++0.0042   +0.0023   +0.9924   +0.0011   
++0.0017   +0.0056   +0.0006   +0.9921   
+
++0.9552   +0.0212   +0.0129   +0.0106   
++0.0159   +0.9531   +0.0053   +0.0257   
++0.0388   +0.0212   +0.9294   +0.0106   
++0.0159   +0.0514   +0.0053   +0.9273   
+
++0.8636   +0.0657   +0.0378   +0.0329   
++0.0493   +0.8598   +0.0164   +0.0744   
++0.1133   +0.0657   +0.7881   +0.0329   
++0.0493   +0.1489   +0.0164   +0.7854   
+
++0.6689   +0.1662   +0.0818   +0.0831   
++0.1246   +0.6760   +0.0415   +0.1578   
++0.2454   +0.1662   +0.5053   +0.0831   
++0.1246   +0.3155   +0.0415   +0.5183   
+
+
+[1] P-matrix for branch length 1.000000
++0.9764   +0.0111   +0.0069   +0.0056   
++0.0084   +0.9752   +0.0028   +0.0137   
++0.0206   +0.0111   +0.9627   +0.0056   
++0.0084   +0.0274   +0.0028   +0.9615   
+
++0.8043   +0.0954   +0.0526   +0.0477   
++0.0716   +0.8017   +0.0239   +0.1029   
++0.1577   +0.0954   +0.6992   +0.0477   
++0.0716   +0.2058   +0.0239   +0.6987   
+
++0.5428   +0.2370   +0.1017   +0.1185   
++0.1778   +0.5692   +0.0593   +0.1938   
++0.3050   +0.2370   +0.3394   +0.1185   
++0.1778   +0.3876   +0.0593   +0.3754   
+
++0.3341   +0.3727   +0.1068   +0.1864   
++0.2795   +0.4202   +0.0932   +0.2071   
++0.3205   +0.3727   +0.1205   +0.1864   
++0.2795   +0.4141   +0.0932   +0.2132   
+
+
+[1] P-matrix for branch length 1.000000
++0.9764   +0.0111   +0.0069   +0.0056   
++0.0084   +0.9752   +0.0028   +0.0137   
++0.0206   +0.0111   +0.9627   +0.0056   
++0.0084   +0.0274   +0.0028   +0.9615   
+
++0.8043   +0.0954   +0.0526   +0.0477   
++0.0716   +0.8017   +0.0239   +0.1029   
++0.1577   +0.0954   +0.6992   +0.0477   
++0.0716   +0.2058   +0.0239   +0.6987   
+
++0.5428   +0.2370   +0.1017   +0.1185   
++0.1778   +0.5692   +0.0593   +0.1938   
++0.3050   +0.2370   +0.3394   +0.1185   
++0.1778   +0.3876   +0.0593   +0.3754   
+
++0.3341   +0.3727   +0.1068   +0.1864   
++0.2795   +0.4202   +0.0932   +0.2071   
++0.3205   +0.3727   +0.1205   +0.1864   
++0.2795   +0.4141   +0.0932   +0.2132   
+
+
+[1] CLV 5: [ {(0.00224,0.00447,0.00001,0.00558),(0.02050,0.03968,0.00105,0.04852),(0.05894,0.10640,0.00961,0.12427),(0.12498,0.19092,0.05459,0.20286)} {(0.99046,0.00000,0.00002,0.00000),(0.91250,0.00025,0.00150,0.00025),(0.74581,0.00243,0.01284,0.00243),(0.44744,0.01554,0.06022,0.01554)} {(0.00224,0.00168,0.00001,0.00001),(0.02027,0.01517,0.00082,0.00082),(0.05678,0.04240,0.00745,0.00734),(0.11117,0.08427,0.04078,0.03933)} {(0.00001,0.98991,0.00001,0.00003),(0.00045,0.90832,0.00045,0.002 [...]
+[1] CLV 6: [ {(0.00224,0.00001,0.00000,0.00001),(0.01980,0.00063,0.00008,0.00076),(0.05240,0.00518,0.00203,0.00592),(0.08776,0.02297,0.02096,0.02386)} {(0.00139,0.00000,0.00209,0.00000),(0.01152,0.00004,0.01823,0.00004),(0.02616,0.00036,0.04535,0.00036),(0.02996,0.00196,0.05775,0.00196)} {(0.00224,0.00168,0.00002,0.00002),(0.01998,0.01498,0.00136,0.00136),(0.05442,0.04104,0.01169,0.01148),(0.10159,0.08057,0.05579,0.05359)} {(0.00000,0.98241,0.00000,0.00002),(0.00022,0.84495,0.00022,0.001 [...]
+[1] CLV 7: [ {(0.00001,0.98991,0.00001,0.00003),(0.00045,0.90832,0.00045,0.00265),(0.00432,0.73928,0.00432,0.02217),(0.02762,0.45703,0.02762,0.09956)} {(0.00000,0.00000,0.98488,0.00000),(0.00017,0.00003,0.86379,0.00003),(0.00143,0.00027,0.62103,0.00027),(0.00669,0.00173,0.25534,0.00173)} {(0.00112,0.00000,0.00000,0.00168),(0.01013,0.00041,0.00041,0.01476),(0.02839,0.00367,0.00373,0.03873),(0.05558,0.01967,0.02039,0.06460)} {(0.00001,0.98991,0.00001,0.00003),(0.00045,0.90832,0.00045,0.002 [...]
+
+
+ TEST alpha(ncats) =   0.50( 4), mode = MEDIAN
 
 0.033388 0.251916 0.820268 2.894428 
 [1] P-matrix for branch length 0.100000
@@ -1020,7 +2040,103 @@
 [1] CLV 7: [ {(0.00001,0.98843,0.00001,0.00004),(0.00036,0.91716,0.00036,0.00216),(0.00347,0.76334,0.00347,0.01818),(0.02958,0.44435,0.02958,0.10423)} {(0.00000,0.00000,0.98266,0.00000),(0.00014,0.00002,0.87680,0.00002),(0.00117,0.00022,0.65480,0.00022),(0.00702,0.00185,0.24075,0.00185)} {(0.00129,0.00001,0.00001,0.00192),(0.00916,0.00033,0.00033,0.01338),(0.02584,0.00298,0.00302,0.03561),(0.05660,0.02082,0.02161,0.06516)} {(0.00001,0.98843,0.00001,0.00004),(0.00036,0.91716,0.00036,0.002 [...]
 
 
- TEST alpha(ncats) =   0.75( 4)
+ TEST alpha(ncats) =   0.75( 4), mode = MEAN
+
+0.086183 0.422136 1.028093 2.463588 
+[2] P-matrix for branch length 0.100000
++0.9929   +0.0033   +0.0021   +0.0017   
++0.0025   +0.9925   +0.0008   +0.0041   
++0.0062   +0.0033   +0.9888   +0.0017   
++0.0025   +0.0083   +0.0008   +0.9884   
+
++0.9661   +0.0161   +0.0098   +0.0080   
++0.0120   +0.9643   +0.0040   +0.0196   
++0.0295   +0.0161   +0.9464   +0.0080   
++0.0120   +0.0392   +0.0040   +0.9447   
+
++0.9204   +0.0380   +0.0227   +0.0190   
++0.0285   +0.9171   +0.0095   +0.0449   
++0.0680   +0.0380   +0.8750   +0.0190   
++0.0285   +0.0898   +0.0095   +0.8722   
+
++0.8248   +0.0851   +0.0476   +0.0425   
++0.0638   +0.8215   +0.0213   +0.0934   
++0.1428   +0.0851   +0.7296   +0.0425   
++0.0638   +0.1867   +0.0213   +0.7282   
+
+
+[2] P-matrix for branch length 0.200000
++0.9859   +0.0066   +0.0041   +0.0033   
++0.0050   +0.9851   +0.0017   +0.0082   
++0.0123   +0.0066   +0.9777   +0.0033   
++0.0050   +0.0164   +0.0017   +0.9769   
+
++0.9339   +0.0315   +0.0189   +0.0157   
++0.0236   +0.9309   +0.0079   +0.0376   
++0.0568   +0.0315   +0.8960   +0.0157   
++0.0236   +0.0752   +0.0079   +0.8934   
+
++0.8502   +0.0724   +0.0412   +0.0362   
++0.0543   +0.8465   +0.0181   +0.0811   
++0.1236   +0.0724   +0.7678   +0.0362   
++0.0543   +0.1622   +0.0181   +0.7654   
+
++0.6952   +0.1521   +0.0767   +0.0760   
++0.1141   +0.6996   +0.0380   +0.1483   
++0.2300   +0.1521   +0.5418   +0.0760   
++0.1141   +0.2966   +0.0380   +0.5513   
+
+
+[2] P-matrix for branch length 1.000000
++0.9326   +0.0321   +0.0193   +0.0161   
++0.0241   +0.9296   +0.0080   +0.0383   
++0.0579   +0.0321   +0.8940   +0.0161   
++0.0241   +0.0766   +0.0080   +0.8913   
+
++0.7285   +0.1345   +0.0698   +0.0672   
++0.1009   +0.7300   +0.0336   +0.1355   
++0.2094   +0.1345   +0.5889   +0.0672   
++0.1009   +0.2710   +0.0336   +0.5945   
+
++0.5165   +0.2526   +0.1047   +0.1263   
++0.1894   +0.5483   +0.0631   +0.1991   
++0.3140   +0.2526   +0.3072   +0.1263   
++0.1894   +0.3982   +0.0631   +0.3492   
+
++0.3466   +0.3634   +0.1083   +0.1817   
++0.2726   +0.4279   +0.0909   +0.2087   
++0.3248   +0.3634   +0.1301   +0.1817   
++0.2726   +0.4173   +0.0909   +0.2193   
+
+
+[2] P-matrix for branch length 1.000000
++0.9326   +0.0321   +0.0193   +0.0161   
++0.0241   +0.9296   +0.0080   +0.0383   
++0.0579   +0.0321   +0.8940   +0.0161   
++0.0241   +0.0766   +0.0080   +0.8913   
+
++0.7285   +0.1345   +0.0698   +0.0672   
++0.1009   +0.7300   +0.0336   +0.1355   
++0.2094   +0.1345   +0.5889   +0.0672   
++0.1009   +0.2710   +0.0336   +0.5945   
+
++0.5165   +0.2526   +0.1047   +0.1263   
++0.1894   +0.5483   +0.0631   +0.1991   
++0.3140   +0.2526   +0.3072   +0.1263   
++0.1894   +0.3982   +0.0631   +0.3492   
+
++0.3466   +0.3634   +0.1083   +0.1817   
++0.2726   +0.4279   +0.0909   +0.2087   
++0.3248   +0.3634   +0.1301   +0.1817   
++0.2726   +0.4173   +0.0909   +0.2193   
+
+
+[2] CLV 5: [ {(0.00657,0.01300,0.00010,0.01614),(0.02989,0.05696,0.00228,0.06892),(0.06416,0.11460,0.01157,0.13294),(0.11729,0.18356,0.04655,0.19736)} {(0.97205,0.00002,0.00015,0.00002),(0.87209,0.00056,0.00322,0.00056),(0.72286,0.00295,0.01528,0.00295),(0.48330,0.01301,0.05292,0.01301)} {(0.00654,0.00490,0.00008,0.00008),(0.02940,0.02198,0.00179,0.00177),(0.06154,0.04596,0.00895,0.00880),(0.10573,0.07980,0.03499,0.03383)} {(0.00004,0.97051,0.00004,0.00027),(0.00099,0.86665,0.00099,0.005 [...]
+[2] CLV 6: [ {(0.00650,0.00006,0.00000,0.00008),(0.02836,0.00134,0.00026,0.00160),(0.05628,0.00614,0.00264,0.00696),(0.08549,0.02027,0.01719,0.02127)} {(0.00397,0.00000,0.00606,0.00000),(0.01594,0.00009,0.02582,0.00009),(0.02744,0.00043,0.04811,0.00043),(0.03089,0.00167,0.05920,0.00167)} {(0.00652,0.00488,0.00014,0.00014),(0.02878,0.02159,0.00293,0.00290),(0.05876,0.04438,0.01393,0.01365),(0.09710,0.07621,0.04885,0.04703)} {(0.00002,0.94894,0.00002,0.00014),(0.00047,0.77813,0.00047,0.002 [...]
+[2] CLV 7: [ {(0.00004,0.97051,0.00004,0.00027),(0.00099,0.86665,0.00099,0.00565),(0.00524,0.71660,0.00524,0.02630),(0.02313,0.48944,0.02313,0.08799)} {(0.00002,0.00000,0.95589,0.00000),(0.00036,0.00006,0.80283,0.00006),(0.00170,0.00033,0.58950,0.00033),(0.00588,0.00145,0.29358,0.00145)} {(0.00327,0.00004,0.00004,0.00486),(0.01470,0.00089,0.00089,0.02109),(0.03077,0.00440,0.00447,0.04156),(0.05286,0.01692,0.01749,0.06288)} {(0.00004,0.97051,0.00004,0.00027),(0.00099,0.86665,0.00099,0.005 [...]
+
+
+ TEST alpha(ncats) =   0.75( 4), mode = MEDIAN
 
 0.084885 0.386197 0.942076 2.586843 
 [2] P-matrix for branch length 0.100000
@@ -1116,7 +2232,103 @@
 [2] CLV 7: [ {(0.00004,0.97094,0.00004,0.00026),(0.00084,0.87697,0.00084,0.00480),(0.00447,0.73540,0.00447,0.02285),(0.02495,0.47572,0.02495,0.09282)} {(0.00002,0.00000,0.95654,0.00000),(0.00030,0.00005,0.81787,0.00005),(0.00147,0.00028,0.61563,0.00028),(0.00622,0.00156,0.27723,0.00156)} {(0.00322,0.00004,0.00004,0.00479),(0.01357,0.00075,0.00076,0.01955),(0.02880,0.00379,0.00385,0.03922),(0.05404,0.01805,0.01868,0.06366)} {(0.00004,0.97094,0.00004,0.00026),(0.00084,0.87697,0.00084,0.004 [...]
 
 
- TEST alpha(ncats) =   1.00( 4)
+ TEST alpha(ncats) =   1.00( 4), mode = MEAN
+
+0.145784 0.513132 1.070831 2.270253 
+[3] P-matrix for branch length 0.100000
++0.9881   +0.0056   +0.0035   +0.0028   
++0.0042   +0.9874   +0.0014   +0.0070   
++0.0105   +0.0056   +0.9811   +0.0028   
++0.0042   +0.0139   +0.0014   +0.9804   
+
++0.9590   +0.0194   +0.0119   +0.0097   
++0.0146   +0.9569   +0.0049   +0.0236   
++0.0356   +0.0194   +0.9352   +0.0097   
++0.0146   +0.0472   +0.0049   +0.9333   
+
++0.9173   +0.0395   +0.0235   +0.0197   
++0.0296   +0.9139   +0.0099   +0.0466   
++0.0705   +0.0395   +0.8703   +0.0197   
++0.0296   +0.0932   +0.0099   +0.8673   
+
++0.8367   +0.0791   +0.0446   +0.0396   
++0.0593   +0.8332   +0.0198   +0.0877   
++0.1339   +0.0791   +0.7474   +0.0396   
++0.0593   +0.1754   +0.0198   +0.7455   
+
+
+[3] P-matrix for branch length 0.200000
++0.9764   +0.0112   +0.0069   +0.0056   
++0.0084   +0.9751   +0.0028   +0.0137   
++0.0207   +0.0112   +0.9626   +0.0056   
++0.0084   +0.0275   +0.0028   +0.9614   
+
++0.9205   +0.0379   +0.0226   +0.0190   
++0.0285   +0.9172   +0.0095   +0.0448   
++0.0678   +0.0379   +0.8753   +0.0190   
++0.0285   +0.0897   +0.0095   +0.8724   
+
++0.8448   +0.0751   +0.0426   +0.0375   
++0.0563   +0.8411   +0.0188   +0.0838   
++0.1278   +0.0751   +0.7596   +0.0375   
++0.0563   +0.1675   +0.0188   +0.7574   
+
++0.7131   +0.1426   +0.0730   +0.0713   
++0.1069   +0.7159   +0.0356   +0.1415   
++0.2191   +0.1426   +0.5670   +0.0713   
++0.1069   +0.2831   +0.0356   +0.5743   
+
+
+[3] P-matrix for branch length 1.000000
++0.8899   +0.0528   +0.0309   +0.0264   
++0.0396   +0.8862   +0.0132   +0.0610   
++0.0926   +0.0528   +0.8282   +0.0264   
++0.0396   +0.1220   +0.0132   +0.8252   
+
++0.6861   +0.1569   +0.0785   +0.0785   
++0.1177   +0.6914   +0.0392   +0.1517   
++0.2355   +0.1569   +0.5291   +0.0785   
++0.1177   +0.3033   +0.0392   +0.5397   
+
++0.5065   +0.2586   +0.1057   +0.1293   
++0.1939   +0.5405   +0.0646   +0.2009   
++0.3170   +0.2586   +0.2952   +0.1293   
++0.1939   +0.4018   +0.0646   +0.3396   
+
++0.3570   +0.3559   +0.1092   +0.1779   
++0.2669   +0.4345   +0.0890   +0.2097   
++0.3276   +0.3559   +0.1386   +0.1779   
++0.2669   +0.4193   +0.0890   +0.2248   
+
+
+[3] P-matrix for branch length 1.000000
++0.8899   +0.0528   +0.0309   +0.0264   
++0.0396   +0.8862   +0.0132   +0.0610   
++0.0926   +0.0528   +0.8282   +0.0264   
++0.0396   +0.1220   +0.0132   +0.8252   
+
++0.6861   +0.1569   +0.0785   +0.0785   
++0.1177   +0.6914   +0.0392   +0.1517   
++0.2355   +0.1569   +0.5291   +0.0785   
++0.1177   +0.3033   +0.0392   +0.5397   
+
++0.5065   +0.2586   +0.1057   +0.1293   
++0.1939   +0.5405   +0.0646   +0.2009   
++0.3170   +0.2586   +0.2952   +0.1293   
++0.1939   +0.4018   +0.0646   +0.3396   
+
++0.3570   +0.3559   +0.1092   +0.1779   
++0.2669   +0.4345   +0.0890   +0.2097   
++0.3276   +0.3559   +0.1386   +0.1779   
++0.2669   +0.4193   +0.0890   +0.2248   
+
+
+[3] CLV 5: [ {(0.01096,0.02156,0.00029,0.02664),(0.03564,0.06723,0.00329,0.08080),(0.06626,0.11783,0.01241,0.13631),(0.11185,0.17789,0.04141,0.19286)} {(0.95330,0.00007,0.00043,0.00007),(0.84729,0.00081,0.00460,0.00081),(0.71363,0.00317,0.01633,0.00317),(0.50846,0.01144,0.04801,0.01144)} {(0.01090,0.00816,0.00023,0.00023),(0.03492,0.02610,0.00257,0.00255),(0.06344,0.04737,0.00959,0.00943),(0.10168,0.07656,0.03125,0.03028)} {(0.00012,0.95083,0.00012,0.00075),(0.00144,0.84129,0.00144,0.008 [...]
+[3] CLV 6: [ {(0.01077,0.00018,0.00001,0.00022),(0.03342,0.00190,0.00044,0.00225),(0.05779,0.00654,0.00292,0.00739),(0.08353,0.01846,0.01482,0.01951)} {(0.00648,0.00001,0.01001,0.00001),(0.01838,0.00012,0.03018,0.00012),(0.02790,0.00046,0.04915,0.00046),(0.03133,0.00149,0.05971,0.00149)} {(0.01082,0.00811,0.00039,0.00039),(0.03405,0.02555,0.00418,0.00414),(0.06047,0.04571,0.01488,0.01457),(0.09373,0.07310,0.04422,0.04265)} {(0.00006,0.91548,0.00006,0.00038),(0.00068,0.73862,0.00068,0.004 [...]
+[3] CLV 7: [ {(0.00012,0.95083,0.00012,0.00075),(0.00144,0.84129,0.00144,0.00804),(0.00564,0.70753,0.00564,0.02806),(0.02033,0.51245,0.02033,0.08014)} {(0.00005,0.00001,0.92660,0.00001),(0.00051,0.00009,0.76607,0.00009),(0.00181,0.00035,0.57697,0.00035),(0.00533,0.00127,0.32148,0.00127)} {(0.00545,0.00011,0.00012,0.00805),(0.01746,0.00128,0.00129,0.02482),(0.03172,0.00472,0.00480,0.04266),(0.05084,0.01514,0.01562,0.06142)} {(0.00012,0.95083,0.00012,0.00075),(0.00144,0.84129,0.00144,0.008 [...]
+
+
+ TEST alpha(ncats) =   1.00( 4), mode = MEDIAN
 
 0.136954 0.476752 1.000000 2.386294 
 [3] P-matrix for branch length 0.100000
@@ -1212,36 +2424,132 @@
 [3] CLV 7: [ {(0.00011,0.95370,0.00011,0.00067),(0.00125,0.85130,0.00125,0.00705),(0.00498,0.72266,0.00498,0.02516),(0.02200,0.49842,0.02200,0.08489)} {(0.00004,0.00001,0.93088,0.00001),(0.00045,0.00008,0.78055,0.00008),(0.00162,0.00031,0.59790,0.00031),(0.00566,0.00138,0.30439,0.00138)} {(0.00513,0.00010,0.00010,0.00759),(0.01637,0.00111,0.00112,0.02336),(0.03014,0.00420,0.00427,0.04081),(0.05208,0.01621,0.01675,0.06233)} {(0.00011,0.95370,0.00011,0.00067),(0.00125,0.85130,0.00125,0.007 [...]
 
 
- TEST alpha(ncats) =   1.50( 4)
+ TEST alpha(ncats) =   1.50( 4), mode = MEAN
 
-0.225323 0.588556 1.050422 2.135699 
+0.245178 0.621121 1.101255 2.032446 
 [4] P-matrix for branch length 0.100000
-+0.9817   +0.0087   +0.0054   +0.0043   
-+0.0065   +0.9807   +0.0022   +0.0107   
-+0.0161   +0.0087   +0.9710   +0.0043   
-+0.0065   +0.0214   +0.0022   +0.9700   
++0.9801   +0.0094   +0.0058   +0.0047   
++0.0071   +0.9790   +0.0024   +0.0116   
++0.0174   +0.0094   +0.9684   +0.0047   
++0.0071   +0.0232   +0.0024   +0.9674   
 
-+0.9532   +0.0222   +0.0135   +0.0111   
-+0.0167   +0.9509   +0.0056   +0.0269   
-+0.0405   +0.0222   +0.9261   +0.0111   
-+0.0167   +0.0538   +0.0056   +0.9240   
++0.9507   +0.0234   +0.0142   +0.0117   
++0.0176   +0.9483   +0.0059   +0.0283   
++0.0426   +0.0234   +0.9222   +0.0117   
++0.0176   +0.0566   +0.0059   +0.9200   
 
-+0.9187   +0.0388   +0.0231   +0.0194   
-+0.0291   +0.9154   +0.0097   +0.0458   
-+0.0693   +0.0388   +0.8725   +0.0194   
-+0.0291   +0.0916   +0.0097   +0.8696   
++0.9151   +0.0406   +0.0241   +0.0203   
++0.0304   +0.9117   +0.0101   +0.0478   
++0.0723   +0.0406   +0.8669   +0.0203   
++0.0304   +0.0955   +0.0101   +0.8639   
 
-+0.8451   +0.0749   +0.0425   +0.0375   
-+0.0562   +0.8415   +0.0187   +0.0836   
-+0.1275   +0.0749   +0.7602   +0.0375   
-+0.0562   +0.1671   +0.0187   +0.7580   
++0.8517   +0.0716   +0.0408   +0.0358   
++0.0537   +0.8480   +0.0179   +0.0803   
++0.1225   +0.0716   +0.7701   +0.0358   
++0.0537   +0.1607   +0.0179   +0.7677   
 
 
 [4] P-matrix for branch length 0.200000
-+0.9638   +0.0171   +0.0105   +0.0086   
-+0.0128   +0.9620   +0.0043   +0.0209   
-+0.0314   +0.0171   +0.9429   +0.0086   
-+0.0128   +0.0418   +0.0043   +0.9411   
++0.9607   +0.0186   +0.0114   +0.0093   
++0.0139   +0.9588   +0.0046   +0.0226   
++0.0341   +0.0186   +0.9380   +0.0093   
++0.0139   +0.0453   +0.0046   +0.9361   
+
++0.9050   +0.0454   +0.0268   +0.0227   
++0.0341   +0.9014   +0.0114   +0.0531   
++0.0805   +0.0454   +0.8513   +0.0227   
++0.0341   +0.1062   +0.0114   +0.8483   
+
++0.8409   +0.0770   +0.0436   +0.0385   
++0.0578   +0.8374   +0.0193   +0.0856   
++0.1307   +0.0770   +0.7538   +0.0385   
++0.0578   +0.1712   +0.0193   +0.7517   
+
++0.7362   +0.1304   +0.0681   +0.0652   
++0.0978   +0.7372   +0.0326   +0.1324   
++0.2044   +0.1304   +0.6000   +0.0652   
++0.0978   +0.2647   +0.0326   +0.6048   
+
+
+[4] P-matrix for branch length 1.000000
++0.8255   +0.0847   +0.0474   +0.0424   
++0.0635   +0.8222   +0.0212   +0.0930   
++0.1422   +0.0847   +0.7307   +0.0424   
++0.0635   +0.1861   +0.0212   +0.7292   
+
++0.6415   +0.1811   +0.0868   +0.0906   
++0.1359   +0.6519   +0.0453   +0.1670   
++0.2604   +0.1811   +0.4679   +0.0906   
++0.1359   +0.3339   +0.0453   +0.4849   
+
++0.4997   +0.2627   +0.1063   +0.1313   
++0.1970   +0.5353   +0.0657   +0.2021   
++0.3189   +0.2627   +0.2870   +0.1313   
++0.1970   +0.4041   +0.0657   +0.3332   
+
++0.3732   +0.3444   +0.1102   +0.1722   
++0.2583   +0.4449   +0.0861   +0.2107   
++0.3306   +0.3444   +0.1528   +0.1722   
++0.2583   +0.4214   +0.0861   +0.2342   
+
+
+[4] P-matrix for branch length 1.000000
++0.8255   +0.0847   +0.0474   +0.0424   
++0.0635   +0.8222   +0.0212   +0.0930   
++0.1422   +0.0847   +0.7307   +0.0424   
++0.0635   +0.1861   +0.0212   +0.7292   
+
++0.6415   +0.1811   +0.0868   +0.0906   
++0.1359   +0.6519   +0.0453   +0.1670   
++0.2604   +0.1811   +0.4679   +0.0906   
++0.1359   +0.3339   +0.0453   +0.4849   
+
++0.4997   +0.2627   +0.1063   +0.1313   
++0.1970   +0.5353   +0.0657   +0.2021   
++0.3189   +0.2627   +0.2870   +0.1313   
++0.1970   +0.4041   +0.0657   +0.3332   
+
++0.3732   +0.3444   +0.1102   +0.1722   
++0.2583   +0.4449   +0.0861   +0.2107   
++0.3306   +0.3444   +0.1528   +0.1722   
++0.2583   +0.4214   +0.0861   +0.2342   
+
+
+[4] CLV 5: [ {(0.01804,0.03507,0.00081,0.04300),(0.04216,0.07861,0.00469,0.09374),(0.06772,0.12006,0.01303,0.13863),(0.10453,0.16970,0.03517,0.18602)} {(0.92303,0.00019,0.00116,0.00019),(0.81902,0.00116,0.00648,0.00116),(0.70716,0.00334,0.01708,0.00334),(0.54202,0.00957,0.04178,0.00957)} {(0.01787,0.01337,0.00063,0.00063),(0.04113,0.03073,0.00366,0.00362),(0.06476,0.04836,0.01006,0.00989),(0.09603,0.07212,0.02666,0.02590)} {(0.00035,0.91925,0.00035,0.00205),(0.00207,0.81259,0.00207,0.011 [...]
+[4] CLV 6: [ {(0.01750,0.00049,0.00006,0.00059),(0.03899,0.00266,0.00073,0.00312),(0.05884,0.00683,0.00312,0.00771),(0.08046,0.01615,0.01200,0.01725)} {(0.01028,0.00003,0.01616,0.00003),(0.02089,0.00018,0.03486,0.00018),(0.02821,0.00048,0.04985,0.00048),(0.03164,0.00126,0.05974,0.00126)} {(0.01764,0.01323,0.00105,0.00105),(0.03991,0.02998,0.00589,0.00581),(0.06166,0.04664,0.01557,0.01524),(0.08897,0.06887,0.03838,0.03711)} {(0.00017,0.86286,0.00017,0.00106),(0.00096,0.69497,0.00096,0.005 [...]
+[4] CLV 7: [ {(0.00035,0.91925,0.00035,0.00205),(0.00207,0.81259,0.00207,0.01128),(0.00593,0.70118,0.00593,0.02933),(0.01701,0.54345,0.01701,0.07009)} {(0.00013,0.00002,0.87988,0.00002),(0.00072,0.00013,0.72478,0.00013),(0.00190,0.00037,0.56823,0.00037),(0.00464,0.00106,0.35995,0.00106)} {(0.00893,0.00032,0.00032,0.01306),(0.02056,0.00181,0.00183,0.02892),(0.03238,0.00495,0.00503,0.04342),(0.04801,0.01295,0.01333,0.05917)} {(0.00035,0.91925,0.00035,0.00205),(0.00207,0.81259,0.00207,0.011 [...]
+
+
+ TEST alpha(ncats) =   1.50( 4), mode = MEDIAN
+
+0.225323 0.588556 1.050422 2.135699 
+[4] P-matrix for branch length 0.100000
++0.9817   +0.0087   +0.0054   +0.0043   
++0.0065   +0.9807   +0.0022   +0.0107   
++0.0161   +0.0087   +0.9710   +0.0043   
++0.0065   +0.0214   +0.0022   +0.9700   
+
++0.9532   +0.0222   +0.0135   +0.0111   
++0.0167   +0.9509   +0.0056   +0.0269   
++0.0405   +0.0222   +0.9261   +0.0111   
++0.0167   +0.0538   +0.0056   +0.9240   
+
++0.9187   +0.0388   +0.0231   +0.0194   
++0.0291   +0.9154   +0.0097   +0.0458   
++0.0693   +0.0388   +0.8725   +0.0194   
++0.0291   +0.0916   +0.0097   +0.8696   
+
++0.8451   +0.0749   +0.0425   +0.0375   
++0.0562   +0.8415   +0.0187   +0.0836   
++0.1275   +0.0749   +0.7602   +0.0375   
++0.0562   +0.1671   +0.0187   +0.7580   
+
+
+[4] P-matrix for branch length 0.200000
++0.9638   +0.0171   +0.0105   +0.0086   
++0.0128   +0.9620   +0.0043   +0.0209   
++0.0314   +0.0171   +0.9429   +0.0086   
++0.0128   +0.0418   +0.0043   +0.9411   
 
 +0.9096   +0.0432   +0.0256   +0.0216   
 +0.0324   +0.9061   +0.0108   +0.0507   
@@ -1308,7 +2616,103 @@
 [4] CLV 7: [ {(0.00029,0.92543,0.00029,0.00174),(0.00187,0.82109,0.00187,0.01027),(0.00545,0.71184,0.00545,0.02722),(0.01844,0.52960,0.01844,0.07450)} {(0.00011,0.00002,0.88901,0.00002),(0.00065,0.00012,0.73697,0.00012),(0.00176,0.00034,0.58292,0.00034),(0.00495,0.00115,0.34264,0.00115)} {(0.00825,0.00027,0.00027,0.01209),(0.01965,0.00164,0.00166,0.02772),(0.03127,0.00457,0.00464,0.04214),(0.04929,0.01390,0.01432,0.06021)} {(0.00029,0.92543,0.00029,0.00174),(0.00187,0.82109,0.00187,0.010 [...]
 
 
- TEST alpha(ncats) =   5.00( 4)
+ TEST alpha(ncats) =   5.00( 4), mode = MEAN
+
+0.533406 0.819278 1.098473 1.548843 
+[5] P-matrix for branch length 0.100000
++0.9574   +0.0202   +0.0123   +0.0101   
++0.0151   +0.9553   +0.0050   +0.0245   
++0.0369   +0.0202   +0.9328   +0.0101   
++0.0151   +0.0490   +0.0050   +0.9308   
+
++0.9357   +0.0306   +0.0184   +0.0153   
++0.0229   +0.9329   +0.0076   +0.0366   
++0.0552   +0.0306   +0.8989   +0.0153   
++0.0229   +0.0731   +0.0076   +0.8963   
+
++0.9153   +0.0405   +0.0240   +0.0202   
++0.0303   +0.9119   +0.0101   +0.0477   
++0.0721   +0.0405   +0.8672   +0.0202   
++0.0303   +0.0953   +0.0101   +0.8642   
+
++0.8837   +0.0558   +0.0325   +0.0279   
++0.0419   +0.8799   +0.0140   +0.0642   
++0.0976   +0.0558   +0.8187   +0.0279   
++0.0419   +0.1284   +0.0140   +0.8157   
+
+
+[5] P-matrix for branch length 0.200000
++0.9175   +0.0394   +0.0234   +0.0197   
++0.0295   +0.9142   +0.0098   +0.0464   
++0.0703   +0.0394   +0.8707   +0.0197   
++0.0295   +0.0929   +0.0098   +0.8678   
+
++0.8776   +0.0588   +0.0341   +0.0294   
++0.0441   +0.8738   +0.0147   +0.0673   
++0.1024   +0.0588   +0.8094   +0.0294   
++0.0441   +0.1347   +0.0147   +0.8065   
+
++0.8413   +0.0768   +0.0435   +0.0384   
++0.0576   +0.8377   +0.0192   +0.0855   
++0.1304   +0.0768   +0.7543   +0.0384   
++0.0576   +0.1709   +0.0192   +0.7523   
+
++0.7876   +0.1039   +0.0565   +0.0519   
++0.0779   +0.7856   +0.0260   +0.1105   
++0.1696   +0.1039   +0.6746   +0.0519   
++0.0779   +0.2209   +0.0260   +0.6752   
+
+
+[5] P-matrix for branch length 1.000000
++0.6773   +0.1617   +0.0802   +0.0808   
++0.1213   +0.6835   +0.0404   +0.1548   
++0.2406   +0.1617   +0.5169   +0.0808   
++0.1213   +0.3097   +0.0404   +0.5287   
+
++0.5731   +0.2194   +0.0977   +0.1097   
++0.1646   +0.5939   +0.0549   +0.1866   
++0.2931   +0.2194   +0.3778   +0.1097   
++0.1646   +0.3733   +0.0549   +0.4073   
+
++0.5003   +0.2623   +0.1063   +0.1312   
++0.1967   +0.5357   +0.0656   +0.2020   
++0.3188   +0.2623   +0.2878   +0.1312   
++0.1967   +0.4039   +0.0656   +0.3338   
+
++0.4226   +0.3111   +0.1108   +0.1555   
++0.2333   +0.4784   +0.0778   +0.2105   
++0.3324   +0.3111   +0.2010   +0.1555   
++0.2333   +0.4210   +0.0778   +0.2679   
+
+
+[5] P-matrix for branch length 1.000000
++0.6773   +0.1617   +0.0802   +0.0808   
++0.1213   +0.6835   +0.0404   +0.1548   
++0.2406   +0.1617   +0.5169   +0.0808   
++0.1213   +0.3097   +0.0404   +0.5287   
+
++0.5731   +0.2194   +0.0977   +0.1097   
++0.1646   +0.5939   +0.0549   +0.1866   
++0.2931   +0.2194   +0.3778   +0.1097   
++0.1646   +0.3733   +0.0549   +0.4073   
+
++0.5003   +0.2623   +0.1063   +0.1312   
++0.1967   +0.5357   +0.0656   +0.2020   
++0.3188   +0.2623   +0.2878   +0.1312   
++0.1967   +0.4039   +0.0656   +0.3338   
+
++0.4226   +0.3111   +0.1108   +0.1555   
++0.2333   +0.4784   +0.0778   +0.2105   
++0.3324   +0.3111   +0.2010   +0.1555   
++0.2333   +0.4210   +0.0778   +0.2679   
+
+
+[5] CLV 5: [ {(0.03689,0.06943,0.00354,0.08332),(0.05336,0.09740,0.00775,0.11456),(0.06759,0.11986,0.01297,0.13842),(0.08723,0.14800,0.02302,0.16638)} {(0.84189,0.00087,0.00494,0.00087),(0.77025,0.00195,0.01048,0.00195),(0.70775,0.00332,0.01701,0.00332),(0.62036,0.00607,0.02876,0.00607)} {(0.03611,0.02699,0.00277,0.00274),(0.05163,0.03856,0.00602,0.00594),(0.06464,0.04827,0.01002,0.00985),(0.08183,0.06122,0.01762,0.01721)} {(0.00155,0.83579,0.00155,0.00862),(0.00346,0.76358,0.00346,0.018 [...]
+[5] CLV 6: [ {(0.03450,0.00204,0.00049,0.00241),(0.04810,0.00425,0.00150,0.00490),(0.05874,0.00680,0.00310,0.00768),(0.07147,0.01129,0.00683,0.01237)} {(0.01888,0.00013,0.03110,0.00013),(0.02460,0.00029,0.04212,0.00029),(0.02819,0.00048,0.04979,0.00048),(0.03107,0.00083,0.05705,0.00083)} {(0.03518,0.02641,0.00449,0.00443),(0.04969,0.03741,0.00953,0.00938),(0.06155,0.04655,0.01550,0.01518),(0.07679,0.05865,0.02631,0.02558)} {(0.00073,0.73017,0.00073,0.00455),(0.00158,0.62311,0.00158,0.009 [...]
+[5] CLV 7: [ {(0.00155,0.83579,0.00155,0.00862),(0.00346,0.76358,0.00346,0.01814),(0.00590,0.70176,0.00590,0.02921),(0.01079,0.61724,0.01079,0.04881)} {(0.00055,0.00010,0.75813,0.00010),(0.00116,0.00022,0.65512,0.00022),(0.00189,0.00037,0.56902,0.00037),(0.00320,0.00067,0.45505,0.00067)} {(0.01806,0.00137,0.00138,0.02561),(0.02582,0.00297,0.00301,0.03558),(0.03232,0.00492,0.00501,0.04335),(0.04091,0.00861,0.00881,0.05261)} {(0.00155,0.83579,0.00155,0.00862),(0.00346,0.76358,0.00346,0.018 [...]
+
+
+ TEST alpha(ncats) =   5.00( 4), mode = MEDIAN
 
 0.502078 0.803960 1.083302 1.610660 
 [5] P-matrix for branch length 0.100000
@@ -1404,7 +2808,103 @@
 [5] CLV 7: [ {(0.00138,0.84432,0.00138,0.00774),(0.00334,0.76721,0.00334,0.01757),(0.00576,0.70492,0.00576,0.02858),(0.01154,0.60691,0.01154,0.05155)} {(0.00049,0.00009,0.77044,0.00009),(0.00113,0.00021,0.66024,0.00021),(0.00185,0.00036,0.57337,0.00036),(0.00338,0.00072,0.44147,0.00072)} {(0.01713,0.00123,0.00124,0.02438),(0.02543,0.00287,0.00291,0.03511),(0.03199,0.00481,0.00489,0.04297),(0.04193,0.00915,0.00937,0.05362)} {(0.00138,0.84432,0.00138,0.00774),(0.00334,0.76721,0.00334,0.017 [...]
 
 
- TEST alpha(ncats) =  10.00( 4)
+ TEST alpha(ncats) =  10.00( 4), mode = MEAN
+
+0.659011 0.879765 1.079299 1.381925 
+[6] P-matrix for branch length 0.100000
++0.9478   +0.0248   +0.0150   +0.0124   
++0.0186   +0.9453   +0.0062   +0.0299   
++0.0451   +0.0248   +0.9177   +0.0124   
++0.0186   +0.0598   +0.0062   +0.9154   
+
++0.9312   +0.0327   +0.0197   +0.0164   
++0.0246   +0.9282   +0.0082   +0.0390   
++0.0590   +0.0327   +0.8919   +0.0164   
++0.0246   +0.0780   +0.0082   +0.8892   
+
++0.9166   +0.0398   +0.0237   +0.0199   
++0.0298   +0.9133   +0.0099   +0.0469   
++0.0710   +0.0398   +0.8693   +0.0199   
++0.0298   +0.0938   +0.0099   +0.8664   
+
++0.8952   +0.0502   +0.0295   +0.0251   
++0.0377   +0.8915   +0.0126   +0.0583   
++0.0884   +0.0502   +0.8363   +0.0251   
++0.0377   +0.1165   +0.0126   +0.8332   
+
+
+[6] P-matrix for branch length 0.200000
++0.8997   +0.0480   +0.0283   +0.0240   
++0.0360   +0.8960   +0.0120   +0.0559   
++0.0848   +0.0480   +0.8431   +0.0240   
++0.0360   +0.1119   +0.0120   +0.8401   
+
++0.8695   +0.0628   +0.0362   +0.0314   
++0.0471   +0.8657   +0.0157   +0.0715   
++0.1087   +0.0628   +0.7971   +0.0314   
++0.0471   +0.1429   +0.0157   +0.7943   
+
++0.8437   +0.0756   +0.0429   +0.0378   
++0.0567   +0.8401   +0.0189   +0.0843   
++0.1286   +0.0756   +0.7580   +0.0378   
++0.0567   +0.1686   +0.0189   +0.7558   
+
++0.8068   +0.0941   +0.0520   +0.0471   
++0.0706   +0.8041   +0.0235   +0.1018   
++0.1559   +0.0941   +0.7029   +0.0471   
++0.0706   +0.2035   +0.0235   +0.7023   
+
+
+[6] P-matrix for branch length 1.000000
++0.6271   +0.1890   +0.0893   +0.0945   
++0.1418   +0.6395   +0.0473   +0.1715   
++0.2679   +0.1890   +0.4486   +0.0945   
++0.1418   +0.3430   +0.0473   +0.4680   
+
++0.5553   +0.2297   +0.1001   +0.1149   
++0.1723   +0.5793   +0.0574   +0.1910   
++0.3003   +0.2297   +0.3551   +0.1149   
++0.1723   +0.3820   +0.0574   +0.3883   
+
++0.5046   +0.2597   +0.1058   +0.1299   
++0.1948   +0.5390   +0.0649   +0.2012   
++0.3175   +0.2597   +0.2929   +0.1299   
++0.1948   +0.4025   +0.0649   +0.3378   
+
++0.4469   +0.2954   +0.1100   +0.1477   
++0.2216   +0.4958   +0.0739   +0.2088   
++0.3300   +0.2954   +0.2269   +0.1477   
++0.2216   +0.4176   +0.0739   +0.2870   
+
+
+[6] P-matrix for branch length 1.000000
++0.6271   +0.1890   +0.0893   +0.0945   
++0.1418   +0.6395   +0.0473   +0.1715   
++0.2679   +0.1890   +0.4486   +0.0945   
++0.1418   +0.3430   +0.0473   +0.4680   
+
++0.5553   +0.2297   +0.1001   +0.1149   
++0.1723   +0.5793   +0.0574   +0.1910   
++0.3003   +0.2297   +0.3551   +0.1149   
++0.1723   +0.3820   +0.0574   +0.3883   
+
++0.5046   +0.2597   +0.1058   +0.1299   
++0.1948   +0.5390   +0.0649   +0.2012   
++0.3175   +0.2597   +0.2929   +0.1299   
++0.1948   +0.4025   +0.0649   +0.3378   
+
++0.4469   +0.2954   +0.1100   +0.1477   
++0.2216   +0.4958   +0.0739   +0.2088   
++0.3300   +0.2954   +0.2269   +0.1477   
++0.2216   +0.4176   +0.0739   +0.2870   
+
+
+[6] CLV 5: [ {(0.04438,0.08240,0.00523,0.09800),(0.05659,0.10264,0.00880,0.12024),(0.06667,0.11845,0.01258,0.13696),(0.08039,0.13860,0.01911,0.15730)} {(0.80939,0.00130,0.00719,0.00130),(0.75611,0.00222,0.01182,0.00222),(0.71182,0.00322,0.01653,0.00322),(0.65097,0.00498,0.02430,0.00498)} {(0.04322,0.03229,0.00407,0.00403),(0.05462,0.04078,0.00683,0.00673),(0.06381,0.04765,0.00972,0.00956),(0.07595,0.05677,0.01468,0.01437)} {(0.00231,0.80286,0.00231,0.01251),(0.00395,0.74950,0.00395,0.020 [...]
+[6] CLV 6: [ {(0.04084,0.00294,0.00085,0.00344),(0.05061,0.00478,0.00180,0.00548),(0.05809,0.00662,0.00297,0.00748),(0.06732,0.00960,0.00530,0.01063)} {(0.02169,0.00020,0.03638,0.00020),(0.02552,0.00033,0.04402,0.00033),(0.02799,0.00046,0.04935,0.00046),(0.03034,0.00070,0.05499,0.00070)} {(0.04188,0.03147,0.00654,0.00645),(0.05244,0.03952,0.01076,0.01057),(0.06080,0.04597,0.01507,0.01476),(0.07164,0.05450,0.02220,0.02163)} {(0.00107,0.68043,0.00107,0.00666),(0.00180,0.60310,0.00180,0.010 [...]
+[6] CLV 7: [ {(0.00231,0.80286,0.00231,0.01251),(0.00395,0.74950,0.00395,0.02042),(0.00572,0.70576,0.00572,0.02841),(0.00886,0.64658,0.00886,0.04142)} {(0.00080,0.00014,0.71086,0.00014),(0.00131,0.00025,0.63534,0.00025),(0.00184,0.00036,0.57452,0.00036),(0.00270,0.00055,0.49407,0.00055)} {(0.02161,0.00202,0.00204,0.03027),(0.02731,0.00337,0.00341,0.03742),(0.03190,0.00478,0.00486,0.04287),(0.03798,0.00718,0.00734,0.04959)} {(0.00231,0.80286,0.00231,0.01251),(0.00395,0.74950,0.00395,0.020 [...]
+
+
+ TEST alpha(ncats) =  10.00( 4), mode = MEDIAN
 
 0.631472 0.870888 1.072336 1.425304 
 [6] P-matrix for branch length 0.100000
@@ -1500,7 +3000,103 @@
 [6] CLV 7: [ {(0.00213,0.80992,0.00213,0.01162),(0.00387,0.75154,0.00387,0.02008),(0.00565,0.70722,0.00565,0.02812),(0.00935,0.63875,0.00935,0.04333)} {(0.00074,0.00013,0.72095,0.00013),(0.00129,0.00024,0.63820,0.00024),(0.00182,0.00035,0.57654,0.00035),(0.00283,0.00058,0.48359,0.00058)} {(0.02085,0.00187,0.00189,0.02929),(0.02709,0.00331,0.00335,0.03716),(0.03175,0.00473,0.00481,0.04269),(0.03877,0.00755,0.00771,0.05042)} {(0.00213,0.80992,0.00213,0.01162),(0.00387,0.75154,0.00387,0.020 [...]
 
 
- TEST alpha(ncats) =  50.00( 4)
+ TEST alpha(ncats) =  50.00( 4), mode = MEAN
+
+0.841595 0.950947 1.040899 1.166559 
+[7] P-matrix for branch length 0.100000
++0.9341   +0.0314   +0.0189   +0.0157   
++0.0235   +0.9311   +0.0078   +0.0375   
++0.0566   +0.0314   +0.8963   +0.0157   
++0.0235   +0.0749   +0.0078   +0.8937   
+
++0.9260   +0.0353   +0.0211   +0.0176   
++0.0265   +0.9229   +0.0088   +0.0419   
++0.0633   +0.0353   +0.8838   +0.0176   
++0.0265   +0.0837   +0.0088   +0.8810   
+
++0.9194   +0.0384   +0.0229   +0.0192   
++0.0288   +0.9161   +0.0096   +0.0454   
++0.0687   +0.0384   +0.8736   +0.0192   
++0.0288   +0.0908   +0.0096   +0.8707   
+
++0.9104   +0.0428   +0.0254   +0.0214   
++0.0321   +0.9069   +0.0107   +0.0503   
++0.0761   +0.0428   +0.8596   +0.0214   
++0.0321   +0.1005   +0.0107   +0.8566   
+
+
+[7] P-matrix for branch length 0.200000
++0.8746   +0.0603   +0.0349   +0.0302   
++0.0452   +0.8708   +0.0151   +0.0689   
++0.1047   +0.0603   +0.8048   +0.0302   
++0.0452   +0.1377   +0.0151   +0.8020   
+
++0.8602   +0.0674   +0.0387   +0.0337   
++0.0506   +0.8564   +0.0169   +0.0762   
++0.1160   +0.0674   +0.7829   +0.0337   
++0.0506   +0.1523   +0.0169   +0.7803   
+
++0.8486   +0.0732   +0.0416   +0.0366   
++0.0549   +0.8449   +0.0183   +0.0819   
++0.1249   +0.0732   +0.7653   +0.0366   
++0.0549   +0.1638   +0.0183   +0.7630   
+
++0.8328   +0.0811   +0.0456   +0.0405   
++0.0608   +0.8294   +0.0203   +0.0896   
++0.1368   +0.0811   +0.7416   +0.0405   
++0.0608   +0.1791   +0.0203   +0.7398   
+
+
+[7] P-matrix for branch length 1.000000
++0.5664   +0.2233   +0.0986   +0.1117   
++0.1675   +0.5884   +0.0558   +0.1883   
++0.2959   +0.2233   +0.3692   +0.1117   
++0.1675   +0.3766   +0.0558   +0.4000   
+
++0.5358   +0.2411   +0.1025   +0.1206   
++0.1808   +0.5636   +0.0603   +0.1953   
++0.3075   +0.2411   +0.3308   +0.1206   
++0.1808   +0.3906   +0.0603   +0.3683   
+
++0.5134   +0.2544   +0.1050   +0.1272   
++0.1908   +0.5459   +0.0636   +0.1997   
++0.3149   +0.2544   +0.3035   +0.1272   
++0.1908   +0.3993   +0.0636   +0.3463   
+
++0.4858   +0.2711   +0.1075   +0.1356   
++0.2033   +0.5247   +0.0678   +0.2042   
++0.3225   +0.2711   +0.2708   +0.1356   
++0.2033   +0.4084   +0.0678   +0.3205   
+
+
+[7] P-matrix for branch length 1.000000
++0.5664   +0.2233   +0.0986   +0.1117   
++0.1675   +0.5884   +0.0558   +0.1883   
++0.2959   +0.2233   +0.3692   +0.1117   
++0.1675   +0.3766   +0.0558   +0.4000   
+
++0.5358   +0.2411   +0.1025   +0.1206   
++0.1808   +0.5636   +0.0603   +0.1953   
++0.3075   +0.2411   +0.3308   +0.1206   
++0.1808   +0.3906   +0.0603   +0.3683   
+
++0.5134   +0.2544   +0.1050   +0.1272   
++0.1908   +0.5459   +0.0636   +0.1997   
++0.3149   +0.2544   +0.3035   +0.1272   
++0.1908   +0.3993   +0.0636   +0.3463   
+
++0.4858   +0.2711   +0.1075   +0.1356   
++0.2033   +0.5247   +0.0678   +0.2042   
++0.3225   +0.2711   +0.2708   +0.1356   
++0.2033   +0.4084   +0.0678   +0.3205   
+
+
+[7] CLV 5: [ {(0.05456,0.09936,0.00813,0.11669),(0.06029,0.10854,0.01010,0.12654),(0.06479,0.11558,0.01182,0.13396),(0.07081,0.12471,0.01438,0.14340)} {(0.76499,0.00205,0.01097,0.00205),(0.73991,0.00256,0.01345,0.00256),(0.72008,0.00301,0.01559,0.00301),(0.69353,0.00370,0.01871,0.00370)} {(0.05275,0.03939,0.00631,0.00623),(0.05801,0.04332,0.00782,0.00770),(0.06212,0.04639,0.00914,0.00899),(0.06752,0.05043,0.01109,0.01089)} {(0.00364,0.75834,0.00364,0.01897),(0.00455,0.73343,0.00455,0.023 [...]
+[7] CLV 6: [ {(0.04904,0.00444,0.00161,0.00511),(0.05342,0.00542,0.00218,0.00618),(0.05674,0.00626,0.00272,0.00709),(0.06099,0.00746,0.00358,0.00838)} {(0.02495,0.00030,0.04284,0.00030),(0.02650,0.00037,0.04608,0.00037),(0.02758,0.00044,0.04843,0.00044),(0.02882,0.00053,0.05126,0.00053)} {(0.05072,0.03820,0.00998,0.00981),(0.05555,0.04190,0.01225,0.01202),(0.05928,0.04478,0.01421,0.01392),(0.06414,0.04857,0.01707,0.01669)} {(0.00166,0.61563,0.00166,0.01018),(0.00206,0.58062,0.00206,0.012 [...]
+[7] CLV 7: [ {(0.00364,0.75834,0.00364,0.01897),(0.00455,0.73343,0.00455,0.02320),(0.00536,0.71387,0.00536,0.02683),(0.00657,0.68785,0.00657,0.03208)} {(0.00122,0.00023,0.64775,0.00023),(0.00149,0.00028,0.61287,0.00028),(0.00173,0.00033,0.58572,0.00033),(0.00208,0.00041,0.54995,0.00041)} {(0.02637,0.00311,0.00316,0.03627),(0.02901,0.00385,0.00391,0.03947),(0.03106,0.00450,0.00457,0.04189),(0.03376,0.00545,0.00555,0.04499)} {(0.00364,0.75834,0.00364,0.01897),(0.00455,0.73343,0.00455,0.023 [...]
+
+
+ TEST alpha(ncats) =  50.00( 4), mode = MEDIAN
 
 0.826400 0.948551 1.040033 1.185016 
 [7] P-matrix for branch length 0.100000
@@ -1596,7 +3192,103 @@
 [7] CLV 7: [ {(0.00352,0.76190,0.00352,0.01840),(0.00453,0.73396,0.00453,0.02310),(0.00535,0.71405,0.00535,0.02679),(0.00676,0.68416,0.00676,0.03287)} {(0.00118,0.00022,0.65276,0.00022),(0.00149,0.00028,0.61362,0.00028),(0.00173,0.00033,0.58597,0.00033),(0.00213,0.00042,0.54490,0.00042)} {(0.02599,0.00302,0.00306,0.03580),(0.02895,0.00384,0.00389,0.03940),(0.03104,0.00449,0.00456,0.04187),(0.03414,0.00559,0.00569,0.04541)} {(0.00352,0.76190,0.00352,0.01840),(0.00453,0.73396,0.00453,0.023 [...]
 
 
- TEST alpha(ncats) = 100.00( 4)
+ TEST alpha(ncats) = 100.00( 4), mode = MEAN
+
+0.887074 0.966129 1.029796 1.117001 
+[8] P-matrix for branch length 0.100000
++0.9307   +0.0330   +0.0198   +0.0165   
++0.0248   +0.9277   +0.0083   +0.0393   
++0.0594   +0.0330   +0.8911   +0.0165   
++0.0248   +0.0786   +0.0083   +0.8884   
+
++0.9249   +0.0358   +0.0214   +0.0179   
++0.0269   +0.9217   +0.0090   +0.0425   
++0.0642   +0.0358   +0.8821   +0.0179   
++0.0269   +0.0850   +0.0090   +0.8792   
+
++0.9202   +0.0381   +0.0227   +0.0190   
++0.0285   +0.9170   +0.0095   +0.0450   
++0.0681   +0.0381   +0.8749   +0.0190   
++0.0285   +0.0900   +0.0095   +0.8720   
+
++0.9139   +0.0411   +0.0244   +0.0206   
++0.0308   +0.9105   +0.0103   +0.0484   
++0.0732   +0.0411   +0.8651   +0.0206   
++0.0308   +0.0967   +0.0103   +0.8622   
+
+
+[8] P-matrix for branch length 0.200000
++0.8686   +0.0633   +0.0365   +0.0316   
++0.0475   +0.8648   +0.0158   +0.0719   
++0.1095   +0.0633   +0.7956   +0.0316   
++0.0475   +0.1439   +0.0158   +0.7928   
+
++0.8582   +0.0684   +0.0392   +0.0342   
++0.0513   +0.8544   +0.0171   +0.0771   
++0.1175   +0.0684   +0.7799   +0.0342   
++0.0513   +0.1543   +0.0171   +0.7773   
+
++0.8500   +0.0725   +0.0413   +0.0362   
++0.0544   +0.8463   +0.0181   +0.0812   
++0.1238   +0.0725   +0.7675   +0.0362   
++0.0544   +0.1624   +0.0181   +0.7651   
+
++0.8390   +0.0780   +0.0441   +0.0390   
++0.0585   +0.8354   +0.0195   +0.0866   
++0.1322   +0.0780   +0.7508   +0.0390   
++0.0585   +0.1732   +0.0195   +0.7488   
+
+
+[8] P-matrix for branch length 1.000000
++0.5532   +0.2309   +0.1004   +0.1155   
++0.1732   +0.5776   +0.0577   +0.1915   
++0.3011   +0.2309   +0.3525   +0.1155   
++0.1732   +0.3829   +0.0577   +0.3861   
+
++0.5319   +0.2434   +0.1030   +0.1217   
++0.1826   +0.5605   +0.0609   +0.1961   
++0.3089   +0.2434   +0.3259   +0.1217   
++0.1826   +0.3922   +0.0609   +0.3644   
+
++0.5161   +0.2528   +0.1047   +0.1264   
++0.1896   +0.5480   +0.0632   +0.1992   
++0.3141   +0.2528   +0.3067   +0.1264   
++0.1896   +0.3984   +0.0632   +0.3488   
+
++0.4962   +0.2648   +0.1066   +0.1324   
++0.1986   +0.5326   +0.0662   +0.2026   
++0.3199   +0.2648   +0.2830   +0.1324   
++0.1986   +0.4052   +0.0662   +0.3300   
+
+
+[8] P-matrix for branch length 1.000000
++0.5532   +0.2309   +0.1004   +0.1155   
++0.1732   +0.5776   +0.0577   +0.1915   
++0.3011   +0.2309   +0.3525   +0.1155   
++0.1732   +0.3829   +0.0577   +0.3861   
+
++0.5319   +0.2434   +0.1030   +0.1217   
++0.1826   +0.5605   +0.0609   +0.1961   
++0.3089   +0.2434   +0.3259   +0.1217   
++0.1826   +0.3922   +0.0609   +0.3644   
+
++0.5161   +0.2528   +0.1047   +0.1264   
++0.1896   +0.5480   +0.0632   +0.1992   
++0.3141   +0.2528   +0.3067   +0.1264   
++0.1896   +0.3984   +0.0632   +0.3488   
+
++0.4962   +0.2648   +0.1066   +0.1324   
++0.1986   +0.5326   +0.0662   +0.2026   
++0.3199   +0.2648   +0.2830   +0.1324   
++0.1986   +0.4052   +0.0662   +0.3300   
+
+
+[8] CLV 5: [ {(0.05698,0.10326,0.00893,0.12090),(0.06106,0.10976,0.01038,0.12784),(0.06425,0.11473,0.01160,0.13308),(0.06847,0.12120,0.01335,0.13980)} {(0.75443,0.00225,0.01198,0.00225),(0.73651,0.00263,0.01381,0.00263),(0.72249,0.00296,0.01533,0.00296),(0.70384,0.00342,0.01747,0.00342)} {(0.05497,0.04105,0.00693,0.00683),(0.05872,0.04385,0.00804,0.00792),(0.06162,0.04601,0.00897,0.00883),(0.06543,0.04887,0.01031,0.01013)} {(0.00401,0.74782,0.00401,0.02070),(0.00468,0.73007,0.00468,0.023 [...]
+[8] CLV 6: [ {(0.05091,0.00484,0.00183,0.00555),(0.05399,0.00556,0.00227,0.00634),(0.05634,0.00615,0.00265,0.00698),(0.05937,0.00698,0.00323,0.00787)} {(0.02563,0.00033,0.04424,0.00033),(0.02670,0.00038,0.04650,0.00038),(0.02746,0.00043,0.04816,0.00043),(0.02837,0.00049,0.05020,0.00049)} {(0.05277,0.03977,0.01091,0.01071),(0.05619,0.04240,0.01257,0.01233),(0.05883,0.04443,0.01396,0.01368),(0.06227,0.04711,0.01593,0.01558)} {(0.00182,0.60074,0.00182,0.01113),(0.00212,0.57597,0.00212,0.012 [...]
+[8] CLV 7: [ {(0.00401,0.74782,0.00401,0.02070),(0.00468,0.73007,0.00468,0.02380),(0.00526,0.71624,0.00526,0.02637),(0.00608,0.69793,0.00608,0.02999)} {(0.00133,0.00025,0.63299,0.00025),(0.00153,0.00029,0.60820,0.00029),(0.00170,0.00033,0.58900,0.00033),(0.00194,0.00038,0.56376,0.00038)} {(0.02749,0.00341,0.00346,0.03763),(0.02936,0.00396,0.00402,0.03989),(0.03081,0.00441,0.00449,0.04160),(0.03272,0.00506,0.00515,0.04380)} {(0.00401,0.74782,0.00401,0.02070),(0.00468,0.73007,0.00468,0.023 [...]
+
+
+ TEST alpha(ncats) = 100.00( 4), mode = MEDIAN
 
 0.875906 0.964739 1.029549 1.129806 
 [8] P-matrix for branch length 0.100000
@@ -1692,9 +3384,9 @@
 [8] CLV 7: [ {(0.00391,0.75039,0.00391,0.02027),(0.00467,0.73038,0.00467,0.02375),(0.00525,0.71629,0.00525,0.02636),(0.00621,0.69531,0.00621,0.03052)} {(0.00130,0.00024,0.63658,0.00024),(0.00153,0.00029,0.60862,0.00029),(0.00170,0.00033,0.58907,0.00033),(0.00198,0.00039,0.56016,0.00039)} {(0.02722,0.00334,0.00339,0.03730),(0.02933,0.00395,0.00401,0.03985),(0.03080,0.00441,0.00449,0.04159),(0.03299,0.00516,0.00525,0.04411)} {(0.00391,0.75039,0.00391,0.02027),(0.00467,0.73038,0.00467,0.023 [...]
 
 
- TEST alpha(ncats) =   0.10( 8)
+ TEST alpha(ncats) =   0.10( 8), mode = MEAN
 
-0.000000 0.000001 0.000090 0.002066 0.023015 0.164491 0.915773 6.894563 
+0.000000 0.000000 0.000076 0.002201 0.027213 0.204750 1.155574 6.610186 
 [0] P-matrix for branch length 0.100000
 +1.0000   +0.0000   +0.0000   +0.0000   
 +0.0000   +1.0000   +0.0000   +0.0000   
@@ -1716,25 +3408,25 @@
 +0.0002   +0.0001   +0.9997   +0.0000   
 +0.0001   +0.0002   +0.0000   +0.9997   
 
-+0.9981   +0.0009   +0.0006   +0.0004   
-+0.0007   +0.9980   +0.0002   +0.0011   
-+0.0017   +0.0009   +0.9970   +0.0004   
-+0.0007   +0.0022   +0.0002   +0.9969   
++0.9978   +0.0011   +0.0007   +0.0005   
++0.0008   +0.9976   +0.0003   +0.0013   
++0.0020   +0.0011   +0.9964   +0.0005   
++0.0008   +0.0026   +0.0003   +0.9963   
 
-+0.9866   +0.0063   +0.0039   +0.0032   
-+0.0048   +0.9858   +0.0016   +0.0079   
-+0.0118   +0.0063   +0.9787   +0.0032   
-+0.0048   +0.0157   +0.0016   +0.9780   
++0.9833   +0.0079   +0.0049   +0.0039   
++0.0059   +0.9824   +0.0020   +0.0097   
++0.0146   +0.0079   +0.9736   +0.0039   
++0.0059   +0.0195   +0.0020   +0.9727   
 
-+0.9286   +0.0340   +0.0204   +0.0170   
-+0.0255   +0.9255   +0.0085   +0.0405   
-+0.0612   +0.0340   +0.8878   +0.0170   
-+0.0255   +0.0809   +0.0085   +0.8850   
++0.9112   +0.0425   +0.0252   +0.0212   
++0.0318   +0.9077   +0.0106   +0.0498   
++0.0755   +0.0425   +0.8608   +0.0212   
++0.0318   +0.0997   +0.0106   +0.8579   
 
-+0.6161   +0.1952   +0.0911   +0.0976   
-+0.1464   +0.6300   +0.0488   +0.1748   
-+0.2734   +0.1952   +0.4338   +0.0976   
-+0.1464   +0.3497   +0.0488   +0.4552   
++0.6264   +0.1895   +0.0894   +0.0947   
++0.1421   +0.6388   +0.0474   +0.1717   
++0.2683   +0.1895   +0.4476   +0.0947   
++0.1421   +0.3434   +0.0474   +0.4671   
 
 
 [0] P-matrix for branch length 0.200000
@@ -1753,30 +3445,30 @@
 +0.0000   +0.0000   +1.0000   +0.0000   
 +0.0000   +0.0000   +0.0000   +1.0000   
 
-+0.9997   +0.0002   +0.0001   +0.0001   
++0.9996   +0.0002   +0.0001   +0.0001   
 +0.0001   +0.9996   +0.0000   +0.0002   
-+0.0003   +0.0002   +0.9995   +0.0001   
++0.0003   +0.0002   +0.9994   +0.0001   
 +0.0001   +0.0004   +0.0000   +0.9994   
 
-+0.9962   +0.0018   +0.0011   +0.0009   
-+0.0013   +0.9960   +0.0004   +0.0022   
-+0.0033   +0.0018   +0.9940   +0.0009   
-+0.0013   +0.0044   +0.0004   +0.9938   
++0.9955   +0.0021   +0.0013   +0.0011   
++0.0016   +0.9953   +0.0005   +0.0026   
++0.0039   +0.0021   +0.9929   +0.0011   
++0.0016   +0.0053   +0.0005   +0.9926   
 
-+0.9734   +0.0126   +0.0077   +0.0063   
-+0.0094   +0.9720   +0.0031   +0.0154   
-+0.0232   +0.0126   +0.9579   +0.0063   
-+0.0094   +0.0309   +0.0031   +0.9566   
++0.9671   +0.0156   +0.0096   +0.0078   
++0.0117   +0.9654   +0.0039   +0.0191   
++0.0287   +0.0156   +0.9479   +0.0078   
++0.0117   +0.0381   +0.0039   +0.9463   
 
-+0.8648   +0.0652   +0.0375   +0.0326   
-+0.0489   +0.8610   +0.0163   +0.0738   
-+0.1124   +0.0652   +0.7898   +0.0326   
-+0.0489   +0.1477   +0.0163   +0.7871   
++0.8341   +0.0804   +0.0453   +0.0402   
++0.0603   +0.8307   +0.0201   +0.0889   
++0.1358   +0.0804   +0.7436   +0.0402   
++0.0603   +0.1778   +0.0201   +0.7418   
 
-+0.4473   +0.2951   +0.1100   +0.1476   
-+0.2213   +0.4961   +0.0738   +0.2088   
-+0.3299   +0.2951   +0.2274   +0.1476   
-+0.2213   +0.4175   +0.0738   +0.2873   
++0.4567   +0.2892   +0.1095   +0.1446   
++0.2169   +0.5030   +0.0723   +0.2078   
++0.3285   +0.2892   +0.2378   +0.1446   
++0.2169   +0.4157   +0.0723   +0.2951   
 
 
 [0] P-matrix for branch length 1.000000
@@ -1795,30 +3487,30 @@
 +0.0001   +0.0000   +0.9999   +0.0000   
 +0.0000   +0.0001   +0.0000   +0.9999   
 
-+0.9983   +0.0008   +0.0005   +0.0004   
-+0.0006   +0.9982   +0.0002   +0.0010   
-+0.0015   +0.0008   +0.9973   +0.0004   
-+0.0006   +0.0020   +0.0002   +0.9972   
++0.9982   +0.0009   +0.0005   +0.0004   
++0.0006   +0.9981   +0.0002   +0.0011   
++0.0016   +0.0009   +0.9971   +0.0004   
++0.0006   +0.0021   +0.0002   +0.9970   
 
-+0.9813   +0.0088   +0.0055   +0.0044   
-+0.0066   +0.9803   +0.0022   +0.0109   
-+0.0164   +0.0088   +0.9703   +0.0044   
-+0.0066   +0.0218   +0.0022   +0.9693   
++0.9779   +0.0104   +0.0064   +0.0052   
++0.0078   +0.9767   +0.0026   +0.0128   
++0.0193   +0.0104   +0.9650   +0.0052   
++0.0078   +0.0257   +0.0026   +0.9639   
 
-+0.8772   +0.0590   +0.0342   +0.0295   
-+0.0443   +0.8734   +0.0148   +0.0676   
-+0.1027   +0.0590   +0.8087   +0.0295   
-+0.0443   +0.1351   +0.0148   +0.8058   
++0.8508   +0.0721   +0.0411   +0.0361   
++0.0541   +0.8471   +0.0180   +0.0808   
++0.1232   +0.0721   +0.7686   +0.0361   
++0.0541   +0.1616   +0.0180   +0.7663   
 
-+0.5452   +0.2356   +0.1014   +0.1178   
-+0.1767   +0.5712   +0.0589   +0.1933   
-+0.3041   +0.2356   +0.3425   +0.1178   
-+0.1767   +0.3865   +0.0589   +0.3779   
++0.4881   +0.2697   +0.1073   +0.1349   
++0.2023   +0.5264   +0.0674   +0.2039   
++0.3220   +0.2697   +0.2734   +0.1349   
++0.2023   +0.4077   +0.0674   +0.3225   
 
-+0.3006   +0.3995   +0.1002   +0.1998   
-+0.2996   +0.4003   +0.0999   +0.2002   
-+0.3005   +0.3995   +0.1002   +0.1998   
-+0.2996   +0.4003   +0.0999   +0.2002   
++0.3007   +0.3993   +0.1002   +0.1997   
++0.2995   +0.4004   +0.0998   +0.2002   
++0.3007   +0.3993   +0.1003   +0.1997   
++0.2995   +0.4004   +0.0998   +0.2002   
 
 
 [0] P-matrix for branch length 1.000000
@@ -1837,19 +3529,195 @@
 +0.0001   +0.0000   +0.9999   +0.0000   
 +0.0000   +0.0001   +0.0000   +0.9999   
 
-+0.9983   +0.0008   +0.0005   +0.0004   
-+0.0006   +0.9982   +0.0002   +0.0010   
-+0.0015   +0.0008   +0.9973   +0.0004   
-+0.0006   +0.0020   +0.0002   +0.9972   
++0.9982   +0.0009   +0.0005   +0.0004   
++0.0006   +0.9981   +0.0002   +0.0011   
++0.0016   +0.0009   +0.9971   +0.0004   
++0.0006   +0.0021   +0.0002   +0.9970   
 
-+0.9813   +0.0088   +0.0055   +0.0044   
-+0.0066   +0.9803   +0.0022   +0.0109   
-+0.0164   +0.0088   +0.9703   +0.0044   
-+0.0066   +0.0218   +0.0022   +0.9693   
++0.9779   +0.0104   +0.0064   +0.0052   
++0.0078   +0.9767   +0.0026   +0.0128   
++0.0193   +0.0104   +0.9650   +0.0052   
++0.0078   +0.0257   +0.0026   +0.9639   
 
-+0.8772   +0.0590   +0.0342   +0.0295   
-+0.0443   +0.8734   +0.0148   +0.0676   
-+0.1027   +0.0590   +0.8087   +0.0295   
++0.8508   +0.0721   +0.0411   +0.0361   
++0.0541   +0.8471   +0.0180   +0.0808   
++0.1232   +0.0721   +0.7686   +0.0361   
++0.0541   +0.1616   +0.0180   +0.7663   
+
++0.4881   +0.2697   +0.1073   +0.1349   
++0.2023   +0.5264   +0.0674   +0.2039   
++0.3220   +0.2697   +0.2734   +0.1349   
++0.2023   +0.4077   +0.0674   +0.3225   
+
++0.3007   +0.3993   +0.1002   +0.1997   
++0.2995   +0.4004   +0.0998   +0.2002   
++0.3007   +0.3993   +0.1003   +0.1997   
++0.2995   +0.4004   +0.0998   +0.2002   
+
+
+[0] CLV 5: [ {(0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000),(0.00001,0.00001,0.00000,0.00001),(0.00017,0.00034,0.00000,0.00043),(0.00210,0.00419,0.00001,0.00522),(0.01520,0.02968,0.00057,0.03651),(0.07029,0.12394,0.01415,0.14261),(0.17389,0.21363,0.13680,0.21284)} {(1.00000,0.00000,0.00000,0.00000),(1.00000,0.00000,0.00000,0.00000),(0.99997,0.00000,0.00000,0.00000),(0.99927,0.00000,0.00000,0.00000),(0.99107,0.00000,0.00002,0.00000),(0.93519,0.00014,0.00082,0.00014), [...]
+[0] CLV 6: [ {(0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000),(0.00001,0.00000,0.00000,0.00000),(0.00017,0.00000,0.00000,0.00000),(0.00209,0.00001,0.00000,0.00001),(0.01482,0.00035,0.00003,0.00042),(0.06064,0.00736,0.00350,0.00827),(0.08303,0.04429,0.05535,0.04424)} {(0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00001,0.00000),(0.00011,0.00000,0.00016,0.00000),(0.00130,0.00000,0.00196,0.00000),(0.00879,0.00002,0.01372,0.00002), [...]
+[0] CLV 7: [ {(0.00000,1.00000,0.00000,0.00000),(0.00000,1.00000,0.00000,0.00000),(0.00000,0.99997,0.00000,0.00000),(0.00000,0.99923,0.00000,0.00000),(0.00000,0.99055,0.00000,0.00003),(0.00024,0.93191,0.00024,0.00145),(0.00646,0.69007,0.00646,0.03161),(0.08362,0.25298,0.08362,0.17281)} {(0.00000,0.00000,1.00000,0.00000),(0.00000,0.00000,1.00000,0.00000),(0.00000,0.00000,0.99996,0.00000),(0.00000,0.00000,0.99885,0.00000),(0.00000,0.00000,0.98584,0.00000),(0.00009,0.00002,0.89857,0.00002), [...]
+
+
+ TEST alpha(ncats) =   0.10( 8), mode = MEDIAN
+
+0.000000 0.000001 0.000090 0.002066 0.023015 0.164491 0.915773 6.894563 
+[0] P-matrix for branch length 0.100000
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9998   +0.0001   +0.0001   +0.0000   
++0.0001   +0.9998   +0.0000   +0.0001   
++0.0002   +0.0001   +0.9997   +0.0000   
++0.0001   +0.0002   +0.0000   +0.9997   
+
++0.9981   +0.0009   +0.0006   +0.0004   
++0.0007   +0.9980   +0.0002   +0.0011   
++0.0017   +0.0009   +0.9970   +0.0004   
++0.0007   +0.0022   +0.0002   +0.9969   
+
++0.9866   +0.0063   +0.0039   +0.0032   
++0.0048   +0.9858   +0.0016   +0.0079   
++0.0118   +0.0063   +0.9787   +0.0032   
++0.0048   +0.0157   +0.0016   +0.9780   
+
++0.9286   +0.0340   +0.0204   +0.0170   
++0.0255   +0.9255   +0.0085   +0.0405   
++0.0612   +0.0340   +0.8878   +0.0170   
++0.0255   +0.0809   +0.0085   +0.8850   
+
++0.6161   +0.1952   +0.0911   +0.0976   
++0.1464   +0.6300   +0.0488   +0.1748   
++0.2734   +0.1952   +0.4338   +0.0976   
++0.1464   +0.3497   +0.0488   +0.4552   
+
+
+[0] P-matrix for branch length 0.200000
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9997   +0.0002   +0.0001   +0.0001   
++0.0001   +0.9996   +0.0000   +0.0002   
++0.0003   +0.0002   +0.9995   +0.0001   
++0.0001   +0.0004   +0.0000   +0.9994   
+
++0.9962   +0.0018   +0.0011   +0.0009   
++0.0013   +0.9960   +0.0004   +0.0022   
++0.0033   +0.0018   +0.9940   +0.0009   
++0.0013   +0.0044   +0.0004   +0.9938   
+
++0.9734   +0.0126   +0.0077   +0.0063   
++0.0094   +0.9720   +0.0031   +0.0154   
++0.0232   +0.0126   +0.9579   +0.0063   
++0.0094   +0.0309   +0.0031   +0.9566   
+
++0.8648   +0.0652   +0.0375   +0.0326   
++0.0489   +0.8610   +0.0163   +0.0738   
++0.1124   +0.0652   +0.7898   +0.0326   
++0.0489   +0.1477   +0.0163   +0.7871   
+
++0.4473   +0.2951   +0.1100   +0.1476   
++0.2213   +0.4961   +0.0738   +0.2088   
++0.3299   +0.2951   +0.2274   +0.1476   
++0.2213   +0.4175   +0.0738   +0.2873   
+
+
+[0] P-matrix for branch length 1.000000
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9999   +0.0000   +0.0000   +0.0000   
++0.0000   +0.9999   +0.0000   +0.0000   
++0.0001   +0.0000   +0.9999   +0.0000   
++0.0000   +0.0001   +0.0000   +0.9999   
+
++0.9983   +0.0008   +0.0005   +0.0004   
++0.0006   +0.9982   +0.0002   +0.0010   
++0.0015   +0.0008   +0.9973   +0.0004   
++0.0006   +0.0020   +0.0002   +0.9972   
+
++0.9813   +0.0088   +0.0055   +0.0044   
++0.0066   +0.9803   +0.0022   +0.0109   
++0.0164   +0.0088   +0.9703   +0.0044   
++0.0066   +0.0218   +0.0022   +0.9693   
+
++0.8772   +0.0590   +0.0342   +0.0295   
++0.0443   +0.8734   +0.0148   +0.0676   
++0.1027   +0.0590   +0.8087   +0.0295   
++0.0443   +0.1351   +0.0148   +0.8058   
+
++0.5452   +0.2356   +0.1014   +0.1178   
++0.1767   +0.5712   +0.0589   +0.1933   
++0.3041   +0.2356   +0.3425   +0.1178   
++0.1767   +0.3865   +0.0589   +0.3779   
+
++0.3006   +0.3995   +0.1002   +0.1998   
++0.2996   +0.4003   +0.0999   +0.2002   
++0.3005   +0.3995   +0.1002   +0.1998   
++0.2996   +0.4003   +0.0999   +0.2002   
+
+
+[0] P-matrix for branch length 1.000000
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9999   +0.0000   +0.0000   +0.0000   
++0.0000   +0.9999   +0.0000   +0.0000   
++0.0001   +0.0000   +0.9999   +0.0000   
++0.0000   +0.0001   +0.0000   +0.9999   
+
++0.9983   +0.0008   +0.0005   +0.0004   
++0.0006   +0.9982   +0.0002   +0.0010   
++0.0015   +0.0008   +0.9973   +0.0004   
++0.0006   +0.0020   +0.0002   +0.9972   
+
++0.9813   +0.0088   +0.0055   +0.0044   
++0.0066   +0.9803   +0.0022   +0.0109   
++0.0164   +0.0088   +0.9703   +0.0044   
++0.0066   +0.0218   +0.0022   +0.9693   
+
++0.8772   +0.0590   +0.0342   +0.0295   
++0.0443   +0.8734   +0.0148   +0.0676   
++0.1027   +0.0590   +0.8087   +0.0295   
 +0.0443   +0.1351   +0.0148   +0.8058   
 
 +0.5452   +0.2356   +0.1014   +0.1178   
@@ -1868,7 +3736,183 @@
 [0] CLV 7: [ {(0.00000,1.00000,0.00000,0.00000),(0.00000,1.00000,0.00000,0.00000),(0.00000,0.99997,0.00000,0.00000),(0.00000,0.99928,0.00000,0.00000),(0.00000,0.99200,0.00000,0.00002),(0.00016,0.94476,0.00016,0.00095),(0.00425,0.74130,0.00425,0.02181),(0.08710,0.24612,0.08710,0.17433)} {(0.00000,0.00000,1.00000,0.00000),(0.00000,0.00000,1.00000,0.00000),(0.00000,0.00000,0.99995,0.00000),(0.00000,0.00000,0.99892,0.00000),(0.00000,0.00000,0.98801,0.00000),(0.00006,0.00001,0.91761,0.00001), [...]
 
 
- TEST alpha(ncats) =   0.50( 8)
+ TEST alpha(ncats) =   0.50( 8), mode = MEAN
+
+0.006657 0.060914 0.175174 0.363106 0.652640 1.104364 1.880685 3.756460 
+[1] P-matrix for branch length 0.100000
++0.9995   +0.0003   +0.0002   +0.0001   
++0.0002   +0.9994   +0.0001   +0.0003   
++0.0005   +0.0003   +0.9991   +0.0001   
++0.0002   +0.0006   +0.0001   +0.9991   
+
++0.9950   +0.0024   +0.0015   +0.0012   
++0.0018   +0.9947   +0.0006   +0.0029   
++0.0044   +0.0024   +0.9921   +0.0012   
++0.0018   +0.0059   +0.0006   +0.9918   
+
++0.9857   +0.0067   +0.0042   +0.0034   
++0.0051   +0.9849   +0.0017   +0.0084   
++0.0125   +0.0067   +0.9773   +0.0034   
++0.0051   +0.0167   +0.0017   +0.9766   
+
++0.9707   +0.0139   +0.0085   +0.0069   
++0.0104   +0.9692   +0.0035   +0.0170   
++0.0255   +0.0139   +0.9537   +0.0069   
++0.0104   +0.0340   +0.0035   +0.9522   
+
++0.9483   +0.0246   +0.0149   +0.0123   
++0.0184   +0.9458   +0.0061   +0.0296   
++0.0447   +0.0246   +0.9185   +0.0123   
++0.0184   +0.0592   +0.0061   +0.9162   
+
++0.9148   +0.0407   +0.0242   +0.0203   
++0.0305   +0.9115   +0.0102   +0.0479   
++0.0725   +0.0407   +0.8665   +0.0203   
++0.0305   +0.0958   +0.0102   +0.8636   
+
++0.8616   +0.0668   +0.0383   +0.0334   
++0.0501   +0.8578   +0.0167   +0.0755   
++0.1149   +0.0668   +0.7850   +0.0334   
++0.0501   +0.1509   +0.0167   +0.7823   
+
++0.7520   +0.1222   +0.0647   +0.0611   
++0.0917   +0.7519   +0.0306   +0.1259   
++0.1940   +0.1222   +0.6226   +0.0611   
++0.0917   +0.2518   +0.0306   +0.6260   
+
+
+[1] P-matrix for branch length 0.200000
++0.9989   +0.0005   +0.0003   +0.0003   
++0.0004   +0.9988   +0.0001   +0.0006   
++0.0010   +0.0005   +0.9983   +0.0003   
++0.0004   +0.0013   +0.0001   +0.9982   
+
++0.9900   +0.0047   +0.0029   +0.0024   
++0.0035   +0.9895   +0.0012   +0.0058   
++0.0088   +0.0047   +0.9842   +0.0024   
++0.0035   +0.0117   +0.0012   +0.9836   
+
++0.9717   +0.0134   +0.0082   +0.0067   
++0.0100   +0.9702   +0.0033   +0.0164   
++0.0247   +0.0134   +0.9553   +0.0067   
++0.0100   +0.0328   +0.0033   +0.9538   
+
++0.9427   +0.0272   +0.0165   +0.0136   
++0.0204   +0.9401   +0.0068   +0.0327   
++0.0494   +0.0272   +0.9098   +0.0136   
++0.0204   +0.0654   +0.0068   +0.9073   
+
++0.9006   +0.0476   +0.0280   +0.0238   
++0.0357   +0.8969   +0.0119   +0.0555   
++0.0841   +0.0476   +0.8445   +0.0238   
++0.0357   +0.1109   +0.0119   +0.8415   
+
++0.8405   +0.0772   +0.0437   +0.0386   
++0.0579   +0.8370   +0.0193   +0.0858   
++0.1310   +0.0772   +0.7532   +0.0386   
++0.0579   +0.1716   +0.0193   +0.7512   
+
++0.7517   +0.1224   +0.0647   +0.0612   
++0.0918   +0.7516   +0.0306   +0.1260   
++0.1942   +0.1224   +0.6222   +0.0612   
++0.0918   +0.2520   +0.0306   +0.6256   
+
++0.5948   +0.2071   +0.0945   +0.1036   
++0.1553   +0.6120   +0.0518   +0.1809   
++0.2835   +0.2071   +0.4058   +0.1036   
++0.1553   +0.3618   +0.0518   +0.4310   
+
+
+[1] P-matrix for branch length 1.000000
++0.9945   +0.0026   +0.0016   +0.0013   
++0.0019   +0.9942   +0.0006   +0.0032   
++0.0048   +0.0026   +0.9913   +0.0013   
++0.0019   +0.0064   +0.0006   +0.9910   
+
++0.9516   +0.0230   +0.0140   +0.0115   
++0.0172   +0.9493   +0.0057   +0.0278   
++0.0419   +0.0230   +0.9237   +0.0115   
++0.0172   +0.0555   +0.0057   +0.9215   
+
++0.8701   +0.0626   +0.0361   +0.0313   
++0.0469   +0.8663   +0.0156   +0.0712   
++0.1083   +0.0626   +0.7979   +0.0313   
++0.0469   +0.1424   +0.0156   +0.7951   
+
++0.7585   +0.1188   +0.0632   +0.0594   
++0.0891   +0.7580   +0.0297   +0.1231   
++0.1896   +0.1188   +0.6321   +0.0594   
++0.0891   +0.2462   +0.0297   +0.6349   
+
++0.6295   +0.1877   +0.0889   +0.0939   
++0.1408   +0.6415   +0.0469   +0.1707   
++0.2667   +0.1877   +0.4517   +0.0939   
++0.1408   +0.3415   +0.0469   +0.4708   
+
++0.4990   +0.2631   +0.1064   +0.1315   
++0.1973   +0.5347   +0.0658   +0.2022   
++0.3191   +0.2631   +0.2862   +0.1315   
++0.1973   +0.4043   +0.0658   +0.3326   
+
++0.3859   +0.3356   +0.1107   +0.1678   
++0.2517   +0.4533   +0.0839   +0.2111   
++0.3321   +0.3356   +0.1646   +0.1678   
++0.2517   +0.4222   +0.0839   +0.2422   
+
++0.3125   +0.3896   +0.1032   +0.1948   
++0.2922   +0.4073   +0.0974   +0.2031   
++0.3095   +0.3896   +0.1061   +0.1948   
++0.2922   +0.4063   +0.0974   +0.2041   
+
+
+[1] P-matrix for branch length 1.000000
++0.9945   +0.0026   +0.0016   +0.0013   
++0.0019   +0.9942   +0.0006   +0.0032   
++0.0048   +0.0026   +0.9913   +0.0013   
++0.0019   +0.0064   +0.0006   +0.9910   
+
++0.9516   +0.0230   +0.0140   +0.0115   
++0.0172   +0.9493   +0.0057   +0.0278   
++0.0419   +0.0230   +0.9237   +0.0115   
++0.0172   +0.0555   +0.0057   +0.9215   
+
++0.8701   +0.0626   +0.0361   +0.0313   
++0.0469   +0.8663   +0.0156   +0.0712   
++0.1083   +0.0626   +0.7979   +0.0313   
++0.0469   +0.1424   +0.0156   +0.7951   
+
++0.7585   +0.1188   +0.0632   +0.0594   
++0.0891   +0.7580   +0.0297   +0.1231   
++0.1896   +0.1188   +0.6321   +0.0594   
++0.0891   +0.2462   +0.0297   +0.6349   
+
++0.6295   +0.1877   +0.0889   +0.0939   
++0.1408   +0.6415   +0.0469   +0.1707   
++0.2667   +0.1877   +0.4517   +0.0939   
++0.1408   +0.3415   +0.0469   +0.4708   
+
++0.4990   +0.2631   +0.1064   +0.1315   
++0.1973   +0.5347   +0.0658   +0.2022   
++0.3191   +0.2631   +0.2862   +0.1315   
++0.1973   +0.4043   +0.0658   +0.3326   
+
++0.3859   +0.3356   +0.1107   +0.1678   
++0.2517   +0.4533   +0.0839   +0.2111   
++0.3321   +0.3356   +0.1646   +0.1678   
++0.2517   +0.4222   +0.0839   +0.2422   
+
++0.3125   +0.3896   +0.1032   +0.1948   
++0.2922   +0.4073   +0.0974   +0.2031   
++0.3095   +0.3896   +0.1061   +0.1948   
++0.2922   +0.4063   +0.0974   +0.2041   
+
+
+[1] CLV 5: [ {(0.00052,0.00103,0.00000,0.00129),(0.00467,0.00927,0.00005,0.01153),(0.01309,0.02565,0.00042,0.03162),(0.02604,0.04995,0.00172,0.06070),(0.04401,0.08177,0.00514,0.09729),(0.06787,0.12029,0.01309,0.13886),(0.09948,0.16368,0.03125,0.18078),(0.14465,0.20578,0.08017,0.21218)} {(0.99781,0.00000,0.00000,0.00000),(0.98014,0.00001,0.00008,0.00001),(0.94422,0.00010,0.00061,0.00010),(0.88867,0.00042,0.00244,0.00042),(0.81100,0.00128,0.00707,0.00128),(0.70650,0.00335,0.01715,0.00335), [...]
+[1] CLV 6: [ {(0.00052,0.00000,0.00000,0.00000),(0.00463,0.00003,0.00000,0.00004),(0.01281,0.00026,0.00002,0.00031),(0.02489,0.00102,0.00017,0.00122),(0.04054,0.00289,0.00083,0.00339),(0.05894,0.00686,0.00314,0.00774),(0.07807,0.01464,0.01028,0.01575),(0.09046,0.03062,0.03292,0.03112)} {(0.00032,0.00000,0.00048,0.00000),(0.00285,0.00000,0.00433,0.00000),(0.00766,0.00002,0.01188,0.00002),(0.01420,0.00007,0.02278,0.00007),(0.02156,0.00019,0.03612,0.00019),(0.02824,0.00048,0.04992,0.00048), [...]
+[1] CLV 7: [ {(0.00000,0.99768,0.00000,0.00000),(0.00002,0.97903,0.00002,0.00014),(0.00018,0.94133,0.00018,0.00108),(0.00074,0.88370,0.00074,0.00428),(0.00227,0.80449,0.00227,0.01230),(0.00596,0.70054,0.00596,0.02946),(0.01497,0.56496,0.01497,0.06350),(0.04290,0.37449,0.04290,0.13093)} {(0.00000,0.00000,0.99652,0.00000),(0.00001,0.00000,0.96860,0.00000),(0.00007,0.00001,0.91252,0.00001),(0.00027,0.00005,0.82770,0.00005),(0.00079,0.00014,0.71318,0.00014),(0.00191,0.00037,0.56734,0.00037), [...]
+
+
+ TEST alpha(ncats) =   0.50( 8), mode = MEDIAN
 
 0.008222 0.058554 0.164605 0.339227 0.608857 1.031680 1.770101 4.018755 
 [1] P-matrix for branch length 0.100000
@@ -2044,28 +4088,204 @@
 [1] CLV 7: [ {(0.00000,0.99713,0.00000,0.00000),(0.00002,0.97983,0.00002,0.00013),(0.00016,0.94473,0.00016,0.00095),(0.00065,0.89074,0.00065,0.00377),(0.00199,0.81578,0.00199,0.01090),(0.00527,0.71583,0.00527,0.02645),(0.01354,0.58154,0.01354,0.05863),(0.04696,0.35746,0.04696,0.13752)} {(0.00000,0.00000,0.99570,0.00000),(0.00001,0.00000,0.96980,0.00000),(0.00006,0.00001,0.91756,0.00001),(0.00024,0.00004,0.83799,0.00004),(0.00069,0.00012,0.72934,0.00012),(0.00171,0.00033,0.58844,0.00033), [...]
 
 
- TEST alpha(ncats) =   0.75( 8)
+ TEST alpha(ncats) =   0.75( 8), mode = MEAN
 
-0.032582 0.137187 0.286685 0.485709 0.752940 1.131212 1.739477 3.434208 
+0.031655 0.143215 0.301067 0.510773 0.791680 1.187403 1.814292 3.219915 
 [2] P-matrix for branch length 0.100000
-+0.9973   +0.0013   +0.0008   +0.0006   
-+0.0009   +0.9972   +0.0003   +0.0016   
-+0.0024   +0.0013   +0.9957   +0.0006   
-+0.0009   +0.0032   +0.0003   +0.9956   
++0.9974   +0.0012   +0.0008   +0.0006   
++0.0009   +0.9972   +0.0003   +0.0015   
++0.0023   +0.0012   +0.9959   +0.0006   
++0.0009   +0.0031   +0.0003   +0.9957   
 
-+0.9888   +0.0053   +0.0033   +0.0026   
-+0.0040   +0.9881   +0.0013   +0.0066   
-+0.0099   +0.0053   +0.9822   +0.0026   
-+0.0040   +0.0131   +0.0013   +0.9816   
++0.9883   +0.0055   +0.0034   +0.0028   
++0.0041   +0.9876   +0.0014   +0.0068   
++0.0103   +0.0055   +0.9814   +0.0028   
++0.0041   +0.0137   +0.0014   +0.9808   
 
-+0.9768   +0.0110   +0.0068   +0.0055   
-+0.0082   +0.9755   +0.0027   +0.0135   
-+0.0203   +0.0110   +0.9632   +0.0055   
-+0.0082   +0.0270   +0.0027   +0.9620   
++0.9756   +0.0115   +0.0071   +0.0058   
++0.0086   +0.9743   +0.0029   +0.0142   
++0.0213   +0.0115   +0.9614   +0.0058   
++0.0086   +0.0283   +0.0029   +0.9601   
 
-+0.9611   +0.0184   +0.0113   +0.0092   
-+0.0138   +0.9592   +0.0046   +0.0224   
-+0.0338   +0.0184   +0.9386   +0.0092   
++0.9592   +0.0194   +0.0118   +0.0097   
++0.0145   +0.9571   +0.0048   +0.0235   
++0.0354   +0.0194   +0.9355   +0.0097   
++0.0145   +0.0470   +0.0048   +0.9336   
+
++0.9378   +0.0296   +0.0178   +0.0148   
++0.0222   +0.9350   +0.0074   +0.0354   
++0.0535   +0.0296   +0.9021   +0.0148   
++0.0222   +0.0709   +0.0074   +0.8996   
+
++0.9089   +0.0436   +0.0258   +0.0218   
++0.0327   +0.9054   +0.0109   +0.0511   
++0.0773   +0.0436   +0.8573   +0.0218   
++0.0327   +0.1021   +0.0109   +0.8543   
+
++0.8659   +0.0646   +0.0372   +0.0323   
++0.0485   +0.8621   +0.0162   +0.0733   
++0.1115   +0.0646   +0.7916   +0.0323   
++0.0485   +0.1466   +0.0162   +0.7888   
+
++0.7808   +0.1074   +0.0581   +0.0537   
++0.0805   +0.7791   +0.0268   +0.1135   
++0.1744   +0.1074   +0.6645   +0.0537   
++0.0805   +0.2270   +0.0268   +0.6656   
+
+
+[2] P-matrix for branch length 0.200000
++0.9948   +0.0025   +0.0015   +0.0012   
++0.0018   +0.9945   +0.0006   +0.0031   
++0.0046   +0.0025   +0.9917   +0.0012   
++0.0018   +0.0061   +0.0006   +0.9914   
+
++0.9768   +0.0110   +0.0068   +0.0055   
++0.0082   +0.9755   +0.0027   +0.0135   
++0.0203   +0.0110   +0.9632   +0.0055   
++0.0082   +0.0270   +0.0027   +0.9620   
+
++0.9521   +0.0227   +0.0138   +0.0114   
++0.0170   +0.9498   +0.0057   +0.0275   
++0.0414   +0.0227   +0.9245   +0.0114   
++0.0170   +0.0549   +0.0057   +0.9223   
+
++0.9208   +0.0378   +0.0225   +0.0189   
++0.0283   +0.9176   +0.0094   +0.0447   
++0.0676   +0.0378   +0.8758   +0.0189   
++0.0283   +0.0893   +0.0094   +0.8729   
+
++0.8814   +0.0570   +0.0331   +0.0285   
++0.0427   +0.8776   +0.0142   +0.0654   
++0.0994   +0.0570   +0.8151   +0.0285   
++0.0427   +0.1309   +0.0142   +0.8121   
+
++0.8302   +0.0824   +0.0462   +0.0412   
++0.0618   +0.8268   +0.0206   +0.0908   
++0.1387   +0.0824   +0.7377   +0.0412   
++0.0618   +0.1816   +0.0206   +0.7361   
+
++0.7587   +0.1188   +0.0632   +0.0594   
++0.0891   +0.7582   +0.0297   +0.1231   
++0.1895   +0.1188   +0.6323   +0.0594   
++0.0891   +0.2461   +0.0297   +0.6351   
+
++0.6327   +0.1859   +0.0883   +0.0930   
++0.1395   +0.6443   +0.0465   +0.1697   
++0.2650   +0.1859   +0.4561   +0.0930   
++0.1395   +0.3395   +0.0465   +0.4746   
+
+
+[2] P-matrix for branch length 1.000000
++0.9744   +0.0121   +0.0075   +0.0061   
++0.0091   +0.9730   +0.0030   +0.0149   
++0.0224   +0.0121   +0.9595   +0.0061   
++0.0091   +0.0297   +0.0030   +0.9582   
+
++0.8917   +0.0519   +0.0304   +0.0260   
++0.0389   +0.8880   +0.0130   +0.0601   
++0.0912   +0.0519   +0.8309   +0.0260   
++0.0389   +0.1202   +0.0130   +0.8279   
+
++0.7926   +0.1014   +0.0554   +0.0507   
++0.0760   +0.7904   +0.0253   +0.1083   
++0.1661   +0.1014   +0.6818   +0.0507   
++0.0760   +0.2165   +0.0253   +0.6821   
+
++0.6871   +0.1564   +0.0783   +0.0782   
++0.1173   +0.6923   +0.0391   +0.1513   
++0.2348   +0.1564   +0.5306   +0.0782   
++0.1173   +0.3026   +0.0391   +0.5410   
+
++0.5817   +0.2145   +0.0965   +0.1073   
++0.1609   +0.6010   +0.0536   +0.1844   
++0.2894   +0.2145   +0.3888   +0.1073   
++0.1609   +0.3689   +0.0536   +0.4166   
+
++0.4816   +0.2737   +0.1078   +0.1369   
++0.2053   +0.5215   +0.0684   +0.2048   
++0.3235   +0.2737   +0.2659   +0.1369   
++0.2053   +0.4096   +0.0684   +0.3167   
+
++0.3922   +0.3313   +0.1108   +0.1656   
++0.2485   +0.4575   +0.0828   +0.2112   
++0.3325   +0.3313   +0.1705   +0.1656   
++0.2485   +0.4223   +0.0828   +0.2464   
+
++0.3214   +0.3824   +0.1049   +0.1912   
++0.2868   +0.4126   +0.0956   +0.2050   
++0.3147   +0.3824   +0.1116   +0.1912   
++0.2868   +0.4099   +0.0956   +0.2076   
+
+
+[2] P-matrix for branch length 1.000000
++0.9744   +0.0121   +0.0075   +0.0061   
++0.0091   +0.9730   +0.0030   +0.0149   
++0.0224   +0.0121   +0.9595   +0.0061   
++0.0091   +0.0297   +0.0030   +0.9582   
+
++0.8917   +0.0519   +0.0304   +0.0260   
++0.0389   +0.8880   +0.0130   +0.0601   
++0.0912   +0.0519   +0.8309   +0.0260   
++0.0389   +0.1202   +0.0130   +0.8279   
+
++0.7926   +0.1014   +0.0554   +0.0507   
++0.0760   +0.7904   +0.0253   +0.1083   
++0.1661   +0.1014   +0.6818   +0.0507   
++0.0760   +0.2165   +0.0253   +0.6821   
+
++0.6871   +0.1564   +0.0783   +0.0782   
++0.1173   +0.6923   +0.0391   +0.1513   
++0.2348   +0.1564   +0.5306   +0.0782   
++0.1173   +0.3026   +0.0391   +0.5410   
+
++0.5817   +0.2145   +0.0965   +0.1073   
++0.1609   +0.6010   +0.0536   +0.1844   
++0.2894   +0.2145   +0.3888   +0.1073   
++0.1609   +0.3689   +0.0536   +0.4166   
+
++0.4816   +0.2737   +0.1078   +0.1369   
++0.2053   +0.5215   +0.0684   +0.2048   
++0.3235   +0.2737   +0.2659   +0.1369   
++0.2053   +0.4096   +0.0684   +0.3167   
+
++0.3922   +0.3313   +0.1108   +0.1656   
++0.2485   +0.4575   +0.0828   +0.2112   
++0.3325   +0.3313   +0.1705   +0.1656   
++0.2485   +0.4223   +0.0828   +0.2464   
+
++0.3214   +0.3824   +0.1049   +0.1912   
++0.2868   +0.4126   +0.0956   +0.2050   
++0.3147   +0.3824   +0.1116   +0.1912   
++0.2868   +0.4099   +0.0956   +0.2076   
+
+
+[2] CLV 5: [ {(0.00244,0.00486,0.00001,0.00607),(0.01078,0.02119,0.00028,0.02619),(0.02188,0.04227,0.00120,0.05161),(0.03549,0.06697,0.00326,0.08050),(0.05186,0.09493,0.00729,0.11187),(0.07177,0.12614,0.01482,0.14486),(0.09716,0.16084,0.02957,0.17824),(0.13494,0.19922,0.06656,0.20845)} {(0.98962,0.00000,0.00002,0.00000),(0.95410,0.00007,0.00041,0.00007),(0.90654,0.00029,0.00172,0.00029),(0.84792,0.00080,0.00456,0.00080),(0.77681,0.00183,0.00988,0.00183),(0.68925,0.00382,0.01924,0.00382), [...]
+[2] CLV 6: [ {(0.00243,0.00001,0.00000,0.00001),(0.01059,0.00017,0.00001,0.00021),(0.02108,0.00072,0.00010,0.00087),(0.03329,0.00188,0.00043,0.00223),(0.04691,0.00402,0.00137,0.00464),(0.06166,0.00767,0.00373,0.00860),(0.07691,0.01398,0.00955,0.01509),(0.08974,0.02671,0.02659,0.02742)} {(0.00151,0.00000,0.00228,0.00000),(0.00638,0.00001,0.00984,0.00001),(0.01221,0.00005,0.01939,0.00005),(0.01832,0.00012,0.03008,0.00012),(0.02415,0.00027,0.04121,0.00027),(0.02900,0.00054,0.05168,0.00054), [...]
+[2] CLV 7: [ {(0.00001,0.98902,0.00001,0.00004),(0.00012,0.95166,0.00012,0.00073),(0.00052,0.90215,0.00052,0.00302),(0.00143,0.84194,0.00143,0.00798),(0.00325,0.77013,0.00325,0.01712),(0.00678,0.68368,0.00678,0.03297),(0.01411,0.57482,0.01411,0.06058),(0.03458,0.41515,0.03458,0.11524)} {(0.00000,0.00000,0.98355,0.00000),(0.00005,0.00001,0.92785,0.00001),(0.00019,0.00003,0.85472,0.00003),(0.00051,0.00009,0.76700,0.00009),(0.00110,0.00020,0.66438,0.00020),(0.00214,0.00042,0.54425,0.00042), [...]
+
+
+ TEST alpha(ncats) =   0.75( 8), mode = MEDIAN
+
+0.032582 0.137187 0.286685 0.485709 0.752940 1.131212 1.739477 3.434208 
+[2] P-matrix for branch length 0.100000
++0.9973   +0.0013   +0.0008   +0.0006   
++0.0009   +0.9972   +0.0003   +0.0016   
++0.0024   +0.0013   +0.9957   +0.0006   
++0.0009   +0.0032   +0.0003   +0.9956   
+
++0.9888   +0.0053   +0.0033   +0.0026   
++0.0040   +0.9881   +0.0013   +0.0066   
++0.0099   +0.0053   +0.9822   +0.0026   
++0.0040   +0.0131   +0.0013   +0.9816   
+
++0.9768   +0.0110   +0.0068   +0.0055   
++0.0082   +0.9755   +0.0027   +0.0135   
++0.0203   +0.0110   +0.9632   +0.0055   
++0.0082   +0.0270   +0.0027   +0.9620   
+
++0.9611   +0.0184   +0.0113   +0.0092   
++0.0138   +0.9592   +0.0046   +0.0224   
++0.0338   +0.0184   +0.9386   +0.0092   
 +0.0138   +0.0449   +0.0046   +0.9367   
 
 +0.9407   +0.0282   +0.0170   +0.0141   
@@ -2220,7 +4440,183 @@
 [2] CLV 7: [ {(0.00001,0.98870,0.00001,0.00004),(0.00011,0.95363,0.00011,0.00067),(0.00047,0.90651,0.00047,0.00275),(0.00130,0.84882,0.00130,0.00729),(0.00296,0.77948,0.00296,0.01573),(0.00622,0.69502,0.00622,0.03058),(0.01315,0.58628,0.01315,0.05727),(0.03790,0.39788,0.03790,0.12187)} {(0.00000,0.00000,0.98307,0.00000),(0.00004,0.00001,0.93077,0.00001),(0.00017,0.00003,0.86112,0.00003),(0.00046,0.00008,0.77695,0.00008),(0.00101,0.00019,0.67760,0.00019),(0.00198,0.00039,0.55976,0.00039), [...]
 
 
- TEST alpha(ncats) =   1.00( 8)
+ TEST alpha(ncats) =   1.00( 8), mode = MEAN
+
+0.067415 0.216895 0.391395 0.601010 0.863526 1.214996 1.748591 2.896172 
+[3] P-matrix for branch length 0.100000
++0.9945   +0.0026   +0.0016   +0.0013   
++0.0020   +0.9941   +0.0007   +0.0032   
++0.0049   +0.0026   +0.9912   +0.0013   
++0.0020   +0.0065   +0.0007   +0.9909   
+
++0.9823   +0.0083   +0.0052   +0.0042   
++0.0063   +0.9814   +0.0021   +0.0103   
++0.0155   +0.0083   +0.9720   +0.0042   
++0.0063   +0.0206   +0.0021   +0.9711   
+
++0.9685   +0.0149   +0.0092   +0.0075   
++0.0112   +0.9668   +0.0037   +0.0182   
++0.0275   +0.0149   +0.9502   +0.0075   
++0.0112   +0.0365   +0.0037   +0.9486   
+
++0.9522   +0.0227   +0.0138   +0.0113   
++0.0170   +0.9499   +0.0057   +0.0274   
++0.0413   +0.0227   +0.9246   +0.0113   
++0.0170   +0.0548   +0.0057   +0.9225   
+
++0.9324   +0.0322   +0.0193   +0.0161   
++0.0241   +0.9295   +0.0080   +0.0384   
++0.0580   +0.0322   +0.8938   +0.0161   
++0.0241   +0.0767   +0.0080   +0.8911   
+
++0.9069   +0.0445   +0.0263   +0.0223   
++0.0334   +0.9034   +0.0111   +0.0521   
++0.0789   +0.0445   +0.8543   +0.0223   
++0.0334   +0.1042   +0.0111   +0.8513   
+
++0.8703   +0.0625   +0.0360   +0.0312   
++0.0468   +0.8665   +0.0156   +0.0711   
++0.1081   +0.0625   +0.7982   +0.0312   
++0.0468   +0.1422   +0.0156   +0.7954   
+
++0.7991   +0.0980   +0.0538   +0.0490   
++0.0735   +0.7967   +0.0245   +0.1053   
++0.1614   +0.0980   +0.6915   +0.0490   
++0.0735   +0.2106   +0.0245   +0.6914   
+
+
+[3] P-matrix for branch length 0.200000
++0.9890   +0.0052   +0.0032   +0.0026   
++0.0039   +0.9883   +0.0013   +0.0065   
++0.0097   +0.0052   +0.9825   +0.0026   
++0.0039   +0.0129   +0.0013   +0.9819   
+
++0.9652   +0.0165   +0.0101   +0.0082   
++0.0124   +0.9634   +0.0041   +0.0201   
++0.0303   +0.0165   +0.9449   +0.0082   
++0.0124   +0.0403   +0.0041   +0.9432   
+
++0.9384   +0.0293   +0.0176   +0.0146   
++0.0220   +0.9357   +0.0073   +0.0351   
++0.0529   +0.0293   +0.9032   +0.0146   
++0.0220   +0.0701   +0.0073   +0.9006   
+
++0.9079   +0.0441   +0.0261   +0.0220   
++0.0330   +0.9043   +0.0110   +0.0516   
++0.0782   +0.0441   +0.8557   +0.0220   
++0.0330   +0.1032   +0.0110   +0.8527   
+
++0.8717   +0.0617   +0.0357   +0.0309   
++0.0463   +0.8679   +0.0154   +0.0704   
++0.1070   +0.0617   +0.8004   +0.0309   
++0.0463   +0.1407   +0.0154   +0.7975   
+
++0.8268   +0.0841   +0.0471   +0.0420   
++0.0630   +0.8235   +0.0210   +0.0924   
++0.1412   +0.0841   +0.7327   +0.0420   
++0.0630   +0.1848   +0.0210   +0.7311   
+
++0.7657   +0.1152   +0.0616   +0.0576   
++0.0864   +0.7648   +0.0288   +0.1201   
++0.1848   +0.1152   +0.6425   +0.0576   
++0.0864   +0.2402   +0.0288   +0.6447   
+
++0.6581   +0.1721   +0.0838   +0.0860   
++0.1290   +0.6665   +0.0430   +0.1615   
++0.2514   +0.1721   +0.4905   +0.0860   
++0.1290   +0.3229   +0.0430   +0.5050   
+
+
+[3] P-matrix for branch length 1.000000
++0.9466   +0.0253   +0.0154   +0.0127   
++0.0190   +0.9441   +0.0063   +0.0305   
++0.0461   +0.0253   +0.9159   +0.0127   
++0.0190   +0.0611   +0.0063   +0.9136   
+
++0.8430   +0.0760   +0.0430   +0.0380   
++0.0570   +0.8394   +0.0190   +0.0846   
++0.1291   +0.0760   +0.7570   +0.0380   
++0.0570   +0.1692   +0.0190   +0.7549   
+
++0.7438   +0.1265   +0.0665   +0.0632   
++0.0948   +0.7443   +0.0316   +0.1293   
++0.1994   +0.1265   +0.6109   +0.0632   
++0.0948   +0.2585   +0.0316   +0.6150   
+
++0.6494   +0.1768   +0.0854   +0.0884   
++0.1326   +0.6588   +0.0442   +0.1644   
++0.2562   +0.1768   +0.4785   +0.0884   
++0.1326   +0.3288   +0.0442   +0.4944   
+
++0.5600   +0.2270   +0.0995   +0.1135   
++0.1703   +0.5831   +0.0568   +0.1899   
++0.2985   +0.2270   +0.3610   +0.1135   
++0.1703   +0.3798   +0.0568   +0.3932   
+
++0.4762   +0.2770   +0.1082   +0.1385   
++0.2078   +0.5174   +0.0693   +0.2055   
++0.3247   +0.2770   +0.2597   +0.1385   
++0.2078   +0.4111   +0.0693   +0.3119   
+
++0.3989   +0.3268   +0.1109   +0.1634   
++0.2451   +0.4621   +0.0817   +0.2112   
++0.3328   +0.3268   +0.1771   +0.1634   
++0.2451   +0.4223   +0.0817   +0.2509   
+
++0.3298   +0.3760   +0.1062   +0.1880   
++0.2820   +0.4176   +0.0940   +0.2064   
++0.3187   +0.3760   +0.1174   +0.1880   
++0.2820   +0.4128   +0.0940   +0.2112   
+
+
+[3] P-matrix for branch length 1.000000
++0.9466   +0.0253   +0.0154   +0.0127   
++0.0190   +0.9441   +0.0063   +0.0305   
++0.0461   +0.0253   +0.9159   +0.0127   
++0.0190   +0.0611   +0.0063   +0.9136   
+
++0.8430   +0.0760   +0.0430   +0.0380   
++0.0570   +0.8394   +0.0190   +0.0846   
++0.1291   +0.0760   +0.7570   +0.0380   
++0.0570   +0.1692   +0.0190   +0.7549   
+
++0.7438   +0.1265   +0.0665   +0.0632   
++0.0948   +0.7443   +0.0316   +0.1293   
++0.1994   +0.1265   +0.6109   +0.0632   
++0.0948   +0.2585   +0.0316   +0.6150   
+
++0.6494   +0.1768   +0.0854   +0.0884   
++0.1326   +0.6588   +0.0442   +0.1644   
++0.2562   +0.1768   +0.4785   +0.0884   
++0.1326   +0.3288   +0.0442   +0.4944   
+
++0.5600   +0.2270   +0.0995   +0.1135   
++0.1703   +0.5831   +0.0568   +0.1899   
++0.2985   +0.2270   +0.3610   +0.1135   
++0.1703   +0.3798   +0.0568   +0.3932   
+
++0.4762   +0.2770   +0.1082   +0.1385   
++0.2078   +0.5174   +0.0693   +0.2055   
++0.3247   +0.2770   +0.2597   +0.1385   
++0.2078   +0.4111   +0.0693   +0.3119   
+
++0.3989   +0.3268   +0.1109   +0.1634   
++0.2451   +0.4621   +0.0817   +0.2112   
++0.3328   +0.3268   +0.1771   +0.1634   
++0.2451   +0.4223   +0.0817   +0.2509   
+
++0.3298   +0.3760   +0.1062   +0.1880   
++0.2820   +0.4176   +0.0940   +0.2064   
++0.3187   +0.3760   +0.1174   +0.1880   
++0.2820   +0.4128   +0.0940   +0.2112   
+
+
+[3] CLV 5: [ {(0.00516,0.01024,0.00006,0.01273),(0.01606,0.03132,0.00064,0.03848),(0.02790,0.05335,0.00198,0.06469),(0.04097,0.07655,0.00442,0.09142),(0.05573,0.10126,0.00851,0.11874),(0.07304,0.12801,0.01541,0.14676),(0.09480,0.15788,0.02791,0.17557),(0.12803,0.19362,0.05806,0.20476)} {(0.97805,0.00002,0.00009,0.00002),(0.93152,0.00015,0.00092,0.00015),(0.88068,0.00048,0.00280,0.00048),(0.82419,0.00109,0.00611,0.00109),(0.75987,0.00214,0.01145,0.00214),(0.68364,0.00397,0.01995,0.00397), [...]
+[3] CLV 6: [ {(0.00512,0.00004,0.00000,0.00005),(0.01563,0.00039,0.00004,0.00047),(0.02657,0.00117,0.00021,0.00140),(0.03799,0.00251,0.00067,0.00295),(0.04995,0.00463,0.00171,0.00533),(0.06252,0.00794,0.00394,0.00888),(0.07569,0.01331,0.00885,0.01442),(0.08849,0.02409,0.02259,0.02493)} {(0.00314,0.00000,0.00478,0.00000),(0.00925,0.00002,0.01446,0.00002),(0.01505,0.00008,0.02426,0.00008),(0.02045,0.00017,0.03403,0.00017),(0.02529,0.00032,0.04353,0.00032),(0.02923,0.00056,0.05221,0.00056), [...]
+[3] CLV 7: [ {(0.00003,0.97682,0.00003,0.00017),(0.00027,0.92808,0.00027,0.00162),(0.00086,0.87547,0.00086,0.00492),(0.00194,0.81783,0.00194,0.01065),(0.00381,0.75324,0.00381,0.01980),(0.00707,0.67822,0.00707,0.03415),(0.01326,0.58486,0.01326,0.05768),(0.02960,0.44418,0.02960,0.10429)} {(0.00001,0.00000,0.96531,0.00000),(0.00010,0.00002,0.89291,0.00002),(0.00031,0.00005,0.81568,0.00005),(0.00068,0.00012,0.73228,0.00012),(0.00127,0.00024,0.64058,0.00024),(0.00222,0.00044,0.53680,0.00044), [...]
+
+
+ TEST alpha(ncats) =   1.00( 8), mode = MEDIAN
 
 0.065280 0.208627 0.376074 0.577429 0.830101 1.169899 1.693147 3.079442 
 [3] P-matrix for branch length 0.100000
@@ -2396,7 +4792,183 @@
 [3] CLV 7: [ {(0.00003,0.97755,0.00003,0.00016),(0.00025,0.93068,0.00025,0.00151),(0.00079,0.87991,0.00079,0.00457),(0.00180,0.82403,0.00180,0.00993),(0.00355,0.76103,0.00355,0.01854),(0.00661,0.68718,0.00661,0.03222),(0.01256,0.59356,0.01256,0.05522),(0.03241,0.42729,0.03241,0.11063)} {(0.00001,0.00000,0.96639,0.00000),(0.00009,0.00002,0.89676,0.00002),(0.00029,0.00005,0.82217,0.00005),(0.00063,0.00011,0.74119,0.00011),(0.00119,0.00022,0.65154,0.00022),(0.00209,0.00041,0.54903,0.00041), [...]
 
 
- TEST alpha(ncats) =   1.50( 8)
+ TEST alpha(ncats) =   1.50( 8), mode = MEAN
+
+0.141984 0.327635 0.507645 0.703722 0.933278 1.224781 1.647349 2.513605 
+[4] P-matrix for branch length 0.100000
++0.9884   +0.0055   +0.0034   +0.0027   
++0.0041   +0.9877   +0.0014   +0.0068   
++0.0102   +0.0055   +0.9816   +0.0027   
++0.0041   +0.0136   +0.0014   +0.9809   
+
++0.9735   +0.0125   +0.0077   +0.0063   
++0.0094   +0.9721   +0.0031   +0.0154   
++0.0231   +0.0125   +0.9581   +0.0063   
++0.0094   +0.0307   +0.0031   +0.9567   
+
++0.9594   +0.0192   +0.0117   +0.0096   
++0.0144   +0.9574   +0.0048   +0.0234   
++0.0352   +0.0192   +0.9359   +0.0096   
++0.0144   +0.0468   +0.0048   +0.9340   
+
++0.9444   +0.0264   +0.0160   +0.0132   
++0.0198   +0.9418   +0.0066   +0.0318   
++0.0479   +0.0264   +0.9124   +0.0132   
++0.0198   +0.0635   +0.0066   +0.9100   
+
++0.9273   +0.0347   +0.0207   +0.0173   
++0.0260   +0.9242   +0.0087   +0.0412   
++0.0622   +0.0347   +0.8858   +0.0173   
++0.0260   +0.0823   +0.0087   +0.8830   
+
++0.9062   +0.0448   +0.0265   +0.0224   
++0.0336   +0.9027   +0.0112   +0.0525   
++0.0795   +0.0448   +0.8532   +0.0224   
++0.0336   +0.1049   +0.0112   +0.8502   
+
++0.8770   +0.0591   +0.0343   +0.0296   
++0.0443   +0.8732   +0.0148   +0.0676   
++0.1028   +0.0591   +0.8085   +0.0296   
++0.0443   +0.1353   +0.0148   +0.8056   
+
++0.8217   +0.0866   +0.0483   +0.0433   
++0.0650   +0.8186   +0.0217   +0.0948   
++0.1450   +0.0866   +0.7251   +0.0433   
++0.0650   +0.1896   +0.0217   +0.7238   
+
+
+[4] P-matrix for branch length 0.200000
++0.9770   +0.0109   +0.0067   +0.0054   
++0.0082   +0.9757   +0.0027   +0.0134   
++0.0201   +0.0109   +0.9636   +0.0054   
++0.0082   +0.0268   +0.0027   +0.9624   
+
++0.9481   +0.0247   +0.0149   +0.0123   
++0.0185   +0.9456   +0.0062   +0.0297   
++0.0448   +0.0247   +0.9182   +0.0123   
++0.0185   +0.0595   +0.0062   +0.9159   
+
++0.9213   +0.0375   +0.0224   +0.0188   
++0.0282   +0.9180   +0.0094   +0.0444   
++0.0672   +0.0375   +0.8765   +0.0188   
++0.0282   +0.0888   +0.0094   +0.8736   
+
++0.8934   +0.0511   +0.0299   +0.0255   
++0.0383   +0.8897   +0.0128   +0.0592   
++0.0898   +0.0511   +0.8336   +0.0255   
++0.0383   +0.1184   +0.0128   +0.8305   
+
++0.8625   +0.0663   +0.0381   +0.0331   
++0.0497   +0.8587   +0.0166   +0.0750   
++0.1142   +0.0663   +0.7864   +0.0331   
++0.0497   +0.1500   +0.0166   +0.7837   
+
++0.8256   +0.0847   +0.0474   +0.0423   
++0.0635   +0.8224   +0.0212   +0.0930   
++0.1421   +0.0847   +0.7309   +0.0423   
++0.0635   +0.1859   +0.0212   +0.7294   
+
++0.7767   +0.1095   +0.0591   +0.0548   
++0.0821   +0.7752   +0.0274   +0.1153   
++0.1772   +0.1095   +0.6585   +0.0548   
++0.0821   +0.2306   +0.0274   +0.6599   
+
++0.6907   +0.1545   +0.0776   +0.0772   
++0.1159   +0.6955   +0.0386   +0.1500   
++0.2327   +0.1545   +0.5356   +0.0772   
++0.1159   +0.2999   +0.0386   +0.5456   
+
+
+[4] P-matrix for branch length 1.000000
++0.8926   +0.0515   +0.0302   +0.0258   
++0.0386   +0.8889   +0.0129   +0.0596   
++0.0905   +0.0515   +0.8322   +0.0258   
++0.0386   +0.1193   +0.0129   +0.8292   
+
++0.7777   +0.1090   +0.0588   +0.0545   
++0.0817   +0.7761   +0.0272   +0.1149   
++0.1765   +0.1090   +0.6600   +0.0545   
++0.0817   +0.2297   +0.0272   +0.6613   
+
++0.6885   +0.1556   +0.0780   +0.0778   
++0.1167   +0.6936   +0.0389   +0.1508   
++0.2340   +0.1556   +0.5325   +0.0778   
++0.1167   +0.3016   +0.0389   +0.5428   
+
++0.6110   +0.1980   +0.0920   +0.0990   
++0.1485   +0.6257   +0.0495   +0.1763   
++0.2759   +0.1980   +0.4271   +0.0990   
++0.1485   +0.3526   +0.0495   +0.4494   
+
++0.5405   +0.2384   +0.1020   +0.1192   
++0.1788   +0.5674   +0.0596   +0.1943   
++0.3059   +0.2384   +0.3366   +0.1192   
++0.1788   +0.3886   +0.0596   +0.3731   
+
++0.4743   +0.2782   +0.1084   +0.1391   
++0.2087   +0.5160   +0.0696   +0.2058   
++0.3251   +0.2782   +0.2576   +0.1391   
++0.2087   +0.4116   +0.0696   +0.3102   
+
++0.4103   +0.3192   +0.1110   +0.1596   
++0.2394   +0.4698   +0.0798   +0.2110   
++0.3329   +0.3192   +0.1883   +0.1596   
++0.2394   +0.4219   +0.0798   +0.2589   
+
++0.3442   +0.3651   +0.1080   +0.1826   
++0.2739   +0.4265   +0.0913   +0.2084   
++0.3241   +0.3651   +0.1282   +0.1826   
++0.2739   +0.4168   +0.0913   +0.2181   
+
+
+[4] P-matrix for branch length 1.000000
++0.8926   +0.0515   +0.0302   +0.0258   
++0.0386   +0.8889   +0.0129   +0.0596   
++0.0905   +0.0515   +0.8322   +0.0258   
++0.0386   +0.1193   +0.0129   +0.8292   
+
++0.7777   +0.1090   +0.0588   +0.0545   
++0.0817   +0.7761   +0.0272   +0.1149   
++0.1765   +0.1090   +0.6600   +0.0545   
++0.0817   +0.2297   +0.0272   +0.6613   
+
++0.6885   +0.1556   +0.0780   +0.0778   
++0.1167   +0.6936   +0.0389   +0.1508   
++0.2340   +0.1556   +0.5325   +0.0778   
++0.1167   +0.3016   +0.0389   +0.5428   
+
++0.6110   +0.1980   +0.0920   +0.0990   
++0.1485   +0.6257   +0.0495   +0.1763   
++0.2759   +0.1980   +0.4271   +0.0990   
++0.1485   +0.3526   +0.0495   +0.4494   
+
++0.5405   +0.2384   +0.1020   +0.1192   
++0.1788   +0.5674   +0.0596   +0.1943   
++0.3059   +0.2384   +0.3366   +0.1192   
++0.1788   +0.3886   +0.0596   +0.3731   
+
++0.4743   +0.2782   +0.1084   +0.1391   
++0.2087   +0.5160   +0.0696   +0.2058   
++0.3251   +0.2782   +0.2576   +0.1391   
++0.2087   +0.4116   +0.0696   +0.3102   
+
++0.4103   +0.3192   +0.1110   +0.1596   
++0.2394   +0.4698   +0.0798   +0.2110   
++0.3329   +0.3192   +0.1883   +0.1596   
++0.2394   +0.4219   +0.0798   +0.2589   
+
++0.3442   +0.3651   +0.1080   +0.1826   
++0.2739   +0.4265   +0.0913   +0.2084   
++0.3241   +0.3651   +0.1282   +0.1826   
++0.2739   +0.4168   +0.0913   +0.2181   
+
+
+[4] CLV 5: [ {(0.01069,0.02102,0.00028,0.02598),(0.02368,0.04560,0.00141,0.05556),(0.03530,0.06663,0.00323,0.08011),(0.04695,0.08675,0.00589,0.10286),(0.05938,0.10710,0.00977,0.12501),(0.07348,0.12867,0.01562,0.14742),(0.09104,0.15305,0.02540,0.17112),(0.11863,0.18490,0.04788,0.19840)} {(0.95448,0.00007,0.00041,0.00007),(0.89883,0.00034,0.00201,0.00034),(0.84876,0.00079,0.00451,0.00079),(0.79822,0.00147,0.00807,0.00147),(0.74389,0.00247,0.01304,0.00247),(0.68167,0.00403,0.02020,0.00403), [...]
+[4] CLV 6: [ {(0.01050,0.00017,0.00001,0.00021),(0.02274,0.00084,0.00013,0.00101),(0.03312,0.00186,0.00042,0.00221),(0.04296,0.00329,0.00101,0.00383),(0.05273,0.00526,0.00208,0.00601),(0.06282,0.00803,0.00401,0.00898),(0.07365,0.01229,0.00780,0.01338),(0.08593,0.02073,0.01781,0.02171)} {(0.00633,0.00001,0.00976,0.00001),(0.01308,0.00005,0.02086,0.00005),(0.01824,0.00012,0.02993,0.00012),(0.02257,0.00022,0.03808,0.00022),(0.02627,0.00036,0.04559,0.00036),(0.02930,0.00057,0.05240,0.00057), [...]
+[4] CLV 7: [ {(0.00012,0.95206,0.00012,0.00072),(0.00061,0.89418,0.00061,0.00354),(0.00141,0.84279,0.00141,0.00789),(0.00261,0.79160,0.00261,0.01401),(0.00440,0.73737,0.00440,0.02250),(0.00717,0.67630,0.00717,0.03457),(0.01199,0.60092,0.01199,0.05318),(0.02386,0.48379,0.02386,0.08997)} {(0.00005,0.00001,0.92844,0.00001),(0.00022,0.00004,0.84303,0.00004),(0.00050,0.00009,0.76823,0.00009),(0.00090,0.00016,0.69481,0.00016),(0.00145,0.00027,0.61837,0.00027),(0.00224,0.00045,0.53419,0.00045), [...]
+
+
+ TEST alpha(ncats) =   1.50( 8), mode = MEDIAN
 
 0.132916 0.317729 0.493114 0.683999 0.907776 1.193067 1.612147 2.659252 
 [4] P-matrix for branch length 0.100000
@@ -2572,7 +5144,183 @@
 [4] CLV 7: [ {(0.00010,0.95503,0.00010,0.00063),(0.00057,0.89714,0.00057,0.00334),(0.00133,0.84678,0.00133,0.00749),(0.00247,0.79654,0.00247,0.01334),(0.00418,0.74311,0.00418,0.02150),(0.00684,0.68255,0.00684,0.03321),(0.01156,0.60667,0.01156,0.05162),(0.02603,0.46797,0.02603,0.09559)} {(0.00004,0.00001,0.93284,0.00001),(0.00021,0.00004,0.84737,0.00004),(0.00048,0.00008,0.77400,0.00008),(0.00085,0.00015,0.70184,0.00015),(0.00138,0.00026,0.62639,0.00026),(0.00215,0.00043,0.54271,0.00043), [...]
 
 
- TEST alpha(ncats) =   5.00( 8)
+ TEST alpha(ncats) =   5.00( 8), mode = MEAN
+
+0.424853 0.609160 0.746919 0.876688 1.013197 1.171615 1.382565 1.775003 
+[5] P-matrix for branch length 0.100000
++0.9658   +0.0162   +0.0099   +0.0081   
++0.0121   +0.9641   +0.0040   +0.0197   
++0.0297   +0.0162   +0.9460   +0.0081   
++0.0121   +0.0395   +0.0040   +0.9444   
+
++0.9516   +0.0230   +0.0140   +0.0115   
++0.0172   +0.9493   +0.0057   +0.0278   
++0.0419   +0.0230   +0.9237   +0.0115   
++0.0172   +0.0555   +0.0057   +0.9215   
+
++0.9411   +0.0280   +0.0169   +0.0140   
++0.0210   +0.9384   +0.0070   +0.0336   
++0.0507   +0.0280   +0.9073   +0.0140   
++0.0210   +0.0672   +0.0070   +0.9049   
+
++0.9315   +0.0326   +0.0196   +0.0163   
++0.0245   +0.9285   +0.0082   +0.0389   
++0.0588   +0.0326   +0.8923   +0.0163   
++0.0245   +0.0778   +0.0082   +0.8896   
+
++0.9214   +0.0375   +0.0224   +0.0187   
++0.0281   +0.9182   +0.0094   +0.0443   
++0.0671   +0.0375   +0.8767   +0.0187   
++0.0281   +0.0887   +0.0094   +0.8739   
+
++0.9100   +0.0430   +0.0255   +0.0215   
++0.0323   +0.9065   +0.0108   +0.0505   
++0.0764   +0.0430   +0.8591   +0.0215   
++0.0323   +0.1009   +0.0108   +0.8561   
+
++0.8952   +0.0502   +0.0295   +0.0251   
++0.0377   +0.8915   +0.0126   +0.0583   
++0.0884   +0.0502   +0.8362   +0.0251   
++0.0377   +0.1166   +0.0126   +0.8332   
+
++0.8685   +0.0633   +0.0365   +0.0317   
++0.0475   +0.8647   +0.0158   +0.0720   
++0.1095   +0.0633   +0.7955   +0.0317   
++0.0475   +0.1439   +0.0158   +0.7927   
+
+
+[5] P-matrix for branch length 0.200000
++0.9335   +0.0317   +0.0190   +0.0158   
++0.0238   +0.9305   +0.0079   +0.0378   
++0.0571   +0.0317   +0.8954   +0.0158   
++0.0238   +0.0756   +0.0079   +0.8927   
+
++0.9067   +0.0446   +0.0264   +0.0223   
++0.0335   +0.9032   +0.0112   +0.0522   
++0.0791   +0.0446   +0.8539   +0.0223   
++0.0335   +0.1044   +0.0112   +0.8509   
+
++0.8875   +0.0540   +0.0315   +0.0270   
++0.0405   +0.8837   +0.0135   +0.0623   
++0.0946   +0.0540   +0.8244   +0.0270   
++0.0405   +0.1246   +0.0135   +0.8214   
+
++0.8700   +0.0626   +0.0361   +0.0313   
++0.0470   +0.8661   +0.0157   +0.0712   
++0.1084   +0.0626   +0.7977   +0.0313   
++0.0470   +0.1425   +0.0157   +0.7949   
+
++0.8521   +0.0714   +0.0407   +0.0357   
++0.0536   +0.8484   +0.0179   +0.0801   
++0.1222   +0.0714   +0.7707   +0.0357   
++0.0536   +0.1603   +0.0179   +0.7683   
+
++0.8322   +0.0814   +0.0458   +0.0407   
++0.0610   +0.8288   +0.0203   +0.0899   
++0.1373   +0.0814   +0.7406   +0.0407   
++0.0610   +0.1797   +0.0203   +0.7389   
+
++0.8068   +0.0942   +0.0520   +0.0471   
++0.0706   +0.8040   +0.0235   +0.1018   
++0.1559   +0.0942   +0.7028   +0.0471   
++0.0706   +0.2036   +0.0235   +0.7022   
+
++0.7628   +0.1166   +0.0622   +0.0583   
++0.0875   +0.7621   +0.0292   +0.1213   
++0.1867   +0.1166   +0.6384   +0.0583   
++0.0875   +0.2426   +0.0292   +0.6408   
+
+
+[5] P-matrix for branch length 1.000000
++0.7271   +0.1352   +0.0701   +0.0676   
++0.1014   +0.7288   +0.0338   +0.1360   
++0.2103   +0.1352   +0.5870   +0.0676   
++0.1014   +0.2721   +0.0338   +0.5927   
+
++0.6461   +0.1786   +0.0860   +0.0893   
++0.1339   +0.6560   +0.0446   +0.1654   
++0.2580   +0.1786   +0.4742   +0.0893   
++0.1339   +0.3309   +0.0446   +0.4905   
+
++0.5963   +0.2063   +0.0943   +0.1032   
++0.1547   +0.6132   +0.0516   +0.1805   
++0.2829   +0.2063   +0.4077   +0.1032   
++0.1547   +0.3610   +0.0516   +0.4327   
+
++0.5562   +0.2292   +0.1000   +0.1146   
++0.1719   +0.5800   +0.0573   +0.1908   
++0.3000   +0.2292   +0.3562   +0.1146   
++0.1719   +0.3815   +0.0573   +0.3892   
+
++0.5201   +0.2504   +0.1043   +0.1252   
++0.1878   +0.5511   +0.0626   +0.1984   
++0.3128   +0.2504   +0.3115   +0.1252   
++0.1878   +0.3969   +0.0626   +0.3527   
+
++0.4848   +0.2718   +0.1076   +0.1359   
++0.2038   +0.5239   +0.0679   +0.2044   
++0.3228   +0.2718   +0.2696   +0.1359   
++0.2038   +0.4087   +0.0679   +0.3195   
+
++0.4467   +0.2955   +0.1100   +0.1478   
++0.2216   +0.4957   +0.0739   +0.2088   
++0.3300   +0.2955   +0.2268   +0.1478   
++0.2216   +0.4176   +0.0739   +0.2869   
+
++0.3962   +0.3286   +0.1109   +0.1643   
++0.2465   +0.4602   +0.0822   +0.2112   
++0.3327   +0.3286   +0.1744   +0.1643   
++0.2465   +0.4224   +0.0822   +0.2490   
+
+
+[5] P-matrix for branch length 1.000000
++0.7271   +0.1352   +0.0701   +0.0676   
++0.1014   +0.7288   +0.0338   +0.1360   
++0.2103   +0.1352   +0.5870   +0.0676   
++0.1014   +0.2721   +0.0338   +0.5927   
+
++0.6461   +0.1786   +0.0860   +0.0893   
++0.1339   +0.6560   +0.0446   +0.1654   
++0.2580   +0.1786   +0.4742   +0.0893   
++0.1339   +0.3309   +0.0446   +0.4905   
+
++0.5963   +0.2063   +0.0943   +0.1032   
++0.1547   +0.6132   +0.0516   +0.1805   
++0.2829   +0.2063   +0.4077   +0.1032   
++0.1547   +0.3610   +0.0516   +0.4327   
+
++0.5562   +0.2292   +0.1000   +0.1146   
++0.1719   +0.5800   +0.0573   +0.1908   
++0.3000   +0.2292   +0.3562   +0.1146   
++0.1719   +0.3815   +0.0573   +0.3892   
+
++0.5201   +0.2504   +0.1043   +0.1252   
++0.1878   +0.5511   +0.0626   +0.1984   
++0.3128   +0.2504   +0.3115   +0.1252   
++0.1878   +0.3969   +0.0626   +0.3527   
+
++0.4848   +0.2718   +0.1076   +0.1359   
++0.2038   +0.5239   +0.0679   +0.2044   
++0.3228   +0.2718   +0.2696   +0.1359   
++0.2038   +0.4087   +0.0679   +0.3195   
+
++0.4467   +0.2955   +0.1100   +0.1478   
++0.2216   +0.4957   +0.0739   +0.2088   
++0.3300   +0.2955   +0.2268   +0.1478   
++0.2216   +0.4176   +0.0739   +0.2869   
+
++0.3962   +0.3286   +0.1109   +0.1643   
++0.2465   +0.4602   +0.0822   +0.2112   
++0.3327   +0.3286   +0.1744   +0.1643   
++0.2465   +0.4224   +0.0822   +0.2490   
+
+
+[5] CLV 5: [ {(0.03007,0.05728,0.00231,0.06929),(0.04145,0.07739,0.00453,0.09236),(0.04938,0.09083,0.00657,0.10737),(0.05643,0.10238,0.00875,0.11995),(0.06342,0.11346,0.01128,0.13174),(0.07104,0.12506,0.01448,0.14376),(0.08041,0.13863,0.01912,0.15734),(0.09576,0.15909,0.02857,0.17666)} {(0.87134,0.00056,0.00326,0.00056),(0.82209,0.00112,0.00626,0.00112),(0.78761,0.00164,0.00894,0.00164),(0.75682,0.00221,0.01175,0.00221),(0.72611,0.00287,0.01493,0.00287),(0.69249,0.00373,0.01884,0.00373), [...]
+[5] CLV 6: [ {(0.02852,0.00135,0.00026,0.00162),(0.03840,0.00257,0.00069,0.00302),(0.04493,0.00364,0.00118,0.00423),(0.05049,0.00475,0.00178,0.00545),(0.05574,0.00600,0.00255,0.00681),(0.06115,0.00751,0.00362,0.00843),(0.06733,0.00961,0.00530,0.01063),(0.07619,0.01358,0.00913,0.01469)} {(0.01602,0.00009,0.02596,0.00009),(0.02063,0.00017,0.03437,0.00017),(0.02337,0.00025,0.03966,0.00025),(0.02548,0.00032,0.04393,0.00032),(0.02727,0.00042,0.04774,0.00042),(0.02887,0.00053,0.05136,0.00053), [...]
+[5] CLV 7: [ {(0.00100,0.86588,0.00100,0.00572),(0.00199,0.81570,0.00199,0.01091),(0.00292,0.78095,0.00292,0.01552),(0.00392,0.75021,0.00392,0.02030),(0.00510,0.71980,0.00510,0.02570),(0.00662,0.68684,0.00662,0.03229),(0.00887,0.64647,0.00887,0.04144),(0.01360,0.58079,0.01360,0.05884)} {(0.00036,0.00006,0.80171,0.00006),(0.00070,0.00012,0.72923,0.00012),(0.00099,0.00018,0.67968,0.00018),(0.00131,0.00025,0.63633,0.00025),(0.00166,0.00032,0.59394,0.00032),(0.00209,0.00041,0.54856,0.00041), [...]
+
+
+ TEST alpha(ncats) =   5.00( 8), mode = MEDIAN
 
 0.402412 0.601743 0.739418 0.868502 1.004287 1.162317 1.375127 1.846194 
 [5] P-matrix for branch length 0.100000
@@ -2748,7 +5496,183 @@
 [5] CLV 7: [ {(0.00090,0.87229,0.00090,0.00517),(0.00195,0.81763,0.00195,0.01067),(0.00286,0.78278,0.00286,0.01525),(0.00385,0.75209,0.00385,0.01999),(0.00502,0.72173,0.00502,0.02533),(0.00653,0.68871,0.00653,0.03190),(0.00879,0.64783,0.00879,0.04112),(0.01452,0.57004,0.01452,0.06198)} {(0.00033,0.00006,0.81105,0.00006),(0.00068,0.00012,0.73201,0.00012),(0.00098,0.00018,0.68228,0.00018),(0.00128,0.00024,0.63897,0.00024),(0.00163,0.00031,0.59661,0.00031),(0.00207,0.00041,0.55112,0.00041), [...]
 
 
- TEST alpha(ncats) =  10.00( 8)
+ TEST alpha(ncats) =  10.00( 8), mode = MEAN
+
+0.568782 0.720857 0.827214 0.923439 1.021473 1.132002 1.274937 1.531296 
+[6] P-matrix for branch length 0.100000
++0.9547   +0.0215   +0.0131   +0.0107   
++0.0161   +0.9525   +0.0054   +0.0260   
++0.0392   +0.0215   +0.9285   +0.0107   
++0.0161   +0.0521   +0.0054   +0.9264   
+
++0.9431   +0.0270   +0.0163   +0.0135   
++0.0203   +0.9405   +0.0068   +0.0325   
++0.0490   +0.0270   +0.9104   +0.0135   
++0.0203   +0.0650   +0.0068   +0.9080   
+
++0.9351   +0.0309   +0.0186   +0.0154   
++0.0232   +0.9322   +0.0077   +0.0369   
++0.0557   +0.0309   +0.8980   +0.0154   
++0.0232   +0.0738   +0.0077   +0.8954   
+
++0.9280   +0.0343   +0.0205   +0.0172   
++0.0257   +0.9249   +0.0086   +0.0408   
++0.0616   +0.0343   +0.8869   +0.0172   
++0.0257   +0.0815   +0.0086   +0.8841   
+
++0.9208   +0.0378   +0.0225   +0.0189   
++0.0283   +0.9176   +0.0094   +0.0447   
++0.0676   +0.0378   +0.8758   +0.0189   
++0.0283   +0.0893   +0.0094   +0.8729   
+
++0.9129   +0.0416   +0.0247   +0.0208   
++0.0312   +0.9094   +0.0104   +0.0489   
++0.0741   +0.0416   +0.8634   +0.0208   
++0.0312   +0.0979   +0.0104   +0.8605   
+
++0.9027   +0.0466   +0.0275   +0.0233   
++0.0349   +0.8991   +0.0116   +0.0543   
++0.0824   +0.0466   +0.8478   +0.0233   
++0.0349   +0.1087   +0.0116   +0.8448   
+
++0.8849   +0.0553   +0.0322   +0.0276   
++0.0414   +0.8811   +0.0138   +0.0636   
++0.0966   +0.0553   +0.8205   +0.0276   
++0.0414   +0.1272   +0.0138   +0.8175   
+
+
+[6] P-matrix for branch length 0.200000
++0.9125   +0.0418   +0.0248   +0.0209   
++0.0314   +0.9090   +0.0105   +0.0492   
++0.0744   +0.0418   +0.8628   +0.0209   
++0.0314   +0.0983   +0.0105   +0.8599   
+
++0.8911   +0.0522   +0.0306   +0.0261   
++0.0392   +0.8873   +0.0131   +0.0604   
++0.0917   +0.0522   +0.8299   +0.0261   
++0.0392   +0.1208   +0.0131   +0.8269   
+
++0.8766   +0.0594   +0.0344   +0.0297   
++0.0445   +0.8728   +0.0148   +0.0679   
++0.1032   +0.0594   +0.8078   +0.0297   
++0.0445   +0.1358   +0.0148   +0.8049   
+
++0.8638   +0.0657   +0.0377   +0.0328   
++0.0492   +0.8600   +0.0164   +0.0744   
++0.1132   +0.0657   +0.7883   +0.0328   
++0.0492   +0.1487   +0.0164   +0.7856   
+
++0.8511   +0.0720   +0.0410   +0.0360   
++0.0540   +0.8474   +0.0180   +0.0807   
++0.1230   +0.0720   +0.7691   +0.0360   
++0.0540   +0.1613   +0.0180   +0.7667   
+
++0.8371   +0.0789   +0.0445   +0.0395   
++0.0592   +0.8336   +0.0197   +0.0875   
++0.1336   +0.0789   +0.7480   +0.0395   
++0.0592   +0.1750   +0.0197   +0.7461   
+
++0.8196   +0.0877   +0.0489   +0.0439   
++0.0658   +0.8164   +0.0219   +0.0958   
++0.1466   +0.0877   +0.7218   +0.0439   
++0.0658   +0.1917   +0.0219   +0.7206   
+
++0.7896   +0.1029   +0.0561   +0.0514   
++0.0772   +0.7875   +0.0257   +0.1096   
++0.1682   +0.1029   +0.6775   +0.0514   
++0.0772   +0.2191   +0.0257   +0.6780   
+
+
+[6] P-matrix for branch length 1.000000
++0.6624   +0.1697   +0.0830   +0.0849   
++0.1273   +0.6703   +0.0424   +0.1600   
++0.2491   +0.1697   +0.4963   +0.0849   
++0.1273   +0.3200   +0.0424   +0.5102   
+
++0.6051   +0.2013   +0.0929   +0.1007   
++0.1510   +0.6206   +0.0503   +0.1780   
++0.2787   +0.2013   +0.4193   +0.1007   
++0.1510   +0.3561   +0.0503   +0.4426   
+
++0.5707   +0.2208   +0.0980   +0.1104   
++0.1656   +0.5919   +0.0552   +0.1873   
++0.2941   +0.2208   +0.3747   +0.1104   
++0.1656   +0.3745   +0.0552   +0.4047   
+
++0.5432   +0.2368   +0.1016   +0.1184   
++0.1776   +0.5695   +0.0592   +0.1937   
++0.3049   +0.2368   +0.3399   +0.1184   
++0.1776   +0.3874   +0.0592   +0.3758   
+
++0.5181   +0.2516   +0.1045   +0.1258   
++0.1887   +0.5496   +0.0629   +0.1988   
++0.3135   +0.2516   +0.3091   +0.1258   
++0.1887   +0.3976   +0.0629   +0.3508   
+
++0.4930   +0.2667   +0.1069   +0.1334   
++0.2000   +0.5302   +0.0667   +0.2031   
++0.3207   +0.2667   +0.2792   +0.1334   
++0.2000   +0.4062   +0.0667   +0.3270   
+
++0.4650   +0.2840   +0.1090   +0.1420   
++0.2130   +0.5091   +0.0710   +0.2069   
++0.3270   +0.2840   +0.2470   +0.1420   
++0.2130   +0.4139   +0.0710   +0.3021   
+
++0.4249   +0.3096   +0.1108   +0.1548   
++0.2322   +0.4801   +0.0774   +0.2104   
++0.3323   +0.3096   +0.2034   +0.1548   
++0.2322   +0.4207   +0.0774   +0.2697   
+
+
+[6] P-matrix for branch length 1.000000
++0.6624   +0.1697   +0.0830   +0.0849   
++0.1273   +0.6703   +0.0424   +0.1600   
++0.2491   +0.1697   +0.4963   +0.0849   
++0.1273   +0.3200   +0.0424   +0.5102   
+
++0.6051   +0.2013   +0.0929   +0.1007   
++0.1510   +0.6206   +0.0503   +0.1780   
++0.2787   +0.2013   +0.4193   +0.1007   
++0.1510   +0.3561   +0.0503   +0.4426   
+
++0.5707   +0.2208   +0.0980   +0.1104   
++0.1656   +0.5919   +0.0552   +0.1873   
++0.2941   +0.2208   +0.3747   +0.1104   
++0.1656   +0.3745   +0.0552   +0.4047   
+
++0.5432   +0.2368   +0.1016   +0.1184   
++0.1776   +0.5695   +0.0592   +0.1937   
++0.3049   +0.2368   +0.3399   +0.1184   
++0.1776   +0.3874   +0.0592   +0.3758   
+
++0.5181   +0.2516   +0.1045   +0.1258   
++0.1887   +0.5496   +0.0629   +0.1988   
++0.3135   +0.2516   +0.3091   +0.1258   
++0.1887   +0.3976   +0.0629   +0.3508   
+
++0.4930   +0.2667   +0.1069   +0.1334   
++0.2000   +0.5302   +0.0667   +0.2031   
++0.3207   +0.2667   +0.2792   +0.1334   
++0.2000   +0.4062   +0.0667   +0.3270   
+
++0.4650   +0.2840   +0.1090   +0.1420   
++0.2130   +0.5091   +0.0710   +0.2069   
++0.3270   +0.2840   +0.2470   +0.1420   
++0.2130   +0.4139   +0.0710   +0.3021   
+
++0.4249   +0.3096   +0.1108   +0.1548   
++0.2322   +0.4801   +0.0774   +0.2104   
++0.3323   +0.3096   +0.2034   +0.1548   
++0.2322   +0.4207   +0.0774   +0.2697   
+
+
+[6] CLV 5: [ {(0.03904,0.07320,0.00399,0.08762),(0.04792,0.08839,0.00616,0.10467),(0.05379,0.09810,0.00789,0.11532),(0.05887,0.10629,0.00959,0.12415),(0.06384,0.11409,0.01144,0.13241),(0.06919,0.12227,0.01366,0.14091),(0.07574,0.13196,0.01671,0.15073),(0.08653,0.14706,0.02260,0.16549)} {(0.83257,0.00098,0.00554,0.00098),(0.79399,0.00154,0.00841,0.00154),(0.76837,0.00198,0.01065,0.00198),(0.74611,0.00243,0.01281,0.00243),(0.72430,0.00291,0.01512,0.00291),(0.70070,0.00350,0.01784,0.00350), [...]
+[6] CLV 6: [ {(0.03635,0.00228,0.00058,0.00269),(0.04375,0.00343,0.00108,0.00399),(0.04844,0.00432,0.00154,0.00498),(0.05235,0.00517,0.00203,0.00591),(0.05604,0.00607,0.00260,0.00689),(0.05987,0.00713,0.00333,0.00802),(0.06432,0.00853,0.00441,0.00951),(0.07106,0.01111,0.00666,0.01218)} {(0.01972,0.00015,0.03266,0.00015),(0.02290,0.00023,0.03872,0.00023),(0.02473,0.00029,0.04238,0.00029),(0.02614,0.00036,0.04531,0.00036),(0.02736,0.00042,0.04795,0.00042),(0.02851,0.00050,0.05053,0.00050), [...]
+[6] CLV 7: [ {(0.00175,0.82632,0.00175,0.00966),(0.00273,0.78735,0.00273,0.01460),(0.00352,0.76171,0.00352,0.01843),(0.00431,0.73958,0.00431,0.02211),(0.00518,0.71802,0.00518,0.02603),(0.00623,0.69486,0.00623,0.03062),(0.00769,0.66658,0.00769,0.03674),(0.01058,0.62022,0.01058,0.04803)} {(0.00062,0.00011,0.74448,0.00011),(0.00093,0.00017,0.68877,0.00017),(0.00118,0.00022,0.65249,0.00022),(0.00142,0.00027,0.62145,0.00027),(0.00168,0.00032,0.59147,0.00032),(0.00198,0.00039,0.55954,0.00039), [...]
+
+
+ TEST alpha(ncats) =  10.00( 8), mode = MEDIAN
 
 0.547134 0.715810 0.822782 0.918994 1.016968 1.127704 1.272412 1.578196 
 [6] P-matrix for branch length 0.100000
@@ -2924,61 +5848,237 @@
 [6] CLV 7: [ {(0.00163,0.83210,0.00163,0.00902),(0.00269,0.78860,0.00269,0.01443),(0.00349,0.76275,0.00349,0.01827),(0.00427,0.74058,0.00427,0.02194),(0.00514,0.71899,0.00514,0.02585),(0.00619,0.69574,0.00619,0.03044),(0.00767,0.66707,0.00767,0.03663),(0.01115,0.61230,0.01115,0.05011)} {(0.00057,0.00010,0.75280,0.00010),(0.00092,0.00017,0.69054,0.00017),(0.00117,0.00022,0.65396,0.00022),(0.00141,0.00027,0.62285,0.00027),(0.00167,0.00032,0.59281,0.00032),(0.00197,0.00039,0.56075,0.00039), [...]
 
 
- TEST alpha(ncats) =  50.00( 8)
+ TEST alpha(ncats) =  50.00( 8), mode = MEAN
 
-0.780188 0.872612 0.925792 0.971309 1.015819 1.064247 1.125000 1.245033 
+0.793403 0.874422 0.926988 0.972308 1.016674 1.064851 1.124726 1.226628 
 [7] P-matrix for branch length 0.100000
-+0.9386   +0.0292   +0.0176   +0.0146   
-+0.0219   +0.9359   +0.0073   +0.0350   
-+0.0528   +0.0292   +0.9035   +0.0146   
-+0.0219   +0.0699   +0.0073   +0.9009   
++0.9376   +0.0297   +0.0179   +0.0148   
++0.0222   +0.9348   +0.0074   +0.0355   
++0.0536   +0.0297   +0.9019   +0.0148   
++0.0222   +0.0710   +0.0074   +0.8993   
 
-+0.9318   +0.0325   +0.0195   +0.0162   
-+0.0244   +0.9288   +0.0081   +0.0387   
-+0.0585   +0.0325   +0.8927   +0.0162   
-+0.0244   +0.0775   +0.0081   +0.8900   
++0.9316   +0.0326   +0.0195   +0.0163   
++0.0244   +0.9286   +0.0081   +0.0388   
++0.0586   +0.0326   +0.8925   +0.0163   
++0.0244   +0.0776   +0.0081   +0.8898   
 
-+0.9278   +0.0344   +0.0206   +0.0172   
++0.9277   +0.0344   +0.0206   +0.0172   
 +0.0258   +0.9247   +0.0086   +0.0409   
-+0.0618   +0.0344   +0.8866   +0.0172   
-+0.0258   +0.0817   +0.0086   +0.8839   
++0.0619   +0.0344   +0.8865   +0.0172   
++0.0258   +0.0818   +0.0086   +0.8837   
 
-+0.9245   +0.0360   +0.0215   +0.0180   
-+0.0270   +0.9213   +0.0090   +0.0427   
-+0.0645   +0.0360   +0.8815   +0.0180   
-+0.0270   +0.0854   +0.0090   +0.8786   
++0.9244   +0.0360   +0.0215   +0.0180   
++0.0270   +0.9212   +0.0090   +0.0427   
++0.0646   +0.0360   +0.8813   +0.0180   
++0.0270   +0.0854   +0.0090   +0.8785   
 
 +0.9212   +0.0376   +0.0224   +0.0188   
-+0.0282   +0.9180   +0.0094   +0.0444   
-+0.0672   +0.0376   +0.8764   +0.0188   
-+0.0282   +0.0889   +0.0094   +0.8736   
++0.0282   +0.9179   +0.0094   +0.0445   
++0.0673   +0.0376   +0.8763   +0.0188   
++0.0282   +0.0889   +0.0094   +0.8735   
 
 +0.9177   +0.0393   +0.0234   +0.0196   
-+0.0294   +0.9144   +0.0098   +0.0463   
-+0.0701   +0.0393   +0.8710   +0.0196   
-+0.0294   +0.0927   +0.0098   +0.8681   
++0.0295   +0.9144   +0.0098   +0.0464   
++0.0701   +0.0393   +0.8709   +0.0196   
++0.0295   +0.0927   +0.0098   +0.8680   
 
 +0.9134   +0.0414   +0.0246   +0.0207   
-+0.0310   +0.9099   +0.0103   +0.0487   
-+0.0737   +0.0414   +0.8642   +0.0207   
++0.0310   +0.9100   +0.0103   +0.0487   
++0.0737   +0.0414   +0.8643   +0.0207   
 +0.0310   +0.0973   +0.0103   +0.8613   
 
-+0.9048   +0.0455   +0.0269   +0.0228   
-+0.0342   +0.9012   +0.0114   +0.0532   
-+0.0807   +0.0455   +0.8510   +0.0228   
-+0.0342   +0.1064   +0.0114   +0.8480   
++0.9061   +0.0449   +0.0265   +0.0225   
++0.0337   +0.9026   +0.0112   +0.0525   
++0.0796   +0.0449   +0.8530   +0.0225   
++0.0337   +0.1051   +0.0112   +0.8500   
 
 
 [7] P-matrix for branch length 0.200000
-+0.8829   +0.0562   +0.0327   +0.0281   
-+0.0422   +0.8791   +0.0141   +0.0646   
-+0.0982   +0.0562   +0.8175   +0.0281   
-+0.0422   +0.1293   +0.0141   +0.8145   
++0.8811   +0.0571   +0.0332   +0.0286   
++0.0428   +0.8773   +0.0143   +0.0656   
++0.0996   +0.0571   +0.8147   +0.0286   
++0.0428   +0.1311   +0.0143   +0.8118   
+
++0.8703   +0.0625   +0.0360   +0.0312   
++0.0468   +0.8664   +0.0156   +0.0711   
++0.1081   +0.0625   +0.7982   +0.0312   
++0.0468   +0.1422   +0.0156   +0.7954   
+
++0.8633   +0.0659   +0.0378   +0.0329   
++0.0494   +0.8595   +0.0165   +0.0746   
++0.1135   +0.0659   +0.7876   +0.0329   
++0.0494   +0.1492   +0.0165   +0.7849   
+
++0.8574   +0.0688   +0.0394   +0.0344   
++0.0516   +0.8536   +0.0172   +0.0775   
++0.1181   +0.0688   +0.7787   +0.0344   
++0.0516   +0.1551   +0.0172   +0.7761   
 
-+0.8705   +0.0623   +0.0360   +0.0312   
-+0.0468   +0.8667   +0.0156   +0.0710   
-+0.1080   +0.0623   +0.7985   +0.0312   
-+0.0468   +0.1419   +0.0156   +0.7957   
++0.8517   +0.0717   +0.0408   +0.0358   
++0.0537   +0.8480   +0.0179   +0.0804   
++0.1225   +0.0717   +0.7700   +0.0358   
++0.0537   +0.1607   +0.0179   +0.7676   
+
++0.8455   +0.0747   +0.0424   +0.0374   
++0.0560   +0.8419   +0.0187   +0.0834   
++0.1272   +0.0747   +0.7607   +0.0374   
++0.0560   +0.1668   +0.0187   +0.7585   
+
++0.8380   +0.0785   +0.0443   +0.0392   
++0.0589   +0.8345   +0.0196   +0.0870   
++0.1329   +0.0785   +0.7494   +0.0392   
++0.0589   +0.1741   +0.0196   +0.7474   
+
++0.8254   +0.0848   +0.0474   +0.0424   
++0.0636   +0.8222   +0.0212   +0.0931   
++0.1423   +0.0848   +0.7305   +0.0424   
++0.0636   +0.1861   +0.0212   +0.7291   
+
+
+[7] P-matrix for branch length 1.000000
++0.5812   +0.2148   +0.0965   +0.1074   
++0.1611   +0.6006   +0.0537   +0.1846   
++0.2896   +0.2148   +0.3881   +0.1074   
++0.1611   +0.3692   +0.0537   +0.4160   
+
++0.5568   +0.2289   +0.0999   +0.1144   
++0.1716   +0.5805   +0.0572   +0.1906   
++0.2997   +0.2289   +0.3570   +0.1144   
++0.1716   +0.3812   +0.0572   +0.3899   
+
++0.5422   +0.2374   +0.1018   +0.1187   
++0.1780   +0.5687   +0.0593   +0.1939   
++0.3053   +0.2374   +0.3387   +0.1187   
++0.1780   +0.3878   +0.0593   +0.3748   
+
++0.5303   +0.2444   +0.1032   +0.1222   
++0.1833   +0.5592   +0.0611   +0.1964   
++0.3095   +0.2444   +0.3240   +0.1222   
++0.1833   +0.3928   +0.0611   +0.3628   
+
++0.5192   +0.2509   +0.1044   +0.1255   
++0.1882   +0.5505   +0.0627   +0.1986   
++0.3131   +0.2509   +0.3105   +0.1255   
++0.1882   +0.3972   +0.0627   +0.3519   
+
++0.5079   +0.2577   +0.1055   +0.1289   
++0.1933   +0.5416   +0.0644   +0.2007   
++0.3166   +0.2577   +0.2968   +0.1289   
++0.1933   +0.4013   +0.0644   +0.3409   
+
++0.4946   +0.2658   +0.1068   +0.1329   
++0.1993   +0.5313   +0.0664   +0.2029   
++0.3203   +0.2658   +0.2810   +0.1329   
++0.1993   +0.4058   +0.0664   +0.3285   
+
++0.4740   +0.2784   +0.1084   +0.1392   
++0.2088   +0.5157   +0.0696   +0.2058   
++0.3252   +0.2784   +0.2572   +0.1392   
++0.2088   +0.4117   +0.0696   +0.3099   
+
+
+[7] P-matrix for branch length 1.000000
++0.5812   +0.2148   +0.0965   +0.1074   
++0.1611   +0.6006   +0.0537   +0.1846   
++0.2896   +0.2148   +0.3881   +0.1074   
++0.1611   +0.3692   +0.0537   +0.4160   
+
++0.5568   +0.2289   +0.0999   +0.1144   
++0.1716   +0.5805   +0.0572   +0.1906   
++0.2997   +0.2289   +0.3570   +0.1144   
++0.1716   +0.3812   +0.0572   +0.3899   
+
++0.5422   +0.2374   +0.1018   +0.1187   
++0.1780   +0.5687   +0.0593   +0.1939   
++0.3053   +0.2374   +0.3387   +0.1187   
++0.1780   +0.3878   +0.0593   +0.3748   
+
++0.5303   +0.2444   +0.1032   +0.1222   
++0.1833   +0.5592   +0.0611   +0.1964   
++0.3095   +0.2444   +0.3240   +0.1222   
++0.1833   +0.3928   +0.0611   +0.3628   
+
++0.5192   +0.2509   +0.1044   +0.1255   
++0.1882   +0.5505   +0.0627   +0.1986   
++0.3131   +0.2509   +0.3105   +0.1255   
++0.1882   +0.3972   +0.0627   +0.3519   
+
++0.5079   +0.2577   +0.1055   +0.1289   
++0.1933   +0.5416   +0.0644   +0.2007   
++0.3166   +0.2577   +0.2968   +0.1289   
++0.1933   +0.4013   +0.0644   +0.3409   
+
++0.4946   +0.2658   +0.1068   +0.1329   
++0.1993   +0.5313   +0.0664   +0.2029   
++0.3203   +0.2658   +0.2810   +0.1329   
++0.1993   +0.4058   +0.0664   +0.3285   
+
++0.4740   +0.2784   +0.1084   +0.1392   
++0.2088   +0.5157   +0.0696   +0.2058   
++0.3252   +0.2784   +0.2572   +0.1392   
++0.2088   +0.4117   +0.0696   +0.3099   
+
+
+[7] CLV 5: [ {(0.05195,0.09509,0.00732,0.11204),(0.05631,0.10219,0.00871,0.11975),(0.05906,0.10658,0.00965,0.12446),(0.06137,0.11025,0.01050,0.12836),(0.06360,0.11372,0.01135,0.13202),(0.06597,0.11738,0.01229,0.13584),(0.06884,0.12176,0.01351,0.14037),(0.07357,0.12879,0.01566,0.14755)} {(0.77640,0.00183,0.00992,0.00183),(0.75735,0.00219,0.01170,0.00219),(0.74531,0.00244,0.01289,0.00244),(0.73513,0.00266,0.01395,0.00266),(0.72535,0.00289,0.01501,0.00289),(0.71491,0.00314,0.01618,0.00314), [...]
+[7] CLV 6: [ {(0.04699,0.00403,0.00138,0.00466),(0.05039,0.00473,0.00177,0.00543),(0.05249,0.00520,0.00205,0.00595),(0.05423,0.00562,0.00230,0.00640),(0.05587,0.00603,0.00257,0.00684),(0.05758,0.00648,0.00288,0.00733),(0.05962,0.00706,0.00328,0.00795),(0.06287,0.00805,0.00403,0.00900)} {(0.02418,0.00027,0.04126,0.00027),(0.02545,0.00032,0.04386,0.00032),(0.02619,0.00036,0.04541,0.00036),(0.02677,0.00039,0.04667,0.00039),(0.02731,0.00042,0.04783,0.00042),(0.02784,0.00045,0.04901,0.00045), [...]
+[7] CLV 7: [ {(0.00326,0.76972,0.00326,0.01719),(0.00390,0.75073,0.00390,0.02022),(0.00434,0.73878,0.00434,0.02225),(0.00474,0.72871,0.00474,0.02405),(0.00514,0.71906,0.00514,0.02584),(0.00558,0.70879,0.00558,0.02781),(0.00616,0.69635,0.00616,0.03031),(0.00719,0.67593,0.00719,0.03465)} {(0.00110,0.00020,0.66379,0.00020),(0.00130,0.00024,0.63706,0.00024),(0.00143,0.00027,0.62034,0.00027),(0.00155,0.00030,0.60630,0.00030),(0.00167,0.00032,0.59290,0.00032),(0.00180,0.00035,0.57871,0.00035), [...]
+
+
+ TEST alpha(ncats) =  50.00( 8), mode = MEDIAN
+
+0.780188 0.872612 0.925792 0.971309 1.015819 1.064247 1.125000 1.245033 
+[7] P-matrix for branch length 0.100000
++0.9386   +0.0292   +0.0176   +0.0146   
++0.0219   +0.9359   +0.0073   +0.0350   
++0.0528   +0.0292   +0.9035   +0.0146   
++0.0219   +0.0699   +0.0073   +0.9009   
+
++0.9318   +0.0325   +0.0195   +0.0162   
++0.0244   +0.9288   +0.0081   +0.0387   
++0.0585   +0.0325   +0.8927   +0.0162   
++0.0244   +0.0775   +0.0081   +0.8900   
+
++0.9278   +0.0344   +0.0206   +0.0172   
++0.0258   +0.9247   +0.0086   +0.0409   
++0.0618   +0.0344   +0.8866   +0.0172   
++0.0258   +0.0817   +0.0086   +0.8839   
+
++0.9245   +0.0360   +0.0215   +0.0180   
++0.0270   +0.9213   +0.0090   +0.0427   
++0.0645   +0.0360   +0.8815   +0.0180   
++0.0270   +0.0854   +0.0090   +0.8786   
+
++0.9212   +0.0376   +0.0224   +0.0188   
++0.0282   +0.9180   +0.0094   +0.0444   
++0.0672   +0.0376   +0.8764   +0.0188   
++0.0282   +0.0889   +0.0094   +0.8736   
+
++0.9177   +0.0393   +0.0234   +0.0196   
++0.0294   +0.9144   +0.0098   +0.0463   
++0.0701   +0.0393   +0.8710   +0.0196   
++0.0294   +0.0927   +0.0098   +0.8681   
+
++0.9134   +0.0414   +0.0246   +0.0207   
++0.0310   +0.9099   +0.0103   +0.0487   
++0.0737   +0.0414   +0.8642   +0.0207   
++0.0310   +0.0973   +0.0103   +0.8613   
+
++0.9048   +0.0455   +0.0269   +0.0228   
++0.0342   +0.9012   +0.0114   +0.0532   
++0.0807   +0.0455   +0.8510   +0.0228   
++0.0342   +0.1064   +0.0114   +0.8480   
+
+
+[7] P-matrix for branch length 0.200000
++0.8829   +0.0562   +0.0327   +0.0281   
++0.0422   +0.8791   +0.0141   +0.0646   
++0.0982   +0.0562   +0.8175   +0.0281   
++0.0422   +0.1293   +0.0141   +0.8145   
+
++0.8705   +0.0623   +0.0360   +0.0312   
++0.0468   +0.8667   +0.0156   +0.0710   
++0.1080   +0.0623   +0.7985   +0.0312   
++0.0468   +0.1419   +0.0156   +0.7957   
 
 +0.8635   +0.0658   +0.0378   +0.0329   
 +0.0494   +0.8597   +0.0165   +0.0745   
@@ -3100,7 +6200,183 @@
 [7] CLV 7: [ {(0.00316,0.77289,0.00316,0.01671),(0.00389,0.75114,0.00389,0.02015),(0.00433,0.73905,0.00433,0.02221),(0.00473,0.72893,0.00473,0.02401),(0.00513,0.71924,0.00513,0.02580),(0.00558,0.70892,0.00558,0.02779),(0.00616,0.69629,0.00616,0.03032),(0.00738,0.67235,0.00738,0.03544)} {(0.00107,0.00020,0.66827,0.00020),(0.00130,0.00024,0.63764,0.00024),(0.00143,0.00027,0.62071,0.00027),(0.00155,0.00030,0.60661,0.00030),(0.00167,0.00032,0.59315,0.00032),(0.00180,0.00035,0.57888,0.00035), [...]
 
 
- TEST alpha(ncats) = 100.00( 8)
+ TEST alpha(ncats) = 100.00( 8), mode = MEAN
+
+0.851718 0.911181 0.949150 0.981537 1.012954 1.046770 1.088392 1.158298 
+[8] P-matrix for branch length 0.100000
++0.9333   +0.0317   +0.0191   +0.0159   
++0.0238   +0.9304   +0.0079   +0.0379   
++0.0572   +0.0317   +0.8952   +0.0159   
++0.0238   +0.0758   +0.0079   +0.8925   
+
++0.9289   +0.0339   +0.0203   +0.0169   
++0.0254   +0.9259   +0.0085   +0.0403   
++0.0609   +0.0339   +0.8883   +0.0169   
++0.0254   +0.0806   +0.0085   +0.8856   
+
++0.9261   +0.0352   +0.0211   +0.0176   
++0.0264   +0.9230   +0.0088   +0.0418   
++0.0632   +0.0352   +0.8840   +0.0176   
++0.0264   +0.0836   +0.0088   +0.8812   
+
++0.9237   +0.0364   +0.0217   +0.0182   
++0.0273   +0.9206   +0.0091   +0.0431   
++0.0652   +0.0364   +0.8803   +0.0182   
++0.0273   +0.0862   +0.0091   +0.8775   
+
++0.9215   +0.0375   +0.0223   +0.0187   
++0.0281   +0.9182   +0.0094   +0.0443   
++0.0670   +0.0375   +0.8768   +0.0187   
++0.0281   +0.0886   +0.0094   +0.8739   
+
++0.9190   +0.0387   +0.0230   +0.0193   
++0.0290   +0.9157   +0.0097   +0.0456   
++0.0691   +0.0387   +0.8729   +0.0193   
++0.0290   +0.0913   +0.0097   +0.8701   
+
++0.9160   +0.0401   +0.0238   +0.0201   
++0.0301   +0.9126   +0.0100   +0.0473   
++0.0715   +0.0401   +0.8683   +0.0201   
++0.0301   +0.0945   +0.0100   +0.8654   
+
++0.9110   +0.0425   +0.0252   +0.0213   
++0.0319   +0.9075   +0.0106   +0.0499   
++0.0756   +0.0425   +0.8605   +0.0213   
++0.0319   +0.0999   +0.0106   +0.8576   
+
+
+[8] P-matrix for branch length 0.200000
++0.8733   +0.0610   +0.0353   +0.0305   
++0.0457   +0.8695   +0.0152   +0.0696   
++0.1058   +0.0610   +0.8028   +0.0305   
++0.0457   +0.1391   +0.0152   +0.7999   
+
++0.8654   +0.0649   +0.0373   +0.0324   
++0.0486   +0.8616   +0.0162   +0.0735   
++0.1119   +0.0649   +0.7908   +0.0324   
++0.0486   +0.1471   +0.0162   +0.7880   
+
++0.8604   +0.0673   +0.0386   +0.0337   
++0.0505   +0.8566   +0.0168   +0.0760   
++0.1158   +0.0673   +0.7832   +0.0337   
++0.0505   +0.1521   +0.0168   +0.7806   
+
++0.8562   +0.0694   +0.0397   +0.0347   
++0.0521   +0.8525   +0.0174   +0.0781   
++0.1190   +0.0694   +0.7768   +0.0347   
++0.0521   +0.1563   +0.0174   +0.7743   
+
++0.8522   +0.0714   +0.0407   +0.0357   
++0.0536   +0.8484   +0.0179   +0.0801   
++0.1221   +0.0714   +0.7707   +0.0357   
++0.0536   +0.1603   +0.0179   +0.7683   
+
++0.8478   +0.0736   +0.0418   +0.0368   
++0.0552   +0.8442   +0.0184   +0.0823   
++0.1254   +0.0736   +0.7642   +0.0368   
++0.0552   +0.1645   +0.0184   +0.7619   
+
++0.8425   +0.0762   +0.0432   +0.0381   
++0.0571   +0.8390   +0.0190   +0.0848   
++0.1295   +0.0762   +0.7562   +0.0381   
++0.0571   +0.1697   +0.0190   +0.7541   
+
++0.8338   +0.0806   +0.0453   +0.0403   
++0.0604   +0.8304   +0.0201   +0.0891   
++0.1360   +0.0806   +0.7431   +0.0403   
++0.0604   +0.1781   +0.0201   +0.7413   
+
+
+[8] P-matrix for branch length 1.000000
++0.5634   +0.2250   +0.0990   +0.1125   
++0.1688   +0.5859   +0.0563   +0.1890   
++0.2971   +0.2250   +0.3653   +0.1125   
++0.1688   +0.3781   +0.0563   +0.3969   
+
++0.5465   +0.2349   +0.1012   +0.1174   
++0.1761   +0.5722   +0.0587   +0.1930   
++0.3037   +0.2349   +0.3440   +0.1174   
++0.1761   +0.3859   +0.0587   +0.3792   
+
++0.5363   +0.2408   +0.1025   +0.1204   
++0.1806   +0.5640   +0.0602   +0.1952   
++0.3074   +0.2408   +0.3314   +0.1204   
++0.1806   +0.3904   +0.0602   +0.3688   
+
++0.5279   +0.2458   +0.1034   +0.1229   
++0.1843   +0.5573   +0.0614   +0.1969   
++0.3103   +0.2458   +0.3211   +0.1229   
++0.1843   +0.3938   +0.0614   +0.3605   
+
++0.5201   +0.2504   +0.1043   +0.1252   
++0.1878   +0.5512   +0.0626   +0.1984   
++0.3128   +0.2504   +0.3116   +0.1252   
++0.1878   +0.3968   +0.0626   +0.3528   
+
++0.5120   +0.2552   +0.1051   +0.1276   
++0.1914   +0.5449   +0.0638   +0.1999   
++0.3153   +0.2552   +0.3018   +0.1276   
++0.1914   +0.3998   +0.0638   +0.3449   
+
++0.5025   +0.2610   +0.1060   +0.1305   
++0.1957   +0.5375   +0.0652   +0.2016   
++0.3181   +0.2610   +0.2904   +0.1305   
++0.1957   +0.4032   +0.0652   +0.3359   
+
++0.4875   +0.2701   +0.1074   +0.1350   
++0.2026   +0.5260   +0.0675   +0.2040   
++0.3221   +0.2701   +0.2728   +0.1350   
++0.2026   +0.4079   +0.0675   +0.3220   
+
+
+[8] P-matrix for branch length 1.000000
++0.5634   +0.2250   +0.0990   +0.1125   
++0.1688   +0.5859   +0.0563   +0.1890   
++0.2971   +0.2250   +0.3653   +0.1125   
++0.1688   +0.3781   +0.0563   +0.3969   
+
++0.5465   +0.2349   +0.1012   +0.1174   
++0.1761   +0.5722   +0.0587   +0.1930   
++0.3037   +0.2349   +0.3440   +0.1174   
++0.1761   +0.3859   +0.0587   +0.3792   
+
++0.5363   +0.2408   +0.1025   +0.1204   
++0.1806   +0.5640   +0.0602   +0.1952   
++0.3074   +0.2408   +0.3314   +0.1204   
++0.1806   +0.3904   +0.0602   +0.3688   
+
++0.5279   +0.2458   +0.1034   +0.1229   
++0.1843   +0.5573   +0.0614   +0.1969   
++0.3103   +0.2458   +0.3211   +0.1229   
++0.1843   +0.3938   +0.0614   +0.3605   
+
++0.5201   +0.2504   +0.1043   +0.1252   
++0.1878   +0.5512   +0.0626   +0.1984   
++0.3128   +0.2504   +0.3116   +0.1252   
++0.1878   +0.3968   +0.0626   +0.3528   
+
++0.5120   +0.2552   +0.1051   +0.1276   
++0.1914   +0.5449   +0.0638   +0.1999   
++0.3153   +0.2552   +0.3018   +0.1276   
++0.1914   +0.3998   +0.0638   +0.3449   
+
++0.5025   +0.2610   +0.1060   +0.1305   
++0.1957   +0.5375   +0.0652   +0.2016   
++0.3181   +0.2610   +0.2904   +0.1305   
++0.1957   +0.4032   +0.0652   +0.3359   
+
++0.4875   +0.2701   +0.1074   +0.1350   
++0.2026   +0.5260   +0.0675   +0.2040   
++0.3221   +0.2701   +0.2728   +0.1350   
++0.2026   +0.4079   +0.0675   +0.3220   
+
+
+[8] CLV 5: [ {(0.05510,0.10024,0.00831,0.11764),(0.05824,0.10528,0.00936,0.12307),(0.06019,0.10839,0.01006,0.12639),(0.06184,0.11098,0.01067,0.12913),(0.06341,0.11344,0.01127,0.13172),(0.06508,0.11602,0.01194,0.13443),(0.06711,0.11912,0.01277,0.13765),(0.07042,0.12413,0.01420,0.14281)} {(0.76262,0.00209,0.01119,0.00209),(0.74890,0.00237,0.01253,0.00237),(0.74031,0.00255,0.01341,0.00255),(0.73308,0.00271,0.01417,0.00271),(0.72616,0.00287,0.01492,0.00287),(0.71881,0.00304,0.01574,0.00304), [...]
+[8] CLV 6: [ {(0.04946,0.00453,0.00165,0.00521),(0.05187,0.00506,0.00196,0.00579),(0.05335,0.00540,0.00217,0.00617),(0.05457,0.00570,0.00236,0.00649),(0.05573,0.00599,0.00255,0.00681),(0.05695,0.00631,0.00276,0.00715),(0.05840,0.00671,0.00303,0.00757),(0.06073,0.00738,0.00352,0.00829)} {(0.02511,0.00031,0.04316,0.00031),(0.02597,0.00035,0.04495,0.00035),(0.02648,0.00037,0.04603,0.00037),(0.02689,0.00039,0.04691,0.00039),(0.02726,0.00042,0.04773,0.00042),(0.02765,0.00044,0.04857,0.00044), [...]
+[8] CLV 7: [ {(0.00372,0.75598,0.00372,0.01935),(0.00421,0.74234,0.00421,0.02163),(0.00453,0.73383,0.00453,0.02313),(0.00482,0.72669,0.00482,0.02442),(0.00510,0.71986,0.00510,0.02569),(0.00541,0.71262,0.00541,0.02707),(0.00581,0.70386,0.00581,0.02879),(0.00649,0.68952,0.00649,0.03173)} {(0.00124,0.00023,0.64443,0.00023),(0.00139,0.00026,0.62531,0.00026),(0.00149,0.00028,0.61343,0.00028),(0.00157,0.00030,0.60349,0.00030),(0.00166,0.00032,0.59401,0.00032),(0.00175,0.00034,0.58399,0.00034), [...]
+
+
+ TEST alpha(ncats) = 100.00( 8), mode = MEDIAN
 
 0.841795 0.910016 0.948465 0.981013 1.012547 1.046551 1.088788 1.170825 
 [8] P-matrix for branch length 0.100000
@@ -3129,154 +6405,490 @@
 +0.0670   +0.0375   +0.8768   +0.0187   
 +0.0281   +0.0886   +0.0094   +0.8739   
 
-+0.9190   +0.0386   +0.0230   +0.0193   
-+0.0290   +0.9157   +0.0097   +0.0456   
-+0.0691   +0.0386   +0.8730   +0.0193   
-+0.0290   +0.0913   +0.0097   +0.8701   
++0.9190   +0.0386   +0.0230   +0.0193   
++0.0290   +0.9157   +0.0097   +0.0456   
++0.0691   +0.0386   +0.8730   +0.0193   
++0.0290   +0.0913   +0.0097   +0.8701   
+
++0.9160   +0.0401   +0.0239   +0.0201   
++0.0301   +0.9126   +0.0100   +0.0473   
++0.0716   +0.0401   +0.8683   +0.0201   
++0.0301   +0.0946   +0.0100   +0.8653   
+
++0.9101   +0.0430   +0.0255   +0.0215   
++0.0322   +0.9066   +0.0107   +0.0504   
++0.0764   +0.0430   +0.8592   +0.0215   
++0.0322   +0.1008   +0.0107   +0.8562   
+
+
+[8] P-matrix for branch length 0.200000
++0.8746   +0.0603   +0.0349   +0.0302   
++0.0452   +0.8708   +0.0151   +0.0689   
++0.1047   +0.0603   +0.8048   +0.0302   
++0.0452   +0.1378   +0.0151   +0.8019   
+
++0.8655   +0.0648   +0.0373   +0.0324   
++0.0486   +0.8617   +0.0162   +0.0735   
++0.1118   +0.0648   +0.7910   +0.0324   
++0.0486   +0.1469   +0.0162   +0.7883   
+
++0.8605   +0.0673   +0.0386   +0.0336   
++0.0505   +0.8567   +0.0168   +0.0760   
++0.1157   +0.0673   +0.7834   +0.0336   
++0.0505   +0.1520   +0.0168   +0.7807   
+
++0.8563   +0.0694   +0.0397   +0.0347   
++0.0520   +0.8525   +0.0173   +0.0781   
++0.1190   +0.0694   +0.7769   +0.0347   
++0.0520   +0.1562   +0.0173   +0.7744   
+
++0.8522   +0.0714   +0.0407   +0.0357   
++0.0535   +0.8485   +0.0178   +0.0801   
++0.1221   +0.0714   +0.7708   +0.0357   
++0.0535   +0.1602   +0.0178   +0.7684   
+
++0.8479   +0.0736   +0.0418   +0.0368   
++0.0552   +0.8442   +0.0184   +0.0822   
++0.1254   +0.0736   +0.7642   +0.0368   
++0.0552   +0.1645   +0.0184   +0.7619   
+
++0.8425   +0.0762   +0.0432   +0.0381   
++0.0572   +0.8389   +0.0191   +0.0849   
++0.1295   +0.0762   +0.7562   +0.0381   
++0.0572   +0.1697   +0.0191   +0.7541   
+
++0.8323   +0.0813   +0.0457   +0.0407   
++0.0610   +0.8289   +0.0203   +0.0898   
++0.1372   +0.0813   +0.7408   +0.0407   
++0.0610   +0.1796   +0.0203   +0.7390   
+
+
+[8] P-matrix for branch length 1.000000
++0.5663   +0.2233   +0.0986   +0.1117   
++0.1675   +0.5883   +0.0558   +0.1883   
++0.2959   +0.2233   +0.3691   +0.1117   
++0.1675   +0.3767   +0.0558   +0.4000   
+
++0.5468   +0.2347   +0.1012   +0.1173   
++0.1760   +0.5724   +0.0587   +0.1929   
++0.3036   +0.2347   +0.3444   +0.1173   
++0.1760   +0.3858   +0.0587   +0.3795   
+
++0.5365   +0.2407   +0.1024   +0.1204   
++0.1805   +0.5641   +0.0602   +0.1951   
++0.3073   +0.2407   +0.3316   +0.1204   
++0.1805   +0.3903   +0.0602   +0.3690   
+
++0.5281   +0.2457   +0.1034   +0.1228   
++0.1843   +0.5575   +0.0614   +0.1969   
++0.3102   +0.2457   +0.3213   +0.1228   
++0.1843   +0.3937   +0.0614   +0.3606   
+
++0.5202   +0.2503   +0.1043   +0.1252   
++0.1878   +0.5513   +0.0626   +0.1984   
++0.3128   +0.2503   +0.3117   +0.1252   
++0.1878   +0.3968   +0.0626   +0.3529   
+
++0.5121   +0.2552   +0.1051   +0.1276   
++0.1914   +0.5449   +0.0638   +0.1999   
++0.3153   +0.2552   +0.3019   +0.1276   
++0.1914   +0.3998   +0.0638   +0.3450   
+
++0.5024   +0.2610   +0.1061   +0.1305   
++0.1958   +0.5374   +0.0653   +0.2016   
++0.3182   +0.2610   +0.2903   +0.1305   
++0.1958   +0.4032   +0.0653   +0.3358   
+
++0.4849   +0.2717   +0.1076   +0.1358   
++0.2037   +0.5240   +0.0679   +0.2043   
++0.3227   +0.2717   +0.2698   +0.1358   
++0.2037   +0.4087   +0.0679   +0.3197   
+
+
+[8] P-matrix for branch length 1.000000
++0.5663   +0.2233   +0.0986   +0.1117   
++0.1675   +0.5883   +0.0558   +0.1883   
++0.2959   +0.2233   +0.3691   +0.1117   
++0.1675   +0.3767   +0.0558   +0.4000   
+
++0.5468   +0.2347   +0.1012   +0.1173   
++0.1760   +0.5724   +0.0587   +0.1929   
++0.3036   +0.2347   +0.3444   +0.1173   
++0.1760   +0.3858   +0.0587   +0.3795   
+
++0.5365   +0.2407   +0.1024   +0.1204   
++0.1805   +0.5641   +0.0602   +0.1951   
++0.3073   +0.2407   +0.3316   +0.1204   
++0.1805   +0.3903   +0.0602   +0.3690   
+
++0.5281   +0.2457   +0.1034   +0.1228   
++0.1843   +0.5575   +0.0614   +0.1969   
++0.3102   +0.2457   +0.3213   +0.1228   
++0.1843   +0.3937   +0.0614   +0.3606   
+
++0.5202   +0.2503   +0.1043   +0.1252   
++0.1878   +0.5513   +0.0626   +0.1984   
++0.3128   +0.2503   +0.3117   +0.1252   
++0.1878   +0.3968   +0.0626   +0.3529   
+
++0.5121   +0.2552   +0.1051   +0.1276   
++0.1914   +0.5449   +0.0638   +0.1999   
++0.3153   +0.2552   +0.3019   +0.1276   
++0.1914   +0.3998   +0.0638   +0.3450   
+
++0.5024   +0.2610   +0.1061   +0.1305   
++0.1958   +0.5374   +0.0653   +0.2016   
++0.3182   +0.2610   +0.2903   +0.1305   
++0.1958   +0.4032   +0.0653   +0.3358   
+
++0.4849   +0.2717   +0.1076   +0.1358   
++0.2037   +0.5240   +0.0679   +0.2043   
++0.3227   +0.2717   +0.2698   +0.1358   
++0.2037   +0.4087   +0.0679   +0.3197   
+
+
+[8] CLV 5: [ {(0.05457,0.09938,0.00814,0.11671),(0.05818,0.10518,0.00934,0.12296),(0.06016,0.10834,0.01005,0.12633),(0.06181,0.11094,0.01066,0.12909),(0.06339,0.11341,0.01127,0.13169),(0.06507,0.11601,0.01193,0.13441),(0.06712,0.11915,0.01278,0.13768),(0.07101,0.12500,0.01447,0.14370)} {(0.76494,0.00205,0.01097,0.00205),(0.74917,0.00236,0.01250,0.00236),(0.74047,0.00255,0.01339,0.00255),(0.73320,0.00271,0.01416,0.00271),(0.72625,0.00287,0.01491,0.00287),(0.71885,0.00304,0.01573,0.00304), [...]
+[8] CLV 6: [ {(0.04905,0.00444,0.00161,0.00512),(0.05182,0.00505,0.00195,0.00578),(0.05332,0.00540,0.00217,0.00616),(0.05455,0.00570,0.00235,0.00648),(0.05572,0.00599,0.00254,0.00680),(0.05694,0.00631,0.00276,0.00715),(0.05841,0.00671,0.00304,0.00758),(0.06113,0.00750,0.00361,0.00842)} {(0.02495,0.00030,0.04284,0.00030),(0.02595,0.00035,0.04492,0.00035),(0.02647,0.00037,0.04601,0.00037),(0.02688,0.00039,0.04690,0.00039),(0.02726,0.00042,0.04772,0.00042),(0.02764,0.00044,0.04857,0.00044), [...]
+[8] CLV 7: [ {(0.00364,0.75829,0.00364,0.01898),(0.00420,0.74261,0.00420,0.02159),(0.00453,0.73398,0.00453,0.02310),(0.00481,0.72680,0.00481,0.02440),(0.00510,0.71994,0.00510,0.02567),(0.00541,0.71266,0.00541,0.02706),(0.00581,0.70378,0.00581,0.02881),(0.00662,0.68700,0.00662,0.03226)} {(0.00122,0.00023,0.64768,0.00023),(0.00139,0.00026,0.62568,0.00026),(0.00149,0.00028,0.61364,0.00028),(0.00157,0.00030,0.60365,0.00030),(0.00166,0.00032,0.59413,0.00032),(0.00175,0.00034,0.58405,0.00034), [...]
+
+
+ TEST alpha(ncats) =   0.10(16), mode = MEAN
+
+0.000000 0.000000 0.000000 0.000002 0.000022 0.000166 0.000882 0.003692 0.012917 0.039363 0.107650 0.270699 0.640794 1.470721 3.453341 9.999749 
+[0] P-matrix for branch length 0.100000
++1.0000   +0.0000   +0.0000   -0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
+-0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9999   +0.0000   +0.0000   +0.0000   
++0.0000   +0.9999   +0.0000   +0.0000   
++0.0001   +0.0000   +0.9999   +0.0000   
++0.0000   +0.0001   +0.0000   +0.9999   
+
++0.9997   +0.0001   +0.0001   +0.0001   
++0.0001   +0.9997   +0.0000   +0.0002   
++0.0003   +0.0001   +0.9995   +0.0001   
++0.0001   +0.0004   +0.0000   +0.9995   
+
++0.9989   +0.0005   +0.0003   +0.0003   
++0.0004   +0.9989   +0.0001   +0.0006   
++0.0009   +0.0005   +0.9983   +0.0003   
++0.0004   +0.0013   +0.0001   +0.9982   
+
++0.9968   +0.0015   +0.0010   +0.0008   
++0.0011   +0.9966   +0.0004   +0.0019   
++0.0029   +0.0015   +0.9949   +0.0008   
++0.0011   +0.0038   +0.0004   +0.9947   
+
++0.9912   +0.0042   +0.0026   +0.0021   
++0.0031   +0.9907   +0.0010   +0.0052   
++0.0078   +0.0042   +0.9860   +0.0021   
++0.0031   +0.0103   +0.0010   +0.9855   
+
++0.9780   +0.0104   +0.0064   +0.0052   
++0.0078   +0.9768   +0.0026   +0.0128   
++0.0192   +0.0104   +0.9652   +0.0052   
++0.0078   +0.0256   +0.0026   +0.9641   
+
++0.9492   +0.0241   +0.0146   +0.0121   
++0.0181   +0.9468   +0.0060   +0.0291   
++0.0439   +0.0241   +0.9199   +0.0121   
++0.0181   +0.0582   +0.0060   +0.9176   
+
++0.8891   +0.0532   +0.0311   +0.0266   
++0.0399   +0.8853   +0.0133   +0.0615   
++0.0933   +0.0532   +0.8269   +0.0266   
++0.0399   +0.1229   +0.0133   +0.8239   
+
++0.7680   +0.1139   +0.0611   +0.0570   
++0.0855   +0.7670   +0.0285   +0.1191   
++0.1832   +0.1139   +0.6459   +0.0570   
++0.0855   +0.2381   +0.0285   +0.6479   
+
++0.5233   +0.2485   +0.1039   +0.1242   
++0.1864   +0.5537   +0.0621   +0.1978   
++0.3118   +0.2485   +0.3155   +0.1242   
++0.1864   +0.3956   +0.0621   +0.3559   
+
+
+[0] P-matrix for branch length 0.200000
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++0.9999   +0.0001   +0.0000   +0.0000   
++0.0001   +0.9998   +0.0000   +0.0001   
++0.0001   +0.0001   +0.9998   +0.0000   
++0.0001   +0.0002   +0.0000   +0.9998   
+
++0.9994   +0.0003   +0.0002   +0.0001   
++0.0002   +0.9994   +0.0001   +0.0004   
++0.0005   +0.0003   +0.9990   +0.0001   
++0.0002   +0.0007   +0.0001   +0.9990   
+
++0.9979   +0.0010   +0.0006   +0.0005   
++0.0008   +0.9977   +0.0003   +0.0013   
++0.0019   +0.0010   +0.9966   +0.0005   
++0.0008   +0.0025   +0.0003   +0.9965   
+
++0.9935   +0.0030   +0.0019   +0.0015   
++0.0023   +0.9932   +0.0008   +0.0038   
++0.0057   +0.0030   +0.9897   +0.0015   
++0.0023   +0.0076   +0.0008   +0.9894   
+
++0.9825   +0.0083   +0.0051   +0.0041   
++0.0062   +0.9815   +0.0021   +0.0102   
++0.0154   +0.0083   +0.9722   +0.0041   
++0.0062   +0.0204   +0.0021   +0.9713   
+
++0.9568   +0.0205   +0.0125   +0.0102   
++0.0154   +0.9547   +0.0051   +0.0249   
++0.0375   +0.0205   +0.9318   +0.0102   
++0.0154   +0.0497   +0.0051   +0.9298   
+
++0.9022   +0.0468   +0.0276   +0.0234   
++0.0351   +0.8986   +0.0117   +0.0546   
++0.0827   +0.0468   +0.8471   +0.0234   
++0.0351   +0.1092   +0.0117   +0.8440   
+
++0.7965   +0.0994   +0.0544   +0.0497   
++0.0745   +0.7942   +0.0248   +0.1065   
++0.1633   +0.0994   +0.6877   +0.0497   
++0.0745   +0.2129   +0.0248   +0.6877   
+
++0.6156   +0.1954   +0.0912   +0.0977   
++0.1466   +0.6296   +0.0489   +0.1750   
++0.2736   +0.1954   +0.4332   +0.0977   
++0.1466   +0.3499   +0.0489   +0.4547   
+
++0.3757   +0.3426   +0.1103   +0.1713   
++0.2570   +0.4466   +0.0857   +0.2108   
++0.3310   +0.3426   +0.1551   +0.1713   
++0.2570   +0.4216   +0.0857   +0.2358   
+
+
+[0] P-matrix for branch length 1.000000
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
+
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
 
-+0.9160   +0.0401   +0.0239   +0.0201   
-+0.0301   +0.9126   +0.0100   +0.0473   
-+0.0716   +0.0401   +0.8683   +0.0201   
-+0.0301   +0.0946   +0.0100   +0.8653   
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
 
-+0.9101   +0.0430   +0.0255   +0.0215   
-+0.0322   +0.9066   +0.0107   +0.0504   
-+0.0764   +0.0430   +0.8592   +0.0215   
-+0.0322   +0.1008   +0.0107   +0.8562   
++0.9999   +0.0001   +0.0000   +0.0000   
++0.0000   +0.9999   +0.0000   +0.0001   
++0.0001   +0.0001   +0.9998   +0.0000   
++0.0000   +0.0002   +0.0000   +0.9998   
 
++0.9993   +0.0003   +0.0002   +0.0002   
++0.0003   +0.9992   +0.0001   +0.0004   
++0.0006   +0.0003   +0.9988   +0.0002   
++0.0003   +0.0009   +0.0001   +0.9988   
 
-[8] P-matrix for branch length 0.200000
-+0.8746   +0.0603   +0.0349   +0.0302   
-+0.0452   +0.8708   +0.0151   +0.0689   
-+0.1047   +0.0603   +0.8048   +0.0302   
-+0.0452   +0.1378   +0.0151   +0.8019   
++0.9970   +0.0014   +0.0009   +0.0007   
++0.0011   +0.9968   +0.0004   +0.0018   
++0.0027   +0.0014   +0.9952   +0.0007   
++0.0011   +0.0036   +0.0004   +0.9950   
 
-+0.8655   +0.0648   +0.0373   +0.0324   
-+0.0486   +0.8617   +0.0162   +0.0735   
-+0.1118   +0.0648   +0.7910   +0.0324   
-+0.0486   +0.1469   +0.0162   +0.7883   
++0.9894   +0.0050   +0.0031   +0.0025   
++0.0037   +0.9888   +0.0012   +0.0062   
++0.0093   +0.0050   +0.9832   +0.0025   
++0.0037   +0.0124   +0.0012   +0.9826   
 
-+0.8605   +0.0673   +0.0386   +0.0336   
-+0.0505   +0.8567   +0.0168   +0.0760   
-+0.1157   +0.0673   +0.7834   +0.0336   
-+0.0505   +0.1520   +0.0168   +0.7807   
++0.9683   +0.0150   +0.0092   +0.0075   
++0.0112   +0.9667   +0.0037   +0.0183   
++0.0276   +0.0150   +0.9499   +0.0075   
++0.0112   +0.0367   +0.0037   +0.9483   
 
-+0.8563   +0.0694   +0.0397   +0.0347   
-+0.0520   +0.8525   +0.0173   +0.0781   
-+0.1190   +0.0694   +0.7769   +0.0347   
-+0.0520   +0.1562   +0.0173   +0.7744   
++0.9168   +0.0397   +0.0236   +0.0198   
++0.0298   +0.9135   +0.0099   +0.0468   
++0.0708   +0.0397   +0.8696   +0.0198   
++0.0298   +0.0936   +0.0099   +0.8667   
 
-+0.8522   +0.0714   +0.0407   +0.0357   
-+0.0535   +0.8485   +0.0178   +0.0801   
-+0.1221   +0.0714   +0.7708   +0.0357   
-+0.0535   +0.1602   +0.0178   +0.7684   
++0.8102   +0.0924   +0.0512   +0.0462   
++0.0693   +0.8073   +0.0231   +0.1002   
++0.1535   +0.0924   +0.7079   +0.0462   
++0.0693   +0.2004   +0.0231   +0.7071   
 
-+0.8479   +0.0736   +0.0418   +0.0368   
-+0.0552   +0.8442   +0.0184   +0.0822   
-+0.1254   +0.0736   +0.7642   +0.0368   
-+0.0552   +0.1645   +0.0184   +0.7619   
++0.6340   +0.1853   +0.0881   +0.0926   
++0.1390   +0.6454   +0.0463   +0.1694   
++0.2644   +0.1853   +0.4577   +0.0926   
++0.1390   +0.3387   +0.0463   +0.4760   
 
-+0.8425   +0.0762   +0.0432   +0.0381   
-+0.0572   +0.8389   +0.0191   +0.0849   
-+0.1295   +0.0762   +0.7562   +0.0381   
-+0.0572   +0.1697   +0.0191   +0.7541   
++0.4334   +0.3041   +0.1105   +0.1520   
++0.2281   +0.4861   +0.0760   +0.2099   
++0.3316   +0.3041   +0.2123   +0.1520   
++0.2281   +0.4197   +0.0760   +0.2762   
 
-+0.8323   +0.0813   +0.0457   +0.0407   
-+0.0610   +0.8289   +0.0203   +0.0898   
-+0.1372   +0.0813   +0.7408   +0.0407   
-+0.0610   +0.1796   +0.0203   +0.7390   
++0.3169   +0.3860   +0.1041   +0.1930   
++0.2895   +0.4099   +0.0965   +0.2041   
++0.3122   +0.3860   +0.1088   +0.1930   
++0.2895   +0.4082   +0.0965   +0.2058   
 
++0.3000   +0.4000   +0.1000   +0.2000   
++0.3000   +0.4000   +0.1000   +0.2000   
++0.3000   +0.4000   +0.1000   +0.2000   
++0.3000   +0.4000   +0.1000   +0.2000   
 
-[8] P-matrix for branch length 1.000000
-+0.5663   +0.2233   +0.0986   +0.1117   
-+0.1675   +0.5883   +0.0558   +0.1883   
-+0.2959   +0.2233   +0.3691   +0.1117   
-+0.1675   +0.3767   +0.0558   +0.4000   
 
-+0.5468   +0.2347   +0.1012   +0.1173   
-+0.1760   +0.5724   +0.0587   +0.1929   
-+0.3036   +0.2347   +0.3444   +0.1173   
-+0.1760   +0.3858   +0.0587   +0.3795   
+[0] P-matrix for branch length 1.000000
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
 
-+0.5365   +0.2407   +0.1024   +0.1204   
-+0.1805   +0.5641   +0.0602   +0.1951   
-+0.3073   +0.2407   +0.3316   +0.1204   
-+0.1805   +0.3903   +0.0602   +0.3690   
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
 
-+0.5281   +0.2457   +0.1034   +0.1228   
-+0.1843   +0.5575   +0.0614   +0.1969   
-+0.3102   +0.2457   +0.3213   +0.1228   
-+0.1843   +0.3937   +0.0614   +0.3606   
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
 
-+0.5202   +0.2503   +0.1043   +0.1252   
-+0.1878   +0.5513   +0.0626   +0.1984   
-+0.3128   +0.2503   +0.3117   +0.1252   
-+0.1878   +0.3968   +0.0626   +0.3529   
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
 
-+0.5121   +0.2552   +0.1051   +0.1276   
-+0.1914   +0.5449   +0.0638   +0.1999   
-+0.3153   +0.2552   +0.3019   +0.1276   
-+0.1914   +0.3998   +0.0638   +0.3450   
++1.0000   +0.0000   +0.0000   +0.0000   
++0.0000   +1.0000   +0.0000   +0.0000   
++0.0000   +0.0000   +1.0000   +0.0000   
++0.0000   +0.0000   +0.0000   +1.0000   
 
-+0.5024   +0.2610   +0.1061   +0.1305   
-+0.1958   +0.5374   +0.0653   +0.2016   
-+0.3182   +0.2610   +0.2903   +0.1305   
-+0.1958   +0.4032   +0.0653   +0.3358   
++0.9999   +0.0001   +0.0000   +0.0000   
++0.0000   +0.9999   +0.0000   +0.0001   
++0.0001   +0.0001   +0.9998   +0.0000   
++0.0000   +0.0002   +0.0000   +0.9998   
 
-+0.4849   +0.2717   +0.1076   +0.1358   
-+0.2037   +0.5240   +0.0679   +0.2043   
-+0.3227   +0.2717   +0.2698   +0.1358   
-+0.2037   +0.4087   +0.0679   +0.3197   
++0.9993   +0.0003   +0.0002   +0.0002   
++0.0003   +0.9992   +0.0001   +0.0004   
++0.0006   +0.0003   +0.9988   +0.0002   
++0.0003   +0.0009   +0.0001   +0.9988   
 
++0.9970   +0.0014   +0.0009   +0.0007   
++0.0011   +0.9968   +0.0004   +0.0018   
++0.0027   +0.0014   +0.9952   +0.0007   
++0.0011   +0.0036   +0.0004   +0.9950   
 
-[8] P-matrix for branch length 1.000000
-+0.5663   +0.2233   +0.0986   +0.1117   
-+0.1675   +0.5883   +0.0558   +0.1883   
-+0.2959   +0.2233   +0.3691   +0.1117   
-+0.1675   +0.3767   +0.0558   +0.4000   
++0.9894   +0.0050   +0.0031   +0.0025   
++0.0037   +0.9888   +0.0012   +0.0062   
++0.0093   +0.0050   +0.9832   +0.0025   
++0.0037   +0.0124   +0.0012   +0.9826   
 
-+0.5468   +0.2347   +0.1012   +0.1173   
-+0.1760   +0.5724   +0.0587   +0.1929   
-+0.3036   +0.2347   +0.3444   +0.1173   
-+0.1760   +0.3858   +0.0587   +0.3795   
++0.9683   +0.0150   +0.0092   +0.0075   
++0.0112   +0.9667   +0.0037   +0.0183   
++0.0276   +0.0150   +0.9499   +0.0075   
++0.0112   +0.0367   +0.0037   +0.9483   
 
-+0.5365   +0.2407   +0.1024   +0.1204   
-+0.1805   +0.5641   +0.0602   +0.1951   
-+0.3073   +0.2407   +0.3316   +0.1204   
-+0.1805   +0.3903   +0.0602   +0.3690   
++0.9168   +0.0397   +0.0236   +0.0198   
++0.0298   +0.9135   +0.0099   +0.0468   
++0.0708   +0.0397   +0.8696   +0.0198   
++0.0298   +0.0936   +0.0099   +0.8667   
 
-+0.5281   +0.2457   +0.1034   +0.1228   
-+0.1843   +0.5575   +0.0614   +0.1969   
-+0.3102   +0.2457   +0.3213   +0.1228   
-+0.1843   +0.3937   +0.0614   +0.3606   
++0.8102   +0.0924   +0.0512   +0.0462   
++0.0693   +0.8073   +0.0231   +0.1002   
++0.1535   +0.0924   +0.7079   +0.0462   
++0.0693   +0.2004   +0.0231   +0.7071   
 
-+0.5202   +0.2503   +0.1043   +0.1252   
-+0.1878   +0.5513   +0.0626   +0.1984   
-+0.3128   +0.2503   +0.3117   +0.1252   
-+0.1878   +0.3968   +0.0626   +0.3529   
++0.6340   +0.1853   +0.0881   +0.0926   
++0.1390   +0.6454   +0.0463   +0.1694   
++0.2644   +0.1853   +0.4577   +0.0926   
++0.1390   +0.3387   +0.0463   +0.4760   
 
-+0.5121   +0.2552   +0.1051   +0.1276   
-+0.1914   +0.5449   +0.0638   +0.1999   
-+0.3153   +0.2552   +0.3019   +0.1276   
-+0.1914   +0.3998   +0.0638   +0.3450   
++0.4334   +0.3041   +0.1105   +0.1520   
++0.2281   +0.4861   +0.0760   +0.2099   
++0.3316   +0.3041   +0.2123   +0.1520   
++0.2281   +0.4197   +0.0760   +0.2762   
 
-+0.5024   +0.2610   +0.1061   +0.1305   
-+0.1958   +0.5374   +0.0653   +0.2016   
-+0.3182   +0.2610   +0.2903   +0.1305   
-+0.1958   +0.4032   +0.0653   +0.3358   
++0.3169   +0.3860   +0.1041   +0.1930   
++0.2895   +0.4099   +0.0965   +0.2041   
++0.3122   +0.3860   +0.1088   +0.1930   
++0.2895   +0.4082   +0.0965   +0.2058   
 
-+0.4849   +0.2717   +0.1076   +0.1358   
-+0.2037   +0.5240   +0.0679   +0.2043   
-+0.3227   +0.2717   +0.2698   +0.1358   
-+0.2037   +0.4087   +0.0679   +0.3197   
++0.3000   +0.4000   +0.1000   +0.2000   
++0.3000   +0.4000   +0.1000   +0.2000   
++0.3000   +0.4000   +0.1000   +0.2000   
++0.3000   +0.4000   +0.1000   +0.2000   
 
 
-[8] CLV 5: [ {(0.05457,0.09938,0.00814,0.11671),(0.05818,0.10518,0.00934,0.12296),(0.06016,0.10834,0.01005,0.12633),(0.06181,0.11094,0.01066,0.12909),(0.06339,0.11341,0.01127,0.13169),(0.06507,0.11601,0.01193,0.13441),(0.06712,0.11915,0.01278,0.13768),(0.07101,0.12500,0.01447,0.14370)} {(0.76494,0.00205,0.01097,0.00205),(0.74917,0.00236,0.01250,0.00236),(0.74047,0.00255,0.01339,0.00255),(0.73320,0.00271,0.01416,0.00271),(0.72625,0.00287,0.01491,0.00287),(0.71885,0.00304,0.01573,0.00304), [...]
-[8] CLV 6: [ {(0.04905,0.00444,0.00161,0.00512),(0.05182,0.00505,0.00195,0.00578),(0.05332,0.00540,0.00217,0.00616),(0.05455,0.00570,0.00235,0.00648),(0.05572,0.00599,0.00254,0.00680),(0.05694,0.00631,0.00276,0.00715),(0.05841,0.00671,0.00304,0.00758),(0.06113,0.00750,0.00361,0.00842)} {(0.02495,0.00030,0.04284,0.00030),(0.02595,0.00035,0.04492,0.00035),(0.02647,0.00037,0.04601,0.00037),(0.02688,0.00039,0.04690,0.00039),(0.02726,0.00042,0.04772,0.00042),(0.02764,0.00044,0.04857,0.00044), [...]
-[8] CLV 7: [ {(0.00364,0.75829,0.00364,0.01898),(0.00420,0.74261,0.00420,0.02159),(0.00453,0.73398,0.00453,0.02310),(0.00481,0.72680,0.00481,0.02440),(0.00510,0.71994,0.00510,0.02567),(0.00541,0.71266,0.00541,0.02706),(0.00581,0.70378,0.00581,0.02881),(0.00662,0.68700,0.00662,0.03226)} {(0.00122,0.00023,0.64768,0.00023),(0.00139,0.00026,0.62568,0.00026),(0.00149,0.00028,0.61364,0.00028),(0.00157,0.00030,0.60365,0.00030),(0.00166,0.00032,0.59413,0.00032),(0.00175,0.00034,0.58405,0.00034), [...]
+[0] CLV 5: [ {(0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000),(0.00001,0.00003,0.00000,0.00003),(0.00007,0.00014,0.00000,0.00017),(0.00029,0.00057,0.00000,0.00072),(0.00100,0.00200,0.00000,0.00249),(0.00303,0.00603,0.00002,0.00752),(0.00816,0.01612,0.00016,0.01998),(0.01981,0.03839,0.00098,0.04698),(0.04332,0.08059,0.00497,0.09597),(0.08409,0.14374,0.02116,0.16230),(0 [...]
+[0] CLV 6: [ {(0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000),(0.00001,0.00000,0.00000,0.00000),(0.00007,0.00000,0.00000,0.00000),(0.00029,0.00000,0.00000,0.00000),(0.00100,0.00000,0.00000,0.00000),(0.00302,0.00001,0.00000,0.00002),(0.00806,0.00010,0.00001,0.00012),(0.01916,0.00059,0.00007,0.00071),(0.03996,0.00280,0.00079,0.00328),(0.06960,0.01050,0.00609,0.01155),(0 [...]
+[0] CLV 7: [ {(0.00000,1.00000,0.00000,0.00000),(0.00000,1.00000,0.00000,0.00000),(0.00000,1.00000,0.00000,0.00000),(0.00000,1.00000,0.00000,0.00000),(0.00000,0.99999,0.00000,0.00000),(0.00000,0.99994,0.00000,0.00000),(0.00000,0.99969,0.00000,0.00000),(0.00000,0.99871,0.00000,0.00000),(0.00000,0.99550,0.00000,0.00001),(0.00001,0.98637,0.00001,0.00006),(0.00007,0.96335,0.00007,0.00042),(0.00042,0.91138,0.00042,0.00247),(0.00219,0.80752,0.00219,0.01192),(0.00987,0.63070,0.00987,0.04534),(0 [...]
 
 
- TEST alpha(ncats) =   0.10(16)
+ TEST alpha(ncats) =   0.10(16), mode = MEDIAN
 
 0.000000 0.000000 0.000000 0.000002 0.000022 0.000158 0.000811 0.003322 0.011457 0.034574 0.093906 0.235077 0.555280 1.276266 3.031672 10.757454 
 [0] P-matrix for branch length 0.100000
@@ -3612,7 +7224,343 @@
 [0] CLV 7: [ {(0.00000,1.00000,0.00000,0.00000),(0.00000,1.00000,0.00000,0.00000),(0.00000,1.00000,0.00000,0.00000),(0.00000,1.00000,0.00000,0.00000),(0.00000,0.99999,0.00000,0.00000),(0.00000,0.99994,0.00000,0.00000),(0.00000,0.99972,0.00000,0.00000),(0.00000,0.99884,0.00000,0.00000),(0.00000,0.99601,0.00000,0.00000),(0.00001,0.98802,0.00001,0.00004),(0.00005,0.96792,0.00005,0.00032),(0.00032,0.92239,0.00032,0.00189),(0.00167,0.82992,0.00167,0.00926),(0.00771,0.66633,0.00771,0.03680),(0 [...]
 
 
- TEST alpha(ncats) =   0.50(16)
+ TEST alpha(ncats) =   0.50(16), mode = MEAN
+
+0.001597 0.014430 0.040418 0.080229 0.134935 0.206118 0.296026 0.407843 0.546137 0.717626 0.932625 1.207965 1.573685 2.091393 2.922296 4.826677 
+[1] P-matrix for branch length 0.100000
++0.9999   +0.0001   +0.0000   +0.0000   
++0.0000   +0.9999   +0.0000   +0.0001   
++0.0001   +0.0001   +0.9998   +0.0000   
++0.0000   +0.0002   +0.0000   +0.9998   
+
++0.9988   +0.0006   +0.0003   +0.0003   
++0.0004   +0.9987   +0.0001   +0.0007   
++0.0010   +0.0006   +0.9981   +0.0003   
++0.0004   +0.0014   +0.0001   +0.9980   
+
++0.9967   +0.0016   +0.0010   +0.0008   
++0.0012   +0.9965   +0.0004   +0.0020   
++0.0029   +0.0016   +0.9947   +0.0008   
++0.0012   +0.0039   +0.0004   +0.9945   
+
++0.9934   +0.0031   +0.0019   +0.0016   
++0.0023   +0.9930   +0.0008   +0.0039   
++0.0058   +0.0031   +0.9895   +0.0016   
++0.0023   +0.0077   +0.0008   +0.9892   
+
++0.9890   +0.0052   +0.0032   +0.0026   
++0.0039   +0.9883   +0.0013   +0.0065   
++0.0097   +0.0052   +0.9825   +0.0026   
++0.0039   +0.0129   +0.0013   +0.9819   
+
++0.9832   +0.0079   +0.0049   +0.0040   
++0.0059   +0.9823   +0.0020   +0.0098   
++0.0147   +0.0079   +0.9734   +0.0040   
++0.0059   +0.0196   +0.0020   +0.9725   
+
++0.9760   +0.0113   +0.0070   +0.0057   
++0.0085   +0.9747   +0.0028   +0.0139   
++0.0210   +0.0113   +0.9620   +0.0057   
++0.0085   +0.0279   +0.0028   +0.9608   
+
++0.9672   +0.0155   +0.0095   +0.0078   
++0.0116   +0.9655   +0.0039   +0.0190   
++0.0286   +0.0155   +0.9481   +0.0078   
++0.0116   +0.0380   +0.0039   +0.9465   
+
++0.9564   +0.0207   +0.0126   +0.0103   
++0.0155   +0.9543   +0.0052   +0.0251   
++0.0378   +0.0207   +0.9313   +0.0103   
++0.0155   +0.0501   +0.0052   +0.9292   
+
++0.9433   +0.0269   +0.0163   +0.0135   
++0.0202   +0.9407   +0.0067   +0.0324   
++0.0488   +0.0269   +0.9108   +0.0135   
++0.0202   +0.0647   +0.0067   +0.9084   
+
++0.9273   +0.0346   +0.0207   +0.0173   
++0.0260   +0.9242   +0.0087   +0.0411   
++0.0622   +0.0346   +0.8859   +0.0173   
++0.0260   +0.0823   +0.0087   +0.8831   
+
++0.9074   +0.0443   +0.0262   +0.0221   
++0.0332   +0.9039   +0.0111   +0.0518   
++0.0785   +0.0443   +0.8551   +0.0221   
++0.0332   +0.1037   +0.0111   +0.8521   
+
++0.8820   +0.0567   +0.0330   +0.0283   
++0.0425   +0.8782   +0.0142   +0.0651   
++0.0989   +0.0567   +0.8161   +0.0283   
++0.0425   +0.1302   +0.0142   +0.8131   
+
++0.8480   +0.0735   +0.0418   +0.0368   
++0.0551   +0.8443   +0.0184   +0.0822   
++0.1253   +0.0735   +0.7644   +0.0368   
++0.0551   +0.1644   +0.0184   +0.7621   
+
++0.7976   +0.0988   +0.0542   +0.0494   
++0.0741   +0.7952   +0.0247   +0.1060   
++0.1625   +0.0988   +0.6893   +0.0494   
++0.0741   +0.2119   +0.0247   +0.6893   
+
++0.6998   +0.1497   +0.0758   +0.0748   
++0.1122   +0.7037   +0.0374   +0.1466   
++0.2273   +0.1497   +0.5482   +0.0748   
++0.1122   +0.2932   +0.0374   +0.5571   
+
+
+[1] P-matrix for branch length 0.200000
++0.9997   +0.0001   +0.0001   +0.0001   
++0.0001   +0.9997   +0.0000   +0.0002   
++0.0002   +0.0001   +0.9996   +0.0001   
++0.0001   +0.0003   +0.0000   +0.9996   
+
++0.9976   +0.0011   +0.0007   +0.0006   
++0.0008   +0.9975   +0.0003   +0.0014   
++0.0021   +0.0011   +0.9962   +0.0006   
++0.0008   +0.0028   +0.0003   +0.9961   
+
++0.9934   +0.0031   +0.0019   +0.0016   
++0.0023   +0.9930   +0.0008   +0.0039   
++0.0058   +0.0031   +0.9895   +0.0016   
++0.0023   +0.0078   +0.0008   +0.9891   
+
++0.9869   +0.0062   +0.0038   +0.0031   
++0.0046   +0.9862   +0.0015   +0.0077   
++0.0115   +0.0062   +0.9792   +0.0031   
++0.0046   +0.0153   +0.0015   +0.9785   
+
++0.9781   +0.0103   +0.0064   +0.0052   
++0.0078   +0.9769   +0.0026   +0.0127   
++0.0192   +0.0103   +0.9653   +0.0052   
++0.0078   +0.0255   +0.0026   +0.9642   
+
++0.9668   +0.0157   +0.0096   +0.0078   
++0.0118   +0.9651   +0.0039   +0.0192   
++0.0289   +0.0157   +0.9476   +0.0078   
++0.0118   +0.0384   +0.0039   +0.9460   
+
++0.9529   +0.0223   +0.0136   +0.0112   
++0.0168   +0.9506   +0.0056   +0.0270   
++0.0408   +0.0223   +0.9257   +0.0112   
++0.0168   +0.0541   +0.0056   +0.9236   
+
++0.9360   +0.0305   +0.0183   +0.0152   
++0.0228   +0.9331   +0.0076   +0.0364   
++0.0550   +0.0305   +0.8993   +0.0152   
++0.0228   +0.0728   +0.0076   +0.8967   
+
++0.9157   +0.0402   +0.0239   +0.0201   
++0.0302   +0.9123   +0.0101   +0.0474   
++0.0718   +0.0402   +0.8679   +0.0201   
++0.0302   +0.0948   +0.0101   +0.8649   
+
++0.8915   +0.0520   +0.0305   +0.0260   
++0.0390   +0.8878   +0.0130   +0.0602   
++0.0914   +0.0520   +0.8306   +0.0260   
++0.0390   +0.1204   +0.0130   +0.8276   
+
++0.8626   +0.0663   +0.0380   +0.0331   
++0.0497   +0.8588   +0.0166   +0.0750   
++0.1141   +0.0663   +0.7865   +0.0331   
++0.0497   +0.1499   +0.0166   +0.7838   
+
++0.8277   +0.0836   +0.0469   +0.0418   
++0.0627   +0.8244   +0.0209   +0.0920   
++0.1406   +0.0836   +0.7340   +0.0418   
++0.0627   +0.1840   +0.0209   +0.7324   
+
++0.7848   +0.1053   +0.0572   +0.0527   
++0.0790   +0.7830   +0.0263   +0.1117   
++0.1715   +0.1053   +0.6705   +0.0527   
++0.0790   +0.2234   +0.0263   +0.6713   
+
++0.7304   +0.1335   +0.0694   +0.0668   
++0.1001   +0.7318   +0.0334   +0.1347   
++0.2082   +0.1335   +0.5916   +0.0668   
++0.1001   +0.2695   +0.0334   +0.5970   
+
++0.6560   +0.1732   +0.0842   +0.0866   
++0.1299   +0.6646   +0.0433   +0.1622   
++0.2526   +0.1732   +0.4876   +0.0866   
++0.1299   +0.3244   +0.0433   +0.5024   
+
++0.5321   +0.2433   +0.1029   +0.1217   
++0.1825   +0.5606   +0.0608   +0.1961   
++0.3088   +0.2433   +0.3262   +0.1217   
++0.1825   +0.3921   +0.0608   +0.3646   
+
+
+[1] P-matrix for branch length 1.000000
++0.9987   +0.0006   +0.0004   +0.0003   
++0.0005   +0.9986   +0.0002   +0.0008   
++0.0012   +0.0006   +0.9979   +0.0003   
++0.0005   +0.0015   +0.0002   +0.9978   
+
++0.9882   +0.0056   +0.0035   +0.0028   
++0.0042   +0.9875   +0.0014   +0.0069   
++0.0104   +0.0056   +0.9813   +0.0028   
++0.0042   +0.0138   +0.0014   +0.9806   
+
++0.9675   +0.0154   +0.0094   +0.0077   
++0.0115   +0.9658   +0.0038   +0.0188   
++0.0283   +0.0154   +0.9486   +0.0077   
++0.0115   +0.0376   +0.0038   +0.9470   
+
++0.9370   +0.0300   +0.0181   +0.0150   
++0.0225   +0.9342   +0.0075   +0.0359   
++0.0542   +0.0300   +0.9009   +0.0150   
++0.0225   +0.0717   +0.0075   +0.8983   
+
++0.8975   +0.0491   +0.0289   +0.0246   
++0.0368   +0.8938   +0.0123   +0.0571   
++0.0866   +0.0491   +0.8398   +0.0246   
++0.0368   +0.1142   +0.0123   +0.8367   
+
++0.8499   +0.0725   +0.0413   +0.0363   
++0.0544   +0.8462   +0.0181   +0.0812   
++0.1239   +0.0725   +0.7673   +0.0363   
++0.0544   +0.1625   +0.0181   +0.7650   
+
++0.7954   +0.0999   +0.0547   +0.0500   
++0.0749   +0.7931   +0.0250   +0.1070   
++0.1641   +0.0999   +0.6861   +0.0500   
++0.0749   +0.2139   +0.0250   +0.6862   
+
++0.7355   +0.1308   +0.0683   +0.0654   
++0.0981   +0.7366   +0.0327   +0.1326   
++0.2048   +0.1308   +0.5990   +0.0654   
++0.0981   +0.2653   +0.0327   +0.6039   
+
++0.6718   +0.1646   +0.0812   +0.0823   
++0.1235   +0.6786   +0.0412   +0.1567   
++0.2437   +0.1646   +0.5094   +0.0823   
++0.1235   +0.3135   +0.0412   +0.5219   
+
++0.6062   +0.2007   +0.0927   +0.1004   
++0.1505   +0.6216   +0.0502   +0.1777   
++0.2782   +0.2007   +0.4207   +0.1004   
++0.1505   +0.3554   +0.0502   +0.4438   
+
++0.5407   +0.2383   +0.1019   +0.1191   
++0.1787   +0.5675   +0.0596   +0.1942   
++0.3058   +0.2383   +0.3368   +0.1191   
++0.1787   +0.3885   +0.0596   +0.3732   
+
++0.4776   +0.2762   +0.1081   +0.1381   
++0.2071   +0.5184   +0.0690   +0.2054   
++0.3244   +0.2762   +0.2613   +0.1381   
++0.2071   +0.4107   +0.0690   +0.3131   
+
++0.4193   +0.3132   +0.1109   +0.1566   
++0.2349   +0.4762   +0.0783   +0.2106   
++0.3326   +0.3132   +0.1976   +0.1566   
++0.2349   +0.4213   +0.0783   +0.2655   
+
++0.3688   +0.3475   +0.1100   +0.1737   
++0.2606   +0.4420   +0.0869   +0.2105   
++0.3300   +0.3475   +0.1488   +0.1737   
++0.2606   +0.4209   +0.0869   +0.2316   
+
++0.3290   +0.3766   +0.1061   +0.1883   
++0.2824   +0.4171   +0.0941   +0.2063   
++0.3184   +0.3766   +0.1168   +0.1883   
++0.2824   +0.4126   +0.0941   +0.2109   
+
++0.3043   +0.3963   +0.1012   +0.1982   
++0.2972   +0.4025   +0.0991   +0.2012   
++0.3037   +0.3963   +0.1018   +0.1982   
++0.2972   +0.4024   +0.0991   +0.2013   
+
+
+[1] P-matrix for branch length 1.000000
++0.9987   +0.0006   +0.0004   +0.0003   
++0.0005   +0.9986   +0.0002   +0.0008   
++0.0012   +0.0006   +0.9979   +0.0003   
++0.0005   +0.0015   +0.0002   +0.9978   
+
++0.9882   +0.0056   +0.0035   +0.0028   
++0.0042   +0.9875   +0.0014   +0.0069   
++0.0104   +0.0056   +0.9813   +0.0028   
++0.0042   +0.0138   +0.0014   +0.9806   
+
++0.9675   +0.0154   +0.0094   +0.0077   
++0.0115   +0.9658   +0.0038   +0.0188   
++0.0283   +0.0154   +0.9486   +0.0077   
++0.0115   +0.0376   +0.0038   +0.9470   
+
++0.9370   +0.0300   +0.0181   +0.0150   
++0.0225   +0.9342   +0.0075   +0.0359   
++0.0542   +0.0300   +0.9009   +0.0150   
++0.0225   +0.0717   +0.0075   +0.8983   
+
++0.8975   +0.0491   +0.0289   +0.0246   
++0.0368   +0.8938   +0.0123   +0.0571   
++0.0866   +0.0491   +0.8398   +0.0246   
++0.0368   +0.1142   +0.0123   +0.8367   
+
++0.8499   +0.0725   +0.0413   +0.0363   
++0.0544   +0.8462   +0.0181   +0.0812   
++0.1239   +0.0725   +0.7673   +0.0363   
++0.0544   +0.1625   +0.0181   +0.7650   
+
++0.7954   +0.0999   +0.0547   +0.0500   
++0.0749   +0.7931   +0.0250   +0.1070   
++0.1641   +0.0999   +0.6861   +0.0500   
++0.0749   +0.2139   +0.0250   +0.6862   
+
++0.7355   +0.1308   +0.0683   +0.0654   
++0.0981   +0.7366   +0.0327   +0.1326   
++0.2048   +0.1308   +0.5990   +0.0654   
++0.0981   +0.2653   +0.0327   +0.6039   
+
++0.6718   +0.1646   +0.0812   +0.0823   
++0.1235   +0.6786   +0.0412   +0.1567   
++0.2437   +0.1646   +0.5094   +0.0823   
++0.1235   +0.3135   +0.0412   +0.5219   
+
++0.6062   +0.2007   +0.0927   +0.1004   
++0.1505   +0.6216   +0.0502   +0.1777   
++0.2782   +0.2007   +0.4207   +0.1004   
++0.1505   +0.3554   +0.0502   +0.4438   
+
++0.5407   +0.2383   +0.1019   +0.1191   
++0.1787   +0.5675   +0.0596   +0.1942   
++0.3058   +0.2383   +0.3368   +0.1191   
++0.1787   +0.3885   +0.0596   +0.3732   
+
++0.4776   +0.2762   +0.1081   +0.1381   
++0.2071   +0.5184   +0.0690   +0.2054   
++0.3244   +0.2762   +0.2613   +0.1381   
++0.2071   +0.4107   +0.0690   +0.3131   
+
++0.4193   +0.3132   +0.1109   +0.1566   
++0.2349   +0.4762   +0.0783   +0.2106   
++0.3326   +0.3132   +0.1976   +0.1566   
++0.2349   +0.4213   +0.0783   +0.2655   
+
++0.3688   +0.3475   +0.1100   +0.1737   
++0.2606   +0.4420   +0.0869   +0.2105   
++0.3300   +0.3475   +0.1488   +0.1737   
++0.2606   +0.4209   +0.0869   +0.2316   
+
++0.3290   +0.3766   +0.1061   +0.1883   
++0.2824   +0.4171   +0.0941   +0.2063   
++0.3184   +0.3766   +0.1168   +0.1883   
++0.2824   +0.4126   +0.0941   +0.2109   
+
++0.3043   +0.3963   +0.1012   +0.1982   
++0.2972   +0.4025   +0.0991   +0.2012   
++0.3037   +0.3963   +0.1018   +0.1982   
++0.2972   +0.4024   +0.0991   +0.2013   
+
+
+[1] CLV 5: [ {(0.00012,0.00025,0.00000,0.00031),(0.00112,0.00223,0.00000,0.00279),(0.00311,0.00619,0.00002,0.00772),(0.00612,0.01213,0.00009,0.01506),(0.01017,0.02002,0.00025,0.02476),(0.01530,0.02987,0.00058,0.03673),(0.02154,0.04163,0.00116,0.05085),(0.02897,0.05529,0.00214,0.06697),(0.03766,0.07080,0.00370,0.08488),(0.04774,0.08808,0.00611,0.10433),(0.05935,0.10705,0.00976,0.12496),(0.07272,0.12754,0.01526,0.14628),(0.08820,0.14931,0.02361,0.16761),(0.10641,0.17186,0.03670,0.18787),(0 [...]
+[1] CLV 6: [ {(0.00012,0.00000,0.00000,0.00000),(0.00112,0.00000,0.00000,0.00000),(0.00310,0.00001,0.00000,0.00002),(0.00606,0.00006,0.00000,0.00007),(0.01000,0.00016,0.00001,0.00019),(0.01491,0.00035,0.00003,0.00043),(0.02077,0.00070,0.00009,0.00084),(0.02753,0.00126,0.00023,0.00150),(0.03517,0.00212,0.00052,0.00251),(0.04360,0.00340,0.00107,0.00396),(0.05271,0.00525,0.00208,0.00600),(0.06230,0.00787,0.00389,0.00881),(0.07204,0.01154,0.00707,0.01262),(0.08129,0.01673,0.01268,0.01782),(0 [...]
+[1] CLV 7: [ {(0.00000,0.99944,0.00000,0.00000),(0.00000,0.99497,0.00000,0.00001),(0.00001,0.98601,0.00001,0.00006),(0.00004,0.97250,0.00004,0.00023),(0.00011,0.95437,0.00011,0.00065),(0.00025,0.93148,0.00025,0.00147),(0.00050,0.90367,0.00050,0.00292),(0.00093,0.87074,0.00093,0.00530),(0.00162,0.83236,0.00162,0.00899),(0.00271,0.78815,0.00271,0.01449),(0.00439,0.73752,0.00439,0.02247),(0.00699,0.67960,0.00699,0.03385),(0.01109,0.61305,0.01109,0.04991),(0.01782,0.53547,0.01782,0.07262),(0 [...]
+
+
+ TEST alpha(ncats) =   0.50(16), mode = MEDIAN
 
 0.002048 0.014396 0.039400 0.077707 0.130352 0.198858 0.285400 0.393054 0.526241 0.691473 0.898778 1.164582 1.518420 2.021781 2.842245 5.195265 
 [1] P-matrix for branch length 0.100000
@@ -3932,23 +7880,359 @@
 +0.3308   +0.3438   +0.1535   +0.1719   
 +0.2579   +0.4215   +0.0860   +0.2347   
 
-+0.3315   +0.3747   +0.1065   +0.1873   
-+0.2810   +0.4186   +0.0937   +0.2067   
-+0.3194   +0.3747   +0.1186   +0.1873   
-+0.2810   +0.4134   +0.0937   +0.2120   
++0.3315   +0.3747   +0.1065   +0.1873   
++0.2810   +0.4186   +0.0937   +0.2067   
++0.3194   +0.3747   +0.1186   +0.1873   
++0.2810   +0.4134   +0.0937   +0.2120   
+
++0.3030   +0.3974   +0.1009   +0.1987   
++0.2981   +0.4017   +0.0994   +0.2008   
++0.3027   +0.3974   +0.1012   +0.1987   
++0.2981   +0.4017   +0.0994   +0.2009   
+
+
+[1] CLV 5: [ {(0.00016,0.00032,0.00000,0.00040),(0.00111,0.00223,0.00000,0.00278),(0.00303,0.00604,0.00002,0.00752),(0.00593,0.01176,0.00008,0.01460),(0.00984,0.01937,0.00024,0.02397),(0.01478,0.02889,0.00054,0.03554),(0.02082,0.04028,0.00108,0.04924),(0.02801,0.05355,0.00199,0.06492),(0.03645,0.06866,0.00345,0.08243),(0.04625,0.08557,0.00571,0.10154),(0.05759,0.10424,0.00914,0.12196),(0.07071,0.12457,0.01434,0.14326),(0.08602,0.14637,0.02229,0.16482),(0.10419,0.16930,0.03489,0.18568),(0 [...]
+[1] CLV 6: [ {(0.00016,0.00000,0.00000,0.00000),(0.00111,0.00000,0.00000,0.00000),(0.00302,0.00001,0.00000,0.00002),(0.00588,0.00005,0.00000,0.00007),(0.00968,0.00015,0.00001,0.00018),(0.01442,0.00033,0.00003,0.00040),(0.02009,0.00065,0.00009,0.00079),(0.02667,0.00117,0.00021,0.00141),(0.03412,0.00199,0.00047,0.00235),(0.04239,0.00320,0.00097,0.00373),(0.05137,0.00495,0.00189,0.00567),(0.06093,0.00744,0.00356,0.00836),(0.07076,0.01098,0.00654,0.01205),(0.08030,0.01605,0.01187,0.01714),(0 [...]
+[1] CLV 7: [ {(0.00000,0.99928,0.00000,0.00000),(0.00000,0.99499,0.00000,0.00001),(0.00001,0.98636,0.00001,0.00006),(0.00004,0.97335,0.00004,0.00022),(0.00010,0.95587,0.00010,0.00061),(0.00023,0.93377,0.00023,0.00137),(0.00047,0.90690,0.00047,0.00273),(0.00086,0.87499,0.00086,0.00496),(0.00151,0.83773,0.00151,0.00842),(0.00253,0.79466,0.00253,0.01360),(0.00410,0.74516,0.00410,0.02115),(0.00655,0.68825,0.00655,0.03200),(0.01043,0.62243,0.01043,0.04745),(0.01687,0.54492,0.01687,0.06963),(0 [...]
+
+
+ TEST alpha(ncats) =   0.75(16), mode = MEAN
+
+0.012120 0.053344 0.107800 0.173412 0.250055 0.338481 0.440148 0.557304 0.693259 0.852915 1.043796 1.278129 1.577630 1.986573 2.620010 4.015024 
+[2] P-matrix for branch length 0.100000
++0.9990   +0.0005   +0.0003   +0.0002   
++0.0004   +0.9989   +0.0001   +0.0006   
++0.0009   +0.0005   +0.9984   +0.0002   
++0.0004   +0.0012   +0.0001   +0.9984   
+
++0.9956   +0.0021   +0.0013   +0.0010   
++0.0015   +0.9954   +0.0005   +0.0026   
++0.0039   +0.0021   +0.9930   +0.0010   
++0.0015   +0.0052   +0.0005   +0.9928   
+
++0.9912   +0.0042   +0.0026   +0.0021   
++0.0031   +0.9907   +0.0010   +0.0052   
++0.0078   +0.0042   +0.9860   +0.0021   
++0.0031   +0.0103   +0.0010   +0.9855   
+
++0.9858   +0.0067   +0.0041   +0.0033   
++0.0050   +0.9851   +0.0017   +0.0083   
++0.0124   +0.0067   +0.9776   +0.0033   
++0.0050   +0.0165   +0.0017   +0.9768   
+
++0.9797   +0.0096   +0.0059   +0.0048   
++0.0072   +0.9786   +0.0024   +0.0118   
++0.0178   +0.0096   +0.9678   +0.0048   
++0.0072   +0.0237   +0.0024   +0.9667   
+
++0.9726   +0.0129   +0.0080   +0.0065   
++0.0097   +0.9712   +0.0032   +0.0159   
++0.0239   +0.0129   +0.9567   +0.0065   
++0.0097   +0.0317   +0.0032   +0.9553   
+
++0.9647   +0.0167   +0.0102   +0.0084   
++0.0125   +0.9629   +0.0042   +0.0204   
++0.0307   +0.0167   +0.9442   +0.0084   
++0.0125   +0.0408   +0.0042   +0.9424   
+
++0.9556   +0.0211   +0.0128   +0.0105   
++0.0158   +0.9534   +0.0053   +0.0255   
++0.0385   +0.0211   +0.9299   +0.0105   
++0.0158   +0.0511   +0.0053   +0.9278   
+
++0.9452   +0.0260   +0.0158   +0.0130   
++0.0195   +0.9426   +0.0065   +0.0313   
++0.0473   +0.0260   +0.9137   +0.0130   
++0.0195   +0.0627   +0.0065   +0.9113   
+
++0.9332   +0.0318   +0.0191   +0.0159   
++0.0238   +0.9303   +0.0079   +0.0379   
++0.0573   +0.0318   +0.8950   +0.0159   
++0.0238   +0.0759   +0.0079   +0.8923   
+
++0.9192   +0.0385   +0.0230   +0.0193   
++0.0289   +0.9159   +0.0096   +0.0455   
++0.0689   +0.0385   +0.8733   +0.0193   
++0.0289   +0.0911   +0.0096   +0.8704   
+
++0.9025   +0.0467   +0.0275   +0.0233   
++0.0350   +0.8989   +0.0117   +0.0545   
++0.0825   +0.0467   +0.8474   +0.0233   
++0.0350   +0.1089   +0.0117   +0.8444   
+
++0.8818   +0.0568   +0.0330   +0.0284   
++0.0426   +0.8780   +0.0142   +0.0652   
++0.0991   +0.0568   +0.8157   +0.0284   
++0.0426   +0.1305   +0.0142   +0.8127   
+
++0.8547   +0.0702   +0.0401   +0.0351   
++0.0526   +0.8510   +0.0175   +0.0789   
++0.1202   +0.0702   +0.7745   +0.0351   
++0.0526   +0.1578   +0.0175   +0.7721   
+
++0.8153   +0.0898   +0.0499   +0.0449   
++0.0674   +0.8124   +0.0225   +0.0978   
++0.1497   +0.0898   +0.7155   +0.0449   
++0.0674   +0.1956   +0.0225   +0.7145   
+
++0.7387   +0.1291   +0.0676   +0.0646   
++0.0968   +0.7395   +0.0323   +0.1314   
++0.2028   +0.1291   +0.6035   +0.0646   
++0.0968   +0.2627   +0.0323   +0.6082   
+
+
+[2] P-matrix for branch length 0.200000
++0.9980   +0.0009   +0.0006   +0.0005   
++0.0007   +0.9979   +0.0002   +0.0012   
++0.0018   +0.0009   +0.9968   +0.0005   
++0.0007   +0.0023   +0.0002   +0.9967   
+
++0.9913   +0.0041   +0.0026   +0.0021   
++0.0031   +0.9908   +0.0010   +0.0051   
++0.0077   +0.0041   +0.9861   +0.0021   
++0.0031   +0.0102   +0.0010   +0.9856   
+
++0.9824   +0.0083   +0.0051   +0.0041   
++0.0062   +0.9815   +0.0021   +0.0102   
++0.0154   +0.0083   +0.9722   +0.0041   
++0.0062   +0.0205   +0.0021   +0.9712   
+
++0.9720   +0.0132   +0.0081   +0.0066   
++0.0099   +0.9705   +0.0033   +0.0162   
++0.0244   +0.0132   +0.9557   +0.0066   
++0.0099   +0.0325   +0.0033   +0.9543   
+
++0.9600   +0.0190   +0.0116   +0.0095   
++0.0142   +0.9580   +0.0047   +0.0231   
++0.0347   +0.0190   +0.9368   +0.0095   
++0.0142   +0.0461   +0.0047   +0.9349   
+
++0.9464   +0.0254   +0.0154   +0.0127   
++0.0191   +0.9439   +0.0064   +0.0306   
++0.0462   +0.0254   +0.9156   +0.0127   
++0.0191   +0.0613   +0.0064   +0.9133   
+
++0.9312   +0.0328   +0.0197   +0.0164   
++0.0246   +0.9282   +0.0082   +0.0390   
++0.0590   +0.0328   +0.8919   +0.0164   
++0.0246   +0.0781   +0.0082   +0.8892   
+
++0.9141   +0.0410   +0.0244   +0.0205   
++0.0308   +0.9107   +0.0103   +0.0483   
++0.0731   +0.0410   +0.8654   +0.0205   
++0.0308   +0.0965   +0.0103   +0.8624   
+
++0.8949   +0.0504   +0.0295   +0.0252   
++0.0378   +0.8912   +0.0126   +0.0584   
++0.0886   +0.0504   +0.8358   +0.0252   
++0.0378   +0.1169   +0.0126   +0.8328   
+
++0.8731   +0.0611   +0.0353   +0.0305   
++0.0458   +0.8693   +0.0153   +0.0696   
++0.1059   +0.0611   +0.8025   +0.0305   
++0.0458   +0.1393   +0.0153   +0.7997   
+
++0.8482   +0.0734   +0.0417   +0.0367   
++0.0550   +0.8445   +0.0183   +0.0821   
++0.1252   +0.0734   +0.7648   +0.0367   
++0.0550   +0.1642   +0.0183   +0.7625   
+
++0.8192   +0.0879   +0.0490   +0.0440   
++0.0659   +0.8161   +0.0220   +0.0960   
++0.1469   +0.0879   +0.7212   +0.0440   
++0.0659   +0.1920   +0.0220   +0.7201   
+
++0.7844   +0.1055   +0.0573   +0.0528   
++0.0792   +0.7826   +0.0264   +0.1119   
++0.1719   +0.1055   +0.6698   +0.0528   
++0.0792   +0.2238   +0.0264   +0.6707   
+
++0.7408   +0.1280   +0.0671   +0.0640   
++0.0960   +0.7415   +0.0320   +0.1305   
++0.2014   +0.1280   +0.6066   +0.0640   
++0.0960   +0.2610   +0.0320   +0.6110   
+
++0.6813   +0.1595   +0.0794   +0.0797   
++0.1196   +0.6871   +0.0399   +0.1534   
++0.2382   +0.1595   +0.5225   +0.0797   
++0.1196   +0.3068   +0.0399   +0.5337   
+
++0.5782   +0.2166   +0.0970   +0.1083   
++0.1624   +0.5981   +0.0541   +0.1854   
++0.2909   +0.2166   +0.3842   +0.1083   
++0.1624   +0.3707   +0.0541   +0.4127   
+
 
-+0.3030   +0.3974   +0.1009   +0.1987   
-+0.2981   +0.4017   +0.0994   +0.2008   
-+0.3027   +0.3974   +0.1012   +0.1987   
-+0.2981   +0.4017   +0.0994   +0.2009   
+[2] P-matrix for branch length 1.000000
++0.9901   +0.0047   +0.0029   +0.0023   
++0.0035   +0.9895   +0.0012   +0.0058   
++0.0087   +0.0047   +0.9843   +0.0023   
++0.0035   +0.0116   +0.0012   +0.9837   
+
++0.9574   +0.0202   +0.0123   +0.0101   
++0.0151   +0.9553   +0.0050   +0.0245   
++0.0369   +0.0202   +0.9328   +0.0101   
++0.0151   +0.0490   +0.0050   +0.9308   
+
++0.9167   +0.0397   +0.0236   +0.0199   
++0.0298   +0.9134   +0.0099   +0.0469   
++0.0709   +0.0397   +0.8695   +0.0199   
++0.0298   +0.0937   +0.0099   +0.8665   
+
++0.8712   +0.0620   +0.0358   +0.0310   
++0.0465   +0.8674   +0.0155   +0.0706   
++0.1074   +0.0620   +0.7996   +0.0310   
++0.0465   +0.1412   +0.0155   +0.7968   
+
++0.8225   +0.0862   +0.0481   +0.0431   
++0.0647   +0.8193   +0.0216   +0.0944   
++0.1444   +0.0862   +0.7263   +0.0431   
++0.0647   +0.1889   +0.0216   +0.7249   
+
++0.7717   +0.1120   +0.0602   +0.0560   
++0.0840   +0.7705   +0.0280   +0.1175   
++0.1806   +0.1120   +0.6513   +0.0560   
++0.0840   +0.2349   +0.0280   +0.6530   
+
++0.7197   +0.1391   +0.0717   +0.0696   
++0.1043   +0.7219   +0.0348   +0.1390   
++0.2150   +0.1391   +0.5764   +0.0696   
++0.1043   +0.2779   +0.0348   +0.5830   
+
++0.6671   +0.1672   +0.0821   +0.0836   
++0.1254   +0.6745   +0.0418   +0.1584   
++0.2464   +0.1672   +0.5029   +0.0836   
++0.1254   +0.3168   +0.0418   +0.5161   
+
++0.6147   +0.1959   +0.0914   +0.0980   
++0.1470   +0.6288   +0.0490   +0.1752   
++0.2741   +0.1959   +0.4320   +0.0980   
++0.1470   +0.3505   +0.0490   +0.4536   
+
++0.5631   +0.2252   +0.0991   +0.1126   
++0.1689   +0.5856   +0.0563   +0.1891   
++0.2972   +0.2252   +0.3649   +0.1126   
++0.1689   +0.3783   +0.0563   +0.3965   
+
++0.5127   +0.2548   +0.1050   +0.1274   
++0.1911   +0.5454   +0.0637   +0.1998   
++0.3151   +0.2548   +0.3027   +0.1274   
++0.1911   +0.3996   +0.0637   +0.3456   
+
++0.4644   +0.2844   +0.1090   +0.1422   
++0.2133   +0.5086   +0.0711   +0.2070   
++0.3271   +0.2844   +0.2464   +0.1422   
++0.2133   +0.4140   +0.0711   +0.3016   
+
++0.4188   +0.3135   +0.1109   +0.1568   
++0.2351   +0.4758   +0.0784   +0.2107   
++0.3326   +0.3135   +0.1971   +0.1568   
++0.2351   +0.4213   +0.0784   +0.2651   
+
++0.3768   +0.3419   +0.1104   +0.1709   
++0.2564   +0.4473   +0.0855   +0.2108   
++0.3311   +0.3419   +0.1561   +0.1709   
++0.2564   +0.4217   +0.0855   +0.2365   
+
++0.3396   +0.3686   +0.1075   +0.1843   
++0.2764   +0.4236   +0.0921   +0.2078   
++0.3225   +0.3686   +0.1246   +0.1843   
++0.2764   +0.4156   +0.0921   +0.2158   
+
++0.3096   +0.3919   +0.1026   +0.1959   
++0.2939   +0.4056   +0.0980   +0.2025   
++0.3077   +0.3919   +0.1045   +0.1959   
++0.2939   +0.4050   +0.0980   +0.2031   
 
 
-[1] CLV 5: [ {(0.00016,0.00032,0.00000,0.00040),(0.00111,0.00223,0.00000,0.00278),(0.00303,0.00604,0.00002,0.00752),(0.00593,0.01176,0.00008,0.01460),(0.00984,0.01937,0.00024,0.02397),(0.01478,0.02889,0.00054,0.03554),(0.02082,0.04028,0.00108,0.04924),(0.02801,0.05355,0.00199,0.06492),(0.03645,0.06866,0.00345,0.08243),(0.04625,0.08557,0.00571,0.10154),(0.05759,0.10424,0.00914,0.12196),(0.07071,0.12457,0.01434,0.14326),(0.08602,0.14637,0.02229,0.16482),(0.10419,0.16930,0.03489,0.18568),(0 [...]
-[1] CLV 6: [ {(0.00016,0.00000,0.00000,0.00000),(0.00111,0.00000,0.00000,0.00000),(0.00302,0.00001,0.00000,0.00002),(0.00588,0.00005,0.00000,0.00007),(0.00968,0.00015,0.00001,0.00018),(0.01442,0.00033,0.00003,0.00040),(0.02009,0.00065,0.00009,0.00079),(0.02667,0.00117,0.00021,0.00141),(0.03412,0.00199,0.00047,0.00235),(0.04239,0.00320,0.00097,0.00373),(0.05137,0.00495,0.00189,0.00567),(0.06093,0.00744,0.00356,0.00836),(0.07076,0.01098,0.00654,0.01205),(0.08030,0.01605,0.01187,0.01714),(0 [...]
-[1] CLV 7: [ {(0.00000,0.99928,0.00000,0.00000),(0.00000,0.99499,0.00000,0.00001),(0.00001,0.98636,0.00001,0.00006),(0.00004,0.97335,0.00004,0.00022),(0.00010,0.95587,0.00010,0.00061),(0.00023,0.93377,0.00023,0.00137),(0.00047,0.90690,0.00047,0.00273),(0.00086,0.87499,0.00086,0.00496),(0.00151,0.83773,0.00151,0.00842),(0.00253,0.79466,0.00253,0.01360),(0.00410,0.74516,0.00410,0.02115),(0.00655,0.68825,0.00655,0.03200),(0.01043,0.62243,0.01043,0.04745),(0.01687,0.54492,0.01687,0.06963),(0 [...]
+[2] P-matrix for branch length 1.000000
++0.9901   +0.0047   +0.0029   +0.0023   
++0.0035   +0.9895   +0.0012   +0.0058   
++0.0087   +0.0047   +0.9843   +0.0023   
++0.0035   +0.0116   +0.0012   +0.9837   
+
++0.9574   +0.0202   +0.0123   +0.0101   
++0.0151   +0.9553   +0.0050   +0.0245   
++0.0369   +0.0202   +0.9328   +0.0101   
++0.0151   +0.0490   +0.0050   +0.9308   
+
++0.9167   +0.0397   +0.0236   +0.0199   
++0.0298   +0.9134   +0.0099   +0.0469   
++0.0709   +0.0397   +0.8695   +0.0199   
++0.0298   +0.0937   +0.0099   +0.8665   
+
++0.8712   +0.0620   +0.0358   +0.0310   
++0.0465   +0.8674   +0.0155   +0.0706   
++0.1074   +0.0620   +0.7996   +0.0310   
++0.0465   +0.1412   +0.0155   +0.7968   
+
++0.8225   +0.0862   +0.0481   +0.0431   
++0.0647   +0.8193   +0.0216   +0.0944   
++0.1444   +0.0862   +0.7263   +0.0431   
++0.0647   +0.1889   +0.0216   +0.7249   
+
++0.7717   +0.1120   +0.0602   +0.0560   
++0.0840   +0.7705   +0.0280   +0.1175   
++0.1806   +0.1120   +0.6513   +0.0560   
++0.0840   +0.2349   +0.0280   +0.6530   
+
++0.7197   +0.1391   +0.0717   +0.0696   
++0.1043   +0.7219   +0.0348   +0.1390   
++0.2150   +0.1391   +0.5764   +0.0696   
++0.1043   +0.2779   +0.0348   +0.5830   
+
++0.6671   +0.1672   +0.0821   +0.0836   
++0.1254   +0.6745   +0.0418   +0.1584   
++0.2464   +0.1672   +0.5029   +0.0836   
++0.1254   +0.3168   +0.0418   +0.5161   
+
++0.6147   +0.1959   +0.0914   +0.0980   
++0.1470   +0.6288   +0.0490   +0.1752   
++0.2741   +0.1959   +0.4320   +0.0980   
++0.1470   +0.3505   +0.0490   +0.4536   
+
++0.5631   +0.2252   +0.0991   +0.1126   
++0.1689   +0.5856   +0.0563   +0.1891   
++0.2972   +0.2252   +0.3649   +0.1126   
++0.1689   +0.3783   +0.0563   +0.3965   
+
++0.5127   +0.2548   +0.1050   +0.1274   
++0.1911   +0.5454   +0.0637   +0.1998   
++0.3151   +0.2548   +0.3027   +0.1274   
++0.1911   +0.3996   +0.0637   +0.3456   
+
++0.4644   +0.2844   +0.1090   +0.1422   
++0.2133   +0.5086   +0.0711   +0.2070   
++0.3271   +0.2844   +0.2464   +0.1422   
++0.2133   +0.4140   +0.0711   +0.3016   
+
++0.4188   +0.3135   +0.1109   +0.1568   
++0.2351   +0.4758   +0.0784   +0.2107   
++0.3326   +0.3135   +0.1971   +0.1568   
++0.2351   +0.4213   +0.0784   +0.2651   
+
++0.3768   +0.3419   +0.1104   +0.1709   
++0.2564   +0.4473   +0.0855   +0.2108   
++0.3311   +0.3419   +0.1561   +0.1709   
++0.2564   +0.4217   +0.0855   +0.2365   
+
++0.3396   +0.3686   +0.1075   +0.1843   
++0.2764   +0.4236   +0.0921   +0.2078   
++0.3225   +0.3686   +0.1246   +0.1843   
++0.2764   +0.4156   +0.0921   +0.2158   
+
++0.3096   +0.3919   +0.1026   +0.1959   
++0.2939   +0.4056   +0.0980   +0.2025   
++0.3077   +0.3919   +0.1045   +0.1959   
++0.2939   +0.4050   +0.0980   +0.2031   
+
 
+[2] CLV 5: [ {(0.00094,0.00187,0.00000,0.00234),(0.00409,0.00814,0.00004,0.01013),(0.00817,0.01614,0.00016,0.02001),(0.01296,0.02540,0.00041,0.03132),(0.01838,0.03571,0.00084,0.04377),(0.02440,0.04694,0.00150,0.05715),(0.03105,0.05905,0.00247,0.07134),(0.03834,0.07198,0.00384,0.08624),(0.04635,0.08575,0.00573,0.10174),(0.05517,0.10034,0.00833,0.11775),(0.06494,0.11580,0.01188,0.13419),(0.07588,0.13216,0.01678,0.15094),(0.08836,0.14951,0.02371,0.16781),(0.10304,0.16795,0.03398,0.18452),(0 [...]
+[2] CLV 6: [ {(0.00094,0.00000,0.00000,0.00000),(0.00407,0.00003,0.00000,0.00003),(0.00807,0.00010,0.00001,0.00012),(0.01269,0.00025,0.00002,0.00031),(0.01782,0.00051,0.00006,0.00062),(0.02340,0.00089,0.00014,0.00107),(0.02939,0.00144,0.00029,0.00172),(0.03575,0.00220,0.00055,0.00259),(0.04247,0.00321,0.00097,0.00374),(0.04951,0.00454,0.00166,0.00522),(0.05684,0.00628,0.00274,0.00712),(0.06441,0.00856,0.00443,0.00954),(0.07213,0.01158,0.00711,0.01266),(0.07978,0.01570,0.01147,0.01680),(0 [...]
+[2] CLV 7: [ {(0.00000,0.99578,0.00000,0.00001),(0.00002,0.98160,0.00002,0.00010),(0.00007,0.96330,0.00007,0.00042),(0.00018,0.94189,0.00018,0.00106),(0.00036,0.91774,0.00036,0.00213),(0.00065,0.89096,0.00065,0.00376),(0.00107,0.86154,0.00107,0.00610),(0.00168,0.82937,0.00168,0.00932),(0.00254,0.79422,0.00254,0.01366),(0.00373,0.75570,0.00373,0.01940),(0.00539,0.71325,0.00539,0.02695),(0.00773,0.66597,0.00773,0.03688),(0.01114,0.61239,0.01114,0.05009),(0.01639,0.54980,0.01639,0.06811),(0 [...]
 
- TEST alpha(ncats) =   0.75(16)
+
+ TEST alpha(ncats) =   0.75(16), mode = MEDIAN
 
 0.012768 0.052396 0.105284 0.169090 0.243657 0.329712 0.428675 0.542743 0.675156 0.830724 1.016841 1.245582 1.538542 1.940413 2.572099 4.296318 
 [2] P-matrix for branch length 0.100000
@@ -4284,7 +8568,343 @@
 [2] CLV 7: [ {(0.00000,0.99555,0.00000,0.00001),(0.00002,0.98192,0.00002,0.00010),(0.00007,0.96414,0.00007,0.00040),(0.00017,0.94328,0.00017,0.00101),(0.00034,0.91972,0.00034,0.00202),(0.00062,0.89356,0.00062,0.00358),(0.00102,0.86479,0.00102,0.00581),(0.00160,0.83328,0.00160,0.00889),(0.00242,0.79877,0.00242,0.01305),(0.00355,0.76088,0.00355,0.01856),(0.00514,0.71902,0.00514,0.02584),(0.00738,0.67224,0.00738,0.03547),(0.01067,0.61899,0.01067,0.04835),(0.01577,0.55632,0.01577,0.06611),(0 [...]
 
 
- TEST alpha(ncats) =   1.00(16)
+ TEST alpha(ncats) =   1.00(16), mode = MEAN
+
+0.032446 0.100603 0.173632 0.252284 0.337497 0.430468 0.532750 0.646419 0.774332 0.920577 1.091302 1.296381 1.553217 1.897082 2.419130 3.541880 
+[3] P-matrix for branch length 0.100000
++0.9973   +0.0013   +0.0008   +0.0006   
++0.0009   +0.9972   +0.0003   +0.0016   
++0.0024   +0.0013   +0.9958   +0.0006   
++0.0009   +0.0031   +0.0003   +0.9956   
+
++0.9917   +0.0039   +0.0024   +0.0019   
++0.0029   +0.9913   +0.0010   +0.0048   
++0.0073   +0.0039   +0.9869   +0.0019   
++0.0029   +0.0097   +0.0010   +0.9864   
+
++0.9858   +0.0067   +0.0041   +0.0033   
++0.0050   +0.9850   +0.0017   +0.0083   
++0.0124   +0.0067   +0.9775   +0.0033   
++0.0050   +0.0166   +0.0017   +0.9768   
+
++0.9795   +0.0097   +0.0060   +0.0048   
++0.0073   +0.9784   +0.0024   +0.0119   
++0.0179   +0.0097   +0.9675   +0.0048   
++0.0073   +0.0239   +0.0024   +0.9665   
+
++0.9727   +0.0129   +0.0079   +0.0064   
++0.0097   +0.9713   +0.0032   +0.0158   
++0.0238   +0.0129   +0.9569   +0.0064   
++0.0097   +0.0316   +0.0032   +0.9555   
+
++0.9654   +0.0164   +0.0100   +0.0082   
++0.0123   +0.9636   +0.0041   +0.0200   
++0.0301   +0.0164   +0.9453   +0.0082   
++0.0123   +0.0400   +0.0041   +0.9437   
+
++0.9575   +0.0202   +0.0123   +0.0101   
++0.0151   +0.9554   +0.0050   +0.0245   
++0.0369   +0.0202   +0.9329   +0.0101   
++0.0151   +0.0490   +0.0050   +0.9309   
+
++0.9487   +0.0243   +0.0148   +0.0122   
++0.0182   +0.9463   +0.0061   +0.0294   
++0.0443   +0.0243   +0.9192   +0.0122   
++0.0182   +0.0587   +0.0061   +0.9170   
+
++0.9391   +0.0290   +0.0175   +0.0145   
++0.0217   +0.9363   +0.0072   +0.0347   
++0.0524   +0.0290   +0.9041   +0.0145   
++0.0217   +0.0694   +0.0072   +0.9016   
+
++0.9282   +0.0342   +0.0205   +0.0171   
++0.0256   +0.9251   +0.0085   +0.0407   
++0.0615   +0.0342   +0.8872   +0.0171   
++0.0256   +0.0813   +0.0085   +0.8845   
+
++0.9158   +0.0402   +0.0239   +0.0201   
++0.0302   +0.9124   +0.0101   +0.0474   
++0.0717   +0.0402   +0.8680   +0.0201   
++0.0302   +0.0948   +0.0101   +0.8650   
+
++0.9012   +0.0473   +0.0279   +0.0237   
++0.0355   +0.8976   +0.0118   +0.0551   
++0.0836   +0.0473   +0.8455   +0.0237   
++0.0355   +0.1103   +0.0118   +0.8424   
+
++0.8834   +0.0560   +0.0326   +0.0280   
++0.0420   +0.8796   +0.0140   +0.0644   
++0.0978   +0.0560   +0.8182   +0.0280   
++0.0420   +0.1288   +0.0140   +0.8153   
+
++0.8605   +0.0673   +0.0386   +0.0336   
++0.0505   +0.8567   +0.0168   +0.0760   
++0.1157   +0.0673   +0.7833   +0.0336   
++0.0505   +0.1520   +0.0168   +0.7807   
+
++0.8275   +0.0837   +0.0469   +0.0419   
++0.0628   +0.8242   +0.0209   +0.0921   
++0.1407   +0.0837   +0.7337   +0.0419   
++0.0628   +0.1842   +0.0209   +0.7321   
+
++0.7633   +0.1164   +0.0621   +0.0582   
++0.0873   +0.7625   +0.0291   +0.1211   
++0.1864   +0.1164   +0.6390   +0.0582   
++0.0873   +0.2422   +0.0291   +0.6414   
+
+
+[3] P-matrix for branch length 0.200000
++0.9947   +0.0025   +0.0016   +0.0013   
++0.0019   +0.9944   +0.0006   +0.0031   
++0.0047   +0.0025   +0.9915   +0.0013   
++0.0019   +0.0063   +0.0006   +0.9912   
+
++0.9836   +0.0077   +0.0048   +0.0039   
++0.0058   +0.9827   +0.0019   +0.0096   
++0.0144   +0.0077   +0.9740   +0.0039   
++0.0058   +0.0191   +0.0019   +0.9731   
+
++0.9720   +0.0133   +0.0082   +0.0066   
++0.0099   +0.9705   +0.0033   +0.0163   
++0.0245   +0.0133   +0.9556   +0.0066   
++0.0099   +0.0325   +0.0033   +0.9542   
+
++0.9596   +0.0191   +0.0117   +0.0096   
++0.0143   +0.9576   +0.0048   +0.0233   
++0.0350   +0.0191   +0.9363   +0.0096   
++0.0143   +0.0465   +0.0048   +0.9344   
+
++0.9466   +0.0254   +0.0154   +0.0127   
++0.0190   +0.9441   +0.0063   +0.0306   
++0.0461   +0.0254   +0.9158   +0.0127   
++0.0190   +0.0611   +0.0063   +0.9135   
+
++0.9326   +0.0321   +0.0193   +0.0160   
++0.0241   +0.9297   +0.0080   +0.0383   
++0.0578   +0.0321   +0.8941   +0.0160   
++0.0241   +0.0765   +0.0080   +0.8914   
+
++0.9176   +0.0393   +0.0234   +0.0197   
++0.0295   +0.9143   +0.0098   +0.0464   
++0.0702   +0.0393   +0.8709   +0.0197   
++0.0295   +0.0928   +0.0098   +0.8679   
+
++0.9014   +0.0472   +0.0278   +0.0236   
++0.0354   +0.8978   +0.0118   +0.0550   
++0.0834   +0.0472   +0.8458   +0.0236   
++0.0354   +0.1100   +0.0118   +0.8428   
+
++0.8837   +0.0558   +0.0325   +0.0279   
++0.0419   +0.8799   +0.0140   +0.0642   
++0.0975   +0.0558   +0.8187   +0.0279   
++0.0419   +0.1284   +0.0140   +0.8157   
+
++0.8642   +0.0655   +0.0376   +0.0327   
++0.0491   +0.8604   +0.0164   +0.0742   
++0.1129   +0.0655   +0.7889   +0.0327   
++0.0491   +0.1483   +0.0164   +0.7862   
+
++0.8422   +0.0764   +0.0432   +0.0382   
++0.0573   +0.8386   +0.0191   +0.0850   
++0.1297   +0.0764   +0.7557   +0.0382   
++0.0573   +0.1700   +0.0191   +0.7536   
+
++0.8170   +0.0890   +0.0495   +0.0445   
++0.0668   +0.8139   +0.0223   +0.0970   
++0.1485   +0.0890   +0.7180   +0.0445   
++0.0668   +0.1941   +0.0223   +0.7169   
+
++0.7871   +0.1041   +0.0566   +0.0521   
++0.0781   +0.7852   +0.0260   +0.1107   
++0.1699   +0.1041   +0.6738   +0.0521   
++0.0781   +0.2214   +0.0260   +0.6745   
+
++0.7500   +0.1233   +0.0651   +0.0616   
++0.0924   +0.7500   +0.0308   +0.1267   
++0.1953   +0.1233   +0.6198   +0.0616   
++0.0924   +0.2534   +0.0308   +0.6233   
+
++0.6992   +0.1499   +0.0759   +0.0750   
++0.1124   +0.7033   +0.0375   +0.1468   
++0.2276   +0.1499   +0.5475   +0.0750   
++0.1124   +0.2936   +0.0375   +0.5564   
+
++0.6094   +0.1989   +0.0922   +0.0995   
++0.1492   +0.6243   +0.0497   +0.1768   
++0.2767   +0.1989   +0.4250   +0.0995   
++0.1492   +0.3536   +0.0497   +0.4475   
+
+
+[3] P-matrix for branch length 1.000000
++0.9738   +0.0124   +0.0076   +0.0062   
++0.0093   +0.9724   +0.0031   +0.0152   
++0.0229   +0.0124   +0.9585   +0.0062   
++0.0093   +0.0305   +0.0031   +0.9571   
+
++0.9220   +0.0372   +0.0222   +0.0186   
++0.0279   +0.9187   +0.0093   +0.0441   
++0.0666   +0.0372   +0.8775   +0.0186   
++0.0279   +0.0881   +0.0093   +0.8747   
+
++0.8711   +0.0621   +0.0358   +0.0310   
++0.0465   +0.8673   +0.0155   +0.0707   
++0.1075   +0.0621   +0.7994   +0.0310   
++0.0465   +0.1413   +0.0155   +0.7966   
+
++0.8212   +0.0869   +0.0485   +0.0434   
++0.0652   +0.8180   +0.0217   +0.0951   
++0.1454   +0.0869   +0.7242   +0.0434   
++0.0652   +0.1901   +0.0217   +0.7230   
+
++0.7723   +0.1118   +0.0601   +0.0559   
++0.0838   +0.7710   +0.0279   +0.1172   
++0.1803   +0.1118   +0.6521   +0.0559   
++0.0838   +0.2345   +0.0279   +0.6538   
+
++0.7244   +0.1366   +0.0707   +0.0683   
++0.1025   +0.7262   +0.0342   +0.1371   
++0.2120   +0.1366   +0.5830   +0.0683   
++0.1025   +0.2742   +0.0342   +0.5891   
+
++0.6776   +0.1615   +0.0801   +0.0808   
++0.1211   +0.6837   +0.0404   +0.1547   
++0.2404   +0.1615   +0.5173   +0.0808   
++0.1211   +0.3095   +0.0404   +0.5290   
+
++0.6318   +0.1864   +0.0885   +0.0932   
++0.1398   +0.6435   +0.0466   +0.1700   
++0.2655   +0.1864   +0.4548   +0.0932   
++0.1398   +0.3400   +0.0466   +0.4735   
+
++0.5873   +0.2114   +0.0956   +0.1057   
++0.1585   +0.6056   +0.0528   +0.1830   
++0.2869   +0.2114   +0.3960   +0.1057   
++0.1585   +0.3659   +0.0528   +0.4227   
+
++0.5439   +0.2364   +0.1015   +0.1182   
++0.1773   +0.5701   +0.0591   +0.1935   
++0.3046   +0.2364   +0.3408   +0.1182   
++0.1773   +0.3871   +0.0591   +0.3766   
+
++0.5019   +0.2614   +0.1061   +0.1307   
++0.1960   +0.5370   +0.0653   +0.2017   
++0.3183   +0.2614   +0.2897   +0.1307   
++0.1960   +0.4034   +0.0653   +0.3353   
+
++0.4612   +0.2864   +0.1092   +0.1432   
++0.2148   +0.5062   +0.0716   +0.2074   
++0.3277   +0.2864   +0.2427   +0.1432   
++0.2148   +0.4147   +0.0716   +0.2989   
+
++0.4220   +0.3115   +0.1108   +0.1557   
++0.2336   +0.4780   +0.0779   +0.2105   
++0.3324   +0.3115   +0.2004   +0.1557   
++0.2336   +0.4210   +0.0779   +0.2675   
+
++0.3845   +0.3366   +0.1107   +0.1683   
++0.2524   +0.4523   +0.0841   +0.2111   
++0.3320   +0.3366   +0.1632   +0.1683   
++0.2524   +0.4221   +0.0841   +0.2413   
+
++0.3488   +0.3618   +0.1085   +0.1809   
++0.2714   +0.4293   +0.0905   +0.2089   
++0.3255   +0.3618   +0.1318   +0.1809   
++0.2714   +0.4178   +0.0905   +0.2204   
+
++0.3155   +0.3872   +0.1038   +0.1936   
++0.2904   +0.4090   +0.0968   +0.2038   
++0.3114   +0.3872   +0.1079   +0.1936   
++0.2904   +0.4076   +0.0968   +0.2052   
+
+
+[3] P-matrix for branch length 1.000000
++0.9738   +0.0124   +0.0076   +0.0062   
++0.0093   +0.9724   +0.0031   +0.0152   
++0.0229   +0.0124   +0.9585   +0.0062   
++0.0093   +0.0305   +0.0031   +0.9571   
+
++0.9220   +0.0372   +0.0222   +0.0186   
++0.0279   +0.9187   +0.0093   +0.0441   
++0.0666   +0.0372   +0.8775   +0.0186   
++0.0279   +0.0881   +0.0093   +0.8747   
+
++0.8711   +0.0621   +0.0358   +0.0310   
++0.0465   +0.8673   +0.0155   +0.0707   
++0.1075   +0.0621   +0.7994   +0.0310   
++0.0465   +0.1413   +0.0155   +0.7966   
+
++0.8212   +0.0869   +0.0485   +0.0434   
++0.0652   +0.8180   +0.0217   +0.0951   
++0.1454   +0.0869   +0.7242   +0.0434   
++0.0652   +0.1901   +0.0217   +0.7230   
+
++0.7723   +0.1118   +0.0601   +0.0559   
++0.0838   +0.7710   +0.0279   +0.1172   
++0.1803   +0.1118   +0.6521   +0.0559   
++0.0838   +0.2345   +0.0279   +0.6538   
+
++0.7244   +0.1366   +0.0707   +0.0683   
++0.1025   +0.7262   +0.0342   +0.1371   
++0.2120   +0.1366   +0.5830   +0.0683   
++0.1025   +0.2742   +0.0342   +0.5891   
+
++0.6776   +0.1615   +0.0801   +0.0808   
++0.1211   +0.6837   +0.0404   +0.1547   
++0.2404   +0.1615   +0.5173   +0.0808   
++0.1211   +0.3095   +0.0404   +0.5290   
+
++0.6318   +0.1864   +0.0885   +0.0932   
++0.1398   +0.6435   +0.0466   +0.1700   
++0.2655   +0.1864   +0.4548   +0.0932   
++0.1398   +0.3400   +0.0466   +0.4735   
+
++0.5873   +0.2114   +0.0956   +0.1057   
++0.1585   +0.6056   +0.0528   +0.1830   
++0.2869   +0.2114   +0.3960   +0.1057   
++0.1585   +0.3659   +0.0528   +0.4227   
+
++0.5439   +0.2364   +0.1015   +0.1182   
++0.1773   +0.5701   +0.0591   +0.1935   
++0.3046   +0.2364   +0.3408   +0.1182   
++0.1773   +0.3871   +0.0591   +0.3766   
+
++0.5019   +0.2614   +0.1061   +0.1307   
++0.1960   +0.5370   +0.0653   +0.2017   
++0.3183   +0.2614   +0.2897   +0.1307   
++0.1960   +0.4034   +0.0653   +0.3353   
+
++0.4612   +0.2864   +0.1092   +0.1432   
++0.2148   +0.5062   +0.0716   +0.2074   
++0.3277   +0.2864   +0.2427   +0.1432   
++0.2148   +0.4147   +0.0716   +0.2989   
+
++0.4220   +0.3115   +0.1108   +0.1557   
++0.2336   +0.4780   +0.0779   +0.2105   
++0.3324   +0.3115   +0.2004   +0.1557   
++0.2336   +0.4210   +0.0779   +0.2675   
+
++0.3845   +0.3366   +0.1107   +0.1683   
++0.2524   +0.4523   +0.0841   +0.2111   
++0.3320   +0.3366   +0.1632   +0.1683   
++0.2524   +0.4221   +0.0841   +0.2413   
+
++0.3488   +0.3618   +0.1085   +0.1809   
++0.2714   +0.4293   +0.0905   +0.2089   
++0.3255   +0.3618   +0.1318   +0.1809   
++0.2714   +0.4178   +0.0905   +0.2204   
+
++0.3155   +0.3872   +0.1038   +0.1936   
++0.2904   +0.4090   +0.0968   +0.2038   
++0.3114   +0.3872   +0.1079   +0.1936   
++0.2904   +0.4076   +0.0968   +0.2052   
+
+
+[3] CLV 5: [ {(0.00250,0.00498,0.00001,0.00621),(0.00764,0.01510,0.00014,0.01873),(0.01298,0.02543,0.00041,0.03136),(0.01853,0.03600,0.00085,0.04412),(0.02434,0.04682,0.00149,0.05701),(0.03043,0.05793,0.00237,0.07005),(0.03685,0.06936,0.00353,0.08324),(0.04365,0.08115,0.00505,0.09660),(0.05091,0.09336,0.00701,0.11015),(0.05872,0.10606,0.00954,0.12390),(0.06725,0.11934,0.01283,0.13787),(0.07669,0.13333,0.01718,0.15210),(0.08740,0.14823,0.02312,0.16660),(0.10004,0.16437,0.03167,0.18138),(0 [...]
+[3] CLV 6: [ {(0.00249,0.00001,0.00000,0.00001),(0.00755,0.00009,0.00000,0.00011),(0.01270,0.00025,0.00002,0.00031),(0.01797,0.00051,0.00006,0.00063),(0.02334,0.00089,0.00014,0.00107),(0.02884,0.00139,0.00027,0.00166),(0.03447,0.00203,0.00048,0.00240),(0.04023,0.00285,0.00081,0.00333),(0.04615,0.00387,0.00130,0.00448),(0.05224,0.00514,0.00201,0.00588),(0.05850,0.00674,0.00305,0.00760),(0.06494,0.00874,0.00458,0.00973),(0.07157,0.01133,0.00687,0.01241),(0.07835,0.01481,0.01046,0.01592),(0 [...]
+[3] CLV 7: [ {(0.00001,0.98875,0.00001,0.00004),(0.00006,0.96569,0.00006,0.00037),(0.00018,0.94182,0.00018,0.00106),(0.00037,0.91705,0.00037,0.00216),(0.00064,0.89125,0.00064,0.00374),(0.00103,0.86428,0.00103,0.00585),(0.00155,0.83597,0.00155,0.00860),(0.00223,0.80608,0.00223,0.01210),(0.00312,0.77430,0.00312,0.01650),(0.00429,0.74022,0.00429,0.02200),(0.00583,0.70325,0.00583,0.02891),(0.00792,0.66250,0.00792,0.03767),(0.01085,0.61650,0.01085,0.04900),(0.01519,0.56256,0.01519,0.06421),(0 [...]
+
+
+ TEST alpha(ncats) =   1.00(16), mode = MEDIAN
 
 0.031922 0.098638 0.170128 0.247127 0.330557 0.421592 0.521759 0.633100 0.758427 0.901774 1.069221 1.270577 1.523248 1.863046 2.386294 3.772589 
 [3] P-matrix for branch length 0.100000
@@ -4620,7 +9240,343 @@
 [3] CLV 7: [ {(0.00001,0.98893,0.00001,0.00004),(0.00006,0.96635,0.00006,0.00035),(0.00017,0.94295,0.00017,0.00102),(0.00035,0.91864,0.00035,0.00208),(0.00062,0.89331,0.00062,0.00360),(0.00099,0.86681,0.00099,0.00564),(0.00149,0.83895,0.00149,0.00829),(0.00214,0.80950,0.00214,0.01167),(0.00300,0.77815,0.00300,0.01593),(0.00413,0.74447,0.00413,0.02127),(0.00562,0.70787,0.00562,0.02799),(0.00765,0.66742,0.00765,0.03655),(0.01049,0.62160,0.01049,0.04767),(0.01474,0.56755,0.01474,0.06272),(0 [...]
 
 
- TEST alpha(ncats) =   1.50(16)
+ TEST alpha(ncats) =   1.50(16), mode = MEAN
+
+0.085360 0.188440 0.278832 0.366434 0.454812 0.546200 0.642513 0.745773 0.858422 0.983717 1.126370 1.293782 1.498817 1.767316 2.165541 2.997672 
+[4] P-matrix for branch length 0.100000
++0.9930   +0.0033   +0.0021   +0.0017   
++0.0025   +0.9926   +0.0008   +0.0041   
++0.0062   +0.0033   +0.9889   +0.0017   
++0.0025   +0.0082   +0.0008   +0.9885   
+
++0.9846   +0.0073   +0.0045   +0.0036   
++0.0054   +0.9838   +0.0018   +0.0090   
++0.0135   +0.0073   +0.9756   +0.0036   
++0.0054   +0.0179   +0.0018   +0.9748   
+
++0.9774   +0.0107   +0.0066   +0.0053   
++0.0080   +0.9762   +0.0027   +0.0132   
++0.0198   +0.0107   +0.9642   +0.0053   
++0.0080   +0.0263   +0.0027   +0.9630   
+
++0.9704   +0.0140   +0.0086   +0.0070   
++0.0105   +0.9689   +0.0035   +0.0171   
++0.0258   +0.0140   +0.9533   +0.0070   
++0.0105   +0.0343   +0.0035   +0.9518   
+
++0.9635   +0.0173   +0.0106   +0.0086   
++0.0130   +0.9617   +0.0043   +0.0211   
++0.0317   +0.0173   +0.9424   +0.0086   
++0.0130   +0.0421   +0.0043   +0.9406   
+
++0.9564   +0.0207   +0.0126   +0.0103   
++0.0155   +0.9543   +0.0052   +0.0251   
++0.0378   +0.0207   +0.9312   +0.0103   
++0.0155   +0.0501   +0.0052   +0.9292   
+
++0.9490   +0.0242   +0.0147   +0.0121   
++0.0181   +0.9466   +0.0060   +0.0292   
++0.0440   +0.0242   +0.9197   +0.0121   
++0.0181   +0.0584   +0.0060   +0.9174   
+
++0.9412   +0.0279   +0.0169   +0.0140   
++0.0210   +0.9385   +0.0070   +0.0335   
++0.0506   +0.0279   +0.9075   +0.0140   
++0.0210   +0.0671   +0.0070   +0.9050   
+
++0.9328   +0.0320   +0.0192   +0.0160   
++0.0240   +0.9299   +0.0080   +0.0382   
++0.0576   +0.0320   +0.8944   +0.0160   
++0.0240   +0.0763   +0.0080   +0.8917   
+
++0.9236   +0.0364   +0.0218   +0.0182   
++0.0273   +0.9204   +0.0091   +0.0432   
++0.0653   +0.0364   +0.8801   +0.0182   
++0.0273   +0.0863   +0.0091   +0.8772   
+
++0.9133   +0.0414   +0.0246   +0.0207   
++0.0311   +0.9098   +0.0104   +0.0487   
++0.0738   +0.0414   +0.8641   +0.0207   
++0.0311   +0.0975   +0.0104   +0.8611   
+
++0.9014   +0.0472   +0.0278   +0.0236   
++0.0354   +0.8978   +0.0118   +0.0550   
++0.0834   +0.0472   +0.8457   +0.0236   
++0.0354   +0.1101   +0.0118   +0.8427   
+
++0.8871   +0.0542   +0.0316   +0.0271   
++0.0406   +0.8834   +0.0135   +0.0625   
++0.0948   +0.0542   +0.8239   +0.0271   
++0.0406   +0.1249   +0.0135   +0.8209   
+
++0.8690   +0.0631   +0.0364   +0.0315   
++0.0473   +0.8652   +0.0158   +0.0717   
++0.1091   +0.0631   +0.7963   +0.0315   
++0.0473   +0.1434   +0.0158   +0.7935   
+
++0.8433   +0.0758   +0.0430   +0.0379   
++0.0569   +0.8397   +0.0190   +0.0845   
++0.1289   +0.0758   +0.7573   +0.0379   
++0.0569   +0.1690   +0.0190   +0.7552   
+
++0.7933   +0.1010   +0.0552   +0.0505   
++0.0758   +0.7911   +0.0253   +0.1079   
++0.1656   +0.1010   +0.6829   +0.0505   
++0.0758   +0.2158   +0.0253   +0.6832   
+
+
+[4] P-matrix for branch length 0.200000
++0.9861   +0.0066   +0.0041   +0.0033   
++0.0049   +0.9853   +0.0016   +0.0081   
++0.0122   +0.0066   +0.9779   +0.0033   
++0.0049   +0.0163   +0.0016   +0.9771   
+
++0.9696   +0.0144   +0.0088   +0.0072   
++0.0108   +0.9680   +0.0036   +0.0176   
++0.0265   +0.0144   +0.9520   +0.0072   
++0.0108   +0.0352   +0.0036   +0.9504   
+
++0.9555   +0.0211   +0.0128   +0.0105   
++0.0158   +0.9534   +0.0053   +0.0256   
++0.0385   +0.0211   +0.9299   +0.0105   
++0.0158   +0.0511   +0.0053   +0.9278   
+
++0.9422   +0.0275   +0.0166   +0.0137   
++0.0206   +0.9395   +0.0069   +0.0330   
++0.0498   +0.0275   +0.9090   +0.0137   
++0.0206   +0.0660   +0.0069   +0.9065   
+
++0.9290   +0.0338   +0.0203   +0.0169   
++0.0254   +0.9260   +0.0085   +0.0402   
++0.0608   +0.0338   +0.8885   +0.0169   
++0.0254   +0.0804   +0.0085   +0.8857   
+
++0.9157   +0.0403   +0.0239   +0.0201   
++0.0302   +0.9123   +0.0101   +0.0474   
++0.0718   +0.0403   +0.8678   +0.0201   
++0.0302   +0.0948   +0.0101   +0.8649   
+
++0.9020   +0.0469   +0.0276   +0.0235   
++0.0352   +0.8984   +0.0117   +0.0547   
++0.0829   +0.0469   +0.8467   +0.0235   
++0.0352   +0.1094   +0.0117   +0.8437   
+
++0.8876   +0.0539   +0.0315   +0.0270   
++0.0404   +0.8839   +0.0135   +0.0622   
++0.0944   +0.0539   +0.8247   +0.0270   
++0.0404   +0.1244   +0.0135   +0.8217   
+
++0.8724   +0.0614   +0.0355   +0.0307   
++0.0461   +0.8686   +0.0154   +0.0700   
++0.1065   +0.0614   +0.8014   +0.0307   
++0.0461   +0.1400   +0.0154   +0.7986   
+
++0.8559   +0.0696   +0.0398   +0.0348   
++0.0522   +0.8522   +0.0174   +0.0783   
++0.1193   +0.0696   +0.7764   +0.0348   
++0.0522   +0.1565   +0.0174   +0.7739   
+
++0.8378   +0.0786   +0.0444   +0.0393   
++0.0589   +0.8343   +0.0196   +0.0871   
++0.1331   +0.0786   +0.7491   +0.0393   
++0.0589   +0.1743   +0.0196   +0.7471   
+
++0.8173   +0.0889   +0.0494   +0.0444   
++0.0666   +0.8142   +0.0222   +0.0969   
++0.1483   +0.0889   +0.7184   +0.0444   
++0.0666   +0.1938   +0.0222   +0.7173   
+
++0.7933   +0.1010   +0.0552   +0.0505   
++0.0758   +0.7911   +0.0253   +0.1079   
++0.1656   +0.1010   +0.6829   +0.0505   
++0.0758   +0.2158   +0.0253   +0.6832   
+
++0.7637   +0.1162   +0.0621   +0.0581   
++0.0871   +0.7629   +0.0290   +0.1209   
++0.1862   +0.1162   +0.6395   +0.0581   
++0.0871   +0.2419   +0.0290   +0.6419   
+
++0.7231   +0.1373   +0.0709   +0.0687   
++0.1030   +0.7251   +0.0343   +0.1376   
++0.2128   +0.1373   +0.5812   +0.0687   
++0.1030   +0.2753   +0.0343   +0.5874   
+
++0.6499   +0.1765   +0.0853   +0.0883   
++0.1324   +0.6593   +0.0441   +0.1642   
++0.2559   +0.1765   +0.4793   +0.0883   
++0.1324   +0.3284   +0.0441   +0.4951   
+
+
+[4] P-matrix for branch length 1.000000
++0.9332   +0.0318   +0.0191   +0.0159   
++0.0239   +0.9302   +0.0080   +0.0380   
++0.0573   +0.0318   +0.8949   +0.0159   
++0.0239   +0.0759   +0.0080   +0.8923   
+
++0.8613   +0.0669   +0.0384   +0.0334   
++0.0502   +0.8575   +0.0167   +0.0756   
++0.1151   +0.0669   +0.7846   +0.0334   
++0.0502   +0.1512   +0.0167   +0.7820   
+
++0.8054   +0.0949   +0.0523   +0.0474   
++0.0711   +0.8027   +0.0237   +0.1024   
++0.1569   +0.0949   +0.7008   +0.0474   
++0.0711   +0.2048   +0.0237   +0.7003   
+
++0.7568   +0.1197   +0.0636   +0.0599   
++0.0898   +0.7564   +0.0299   +0.1239   
++0.1908   +0.1197   +0.6296   +0.0599   
++0.0898   +0.2477   +0.0299   +0.6325   
+
++0.7127   +0.1428   +0.0731   +0.0714   
++0.1071   +0.7155   +0.0357   +0.1417   
++0.2193   +0.1428   +0.5665   +0.0714   
++0.1071   +0.2834   +0.0357   +0.5738   
+
++0.6718   +0.1646   +0.0812   +0.0823   
++0.1235   +0.6786   +0.0412   +0.1568   
++0.2437   +0.1646   +0.5093   +0.0823   
++0.1235   +0.3135   +0.0412   +0.5219   
+
++0.6333   +0.1856   +0.0882   +0.0928   
++0.1392   +0.6448   +0.0464   +0.1696   
++0.2647   +0.1856   +0.4568   +0.0928   
++0.1392   +0.3391   +0.0464   +0.4752   
+
++0.5966   +0.2061   +0.0942   +0.1030   
++0.1546   +0.6135   +0.0515   +0.1804   
++0.2827   +0.2061   +0.4082   +0.1030   
++0.1546   +0.3608   +0.0515   +0.4331   
+
++0.5614   +0.2262   +0.0993   +0.1131   
++0.1696   +0.5843   +0.0565   +0.1895   
++0.2979   +0.2262   +0.3629   +0.1131   
++0.1696   +0.3790   +0.0565   +0.3948   
+
++0.5274   +0.2461   +0.1035   +0.1230   
++0.1846   +0.5569   +0.0615   +0.1970   
++0.3104   +0.2461   +0.3204   +0.1230   
++0.1846   +0.3940   +0.0615   +0.3599   
+
++0.4942   +0.2660   +0.1068   +0.1330   
++0.1995   +0.5311   +0.0665   +0.2029   
++0.3204   +0.2660   +0.2806   +0.1330   
++0.1995   +0.4059   +0.0665   +0.3281   
+
++0.4616   +0.2861   +0.1092   +0.1430   
++0.2146   +0.5066   +0.0715   +0.2073   
++0.3276   +0.2861   +0.2432   +0.1430   
++0.2146   +0.4146   +0.0715   +0.2993   
+
++0.4294   +0.3067   +0.1106   +0.1533   
++0.2300   +0.4832   +0.0767   +0.2101   
++0.3319   +0.3067   +0.2081   +0.1533   
++0.2300   +0.4202   +0.0767   +0.2731   
+
++0.3970   +0.3281   +0.1109   +0.1640   
++0.2461   +0.4607   +0.0820   +0.2112   
++0.3327   +0.3281   +0.1751   +0.1640   
++0.2461   +0.4224   +0.0820   +0.2496   
+
++0.3636   +0.3511   +0.1097   +0.1756   
++0.2634   +0.4387   +0.0878   +0.2101   
++0.3290   +0.3511   +0.1443   +0.1756   
++0.2634   +0.4203   +0.0878   +0.2286   
+
++0.3269   +0.3782   +0.1058   +0.1891   
++0.2837   +0.4158   +0.0946   +0.2059   
++0.3174   +0.3782   +0.1153   +0.1891   
++0.2837   +0.4119   +0.0946   +0.2099   
+
+
+[4] P-matrix for branch length 1.000000
++0.9332   +0.0318   +0.0191   +0.0159   
++0.0239   +0.9302   +0.0080   +0.0380   
++0.0573   +0.0318   +0.8949   +0.0159   
++0.0239   +0.0759   +0.0080   +0.8923   
+
++0.8613   +0.0669   +0.0384   +0.0334   
++0.0502   +0.8575   +0.0167   +0.0756   
++0.1151   +0.0669   +0.7846   +0.0334   
++0.0502   +0.1512   +0.0167   +0.7820   
+
++0.8054   +0.0949   +0.0523   +0.0474   
++0.0711   +0.8027   +0.0237   +0.1024   
++0.1569   +0.0949   +0.7008   +0.0474   
++0.0711   +0.2048   +0.0237   +0.7003   
+
++0.7568   +0.1197   +0.0636   +0.0599   
++0.0898   +0.7564   +0.0299   +0.1239   
++0.1908   +0.1197   +0.6296   +0.0599   
++0.0898   +0.2477   +0.0299   +0.6325   
+
++0.7127   +0.1428   +0.0731   +0.0714   
++0.1071   +0.7155   +0.0357   +0.1417   
++0.2193   +0.1428   +0.5665   +0.0714   
++0.1071   +0.2834   +0.0357   +0.5738   
+
++0.6718   +0.1646   +0.0812   +0.0823   
++0.1235   +0.6786   +0.0412   +0.1568   
++0.2437   +0.1646   +0.5093   +0.0823   
++0.1235   +0.3135   +0.0412   +0.5219   
+
++0.6333   +0.1856   +0.0882   +0.0928   
++0.1392   +0.6448   +0.0464   +0.1696   
++0.2647   +0.1856   +0.4568   +0.0928   
++0.1392   +0.3391   +0.0464   +0.4752   
+
++0.5966   +0.2061   +0.0942   +0.1030   
++0.1546   +0.6135   +0.0515   +0.1804   
++0.2827   +0.2061   +0.4082   +0.1030   
++0.1546   +0.3608   +0.0515   +0.4331   
+
++0.5614   +0.2262   +0.0993   +0.1131   
++0.1696   +0.5843   +0.0565   +0.1895   
++0.2979   +0.2262   +0.3629   +0.1131   
++0.1696   +0.3790   +0.0565   +0.3948   
+
++0.5274   +0.2461   +0.1035   +0.1230   
++0.1846   +0.5569   +0.0615   +0.1970   
++0.3104   +0.2461   +0.3204   +0.1230   
++0.1846   +0.3940   +0.0615   +0.3599   
+
++0.4942   +0.2660   +0.1068   +0.1330   
++0.1995   +0.5311   +0.0665   +0.2029   
++0.3204   +0.2660   +0.2806   +0.1330   
++0.1995   +0.4059   +0.0665   +0.3281   
+
++0.4616   +0.2861   +0.1092   +0.1430   
++0.2146   +0.5066   +0.0715   +0.2073   
++0.3276   +0.2861   +0.2432   +0.1430   
++0.2146   +0.4146   +0.0715   +0.2993   
+
++0.4294   +0.3067   +0.1106   +0.1533   
++0.2300   +0.4832   +0.0767   +0.2101   
++0.3319   +0.3067   +0.2081   +0.1533   
++0.2300   +0.4202   +0.0767   +0.2731   
+
++0.3970   +0.3281   +0.1109   +0.1640   
++0.2461   +0.4607   +0.0820   +0.2112   
++0.3327   +0.3281   +0.1751   +0.1640   
++0.2461   +0.4224   +0.0820   +0.2496   
+
++0.3636   +0.3511   +0.1097   +0.1756   
++0.2634   +0.4387   +0.0878   +0.2101   
++0.3290   +0.3511   +0.1443   +0.1756   
++0.2634   +0.4203   +0.0878   +0.2286   
+
++0.3269   +0.3782   +0.1058   +0.1891   
++0.2837   +0.4158   +0.0946   +0.2059   
++0.3174   +0.3782   +0.1153   +0.1891   
++0.2837   +0.4119   +0.0946   +0.2099   
+
+
+[4] CLV 5: [ {(0.00651,0.01288,0.00010,0.01599),(0.01404,0.02747,0.00048,0.03383),(0.02037,0.03944,0.00103,0.04823),(0.02626,0.05036,0.00175,0.06118),(0.03198,0.06072,0.00263,0.07329),(0.03767,0.07080,0.00370,0.08489),(0.04342,0.08076,0.00499,0.09616),(0.04932,0.09073,0.00655,0.10725),(0.05546,0.10082,0.00843,0.11827),(0.06195,0.11115,0.01071,0.12931),(0.06892,0.12187,0.01354,0.14049),(0.07657,0.13316,0.01712,0.15193),(0.08523,0.14530,0.02182,0.16380),(0.09548,0.15874,0.02838,0.17635),(0 [...]
+[4] CLV 6: [ {(0.00644,0.00006,0.00000,0.00008),(0.01372,0.00030,0.00003,0.00036),(0.01968,0.00062,0.00008,0.00075),(0.02509,0.00103,0.00017,0.00124),(0.03022,0.00153,0.00031,0.00182),(0.03517,0.00212,0.00052,0.00251),(0.04004,0.00282,0.00080,0.00330),(0.04488,0.00363,0.00118,0.00422),(0.04974,0.00459,0.00169,0.00528),(0.05465,0.00572,0.00237,0.00651),(0.05968,0.00707,0.00329,0.00796),(0.06487,0.00872,0.00456,0.00970),(0.07029,0.01078,0.00635,0.01185),(0.07605,0.01350,0.00905,0.01461),(0 [...]
+[4] CLV 7: [ {(0.00004,0.97078,0.00004,0.00027),(0.00021,0.93709,0.00021,0.00124),(0.00044,0.90890,0.00044,0.00261),(0.00075,0.88273,0.00075,0.00435),(0.00114,0.85742,0.00114,0.00647),(0.00162,0.83235,0.00162,0.00899),(0.00220,0.80708,0.00220,0.01197),(0.00291,0.78123,0.00291,0.01548),(0.00377,0.75442,0.00377,0.01961),(0.00484,0.72621,0.00484,0.02450),(0.00617,0.69601,0.00617,0.03038),(0.00790,0.66299,0.00790,0.03756),(0.01020,0.62581,0.01020,0.04658),(0.01350,0.58197,0.01350,0.05850),(0 [...]
+
+
+ TEST alpha(ncats) =   1.50(16), mode = MEDIAN
 
 0.080674 0.185159 0.274520 0.360938 0.448071 0.538157 0.633099 0.734899 0.845979 0.969573 1.110370 1.275764 1.478706 1.745588 2.146831 3.171673 
 [4] P-matrix for branch length 0.100000
@@ -4956,7 +9912,343 @@
 [4] CLV 7: [ {(0.00004,0.97235,0.00004,0.00024),(0.00020,0.93813,0.00020,0.00120),(0.00043,0.91021,0.00043,0.00254),(0.00073,0.88434,0.00073,0.00423),(0.00111,0.85931,0.00111,0.00630),(0.00158,0.83451,0.00158,0.00876),(0.00214,0.80950,0.00214,0.01167),(0.00283,0.78389,0.00283,0.01509),(0.00367,0.75731,0.00367,0.01914),(0.00471,0.72931,0.00471,0.02394),(0.00602,0.69930,0.00602,0.02971),(0.00770,0.66642,0.00770,0.03677),(0.00997,0.62930,0.00997,0.04569),(0.01322,0.58533,0.01322,0.05754),(0 [...]
 
 
- TEST alpha(ncats) =   5.00(16)
+ TEST alpha(ncats) =   5.00(16), mode = MEAN
+
+0.346763 0.478958 0.567808 0.642444 0.710569 0.775729 0.840099 0.905353 0.973065 1.044995 1.123417 1.211675 1.315349 1.445356 1.629111 1.989309 
+[5] P-matrix for branch length 0.100000
++0.9720   +0.0132   +0.0081   +0.0066   
++0.0099   +0.9705   +0.0033   +0.0162   
++0.0244   +0.0132   +0.9557   +0.0066   
++0.0099   +0.0325   +0.0033   +0.9543   
+
++0.9616   +0.0182   +0.0111   +0.0091   
++0.0136   +0.9597   +0.0045   +0.0221   
++0.0333   +0.0182   +0.9394   +0.0091   
++0.0136   +0.0443   +0.0045   +0.9376   
+
++0.9548   +0.0215   +0.0131   +0.0107   
++0.0161   +0.9525   +0.0054   +0.0260   
++0.0392   +0.0215   +0.9286   +0.0107   
++0.0161   +0.0520   +0.0054   +0.9266   
+
++0.9490   +0.0242   +0.0147   +0.0121   
++0.0181   +0.9466   +0.0060   +0.0292   
++0.0440   +0.0242   +0.9197   +0.0121   
++0.0181   +0.0584   +0.0060   +0.9174   
+
++0.9439   +0.0267   +0.0161   +0.0133   
++0.0200   +0.9413   +0.0067   +0.0321   
++0.0484   +0.0267   +0.9116   +0.0133   
++0.0200   +0.0641   +0.0067   +0.9092   
+
++0.9390   +0.0290   +0.0175   +0.0145   
++0.0218   +0.9362   +0.0073   +0.0348   
++0.0525   +0.0290   +0.9040   +0.0145   
++0.0218   +0.0695   +0.0073   +0.9014   
+
++0.9342   +0.0313   +0.0188   +0.0157   
++0.0235   +0.9313   +0.0078   +0.0374   
++0.0565   +0.0313   +0.8965   +0.0157   
++0.0235   +0.0748   +0.0078   +0.8939   
+
++0.9293   +0.0337   +0.0202   +0.0168   
++0.0252   +0.9263   +0.0084   +0.0400   
++0.0605   +0.0337   +0.8890   +0.0168   
++0.0252   +0.0801   +0.0084   +0.8862   
+
++0.9244   +0.0361   +0.0215   +0.0180   
++0.0270   +0.9212   +0.0090   +0.0428   
++0.0646   +0.0361   +0.8813   +0.0180   
++0.0270   +0.0855   +0.0090   +0.8784   
+
++0.9191   +0.0386   +0.0230   +0.0193   
++0.0289   +0.9158   +0.0096   +0.0456   
++0.0690   +0.0386   +0.8731   +0.0193   
++0.0289   +0.0912   +0.0096   +0.8703   
+
++0.9135   +0.0413   +0.0245   +0.0207   
++0.0310   +0.9101   +0.0103   +0.0486   
++0.0736   +0.0413   +0.8644   +0.0207   
++0.0310   +0.0972   +0.0103   +0.8614   
+
++0.9072   +0.0444   +0.0262   +0.0222   
++0.0333   +0.9036   +0.0111   +0.0520   
++0.0787   +0.0444   +0.8547   +0.0222   
++0.0333   +0.1039   +0.0111   +0.8517   
+
++0.8999   +0.0480   +0.0282   +0.0240   
++0.0360   +0.8962   +0.0120   +0.0558   
++0.0847   +0.0480   +0.8434   +0.0240   
++0.0360   +0.1117   +0.0120   +0.8404   
+
++0.8908   +0.0524   +0.0306   +0.0262   
++0.0393   +0.8871   +0.0131   +0.0606   
++0.0919   +0.0524   +0.8295   +0.0262   
++0.0393   +0.1211   +0.0131   +0.8265   
+
++0.8783   +0.0585   +0.0340   +0.0293   
++0.0439   +0.8745   +0.0146   +0.0670   
++0.1019   +0.0585   +0.8104   +0.0293   
++0.0439   +0.1340   +0.0146   +0.8075   
+
++0.8545   +0.0703   +0.0401   +0.0351   
++0.0527   +0.8508   +0.0176   +0.0790   
++0.1203   +0.0703   +0.7743   +0.0351   
++0.0527   +0.1579   +0.0176   +0.7718   
+
+
+[5] P-matrix for branch length 0.200000
++0.9452   +0.0260   +0.0158   +0.0130   
++0.0195   +0.9426   +0.0065   +0.0313   
++0.0473   +0.0260   +0.9136   +0.0130   
++0.0195   +0.0627   +0.0065   +0.9113   
+
++0.9255   +0.0355   +0.0212   +0.0178   
++0.0266   +0.9223   +0.0089   +0.0421   
++0.0637   +0.0355   +0.8830   +0.0178   
++0.0266   +0.0843   +0.0089   +0.8802   
+
++0.9126   +0.0418   +0.0248   +0.0209   
++0.0313   +0.9092   +0.0104   +0.0491   
++0.0743   +0.0418   +0.8630   +0.0209   
++0.0313   +0.0982   +0.0104   +0.8601   
+
++0.9020   +0.0469   +0.0276   +0.0235   
++0.0352   +0.8984   +0.0117   +0.0547   
++0.0829   +0.0469   +0.8467   +0.0235   
++0.0352   +0.1094   +0.0117   +0.8437   
+
++0.8925   +0.0516   +0.0302   +0.0258   
++0.0387   +0.8888   +0.0129   +0.0597   
++0.0906   +0.0516   +0.8321   +0.0258   
++0.0387   +0.1194   +0.0129   +0.8291   
+
++0.8835   +0.0559   +0.0326   +0.0280   
++0.0419   +0.8798   +0.0140   +0.0643   
++0.0977   +0.0559   +0.8184   +0.0280   
++0.0419   +0.1286   +0.0140   +0.8154   
+
++0.8748   +0.0602   +0.0349   +0.0301   
++0.0452   +0.8710   +0.0151   +0.0688   
++0.1046   +0.0602   +0.8051   +0.0301   
++0.0452   +0.1375   +0.0151   +0.8023   
+
++0.8662   +0.0645   +0.0371   +0.0322   
++0.0484   +0.8624   +0.0161   +0.0732   
++0.1113   +0.0645   +0.7919   +0.0322   
++0.0484   +0.1463   +0.0161   +0.7892   
+
++0.8573   +0.0689   +0.0394   +0.0344   
++0.0517   +0.8535   +0.0172   +0.0776   
++0.1182   +0.0689   +0.7785   +0.0344   
++0.0517   +0.1552   +0.0172   +0.7760   
+
++0.8481   +0.0735   +0.0418   +0.0367   
++0.0551   +0.8444   +0.0184   +0.0822   
++0.1253   +0.0735   +0.7645   +0.0367   
++0.0551   +0.1643   +0.0184   +0.7622   
+
++0.8382   +0.0784   +0.0443   +0.0392   
++0.0588   +0.8346   +0.0196   +0.0870   
++0.1328   +0.0784   +0.7496   +0.0392   
++0.0588   +0.1739   +0.0196   +0.7477   
+
++0.8272   +0.0839   +0.0470   +0.0419   
++0.0629   +0.8239   +0.0210   +0.0922   
++0.1409   +0.0839   +0.7333   +0.0419   
++0.0629   +0.1844   +0.0210   +0.7317   
+
++0.8147   +0.0902   +0.0501   +0.0451   
++0.0676   +0.8117   +0.0225   +0.0981   
++0.1502   +0.0902   +0.7146   +0.0451   
++0.0676   +0.1962   +0.0225   +0.7136   
+
++0.7994   +0.0979   +0.0537   +0.0489   
++0.0734   +0.7970   +0.0245   +0.1051   
++0.1612   +0.0979   +0.6920   +0.0489   
++0.0734   +0.2103   +0.0245   +0.6918   
+
++0.7787   +0.1085   +0.0586   +0.0542   
++0.0814   +0.7771   +0.0271   +0.1144   
++0.1759   +0.1085   +0.6614   +0.0542   
++0.0814   +0.2289   +0.0271   +0.6627   
+
++0.7406   +0.1282   +0.0672   +0.0641   
++0.0961   +0.7412   +0.0320   +0.1306   
++0.2016   +0.1282   +0.6062   +0.0641   
++0.0961   +0.2612   +0.0320   +0.6106   
+
+
+[5] P-matrix for branch length 1.000000
++0.7672   +0.1143   +0.0612   +0.0572   
++0.0858   +0.7663   +0.0286   +0.1194   
++0.1837   +0.1143   +0.6448   +0.0572   
++0.0858   +0.2388   +0.0286   +0.6469   
+
++0.7015   +0.1487   +0.0754   +0.0744   
++0.1116   +0.7053   +0.0372   +0.1460   
++0.2263   +0.1487   +0.5506   +0.0744   
++0.1116   +0.2919   +0.0372   +0.5593   
+
++0.6628   +0.1695   +0.0829   +0.0848   
++0.1271   +0.6706   +0.0424   +0.1599   
++0.2488   +0.1695   +0.4969   +0.0848   
++0.1271   +0.3198   +0.0424   +0.5107   
+
++0.6333   +0.1856   +0.0882   +0.0928   
++0.1392   +0.6448   +0.0464   +0.1696   
++0.2647   +0.1856   +0.4569   +0.0928   
++0.1392   +0.3391   +0.0464   +0.4753   
+
++0.6086   +0.1993   +0.0923   +0.0997   
++0.1495   +0.6236   +0.0498   +0.1770   
++0.2770   +0.1993   +0.4240   +0.0997   
++0.1495   +0.3540   +0.0498   +0.4466   
+
++0.5868   +0.2116   +0.0957   +0.1058   
++0.1587   +0.6053   +0.0529   +0.1831   
++0.2871   +0.2116   +0.3954   +0.1058   
++0.1587   +0.3662   +0.0529   +0.4222   
+
++0.5669   +0.2231   +0.0986   +0.1115   
++0.1673   +0.5887   +0.0558   +0.1882   
++0.2957   +0.2231   +0.3697   +0.1115   
++0.1673   +0.3764   +0.0558   +0.4005   
+
++0.5481   +0.2339   +0.1010   +0.1170   
++0.1754   +0.5735   +0.0585   +0.1926   
++0.3031   +0.2339   +0.3461   +0.1170   
++0.1754   +0.3852   +0.0585   +0.3809   
+
++0.5301   +0.2445   +0.1032   +0.1222   
++0.1834   +0.5591   +0.0611   +0.1965   
++0.3095   +0.2445   +0.3237   +0.1222   
++0.1834   +0.3929   +0.0611   +0.3626   
+
++0.5125   +0.2550   +0.1051   +0.1275   
++0.1912   +0.5452   +0.0637   +0.1998   
++0.3152   +0.2550   +0.3023   +0.1275   
++0.1912   +0.3997   +0.0637   +0.3453   
+
++0.4948   +0.2656   +0.1067   +0.1328   
++0.1992   +0.5316   +0.0664   +0.2028   
++0.3202   +0.2656   +0.2814   +0.1328   
++0.1992   +0.4057   +0.0664   +0.3287   
+
++0.4768   +0.2766   +0.1082   +0.1383   
++0.2075   +0.5179   +0.0692   +0.2055   
++0.3246   +0.2766   +0.2604   +0.1383   
++0.2075   +0.4109   +0.0692   +0.3124   
+
++0.4579   +0.2885   +0.1094   +0.1442   
++0.2163   +0.5038   +0.0721   +0.2077   
++0.3283   +0.2885   +0.2390   +0.1442   
++0.2163   +0.4155   +0.0721   +0.2961   
+
++0.4371   +0.3017   +0.1104   +0.1508   
++0.2263   +0.4887   +0.0754   +0.2096   
++0.3312   +0.3017   +0.2163   +0.1508   
++0.2263   +0.4192   +0.0754   +0.2791   
+
++0.4124   +0.3177   +0.1109   +0.1589   
++0.2383   +0.4713   +0.0794   +0.2109   
++0.3328   +0.3177   +0.1905   +0.1589   
++0.2383   +0.4218   +0.0794   +0.2604   
+
++0.3766   +0.3420   +0.1104   +0.1710   
++0.2565   +0.4471   +0.0855   +0.2108   
++0.3311   +0.3420   +0.1559   +0.1710   
++0.2565   +0.4217   +0.0855   +0.2363   
+
+
+[5] P-matrix for branch length 1.000000
++0.7672   +0.1143   +0.0612   +0.0572   
++0.0858   +0.7663   +0.0286   +0.1194   
++0.1837   +0.1143   +0.6448   +0.0572   
++0.0858   +0.2388   +0.0286   +0.6469   
+
++0.7015   +0.1487   +0.0754   +0.0744   
++0.1116   +0.7053   +0.0372   +0.1460   
++0.2263   +0.1487   +0.5506   +0.0744   
++0.1116   +0.2919   +0.0372   +0.5593   
+
++0.6628   +0.1695   +0.0829   +0.0848   
++0.1271   +0.6706   +0.0424   +0.1599   
++0.2488   +0.1695   +0.4969   +0.0848   
++0.1271   +0.3198   +0.0424   +0.5107   
+
++0.6333   +0.1856   +0.0882   +0.0928   
++0.1392   +0.6448   +0.0464   +0.1696   
++0.2647   +0.1856   +0.4569   +0.0928   
++0.1392   +0.3391   +0.0464   +0.4753   
+
++0.6086   +0.1993   +0.0923   +0.0997   
++0.1495   +0.6236   +0.0498   +0.1770   
++0.2770   +0.1993   +0.4240   +0.0997   
++0.1495   +0.3540   +0.0498   +0.4466   
+
++0.5868   +0.2116   +0.0957   +0.1058   
++0.1587   +0.6053   +0.0529   +0.1831   
++0.2871   +0.2116   +0.3954   +0.1058   
++0.1587   +0.3662   +0.0529   +0.4222   
+
++0.5669   +0.2231   +0.0986   +0.1115   
++0.1673   +0.5887   +0.0558   +0.1882   
++0.2957   +0.2231   +0.3697   +0.1115   
++0.1673   +0.3764   +0.0558   +0.4005   
+
++0.5481   +0.2339   +0.1010   +0.1170   
++0.1754   +0.5735   +0.0585   +0.1926   
++0.3031   +0.2339   +0.3461   +0.1170   
++0.1754   +0.3852   +0.0585   +0.3809   
+
++0.5301   +0.2445   +0.1032   +0.1222   
++0.1834   +0.5591   +0.0611   +0.1965   
++0.3095   +0.2445   +0.3237   +0.1222   
++0.1834   +0.3929   +0.0611   +0.3626   
+
++0.5125   +0.2550   +0.1051   +0.1275   
++0.1912   +0.5452   +0.0637   +0.1998   
++0.3152   +0.2550   +0.3023   +0.1275   
++0.1912   +0.3997   +0.0637   +0.3453   
+
++0.4948   +0.2656   +0.1067   +0.1328   
++0.1992   +0.5316   +0.0664   +0.2028   
++0.3202   +0.2656   +0.2814   +0.1328   
++0.1992   +0.4057   +0.0664   +0.3287   
+
++0.4768   +0.2766   +0.1082   +0.1383   
++0.2075   +0.5179   +0.0692   +0.2055   
++0.3246   +0.2766   +0.2604   +0.1383   
++0.2075   +0.4109   +0.0692   +0.3124   
+
++0.4579   +0.2885   +0.1094   +0.1442   
++0.2163   +0.5038   +0.0721   +0.2077   
++0.3283   +0.2885   +0.2390   +0.1442   
++0.2163   +0.4155   +0.0721   +0.2961   
+
++0.4371   +0.3017   +0.1104   +0.1508   
++0.2263   +0.4887   +0.0754   +0.2096   
++0.3312   +0.3017   +0.2163   +0.1508   
++0.2263   +0.4192   +0.0754   +0.2791   
+
++0.4124   +0.3177   +0.1109   +0.1589   
++0.2383   +0.4713   +0.0794   +0.2109   
++0.3328   +0.3177   +0.1905   +0.1589   
++0.2383   +0.4218   +0.0794   +0.2604   
+
++0.3766   +0.3420   +0.1104   +0.1710   
++0.2565   +0.4471   +0.0855   +0.2108   
++0.3311   +0.3420   +0.1559   +0.1710   
++0.2565   +0.4217   +0.0855   +0.2363   
+
+
+[5] CLV 5: [ {(0.02496,0.04796,0.00157,0.05835),(0.03351,0.06345,0.00289,0.07644),(0.03898,0.07309,0.00398,0.08750),(0.04341,0.08075,0.00499,0.09615),(0.04734,0.08741,0.00600,0.10358),(0.05098,0.09349,0.00703,0.11029),(0.05448,0.09923,0.00811,0.11655),(0.05793,0.10479,0.00926,0.12255),(0.06141,0.11031,0.01051,0.12842),(0.06500,0.11589,0.01190,0.13429),(0.06878,0.12166,0.01348,0.14028),(0.07289,0.12779,0.01533,0.14654),(0.07752,0.13452,0.01760,0.15329),(0.08304,0.14230,0.02057,0.16091),(0 [...]
+[5] CLV 6: [ {(0.02391,0.00093,0.00015,0.00112),(0.03156,0.00168,0.00036,0.00200),(0.03630,0.00227,0.00057,0.00268),(0.04004,0.00282,0.00080,0.00330),(0.04328,0.00335,0.00104,0.00390),(0.04622,0.00388,0.00130,0.00449),(0.04898,0.00443,0.00160,0.00510),(0.05164,0.00501,0.00193,0.00573),(0.05425,0.00562,0.00231,0.00640),(0.05688,0.00629,0.00275,0.00713),(0.05958,0.00704,0.00327,0.00793),(0.06241,0.00791,0.00391,0.00885),(0.06548,0.00893,0.00474,0.00993),(0.06897,0.01024,0.00586,0.01129),(0 [...]
+[5] CLV 7: [ {(0.00068,0.88851,0.00068,0.00393),(0.00126,0.85069,0.00126,0.00711),(0.00174,0.82658,0.00174,0.00964),(0.00220,0.80709,0.00220,0.01197),(0.00266,0.78990,0.00266,0.01425),(0.00313,0.77396,0.00313,0.01655),(0.00362,0.75869,0.00362,0.01892),(0.00416,0.74366,0.00416,0.02141),(0.00474,0.72854,0.00474,0.02408),(0.00540,0.71299,0.00540,0.02699),(0.00615,0.69662,0.00615,0.03026),(0.00703,0.67887,0.00703,0.03401),(0.00813,0.65892,0.00813,0.03850),(0.00958,0.63517,0.00958,0.04422),(0 [...]
+
+
+ TEST alpha(ncats) =   5.00(16), mode = MEDIAN
 
 0.329700 0.475124 0.564463 0.639024 0.706955 0.771882 0.836003 0.901001 0.968452 1.040121 1.118293 1.206340 1.309932 1.440322 1.626881 2.065506 
 [5] P-matrix for branch length 0.100000
@@ -5276,23 +10568,359 @@
 +0.3311   +0.3012   +0.2171   +0.1506   
 +0.2259   +0.4191   +0.0753   +0.2797   
 
-+0.4127   +0.3176   +0.1109   +0.1588   
-+0.2382   +0.4715   +0.0794   +0.2109   
-+0.3328   +0.3176   +0.1908   +0.1588   
-+0.2382   +0.4218   +0.0794   +0.2606   
++0.4127   +0.3176   +0.1109   +0.1588   
++0.2382   +0.4715   +0.0794   +0.2109   
++0.3328   +0.3176   +0.1908   +0.1588   
++0.2382   +0.4218   +0.0794   +0.2606   
+
++0.3707   +0.3462   +0.1101   +0.1731   
++0.2596   +0.4433   +0.0865   +0.2106   
++0.3303   +0.3462   +0.1505   +0.1731   
++0.2596   +0.4211   +0.0865   +0.2327   
+
+
+[5] CLV 5: [ {(0.02382,0.04586,0.00143,0.05587),(0.03327,0.06302,0.00285,0.07595),(0.03878,0.07274,0.00393,0.08710),(0.04321,0.08041,0.00494,0.09577),(0.04713,0.08706,0.00594,0.10320),(0.05077,0.09314,0.00697,0.10990),(0.05426,0.09887,0.00804,0.11616),(0.05771,0.10443,0.00918,0.12216),(0.06118,0.10994,0.01042,0.12803),(0.06476,0.11552,0.01180,0.13390),(0.06854,0.12129,0.01338,0.13990),(0.07264,0.12743,0.01522,0.14617),(0.07728,0.13418,0.01748,0.15295),(0.08283,0.14201,0.02045,0.16064),(0 [...]
+[5] CLV 6: [ {(0.02286,0.00085,0.00013,0.00102),(0.03135,0.00166,0.00035,0.00197),(0.03613,0.00225,0.00057,0.00265),(0.03987,0.00279,0.00079,0.00327),(0.04311,0.00332,0.00103,0.00386),(0.04605,0.00385,0.00129,0.00446),(0.04881,0.00439,0.00158,0.00506),(0.05146,0.00497,0.00191,0.00569),(0.05408,0.00558,0.00228,0.00636),(0.05671,0.00625,0.00272,0.00708),(0.05941,0.00699,0.00324,0.00788),(0.06225,0.00785,0.00387,0.00879),(0.06533,0.00888,0.00469,0.00987),(0.06884,0.01019,0.00582,0.01124),(0 [...]
+[5] CLV 7: [ {(0.00062,0.89357,0.00062,0.00358),(0.00124,0.85175,0.00124,0.00700),(0.00172,0.82747,0.00172,0.00953),(0.00218,0.80797,0.00218,0.01186),(0.00263,0.79080,0.00263,0.01412),(0.00310,0.77489,0.00310,0.01641),(0.00359,0.75965,0.00359,0.01876),(0.00412,0.74465,0.00412,0.02124),(0.00470,0.72956,0.00470,0.02389),(0.00535,0.71403,0.00535,0.02679),(0.00610,0.69767,0.00610,0.03004),(0.00698,0.67992,0.00698,0.03378),(0.00807,0.65994,0.00807,0.03826),(0.00952,0.63607,0.00952,0.04399),(0 [...]
+
+
+ TEST alpha(ncats) =  10.00(16), mode = MEAN
+
+0.499646 0.615338 0.688394 0.747621 0.800287 0.849601 0.897432 0.945129 0.993875 1.044912 1.099775 1.160652 1.231124 1.318109 1.438808 1.669295 
+[6] P-matrix for branch length 0.100000
++0.9600   +0.0189   +0.0116   +0.0095   
++0.0142   +0.9580   +0.0047   +0.0230   
++0.0347   +0.0189   +0.9369   +0.0095   
++0.0142   +0.0461   +0.0047   +0.9350   
+
++0.9511   +0.0232   +0.0141   +0.0116   
++0.0174   +0.9488   +0.0058   +0.0280   
++0.0423   +0.0232   +0.9229   +0.0116   
++0.0174   +0.0561   +0.0058   +0.9207   
+
++0.9456   +0.0259   +0.0157   +0.0129   
++0.0194   +0.9430   +0.0065   +0.0311   
++0.0470   +0.0259   +0.9142   +0.0129   
++0.0194   +0.0623   +0.0065   +0.9119   
+
++0.9411   +0.0280   +0.0169   +0.0140   
++0.0210   +0.9384   +0.0070   +0.0336   
++0.0507   +0.0280   +0.9073   +0.0140   
++0.0210   +0.0672   +0.0070   +0.9048   
+
++0.9371   +0.0299   +0.0180   +0.0150   
++0.0224   +0.9343   +0.0075   +0.0358   
++0.0540   +0.0299   +0.9011   +0.0150   
++0.0224   +0.0716   +0.0075   +0.8985   
+
++0.9335   +0.0317   +0.0190   +0.0158   
++0.0238   +0.9305   +0.0079   +0.0378   
++0.0571   +0.0317   +0.8954   +0.0158   
++0.0238   +0.0756   +0.0079   +0.8927   
+
++0.9299   +0.0334   +0.0200   +0.0167   
++0.0250   +0.9269   +0.0083   +0.0397   
++0.0600   +0.0334   +0.8899   +0.0167   
++0.0250   +0.0795   +0.0083   +0.8872   
+
++0.9264   +0.0351   +0.0210   +0.0175   
++0.0263   +0.9233   +0.0088   +0.0416   
++0.0630   +0.0351   +0.8844   +0.0175   
++0.0263   +0.0833   +0.0088   +0.8816   
+
++0.9228   +0.0368   +0.0220   +0.0184   
++0.0276   +0.9196   +0.0092   +0.0436   
++0.0659   +0.0368   +0.8789   +0.0184   
++0.0276   +0.0871   +0.0092   +0.8761   
+
++0.9191   +0.0386   +0.0230   +0.0193   
++0.0289   +0.9158   +0.0096   +0.0456   
++0.0690   +0.0386   +0.8732   +0.0193   
++0.0289   +0.0911   +0.0096   +0.8703   
+
++0.9152   +0.0405   +0.0241   +0.0203   
++0.0304   +0.9118   +0.0101   +0.0477   
++0.0722   +0.0405   +0.8670   +0.0203   
++0.0304   +0.0954   +0.0101   +0.8641   
+
++0.9108   +0.0426   +0.0253   +0.0213   
++0.0320   +0.9073   +0.0107   +0.0500   
++0.0758   +0.0426   +0.8603   +0.0213   
++0.0320   +0.1001   +0.0107   +0.8573   
+
++0.9058   +0.0451   +0.0266   +0.0225   
++0.0338   +0.9022   +0.0113   +0.0527   
++0.0799   +0.0451   +0.8526   +0.0225   
++0.0338   +0.1054   +0.0113   +0.8495   
+
++0.8997   +0.0480   +0.0283   +0.0240   
++0.0360   +0.8960   +0.0120   +0.0559   
++0.0848   +0.0480   +0.8431   +0.0240   
++0.0360   +0.1119   +0.0120   +0.8401   
+
++0.8913   +0.0521   +0.0305   +0.0261   
++0.0391   +0.8875   +0.0130   +0.0603   
++0.0915   +0.0521   +0.8302   +0.0261   
++0.0391   +0.1206   +0.0130   +0.8272   
+
++0.8756   +0.0598   +0.0347   +0.0299   
++0.0449   +0.8718   +0.0150   +0.0684   
++0.1040   +0.0598   +0.8062   +0.0299   
++0.0449   +0.1368   +0.0150   +0.8034   
+
+
+[6] P-matrix for branch length 0.200000
++0.9224   +0.0370   +0.0221   +0.0185   
++0.0277   +0.9192   +0.0092   +0.0438   
++0.0662   +0.0370   +0.8783   +0.0185   
++0.0277   +0.0876   +0.0092   +0.8754   
+
++0.9058   +0.0450   +0.0266   +0.0225   
++0.0338   +0.9023   +0.0113   +0.0527   
++0.0798   +0.0450   +0.8526   +0.0225   
++0.0338   +0.1054   +0.0113   +0.8496   
+
++0.8956   +0.0500   +0.0294   +0.0250   
++0.0375   +0.8919   +0.0125   +0.0581   
++0.0881   +0.0500   +0.8368   +0.0250   
++0.0375   +0.1162   +0.0125   +0.8338   
+
++0.8874   +0.0540   +0.0315   +0.0270   
++0.0405   +0.8836   +0.0135   +0.0623   
++0.0946   +0.0540   +0.8243   +0.0270   
++0.0405   +0.1247   +0.0135   +0.8213   
+
++0.8802   +0.0576   +0.0334   +0.0288   
++0.0432   +0.8764   +0.0144   +0.0660   
++0.1003   +0.0576   +0.8133   +0.0288   
++0.0432   +0.1321   +0.0144   +0.8104   
+
++0.8736   +0.0608   +0.0352   +0.0304   
++0.0456   +0.8698   +0.0152   +0.0694   
++0.1056   +0.0608   +0.8032   +0.0304   
++0.0456   +0.1388   +0.0152   +0.8003   
+
++0.8672   +0.0640   +0.0368   +0.0320   
++0.0480   +0.8634   +0.0160   +0.0726   
++0.1105   +0.0640   +0.7935   +0.0320   
++0.0480   +0.1453   +0.0160   +0.7908   
+
++0.8609   +0.0671   +0.0385   +0.0335   
++0.0503   +0.8572   +0.0168   +0.0758   
++0.1154   +0.0671   +0.7840   +0.0335   
++0.0503   +0.1515   +0.0168   +0.7814   
+
++0.8546   +0.0702   +0.0401   +0.0351   
++0.0527   +0.8509   +0.0176   +0.0789   
++0.1203   +0.0702   +0.7744   +0.0351   
++0.0527   +0.1578   +0.0176   +0.7720   
+
++0.8481   +0.0735   +0.0418   +0.0367   
++0.0551   +0.8444   +0.0184   +0.0821   
++0.1253   +0.0735   +0.7645   +0.0367   
++0.0551   +0.1643   +0.0184   +0.7623   
+
++0.8411   +0.0769   +0.0435   +0.0385   
++0.0577   +0.8376   +0.0192   +0.0855   
++0.1305   +0.0769   +0.7541   +0.0385   
++0.0577   +0.1711   +0.0192   +0.7520   
+
++0.8335   +0.0807   +0.0454   +0.0404   
++0.0605   +0.8301   +0.0202   +0.0892   
++0.1363   +0.0807   +0.7427   +0.0404   
++0.0605   +0.1784   +0.0202   +0.7409   
+
++0.8249   +0.0851   +0.0476   +0.0425   
++0.0638   +0.8216   +0.0213   +0.0933   
++0.1427   +0.0851   +0.7297   +0.0425   
++0.0638   +0.1867   +0.0213   +0.7283   
+
++0.8144   +0.0903   +0.0501   +0.0452   
++0.0677   +0.8114   +0.0226   +0.0983   
++0.1504   +0.0903   +0.7141   +0.0452   
++0.0677   +0.1965   +0.0226   +0.7132   
+
++0.8002   +0.0975   +0.0536   +0.0487   
++0.0731   +0.7977   +0.0244   +0.1048   
++0.1607   +0.0975   +0.6931   +0.0487   
++0.0731   +0.2096   +0.0244   +0.6929   
+
++0.7743   +0.1107   +0.0596   +0.0554   
++0.0831   +0.7729   +0.0277   +0.1164   
++0.1789   +0.1107   +0.6550   +0.0554   
++0.0831   +0.2327   +0.0277   +0.6565   
+
+
+[6] P-matrix for branch length 1.000000
++0.6921   +0.1537   +0.0773   +0.0769   
++0.1153   +0.6968   +0.0384   +0.1495   
++0.2319   +0.1537   +0.5375   +0.0769   
++0.1153   +0.2989   +0.0384   +0.5473   
+
++0.6437   +0.1799   +0.0864   +0.0900   
++0.1349   +0.6539   +0.0450   +0.1662   
++0.2592   +0.1799   +0.4709   +0.0900   
++0.1349   +0.3325   +0.0450   +0.4876   
+
++0.6165   +0.1950   +0.0911   +0.0975   
++0.1462   +0.6303   +0.0487   +0.1747   
++0.2732   +0.1950   +0.4343   +0.0975   
++0.1462   +0.3494   +0.0487   +0.4556   
+
++0.5960   +0.2064   +0.0943   +0.1032   
++0.1548   +0.6130   +0.0516   +0.1806   
++0.2830   +0.2064   +0.4074   +0.1032   
++0.1548   +0.3612   +0.0516   +0.4324   
+
++0.5790   +0.2161   +0.0969   +0.1080   
++0.1621   +0.5988   +0.0540   +0.1851   
++0.2906   +0.2161   +0.3853   +0.1080   
++0.1621   +0.3703   +0.0540   +0.4136   
+
++0.5640   +0.2247   +0.0989   +0.1123   
++0.1685   +0.5864   +0.0562   +0.1889   
++0.2968   +0.2247   +0.3661   +0.1123   
++0.1685   +0.3778   +0.0562   +0.3975   
+
++0.5503   +0.2326   +0.1007   +0.1163   
++0.1745   +0.5752   +0.0582   +0.1921   
++0.3022   +0.2326   +0.3488   +0.1163   
++0.1745   +0.3842   +0.0582   +0.3831   
+
++0.5374   +0.2402   +0.1023   +0.1201   
++0.1802   +0.5648   +0.0601   +0.1950   
++0.3070   +0.2402   +0.3327   +0.1201   
++0.1802   +0.3899   +0.0601   +0.3699   
+
++0.5248   +0.2476   +0.1038   +0.1238   
++0.1857   +0.5549   +0.0619   +0.1975   
++0.3113   +0.2476   +0.3173   +0.1238   
++0.1857   +0.3950   +0.0619   +0.3574   
+
++0.5125   +0.2550   +0.1051   +0.1275   
++0.1912   +0.5452   +0.0637   +0.1998   
++0.3152   +0.2550   +0.3023   +0.1275   
++0.1912   +0.3997   +0.0637   +0.3454   
+
++0.5000   +0.2625   +0.1063   +0.1312   
++0.1969   +0.5355   +0.0656   +0.2020   
++0.3188   +0.2625   +0.2874   +0.1312   
++0.1969   +0.4040   +0.0656   +0.3335   
+
++0.4870   +0.2704   +0.1074   +0.1352   
++0.2028   +0.5256   +0.0676   +0.2040   
++0.3222   +0.2704   +0.2722   +0.1352   
++0.2028   +0.4081   +0.0676   +0.3216   
+
++0.4731   +0.2790   +0.1085   +0.1395   
++0.2092   +0.5151   +0.0697   +0.2059   
++0.3254   +0.2790   +0.2562   +0.1395   
++0.2092   +0.4119   +0.0697   +0.3092   
+
++0.4574   +0.2888   +0.1095   +0.1444   
++0.2166   +0.5035   +0.0722   +0.2078   
++0.3284   +0.2888   +0.2385   +0.1444   
++0.2166   +0.4156   +0.0722   +0.2957   
+
++0.4381   +0.3011   +0.1104   +0.1505   
++0.2258   +0.4894   +0.0753   +0.2095   
++0.3311   +0.3011   +0.2173   +0.1505   
++0.2258   +0.4191   +0.0753   +0.2799   
+
++0.4077   +0.3209   +0.1110   +0.1604   
++0.2407   +0.4681   +0.0802   +0.2110   
++0.3329   +0.3209   +0.1858   +0.1604   
++0.2407   +0.4221   +0.0802   +0.2570   
+
+
+[6] P-matrix for branch length 1.000000
++0.6921   +0.1537   +0.0773   +0.0769   
++0.1153   +0.6968   +0.0384   +0.1495   
++0.2319   +0.1537   +0.5375   +0.0769   
++0.1153   +0.2989   +0.0384   +0.5473   
+
++0.6437   +0.1799   +0.0864   +0.0900   
++0.1349   +0.6539   +0.0450   +0.1662   
++0.2592   +0.1799   +0.4709   +0.0900   
++0.1349   +0.3325   +0.0450   +0.4876   
+
++0.6165   +0.1950   +0.0911   +0.0975   
++0.1462   +0.6303   +0.0487   +0.1747   
++0.2732   +0.1950   +0.4343   +0.0975   
++0.1462   +0.3494   +0.0487   +0.4556   
+
++0.5960   +0.2064   +0.0943   +0.1032   
++0.1548   +0.6130   +0.0516   +0.1806   
++0.2830   +0.2064   +0.4074   +0.1032   
++0.1548   +0.3612   +0.0516   +0.4324   
+
++0.5790   +0.2161   +0.0969   +0.1080   
++0.1621   +0.5988   +0.0540   +0.1851   
++0.2906   +0.2161   +0.3853   +0.1080   
++0.1621   +0.3703   +0.0540   +0.4136   
+
++0.5640   +0.2247   +0.0989   +0.1123   
++0.1685   +0.5864   +0.0562   +0.1889   
++0.2968   +0.2247   +0.3661   +0.1123   
++0.1685   +0.3778   +0.0562   +0.3975   
+
++0.5503   +0.2326   +0.1007   +0.1163   
++0.1745   +0.5752   +0.0582   +0.1921   
++0.3022   +0.2326   +0.3488   +0.1163   
++0.1745   +0.3842   +0.0582   +0.3831   
+
++0.5374   +0.2402   +0.1023   +0.1201   
++0.1802   +0.5648   +0.0601   +0.1950   
++0.3070   +0.2402   +0.3327   +0.1201   
++0.1802   +0.3899   +0.0601   +0.3699   
+
++0.5248   +0.2476   +0.1038   +0.1238   
++0.1857   +0.5549   +0.0619   +0.1975   
++0.3113   +0.2476   +0.3173   +0.1238   
++0.1857   +0.3950   +0.0619   +0.3574   
+
++0.5125   +0.2550   +0.1051   +0.1275   
++0.1912   +0.5452   +0.0637   +0.1998   
++0.3152   +0.2550   +0.3023   +0.1275   
++0.1912   +0.3997   +0.0637   +0.3454   
+
++0.5000   +0.2625   +0.1063   +0.1312   
++0.1969   +0.5355   +0.0656   +0.2020   
++0.3188   +0.2625   +0.2874   +0.1312   
++0.1969   +0.4040   +0.0656   +0.3335   
+
++0.4870   +0.2704   +0.1074   +0.1352   
++0.2028   +0.5256   +0.0676   +0.2040   
++0.3222   +0.2704   +0.2722   +0.1352   
++0.2028   +0.4081   +0.0676   +0.3216   
+
++0.4731   +0.2790   +0.1085   +0.1395   
++0.2092   +0.5151   +0.0697   +0.2059   
++0.3254   +0.2790   +0.2562   +0.1395   
++0.2092   +0.4119   +0.0697   +0.3092   
+
++0.4574   +0.2888   +0.1095   +0.1444   
++0.2166   +0.5035   +0.0722   +0.2078   
++0.3284   +0.2888   +0.2385   +0.1444   
++0.2166   +0.4156   +0.0722   +0.2957   
+
++0.4381   +0.3011   +0.1104   +0.1505   
++0.2258   +0.4894   +0.0753   +0.2095   
++0.3311   +0.3011   +0.2173   +0.1505   
++0.2258   +0.4191   +0.0753   +0.2799   
 
-+0.3707   +0.3462   +0.1101   +0.1731   
-+0.2596   +0.4433   +0.0865   +0.2106   
-+0.3303   +0.3462   +0.1505   +0.1731   
-+0.2596   +0.4211   +0.0865   +0.2327   
++0.4077   +0.3209   +0.1110   +0.1604   
++0.2407   +0.4681   +0.0802   +0.2110   
++0.3329   +0.3209   +0.1858   +0.1604   
++0.2407   +0.4221   +0.0802   +0.2570   
 
 
-[5] CLV 5: [ {(0.02382,0.04586,0.00143,0.05587),(0.03327,0.06302,0.00285,0.07595),(0.03878,0.07274,0.00393,0.08710),(0.04321,0.08041,0.00494,0.09577),(0.04713,0.08706,0.00594,0.10320),(0.05077,0.09314,0.00697,0.10990),(0.05426,0.09887,0.00804,0.11616),(0.05771,0.10443,0.00918,0.12216),(0.06118,0.10994,0.01042,0.12803),(0.06476,0.11552,0.01180,0.13390),(0.06854,0.12129,0.01338,0.13990),(0.07264,0.12743,0.01522,0.14617),(0.07728,0.13418,0.01748,0.15295),(0.08283,0.14201,0.02045,0.16064),(0 [...]
-[5] CLV 6: [ {(0.02286,0.00085,0.00013,0.00102),(0.03135,0.00166,0.00035,0.00197),(0.03613,0.00225,0.00057,0.00265),(0.03987,0.00279,0.00079,0.00327),(0.04311,0.00332,0.00103,0.00386),(0.04605,0.00385,0.00129,0.00446),(0.04881,0.00439,0.00158,0.00506),(0.05146,0.00497,0.00191,0.00569),(0.05408,0.00558,0.00228,0.00636),(0.05671,0.00625,0.00272,0.00708),(0.05941,0.00699,0.00324,0.00788),(0.06225,0.00785,0.00387,0.00879),(0.06533,0.00888,0.00469,0.00987),(0.06884,0.01019,0.00582,0.01124),(0 [...]
-[5] CLV 7: [ {(0.00062,0.89357,0.00062,0.00358),(0.00124,0.85175,0.00124,0.00700),(0.00172,0.82747,0.00172,0.00953),(0.00218,0.80797,0.00218,0.01186),(0.00263,0.79080,0.00263,0.01412),(0.00310,0.77489,0.00310,0.01641),(0.00359,0.75965,0.00359,0.01876),(0.00412,0.74465,0.00412,0.02124),(0.00470,0.72956,0.00470,0.02389),(0.00535,0.71403,0.00535,0.02679),(0.00610,0.69767,0.00610,0.03004),(0.00698,0.67992,0.00698,0.03378),(0.00807,0.65994,0.00807,0.03826),(0.00952,0.63607,0.00952,0.04399),(0 [...]
+[6] CLV 5: [ {(0.03480,0.06575,0.00313,0.07909),(0.04182,0.07802,0.00461,0.09308),(0.04607,0.08528,0.00566,0.10121),(0.04942,0.09090,0.00658,0.10744),(0.05233,0.09571,0.00743,0.11272),(0.05499,0.10006,0.00827,0.11744),(0.05752,0.10413,0.00912,0.12184),(0.05999,0.10806,0.00999,0.12604),(0.06246,0.11195,0.01091,0.13016),(0.06499,0.11588,0.01190,0.13428),(0.06765,0.11995,0.01300,0.13851),(0.07053,0.12429,0.01425,0.14298),(0.07377,0.12909,0.01575,0.14785),(0.07764,0.13470,0.01766,0.15346),(0 [...]
+[6] CLV 6: [ {(0.03269,0.00181,0.00041,0.00215),(0.03871,0.00261,0.00071,0.00307),(0.04224,0.00317,0.00096,0.00370),(0.04497,0.00365,0.00119,0.00423),(0.04729,0.00409,0.00141,0.00472),(0.04937,0.00451,0.00164,0.00519),(0.05132,0.00494,0.00189,0.00566),(0.05319,0.00537,0.00215,0.00613),(0.05503,0.00582,0.00243,0.00661),(0.05688,0.00629,0.00275,0.00713),(0.05879,0.00682,0.00311,0.00769),(0.06080,0.00741,0.00354,0.00832),(0.06301,0.00810,0.00406,0.00905),(0.06556,0.00896,0.00476,0.00996),(0 [...]
+[6] CLV 7: [ {(0.00137,0.84498,0.00137,0.00767),(0.00203,0.81409,0.00203,0.01110),(0.00250,0.79544,0.00250,0.01349),(0.00292,0.78078,0.00292,0.01554),(0.00331,0.76808,0.00331,0.01744),(0.00370,0.75647,0.00370,0.01927),(0.00409,0.74546,0.00409,0.02110),(0.00450,0.73472,0.00450,0.02297),(0.00493,0.72399,0.00493,0.02491),(0.00540,0.71301,0.00540,0.02699),(0.00592,0.70149,0.00592,0.02926),(0.00651,0.68904,0.00651,0.03183),(0.00723,0.67506,0.00723,0.03484),(0.00816,0.65840,0.00816,0.03862),(0 [...]
 
 
- TEST alpha(ncats) =  10.00(16)
+ TEST alpha(ncats) =  10.00(16), mode = MEDIAN
 
 0.481913 0.612355 0.686134 0.745487 0.798149 0.847415 0.895181 0.942807 0.991482 1.042454 1.097269 1.158138 1.228706 1.316117 1.438827 1.717565 
 [6] P-matrix for branch length 0.100000
@@ -5628,7 +11256,343 @@
 [6] CLV 7: [ {(0.00128,0.84987,0.00128,0.00719),(0.00201,0.81487,0.00201,0.01101),(0.00249,0.79600,0.00249,0.01342),(0.00291,0.78130,0.00291,0.01547),(0.00330,0.76859,0.00330,0.01736),(0.00368,0.75698,0.00368,0.01919),(0.00407,0.74597,0.00407,0.02101),(0.00448,0.73524,0.00448,0.02287),(0.00491,0.72451,0.00491,0.02482),(0.00537,0.71353,0.00537,0.02689),(0.00589,0.70201,0.00589,0.02916),(0.00649,0.68955,0.00649,0.03172),(0.00721,0.67553,0.00721,0.03474),(0.00814,0.65877,0.00814,0.03853),(0 [...]
 
 
- TEST alpha(ncats) =  50.00(16)
+ TEST alpha(ncats) =  50.00(16), mode = MEAN
+
+0.753910 0.819477 0.858213 0.888396 0.914442 0.938225 0.960788 0.982835 1.004938 1.027653 1.051623 1.077721 1.107331 1.143076 1.191366 1.280007 
+[7] P-matrix for branch length 0.100000
++0.9406   +0.0282   +0.0170   +0.0141   
++0.0212   +0.9379   +0.0071   +0.0339   
++0.0511   +0.0282   +0.9065   +0.0141   
++0.0212   +0.0677   +0.0071   +0.9040   
+
++0.9357   +0.0306   +0.0184   +0.0153   
++0.0229   +0.9328   +0.0076   +0.0366   
++0.0552   +0.0306   +0.8989   +0.0153   
++0.0229   +0.0731   +0.0076   +0.8963   
+
++0.9328   +0.0320   +0.0192   +0.0160   
++0.0240   +0.9299   +0.0080   +0.0381   
++0.0576   +0.0320   +0.8944   +0.0160   
++0.0240   +0.0763   +0.0080   +0.8917   
+
++0.9306   +0.0331   +0.0198   +0.0165   
++0.0248   +0.9276   +0.0083   +0.0394   
++0.0595   +0.0331   +0.8909   +0.0165   
++0.0248   +0.0787   +0.0083   +0.8882   
+
++0.9287   +0.0340   +0.0204   +0.0170   
++0.0255   +0.9256   +0.0085   +0.0404   
++0.0611   +0.0340   +0.8879   +0.0170   
++0.0255   +0.0808   +0.0085   +0.8852   
+
++0.9269   +0.0348   +0.0208   +0.0174   
++0.0261   +0.9238   +0.0087   +0.0414   
++0.0625   +0.0348   +0.8852   +0.0174   
++0.0261   +0.0827   +0.0087   +0.8824   
+
++0.9253   +0.0356   +0.0213   +0.0178   
++0.0267   +0.9221   +0.0089   +0.0423   
++0.0639   +0.0356   +0.8827   +0.0178   
++0.0267   +0.0845   +0.0089   +0.8798   
+
++0.9236   +0.0364   +0.0217   +0.0182   
++0.0273   +0.9205   +0.0091   +0.0431   
++0.0652   +0.0364   +0.8802   +0.0182   
++0.0273   +0.0863   +0.0091   +0.8773   
+
++0.9220   +0.0372   +0.0222   +0.0186   
++0.0279   +0.9188   +0.0093   +0.0440   
++0.0666   +0.0372   +0.8777   +0.0186   
++0.0279   +0.0880   +0.0093   +0.8748   
+
++0.9204   +0.0380   +0.0226   +0.0190   
++0.0285   +0.9171   +0.0095   +0.0449   
++0.0679   +0.0380   +0.8751   +0.0190   
++0.0285   +0.0898   +0.0095   +0.8722   
+
++0.9186   +0.0388   +0.0231   +0.0194   
++0.0291   +0.9153   +0.0097   +0.0458   
++0.0694   +0.0388   +0.8724   +0.0194   
++0.0291   +0.0917   +0.0097   +0.8695   
+
++0.9168   +0.0397   +0.0236   +0.0199   
++0.0298   +0.9134   +0.0099   +0.0469   
++0.0709   +0.0397   +0.8695   +0.0199   
++0.0298   +0.0937   +0.0099   +0.8666   
+
++0.9146   +0.0408   +0.0242   +0.0204   
++0.0306   +0.9112   +0.0102   +0.0480   
++0.0727   +0.0408   +0.8662   +0.0204   
++0.0306   +0.0960   +0.0102   +0.8632   
+
++0.9121   +0.0420   +0.0249   +0.0210   
++0.0315   +0.9086   +0.0105   +0.0494   
++0.0748   +0.0420   +0.8622   +0.0210   
++0.0315   +0.0987   +0.0105   +0.8593   
+
++0.9086   +0.0437   +0.0259   +0.0218   
++0.0328   +0.9051   +0.0109   +0.0512   
++0.0776   +0.0437   +0.8569   +0.0218   
++0.0328   +0.1024   +0.0109   +0.8539   
+
++0.9023   +0.0467   +0.0275   +0.0234   
++0.0351   +0.8987   +0.0117   +0.0545   
++0.0826   +0.0467   +0.8472   +0.0234   
++0.0351   +0.1090   +0.0117   +0.8442   
+
+
+[7] P-matrix for branch length 0.200000
++0.8865   +0.0545   +0.0318   +0.0272   
++0.0409   +0.8827   +0.0136   +0.0628   
++0.0953   +0.0545   +0.8230   +0.0272   
++0.0409   +0.1256   +0.0136   +0.8200   
+
++0.8776   +0.0588   +0.0341   +0.0294   
++0.0441   +0.8738   +0.0147   +0.0674   
++0.1024   +0.0588   +0.8094   +0.0294   
++0.0441   +0.1347   +0.0147   +0.8064   
+
++0.8724   +0.0614   +0.0355   +0.0307   
++0.0460   +0.8686   +0.0153   +0.0700   
++0.1065   +0.0614   +0.8014   +0.0307   
++0.0460   +0.1400   +0.0153   +0.7986   
+
++0.8684   +0.0634   +0.0365   +0.0317   
++0.0475   +0.8646   +0.0158   +0.0720   
++0.1096   +0.0634   +0.7953   +0.0317   
++0.0475   +0.1441   +0.0158   +0.7926   
+
++0.8650   +0.0651   +0.0374   +0.0325   
++0.0488   +0.8612   +0.0163   +0.0738   
++0.1123   +0.0651   +0.7901   +0.0325   
++0.0488   +0.1475   +0.0163   +0.7874   
+
++0.8618   +0.0666   +0.0382   +0.0333   
++0.0500   +0.8581   +0.0167   +0.0753   
++0.1147   +0.0666   +0.7854   +0.0333   
++0.0500   +0.1506   +0.0167   +0.7827   
+
++0.8589   +0.0681   +0.0390   +0.0340   
++0.0511   +0.8551   +0.0170   +0.0768   
++0.1170   +0.0681   +0.7809   +0.0340   
++0.0511   +0.1536   +0.0170   +0.7783   
+
++0.8560   +0.0695   +0.0397   +0.0347   
++0.0521   +0.8523   +0.0174   +0.0782   
++0.1192   +0.0695   +0.7766   +0.0347   
++0.0521   +0.1564   +0.0174   +0.7741   
+
++0.8532   +0.0709   +0.0405   +0.0355   
++0.0532   +0.8495   +0.0177   +0.0796   
++0.1214   +0.0709   +0.7723   +0.0355   
++0.0532   +0.1593   +0.0177   +0.7698   
+
++0.8503   +0.0724   +0.0412   +0.0362   
++0.0543   +0.8466   +0.0181   +0.0811   
++0.1236   +0.0724   +0.7679   +0.0362   
++0.0543   +0.1621   +0.0181   +0.7655   
+
++0.8472   +0.0739   +0.0420   +0.0369   
++0.0554   +0.8436   +0.0185   +0.0826   
++0.1259   +0.0739   +0.7633   +0.0369   
++0.0554   +0.1651   +0.0185   +0.7610   
+
++0.8439   +0.0755   +0.0428   +0.0378   
++0.0566   +0.8403   +0.0189   +0.0842   
++0.1284   +0.0755   +0.7583   +0.0378   
++0.0566   +0.1684   +0.0189   +0.7561   
+
++0.8402   +0.0774   +0.0438   +0.0387   
++0.0580   +0.8366   +0.0193   +0.0860   
++0.1313   +0.0774   +0.7527   +0.0387   
++0.0580   +0.1720   +0.0193   +0.7506   
+
++0.8357   +0.0796   +0.0449   +0.0398   
++0.0597   +0.8322   +0.0199   +0.0882   
++0.1346   +0.0796   +0.7460   +0.0398   
++0.0597   +0.1763   +0.0199   +0.7441   
+
++0.8297   +0.0826   +0.0464   +0.0413   
++0.0620   +0.8264   +0.0207   +0.0910   
++0.1391   +0.0826   +0.7370   +0.0413   
++0.0620   +0.1820   +0.0207   +0.7354   
+
++0.8189   +0.0880   +0.0490   +0.0440   
++0.0660   +0.8159   +0.0220   +0.0961   
++0.1471   +0.0880   +0.7209   +0.0440   
++0.0660   +0.1922   +0.0220   +0.7197   
+
+
+[7] P-matrix for branch length 1.000000
++0.5939   +0.2076   +0.0946   +0.1038   
++0.1557   +0.6112   +0.0519   +0.1812   
++0.2839   +0.2076   +0.4047   +0.1038   
++0.1557   +0.3623   +0.0519   +0.4301   
+
++0.5731   +0.2195   +0.0977   +0.1097   
++0.1646   +0.5939   +0.0549   +0.1867   
++0.2931   +0.2195   +0.3777   +0.1097   
++0.1646   +0.3733   +0.0549   +0.4072   
+
++0.5615   +0.2261   +0.0993   +0.1131   
++0.1696   +0.5844   +0.0565   +0.1895   
++0.2979   +0.2261   +0.3629   +0.1131   
++0.1696   +0.3790   +0.0565   +0.3948   
+
++0.5528   +0.2312   +0.1004   +0.1156   
++0.1734   +0.5773   +0.0578   +0.1915   
++0.3013   +0.2312   +0.3520   +0.1156   
++0.1734   +0.3831   +0.0578   +0.3858   
+
++0.5456   +0.2354   +0.1013   +0.1177   
++0.1765   +0.5715   +0.0588   +0.1932   
++0.3040   +0.2354   +0.3429   +0.1177   
++0.1765   +0.3863   +0.0588   +0.3783   
+
++0.5392   +0.2391   +0.1021   +0.1196   
++0.1794   +0.5663   +0.0598   +0.1946   
++0.3063   +0.2391   +0.3349   +0.1196   
++0.1794   +0.3891   +0.0598   +0.3717   
+
++0.5333   +0.2426   +0.1028   +0.1213   
++0.1820   +0.5616   +0.0607   +0.1958   
++0.3084   +0.2426   +0.3276   +0.1213   
++0.1820   +0.3916   +0.0607   +0.3658   
+
++0.5276   +0.2460   +0.1035   +0.1230   
++0.1845   +0.5571   +0.0615   +0.1970   
++0.3104   +0.2460   +0.3207   +0.1230   
++0.1845   +0.3939   +0.0615   +0.3601   
+
++0.5221   +0.2492   +0.1041   +0.1246   
++0.1869   +0.5527   +0.0623   +0.1980   
++0.3122   +0.2492   +0.3140   +0.1246   
++0.1869   +0.3961   +0.0623   +0.3547   
+
++0.5166   +0.2525   +0.1046   +0.1263   
++0.1894   +0.5484   +0.0631   +0.1991   
++0.3139   +0.2525   +0.3073   +0.1263   
++0.1894   +0.3982   +0.0631   +0.3493   
+
++0.5109   +0.2559   +0.1052   +0.1280   
++0.1919   +0.5440   +0.0640   +0.2001   
++0.3157   +0.2559   +0.3005   +0.1280   
++0.1919   +0.4002   +0.0640   +0.3438   
+
++0.5049   +0.2595   +0.1058   +0.1298   
++0.1946   +0.5393   +0.0649   +0.2012   
++0.3174   +0.2595   +0.2933   +0.1298   
++0.1946   +0.4023   +0.0649   +0.3381   
+
++0.4983   +0.2635   +0.1064   +0.1317   
++0.1976   +0.5342   +0.0659   +0.2023   
++0.3193   +0.2635   +0.2855   +0.1317   
++0.1976   +0.4045   +0.0659   +0.3320   
+
++0.4907   +0.2681   +0.1071   +0.1341   
++0.2011   +0.5284   +0.0670   +0.2035   
++0.3213   +0.2681   +0.2765   +0.1341   
++0.2011   +0.4070   +0.0670   +0.3249   
+
++0.4808   +0.2742   +0.1079   +0.1371   
++0.2056   +0.5209   +0.0685   +0.2049   
++0.3237   +0.2742   +0.2650   +0.1371   
++0.2056   +0.4098   +0.0685   +0.3160   
+
++0.4641   +0.2846   +0.1091   +0.1423   
++0.2134   +0.5084   +0.0711   +0.2070   
++0.3272   +0.2846   +0.2460   +0.1423   
++0.2134   +0.4141   +0.0711   +0.3014   
+
+
+[7] P-matrix for branch length 1.000000
++0.5939   +0.2076   +0.0946   +0.1038   
++0.1557   +0.6112   +0.0519   +0.1812   
++0.2839   +0.2076   +0.4047   +0.1038   
++0.1557   +0.3623   +0.0519   +0.4301   
+
++0.5731   +0.2195   +0.0977   +0.1097   
++0.1646   +0.5939   +0.0549   +0.1867   
++0.2931   +0.2195   +0.3777   +0.1097   
++0.1646   +0.3733   +0.0549   +0.4072   
+
++0.5615   +0.2261   +0.0993   +0.1131   
++0.1696   +0.5844   +0.0565   +0.1895   
++0.2979   +0.2261   +0.3629   +0.1131   
++0.1696   +0.3790   +0.0565   +0.3948   
+
++0.5528   +0.2312   +0.1004   +0.1156   
++0.1734   +0.5773   +0.0578   +0.1915   
++0.3013   +0.2312   +0.3520   +0.1156   
++0.1734   +0.3831   +0.0578   +0.3858   
+
++0.5456   +0.2354   +0.1013   +0.1177   
++0.1765   +0.5715   +0.0588   +0.1932   
++0.3040   +0.2354   +0.3429   +0.1177   
++0.1765   +0.3863   +0.0588   +0.3783   
+
++0.5392   +0.2391   +0.1021   +0.1196   
++0.1794   +0.5663   +0.0598   +0.1946   
++0.3063   +0.2391   +0.3349   +0.1196   
++0.1794   +0.3891   +0.0598   +0.3717   
+
++0.5333   +0.2426   +0.1028   +0.1213   
++0.1820   +0.5616   +0.0607   +0.1958   
++0.3084   +0.2426   +0.3276   +0.1213   
++0.1820   +0.3916   +0.0607   +0.3658   
+
++0.5276   +0.2460   +0.1035   +0.1230   
++0.1845   +0.5571   +0.0615   +0.1970   
++0.3104   +0.2460   +0.3207   +0.1230   
++0.1845   +0.3939   +0.0615   +0.3601   
+
++0.5221   +0.2492   +0.1041   +0.1246   
++0.1869   +0.5527   +0.0623   +0.1980   
++0.3122   +0.2492   +0.3140   +0.1246   
++0.1869   +0.3961   +0.0623   +0.3547   
+
++0.5166   +0.2525   +0.1046   +0.1263   
++0.1894   +0.5484   +0.0631   +0.1991   
++0.3139   +0.2525   +0.3073   +0.1263   
++0.1894   +0.3982   +0.0631   +0.3493   
+
++0.5109   +0.2559   +0.1052   +0.1280   
++0.1919   +0.5440   +0.0640   +0.2001   
++0.3157   +0.2559   +0.3005   +0.1280   
++0.1919   +0.4002   +0.0640   +0.3438   
+
++0.5049   +0.2595   +0.1058   +0.1298   
++0.1946   +0.5393   +0.0649   +0.2012   
++0.3174   +0.2595   +0.2933   +0.1298   
++0.1946   +0.4023   +0.0649   +0.3381   
+
++0.4983   +0.2635   +0.1064   +0.1317   
++0.1976   +0.5342   +0.0659   +0.2023   
++0.3193   +0.2635   +0.2855   +0.1317   
++0.1976   +0.4045   +0.0659   +0.3320   
+
++0.4907   +0.2681   +0.1071   +0.1341   
++0.2011   +0.5284   +0.0670   +0.2035   
++0.3213   +0.2681   +0.2765   +0.1341   
++0.2011   +0.4070   +0.0670   +0.3249   
+
++0.4808   +0.2742   +0.1079   +0.1371   
++0.2056   +0.5209   +0.0685   +0.2049   
++0.3237   +0.2742   +0.2650   +0.1371   
++0.2056   +0.4098   +0.0685   +0.3160   
+
++0.4641   +0.2846   +0.1091   +0.1423   
++0.2134   +0.5084   +0.0711   +0.2070   
++0.3272   +0.2846   +0.2460   +0.1423   
++0.2134   +0.4141   +0.0711   +0.3014   
+
+
+[7] CLV 5: [ {(0.04977,0.09148,0.00668,0.10808),(0.05337,0.09742,0.00776,0.11458),(0.05545,0.10080,0.00842,0.11825),(0.05705,0.10337,0.00895,0.12102),(0.05841,0.10555,0.00942,0.12336),(0.05963,0.10750,0.00986,0.12544),(0.06079,0.10933,0.01028,0.12738),(0.06190,0.11108,0.01070,0.12924),(0.06301,0.11282,0.01112,0.13107),(0.06414,0.11457,0.01156,0.13291),(0.06532,0.11639,0.01203,0.13481),(0.06659,0.11834,0.01255,0.13684),(0.06801,0.12050,0.01315,0.13908),(0.06971,0.12306,0.01389,0.14171),(0 [...]
+[7] CLV 6: [ {(0.04525,0.00370,0.00121,0.00429),(0.04811,0.00425,0.00150,0.00490),(0.04973,0.00459,0.00169,0.00527),(0.05096,0.00485,0.00184,0.00557),(0.05200,0.00509,0.00198,0.00582),(0.05293,0.00530,0.00211,0.00606),(0.05379,0.00551,0.00224,0.00628),(0.05462,0.00571,0.00237,0.00650),(0.05544,0.00592,0.00250,0.00672),(0.05626,0.00613,0.00264,0.00695),(0.05712,0.00636,0.00279,0.00720),(0.05803,0.00661,0.00296,0.00746),(0.05904,0.00689,0.00316,0.00777),(0.06023,0.00723,0.00341,0.00814),(0 [...]
+[7] CLV 7: [ {(0.00297,0.77925,0.00297,0.01577),(0.00346,0.76353,0.00346,0.01815),(0.00377,0.75447,0.00377,0.01960),(0.00402,0.74752,0.00402,0.02075),(0.00423,0.74160,0.00423,0.02176),(0.00444,0.73626,0.00444,0.02269),(0.00463,0.73125,0.00463,0.02359),(0.00483,0.72640,0.00483,0.02447),(0.00503,0.72159,0.00503,0.02536),(0.00524,0.71670,0.00524,0.02628),(0.00546,0.71159,0.00546,0.02727),(0.00570,0.70609,0.00570,0.02835),(0.00599,0.69993,0.00599,0.02958),(0.00634,0.69260,0.00634,0.03108),(0 [...]
+
+
+ TEST alpha(ncats) =  50.00(16), mode = MEDIAN
 
 0.742216 0.818161 0.857444 0.887779 0.913886 0.937699 0.960279 0.982339 1.004454 1.027184 1.051177 1.077317 1.107016 1.142983 1.192101 1.297965 
 [7] P-matrix for branch length 0.100000
@@ -5964,7 +11928,343 @@
 [7] CLV 7: [ {(0.00288,0.78210,0.00288,0.01535),(0.00345,0.76384,0.00345,0.01810),(0.00376,0.75465,0.00376,0.01957),(0.00401,0.74766,0.00401,0.02073),(0.00423,0.74173,0.00423,0.02174),(0.00443,0.73638,0.00443,0.02267),(0.00463,0.73136,0.00463,0.02357),(0.00483,0.72651,0.00483,0.02445),(0.00502,0.72169,0.00502,0.02534),(0.00523,0.71680,0.00523,0.02627),(0.00545,0.71168,0.00545,0.02725),(0.00570,0.70617,0.00570,0.02833),(0.00599,0.69999,0.00599,0.02957),(0.00634,0.69262,0.00634,0.03108),(0 [...]
 
 
- TEST alpha(ncats) = 100.00(16)
+ TEST alpha(ncats) = 100.00(16), mode = MEAN
+
+0.822345 0.871069 0.899465 0.921407 0.940219 0.957302 0.973429 0.989114 1.004770 1.020790 1.037620 1.055860 1.076455 1.101179 1.134353 1.194621 
+[8] P-matrix for branch length 0.100000
++0.9355   +0.0307   +0.0185   +0.0153   
++0.0230   +0.9326   +0.0077   +0.0367   
++0.0554   +0.0307   +0.8985   +0.0153   
++0.0230   +0.0734   +0.0077   +0.8959   
+
++0.9319   +0.0324   +0.0195   +0.0162   
++0.0243   +0.9289   +0.0081   +0.0387   
++0.0584   +0.0324   +0.8929   +0.0162   
++0.0243   +0.0773   +0.0081   +0.8902   
+
++0.9298   +0.0334   +0.0201   +0.0167   
++0.0251   +0.9267   +0.0084   +0.0398   
++0.0602   +0.0334   +0.8897   +0.0167   
++0.0251   +0.0796   +0.0084   +0.8869   
+
++0.9282   +0.0342   +0.0205   +0.0171   
++0.0257   +0.9251   +0.0086   +0.0407   
++0.0615   +0.0342   +0.8871   +0.0171   
++0.0257   +0.0814   +0.0086   +0.8844   
+
++0.9268   +0.0349   +0.0209   +0.0174   
++0.0262   +0.9237   +0.0087   +0.0414   
++0.0627   +0.0349   +0.8850   +0.0174   
++0.0262   +0.0829   +0.0087   +0.8822   
+
++0.9255   +0.0355   +0.0212   +0.0178   
++0.0266   +0.9224   +0.0089   +0.0421   
++0.0637   +0.0355   +0.8831   +0.0178   
++0.0266   +0.0843   +0.0089   +0.8802   
+
++0.9243   +0.0361   +0.0216   +0.0180   
++0.0271   +0.9212   +0.0090   +0.0428   
++0.0647   +0.0361   +0.8812   +0.0180   
++0.0271   +0.0855   +0.0090   +0.8784   
+
++0.9232   +0.0366   +0.0219   +0.0183   
++0.0275   +0.9200   +0.0092   +0.0434   
++0.0656   +0.0366   +0.8794   +0.0183   
++0.0275   +0.0868   +0.0092   +0.8766   
+
++0.9220   +0.0372   +0.0222   +0.0186   
++0.0279   +0.9188   +0.0093   +0.0440   
++0.0666   +0.0372   +0.8777   +0.0186   
++0.0279   +0.0880   +0.0093   +0.8748   
+
++0.9209   +0.0377   +0.0225   +0.0189   
++0.0283   +0.9176   +0.0094   +0.0446   
++0.0675   +0.0377   +0.8759   +0.0189   
++0.0283   +0.0893   +0.0094   +0.8730   
+
++0.9197   +0.0383   +0.0228   +0.0192   
++0.0287   +0.9164   +0.0096   +0.0453   
++0.0685   +0.0383   +0.8740   +0.0192   
++0.0287   +0.0906   +0.0096   +0.8711   
+
++0.9183   +0.0390   +0.0232   +0.0195   
++0.0292   +0.9150   +0.0097   +0.0460   
++0.0696   +0.0390   +0.8719   +0.0195   
++0.0292   +0.0920   +0.0097   +0.8690   
+
++0.9168   +0.0397   +0.0236   +0.0198   
++0.0298   +0.9135   +0.0099   +0.0468   
++0.0708   +0.0397   +0.8696   +0.0198   
++0.0298   +0.0936   +0.0099   +0.8667   
+
++0.9151   +0.0406   +0.0241   +0.0203   
++0.0304   +0.9117   +0.0101   +0.0478   
++0.0723   +0.0406   +0.8669   +0.0203   
++0.0304   +0.0955   +0.0101   +0.8639   
+
++0.9127   +0.0417   +0.0247   +0.0209   
++0.0313   +0.9093   +0.0104   +0.0490   
++0.0742   +0.0417   +0.8632   +0.0209   
++0.0313   +0.0981   +0.0104   +0.8602   
+
++0.9084   +0.0438   +0.0259   +0.0219   
++0.0329   +0.9049   +0.0110   +0.0513   
++0.0777   +0.0438   +0.8565   +0.0219   
++0.0329   +0.1026   +0.0110   +0.8535   
+
+
+[8] P-matrix for branch length 0.200000
++0.8772   +0.0590   +0.0342   +0.0295   
++0.0443   +0.8734   +0.0148   +0.0676   
++0.1027   +0.0590   +0.8088   +0.0295   
++0.0443   +0.1351   +0.0148   +0.8059   
+
++0.8707   +0.0622   +0.0359   +0.0311   
++0.0467   +0.8669   +0.0156   +0.0709   
++0.1078   +0.0622   +0.7988   +0.0311   
++0.0467   +0.1417   +0.0156   +0.7960   
+
++0.8669   +0.0641   +0.0369   +0.0321   
++0.0481   +0.8631   +0.0160   +0.0728   
++0.1107   +0.0641   +0.7931   +0.0321   
++0.0481   +0.1455   +0.0160   +0.7904   
+
++0.8640   +0.0655   +0.0377   +0.0328   
++0.0491   +0.8603   +0.0164   +0.0742   
++0.1130   +0.0655   +0.7887   +0.0328   
++0.0491   +0.1484   +0.0164   +0.7860   
+
++0.8616   +0.0667   +0.0383   +0.0334   
++0.0501   +0.8578   +0.0167   +0.0755   
++0.1149   +0.0667   +0.7850   +0.0334   
++0.0501   +0.1509   +0.0167   +0.7823   
+
++0.8594   +0.0679   +0.0389   +0.0339   
++0.0509   +0.8556   +0.0170   +0.0766   
++0.1166   +0.0679   +0.7816   +0.0339   
++0.0509   +0.1531   +0.0170   +0.7790   
+
++0.8573   +0.0689   +0.0394   +0.0344   
++0.0517   +0.8535   +0.0172   +0.0776   
++0.1182   +0.0689   +0.7784   +0.0344   
++0.0517   +0.1552   +0.0172   +0.7759   
+
++0.8552   +0.0699   +0.0399   +0.0349   
++0.0524   +0.8515   +0.0175   +0.0786   
++0.1198   +0.0699   +0.7754   +0.0349   
++0.0524   +0.1572   +0.0175   +0.7729   
+
++0.8532   +0.0709   +0.0404   +0.0354   
++0.0532   +0.8495   +0.0177   +0.0796   
++0.1213   +0.0709   +0.7723   +0.0354   
++0.0532   +0.1592   +0.0177   +0.7699   
+
++0.8511   +0.0719   +0.0410   +0.0360   
++0.0539   +0.8474   +0.0180   +0.0806   
++0.1229   +0.0719   +0.7692   +0.0360   
++0.0539   +0.1613   +0.0180   +0.7668   
+
++0.8490   +0.0730   +0.0415   +0.0365   
++0.0547   +0.8453   +0.0182   +0.0817   
++0.1246   +0.0730   +0.7660   +0.0365   
++0.0547   +0.1634   +0.0182   +0.7636   
+
++0.8467   +0.0741   +0.0421   +0.0371   
++0.0556   +0.8430   +0.0185   +0.0828   
++0.1263   +0.0741   +0.7624   +0.0371   
++0.0556   +0.1657   +0.0185   +0.7602   
+
++0.8441   +0.0754   +0.0428   +0.0377   
++0.0566   +0.8404   +0.0189   +0.0841   
++0.1283   +0.0754   +0.7585   +0.0377   
++0.0566   +0.1682   +0.0189   +0.7563   
+
++0.8409   +0.0770   +0.0436   +0.0385   
++0.0578   +0.8374   +0.0193   +0.0856   
++0.1307   +0.0770   +0.7538   +0.0385   
++0.0578   +0.1712   +0.0193   +0.7518   
+
++0.8368   +0.0791   +0.0446   +0.0395   
++0.0593   +0.8333   +0.0198   +0.0876   
++0.1338   +0.0791   +0.7476   +0.0395   
++0.0593   +0.1753   +0.0198   +0.7457   
+
++0.8293   +0.0828   +0.0465   +0.0414   
++0.0621   +0.8260   +0.0207   +0.0912   
++0.1394   +0.0828   +0.7364   +0.0414   
++0.0621   +0.1824   +0.0207   +0.7348   
+
+
+[8] P-matrix for branch length 1.000000
++0.5722   +0.2200   +0.0978   +0.1100   
++0.1650   +0.5931   +0.0550   +0.1869   
++0.2935   +0.2200   +0.3766   +0.1100   
++0.1650   +0.3738   +0.0550   +0.4063   
+
++0.5578   +0.2283   +0.0998   +0.1141   
++0.1712   +0.5813   +0.0571   +0.1904   
++0.2993   +0.2283   +0.3582   +0.1141   
++0.1712   +0.3808   +0.0571   +0.3909   
+
++0.5497   +0.2330   +0.1008   +0.1165   
++0.1747   +0.5748   +0.0582   +0.1922   
++0.3025   +0.2330   +0.3481   +0.1165   
++0.1747   +0.3845   +0.0582   +0.3825   
+
++0.5437   +0.2365   +0.1016   +0.1182   
++0.1774   +0.5699   +0.0591   +0.1936   
++0.3047   +0.2365   +0.3406   +0.1182   
++0.1774   +0.3872   +0.0591   +0.3763   
+
++0.5387   +0.2394   +0.1022   +0.1197   
++0.1796   +0.5659   +0.0599   +0.1947   
++0.3065   +0.2394   +0.3343   +0.1197   
++0.1796   +0.3894   +0.0599   +0.3712   
+
++0.5342   +0.2421   +0.1027   +0.1210   
++0.1816   +0.5623   +0.0605   +0.1956   
++0.3081   +0.2421   +0.3287   +0.1210   
++0.1816   +0.3913   +0.0605   +0.3667   
+
++0.5300   +0.2445   +0.1032   +0.1223   
++0.1834   +0.5590   +0.0611   +0.1965   
++0.3096   +0.2445   +0.3236   +0.1223   
++0.1834   +0.3930   +0.0611   +0.3625   
+
++0.5260   +0.2469   +0.1036   +0.1234   
++0.1852   +0.5558   +0.0617   +0.1973   
++0.3109   +0.2469   +0.3188   +0.1234   
++0.1852   +0.3946   +0.0617   +0.3586   
+
++0.5221   +0.2492   +0.1041   +0.1246   
++0.1869   +0.5528   +0.0623   +0.1980   
++0.3122   +0.2492   +0.3140   +0.1246   
++0.1869   +0.3961   +0.0623   +0.3547   
+
++0.5182   +0.2515   +0.1045   +0.1258   
++0.1886   +0.5497   +0.0629   +0.1988   
++0.3134   +0.2515   +0.3093   +0.1258   
++0.1886   +0.3976   +0.0629   +0.3509   
+
++0.5142   +0.2539   +0.1049   +0.1270   
++0.1904   +0.5465   +0.0635   +0.1995   
++0.3147   +0.2539   +0.3044   +0.1270   
++0.1904   +0.3991   +0.0635   +0.3470   
+
++0.5099   +0.2565   +0.1053   +0.1282   
++0.1924   +0.5432   +0.0641   +0.2003   
++0.3160   +0.2565   +0.2993   +0.1282   
++0.1924   +0.4006   +0.0641   +0.3429   
+
++0.5052   +0.2593   +0.1058   +0.1297   
++0.1945   +0.5395   +0.0648   +0.2011   
++0.3174   +0.2593   +0.2936   +0.1297   
++0.1945   +0.4023   +0.0648   +0.3384   
+
++0.4997   +0.2627   +0.1063   +0.1313   
++0.1970   +0.5353   +0.0657   +0.2021   
++0.3189   +0.2627   +0.2871   +0.1313   
++0.1970   +0.4041   +0.0657   +0.3332   
+
++0.4925   +0.2670   +0.1069   +0.1335   
++0.2003   +0.5298   +0.0668   +0.2032   
++0.3208   +0.2670   +0.2786   +0.1335   
++0.2003   +0.4064   +0.0668   +0.3266   
+
++0.4802   +0.2746   +0.1079   +0.1373   
++0.2059   +0.5204   +0.0686   +0.2050   
++0.3238   +0.2746   +0.2643   +0.1373   
++0.2059   +0.4100   +0.0686   +0.3154   
+
+
+[8] P-matrix for branch length 1.000000
++0.5722   +0.2200   +0.0978   +0.1100   
++0.1650   +0.5931   +0.0550   +0.1869   
++0.2935   +0.2200   +0.3766   +0.1100   
++0.1650   +0.3738   +0.0550   +0.4063   
+
++0.5578   +0.2283   +0.0998   +0.1141   
++0.1712   +0.5813   +0.0571   +0.1904   
++0.2993   +0.2283   +0.3582   +0.1141   
++0.1712   +0.3808   +0.0571   +0.3909   
+
++0.5497   +0.2330   +0.1008   +0.1165   
++0.1747   +0.5748   +0.0582   +0.1922   
++0.3025   +0.2330   +0.3481   +0.1165   
++0.1747   +0.3845   +0.0582   +0.3825   
+
++0.5437   +0.2365   +0.1016   +0.1182   
++0.1774   +0.5699   +0.0591   +0.1936   
++0.3047   +0.2365   +0.3406   +0.1182   
++0.1774   +0.3872   +0.0591   +0.3763   
+
++0.5387   +0.2394   +0.1022   +0.1197   
++0.1796   +0.5659   +0.0599   +0.1947   
++0.3065   +0.2394   +0.3343   +0.1197   
++0.1796   +0.3894   +0.0599   +0.3712   
+
++0.5342   +0.2421   +0.1027   +0.1210   
++0.1816   +0.5623   +0.0605   +0.1956   
++0.3081   +0.2421   +0.3287   +0.1210   
++0.1816   +0.3913   +0.0605   +0.3667   
+
++0.5300   +0.2445   +0.1032   +0.1223   
++0.1834   +0.5590   +0.0611   +0.1965   
++0.3096   +0.2445   +0.3236   +0.1223   
++0.1834   +0.3930   +0.0611   +0.3625   
+
++0.5260   +0.2469   +0.1036   +0.1234   
++0.1852   +0.5558   +0.0617   +0.1973   
++0.3109   +0.2469   +0.3188   +0.1234   
++0.1852   +0.3946   +0.0617   +0.3586   
+
++0.5221   +0.2492   +0.1041   +0.1246   
++0.1869   +0.5528   +0.0623   +0.1980   
++0.3122   +0.2492   +0.3140   +0.1246   
++0.1869   +0.3961   +0.0623   +0.3547   
+
++0.5182   +0.2515   +0.1045   +0.1258   
++0.1886   +0.5497   +0.0629   +0.1988   
++0.3134   +0.2515   +0.3093   +0.1258   
++0.1886   +0.3976   +0.0629   +0.3509   
+
++0.5142   +0.2539   +0.1049   +0.1270   
++0.1904   +0.5465   +0.0635   +0.1995   
++0.3147   +0.2539   +0.3044   +0.1270   
++0.1904   +0.3991   +0.0635   +0.3470   
+
++0.5099   +0.2565   +0.1053   +0.1282   
++0.1924   +0.5432   +0.0641   +0.2003   
++0.3160   +0.2565   +0.2993   +0.1282   
++0.1924   +0.4006   +0.0641   +0.3429   
+
++0.5052   +0.2593   +0.1058   +0.1297   
++0.1945   +0.5395   +0.0648   +0.2011   
++0.3174   +0.2593   +0.2936   +0.1297   
++0.1945   +0.4023   +0.0648   +0.3384   
+
++0.4997   +0.2627   +0.1063   +0.1313   
++0.1970   +0.5353   +0.0657   +0.2021   
++0.3189   +0.2627   +0.2871   +0.1313   
++0.1970   +0.4041   +0.0657   +0.3332   
+
++0.4925   +0.2670   +0.1069   +0.1335   
++0.2003   +0.5298   +0.0668   +0.2032   
++0.3208   +0.2670   +0.2786   +0.1335   
++0.2003   +0.4064   +0.0668   +0.3266   
+
++0.4802   +0.2746   +0.1079   +0.1373   
++0.2059   +0.5204   +0.0686   +0.2050   
++0.3238   +0.2746   +0.2643   +0.1373   
++0.2059   +0.4100   +0.0686   +0.3154   
+
+
+[8] CLV 5: [ {(0.05353,0.09767,0.00780,0.11486),(0.05613,0.10190,0.00865,0.11944),(0.05763,0.10430,0.00915,0.12202),(0.05877,0.10613,0.00955,0.12397),(0.05974,0.10767,0.00990,0.12562),(0.06061,0.10905,0.01021,0.12708),(0.06143,0.11034,0.01052,0.12845),(0.06222,0.11158,0.01082,0.12976),(0.06301,0.11280,0.01112,0.13105),(0.06380,0.11404,0.01143,0.13236),(0.06463,0.11533,0.01176,0.13370),(0.06553,0.11671,0.01212,0.13514),(0.06653,0.11824,0.01253,0.13674),(0.06772,0.12006,0.01303,0.13862),(0 [...]
+[8] CLV 6: [ {(0.04823,0.00428,0.00151,0.00493),(0.05026,0.00470,0.00175,0.00540),(0.05140,0.00495,0.00190,0.00568),(0.05227,0.00515,0.00202,0.00589),(0.05300,0.00532,0.00212,0.00608),(0.05366,0.00548,0.00222,0.00625),(0.05427,0.00563,0.00231,0.00641),(0.05485,0.00577,0.00240,0.00657),(0.05543,0.00592,0.00250,0.00672),(0.05602,0.00607,0.00260,0.00689),(0.05662,0.00623,0.00270,0.00706),(0.05727,0.00640,0.00282,0.00724),(0.05799,0.00659,0.00295,0.00745),(0.05883,0.00683,0.00312,0.00771),(0 [...]
+[8] CLV 7: [ {(0.00348,0.76285,0.00348,0.01825),(0.00387,0.75150,0.00387,0.02009),(0.00411,0.74500,0.00411,0.02118),(0.00429,0.74003,0.00429,0.02203),(0.00446,0.73582,0.00446,0.02277),(0.00460,0.73202,0.00460,0.02345),(0.00475,0.72846,0.00475,0.02409),(0.00489,0.72503,0.00489,0.02472),(0.00503,0.72163,0.00503,0.02535),(0.00517,0.71817,0.00517,0.02600),(0.00533,0.71456,0.00533,0.02669),(0.00550,0.71069,0.00550,0.02744),(0.00569,0.70635,0.00569,0.02829),(0.00593,0.70120,0.00593,0.02932),(0 [...]
+
+
+ TEST alpha(ncats) = 100.00(16), mode = MEDIAN
 
 0.813424 0.870167 0.898985 0.921047 0.939910 0.957020 0.973164 0.988862 1.004530 1.020564 1.037414 1.055688 1.076348 1.101227 1.134966 1.206684 
 [8] P-matrix for branch length 0.100000
@@ -6299,48 +12599,93 @@
 [8] CLV 6: [ {(0.04785,0.00420,0.00147,0.00485),(0.05022,0.00469,0.00175,0.00539),(0.05138,0.00495,0.00190,0.00567),(0.05226,0.00515,0.00201,0.00589),(0.05299,0.00532,0.00212,0.00607),(0.05365,0.00548,0.00221,0.00624),(0.05426,0.00562,0.00231,0.00641),(0.05485,0.00577,0.00240,0.00656),(0.05542,0.00591,0.00250,0.00672),(0.05601,0.00606,0.00259,0.00688),(0.05661,0.00622,0.00270,0.00705),(0.05726,0.00640,0.00282,0.00724),(0.05798,0.00659,0.00295,0.00745),(0.05884,0.00683,0.00312,0.00771),(0 [...]
 [8] CLV 7: [ {(0.00342,0.76496,0.00342,0.01792),(0.00387,0.75171,0.00387,0.02005),(0.00410,0.74511,0.00410,0.02116),(0.00429,0.74012,0.00429,0.02202),(0.00445,0.73589,0.00445,0.02276),(0.00460,0.73208,0.00460,0.02344),(0.00474,0.72852,0.00474,0.02408),(0.00488,0.72508,0.00488,0.02471),(0.00502,0.72168,0.00502,0.02534),(0.00517,0.71822,0.00517,0.02600),(0.00533,0.71461,0.00533,0.02668),(0.00550,0.71073,0.00550,0.02743),(0.00569,0.70638,0.00569,0.02829),(0.00593,0.70119,0.00593,0.02933),(0 [...]
 
-ti/tv:alpha(ncats) =   0.10( 1)   logL:        -91.041015
-ti/tv:alpha(ncats) =   0.50( 1)   logL:        -91.041015
-ti/tv:alpha(ncats) =   0.75( 1)   logL:        -91.041015
-ti/tv:alpha(ncats) =   1.00( 1)   logL:        -91.041015
-ti/tv:alpha(ncats) =   1.50( 1)   logL:        -91.041015
-ti/tv:alpha(ncats) =   5.00( 1)   logL:        -91.041015
-ti/tv:alpha(ncats) =  10.00( 1)   logL:        -91.041015
-ti/tv:alpha(ncats) =  50.00( 1)   logL:        -91.041015
-ti/tv:alpha(ncats) = 100.00( 1)   logL:        -91.041015
-ti/tv:alpha(ncats) =   0.10( 2)   logL:        -93.294324
-ti/tv:alpha(ncats) =   0.50( 2)   logL:        -91.456606
-ti/tv:alpha(ncats) =   0.75( 2)   logL:        -91.003531
-ti/tv:alpha(ncats) =   1.00( 2)   logL:        -90.835262
-ti/tv:alpha(ncats) =   1.50( 2)   logL:        -90.750305
-ti/tv:alpha(ncats) =   5.00( 2)   logL:        -90.866235
-ti/tv:alpha(ncats) =  10.00( 2)   logL:        -90.942023
-ti/tv:alpha(ncats) =  50.00( 2)   logL:        -91.019222
-ti/tv:alpha(ncats) = 100.00( 2)   logL:        -91.029989
-ti/tv:alpha(ncats) =   0.10( 4)   logL:        -98.516530
-ti/tv:alpha(ncats) =   0.50( 4)   logL:        -91.758223
-ti/tv:alpha(ncats) =   0.75( 4)   logL:        -91.184045
-ti/tv:alpha(ncats) =   1.00( 4)   logL:        -90.943555
-ti/tv:alpha(ncats) =   1.50( 4)   logL:        -90.778310
-ti/tv:alpha(ncats) =   5.00( 4)   logL:        -90.827140
-ti/tv:alpha(ncats) =  10.00( 4)   logL:        -90.913620
-ti/tv:alpha(ncats) =  50.00( 4)   logL:        -91.011843
-ti/tv:alpha(ncats) = 100.00( 4)   logL:        -91.026184
-ti/tv:alpha(ncats) =   0.10( 8)   logL:        -98.005634
-ti/tv:alpha(ncats) =   0.50( 8)   logL:        -91.867331
-ti/tv:alpha(ncats) =   0.75( 8)   logL:        -91.252501
-ti/tv:alpha(ncats) =   1.00( 8)   logL:        -90.989516
-ti/tv:alpha(ncats) =   1.50( 8)   logL:        -90.799009
-ti/tv:alpha(ncats) =   5.00( 8)   logL:        -90.816779
-ti/tv:alpha(ncats) =  10.00( 8)   logL:        -90.904376
-ti/tv:alpha(ncats) =  50.00( 8)   logL:        -91.009134
-ti/tv:alpha(ncats) = 100.00( 8)   logL:        -91.024767
-ti/tv:alpha(ncats) =   0.10(16)   logL:        -98.280777
-ti/tv:alpha(ncats) =   0.50(16)   logL:        -91.913727
-ti/tv:alpha(ncats) =   0.75(16)   logL:        -91.281056
-ti/tv:alpha(ncats) =   1.00(16)   logL:        -91.009018
-ti/tv:alpha(ncats) =   1.50(16)   logL:        -90.809120
-ti/tv:alpha(ncats) =   5.00(16)   logL:        -90.814052
-ti/tv:alpha(ncats) =  10.00(16)   logL:        -90.901274
-ti/tv:alpha(ncats) =  50.00(16)   logL:        -91.008110
-ti/tv:alpha(ncats) = 100.00(16)   logL:        -91.024225
+ti/tv:alpha(ncats) =   0.10( 1), mode = MEDIAN(1)    logL:        -91.041015
+ti/tv:alpha(ncats) =   0.10( 1), mode =   MEAN(0)    logL:        -91.041015
+ti/tv:alpha(ncats) =   0.50( 1), mode = MEDIAN(1)    logL:        -91.041015
+ti/tv:alpha(ncats) =   0.50( 1), mode =   MEAN(0)    logL:        -91.041015
+ti/tv:alpha(ncats) =   0.75( 1), mode = MEDIAN(1)    logL:        -91.041015
+ti/tv:alpha(ncats) =   0.75( 1), mode =   MEAN(0)    logL:        -91.041015
+ti/tv:alpha(ncats) =   1.00( 1), mode = MEDIAN(1)    logL:        -91.041015
+ti/tv:alpha(ncats) =   1.00( 1), mode =   MEAN(0)    logL:        -91.041015
+ti/tv:alpha(ncats) =   1.50( 1), mode = MEDIAN(1)    logL:        -91.041015
+ti/tv:alpha(ncats) =   1.50( 1), mode =   MEAN(0)    logL:        -91.041015
+ti/tv:alpha(ncats) =   5.00( 1), mode = MEDIAN(1)    logL:        -91.041015
+ti/tv:alpha(ncats) =   5.00( 1), mode =   MEAN(0)    logL:        -91.041015
+ti/tv:alpha(ncats) =  10.00( 1), mode = MEDIAN(1)    logL:        -91.041015
+ti/tv:alpha(ncats) =  10.00( 1), mode =   MEAN(0)    logL:        -91.041015
+ti/tv:alpha(ncats) =  50.00( 1), mode = MEDIAN(1)    logL:        -91.041015
+ti/tv:alpha(ncats) =  50.00( 1), mode =   MEAN(0)    logL:        -91.041015
+ti/tv:alpha(ncats) = 100.00( 1), mode = MEDIAN(1)    logL:        -91.041015
+ti/tv:alpha(ncats) = 100.00( 1), mode =   MEAN(0)    logL:        -91.041015
+ti/tv:alpha(ncats) =   0.10( 2), mode = MEDIAN(1)    logL:        -93.305813
+ti/tv:alpha(ncats) =   0.10( 2), mode =   MEAN(0)    logL:        -93.294324
+ti/tv:alpha(ncats) =   0.50( 2), mode = MEDIAN(1)    logL:        -91.457543
+ti/tv:alpha(ncats) =   0.50( 2), mode =   MEAN(0)    logL:        -91.456606
+ti/tv:alpha(ncats) =   0.75( 2), mode = MEDIAN(1)    logL:        -90.936672
+ti/tv:alpha(ncats) =   0.75( 2), mode =   MEAN(0)    logL:        -91.003531
+ti/tv:alpha(ncats) =   1.00( 2), mode = MEDIAN(1)    logL:        -90.787765
+ti/tv:alpha(ncats) =   1.00( 2), mode =   MEAN(0)    logL:        -90.835262
+ti/tv:alpha(ncats) =   1.50( 2), mode = MEDIAN(1)    logL:        -90.749243
+ti/tv:alpha(ncats) =   1.50( 2), mode =   MEAN(0)    logL:        -90.750305
+ti/tv:alpha(ncats) =   5.00( 2), mode = MEDIAN(1)    logL:        -90.902396
+ti/tv:alpha(ncats) =   5.00( 2), mode =   MEAN(0)    logL:        -90.866235
+ti/tv:alpha(ncats) =  10.00( 2), mode = MEDIAN(1)    logL:        -90.966448
+ti/tv:alpha(ncats) =  10.00( 2), mode =   MEAN(0)    logL:        -90.942023
+ti/tv:alpha(ncats) =  50.00( 2), mode = MEDIAN(1)    logL:        -91.025275
+ti/tv:alpha(ncats) =  50.00( 2), mode =   MEAN(0)    logL:        -91.019222
+ti/tv:alpha(ncats) = 100.00( 2), mode = MEDIAN(1)    logL:        -91.033094
+ti/tv:alpha(ncats) = 100.00( 2), mode =   MEAN(0)    logL:        -91.029989
+ti/tv:alpha(ncats) =   0.10( 4), mode = MEDIAN(1)    logL:        -98.047421
+ti/tv:alpha(ncats) =   0.10( 4), mode =   MEAN(0)    logL:        -98.516530
+ti/tv:alpha(ncats) =   0.50( 4), mode = MEDIAN(1)    logL:        -91.628584
+ti/tv:alpha(ncats) =   0.50( 4), mode =   MEAN(0)    logL:        -91.758223
+ti/tv:alpha(ncats) =   0.75( 4), mode = MEDIAN(1)    logL:        -91.109832
+ti/tv:alpha(ncats) =   0.75( 4), mode =   MEAN(0)    logL:        -91.184045
+ti/tv:alpha(ncats) =   1.00( 4), mode = MEDIAN(1)    logL:        -90.895886
+ti/tv:alpha(ncats) =   1.00( 4), mode =   MEAN(0)    logL:        -90.943555
+ti/tv:alpha(ncats) =   1.50( 4), mode = MEDIAN(1)    logL:        -90.763329
+ti/tv:alpha(ncats) =   1.50( 4), mode =   MEAN(0)    logL:        -90.778310
+ti/tv:alpha(ncats) =   5.00( 4), mode = MEDIAN(1)    logL:        -90.850340
+ti/tv:alpha(ncats) =   5.00( 4), mode =   MEAN(0)    logL:        -90.827140
+ti/tv:alpha(ncats) =  10.00( 4), mode = MEDIAN(1)    logL:        -90.931461
+ti/tv:alpha(ncats) =  10.00( 4), mode =   MEAN(0)    logL:        -90.913620
+ti/tv:alpha(ncats) =  50.00( 4), mode = MEDIAN(1)    logL:        -91.016676
+ti/tv:alpha(ncats) =  50.00( 4), mode =   MEAN(0)    logL:        -91.011843
+ti/tv:alpha(ncats) = 100.00( 4), mode = MEDIAN(1)    logL:        -91.028689
+ti/tv:alpha(ncats) = 100.00( 4), mode =   MEAN(0)    logL:        -91.026184
+ti/tv:alpha(ncats) =   0.10( 8), mode = MEDIAN(1)    logL:        -97.503618
+ti/tv:alpha(ncats) =   0.10( 8), mode =   MEAN(0)    logL:        -98.005634
+ti/tv:alpha(ncats) =   0.50( 8), mode = MEDIAN(1)    logL:        -91.760299
+ti/tv:alpha(ncats) =   0.50( 8), mode =   MEAN(0)    logL:        -91.867331
+ti/tv:alpha(ncats) =   0.75( 8), mode = MEDIAN(1)    logL:        -91.194353
+ti/tv:alpha(ncats) =   0.75( 8), mode =   MEAN(0)    logL:        -91.252501
+ti/tv:alpha(ncats) =   1.00( 8), mode = MEDIAN(1)    logL:        -90.954201
+ti/tv:alpha(ncats) =   1.00( 8), mode =   MEAN(0)    logL:        -90.989516
+ti/tv:alpha(ncats) =   1.50( 8), mode = MEDIAN(1)    logL:        -90.786023
+ti/tv:alpha(ncats) =   1.50( 8), mode =   MEAN(0)    logL:        -90.799009
+ti/tv:alpha(ncats) =   5.00( 8), mode = MEDIAN(1)    logL:        -90.829328
+ti/tv:alpha(ncats) =   5.00( 8), mode =   MEAN(0)    logL:        -90.816779
+ti/tv:alpha(ncats) =  10.00( 8), mode = MEDIAN(1)    logL:        -90.914891
+ti/tv:alpha(ncats) =  10.00( 8), mode =   MEAN(0)    logL:        -90.904376
+ti/tv:alpha(ncats) =  50.00( 8), mode = MEDIAN(1)    logL:        -91.012156
+ti/tv:alpha(ncats) =  50.00( 8), mode =   MEAN(0)    logL:        -91.009134
+ti/tv:alpha(ncats) = 100.00( 8), mode = MEDIAN(1)    logL:        -91.026345
+ti/tv:alpha(ncats) = 100.00( 8), mode =   MEAN(0)    logL:        -91.024767
+ti/tv:alpha(ncats) =   0.10(16), mode = MEDIAN(1)    logL:        -97.943607
+ti/tv:alpha(ncats) =   0.10(16), mode =   MEAN(0)    logL:        -98.280777
+ti/tv:alpha(ncats) =   0.50(16), mode = MEDIAN(1)    logL:        -91.841336
+ti/tv:alpha(ncats) =   0.50(16), mode =   MEAN(0)    logL:        -91.913727
+ti/tv:alpha(ncats) =   0.75(16), mode = MEDIAN(1)    logL:        -91.241476
+ti/tv:alpha(ncats) =   0.75(16), mode =   MEAN(0)    logL:        -91.281056
+ti/tv:alpha(ncats) =   1.00(16), mode = MEDIAN(1)    logL:        -90.985208
+ti/tv:alpha(ncats) =   1.00(16), mode =   MEAN(0)    logL:        -91.009018
+ti/tv:alpha(ncats) =   1.50(16), mode = MEDIAN(1)    logL:        -90.799856
+ti/tv:alpha(ncats) =   1.50(16), mode =   MEAN(0)    logL:        -90.809120
+ti/tv:alpha(ncats) =   5.00(16), mode = MEDIAN(1)    logL:        -90.820404
+ti/tv:alpha(ncats) =   5.00(16), mode =   MEAN(0)    logL:        -90.814052
+ti/tv:alpha(ncats) =  10.00(16), mode = MEDIAN(1)    logL:        -90.906979
+ti/tv:alpha(ncats) =  10.00(16), mode =   MEAN(0)    logL:        -90.901274
+ti/tv:alpha(ncats) =  50.00(16), mode = MEDIAN(1)    logL:        -91.009829
+ti/tv:alpha(ncats) =  50.00(16), mode =   MEAN(0)    logL:        -91.008110
+ti/tv:alpha(ncats) = 100.00(16), mode = MEDIAN(1)    logL:        -91.025128
+ti/tv:alpha(ncats) = 100.00(16), mode =   MEAN(0)    logL:        -91.024225
diff --git a/test/out/asc-bias.out b/test/out/asc-bias.out
index 2195882..b8706fd 100644
--- a/test/out/asc-bias.out
+++ b/test/out/asc-bias.out
@@ -1,9 +1,95 @@
 Read testdata/2000.tree: 2000 taxa
-  Traversal buffer: 0(-1) 1(-1) 2000(0) 2(-1) 3(-1) 2001(1) 2002(2) 4(-1) 5(-1) 6(-1) 2003(3) 2004(4) 7(-1) 8(-1) 9(-1) 10(-1) 2005(5) 2006(6) 2007(7) 11(-1) 12(-1) 13(-1) 2008(8) 2009(9) 14(-1) 15(-1) 16(-1) 17(-1) 18(-1) 2010(10) 2011(11) 19(-1) 2012(12) 2013(13) 20(-1) 21(-1) 2014(14) 2015(15) 22(-1) 23(-1) 2016(16) 24(-1) 25(-1) 2017(17) 26(-1) 2018(18) 2019(19) 2020(20) 2021(21) 27(-1) 28(-1) 29(-1) 30(-1) 31(-1) 2022(22) 2023(23) 2024(24) 2025(25) 2026(26) 32(-1) 33(-1) 34(-1) 35(- [...]
-  Operations: 0[0]+1[1]->2000 2[2]+3[3]->2001 2000[2000]+2001[2001]->2002 5[5]+6[6]->2003 4[4]+2003[2003]->2004 9[9]+10[10]->2005 8[8]+2005[2005]->2006 7[7]+2006[2006]->2007 12[12]+13[13]->2008 11[11]+2008[2008]->2009 17[17]+18[18]->2010 16[16]+2010[2010]->2011 2011[2011]+19[19]->2012 15[15]+2012[2012]->2013 20[20]+21[21]->2014 2013[2013]+2014[2014]->2015 22[22]+23[23]->2016 24[24]+25[25]->2017 2017[2017]+26[26]->2018 2016[2016]+2018[2018]->2019 2015[2015]+2019[2019]->2020 14[14]+2020[20 [...]
+Read testdata/2000.fas: 1251 sites
+
+TEST 1: NO ASC BIAS
+Log-L: -376539.211547
+  Br.Len      logLikelihood       1st Deriv       2nd Deriv
+  0.0001     -376569.858622 -7.17805288e+03  9.00973704e+06  *
+  0.0010     -376565.211482 -4.02412312e+03  1.60951377e+06  *
+  0.0100     -376549.092340 -9.26475886e+02  9.12042854e+04  *
+  0.1000     -376546.759479  2.18660011e+02  1.79731004e+03  *
+  1.0000     -376790.406580  2.22401826e+02 -1.04126523e+02  
+ 10.0000     -377445.004318  2.42918481e+01 -3.40494037e+00  
+100.0000     -377836.767226  7.72835622e-01 -1.91544043e-02  
+
+TEST 2: ASC BIAS LEWIS
+Log-L: -376534.406057
+  Br.Len      logLikelihood       1st Deriv       2nd Deriv
+  0.0001     -376565.047252 -7.17817732e+03  9.00973705e+06  *
+  0.0010     -376560.400224 -4.02424756e+03  1.60951377e+06  *
+  0.0100     -376544.282202 -9.26600271e+02  9.12042916e+04  *
+  0.1000     -376541.960510  2.18536185e+02  1.79731623e+03  *
+  1.0000     -376785.716589  2.22283429e+02 -1.04120649e+02  
+ 10.0000     -377441.178362  2.42147192e+01 -3.40142409e+00  
+100.0000     -377834.948574  7.67928196e-01 -1.90429535e-02  
+
+TEST 2: ASC BIAS FELSENSTEIN
+Log-L: -377485.067669
+  Br.Len      logLikelihood       1st Deriv       2nd Deriv
+  0.0001     -377515.507269 -7.18244147e+03  9.00973715e+06  *
+  0.0010     -377510.864079 -4.02851161e+03  1.60951387e+06  *
+  0.0100     -377494.784429 -9.30863425e+02  9.12043913e+04  *
+  0.1000     -377492.846018  2.14281997e+02  1.79741579e+03  *
+  1.0000     -377740.390709  2.18118294e+02 -1.04022325e+02  
+ 10.0000     -378429.545536  2.08699917e+01 -3.31802737e+00  
+100.0000     -378947.603295  3.14443304e-01 -9.98182917e-03  
+
+TEST 2: ASC BIAS STAMATAKIS
+Log-L: -377961.619605
+  Br.Len      logLikelihood       1st Deriv       2nd Deriv
+  0.0001     -377991.971916 -7.17181912e+03  9.00973694e+06  *
+  0.0010     -377987.330386 -4.01788946e+03  1.60951367e+06  *
+  0.0100     -377971.267343 -9.20243116e+02  9.12041859e+04  *
+  0.1000     -377969.495029  2.24883827e+02  1.79721051e+03  *
+  1.0000     -378218.703151  2.28535724e+02 -1.04226800e+02  
+ 10.0000     -378924.372499  2.95020195e+01 -3.50863767e+00  
+100.0000     -379504.407122  1.30619027e+00 -3.15896886e-02  
+
+TEST 1: NO ASC BIAS
+Log-L: -376539.211547
+  Br.Len      logLikelihood       1st Deriv       2nd Deriv
+  0.0001     -376588.767896 -2.01491393e+04  4.35212664e+07  *
+  0.0010     -376578.147065 -7.83726887e+03  4.69011502e+06  *
+  0.0100     -376552.867352 -1.27249532e+03  1.36077377e+05  *
+  0.1000     -376546.153557  2.15083632e+02  1.92380335e+03  *
+  1.0000     -376787.910260  2.20059204e+02 -1.02352431e+02  
+ 10.0000     -377440.724115  2.43890918e+01 -3.40966697e+00  
+100.0000     -377835.804935  7.80659251e-01 -1.93956876e-02  
+
+TEST 2: ASC BIAS LEWIS
+Log-L: -376534.406057
+  Br.Len      logLikelihood       1st Deriv       2nd Deriv
+  0.0001     -376583.956195 -2.01492638e+04  4.35212664e+07  *
+  0.0010     -376573.335476 -7.83739332e+03  4.69011503e+06  *
+  0.0100     -376548.056883 -1.27261971e+03  1.36077383e+05  *
+  0.1000     -376541.354258  2.14959797e+02  1.92380954e+03  *
+  1.0000     -376783.219948  2.19940799e+02 -1.02346556e+02  
+ 10.0000     -377436.897900  2.43119573e+01 -3.40615043e+00  
+100.0000     -377833.986162  7.75751506e-01 -1.92842294e-02  
+
+TEST 2: ASC BIAS FELSENSTEIN
+Log-L: -377485.067669
+  Br.Len      logLikelihood       1st Deriv       2nd Deriv
+  0.0001     -377534.404871 -2.01535279e+04  4.35212665e+07  *
+  0.0010     -377523.787990 -7.84165738e+03  4.69011513e+06  *
+  0.0100     -377498.547769 -1.27688288e+03  1.36077483e+05  *
+  0.1000     -377492.228426  2.10705597e+02  1.92390910e+03  *
+  1.0000     -377737.882738  2.15775653e+02 -1.02248232e+02  
+ 10.0000     -378425.253834  2.09672214e+01 -3.32275333e+00  
+100.0000     -378946.629686  3.22267661e-01 -1.02231200e-02  
+
+TEST 2: ASC BIAS STAMATAKIS
+Log-L: -377961.619605
+  Br.Len      logLikelihood       1st Deriv       2nd Deriv
+  0.0001     -378010.864604 -2.01429056e+04  4.35212663e+07  *
+  0.0010     -378000.249384 -7.83103519e+03  4.69011492e+06  *
+  0.0100     -377975.025770 -1.26626254e+03  1.36077278e+05  *
+  0.1000     -377968.872522  2.21307457e+02  1.92370382e+03  *
+  1.0000     -378216.190255  2.26193111e+02 -1.02452708e+02  
+ 10.0000     -378920.075798  2.95992716e+01 -3.51336437e+00  
+100.0000     -379503.428611  1.31401425e+00 -3.18309848e-02  
 
 TEST 1: NO ASC BIAS
-Read testdata/2000.fas: 1251 sites
 Log-L: -376539.211547
   Br.Len      logLikelihood       1st Deriv       2nd Deriv
   0.0001     -376662.410545 -2.83159180e+04  5.91239012e+07  *
diff --git a/test/out/derivatives-oddstates.out b/test/out/derivatives-oddstates.out
index 4443c85..b9dc507 100644
--- a/test/out/derivatives-oddstates.out
+++ b/test/out/derivatives-oddstates.out
@@ -29,75 +29,75 @@ Test -93.655614 = -93.655614
  TEST alpha(ncats) =   0.10( 1) ; pinv = 0.30
 
 1.000000 
-Branch    0.1 : -96.794137   1.9850e+00   1.9247e+01
-Branch    0.2 : -97.202283   3.3895e+00   4.2134e+00
-Branch    0.5 : -98.720974   3.3119e+00  -1.9648e+00
-Branch    0.9 : -100.264298   2.0985e+00  -1.9525e+00
-Branch    1.5 : -101.478774   8.8475e-01  -9.2688e-01
-Branch    5.0 : -102.332278   6.5012e-03  -6.0266e-03
-Branch   10.0 : -102.339336   9.7096e-06  -8.7755e-06
-Branch   50.0 : -102.339347   1.9089e-15  -4.2869e-28
-Branch   90.0 : -102.339347   1.9089e-15  -8.9598e-33
+Branch    0.1 : -96.794137   2.8357e+00   3.9279e+01
+Branch    0.2 : -97.202283   4.8421e+00   8.5988e+00
+Branch    0.5 : -98.720974   4.7313e+00  -4.0098e+00
+Branch    0.9 : -100.264298   2.9979e+00  -3.9846e+00
+Branch    1.5 : -101.478774   1.2639e+00  -1.8916e+00
+Branch    5.0 : -102.332278   9.2874e-03  -1.2299e-02
+Branch   10.0 : -102.339336   1.3871e-05  -1.7909e-05
+Branch   50.0 : -102.339347   2.7270e-15  -8.7487e-28
+Branch   90.0 : -102.339347   2.7270e-15  -1.8285e-32
 Test -96.794137 = -96.794137
-Branch(Tip)    0.1 : -95.654016  -2.4563e+00   7.5478e+01
-Branch(Tip)    0.2 : -95.783099   3.0026e+00   1.8232e+01
-Branch(Tip)    0.5 : -97.748757   4.9821e+00  -1.0177e+00
-Branch(Tip)    0.9 : -100.251762   3.6262e+00  -2.8112e+00
-Branch(Tip)    1.5 : -102.436243   1.6434e+00  -1.6728e+00
-Branch(Tip)    5.0 : -104.017665   1.1604e-02  -1.0775e-02
-Branch(Tip)   10.0 : -104.030262   1.7447e-05  -1.5749e-05
-Branch(Tip)   50.0 : -104.030281   1.9142e-15  -7.7622e-28
-Branch(Tip)   90.0 : -104.030281   1.9142e-15  -9.4990e-33
+Branch(Tip)    0.1 : -95.654016  -3.5089e+00   1.5404e+02
+Branch(Tip)    0.2 : -95.783099   4.2894e+00   3.7207e+01
+Branch(Tip)    0.5 : -97.748757   7.1172e+00  -2.0770e+00
+Branch(Tip)    0.9 : -100.251762   5.1803e+00  -5.7371e+00
+Branch(Tip)    1.5 : -102.436243   2.3477e+00  -3.4138e+00
+Branch(Tip)    5.0 : -104.017665   1.6578e-02  -2.1989e-02
+Branch(Tip)   10.0 : -104.030262   2.4924e-05  -3.2141e-05
+Branch(Tip)   50.0 : -104.030281   2.7346e-15  -1.5841e-27
+Branch(Tip)   90.0 : -104.030281   2.7346e-15  -1.9386e-32
 Test -95.783099 = -95.783099
 
 
  TEST alpha(ncats) =   0.10( 1) ; pinv = 0.60
 
 1.000000 
-Branch    0.1 : -105.234564   2.9692e+00   1.1798e+00
-Branch    0.2 : -105.979235   2.8923e+00  -1.2146e+00
-Branch    0.5 : -107.694200   1.6641e+00  -1.5145e+00
-Branch    0.9 : -108.763225   6.2380e-01  -6.3195e-01
-Branch    1.5 : -109.245342   1.3874e-01  -1.3633e-01
-Branch    5.0 : -109.389867   4.1972e-05  -3.8035e-05
-Branch   10.0 : -109.389914   5.3442e-10  -4.8066e-10
-Branch   50.0 : -109.389914   1.8130e-15  -2.9886e-33
-Branch   90.0 : -109.389914   1.8130e-15  -2.9886e-33
+Branch    0.1 : -105.234564   7.4230e+00   7.3740e+00
+Branch    0.2 : -105.979235   7.2309e+00  -7.5912e+00
+Branch    0.5 : -107.694200   4.1603e+00  -9.4659e+00
+Branch    0.9 : -108.763225   1.5595e+00  -3.9497e+00
+Branch    1.5 : -109.245342   3.4684e-01  -8.5204e-01
+Branch    5.0 : -109.389867   1.0493e-04  -2.3772e-04
+Branch   10.0 : -109.389914   1.3360e-09  -3.0041e-09
+Branch   50.0 : -109.389914   4.5326e-15  -1.8679e-32
+Branch   90.0 : -109.389914   4.5326e-15  -1.8679e-32
 Test -105.234564 = -105.234564
-Branch(Tip)    0.1 : -102.669187   2.2056e+00   1.9154e+01
-Branch(Tip)    0.2 : -103.565615   4.3216e+00   2.5684e+00
-Branch(Tip)    0.5 : -106.644437   3.3568e+00  -2.4941e+00
-Branch(Tip)    0.9 : -108.893328   1.3459e+00  -1.3609e+00
-Branch(Tip)    1.5 : -109.923941   2.8967e-01  -2.9214e-01
-Branch(Tip)    5.0 : -110.220389   8.4824e-05  -7.6716e-05
-Branch(Tip)   10.0 : -110.220483   1.0920e-09  -9.8183e-10
-Branch(Tip)   50.0 : -110.220483   1.8138e-15  -3.0757e-33
-Branch(Tip)   90.0 : -110.220483   1.8138e-15  -3.0757e-33
+Branch(Tip)    0.1 : -102.669187   5.5139e+00   1.1971e+02
+Branch(Tip)    0.2 : -103.565615   1.0804e+01   1.6052e+01
+Branch(Tip)    0.5 : -106.644437   8.3920e+00  -1.5588e+01
+Branch(Tip)    0.9 : -108.893328   3.3646e+00  -8.5057e+00
+Branch(Tip)    1.5 : -109.923941   7.2417e-01  -1.8259e+00
+Branch(Tip)    5.0 : -110.220389   2.1206e-04  -4.7948e-04
+Branch(Tip)   10.0 : -110.220483   2.7300e-09  -6.1364e-09
+Branch(Tip)   50.0 : -110.220483   4.5345e-15  -1.9223e-32
+Branch(Tip)   90.0 : -110.220483   4.5345e-15  -1.9223e-32
 Test -103.565615 = -103.565615
 
 
  TEST alpha(ncats) =   0.10( 1) ; pinv = 0.90
 
 1.000000 
-Branch    0.1 : -135.403784   1.3449e-01  -1.2487e-01
-Branch    0.2 : -135.491444   5.3257e-02  -4.9217e-02
-Branch    0.5 : -135.545622   3.3897e-03  -3.0954e-03
-Branch    0.9 : -135.549245   8.9286e-05  -8.0898e-05
-Branch    1.5 : -135.549343   3.9519e-07  -3.5623e-07
-Branch    5.0 : -135.549344   1.7868e-15  -7.7070e-21
-Branch   10.0 : -135.549344   1.7868e-15  -2.0525e-34
-Branch   50.0 : -135.549344   1.7868e-15  -2.0525e-34
-Branch   90.0 : -135.549344   1.7868e-15  -2.0525e-34
+Branch    0.1 : -135.403784   1.3449e+00  -1.2487e+01
+Branch    0.2 : -135.491444   5.3257e-01  -4.9217e+00
+Branch    0.5 : -135.545622   3.3897e-02  -3.0954e-01
+Branch    0.9 : -135.549245   8.9286e-04  -8.0898e-03
+Branch    1.5 : -135.549343   3.9519e-06  -3.5623e-05
+Branch    5.0 : -135.549344   1.7868e-14  -7.7070e-19
+Branch   10.0 : -135.549344   1.7868e-14  -2.0525e-32
+Branch   50.0 : -135.549344   1.7868e-14  -2.0525e-32
+Branch   90.0 : -135.549344   1.7868e-14  -2.0525e-32
 Test -135.403784 = -135.403784
-Branch(Tip)    0.1 : -133.446326   2.1381e+00  -1.9967e+00
-Branch(Tip)    0.2 : -134.810864   7.9184e-01  -8.0598e-01
-Branch(Tip)    0.5 : -135.561972   4.1872e-02  -3.9416e-02
-Branch(Tip)    0.9 : -135.605905   1.0538e-03  -9.5817e-04
-Branch(Tip)    1.5 : -135.607062   4.6350e-06  -4.1792e-06
-Branch(Tip)    5.0 : -135.607067   1.7869e-15  -9.0274e-20
-Branch(Tip)   10.0 : -135.607067   1.7868e-15  -2.0531e-34
-Branch(Tip)   50.0 : -135.607067   1.7868e-15  -2.0531e-34
-Branch(Tip)   90.0 : -135.607067   1.7868e-15  -2.0531e-34
+Branch(Tip)    0.1 : -133.446326   2.1381e+01  -1.9967e+02
+Branch(Tip)    0.2 : -134.810864   7.9184e+00  -8.0598e+01
+Branch(Tip)    0.5 : -135.561972   4.1872e-01  -3.9416e+00
+Branch(Tip)    0.9 : -135.605905   1.0538e-02  -9.5817e-02
+Branch(Tip)    1.5 : -135.607062   4.6350e-05  -4.1792e-04
+Branch(Tip)    5.0 : -135.607067   1.7869e-14  -9.0274e-18
+Branch(Tip)   10.0 : -135.607067   1.7868e-14  -2.0531e-32
+Branch(Tip)   50.0 : -135.607067   1.7868e-14  -2.0531e-32
+Branch(Tip)   90.0 : -135.607067   1.7868e-14  -2.0531e-32
 Test -134.810864 = -134.810864
 
 
@@ -129,75 +129,75 @@ Test -93.655614 = -93.655614
  TEST alpha(ncats) =   0.75( 1) ; pinv = 0.30
 
 1.000000 
-Branch    0.1 : -96.794137   1.9850e+00   1.9247e+01
-Branch    0.2 : -97.202283   3.3895e+00   4.2134e+00
-Branch    0.5 : -98.720974   3.3119e+00  -1.9648e+00
-Branch    0.9 : -100.264298   2.0985e+00  -1.9525e+00
-Branch    1.5 : -101.478774   8.8475e-01  -9.2688e-01
-Branch    5.0 : -102.332278   6.5012e-03  -6.0266e-03
-Branch   10.0 : -102.339336   9.7096e-06  -8.7755e-06
-Branch   50.0 : -102.339347   1.9089e-15  -4.2869e-28
-Branch   90.0 : -102.339347   1.9089e-15  -8.9598e-33
+Branch    0.1 : -96.794137   2.8357e+00   3.9279e+01
+Branch    0.2 : -97.202283   4.8421e+00   8.5988e+00
+Branch    0.5 : -98.720974   4.7313e+00  -4.0098e+00
+Branch    0.9 : -100.264298   2.9979e+00  -3.9846e+00
+Branch    1.5 : -101.478774   1.2639e+00  -1.8916e+00
+Branch    5.0 : -102.332278   9.2874e-03  -1.2299e-02
+Branch   10.0 : -102.339336   1.3871e-05  -1.7909e-05
+Branch   50.0 : -102.339347   2.7270e-15  -8.7487e-28
+Branch   90.0 : -102.339347   2.7270e-15  -1.8285e-32
 Test -96.794137 = -96.794137
-Branch(Tip)    0.1 : -95.654016  -2.4563e+00   7.5478e+01
-Branch(Tip)    0.2 : -95.783099   3.0026e+00   1.8232e+01
-Branch(Tip)    0.5 : -97.748757   4.9821e+00  -1.0177e+00
-Branch(Tip)    0.9 : -100.251762   3.6262e+00  -2.8112e+00
-Branch(Tip)    1.5 : -102.436243   1.6434e+00  -1.6728e+00
-Branch(Tip)    5.0 : -104.017665   1.1604e-02  -1.0775e-02
-Branch(Tip)   10.0 : -104.030262   1.7447e-05  -1.5749e-05
-Branch(Tip)   50.0 : -104.030281   1.9142e-15  -7.7622e-28
-Branch(Tip)   90.0 : -104.030281   1.9142e-15  -9.4990e-33
+Branch(Tip)    0.1 : -95.654016  -3.5089e+00   1.5404e+02
+Branch(Tip)    0.2 : -95.783099   4.2894e+00   3.7207e+01
+Branch(Tip)    0.5 : -97.748757   7.1172e+00  -2.0770e+00
+Branch(Tip)    0.9 : -100.251762   5.1803e+00  -5.7371e+00
+Branch(Tip)    1.5 : -102.436243   2.3477e+00  -3.4138e+00
+Branch(Tip)    5.0 : -104.017665   1.6578e-02  -2.1989e-02
+Branch(Tip)   10.0 : -104.030262   2.4924e-05  -3.2141e-05
+Branch(Tip)   50.0 : -104.030281   2.7346e-15  -1.5841e-27
+Branch(Tip)   90.0 : -104.030281   2.7346e-15  -1.9386e-32
 Test -95.783099 = -95.783099
 
 
  TEST alpha(ncats) =   0.75( 1) ; pinv = 0.60
 
 1.000000 
-Branch    0.1 : -105.234564   2.9692e+00   1.1798e+00
-Branch    0.2 : -105.979235   2.8923e+00  -1.2146e+00
-Branch    0.5 : -107.694200   1.6641e+00  -1.5145e+00
-Branch    0.9 : -108.763225   6.2380e-01  -6.3195e-01
-Branch    1.5 : -109.245342   1.3874e-01  -1.3633e-01
-Branch    5.0 : -109.389867   4.1972e-05  -3.8035e-05
-Branch   10.0 : -109.389914   5.3442e-10  -4.8066e-10
-Branch   50.0 : -109.389914   1.8130e-15  -2.9886e-33
-Branch   90.0 : -109.389914   1.8130e-15  -2.9886e-33
+Branch    0.1 : -105.234564   7.4230e+00   7.3740e+00
+Branch    0.2 : -105.979235   7.2309e+00  -7.5912e+00
+Branch    0.5 : -107.694200   4.1603e+00  -9.4659e+00
+Branch    0.9 : -108.763225   1.5595e+00  -3.9497e+00
+Branch    1.5 : -109.245342   3.4684e-01  -8.5204e-01
+Branch    5.0 : -109.389867   1.0493e-04  -2.3772e-04
+Branch   10.0 : -109.389914   1.3360e-09  -3.0041e-09
+Branch   50.0 : -109.389914   4.5326e-15  -1.8679e-32
+Branch   90.0 : -109.389914   4.5326e-15  -1.8679e-32
 Test -105.234564 = -105.234564
-Branch(Tip)    0.1 : -102.669187   2.2056e+00   1.9154e+01
-Branch(Tip)    0.2 : -103.565615   4.3216e+00   2.5684e+00
-Branch(Tip)    0.5 : -106.644437   3.3568e+00  -2.4941e+00
-Branch(Tip)    0.9 : -108.893328   1.3459e+00  -1.3609e+00
-Branch(Tip)    1.5 : -109.923941   2.8967e-01  -2.9214e-01
-Branch(Tip)    5.0 : -110.220389   8.4824e-05  -7.6716e-05
-Branch(Tip)   10.0 : -110.220483   1.0920e-09  -9.8183e-10
-Branch(Tip)   50.0 : -110.220483   1.8138e-15  -3.0757e-33
-Branch(Tip)   90.0 : -110.220483   1.8138e-15  -3.0757e-33
+Branch(Tip)    0.1 : -102.669187   5.5139e+00   1.1971e+02
+Branch(Tip)    0.2 : -103.565615   1.0804e+01   1.6052e+01
+Branch(Tip)    0.5 : -106.644437   8.3920e+00  -1.5588e+01
+Branch(Tip)    0.9 : -108.893328   3.3646e+00  -8.5057e+00
+Branch(Tip)    1.5 : -109.923941   7.2417e-01  -1.8259e+00
+Branch(Tip)    5.0 : -110.220389   2.1206e-04  -4.7948e-04
+Branch(Tip)   10.0 : -110.220483   2.7300e-09  -6.1364e-09
+Branch(Tip)   50.0 : -110.220483   4.5345e-15  -1.9223e-32
+Branch(Tip)   90.0 : -110.220483   4.5345e-15  -1.9223e-32
 Test -103.565615 = -103.565615
 
 
  TEST alpha(ncats) =   0.75( 1) ; pinv = 0.90
 
 1.000000 
-Branch    0.1 : -135.403784   1.3449e-01  -1.2487e-01
-Branch    0.2 : -135.491444   5.3257e-02  -4.9217e-02
-Branch    0.5 : -135.545622   3.3897e-03  -3.0954e-03
-Branch    0.9 : -135.549245   8.9286e-05  -8.0898e-05
-Branch    1.5 : -135.549343   3.9519e-07  -3.5623e-07
-Branch    5.0 : -135.549344   1.7868e-15  -7.7070e-21
-Branch   10.0 : -135.549344   1.7868e-15  -2.0525e-34
-Branch   50.0 : -135.549344   1.7868e-15  -2.0525e-34
-Branch   90.0 : -135.549344   1.7868e-15  -2.0525e-34
+Branch    0.1 : -135.403784   1.3449e+00  -1.2487e+01
+Branch    0.2 : -135.491444   5.3257e-01  -4.9217e+00
+Branch    0.5 : -135.545622   3.3897e-02  -3.0954e-01
+Branch    0.9 : -135.549245   8.9286e-04  -8.0898e-03
+Branch    1.5 : -135.549343   3.9519e-06  -3.5623e-05
+Branch    5.0 : -135.549344   1.7868e-14  -7.7070e-19
+Branch   10.0 : -135.549344   1.7868e-14  -2.0525e-32
+Branch   50.0 : -135.549344   1.7868e-14  -2.0525e-32
+Branch   90.0 : -135.549344   1.7868e-14  -2.0525e-32
 Test -135.403784 = -135.403784
-Branch(Tip)    0.1 : -133.446326   2.1381e+00  -1.9967e+00
-Branch(Tip)    0.2 : -134.810864   7.9184e-01  -8.0598e-01
-Branch(Tip)    0.5 : -135.561972   4.1872e-02  -3.9416e-02
-Branch(Tip)    0.9 : -135.605905   1.0538e-03  -9.5817e-04
-Branch(Tip)    1.5 : -135.607062   4.6350e-06  -4.1792e-06
-Branch(Tip)    5.0 : -135.607067   1.7869e-15  -9.0274e-20
-Branch(Tip)   10.0 : -135.607067   1.7868e-15  -2.0531e-34
-Branch(Tip)   50.0 : -135.607067   1.7868e-15  -2.0531e-34
-Branch(Tip)   90.0 : -135.607067   1.7868e-15  -2.0531e-34
+Branch(Tip)    0.1 : -133.446326   2.1381e+01  -1.9967e+02
+Branch(Tip)    0.2 : -134.810864   7.9184e+00  -8.0598e+01
+Branch(Tip)    0.5 : -135.561972   4.1872e-01  -3.9416e+00
+Branch(Tip)    0.9 : -135.605905   1.0538e-02  -9.5817e-02
+Branch(Tip)    1.5 : -135.607062   4.6350e-05  -4.1792e-04
+Branch(Tip)    5.0 : -135.607067   1.7869e-14  -9.0274e-18
+Branch(Tip)   10.0 : -135.607067   1.7868e-14  -2.0531e-32
+Branch(Tip)   50.0 : -135.607067   1.7868e-14  -2.0531e-32
+Branch(Tip)   90.0 : -135.607067   1.7868e-14  -2.0531e-32
 Test -134.810864 = -134.810864
 
 
@@ -229,75 +229,75 @@ Test -93.655614 = -93.655614
  TEST alpha(ncats) =   1.50( 1) ; pinv = 0.30
 
 1.000000 
-Branch    0.1 : -96.794137   1.9850e+00   1.9247e+01
-Branch    0.2 : -97.202283   3.3895e+00   4.2134e+00
-Branch    0.5 : -98.720974   3.3119e+00  -1.9648e+00
-Branch    0.9 : -100.264298   2.0985e+00  -1.9525e+00
-Branch    1.5 : -101.478774   8.8475e-01  -9.2688e-01
-Branch    5.0 : -102.332278   6.5012e-03  -6.0266e-03
-Branch   10.0 : -102.339336   9.7096e-06  -8.7755e-06
-Branch   50.0 : -102.339347   1.9089e-15  -4.2869e-28
-Branch   90.0 : -102.339347   1.9089e-15  -8.9598e-33
+Branch    0.1 : -96.794137   2.8357e+00   3.9279e+01
+Branch    0.2 : -97.202283   4.8421e+00   8.5988e+00
+Branch    0.5 : -98.720974   4.7313e+00  -4.0098e+00
+Branch    0.9 : -100.264298   2.9979e+00  -3.9846e+00
+Branch    1.5 : -101.478774   1.2639e+00  -1.8916e+00
+Branch    5.0 : -102.332278   9.2874e-03  -1.2299e-02
+Branch   10.0 : -102.339336   1.3871e-05  -1.7909e-05
+Branch   50.0 : -102.339347   2.7270e-15  -8.7487e-28
+Branch   90.0 : -102.339347   2.7270e-15  -1.8285e-32
 Test -96.794137 = -96.794137
-Branch(Tip)    0.1 : -95.654016  -2.4563e+00   7.5478e+01
-Branch(Tip)    0.2 : -95.783099   3.0026e+00   1.8232e+01
-Branch(Tip)    0.5 : -97.748757   4.9821e+00  -1.0177e+00
-Branch(Tip)    0.9 : -100.251762   3.6262e+00  -2.8112e+00
-Branch(Tip)    1.5 : -102.436243   1.6434e+00  -1.6728e+00
-Branch(Tip)    5.0 : -104.017665   1.1604e-02  -1.0775e-02
-Branch(Tip)   10.0 : -104.030262   1.7447e-05  -1.5749e-05
-Branch(Tip)   50.0 : -104.030281   1.9142e-15  -7.7622e-28
-Branch(Tip)   90.0 : -104.030281   1.9142e-15  -9.4990e-33
+Branch(Tip)    0.1 : -95.654016  -3.5089e+00   1.5404e+02
+Branch(Tip)    0.2 : -95.783099   4.2894e+00   3.7207e+01
+Branch(Tip)    0.5 : -97.748757   7.1172e+00  -2.0770e+00
+Branch(Tip)    0.9 : -100.251762   5.1803e+00  -5.7371e+00
+Branch(Tip)    1.5 : -102.436243   2.3477e+00  -3.4138e+00
+Branch(Tip)    5.0 : -104.017665   1.6578e-02  -2.1989e-02
+Branch(Tip)   10.0 : -104.030262   2.4924e-05  -3.2141e-05
+Branch(Tip)   50.0 : -104.030281   2.7346e-15  -1.5841e-27
+Branch(Tip)   90.0 : -104.030281   2.7346e-15  -1.9386e-32
 Test -95.783099 = -95.783099
 
 
  TEST alpha(ncats) =   1.50( 1) ; pinv = 0.60
 
 1.000000 
-Branch    0.1 : -105.234564   2.9692e+00   1.1798e+00
-Branch    0.2 : -105.979235   2.8923e+00  -1.2146e+00
-Branch    0.5 : -107.694200   1.6641e+00  -1.5145e+00
-Branch    0.9 : -108.763225   6.2380e-01  -6.3195e-01
-Branch    1.5 : -109.245342   1.3874e-01  -1.3633e-01
-Branch    5.0 : -109.389867   4.1972e-05  -3.8035e-05
-Branch   10.0 : -109.389914   5.3442e-10  -4.8066e-10
-Branch   50.0 : -109.389914   1.8130e-15  -2.9886e-33
-Branch   90.0 : -109.389914   1.8130e-15  -2.9886e-33
+Branch    0.1 : -105.234564   7.4230e+00   7.3740e+00
+Branch    0.2 : -105.979235   7.2309e+00  -7.5912e+00
+Branch    0.5 : -107.694200   4.1603e+00  -9.4659e+00
+Branch    0.9 : -108.763225   1.5595e+00  -3.9497e+00
+Branch    1.5 : -109.245342   3.4684e-01  -8.5204e-01
+Branch    5.0 : -109.389867   1.0493e-04  -2.3772e-04
+Branch   10.0 : -109.389914   1.3360e-09  -3.0041e-09
+Branch   50.0 : -109.389914   4.5326e-15  -1.8679e-32
+Branch   90.0 : -109.389914   4.5326e-15  -1.8679e-32
 Test -105.234564 = -105.234564
-Branch(Tip)    0.1 : -102.669187   2.2056e+00   1.9154e+01
-Branch(Tip)    0.2 : -103.565615   4.3216e+00   2.5684e+00
-Branch(Tip)    0.5 : -106.644437   3.3568e+00  -2.4941e+00
-Branch(Tip)    0.9 : -108.893328   1.3459e+00  -1.3609e+00
-Branch(Tip)    1.5 : -109.923941   2.8967e-01  -2.9214e-01
-Branch(Tip)    5.0 : -110.220389   8.4824e-05  -7.6716e-05
-Branch(Tip)   10.0 : -110.220483   1.0920e-09  -9.8183e-10
-Branch(Tip)   50.0 : -110.220483   1.8138e-15  -3.0757e-33
-Branch(Tip)   90.0 : -110.220483   1.8138e-15  -3.0757e-33
+Branch(Tip)    0.1 : -102.669187   5.5139e+00   1.1971e+02
+Branch(Tip)    0.2 : -103.565615   1.0804e+01   1.6052e+01
+Branch(Tip)    0.5 : -106.644437   8.3920e+00  -1.5588e+01
+Branch(Tip)    0.9 : -108.893328   3.3646e+00  -8.5057e+00
+Branch(Tip)    1.5 : -109.923941   7.2417e-01  -1.8259e+00
+Branch(Tip)    5.0 : -110.220389   2.1206e-04  -4.7948e-04
+Branch(Tip)   10.0 : -110.220483   2.7300e-09  -6.1364e-09
+Branch(Tip)   50.0 : -110.220483   4.5345e-15  -1.9223e-32
+Branch(Tip)   90.0 : -110.220483   4.5345e-15  -1.9223e-32
 Test -103.565615 = -103.565615
 
 
  TEST alpha(ncats) =   1.50( 1) ; pinv = 0.90
 
 1.000000 
-Branch    0.1 : -135.403784   1.3449e-01  -1.2487e-01
-Branch    0.2 : -135.491444   5.3257e-02  -4.9217e-02
-Branch    0.5 : -135.545622   3.3897e-03  -3.0954e-03
-Branch    0.9 : -135.549245   8.9286e-05  -8.0898e-05
-Branch    1.5 : -135.549343   3.9519e-07  -3.5623e-07
-Branch    5.0 : -135.549344   1.7868e-15  -7.7070e-21
-Branch   10.0 : -135.549344   1.7868e-15  -2.0525e-34
-Branch   50.0 : -135.549344   1.7868e-15  -2.0525e-34
-Branch   90.0 : -135.549344   1.7868e-15  -2.0525e-34
+Branch    0.1 : -135.403784   1.3449e+00  -1.2487e+01
+Branch    0.2 : -135.491444   5.3257e-01  -4.9217e+00
+Branch    0.5 : -135.545622   3.3897e-02  -3.0954e-01
+Branch    0.9 : -135.549245   8.9286e-04  -8.0898e-03
+Branch    1.5 : -135.549343   3.9519e-06  -3.5623e-05
+Branch    5.0 : -135.549344   1.7868e-14  -7.7070e-19
+Branch   10.0 : -135.549344   1.7868e-14  -2.0525e-32
+Branch   50.0 : -135.549344   1.7868e-14  -2.0525e-32
+Branch   90.0 : -135.549344   1.7868e-14  -2.0525e-32
 Test -135.403784 = -135.403784
-Branch(Tip)    0.1 : -133.446326   2.1381e+00  -1.9967e+00
-Branch(Tip)    0.2 : -134.810864   7.9184e-01  -8.0598e-01
-Branch(Tip)    0.5 : -135.561972   4.1872e-02  -3.9416e-02
-Branch(Tip)    0.9 : -135.605905   1.0538e-03  -9.5817e-04
-Branch(Tip)    1.5 : -135.607062   4.6350e-06  -4.1792e-06
-Branch(Tip)    5.0 : -135.607067   1.7869e-15  -9.0274e-20
-Branch(Tip)   10.0 : -135.607067   1.7868e-15  -2.0531e-34
-Branch(Tip)   50.0 : -135.607067   1.7868e-15  -2.0531e-34
-Branch(Tip)   90.0 : -135.607067   1.7868e-15  -2.0531e-34
+Branch(Tip)    0.1 : -133.446326   2.1381e+01  -1.9967e+02
+Branch(Tip)    0.2 : -134.810864   7.9184e+00  -8.0598e+01
+Branch(Tip)    0.5 : -135.561972   4.1872e-01  -3.9416e+00
+Branch(Tip)    0.9 : -135.605905   1.0538e-02  -9.5817e-02
+Branch(Tip)    1.5 : -135.607062   4.6350e-05  -4.1792e-04
+Branch(Tip)    5.0 : -135.607067   1.7869e-14  -9.0274e-18
+Branch(Tip)   10.0 : -135.607067   1.7868e-14  -2.0531e-32
+Branch(Tip)   50.0 : -135.607067   1.7868e-14  -2.0531e-32
+Branch(Tip)   90.0 : -135.607067   1.7868e-14  -2.0531e-32
 Test -134.810864 = -134.810864
 FREE CREATE
 
@@ -330,75 +330,75 @@ Test -96.546275 = -96.546275
  TEST alpha(ncats) =   0.10( 2) ; pinv = 0.30
 
 0.000539 1.999461 
-Branch    0.1 : -104.028021   4.6625e+00   8.4205e-02
-Branch    0.2 : -104.669621   4.2008e+00  -5.1365e+00
-Branch    0.5 : -105.969457   1.9744e+00  -4.0549e+00
-Branch    0.9 : -106.623417   5.8124e-01  -1.2537e+00
-Branch    1.5 : -106.851604   9.2994e-02  -2.0165e-01
-Branch    5.0 : -106.858064  -9.1501e-03   1.0867e-04
-Branch   10.0 : -106.795734  -8.3153e-03   1.0943e-04
-Branch   50.0 : -106.449212  -4.4255e-03   4.2224e-05
-Branch   90.0 : -106.251496  -2.6839e-03   2.1938e-05
+Branch    0.1 : -104.028021   6.6607e+00   1.7185e-01
+Branch    0.2 : -104.669621   6.0011e+00  -1.0483e+01
+Branch    0.5 : -105.969457   2.8206e+00  -8.2753e+00
+Branch    0.9 : -106.623417   8.3034e-01  -2.5586e+00
+Branch    1.5 : -106.851604   1.3285e-01  -4.1152e-01
+Branch    5.0 : -106.858064  -1.3072e-02   2.2178e-04
+Branch   10.0 : -106.795734  -1.1879e-02   2.2333e-04
+Branch   50.0 : -106.449212  -6.3222e-03   8.6172e-05
+Branch   90.0 : -106.251496  -3.8341e-03   4.4771e-05
 Test -104.028021 = -104.028021
-Branch(Tip)    0.1 : -101.414509   4.6386e+00   5.2460e+01
-Branch(Tip)    0.2 : -102.372106   7.6941e+00   4.1877e+00
-Branch(Tip)    0.5 : -105.254140   5.0203e+00  -8.5815e+00
-Branch(Tip)    0.9 : -106.998735   1.6014e+00  -3.4367e+00
-Branch(Tip)    1.5 : -107.622175   2.4589e-01  -5.5503e-01
-Branch(Tip)    5.0 : -107.615865  -2.7618e-02   8.4367e-04
-Branch(Tip)   10.0 : -107.438408  -2.2386e-02   6.0668e-04
-Branch(Tip)   50.0 : -106.687318  -8.0197e-03   1.0390e-04
-Branch(Tip)   90.0 : -106.352023  -4.2911e-03   4.0868e-05
+Branch(Tip)    0.1 : -101.414509   6.6266e+00   1.0706e+02
+Branch(Tip)    0.2 : -102.372106   1.0992e+01   8.5464e+00
+Branch(Tip)    0.5 : -105.254140   7.1719e+00  -1.7513e+01
+Branch(Tip)    0.9 : -106.998735   2.2876e+00  -7.0136e+00
+Branch(Tip)    1.5 : -107.622175   3.5127e-01  -1.1327e+00
+Branch(Tip)    5.0 : -107.615865  -3.9455e-02   1.7218e-03
+Branch(Tip)   10.0 : -107.438408  -3.1980e-02   1.2381e-03
+Branch(Tip)   50.0 : -106.687318  -1.1457e-02   2.1203e-04
+Branch(Tip)   90.0 : -106.352023  -6.1301e-03   8.3405e-05
 Test -102.372106 = -102.372106
 
 
  TEST alpha(ncats) =   0.10( 2) ; pinv = 0.60
 
 0.000539 1.999461 
-Branch    0.1 : -116.056752   2.2263e+00  -4.2014e+00
-Branch    0.2 : -116.496758   1.3531e+00  -2.7937e+00
-Branch    0.5 : -117.006458   2.7413e-01  -5.9712e-01
-Branch    0.9 : -117.112701   1.8464e-02  -8.1339e-02
-Branch    1.5 : -117.097650  -2.1525e-02  -4.3846e-03
-Branch    5.0 : -116.908900  -1.9511e-02   4.4690e-04
-Branch   10.0 : -116.694771  -1.5095e-02   2.7924e-04
-Branch   50.0 : -115.871630  -4.6929e-03   3.8484e-05
-Branch   90.0 : -115.538765  -2.3513e-03   1.4155e-05
+Branch    0.1 : -116.056752   5.5658e+00  -2.6259e+01
+Branch    0.2 : -116.496758   3.3827e+00  -1.7461e+01
+Branch    0.5 : -117.006458   6.8532e-01  -3.7320e+00
+Branch    0.9 : -117.112701   4.6160e-02  -5.0837e-01
+Branch    1.5 : -117.097650  -5.3814e-02  -2.7404e-02
+Branch    5.0 : -116.908900  -4.8778e-02   2.7931e-03
+Branch   10.0 : -116.694771  -3.7738e-02   1.7453e-03
+Branch   50.0 : -115.871630  -1.1732e-02   2.4053e-04
+Branch   90.0 : -115.538765  -5.8782e-03   8.8466e-05
 Test -116.056752 = -116.056752
-Branch(Tip)    0.1 : -112.753719   7.2471e+00  -6.3568e-01
-Branch(Tip)    0.2 : -114.413757   5.7337e+00  -8.4037e+00
-Branch(Tip)    0.5 : -116.743003   1.2649e+00  -2.9248e+00
-Branch(Tip)    0.9 : -117.201888   5.4257e-02  -3.4819e-01
-Branch(Tip)    1.5 : -117.112107  -9.9905e-02  -7.9579e-03
-Branch(Tip)    5.0 : -116.446013  -5.5121e-02   3.2233e-03
-Branch(Tip)   10.0 : -115.930355  -3.1559e-02   1.1022e-03
-Branch(Tip)   50.0 : -114.628732  -6.0992e-03   5.8436e-05
-Branch(Tip)   90.0 : -114.214077  -2.8215e-03   1.8274e-05
+Branch(Tip)    0.1 : -112.753719   1.8118e+01  -3.9730e+00
+Branch(Tip)    0.2 : -114.413757   1.4334e+01  -5.2523e+01
+Branch(Tip)    0.5 : -116.743003   3.1622e+00  -1.8280e+01
+Branch(Tip)    0.9 : -117.201888   1.3564e-01  -2.1762e+00
+Branch(Tip)    1.5 : -117.112107  -2.4976e-01  -4.9737e-02
+Branch(Tip)    5.0 : -116.446013  -1.3780e-01   2.0146e-02
+Branch(Tip)   10.0 : -115.930355  -7.8896e-02   6.8889e-03
+Branch(Tip)   50.0 : -114.628732  -1.5248e-02   3.6523e-04
+Branch(Tip)   90.0 : -114.214077  -7.0537e-03   1.1421e-04
 Test -114.413757 = -114.413757
 
 
  TEST alpha(ncats) =   0.10( 2) ; pinv = 0.90
 
 0.000539 1.999461 
-Branch    0.1 : -138.922967  -4.2185e-02  -3.0043e-04
-Branch    0.2 : -138.881073  -4.1324e-02   1.4719e-03
-Branch    0.5 : -138.764274  -3.6606e-02   1.4536e-03
-Branch    0.9 : -138.628426  -3.1557e-02   1.0953e-03
-Branch    1.5 : -138.456525  -2.6075e-02   7.6217e-04
-Branch    5.0 : -137.833853  -1.2521e-02   1.9661e-04
-Branch   10.0 : -137.377308  -6.7582e-03   6.7467e-05
-Branch   50.0 : -136.469697  -6.5004e-04   3.1631e-06
-Branch   90.0 : -136.368214  -8.8157e-06   7.3585e-07
+Branch    0.1 : -138.922967  -4.2185e-01  -3.0043e-02
+Branch    0.2 : -138.881073  -4.1324e-01   1.4719e-01
+Branch    0.5 : -138.764274  -3.6606e-01   1.4536e-01
+Branch    0.9 : -138.628426  -3.1557e-01   1.0953e-01
+Branch    1.5 : -138.456525  -2.6075e-01   7.6217e-02
+Branch    5.0 : -137.833853  -1.2521e-01   1.9661e-02
+Branch   10.0 : -137.377308  -6.7582e-02   6.7467e-03
+Branch   50.0 : -136.469697  -6.5004e-03   3.1631e-04
+Branch   90.0 : -136.368214  -8.8157e-05   7.3585e-05
 Test -138.922967 = -138.922967
-Branch(Tip)    0.1 : -138.945270   1.7078e-01  -8.5463e-01
-Branch(Tip)    0.2 : -138.889758  -1.6108e-01  -7.3287e-02
-Branch(Tip)    0.5 : -138.406505  -1.3412e-01   1.7936e-02
-Branch(Tip)    0.9 : -137.978373  -8.6615e-02   7.7402e-03
-Branch(Tip)    1.5 : -137.562681  -5.6219e-02   3.3155e-03
-Branch(Tip)    5.0 : -136.506438  -1.7747e-02   3.6421e-04
-Branch(Tip)   10.0 : -135.903023  -8.4426e-03   9.4976e-05
-Branch(Tip)   50.0 : -134.808019  -8.3400e-04   3.5670e-06
-Branch(Tip)   90.0 : -134.654702  -9.9624e-05   8.8210e-07
+Branch(Tip)    0.1 : -138.945270   1.7078e+00  -8.5463e+01
+Branch(Tip)    0.2 : -138.889758  -1.6108e+00  -7.3287e+00
+Branch(Tip)    0.5 : -138.406505  -1.3412e+00   1.7936e+00
+Branch(Tip)    0.9 : -137.978373  -8.6615e-01   7.7402e-01
+Branch(Tip)    1.5 : -137.562681  -5.6219e-01   3.3155e-01
+Branch(Tip)    5.0 : -136.506438  -1.7747e-01   3.6421e-02
+Branch(Tip)   10.0 : -135.903023  -8.4426e-02   9.4976e-03
+Branch(Tip)   50.0 : -134.808019  -8.3400e-03   3.5670e-04
+Branch(Tip)   90.0 : -134.654702  -9.9624e-04   8.8210e-05
 Test -138.889758 = -138.889758
 
 
@@ -430,75 +430,75 @@ Test -94.102420 = -94.102420
  TEST alpha(ncats) =   0.75( 2) ; pinv = 0.30
 
 0.235541 1.764459 
-Branch    0.1 : -98.486511   3.3771e-01   1.7026e+01
-Branch    0.2 : -98.640616   1.5076e+00   3.1386e+00
-Branch    0.5 : -99.337167   1.5103e+00  -8.8956e-01
-Branch    0.9 : -100.070291   1.0937e+00  -5.2807e-01
-Branch    1.5 : -100.862467   7.9584e-01  -2.3231e-01
-Branch    5.0 : -103.116309   2.1901e-01  -6.0592e-02
-Branch   10.0 : -103.793412   3.0206e-02  -8.0893e-03
-Branch   50.0 : -103.912378   8.3078e-08  -1.7732e-08
-Branch   90.0 : -103.912378   4.4787e-13  -9.4411e-14
+Branch    0.1 : -98.486511   4.8245e-01   3.4746e+01
+Branch    0.2 : -98.640616   2.1537e+00   6.4052e+00
+Branch    0.5 : -99.337167   2.1576e+00  -1.8154e+00
+Branch    0.9 : -100.070291   1.5624e+00  -1.0777e+00
+Branch    1.5 : -100.862467   1.1369e+00  -4.7410e-01
+Branch    5.0 : -103.116309   3.1288e-01  -1.2366e-01
+Branch   10.0 : -103.793412   4.3152e-02  -1.6509e-02
+Branch   50.0 : -103.912378   1.1868e-07  -3.6188e-08
+Branch   90.0 : -103.912378   6.3981e-13  -1.9268e-13
 Test -98.486511 = -98.486511
-Branch(Tip)    0.1 : -97.255797  -1.2642e+00   6.5717e+01
-Branch(Tip)    0.2 : -97.473190   3.1241e+00   1.2025e+01
-Branch(Tip)    0.5 : -99.056197   3.3659e+00  -3.1198e+00
-Branch(Tip)    0.9 : -100.506147   1.8507e+00  -1.8280e+00
-Branch(Tip)    1.5 : -101.645762   9.9407e-01  -4.9280e-01
-Branch(Tip)    5.0 : -104.177195   2.4402e-01  -6.4395e-02
-Branch(Tip)   10.0 : -104.961981   3.7890e-02  -9.5395e-03
-Branch(Tip)   50.0 : -105.119351   1.3603e-07  -2.8883e-08
-Branch(Tip)   90.0 : -105.119352   7.5213e-13  -1.5874e-13
+Branch(Tip)    0.1 : -97.255797  -1.8060e+00   1.3412e+02
+Branch(Tip)    0.2 : -97.473190   4.4631e+00   2.4541e+01
+Branch(Tip)    0.5 : -99.056197   4.8085e+00  -6.3669e+00
+Branch(Tip)    0.9 : -100.506147   2.6438e+00  -3.7306e+00
+Branch(Tip)    1.5 : -101.645762   1.4201e+00  -1.0057e+00
+Branch(Tip)    5.0 : -104.177195   3.4861e-01  -1.3142e-01
+Branch(Tip)   10.0 : -104.961981   5.4128e-02  -1.9468e-02
+Branch(Tip)   50.0 : -105.119351   1.9432e-07  -5.8945e-08
+Branch(Tip)   90.0 : -105.119352   1.0745e-12  -3.2395e-13
 Test -97.473190 = -97.473190
 
 
  TEST alpha(ncats) =   0.75( 2) ; pinv = 0.60
 
 0.235541 1.764459 
-Branch    0.1 : -105.546124  -2.5822e-02   4.7039e+00
-Branch    0.2 : -105.632352   5.7309e-01   1.0796e+00
-Branch    0.5 : -106.172912   7.5185e-01  -4.8487e-02
-Branch    0.9 : -106.884937   6.6512e-01  -9.9919e-02
-Branch    1.5 : -107.768071   5.1218e-01  -1.0087e-01
-Branch    5.0 : -109.658848   5.6365e-02  -1.4856e-02
-Branch   10.0 : -109.870983   2.6258e-03  -6.0452e-04
-Branch   50.0 : -109.882647   1.2680e-12  -2.6819e-13
-Branch   90.0 : -109.882647   1.8333e-15  -1.7228e-22
+Branch    0.1 : -105.546124  -6.4556e-02   2.9400e+01
+Branch    0.2 : -105.632352   1.4327e+00   6.7475e+00
+Branch    0.5 : -106.172912   1.8796e+00  -3.0304e-01
+Branch    0.9 : -106.884937   1.6628e+00  -6.2449e-01
+Branch    1.5 : -107.768071   1.2805e+00  -6.3045e-01
+Branch    5.0 : -109.658848   1.4091e-01  -9.2852e-02
+Branch   10.0 : -109.870983   6.5645e-03  -3.7782e-03
+Branch   50.0 : -109.882647   3.1701e-12  -1.6762e-12
+Branch   90.0 : -109.882647   4.5832e-15  -1.0767e-21
 Test -105.546124 = -105.546124
-Branch(Tip)    0.1 : -104.049259   8.5805e-01   1.4950e+01
-Branch(Tip)    0.2 : -104.498289   2.1812e+00   4.9487e-01
-Branch(Tip)    0.5 : -105.860021   1.3663e+00  -9.6245e-01
-Branch(Tip)    0.9 : -106.910923   8.4893e-01  -2.5996e-01
-Branch(Tip)    1.5 : -107.972545   5.9625e-01  -1.2692e-01
-Branch(Tip)    5.0 : -110.193971   7.1176e-02  -1.7697e-02
-Branch(Tip)   10.0 : -110.473947   3.7680e-03  -8.4410e-04
-Branch(Tip)   50.0 : -110.491054   2.0703e-12  -4.3785e-13
-Branch(Tip)   90.0 : -110.491054   1.9405e-15  -2.8235e-22
+Branch(Tip)    0.1 : -104.049259   2.1451e+00   9.3439e+01
+Branch(Tip)    0.2 : -104.498289   5.4530e+00   3.0930e+00
+Branch(Tip)    0.5 : -105.860021   3.4158e+00  -6.0153e+00
+Branch(Tip)    0.9 : -106.910923   2.1223e+00  -1.6248e+00
+Branch(Tip)    1.5 : -107.972545   1.4906e+00  -7.9327e-01
+Branch(Tip)    5.0 : -110.193971   1.7794e-01  -1.1061e-01
+Branch(Tip)   10.0 : -110.473947   9.4199e-03  -5.2756e-03
+Branch(Tip)   50.0 : -110.491054   5.1759e-12  -2.7366e-12
+Branch(Tip)   90.0 : -110.491054   4.8514e-15  -1.7647e-21
 Test -104.498289 = -104.498289
 
 
  TEST alpha(ncats) =   0.75( 2) ; pinv = 0.90
 
 0.235541 1.764459 
-Branch    0.1 : -127.711862   5.8250e-01   1.5526e-02
-Branch    0.2 : -128.284014   5.4887e-01  -6.4615e-02
-Branch    0.5 : -129.580571   3.1572e-01  -7.0200e-02
-Branch    0.9 : -130.400475   1.2155e-01  -2.9903e-02
-Branch    1.5 : -130.782605   2.8277e-02  -6.7221e-03
-Branch    5.0 : -130.905044   1.2494e-05  -2.6776e-06
-Branch   10.0 : -130.905103   2.9893e-10  -6.3378e-11
-Branch   50.0 : -130.905103   1.4717e-15  -1.0960e-31
-Branch   90.0 : -130.905103   1.4717e-15  -1.0960e-31
+Branch    0.1 : -127.711862   5.8250e+00   1.5526e+00
+Branch    0.2 : -128.284014   5.4887e+00  -6.4615e+00
+Branch    0.5 : -129.580571   3.1572e+00  -7.0200e+00
+Branch    0.9 : -130.400475   1.2155e+00  -2.9903e+00
+Branch    1.5 : -130.782605   2.8277e-01  -6.7221e-01
+Branch    5.0 : -130.905044   1.2494e-04  -2.6776e-04
+Branch   10.0 : -130.905103   2.9893e-09  -6.3378e-09
+Branch   50.0 : -130.905103   1.4717e-14  -1.0960e-29
+Branch   90.0 : -130.905103   1.4717e-14  -1.0960e-29
 Test -127.711862 = -127.711862
-Branch(Tip)    0.1 : -125.625053   7.1383e-01   3.3377e-01
-Branch(Tip)    0.2 : -126.418512   8.1985e-01  -1.4585e-02
-Branch(Tip)    0.5 : -128.519703   5.4130e-01  -1.0973e-01
-Branch(Tip)    0.9 : -129.954960   2.1623e-01  -5.2454e-02
-Branch(Tip)    1.5 : -130.637596   5.0648e-02  -1.2030e-02
-Branch(Tip)    5.0 : -130.857400   2.3257e-05  -4.9594e-06
-Branch(Tip)   10.0 : -130.857509   5.7147e-10  -1.2105e-10
-Branch(Tip)   50.0 : -130.857509   1.5508e-15  -1.0707e-31
-Branch(Tip)   90.0 : -130.857509   1.5508e-15  -1.0707e-31
+Branch(Tip)    0.1 : -125.625053   7.1383e+00   3.3377e+01
+Branch(Tip)    0.2 : -126.418512   8.1985e+00  -1.4585e+00
+Branch(Tip)    0.5 : -128.519703   5.4130e+00  -1.0973e+01
+Branch(Tip)    0.9 : -129.954960   2.1623e+00  -5.2454e+00
+Branch(Tip)    1.5 : -130.637596   5.0648e-01  -1.2030e+00
+Branch(Tip)    5.0 : -130.857400   2.3257e-04  -4.9594e-04
+Branch(Tip)   10.0 : -130.857509   5.7147e-09  -1.2105e-08
+Branch(Tip)   50.0 : -130.857509   1.5508e-14  -1.0707e-29
+Branch(Tip)   90.0 : -130.857509   1.5508e-14  -1.0707e-29
 Test -126.418512 = -126.418512
 
 
@@ -530,75 +530,75 @@ Test -93.657034 = -93.657034
  TEST alpha(ncats) =   1.50( 2) ; pinv = 0.30
 
 0.406939 1.593061 
-Branch    0.1 : -97.458253   7.0661e-01   1.9302e+01
-Branch    0.2 : -97.682421   2.0905e+00   4.1286e+00
-Branch    0.5 : -98.673831   2.2274e+00  -1.0032e+00
-Branch    0.9 : -99.774905   1.6410e+00  -9.0480e-01
-Branch    1.5 : -100.902894   1.0448e+00  -5.2778e-01
-Branch    5.0 : -102.853358   9.3689e-02  -4.3489e-02
-Branch   10.0 : -103.054876   4.4197e-03  -1.7641e-03
-Branch   50.0 : -103.066215   2.7800e-12  -1.0166e-12
-Branch   90.0 : -103.066215   2.0062e-15  -8.5509e-22
+Branch    0.1 : -97.458253   1.0094e+00   3.9392e+01
+Branch    0.2 : -97.682421   2.9865e+00   8.4257e+00
+Branch    0.5 : -98.673831   3.1820e+00  -2.0474e+00
+Branch    0.9 : -99.774905   2.3443e+00  -1.8465e+00
+Branch    1.5 : -100.902894   1.4925e+00  -1.0771e+00
+Branch    5.0 : -102.853358   1.3384e-01  -8.8753e-02
+Branch   10.0 : -103.054876   6.3138e-03  -3.6003e-03
+Branch   50.0 : -103.066215   3.9715e-12  -2.0748e-12
+Branch   90.0 : -103.066215   2.8660e-15  -1.7451e-21
 Test -97.458253 = -97.458253
-Branch(Tip)    0.1 : -96.346892  -2.0750e+00   6.9924e+01
-Branch(Tip)    0.2 : -96.484277   2.7841e+00   1.4813e+01
-Branch(Tip)    0.5 : -98.125627   3.8651e+00  -1.9314e+00
-Branch(Tip)    0.9 : -99.965847   2.5922e+00  -1.9509e+00
-Branch(Tip)    1.5 : -101.629904   1.4445e+00  -8.7672e-01
-Branch(Tip)    5.0 : -104.200538   1.2651e-01  -5.6371e-02
-Branch(Tip)   10.0 : -104.481673   6.5785e-03  -2.5673e-03
-Branch(Tip)   50.0 : -104.498869   4.6566e-12  -1.7023e-12
-Branch(Tip)   90.0 : -104.498869   2.0583e-15  -1.4374e-21
+Branch(Tip)    0.1 : -96.346892  -2.9642e+00   1.4270e+02
+Branch(Tip)    0.2 : -96.484277   3.9772e+00   3.0230e+01
+Branch(Tip)    0.5 : -98.125627   5.5216e+00  -3.9416e+00
+Branch(Tip)    0.9 : -99.965847   3.7031e+00  -3.9814e+00
+Branch(Tip)    1.5 : -101.629904   2.0635e+00  -1.7892e+00
+Branch(Tip)    5.0 : -104.200538   1.8073e-01  -1.1504e-01
+Branch(Tip)   10.0 : -104.481673   9.3979e-03  -5.2393e-03
+Branch(Tip)   50.0 : -104.498869   6.6523e-12  -3.4742e-12
+Branch(Tip)   90.0 : -104.498869   2.9404e-15  -2.9335e-21
 Test -96.484277 = -96.484277
 
 
  TEST alpha(ncats) =   1.50( 2) ; pinv = 0.60
 
 0.406939 1.593061 
-Branch    0.1 : -104.666269   9.5280e-01   3.9119e+00
-Branch    0.2 : -104.978193   1.4127e+00   6.2776e-01
-Branch    0.5 : -106.031272   1.2877e+00  -4.1885e-01
-Branch    0.9 : -107.112584   8.8727e-01  -3.5491e-01
-Branch    1.5 : -108.103381   4.7091e-01  -2.0716e-01
-Branch    5.0 : -109.136939   1.0619e-02  -4.2784e-03
-Branch   10.0 : -109.163764   8.8586e-05  -3.3052e-05
-Branch   50.0 : -109.164003   1.7359e-15  -3.8721e-21
-Branch   90.0 : -109.164003   1.7359e-15  -6.6020e-32
+Branch    0.1 : -104.666269   2.3820e+00   2.4449e+01
+Branch    0.2 : -104.978193   3.5318e+00   3.9235e+00
+Branch    0.5 : -106.031272   3.2192e+00  -2.6178e+00
+Branch    0.9 : -107.112584   2.2182e+00  -2.2182e+00
+Branch    1.5 : -108.103381   1.1773e+00  -1.2947e+00
+Branch    5.0 : -109.136939   2.6548e-02  -2.6740e-02
+Branch   10.0 : -109.163764   2.2147e-04  -2.0658e-04
+Branch   50.0 : -109.164003   4.3398e-15  -2.4200e-20
+Branch   90.0 : -109.164003   4.3398e-15  -4.1262e-31
 Test -104.666269 = -104.666269
-Branch(Tip)    0.1 : -102.933684   9.1479e-01   1.7227e+01
-Branch(Tip)    0.2 : -103.457404   2.6819e+00   1.8086e+00
-Branch(Tip)    0.5 : -105.372444   2.1520e+00  -1.1708e+00
-Branch(Tip)    0.9 : -107.044353   1.2869e+00  -6.1404e-01
-Branch(Tip)    1.5 : -108.438083   6.5003e-01  -2.9012e-01
-Branch(Tip)    5.0 : -109.887296   1.5994e-02  -6.3191e-03
-Branch(Tip)   10.0 : -109.928350   1.4173e-04  -5.2449e-05
-Branch(Tip)   50.0 : -109.928734   1.8126e-15  -6.5157e-21
-Branch(Tip)   90.0 : -109.928734   1.8126e-15  -6.5109e-32
+Branch(Tip)    0.1 : -102.933684   2.2870e+00   1.0767e+02
+Branch(Tip)    0.2 : -103.457404   6.7047e+00   1.1304e+01
+Branch(Tip)    0.5 : -105.372444   5.3799e+00  -7.3177e+00
+Branch(Tip)    0.9 : -107.044353   3.2172e+00  -3.8377e+00
+Branch(Tip)    1.5 : -108.438083   1.6251e+00  -1.8132e+00
+Branch(Tip)    5.0 : -109.887296   3.9985e-02  -3.9494e-02
+Branch(Tip)   10.0 : -109.928350   3.5434e-04  -3.2781e-04
+Branch(Tip)   50.0 : -109.928734   4.5315e-15  -4.0723e-20
+Branch(Tip)   90.0 : -109.928734   4.5315e-15  -4.0693e-31
 Test -103.457404 = -103.457404
 
 
  TEST alpha(ncats) =   1.50( 2) ; pinv = 0.90
 
 0.406939 1.593061 
-Branch    0.1 : -131.758422   6.4067e-01  -2.2745e-01
-Branch    0.2 : -132.293924   4.3956e-01  -1.7280e-01
-Branch    0.5 : -133.057245   1.2912e-01  -5.3050e-02
-Branch    0.9 : -133.312463   2.5801e-02  -1.0167e-02
-Branch    1.5 : -133.372365   2.5573e-03  -9.6867e-04
-Branch    5.0 : -133.379168   6.1187e-09  -2.2432e-09
-Branch   10.0 : -133.379168   1.7019e-15  -2.5386e-17
-Branch   50.0 : -133.379168   1.6325e-15  -7.2149e-32
-Branch   90.0 : -133.379168   1.6325e-15  -7.2149e-32
+Branch    0.1 : -131.758422   6.4067e+00  -2.2745e+01
+Branch    0.2 : -132.293924   4.3956e+00  -1.7280e+01
+Branch    0.5 : -133.057245   1.2912e+00  -5.3050e+00
+Branch    0.9 : -133.312463   2.5801e-01  -1.0167e+00
+Branch    1.5 : -133.372365   2.5573e-02  -9.6867e-02
+Branch    5.0 : -133.379168   6.1187e-08  -2.2432e-07
+Branch   10.0 : -133.379168   1.7019e-14  -2.5386e-15
+Branch   50.0 : -133.379168   1.6325e-14  -7.2149e-30
+Branch   90.0 : -133.379168   1.6325e-14  -7.2149e-30
 Test -131.758422 = -131.758422
-Branch(Tip)    0.1 : -128.963227   1.6159e+00  -4.3447e-01
-Branch(Tip)    0.2 : -130.354719   1.1717e+00  -4.1724e-01
-Branch(Tip)    0.5 : -132.433049   3.5230e-01  -1.4836e-01
-Branch(Tip)    0.9 : -133.116430   6.6890e-02  -2.7085e-02
-Branch(Tip)    1.5 : -133.269371   6.4084e-03  -2.4383e-03
-Branch(Tip)    5.0 : -133.286405   1.5741e-08  -5.7648e-09
-Branch(Tip)   10.0 : -133.286405   1.8257e-15  -6.5714e-17
-Branch(Tip)   50.0 : -133.286405   1.6460e-15  -7.0651e-32
-Branch(Tip)   90.0 : -133.286405   1.6460e-15  -7.0651e-32
+Branch(Tip)    0.1 : -128.963227   1.6159e+01  -4.3447e+01
+Branch(Tip)    0.2 : -130.354719   1.1717e+01  -4.1724e+01
+Branch(Tip)    0.5 : -132.433049   3.5230e+00  -1.4836e+01
+Branch(Tip)    0.9 : -133.116430   6.6890e-01  -2.7085e+00
+Branch(Tip)    1.5 : -133.269371   6.4084e-02  -2.4383e-01
+Branch(Tip)    5.0 : -133.286405   1.5741e-07  -5.7648e-07
+Branch(Tip)   10.0 : -133.286405   1.8257e-14  -6.5714e-15
+Branch(Tip)   50.0 : -133.286405   1.6460e-14  -7.0651e-30
+Branch(Tip)   90.0 : -133.286405   1.6460e-14  -7.0651e-30
 Test -130.354719 = -130.354719
 FREE CREATE
 
@@ -631,75 +631,75 @@ Test -103.284213 = -103.284213
  TEST alpha(ncats) =   0.10( 4) ; pinv = 0.30
 
 0.000001 0.001078 0.093753 3.905168 
-Branch    0.1 : -109.836944  -1.0006e+00   5.8036e+00
-Branch    0.2 : -109.730508  -5.9188e-01   1.2446e+00
-Branch    0.5 : -109.532033  -3.7924e-01   3.5123e-01
-Branch    0.9 : -109.372263  -1.8534e-01   2.9812e-01
-Branch    1.5 : -109.301326  -3.0128e-03   1.4046e-01
-Branch    5.0 : -109.880356   1.3957e-01  -5.4382e-03
-Branch   10.0 : -110.662524   7.7637e-02  -8.1489e-03
-Branch   50.0 : -111.330836   1.6256e-04  -9.8979e-06
-Branch   90.0 : -111.338296   1.7339e-04   1.9522e-06
+Branch    0.1 : -109.836944  -1.4294e+00   1.1844e+01
+Branch    0.2 : -109.730508  -8.4554e-01   2.5400e+00
+Branch    0.5 : -109.532033  -5.4177e-01   7.1680e-01
+Branch    0.9 : -109.372263  -2.6477e-01   6.0842e-01
+Branch    1.5 : -109.301326  -4.3040e-03   2.8665e-01
+Branch    5.0 : -109.880356   1.9938e-01  -1.1098e-02
+Branch   10.0 : -110.662524   1.1091e-01  -1.6630e-02
+Branch   50.0 : -111.330836   2.3223e-04  -2.0200e-05
+Branch   90.0 : -111.338296   2.4770e-04   3.9842e-06
 Test -109.836944 = -109.836944
-Branch(Tip)    0.1 : -108.155673   4.9656e+00   1.6938e+01
-Branch(Tip)    0.2 : -108.859844   4.2340e+00  -1.3932e+01
-Branch(Tip)    0.5 : -109.653060   3.6556e-01  -3.3599e+00
-Branch(Tip)    0.9 : -109.617433  -1.9976e-01   2.2318e-02
-Branch(Tip)    1.5 : -109.499575  -6.3696e-02   1.5578e-01
-Branch(Tip)    5.0 : -109.889394   1.1251e-01  -2.8722e-03
-Branch(Tip)   10.0 : -110.535690   6.5785e-02  -6.4091e-03
-Branch(Tip)   50.0 : -111.141086  -3.6336e-04  -1.4832e-05
-Branch(Tip)   90.0 : -111.119380  -2.6849e-04   4.6515e-06
+Branch(Tip)    0.1 : -108.155673   7.0938e+00   3.4567e+01
+Branch(Tip)    0.2 : -108.859844   6.0485e+00  -2.8432e+01
+Branch(Tip)    0.5 : -109.653060   5.2223e-01  -6.8569e+00
+Branch(Tip)    0.9 : -109.617433  -2.8538e-01   4.5548e-02
+Branch(Tip)    1.5 : -109.499575  -9.0994e-02   3.1791e-01
+Branch(Tip)    5.0 : -109.889394   1.6073e-01  -5.8617e-03
+Branch(Tip)   10.0 : -110.535690   9.3978e-02  -1.3080e-02
+Branch(Tip)   50.0 : -111.141086  -5.1909e-04  -3.0269e-05
+Branch(Tip)   90.0 : -111.119380  -3.8356e-04   9.4928e-06
 Test -108.859844 = -108.859844
 
 
  TEST alpha(ncats) =   0.10( 4) ; pinv = 0.60
 
 0.000001 0.001078 0.093753 3.905168 
-Branch    0.1 : -116.825451  -1.6034e+00   4.7721e+00
-Branch    0.2 : -116.530823  -8.7116e-01   1.8104e+00
-Branch    0.5 : -116.180514  -2.1714e-01   4.2580e-01
-Branch    0.9 : -116.109012   2.7832e-02   1.3450e-01
-Branch    1.5 : -116.250021   1.3615e-01   3.3955e-02
-Branch    5.0 : -117.516001   1.0861e-01  -1.0168e-02
-Branch   10.0 : -118.269287   2.7069e-02  -3.2553e-03
-Branch   50.0 : -118.450766  -4.4717e-04   3.1439e-06
-Branch   90.0 : -118.419518  -2.0092e-04   1.8199e-06
+Branch    0.1 : -116.825451  -4.0086e+00   2.9826e+01
+Branch    0.2 : -116.530823  -2.1779e+00   1.1315e+01
+Branch    0.5 : -116.180514  -5.4286e-01   2.6613e+00
+Branch    0.9 : -116.109012   6.9580e-02   8.4062e-01
+Branch    1.5 : -116.250021   3.4038e-01   2.1222e-01
+Branch    5.0 : -117.516001   2.7152e-01  -6.3550e-02
+Branch   10.0 : -118.269287   6.7673e-02  -2.0346e-02
+Branch   50.0 : -118.450766  -1.1179e-03   1.9649e-05
+Branch   90.0 : -118.419518  -5.0230e-04   1.1375e-05
 Test -116.825451 = -116.825451
-Branch(Tip)    0.1 : -116.267325   1.0775e+00  -2.6805e+00
-Branch(Tip)    0.2 : -116.413214   1.2548e-01  -2.7542e+00
-Branch(Tip)    0.5 : -116.243045  -2.5084e-01   2.6485e-01
-Branch(Tip)    0.9 : -116.118486  -2.1201e-02   1.5473e-01
-Branch(Tip)    1.5 : -116.203451   1.0713e-01   4.1625e-02
-Branch(Tip)    5.0 : -117.335333   1.0082e-01  -8.8925e-03
-Branch(Tip)   10.0 : -118.061152   2.8068e-02  -3.0721e-03
-Branch(Tip)   50.0 : -118.223795  -9.4638e-04   6.2837e-06
-Branch(Tip)   90.0 : -118.155549  -4.6706e-04   3.4748e-06
+Branch(Tip)    0.1 : -116.267325   2.6937e+00  -1.6753e+01
+Branch(Tip)    0.2 : -116.413214   3.1371e-01  -1.7214e+01
+Branch(Tip)    0.5 : -116.243045  -6.2711e-01   1.6553e+00
+Branch(Tip)    0.9 : -116.118486  -5.3002e-02   9.6706e-01
+Branch(Tip)    1.5 : -116.203451   2.6782e-01   2.6015e-01
+Branch(Tip)    5.0 : -117.335333   2.5205e-01  -5.5578e-02
+Branch(Tip)   10.0 : -118.061152   7.0169e-02  -1.9201e-02
+Branch(Tip)   50.0 : -118.223795  -2.3660e-03   3.9273e-05
+Branch(Tip)   90.0 : -118.155549  -1.1676e-03   2.1718e-05
 Test -116.413214 = -116.413214
 
 
  TEST alpha(ncats) =   0.10( 4) ; pinv = 0.90
 
 0.000001 0.001078 0.093753 3.905168 
-Branch    0.1 : -132.412181  -1.4365e-01   3.5099e-01
-Branch    0.2 : -132.390100   6.2086e-02   1.1602e-01
-Branch    0.5 : -132.827982   1.8032e-01   4.6393e-03
-Branch    0.9 : -133.520882   1.5660e-01  -1.0852e-02
-Branch    1.5 : -134.260592   9.1781e-02  -9.3968e-03
-Branch    5.0 : -135.036135  -4.6483e-05  -2.2116e-04
-Branch   10.0 : -134.954944  -1.8034e-03   8.7475e-06
-Branch   50.0 : -134.657532  -2.2810e-04   1.1611e-06
-Branch   90.0 : -134.621972  -1.0218e-05   1.9989e-07
+Branch    0.1 : -132.412181  -1.4365e+00   3.5099e+01
+Branch    0.2 : -132.390100   6.2086e-01   1.1602e+01
+Branch    0.5 : -132.827982   1.8032e+00   4.6393e-01
+Branch    0.9 : -133.520882   1.5660e+00  -1.0852e+00
+Branch    1.5 : -134.260592   9.1781e-01  -9.3968e-01
+Branch    5.0 : -135.036135  -4.6483e-04  -2.2116e-02
+Branch   10.0 : -134.954944  -1.8034e-02   8.7475e-04
+Branch   50.0 : -134.657532  -2.2810e-03   1.1611e-04
+Branch   90.0 : -134.621972  -1.0218e-04   1.9989e-05
 Test -132.412181 = -132.412181
-Branch(Tip)    0.1 : -132.063958  -4.3410e-01   8.4386e-01
-Branch(Tip)    0.2 : -131.895555   1.1882e-03   2.1866e-01
-Branch(Tip)    0.5 : -132.363694   2.2237e-01   1.3304e-02
-Branch(Tip)    0.9 : -133.251988   2.0582e-01  -1.2569e-02
-Branch(Tip)    1.5 : -134.241988   1.2517e-01  -1.2127e-02
-Branch(Tip)    5.0 : -135.340969  -2.7712e-04  -3.5153e-04
-Branch(Tip)   10.0 : -135.202849  -2.9713e-03   1.7521e-05
-Branch(Tip)   50.0 : -134.754795  -2.9406e-04   1.7599e-06
-Branch(Tip)   90.0 : -134.721602   3.6825e-05   3.0592e-07
+Branch(Tip)    0.1 : -132.063958  -4.3410e+00   8.4386e+01
+Branch(Tip)    0.2 : -131.895555   1.1882e-02   2.1866e+01
+Branch(Tip)    0.5 : -132.363694   2.2237e+00   1.3304e+00
+Branch(Tip)    0.9 : -133.251988   2.0582e+00  -1.2569e+00
+Branch(Tip)    1.5 : -134.241988   1.2517e+00  -1.2127e+00
+Branch(Tip)    5.0 : -135.340969  -2.7712e-03  -3.5153e-02
+Branch(Tip)   10.0 : -135.202849  -2.9713e-02   1.7521e-03
+Branch(Tip)   50.0 : -134.754795  -2.9406e-03   1.7599e-04
+Branch(Tip)   90.0 : -134.721602   3.6825e-04   3.0592e-05
 Test -131.895555 = -131.895555
 
 
@@ -731,75 +731,75 @@ Test -94.544268 = -94.544268
  TEST alpha(ncats) =   0.75( 4) ; pinv = 0.30
 
 0.084885 0.386197 0.942076 2.586843 
-Branch    0.1 : -98.893618  -5.7224e-02   1.9358e+01
-Branch    0.2 : -99.009847   1.3486e+00   4.3955e+00
-Branch    0.5 : -99.717622   1.6530e+00  -6.1015e-01
-Branch    0.9 : -100.544656   1.2402e+00  -6.7673e-01
-Branch    1.5 : -101.398581   7.9464e-01  -3.8390e-01
-Branch    5.0 : -103.176646   1.6255e-01  -3.2415e-02
-Branch   10.0 : -103.872246   5.8613e-02  -6.8868e-03
-Branch   50.0 : -104.410096   2.1784e-04  -1.8622e-05
-Branch   90.0 : -104.412684   2.0904e-06  -1.6518e-07
+Branch    0.1 : -98.893618  -8.1748e-02   3.9505e+01
+Branch    0.2 : -99.009847   1.9266e+00   8.9704e+00
+Branch    0.5 : -99.717622   2.3614e+00  -1.2452e+00
+Branch    0.9 : -100.544656   1.7717e+00  -1.3811e+00
+Branch    1.5 : -101.398581   1.1352e+00  -7.8347e-01
+Branch    5.0 : -103.176646   2.3221e-01  -6.6154e-02
+Branch   10.0 : -103.872246   8.3733e-02  -1.4055e-02
+Branch   50.0 : -104.410096   3.1120e-04  -3.8004e-05
+Branch   90.0 : -104.412684   2.9863e-06  -3.3710e-07
 Test -98.893618 = -98.893618
-Branch(Tip)    0.1 : -97.788450  -1.4262e+00   6.2216e+01
-Branch(Tip)    0.2 : -97.956667   2.6530e+00   1.0901e+01
-Branch(Tip)    0.5 : -99.340389   3.0605e+00  -2.0206e+00
-Branch(Tip)    0.9 : -100.770374   2.0077e+00  -1.4655e+00
-Branch(Tip)    1.5 : -102.070051   1.1352e+00  -6.8407e-01
-Branch(Tip)    5.0 : -104.280534   1.7358e-01  -3.9037e-02
-Branch(Tip)   10.0 : -104.996915   5.9796e-02  -6.7549e-03
-Branch(Tip)   50.0 : -105.587833   3.1479e-04  -2.5824e-05
-Branch(Tip)   90.0 : -105.591708   3.4779e-06  -2.6870e-07
+Branch(Tip)    0.1 : -97.788450  -2.0374e+00   1.2697e+02
+Branch(Tip)    0.2 : -97.956667   3.7901e+00   2.2246e+01
+Branch(Tip)    0.5 : -99.340389   4.3721e+00  -4.1237e+00
+Branch(Tip)    0.9 : -100.770374   2.8682e+00  -2.9908e+00
+Branch(Tip)    1.5 : -102.070051   1.6217e+00  -1.3961e+00
+Branch(Tip)    5.0 : -104.280534   2.4797e-01  -7.9667e-02
+Branch(Tip)   10.0 : -104.996915   8.5422e-02  -1.3786e-02
+Branch(Tip)   50.0 : -105.587833   4.4970e-04  -5.2703e-05
+Branch(Tip)   90.0 : -105.591708   4.9684e-06  -5.4838e-07
 Test -97.956667 = -97.956667
 
 
  TEST alpha(ncats) =   0.75( 4) ; pinv = 0.60
 
 0.084885 0.386197 0.942076 2.586843 
-Branch    0.1 : -105.843834   2.2799e-01   4.6514e+00
-Branch    0.2 : -105.991287   8.0535e-01   9.4569e-01
-Branch    0.5 : -106.652840   8.3339e-01  -2.6167e-01
-Branch    0.9 : -107.354409   5.7942e-01  -2.1585e-01
-Branch    1.5 : -108.027454   3.4490e-01  -1.0816e-01
-Branch    5.0 : -109.359578   7.3289e-02  -8.2982e-03
-Branch   10.0 : -109.865747   1.9835e-02  -2.0113e-03
-Branch   50.0 : -110.069856   3.6281e-06  -2.8606e-07
-Branch   90.0 : -110.069902   1.5397e-09  -1.1846e-10
+Branch    0.1 : -105.843834   5.6997e-01   2.9071e+01
+Branch    0.2 : -105.991287   2.0134e+00   5.9106e+00
+Branch    0.5 : -106.652840   2.0835e+00  -1.6355e+00
+Branch    0.9 : -107.354409   1.4485e+00  -1.3491e+00
+Branch    1.5 : -108.027454   8.6226e-01  -6.7602e-01
+Branch    5.0 : -109.359578   1.8322e-01  -5.1864e-02
+Branch   10.0 : -109.865747   4.9588e-02  -1.2570e-02
+Branch   50.0 : -110.069856   9.0704e-06  -1.7879e-06
+Branch   90.0 : -110.069902   3.8493e-09  -7.4037e-10
 Test -105.843834 = -105.843834
-Branch(Tip)    0.1 : -104.453153   5.3480e-01   1.4849e+01
-Branch(Tip)    0.2 : -104.832903   1.9892e+00   1.3625e+00
-Branch(Tip)    0.5 : -106.254487   1.6028e+00  -8.6614e-01
-Branch(Tip)    0.9 : -107.490249   9.3493e-01  -4.8098e-01
-Branch(Tip)    1.5 : -108.489672   4.6882e-01  -1.9089e-01
-Branch(Tip)    5.0 : -109.999958   7.1867e-02  -8.2468e-03
-Branch(Tip)   10.0 : -110.510600   2.1456e-02  -1.9551e-03
-Branch(Tip)   50.0 : -110.752430   5.9171e-06  -4.5668e-07
-Branch(Tip)   90.0 : -110.752507   2.7704e-09  -2.1173e-10
+Branch(Tip)    0.1 : -104.453153   1.3370e+00   9.2805e+01
+Branch(Tip)    0.2 : -104.832903   4.9730e+00   8.5157e+00
+Branch(Tip)    0.5 : -106.254487   4.0071e+00  -5.4134e+00
+Branch(Tip)    0.9 : -107.490249   2.3373e+00  -3.0061e+00
+Branch(Tip)    1.5 : -108.489672   1.1720e+00  -1.1931e+00
+Branch(Tip)    5.0 : -109.999958   1.7967e-01  -5.1543e-02
+Branch(Tip)   10.0 : -110.510600   5.3640e-02  -1.2220e-02
+Branch(Tip)   50.0 : -110.752430   1.4793e-05  -2.8543e-06
+Branch(Tip)   90.0 : -110.752507   6.9260e-09  -1.3233e-09
 Test -104.832903 = -104.832903
 
 
  TEST alpha(ncats) =   0.75( 4) ; pinv = 0.90
 
 0.084885 0.386197 0.942076 2.586843 
-Branch    0.1 : -127.157390   1.5890e-01   1.0867e-01
-Branch    0.2 : -127.349980   2.1200e-01   1.9257e-02
-Branch    0.5 : -127.986883   1.9969e-01  -1.1867e-02
-Branch    0.9 : -128.687941   1.5125e-01  -1.1501e-02
-Branch    1.5 : -129.408015   9.2191e-02  -8.1160e-03
-Branch    5.0 : -130.358613   3.5314e-03  -3.1359e-04
-Branch   10.0 : -130.399188   5.6049e-05  -4.4512e-06
-Branch   50.0 : -130.399900   1.4994e-15  -1.9860e-19
-Branch   90.0 : -130.399900   1.4968e-15  -1.7534e-31
+Branch    0.1 : -127.157390   1.5890e+00   1.0867e+01
+Branch    0.2 : -127.349980   2.1200e+00   1.9257e+00
+Branch    0.5 : -127.986883   1.9969e+00  -1.1867e+00
+Branch    0.9 : -128.687941   1.5125e+00  -1.1501e+00
+Branch    1.5 : -129.408015   9.2191e-01  -8.1160e-01
+Branch    5.0 : -130.358613   3.5314e-02  -3.1359e-02
+Branch   10.0 : -130.399188   5.6049e-04  -4.4512e-04
+Branch   50.0 : -130.399900   1.4994e-14  -1.9860e-17
+Branch   90.0 : -130.399900   1.4968e-14  -1.7534e-29
 Test -127.157390 = -127.157390
-Branch(Tip)    0.1 : -125.678952   5.0339e-01   2.6169e-01
-Branch(Tip)    0.2 : -126.213182   5.1377e-01  -8.8542e-02
-Branch(Tip)    0.5 : -127.369584   2.8519e-01  -4.7336e-02
-Branch(Tip)    0.9 : -128.245535   1.7175e-01  -1.7448e-02
-Branch(Tip)    1.5 : -129.033413   9.9153e-02  -8.6984e-03
-Branch(Tip)    5.0 : -130.108188   4.6675e-03  -3.9354e-04
-Branch(Tip)   10.0 : -130.163972   8.4249e-05  -6.5631e-06
-Branch(Tip)   50.0 : -130.165060   1.5999e-15  -3.3516e-19
-Branch(Tip)   90.0 : -130.165060   1.5956e-15  -1.8548e-31
+Branch(Tip)    0.1 : -125.678952   5.0339e+00   2.6169e+01
+Branch(Tip)    0.2 : -126.213182   5.1377e+00  -8.8542e+00
+Branch(Tip)    0.5 : -127.369584   2.8519e+00  -4.7336e+00
+Branch(Tip)    0.9 : -128.245535   1.7175e+00  -1.7448e+00
+Branch(Tip)    1.5 : -129.033413   9.9153e-01  -8.6984e-01
+Branch(Tip)    5.0 : -130.108188   4.6675e-02  -3.9354e-02
+Branch(Tip)   10.0 : -130.163972   8.4249e-04  -6.5631e-04
+Branch(Tip)   50.0 : -130.165060   1.5999e-14  -3.3516e-17
+Branch(Tip)   90.0 : -130.165060   1.5956e-14  -1.8548e-29
 Test -126.213182 = -126.213182
 
 
@@ -831,75 +831,75 @@ Test -93.805671 = -93.805671
  TEST alpha(ncats) =   1.50( 4) ; pinv = 0.30
 
 0.225323 0.588556 1.050422 2.135699 
-Branch    0.1 : -97.702985   4.8395e-01   1.9824e+01
-Branch    0.2 : -97.899517   1.9216e+00   4.4320e+00
-Branch    0.5 : -98.839836   2.1431e+00  -9.0591e-01
-Branch    0.9 : -99.899205   1.5684e+00  -9.2500e-01
-Branch    1.5 : -100.958896   9.6320e-01  -5.1666e-01
-Branch    5.0 : -102.877842   1.3110e-01  -4.2419e-02
-Branch   10.0 : -103.260758   1.6551e-02  -4.3897e-03
-Branch   50.0 : -103.327405   7.1004e-08  -1.4534e-08
-Branch   90.0 : -103.327405   6.3761e-13  -1.2885e-13
+Branch    0.1 : -97.702985   6.9136e-01   4.0457e+01
+Branch    0.2 : -97.899517   2.7451e+00   9.0449e+00
+Branch    0.5 : -98.839836   3.0616e+00  -1.8488e+00
+Branch    0.9 : -99.899205   2.2405e+00  -1.8877e+00
+Branch    1.5 : -100.958896   1.3760e+00  -1.0544e+00
+Branch    5.0 : -102.877842   1.8728e-01  -8.6570e-02
+Branch   10.0 : -103.260758   2.3644e-02  -8.9586e-03
+Branch   50.0 : -103.327405   1.0143e-07  -2.9662e-08
+Branch   90.0 : -103.327405   9.1087e-13  -2.6296e-13
 Test -97.702985 = -97.702985
-Branch(Tip)    0.1 : -96.626054  -2.0449e+00   6.8100e+01
-Branch(Tip)    0.2 : -96.753650   2.6408e+00   1.4032e+01
-Branch(Tip)    0.5 : -98.305661   3.6611e+00  -1.7112e+00
-Branch(Tip)    0.9 : -100.069558   2.5184e+00  -1.8115e+00
-Branch(Tip)    1.5 : -101.689643   1.3930e+00  -9.0041e-01
-Branch(Tip)    5.0 : -104.168707   1.5409e-01  -4.9882e-02
-Branch(Tip)   10.0 : -104.627822   2.1087e-02  -5.2972e-03
-Branch(Tip)   50.0 : -104.717099   1.2014e-07  -2.4413e-08
-Branch(Tip)   90.0 : -104.717100   1.1194e-12  -2.2628e-13
+Branch(Tip)    0.1 : -96.626054  -2.9213e+00   1.3898e+02
+Branch(Tip)    0.2 : -96.753650   3.7725e+00   2.8637e+01
+Branch(Tip)    0.5 : -98.305661   5.2301e+00  -3.4922e+00
+Branch(Tip)    0.9 : -100.069558   3.5977e+00  -3.6969e+00
+Branch(Tip)    1.5 : -101.689643   1.9899e+00  -1.8376e+00
+Branch(Tip)    5.0 : -104.168707   2.2012e-01  -1.0180e-01
+Branch(Tip)   10.0 : -104.627822   3.0124e-02  -1.0811e-02
+Branch(Tip)   50.0 : -104.717099   1.7163e-07  -4.9823e-08
+Branch(Tip)   90.0 : -104.717100   1.5992e-12  -4.6179e-13
 Test -96.753650 = -96.753650
 
 
  TEST alpha(ncats) =   1.50( 4) ; pinv = 0.60
 
 0.225323 0.588556 1.050422 2.135699 
-Branch    0.1 : -104.817882   8.2835e-01   4.0039e+00
-Branch    0.2 : -105.099937   1.2936e+00   6.0512e-01
-Branch    0.5 : -106.052113   1.1387e+00  -4.4194e-01
-Branch    0.9 : -106.986867   7.5521e-01  -3.0668e-01
-Branch    1.5 : -107.845243   4.2782e-01  -1.5115e-01
-Branch    5.0 : -109.114197   3.2297e-02  -8.5681e-03
-Branch   10.0 : -109.236642   1.5828e-03  -3.5469e-04
-Branch   50.0 : -109.243891   1.7695e-12  -3.5840e-13
-Branch   90.0 : -109.243891   1.7446e-15  -5.7427e-22
+Branch    0.1 : -104.817882   2.0709e+00   2.5024e+01
+Branch    0.2 : -105.099937   3.2341e+00   3.7820e+00
+Branch    0.5 : -106.052113   2.8469e+00  -2.7621e+00
+Branch    0.9 : -106.986867   1.8880e+00  -1.9168e+00
+Branch    1.5 : -107.845243   1.0695e+00  -9.4468e-01
+Branch    5.0 : -109.114197   8.0743e-02  -5.3551e-02
+Branch   10.0 : -109.236642   3.9571e-03  -2.2168e-03
+Branch   50.0 : -109.243891   4.4238e-12  -2.2400e-12
+Branch   90.0 : -109.243891   4.3614e-15  -3.5892e-21
 Test -104.817882 = -104.817882
-Branch(Tip)    0.1 : -103.179276   7.4991e-01   1.6901e+01
-Branch(Tip)    0.2 : -103.657607   2.5013e+00   1.9164e+00
-Branch(Tip)    0.5 : -105.477785   2.0628e+00  -1.1435e+00
-Branch(Tip)    0.9 : -107.051034   1.1722e+00  -6.3619e-01
-Branch(Tip)    1.5 : -108.283190   5.6686e-01  -2.4346e-01
-Branch(Tip)    5.0 : -109.839851   4.0115e-02  -1.0070e-02
-Branch(Tip)   10.0 : -109.999056   2.2565e-03  -4.8888e-04
-Branch(Tip)   50.0 : -110.009686   3.0383e-12  -6.1494e-13
-Branch(Tip)   90.0 : -110.009686   1.8391e-15  -9.9242e-22
+Branch(Tip)    0.1 : -103.179276   1.8748e+00   1.0563e+02
+Branch(Tip)    0.2 : -103.657607   6.2534e+00   1.1978e+01
+Branch(Tip)    0.5 : -105.477785   5.1570e+00  -7.1466e+00
+Branch(Tip)    0.9 : -107.051034   2.9306e+00  -3.9762e+00
+Branch(Tip)    1.5 : -108.283190   1.4172e+00  -1.5216e+00
+Branch(Tip)    5.0 : -109.839851   1.0029e-01  -6.2940e-02
+Branch(Tip)   10.0 : -109.999056   5.6412e-03  -3.0555e-03
+Branch(Tip)   50.0 : -110.009686   7.5957e-12  -3.8434e-12
+Branch(Tip)   90.0 : -110.009686   4.5977e-15  -6.2026e-21
 Test -103.657607 = -103.657607
 
 
  TEST alpha(ncats) =   1.50( 4) ; pinv = 0.90
 
 0.225323 0.588556 1.050422 2.135699 
-Branch    0.1 : -129.851473   5.4798e-01  -7.9916e-02
-Branch    0.2 : -130.355877   4.5908e-01  -9.1416e-02
-Branch    0.5 : -131.365623   2.3255e-01  -5.6495e-02
-Branch    0.9 : -131.956254   8.6060e-02  -2.1443e-02
-Branch    1.5 : -132.226449   2.0106e-02  -4.7164e-03
-Branch    5.0 : -132.315373   1.1315e-05  -2.3301e-06
-Branch   10.0 : -132.315428   4.1995e-10  -8.5254e-11
-Branch   50.0 : -132.315428   1.5537e-15  -1.0169e-31
-Branch   90.0 : -132.315428   1.5537e-15  -1.0169e-31
+Branch    0.1 : -129.851473   5.4798e+00  -7.9916e+00
+Branch    0.2 : -130.355877   4.5908e+00  -9.1416e+00
+Branch    0.5 : -131.365623   2.3255e+00  -5.6495e+00
+Branch    0.9 : -131.956254   8.6060e-01  -2.1443e+00
+Branch    1.5 : -132.226449   2.0106e-01  -4.7164e-01
+Branch    5.0 : -132.315373   1.1315e-04  -2.3301e-04
+Branch   10.0 : -132.315428   4.1995e-09  -8.5254e-09
+Branch   50.0 : -132.315428   1.5537e-14  -1.0169e-29
+Branch   90.0 : -132.315428   1.5537e-14  -1.0169e-29
 Test -129.851473 = -129.851473
-Branch(Tip)    0.1 : -127.540702   1.1643e+00  -1.6207e-01
-Branch(Tip)    0.2 : -128.584360   9.1065e-01  -2.6171e-01
-Branch(Tip)    0.5 : -130.419200   3.9248e-01  -1.0472e-01
-Branch(Tip)    0.9 : -131.395427   1.4080e-01  -3.4962e-02
-Branch(Tip)    1.5 : -131.840125   3.3506e-02  -7.7436e-03
-Branch(Tip)    5.0 : -131.990369   2.0515e-05  -4.1904e-06
-Branch(Tip)   10.0 : -131.990470   7.9465e-10  -1.6106e-10
-Branch(Tip)   50.0 : -131.990470   1.5869e-15  -9.8854e-32
-Branch(Tip)   90.0 : -131.990470   1.5869e-15  -9.8854e-32
+Branch(Tip)    0.1 : -127.540702   1.1643e+01  -1.6207e+01
+Branch(Tip)    0.2 : -128.584360   9.1065e+00  -2.6171e+01
+Branch(Tip)    0.5 : -130.419200   3.9248e+00  -1.0472e+01
+Branch(Tip)    0.9 : -131.395427   1.4080e+00  -3.4962e+00
+Branch(Tip)    1.5 : -131.840125   3.3506e-01  -7.7436e-01
+Branch(Tip)    5.0 : -131.990369   2.0515e-04  -4.1904e-04
+Branch(Tip)   10.0 : -131.990470   7.9465e-09  -1.6106e-08
+Branch(Tip)   50.0 : -131.990470   1.5869e-14  -9.8854e-30
+Branch(Tip)   90.0 : -131.990470   1.5869e-14  -9.8854e-30
 Test -128.584360 = -128.584360
 
 ti/tv:alpha(ncats) =   0.10( 1)   logL:       -134.810864
diff --git a/test/out/derivatives.out b/test/out/derivatives.out
index 3a9cd58..56d5d93 100644
--- a/test/out/derivatives.out
+++ b/test/out/derivatives.out
@@ -29,75 +29,75 @@ Test -90.363715 = -90.363715
  TEST alpha(ncats) =   0.10( 1) ; pinv = 0.30
 
 1.000000 
-Branch    0.1 : -91.991139  -2.2228e+00   3.5420e+01
-Branch    0.2 : -91.904873   4.3786e-01   9.3766e+00
-Branch    0.5 : -92.470985   1.6173e+00  -5.0374e-02
-Branch    0.9 : -93.298269   1.2028e+00  -9.4509e-01
-Branch    1.5 : -94.021985   5.4709e-01  -5.4388e-01
-Branch    5.0 : -94.557860   3.6212e-03  -3.5496e-03
-Branch   10.0 : -94.561564   3.4690e-06  -3.3685e-06
-Branch   50.0 : -94.561568  -5.1141e-15  -2.8141e-30
-Branch   90.0 : -94.561568  -5.1141e-15  -1.0236e-31
+Branch    0.1 : -91.991139  -3.1754e+00   7.2285e+01
+Branch    0.2 : -91.904873   6.2551e-01   1.9136e+01
+Branch    0.5 : -92.470985   2.3105e+00  -1.0281e-01
+Branch    0.9 : -93.298269   1.7182e+00  -1.9287e+00
+Branch    1.5 : -94.021985   7.8156e-01  -1.1099e+00
+Branch    5.0 : -94.557860   5.1732e-03  -7.2440e-03
+Branch   10.0 : -94.561564   4.9557e-06  -6.8744e-06
+Branch   50.0 : -94.561568  -7.3058e-15  -5.7432e-30
+Branch   90.0 : -94.561568  -7.3058e-15  -2.0891e-31
 Test -91.991139 = -91.991139
-Branch(Tip)    0.1 : -91.023442  -1.1275e+00   5.6630e+01
-Branch(Tip)    0.2 : -91.236562   3.1827e+00   1.5090e+01
-Branch(Tip)    0.5 : -93.163026   4.7942e+00  -1.1137e+00
-Branch(Tip)    0.9 : -95.560471   3.4605e+00  -2.7172e+00
-Branch(Tip)    1.5 : -97.637397   1.5532e+00  -1.6077e+00
-Branch(Tip)    5.0 : -99.077667   8.2069e-03  -8.1580e-03
-Branch(Tip)   10.0 : -99.085987   7.6761e-06  -7.4554e-06
-Branch(Tip)   50.0 : -99.085995  -5.1427e-15  -6.1068e-30
-Branch(Tip)   90.0 : -99.085995  -5.1427e-15  -1.0853e-31
+Branch(Tip)    0.1 : -91.023442  -1.6107e+00   1.1557e+02
+Branch(Tip)    0.2 : -91.236562   4.5468e+00   3.0796e+01
+Branch(Tip)    0.5 : -93.163026   6.8489e+00  -2.2728e+00
+Branch(Tip)    0.9 : -95.560471   4.9436e+00  -5.5454e+00
+Branch(Tip)    1.5 : -97.637397   2.2189e+00  -3.2810e+00
+Branch(Tip)    5.0 : -99.077667   1.1724e-02  -1.6649e-02
+Branch(Tip)   10.0 : -99.085987   1.0966e-05  -1.5215e-05
+Branch(Tip)   50.0 : -99.085995  -7.3467e-15  -1.2463e-29
+Branch(Tip)   90.0 : -99.085995  -7.3467e-15  -2.2150e-31
 Test -91.236562 = -91.236562
 
 
  TEST alpha(ncats) =   0.10( 1) ; pinv = 0.60
 
 1.000000 
-Branch    0.1 : -97.395496   1.6748e-01   6.6521e+00
-Branch    0.2 : -97.566231   9.8602e-01   1.2753e+00
-Branch    0.5 : -98.337703   8.7125e-01  -6.1652e-01
-Branch    0.9 : -98.930700   3.6373e-01  -3.5075e-01
-Branch    1.5 : -99.215328   8.1721e-02  -8.2083e-02
-Branch    5.0 : -99.297308   1.5414e-05  -1.4971e-05
-Branch   10.0 : -99.297324   8.2613e-11  -8.0212e-11
-Branch   50.0 : -99.297324  -4.7521e-15  -2.7673e-32
-Branch   90.0 : -99.297324  -4.7521e-15  -2.7673e-32
+Branch    0.1 : -97.395496   4.1869e-01   4.1576e+01
+Branch    0.2 : -97.566231   2.4650e+00   7.9705e+00
+Branch    0.5 : -98.337703   2.1781e+00  -3.8532e+00
+Branch    0.9 : -98.930700   9.0932e-01  -2.1922e+00
+Branch    1.5 : -99.215328   2.0430e-01  -5.1302e-01
+Branch    5.0 : -99.297308   3.8535e-05  -9.3567e-05
+Branch   10.0 : -99.297324   2.0653e-10  -5.0132e-10
+Branch   50.0 : -99.297324  -1.1880e-14  -1.7296e-31
+Branch   90.0 : -99.297324  -1.1880e-14  -1.7296e-31
 Test -97.395496 = -97.395496
-Branch(Tip)    0.1 : -95.225032   2.9053e+00   1.1707e+01
-Branch(Tip)    0.2 : -96.169157   4.2420e+00   1.4835e+00
-Branch(Tip)    0.5 : -99.100065   3.1590e+00  -2.3830e+00
-Branch(Tip)    0.9 : -101.205774   1.2473e+00  -1.2971e+00
-Branch(Tip)    1.5 : -102.137369   2.4757e-01  -2.6717e-01
-Branch(Tip)    5.0 : -102.372957   3.9923e-05  -3.8801e-05
-Branch(Tip)   10.0 : -102.372998   2.1374e-10  -2.0752e-10
-Branch(Tip)   50.0 : -102.372998  -4.7584e-15  -2.9600e-32
-Branch(Tip)   90.0 : -102.372998  -4.7584e-15  -2.9600e-32
+Branch(Tip)    0.1 : -95.225032   7.2632e+00   7.3170e+01
+Branch(Tip)    0.2 : -96.169157   1.0605e+01   9.2719e+00
+Branch(Tip)    0.5 : -99.100065   7.8974e+00  -1.4893e+01
+Branch(Tip)    0.9 : -101.205774   3.1182e+00  -8.1068e+00
+Branch(Tip)    1.5 : -102.137369   6.1893e-01  -1.6698e+00
+Branch(Tip)    5.0 : -102.372957   9.9808e-05  -2.4251e-04
+Branch(Tip)   10.0 : -102.372998   5.3436e-10  -1.2970e-09
+Branch(Tip)   50.0 : -102.372998  -1.1896e-14  -1.8500e-31
+Branch(Tip)   90.0 : -102.372998  -1.1896e-14  -1.8500e-31
 Test -96.169157 = -96.169157
 
 
  TEST alpha(ncats) =   0.10( 1) ; pinv = 0.90
 
 1.000000 
-Branch    0.1 : -121.077217   8.8195e-02  -8.6903e-02
-Branch    0.2 : -121.133222   3.2761e-02  -3.2488e-02
-Branch    0.5 : -121.164660   1.7097e-03  -1.6709e-03
-Branch    0.9 : -121.166378   3.4811e-05  -3.3822e-05
-Branch    1.5 : -121.166414   1.0264e-07  -9.9656e-08
-Branch    5.0 : -121.166414  -4.6680e-15  -1.7414e-22
-Branch   10.0 : -121.166414  -4.6680e-15  -1.6772e-33
-Branch   50.0 : -121.166414  -4.6680e-15  -1.6772e-33
-Branch   90.0 : -121.166414  -4.6680e-15  -1.6772e-33
+Branch    0.1 : -121.077217   8.8195e-01  -8.6903e+00
+Branch    0.2 : -121.133222   3.2761e-01  -3.2488e+00
+Branch    0.5 : -121.164660   1.7097e-02  -1.6709e-01
+Branch    0.9 : -121.166378   3.4811e-04  -3.3822e-03
+Branch    1.5 : -121.166414   1.0264e-06  -9.9656e-06
+Branch    5.0 : -121.166414  -4.6680e-14  -1.7414e-20
+Branch   10.0 : -121.166414  -4.6680e-14  -1.6772e-31
+Branch   50.0 : -121.166414  -4.6680e-14  -1.6772e-31
+Branch   90.0 : -121.166414  -4.6680e-14  -1.6772e-31
 Test -121.077217 = -121.077217
-Branch(Tip)    0.1 : -119.215967   2.0918e+00  -1.9042e+00
-Branch(Tip)    0.2 : -120.551659   7.6462e-01  -8.1447e-01
-Branch(Tip)    0.5 : -121.236738   3.2182e-02  -3.2758e-02
-Branch(Tip)    0.9 : -121.268238   6.1290e-04  -5.9820e-04
-Branch(Tip)    1.5 : -121.268865   1.7939e-06  -1.7419e-06
-Branch(Tip)    5.0 : -121.268867  -4.6680e-15  -3.0427e-21
-Branch(Tip)   10.0 : -121.268867  -4.6680e-15  -1.6835e-33
-Branch(Tip)   50.0 : -121.268867  -4.6680e-15  -1.6835e-33
-Branch(Tip)   90.0 : -121.268867  -4.6680e-15  -1.6835e-33
+Branch(Tip)    0.1 : -119.215967   2.0918e+01  -1.9042e+02
+Branch(Tip)    0.2 : -120.551659   7.6462e+00  -8.1447e+01
+Branch(Tip)    0.5 : -121.236738   3.2182e-01  -3.2758e+00
+Branch(Tip)    0.9 : -121.268238   6.1290e-03  -5.9820e-02
+Branch(Tip)    1.5 : -121.268865   1.7939e-05  -1.7419e-04
+Branch(Tip)    5.0 : -121.268867  -4.6680e-14  -3.0427e-19
+Branch(Tip)   10.0 : -121.268867  -4.6680e-14  -1.6835e-31
+Branch(Tip)   50.0 : -121.268867  -4.6680e-14  -1.6835e-31
+Branch(Tip)   90.0 : -121.268867  -4.6680e-14  -1.6835e-31
 Test -120.551659 = -120.551659
 
 
@@ -129,75 +129,75 @@ Test -90.363715 = -90.363715
  TEST alpha(ncats) =   0.75( 1) ; pinv = 0.30
 
 1.000000 
-Branch    0.1 : -91.991139  -2.2228e+00   3.5420e+01
-Branch    0.2 : -91.904873   4.3786e-01   9.3766e+00
-Branch    0.5 : -92.470985   1.6173e+00  -5.0374e-02
-Branch    0.9 : -93.298269   1.2028e+00  -9.4509e-01
-Branch    1.5 : -94.021985   5.4709e-01  -5.4388e-01
-Branch    5.0 : -94.557860   3.6212e-03  -3.5496e-03
-Branch   10.0 : -94.561564   3.4690e-06  -3.3685e-06
-Branch   50.0 : -94.561568  -5.1141e-15  -2.8141e-30
-Branch   90.0 : -94.561568  -5.1141e-15  -1.0236e-31
+Branch    0.1 : -91.991139  -3.1754e+00   7.2285e+01
+Branch    0.2 : -91.904873   6.2551e-01   1.9136e+01
+Branch    0.5 : -92.470985   2.3105e+00  -1.0281e-01
+Branch    0.9 : -93.298269   1.7182e+00  -1.9287e+00
+Branch    1.5 : -94.021985   7.8156e-01  -1.1099e+00
+Branch    5.0 : -94.557860   5.1732e-03  -7.2440e-03
+Branch   10.0 : -94.561564   4.9557e-06  -6.8744e-06
+Branch   50.0 : -94.561568  -7.3058e-15  -5.7432e-30
+Branch   90.0 : -94.561568  -7.3058e-15  -2.0891e-31
 Test -91.991139 = -91.991139
-Branch(Tip)    0.1 : -91.023442  -1.1275e+00   5.6630e+01
-Branch(Tip)    0.2 : -91.236562   3.1827e+00   1.5090e+01
-Branch(Tip)    0.5 : -93.163026   4.7942e+00  -1.1137e+00
-Branch(Tip)    0.9 : -95.560471   3.4605e+00  -2.7172e+00
-Branch(Tip)    1.5 : -97.637397   1.5532e+00  -1.6077e+00
-Branch(Tip)    5.0 : -99.077667   8.2069e-03  -8.1580e-03
-Branch(Tip)   10.0 : -99.085987   7.6761e-06  -7.4554e-06
-Branch(Tip)   50.0 : -99.085995  -5.1427e-15  -6.1068e-30
-Branch(Tip)   90.0 : -99.085995  -5.1427e-15  -1.0853e-31
+Branch(Tip)    0.1 : -91.023442  -1.6107e+00   1.1557e+02
+Branch(Tip)    0.2 : -91.236562   4.5468e+00   3.0796e+01
+Branch(Tip)    0.5 : -93.163026   6.8489e+00  -2.2728e+00
+Branch(Tip)    0.9 : -95.560471   4.9436e+00  -5.5454e+00
+Branch(Tip)    1.5 : -97.637397   2.2189e+00  -3.2810e+00
+Branch(Tip)    5.0 : -99.077667   1.1724e-02  -1.6649e-02
+Branch(Tip)   10.0 : -99.085987   1.0966e-05  -1.5215e-05
+Branch(Tip)   50.0 : -99.085995  -7.3467e-15  -1.2463e-29
+Branch(Tip)   90.0 : -99.085995  -7.3467e-15  -2.2150e-31
 Test -91.236562 = -91.236562
 
 
  TEST alpha(ncats) =   0.75( 1) ; pinv = 0.60
 
 1.000000 
-Branch    0.1 : -97.395496   1.6748e-01   6.6521e+00
-Branch    0.2 : -97.566231   9.8602e-01   1.2753e+00
-Branch    0.5 : -98.337703   8.7125e-01  -6.1652e-01
-Branch    0.9 : -98.930700   3.6373e-01  -3.5075e-01
-Branch    1.5 : -99.215328   8.1721e-02  -8.2083e-02
-Branch    5.0 : -99.297308   1.5414e-05  -1.4971e-05
-Branch   10.0 : -99.297324   8.2613e-11  -8.0212e-11
-Branch   50.0 : -99.297324  -4.7521e-15  -2.7673e-32
-Branch   90.0 : -99.297324  -4.7521e-15  -2.7673e-32
+Branch    0.1 : -97.395496   4.1869e-01   4.1576e+01
+Branch    0.2 : -97.566231   2.4650e+00   7.9705e+00
+Branch    0.5 : -98.337703   2.1781e+00  -3.8532e+00
+Branch    0.9 : -98.930700   9.0932e-01  -2.1922e+00
+Branch    1.5 : -99.215328   2.0430e-01  -5.1302e-01
+Branch    5.0 : -99.297308   3.8535e-05  -9.3567e-05
+Branch   10.0 : -99.297324   2.0653e-10  -5.0132e-10
+Branch   50.0 : -99.297324  -1.1880e-14  -1.7296e-31
+Branch   90.0 : -99.297324  -1.1880e-14  -1.7296e-31
 Test -97.395496 = -97.395496
-Branch(Tip)    0.1 : -95.225032   2.9053e+00   1.1707e+01
-Branch(Tip)    0.2 : -96.169157   4.2420e+00   1.4835e+00
-Branch(Tip)    0.5 : -99.100065   3.1590e+00  -2.3830e+00
-Branch(Tip)    0.9 : -101.205774   1.2473e+00  -1.2971e+00
-Branch(Tip)    1.5 : -102.137369   2.4757e-01  -2.6717e-01
-Branch(Tip)    5.0 : -102.372957   3.9923e-05  -3.8801e-05
-Branch(Tip)   10.0 : -102.372998   2.1374e-10  -2.0752e-10
-Branch(Tip)   50.0 : -102.372998  -4.7584e-15  -2.9600e-32
-Branch(Tip)   90.0 : -102.372998  -4.7584e-15  -2.9600e-32
+Branch(Tip)    0.1 : -95.225032   7.2632e+00   7.3170e+01
+Branch(Tip)    0.2 : -96.169157   1.0605e+01   9.2719e+00
+Branch(Tip)    0.5 : -99.100065   7.8974e+00  -1.4893e+01
+Branch(Tip)    0.9 : -101.205774   3.1182e+00  -8.1068e+00
+Branch(Tip)    1.5 : -102.137369   6.1893e-01  -1.6698e+00
+Branch(Tip)    5.0 : -102.372957   9.9808e-05  -2.4251e-04
+Branch(Tip)   10.0 : -102.372998   5.3436e-10  -1.2970e-09
+Branch(Tip)   50.0 : -102.372998  -1.1896e-14  -1.8500e-31
+Branch(Tip)   90.0 : -102.372998  -1.1896e-14  -1.8500e-31
 Test -96.169157 = -96.169157
 
 
  TEST alpha(ncats) =   0.75( 1) ; pinv = 0.90
 
 1.000000 
-Branch    0.1 : -121.077217   8.8195e-02  -8.6903e-02
-Branch    0.2 : -121.133222   3.2761e-02  -3.2488e-02
-Branch    0.5 : -121.164660   1.7097e-03  -1.6709e-03
-Branch    0.9 : -121.166378   3.4811e-05  -3.3822e-05
-Branch    1.5 : -121.166414   1.0264e-07  -9.9656e-08
-Branch    5.0 : -121.166414  -4.6680e-15  -1.7414e-22
-Branch   10.0 : -121.166414  -4.6680e-15  -1.6772e-33
-Branch   50.0 : -121.166414  -4.6680e-15  -1.6772e-33
-Branch   90.0 : -121.166414  -4.6680e-15  -1.6772e-33
+Branch    0.1 : -121.077217   8.8195e-01  -8.6903e+00
+Branch    0.2 : -121.133222   3.2761e-01  -3.2488e+00
+Branch    0.5 : -121.164660   1.7097e-02  -1.6709e-01
+Branch    0.9 : -121.166378   3.4811e-04  -3.3822e-03
+Branch    1.5 : -121.166414   1.0264e-06  -9.9656e-06
+Branch    5.0 : -121.166414  -4.6680e-14  -1.7414e-20
+Branch   10.0 : -121.166414  -4.6680e-14  -1.6772e-31
+Branch   50.0 : -121.166414  -4.6680e-14  -1.6772e-31
+Branch   90.0 : -121.166414  -4.6680e-14  -1.6772e-31
 Test -121.077217 = -121.077217
-Branch(Tip)    0.1 : -119.215967   2.0918e+00  -1.9042e+00
-Branch(Tip)    0.2 : -120.551659   7.6462e-01  -8.1447e-01
-Branch(Tip)    0.5 : -121.236738   3.2182e-02  -3.2758e-02
-Branch(Tip)    0.9 : -121.268238   6.1290e-04  -5.9820e-04
-Branch(Tip)    1.5 : -121.268865   1.7939e-06  -1.7419e-06
-Branch(Tip)    5.0 : -121.268867  -4.6680e-15  -3.0427e-21
-Branch(Tip)   10.0 : -121.268867  -4.6680e-15  -1.6835e-33
-Branch(Tip)   50.0 : -121.268867  -4.6680e-15  -1.6835e-33
-Branch(Tip)   90.0 : -121.268867  -4.6680e-15  -1.6835e-33
+Branch(Tip)    0.1 : -119.215967   2.0918e+01  -1.9042e+02
+Branch(Tip)    0.2 : -120.551659   7.6462e+00  -8.1447e+01
+Branch(Tip)    0.5 : -121.236738   3.2182e-01  -3.2758e+00
+Branch(Tip)    0.9 : -121.268238   6.1290e-03  -5.9820e-02
+Branch(Tip)    1.5 : -121.268865   1.7939e-05  -1.7419e-04
+Branch(Tip)    5.0 : -121.268867  -4.6680e-14  -3.0427e-19
+Branch(Tip)   10.0 : -121.268867  -4.6680e-14  -1.6835e-31
+Branch(Tip)   50.0 : -121.268867  -4.6680e-14  -1.6835e-31
+Branch(Tip)   90.0 : -121.268867  -4.6680e-14  -1.6835e-31
 Test -120.551659 = -120.551659
 
 
@@ -229,75 +229,75 @@ Test -90.363715 = -90.363715
  TEST alpha(ncats) =   1.50( 1) ; pinv = 0.30
 
 1.000000 
-Branch    0.1 : -91.991139  -2.2228e+00   3.5420e+01
-Branch    0.2 : -91.904873   4.3786e-01   9.3766e+00
-Branch    0.5 : -92.470985   1.6173e+00  -5.0374e-02
-Branch    0.9 : -93.298269   1.2028e+00  -9.4509e-01
-Branch    1.5 : -94.021985   5.4709e-01  -5.4388e-01
-Branch    5.0 : -94.557860   3.6212e-03  -3.5496e-03
-Branch   10.0 : -94.561564   3.4690e-06  -3.3685e-06
-Branch   50.0 : -94.561568  -5.1141e-15  -2.8141e-30
-Branch   90.0 : -94.561568  -5.1141e-15  -1.0236e-31
+Branch    0.1 : -91.991139  -3.1754e+00   7.2285e+01
+Branch    0.2 : -91.904873   6.2551e-01   1.9136e+01
+Branch    0.5 : -92.470985   2.3105e+00  -1.0281e-01
+Branch    0.9 : -93.298269   1.7182e+00  -1.9287e+00
+Branch    1.5 : -94.021985   7.8156e-01  -1.1099e+00
+Branch    5.0 : -94.557860   5.1732e-03  -7.2440e-03
+Branch   10.0 : -94.561564   4.9557e-06  -6.8744e-06
+Branch   50.0 : -94.561568  -7.3058e-15  -5.7432e-30
+Branch   90.0 : -94.561568  -7.3058e-15  -2.0891e-31
 Test -91.991139 = -91.991139
-Branch(Tip)    0.1 : -91.023442  -1.1275e+00   5.6630e+01
-Branch(Tip)    0.2 : -91.236562   3.1827e+00   1.5090e+01
-Branch(Tip)    0.5 : -93.163026   4.7942e+00  -1.1137e+00
-Branch(Tip)    0.9 : -95.560471   3.4605e+00  -2.7172e+00
-Branch(Tip)    1.5 : -97.637397   1.5532e+00  -1.6077e+00
-Branch(Tip)    5.0 : -99.077667   8.2069e-03  -8.1580e-03
-Branch(Tip)   10.0 : -99.085987   7.6761e-06  -7.4554e-06
-Branch(Tip)   50.0 : -99.085995  -5.1427e-15  -6.1068e-30
-Branch(Tip)   90.0 : -99.085995  -5.1427e-15  -1.0853e-31
+Branch(Tip)    0.1 : -91.023442  -1.6107e+00   1.1557e+02
+Branch(Tip)    0.2 : -91.236562   4.5468e+00   3.0796e+01
+Branch(Tip)    0.5 : -93.163026   6.8489e+00  -2.2728e+00
+Branch(Tip)    0.9 : -95.560471   4.9436e+00  -5.5454e+00
+Branch(Tip)    1.5 : -97.637397   2.2189e+00  -3.2810e+00
+Branch(Tip)    5.0 : -99.077667   1.1724e-02  -1.6649e-02
+Branch(Tip)   10.0 : -99.085987   1.0966e-05  -1.5215e-05
+Branch(Tip)   50.0 : -99.085995  -7.3467e-15  -1.2463e-29
+Branch(Tip)   90.0 : -99.085995  -7.3467e-15  -2.2150e-31
 Test -91.236562 = -91.236562
 
 
  TEST alpha(ncats) =   1.50( 1) ; pinv = 0.60
 
 1.000000 
-Branch    0.1 : -97.395496   1.6748e-01   6.6521e+00
-Branch    0.2 : -97.566231   9.8602e-01   1.2753e+00
-Branch    0.5 : -98.337703   8.7125e-01  -6.1652e-01
-Branch    0.9 : -98.930700   3.6373e-01  -3.5075e-01
-Branch    1.5 : -99.215328   8.1721e-02  -8.2083e-02
-Branch    5.0 : -99.297308   1.5414e-05  -1.4971e-05
-Branch   10.0 : -99.297324   8.2613e-11  -8.0212e-11
-Branch   50.0 : -99.297324  -4.7521e-15  -2.7673e-32
-Branch   90.0 : -99.297324  -4.7521e-15  -2.7673e-32
+Branch    0.1 : -97.395496   4.1869e-01   4.1576e+01
+Branch    0.2 : -97.566231   2.4650e+00   7.9705e+00
+Branch    0.5 : -98.337703   2.1781e+00  -3.8532e+00
+Branch    0.9 : -98.930700   9.0932e-01  -2.1922e+00
+Branch    1.5 : -99.215328   2.0430e-01  -5.1302e-01
+Branch    5.0 : -99.297308   3.8535e-05  -9.3567e-05
+Branch   10.0 : -99.297324   2.0653e-10  -5.0132e-10
+Branch   50.0 : -99.297324  -1.1880e-14  -1.7296e-31
+Branch   90.0 : -99.297324  -1.1880e-14  -1.7296e-31
 Test -97.395496 = -97.395496
-Branch(Tip)    0.1 : -95.225032   2.9053e+00   1.1707e+01
-Branch(Tip)    0.2 : -96.169157   4.2420e+00   1.4835e+00
-Branch(Tip)    0.5 : -99.100065   3.1590e+00  -2.3830e+00
-Branch(Tip)    0.9 : -101.205774   1.2473e+00  -1.2971e+00
-Branch(Tip)    1.5 : -102.137369   2.4757e-01  -2.6717e-01
-Branch(Tip)    5.0 : -102.372957   3.9923e-05  -3.8801e-05
-Branch(Tip)   10.0 : -102.372998   2.1374e-10  -2.0752e-10
-Branch(Tip)   50.0 : -102.372998  -4.7584e-15  -2.9600e-32
-Branch(Tip)   90.0 : -102.372998  -4.7584e-15  -2.9600e-32
+Branch(Tip)    0.1 : -95.225032   7.2632e+00   7.3170e+01
+Branch(Tip)    0.2 : -96.169157   1.0605e+01   9.2719e+00
+Branch(Tip)    0.5 : -99.100065   7.8974e+00  -1.4893e+01
+Branch(Tip)    0.9 : -101.205774   3.1182e+00  -8.1068e+00
+Branch(Tip)    1.5 : -102.137369   6.1893e-01  -1.6698e+00
+Branch(Tip)    5.0 : -102.372957   9.9808e-05  -2.4251e-04
+Branch(Tip)   10.0 : -102.372998   5.3436e-10  -1.2970e-09
+Branch(Tip)   50.0 : -102.372998  -1.1896e-14  -1.8500e-31
+Branch(Tip)   90.0 : -102.372998  -1.1896e-14  -1.8500e-31
 Test -96.169157 = -96.169157
 
 
  TEST alpha(ncats) =   1.50( 1) ; pinv = 0.90
 
 1.000000 
-Branch    0.1 : -121.077217   8.8195e-02  -8.6903e-02
-Branch    0.2 : -121.133222   3.2761e-02  -3.2488e-02
-Branch    0.5 : -121.164660   1.7097e-03  -1.6709e-03
-Branch    0.9 : -121.166378   3.4811e-05  -3.3822e-05
-Branch    1.5 : -121.166414   1.0264e-07  -9.9656e-08
-Branch    5.0 : -121.166414  -4.6680e-15  -1.7414e-22
-Branch   10.0 : -121.166414  -4.6680e-15  -1.6772e-33
-Branch   50.0 : -121.166414  -4.6680e-15  -1.6772e-33
-Branch   90.0 : -121.166414  -4.6680e-15  -1.6772e-33
+Branch    0.1 : -121.077217   8.8195e-01  -8.6903e+00
+Branch    0.2 : -121.133222   3.2761e-01  -3.2488e+00
+Branch    0.5 : -121.164660   1.7097e-02  -1.6709e-01
+Branch    0.9 : -121.166378   3.4811e-04  -3.3822e-03
+Branch    1.5 : -121.166414   1.0264e-06  -9.9656e-06
+Branch    5.0 : -121.166414  -4.6680e-14  -1.7414e-20
+Branch   10.0 : -121.166414  -4.6680e-14  -1.6772e-31
+Branch   50.0 : -121.166414  -4.6680e-14  -1.6772e-31
+Branch   90.0 : -121.166414  -4.6680e-14  -1.6772e-31
 Test -121.077217 = -121.077217
-Branch(Tip)    0.1 : -119.215967   2.0918e+00  -1.9042e+00
-Branch(Tip)    0.2 : -120.551659   7.6462e-01  -8.1447e-01
-Branch(Tip)    0.5 : -121.236738   3.2182e-02  -3.2758e-02
-Branch(Tip)    0.9 : -121.268238   6.1290e-04  -5.9820e-04
-Branch(Tip)    1.5 : -121.268865   1.7939e-06  -1.7419e-06
-Branch(Tip)    5.0 : -121.268867  -4.6680e-15  -3.0427e-21
-Branch(Tip)   10.0 : -121.268867  -4.6680e-15  -1.6835e-33
-Branch(Tip)   50.0 : -121.268867  -4.6680e-15  -1.6835e-33
-Branch(Tip)   90.0 : -121.268867  -4.6680e-15  -1.6835e-33
+Branch(Tip)    0.1 : -119.215967   2.0918e+01  -1.9042e+02
+Branch(Tip)    0.2 : -120.551659   7.6462e+00  -8.1447e+01
+Branch(Tip)    0.5 : -121.236738   3.2182e-01  -3.2758e+00
+Branch(Tip)    0.9 : -121.268238   6.1290e-03  -5.9820e-02
+Branch(Tip)    1.5 : -121.268865   1.7939e-05  -1.7419e-04
+Branch(Tip)    5.0 : -121.268867  -4.6680e-14  -3.0427e-19
+Branch(Tip)   10.0 : -121.268867  -4.6680e-14  -1.6835e-31
+Branch(Tip)   50.0 : -121.268867  -4.6680e-14  -1.6835e-31
+Branch(Tip)   90.0 : -121.268867  -4.6680e-14  -1.6835e-31
 Test -120.551659 = -120.551659
 FREE CREATE
 
@@ -330,75 +330,75 @@ Test -92.278908 = -92.278908
  TEST alpha(ncats) =   0.10( 2) ; pinv = 0.30
 
 0.000539 1.999461 
-Branch    0.1 : -97.913270   9.7842e-01   1.5516e+01
-Branch    0.2 : -98.146580   1.9798e+00   1.9231e+00
-Branch    0.5 : -98.915548   1.3706e+00  -2.2096e+00
-Branch    0.9 : -99.405679   4.7058e-01  -9.5201e-01
-Branch    1.5 : -99.592896   7.3326e-02  -1.7519e-01
-Branch    5.0 : -99.566885  -1.3512e-02   2.1618e-04
-Branch   10.0 : -99.475721  -1.2059e-02   1.8424e-04
-Branch   50.0 : -98.987600  -6.1526e-03   5.7856e-05
-Branch   90.0 : -98.709409  -3.8644e-03   2.7652e-05
+Branch    0.1 : -97.913270   1.3977e+00   3.1666e+01
+Branch    0.2 : -98.146580   2.8283e+00   3.9246e+00
+Branch    0.5 : -98.915548   1.9580e+00  -4.5094e+00
+Branch    0.9 : -99.405679   6.7225e-01  -1.9429e+00
+Branch    1.5 : -99.592896   1.0475e-01  -3.5753e-01
+Branch    5.0 : -99.566885  -1.9303e-02   4.4119e-04
+Branch   10.0 : -99.475721  -1.7227e-02   3.7601e-04
+Branch   50.0 : -98.987600  -8.7894e-03   1.1807e-04
+Branch   90.0 : -98.709409  -5.5205e-03   5.6434e-05
 Test -97.913270 = -97.913270
-Branch(Tip)    0.1 : -95.423060   6.9491e+00   2.9116e+01
-Branch(Tip)    0.2 : -96.576107   8.5330e+00   6.6287e-02
-Branch(Tip)    0.5 : -99.656622   5.3166e+00  -8.9843e+00
-Branch(Tip)    0.9 : -101.516171   1.7198e+00  -3.6770e+00
-Branch(Tip)    1.5 : -102.187706   2.7204e-01  -5.7423e-01
-Branch(Tip)    5.0 : -102.325193   1.3097e-03  -2.7426e-05
-Branch(Tip)   10.0 : -102.334439   1.2909e-03  -7.0853e-07
-Branch(Tip)   50.0 : -102.407052   1.2507e-03  -6.9593e-07
-Branch(Tip)   90.0 : -102.477394   1.2113e-03  -6.8298e-07
+Branch(Tip)    0.1 : -95.423060   9.9272e+00   5.9420e+01
+Branch(Tip)    0.2 : -96.576107   1.2190e+01   1.3528e-01
+Branch(Tip)    0.5 : -99.656622   7.5952e+00  -1.8335e+01
+Branch(Tip)    0.9 : -101.516171   2.4569e+00  -7.5041e+00
+Branch(Tip)    1.5 : -102.187706   3.8862e-01  -1.1719e+00
+Branch(Tip)    5.0 : -102.325193   1.8710e-03  -5.5971e-05
+Branch(Tip)   10.0 : -102.334439   1.8441e-03  -1.4460e-06
+Branch(Tip)   50.0 : -102.407052   1.7868e-03  -1.4203e-06
+Branch(Tip)   90.0 : -102.477394   1.7305e-03  -1.3938e-06
 Test -96.576107 = -96.576107
 
 
  TEST alpha(ncats) =   0.10( 2) ; pinv = 0.60
 
 0.000539 1.999461 
-Branch    0.1 : -107.654926   1.4353e+00  -1.2226e+00
-Branch    0.2 : -107.966500   1.0413e+00  -1.6537e+00
-Branch    0.5 : -108.387430   2.2852e-01  -5.4874e-01
-Branch    0.9 : -108.457936  -1.2635e-02  -7.5281e-02
-Branch    1.5 : -108.401589  -4.6351e-02  -1.7146e-03
-Branch    5.0 : -108.051393  -3.3581e-02   1.1900e-03
-Branch   10.0 : -107.704312  -2.3190e-02   5.8062e-04
-Branch   50.0 : -106.566624  -6.1998e-03   4.9488e-05
-Branch   90.0 : -106.116526  -3.3184e-03   1.6708e-05
+Branch    0.1 : -107.654926   3.5883e+00  -7.6412e+00
+Branch    0.2 : -107.966500   2.6031e+00  -1.0336e+01
+Branch    0.5 : -108.387430   5.7129e-01  -3.4296e+00
+Branch    0.9 : -108.457936  -3.1588e-02  -4.7050e-01
+Branch    1.5 : -108.401589  -1.1588e-01  -1.0716e-02
+Branch    5.0 : -108.051393  -8.3951e-02   7.4374e-03
+Branch   10.0 : -107.704312  -5.7975e-02   3.6289e-03
+Branch   50.0 : -106.566624  -1.5500e-02   3.0930e-04
+Branch   90.0 : -106.116526  -8.2959e-03   1.0442e-04
 Test -107.654926 = -107.654926
-Branch(Tip)    0.1 : -104.333811   8.3326e+00  -4.5093e+00
-Branch(Tip)    0.2 : -106.195692   6.3809e+00  -9.1708e+00
-Branch(Tip)    0.5 : -108.858155   1.5386e+00  -3.2793e+00
-Branch(Tip)    0.9 : -109.491239   1.8226e-01  -3.7948e-01
-Branch(Tip)    1.5 : -109.576689   9.4705e-03  -1.7314e-02
-Branch(Tip)    5.0 : -109.587233   6.9164e-04  -5.0605e-07
-Branch(Tip)   10.0 : -109.595839   6.8535e-04  -5.0132e-07
-Branch(Tip)   50.0 : -109.661921   6.3681e-04  -4.6977e-07
-Branch(Tip)   90.0 : -109.723303   5.9135e-04  -4.3956e-07
+Branch(Tip)    0.1 : -104.333811   2.0831e+01  -2.8183e+01
+Branch(Tip)    0.2 : -106.195692   1.5952e+01  -5.7317e+01
+Branch(Tip)    0.5 : -108.858155   3.8465e+00  -2.0495e+01
+Branch(Tip)    0.9 : -109.491239   4.5564e-01  -2.3717e+00
+Branch(Tip)    1.5 : -109.576689   2.3676e-02  -1.0821e-01
+Branch(Tip)    5.0 : -109.587233   1.7291e-03  -3.1628e-06
+Branch(Tip)   10.0 : -109.595839   1.7134e-03  -3.1333e-06
+Branch(Tip)   50.0 : -109.661921   1.5920e-03  -2.9361e-06
+Branch(Tip)   90.0 : -109.723303   1.4784e-03  -2.7473e-06
 Test -106.195692 = -106.195692
 
 
  TEST alpha(ncats) =   0.10( 2) ; pinv = 0.90
 
 0.000539 1.999461 
-Branch    0.1 : -128.498361  -1.1369e-01   1.2134e-02
-Branch    0.2 : -128.390505  -1.0231e-01   1.0477e-02
-Branch    0.5 : -128.123204  -7.8018e-02   6.2056e-03
-Branch    0.9 : -127.852322  -5.9142e-02   3.5881e-03
-Branch    1.5 : -127.549826  -4.3306e-02   1.9414e-03
-Branch    5.0 : -126.643122  -1.6586e-02   3.0007e-04
-Branch   10.0 : -126.055862  -8.5569e-03   8.5865e-05
-Branch   50.0 : -124.770415  -1.3673e-03   3.6027e-06
-Branch   90.0 : -124.409990  -5.9683e-04   1.0003e-06
+Branch    0.1 : -128.498361  -1.1369e+00   1.2134e+00
+Branch    0.2 : -128.390505  -1.0231e+00   1.0477e+00
+Branch    0.5 : -128.123204  -7.8018e-01   6.2056e-01
+Branch    0.9 : -127.852322  -5.9142e-01   3.5881e-01
+Branch    1.5 : -127.549826  -4.3306e-01   1.9414e-01
+Branch    5.0 : -126.643122  -1.6586e-01   3.0007e-02
+Branch   10.0 : -126.055862  -8.5569e-02   8.5865e-03
+Branch   50.0 : -124.770415  -1.3673e-02   3.6027e-04
+Branch   90.0 : -124.409990  -5.9683e-03   1.0003e-04
 Test -128.498361 = -128.498361
-Branch(Tip)    0.1 : -128.292064   4.3505e-01  -9.3371e-01
-Branch(Tip)    0.2 : -128.473287   5.4538e-02  -1.0939e-01
-Branch(Tip)    0.5 : -128.502162   8.1647e-04  -2.8670e-04
-Branch(Tip)    0.9 : -128.504911   6.6741e-04  -5.9535e-07
-Branch(Tip)    1.5 : -128.508906   6.6451e-04  -4.7259e-07
-Branch(Tip)    5.0 : -128.531877   6.4815e-04  -4.6238e-07
-Branch(Tip)   10.0 : -128.563713   6.2539e-04  -4.4806e-07
-Branch(Tip)   50.0 : -128.780918   4.6754e-04  -3.4449e-07
-Branch(Tip)   90.0 : -128.942743   3.4718e-04  -2.6049e-07
+Branch(Tip)    0.1 : -128.292064   4.3505e+00  -9.3371e+01
+Branch(Tip)    0.2 : -128.473287   5.4538e-01  -1.0939e+01
+Branch(Tip)    0.5 : -128.502162   8.1647e-03  -2.8670e-02
+Branch(Tip)    0.9 : -128.504911   6.6741e-03  -5.9535e-05
+Branch(Tip)    1.5 : -128.508906   6.6451e-03  -4.7259e-05
+Branch(Tip)    5.0 : -128.531877   6.4815e-03  -4.6238e-05
+Branch(Tip)   10.0 : -128.563713   6.2539e-03  -4.4806e-05
+Branch(Tip)   50.0 : -128.780918   4.6754e-03  -3.4449e-05
+Branch(Tip)   90.0 : -128.942743   3.4718e-03  -2.6049e-05
 Test -128.473287 = -128.473287
 
 
@@ -430,75 +430,75 @@ Test -90.370688 = -90.370688
  TEST alpha(ncats) =   0.75( 2) ; pinv = 0.30
 
 0.235541 1.764459 
-Branch    0.1 : -93.121854  -3.3240e+00   3.5128e+01
-Branch    0.2 : -92.873444  -7.3215e-01   8.9564e+00
-Branch    0.5 : -92.934815   5.0664e-01   5.4630e-01
-Branch    0.9 : -93.252311   5.5130e-01  -9.6571e-02
-Branch    1.5 : -93.685962   4.6192e-01  -9.5672e-02
-Branch    5.0 : -95.057793   1.3355e-01  -3.7470e-02
-Branch   10.0 : -95.469931   1.8592e-02  -4.9014e-03
-Branch   50.0 : -95.543803   3.0407e-08  -6.9538e-09
-Branch   90.0 : -95.543803   5.8177e-14  -1.4691e-14
+Branch    0.1 : -93.121854  -4.7486e+00   7.1691e+01
+Branch    0.2 : -92.873444  -1.0459e+00   1.8278e+01
+Branch    0.5 : -92.934815   7.2378e-01   1.1149e+00
+Branch    0.9 : -93.252311   7.8758e-01  -1.9708e-01
+Branch    1.5 : -93.685962   6.5989e-01  -1.9525e-01
+Branch    5.0 : -95.057793   1.9078e-01  -7.6470e-02
+Branch   10.0 : -95.469931   2.6560e-02  -1.0003e-02
+Branch   50.0 : -95.543803   4.3439e-08  -1.4191e-08
+Branch   90.0 : -95.543803   8.3110e-14  -2.9982e-14
 Test -93.121854 = -93.121854
-Branch(Tip)    0.1 : -92.051000   9.6827e-01   3.7357e+01
-Branch(Tip)    0.2 : -92.424643   3.5776e+00   7.0236e+00
-Branch(Tip)    0.5 : -94.029999   3.3285e+00  -2.8730e+00
-Branch(Tip)    0.9 : -95.516729   2.0089e+00  -1.5924e+00
-Branch(Tip)    1.5 : -96.832869   1.2121e+00  -5.1395e-01
-Branch(Tip)    5.0 : -99.972979   2.9174e-01  -8.2633e-02
-Branch(Tip)   10.0 : -100.861026   3.8425e-02  -1.0549e-02
-Branch(Tip)   50.0 : -101.008040   5.4736e-08  -1.2518e-08
-Branch(Tip)   90.0 : -101.008040   1.0923e-13  -2.6443e-14
+Branch(Tip)    0.1 : -92.051000   1.3832e+00   7.6240e+01
+Branch(Tip)    0.2 : -92.424643   5.1109e+00   1.4334e+01
+Branch(Tip)    0.5 : -94.029999   4.7549e+00  -5.8633e+00
+Branch(Tip)    0.9 : -95.516729   2.8698e+00  -3.2498e+00
+Branch(Tip)    1.5 : -96.832869   1.7316e+00  -1.0489e+00
+Branch(Tip)    5.0 : -99.972979   4.1677e-01  -1.6864e-01
+Branch(Tip)   10.0 : -100.861026   5.4893e-02  -2.1529e-02
+Branch(Tip)   50.0 : -101.008040   7.8194e-08  -2.5548e-08
+Branch(Tip)   90.0 : -101.008040   1.5604e-13  -5.3966e-14
 Test -92.424643 = -92.424643
 
 
  TEST alpha(ncats) =   0.75( 2) ; pinv = 0.60
 
 0.235541 1.764459 
-Branch    0.1 : -97.936100  -1.9414e+00   1.0545e+01
-Branch    0.2 : -97.660748  -5.6154e-01   2.7967e+00
-Branch    0.5 : -97.623089   1.9607e-01   3.0588e-01
-Branch    0.9 : -97.900858   3.1571e-01   2.1488e-02
-Branch    1.5 : -98.361777   2.8360e-01  -4.3484e-02
-Branch    5.0 : -99.461670   3.4702e-02  -8.8490e-03
-Branch   10.0 : -99.594917   1.6643e-03  -3.8996e-04
-Branch   50.0 : -99.602087   1.8227e-13  -4.2870e-14
-Branch   90.0 : -99.602087  -5.1980e-15  -5.0199e-24
+Branch    0.1 : -97.936100  -4.8534e+00   6.5909e+01
+Branch    0.2 : -97.660748  -1.4038e+00   1.7480e+01
+Branch    0.5 : -97.623089   4.9017e-01   1.9118e+00
+Branch    0.9 : -97.900858   7.8927e-01   1.3430e-01
+Branch    1.5 : -98.361777   7.0901e-01  -2.7177e-01
+Branch    5.0 : -99.461670   8.6754e-02  -5.5306e-02
+Branch   10.0 : -99.594917   4.1608e-03  -2.4372e-03
+Branch   50.0 : -99.602087   4.5567e-13  -2.6794e-13
+Branch   90.0 : -99.602087  -1.2995e-14  -3.1374e-23
 Test -97.936100 = -97.936100
-Branch(Tip)    0.1 : -96.607480   2.2562e+00   4.7152e+00
-Branch(Tip)    0.2 : -97.232358   2.5243e+00  -8.5471e-01
-Branch(Tip)    0.5 : -98.761698   1.5947e+00  -9.0118e-01
-Branch(Tip)    0.9 : -100.047285   1.0737e+00  -2.9757e-01
-Branch(Tip)    1.5 : -101.399823   7.5972e-01  -1.6518e-01
-Branch(Tip)    5.0 : -104.144878   7.8329e-02  -2.1559e-02
-Branch(Tip)   10.0 : -104.427226   3.1083e-03  -7.5385e-04
-Branch(Tip)   50.0 : -104.440308   3.2247e-13  -7.5006e-14
-Branch(Tip)   90.0 : -104.440308  -5.5278e-15  -8.7829e-24
+Branch(Tip)    0.1 : -96.607480   5.6406e+00   2.9470e+01
+Branch(Tip)    0.2 : -97.232358   6.3108e+00  -5.3419e+00
+Branch(Tip)    0.5 : -98.761698   3.9868e+00  -5.6324e+00
+Branch(Tip)    0.9 : -100.047285   2.6843e+00  -1.8598e+00
+Branch(Tip)    1.5 : -101.399823   1.8993e+00  -1.0323e+00
+Branch(Tip)    5.0 : -104.144878   1.9582e-01  -1.3474e-01
+Branch(Tip)   10.0 : -104.427226   7.7707e-03  -4.7116e-03
+Branch(Tip)   50.0 : -104.440308   8.0616e-13  -4.6879e-13
+Branch(Tip)   90.0 : -104.440308  -1.3819e-14  -5.4893e-23
 Test -97.232358 = -97.232358
 
 
  TEST alpha(ncats) =   0.75( 2) ; pinv = 0.90
 
 0.235541 1.764459 
-Branch    0.1 : -115.827620   9.7694e-02   2.3830e-01
-Branch    0.2 : -115.999414   2.1449e-01   4.1596e-02
-Branch    0.5 : -116.625579   1.7232e-01  -3.1123e-02
-Branch    0.9 : -117.095655   7.2872e-02  -1.7033e-02
-Branch    1.5 : -117.328467   1.7359e-02  -4.1626e-03
-Branch    5.0 : -117.401740   5.2293e-06  -1.1966e-06
-Branch   10.0 : -117.401763   5.6526e-11  -1.2927e-11
-Branch   50.0 : -117.401763  -4.1944e-15  -7.7037e-31
-Branch   90.0 : -117.401763  -4.1944e-15  -7.7037e-31
+Branch    0.1 : -115.827620   9.7694e-01   2.3830e+01
+Branch    0.2 : -115.999414   2.1449e+00   4.1596e+00
+Branch    0.5 : -116.625579   1.7232e+00  -3.1123e+00
+Branch    0.9 : -117.095655   7.2872e-01  -1.7033e+00
+Branch    1.5 : -117.328467   1.7359e-01  -4.1626e-01
+Branch    5.0 : -117.401740   5.2293e-05  -1.1966e-04
+Branch   10.0 : -117.401763   5.6526e-10  -1.2927e-09
+Branch   50.0 : -117.401763  -4.1944e-14  -7.7037e-29
+Branch   90.0 : -117.401763  -4.1944e-14  -7.7037e-29
 Test -115.827620 = -115.827620
-Branch(Tip)    0.1 : -113.666834   1.1913e+00  -2.0168e-01
-Branch(Tip)    0.2 : -114.771440   1.0262e+00  -1.4842e-01
-Branch(Tip)    0.5 : -117.200401   6.0293e-01  -1.2659e-01
-Branch(Tip)    0.9 : -118.782267   2.3358e-01  -5.9766e-02
-Branch(Tip)    1.5 : -119.489876   4.8375e-02  -1.2645e-02
-Branch(Tip)    5.0 : -119.681081   1.1924e-05  -2.7316e-06
-Branch(Tip)   10.0 : -119.681133   1.2864e-10  -2.9418e-11
-Branch(Tip)   50.0 : -119.681133  -4.4842e-15  -8.1173e-31
-Branch(Tip)   90.0 : -119.681133  -4.4842e-15  -8.1173e-31
+Branch(Tip)    0.1 : -113.666834   1.1913e+01  -2.0168e+01
+Branch(Tip)    0.2 : -114.771440   1.0262e+01  -1.4842e+01
+Branch(Tip)    0.5 : -117.200401   6.0293e+00  -1.2659e+01
+Branch(Tip)    0.9 : -118.782267   2.3358e+00  -5.9766e+00
+Branch(Tip)    1.5 : -119.489876   4.8375e-01  -1.2645e+00
+Branch(Tip)    5.0 : -119.681081   1.1924e-04  -2.7316e-04
+Branch(Tip)   10.0 : -119.681133   1.2864e-09  -2.9418e-09
+Branch(Tip)   50.0 : -119.681133  -4.4842e-14  -8.1173e-29
+Branch(Tip)   90.0 : -119.681133  -4.4842e-14  -8.1173e-29
 Test -114.771440 = -114.771440
 
 
@@ -530,75 +530,75 @@ Test -90.134734 = -90.134734
  TEST alpha(ncats) =   1.50( 2) ; pinv = 0.30
 
 0.406939 1.593061 
-Branch    0.1 : -92.365503  -3.1013e+00   3.6464e+01
-Branch    0.2 : -92.158930  -3.8537e-01   9.5531e+00
-Branch    0.5 : -92.399821   9.5544e-01   5.3549e-01
-Branch    0.9 : -92.954792   9.1384e-01  -3.2351e-01
-Branch    1.5 : -93.613996   6.3048e-01  -2.9524e-01
-Branch    5.0 : -94.808687   5.8123e-02  -2.6677e-02
-Branch   10.0 : -94.934462   2.7282e-03  -1.1125e-03
-Branch   50.0 : -94.941234   4.0123e-13  -1.6072e-13
-Branch   90.0 : -94.941234  -5.5611e-15  -2.5192e-23
+Branch    0.1 : -92.365503  -4.4305e+00   7.4416e+01
+Branch    0.2 : -92.158930  -5.5052e-01   1.9496e+01
+Branch    0.5 : -92.399821   1.3649e+00   1.0928e+00
+Branch    0.9 : -92.954792   1.3055e+00  -6.6023e-01
+Branch    1.5 : -93.613996   9.0068e-01  -6.0254e-01
+Branch    5.0 : -94.808687   8.3033e-02  -5.4442e-02
+Branch   10.0 : -94.934462   3.8975e-03  -2.2704e-03
+Branch   50.0 : -94.941234   5.7319e-13  -3.2800e-13
+Branch   90.0 : -94.941234  -7.9445e-15  -5.1412e-23
 Test -92.365503 = -92.365503
-Branch(Tip)    0.1 : -91.401908  -1.0279e-01   4.4191e+01
-Branch(Tip)    0.2 : -91.674889   3.1636e+00   1.0399e+01
-Branch(Tip)    0.5 : -93.321916   3.7743e+00  -1.8638e+00
-Branch(Tip)    0.9 : -95.143857   2.6284e+00  -1.7383e+00
-Branch(Tip)    1.5 : -96.887847   1.5663e+00  -8.6024e-01
-Branch(Tip)    5.0 : -99.740373   1.3183e-01  -6.3366e-02
-Branch(Tip)   10.0 : -100.014059   5.4343e-03  -2.2741e-03
-Branch(Tip)   50.0 : -100.027312   7.6464e-13  -3.0438e-13
-Branch(Tip)   90.0 : -100.027312  -5.7876e-15  -4.7711e-23
+Branch(Tip)    0.1 : -91.401908  -1.4684e-01   9.0187e+01
+Branch(Tip)    0.2 : -91.674889   4.5195e+00   2.1222e+01
+Branch(Tip)    0.5 : -93.321916   5.3918e+00  -3.8037e+00
+Branch(Tip)    0.9 : -95.143857   3.7549e+00  -3.5476e+00
+Branch(Tip)    1.5 : -96.887847   2.2375e+00  -1.7556e+00
+Branch(Tip)    5.0 : -99.740373   1.8833e-01  -1.2932e-01
+Branch(Tip)   10.0 : -100.014059   7.7633e-03  -4.6411e-03
+Branch(Tip)   50.0 : -100.027312   1.0923e-12  -6.2119e-13
+Branch(Tip)   90.0 : -100.027312  -8.2680e-15  -9.7370e-23
 Test -91.674889 = -91.674889
 
 
  TEST alpha(ncats) =   1.50( 2) ; pinv = 0.60
 
 0.406939 1.593061 
-Branch    0.1 : -97.171584  -1.2930e+00   9.6874e+00
-Branch    0.2 : -97.041763  -2.4690e-02   2.5153e+00
-Branch    0.5 : -97.336267   5.4847e-01   7.1663e-02
-Branch    0.9 : -97.859335   4.6568e-01  -1.4376e-01
-Branch    1.5 : -98.400355   2.6525e-01  -1.1003e-01
-Branch    5.0 : -99.001427   6.3457e-03  -2.6006e-03
-Branch   10.0 : -99.017011   4.2887e-05  -1.6974e-05
-Branch   50.0 : -99.017120  -4.8277e-15  -1.1732e-22
-Branch   90.0 : -99.017120  -4.8277e-15  -4.7235e-31
+Branch    0.1 : -97.171584  -3.2326e+00   6.0546e+01
+Branch    0.2 : -97.041763  -6.1726e-02   1.5720e+01
+Branch    0.5 : -97.336267   1.3712e+00   4.4789e-01
+Branch    0.9 : -97.859335   1.1642e+00  -8.9853e-01
+Branch    1.5 : -98.400355   6.6311e-01  -6.8767e-01
+Branch    5.0 : -99.001427   1.5864e-02  -1.6254e-02
+Branch   10.0 : -99.017011   1.0722e-04  -1.0609e-04
+Branch   50.0 : -99.017120  -1.2069e-14  -7.3324e-22
+Branch   90.0 : -99.017120  -1.2069e-14  -2.9522e-30
 Test -97.171584 = -97.171584
-Branch(Tip)    0.1 : -95.628921   2.1891e+00   7.6337e+00
-Branch(Tip)    0.2 : -96.306132   2.9418e+00   3.7473e-01
-Branch(Tip)    0.5 : -98.296099   2.2371e+00  -1.0950e+00
-Branch(Tip)    0.9 : -100.079782   1.4108e+00  -6.1600e-01
-Branch(Tip)    1.5 : -101.635271   7.3356e-01  -3.2695e-01
-Branch(Tip)    5.0 : -103.195410   1.3501e-02  -5.7961e-03
-Branch(Tip)   10.0 : -103.227529   8.3636e-05  -3.3207e-05
-Branch(Tip)   50.0 : -103.227740  -5.0645e-15  -2.2757e-22
-Branch(Tip)   90.0 : -103.227740  -5.0645e-15  -5.0625e-31
+Branch(Tip)    0.1 : -95.628921   5.4729e+00   4.7711e+01
+Branch(Tip)    0.2 : -96.306132   7.3545e+00   2.3421e+00
+Branch(Tip)    0.5 : -98.296099   5.5927e+00  -6.8435e+00
+Branch(Tip)    0.9 : -100.079782   3.5271e+00  -3.8500e+00
+Branch(Tip)    1.5 : -101.635271   1.8339e+00  -2.0434e+00
+Branch(Tip)    5.0 : -103.195410   3.3753e-02  -3.6226e-02
+Branch(Tip)   10.0 : -103.227529   2.0909e-04  -2.0754e-04
+Branch(Tip)   50.0 : -103.227740  -1.2661e-14  -1.4223e-21
+Branch(Tip)   90.0 : -103.227740  -1.2661e-14  -3.1640e-30
 Test -96.306132 = -96.306132
 
 
  TEST alpha(ncats) =   1.50( 2) ; pinv = 0.90
 
 0.406939 1.593061 
-Branch    0.1 : -118.388176   3.3285e-01  -6.0904e-02
-Branch    0.2 : -118.684617   2.5709e-01  -8.0133e-02
-Branch    0.5 : -119.158889   8.3886e-02  -3.3929e-02
-Branch    0.9 : -119.323933   1.6235e-02  -6.6596e-03
-Branch    1.5 : -119.360335   1.4316e-03  -5.7291e-04
-Branch    5.0 : -119.363929   1.3822e-09  -5.4610e-10
-Branch   10.0 : -119.363929  -4.3746e-15  -1.4390e-18
-Branch   50.0 : -119.363929  -4.3782e-15  -5.1622e-31
-Branch   90.0 : -119.363929  -4.3782e-15  -5.1622e-31
+Branch    0.1 : -118.388176   3.3285e+00  -6.0904e+00
+Branch    0.2 : -118.684617   2.5709e+00  -8.0133e+00
+Branch    0.5 : -119.158889   8.3886e-01  -3.3929e+00
+Branch    0.9 : -119.323933   1.6235e-01  -6.6596e-01
+Branch    1.5 : -119.360335   1.4316e-02  -5.7291e-02
+Branch    5.0 : -119.363929   1.3822e-08  -5.4610e-08
+Branch   10.0 : -119.363929  -4.3746e-14  -1.4390e-16
+Branch   50.0 : -119.363929  -4.3782e-14  -5.1622e-29
+Branch   90.0 : -119.363929  -4.3782e-14  -5.1622e-29
 Test -118.388176 = -118.388176
-Branch(Tip)    0.1 : -115.700304   1.8043e+00  -6.1624e-01
-Branch(Tip)    0.2 : -117.224520   1.2696e+00  -4.6272e-01
-Branch(Tip)    0.5 : -119.461959   3.7145e-01  -1.6498e-01
-Branch(Tip)    0.9 : -120.149886   6.1083e-02  -2.7204e-02
-Branch(Tip)    1.5 : -120.279901   4.7245e-03  -1.9437e-03
-Branch(Tip)    5.0 : -120.291550   4.3449e-09  -1.7166e-09
-Branch(Tip)   10.0 : -120.291550  -4.5078e-15  -4.5233e-18
-Branch(Tip)   50.0 : -120.291550  -4.5192e-15  -5.2534e-31
-Branch(Tip)   90.0 : -120.291550  -4.5192e-15  -5.2534e-31
+Branch(Tip)    0.1 : -115.700304   1.8043e+01  -6.1624e+01
+Branch(Tip)    0.2 : -117.224520   1.2696e+01  -4.6272e+01
+Branch(Tip)    0.5 : -119.461959   3.7145e+00  -1.6498e+01
+Branch(Tip)    0.9 : -120.149886   6.1083e-01  -2.7204e+00
+Branch(Tip)    1.5 : -120.279901   4.7245e-02  -1.9437e-01
+Branch(Tip)    5.0 : -120.291550   4.3449e-08  -1.7166e-07
+Branch(Tip)   10.0 : -120.291550  -4.5078e-14  -4.5233e-16
+Branch(Tip)   50.0 : -120.291550  -4.5192e-14  -5.2534e-29
+Branch(Tip)   90.0 : -120.291550  -4.5192e-14  -5.2534e-29
 Test -117.224520 = -117.224520
 FREE CREATE
 
@@ -631,75 +631,75 @@ Test -97.589664 = -97.589664
  TEST alpha(ncats) =   0.10( 4) ; pinv = 0.30
 
 0.000001 0.001078 0.093753 3.905168 
-Branch    0.1 : -102.524121  -3.5835e+00   2.3244e+01
-Branch    0.2 : -102.164345  -1.8306e+00   6.2768e+00
-Branch    0.5 : -101.677913  -7.4790e-01   1.1123e+00
-Branch    0.9 : -101.382191  -3.4695e-01   4.4754e-01
-Branch    1.5 : -101.204521  -1.0599e-01   1.7047e-01
-Branch    5.0 : -101.427451   8.6921e-02   1.6403e-05
-Branch   10.0 : -101.947045   5.3893e-02  -5.1984e-03
-Branch   50.0 : -102.468272   2.8583e-04  -1.6480e-05
-Branch   90.0 : -102.476814   1.2667e-04   2.3654e-07
+Branch    0.1 : -102.524121  -5.1193e+00   4.7437e+01
+Branch    0.2 : -102.164345  -2.6152e+00   1.2810e+01
+Branch    0.5 : -101.677913  -1.0684e+00   2.2701e+00
+Branch    0.9 : -101.382191  -4.9565e-01   9.1334e-01
+Branch    1.5 : -101.204521  -1.5141e-01   3.4790e-01
+Branch    5.0 : -101.427451   1.2417e-01   3.3476e-05
+Branch   10.0 : -101.947045   7.6990e-02  -1.0609e-02
+Branch   50.0 : -102.468272   4.0833e-04  -3.3633e-05
+Branch   90.0 : -102.476814   1.8096e-04   4.8273e-07
 Test -102.524121 = -102.524121
-Branch(Tip)    0.1 : -100.963776   7.5135e+00  -1.2707e+01
-Branch(Tip)    0.2 : -101.872171   5.1340e+00  -1.6547e+01
-Branch(Tip)    0.5 : -103.043717   1.2962e+00  -3.4803e+00
-Branch(Tip)    0.9 : -103.486265   5.2438e-01  -3.6250e-01
-Branch(Tip)    1.5 : -103.872911   4.1653e-01  -4.2372e-02
-Branch(Tip)    5.0 : -105.578046   2.7282e-01  -2.5070e-02
-Branch(Tip)   10.0 : -106.979422   1.3249e-01  -1.4351e-02
-Branch(Tip)   50.0 : -108.211328   1.5399e-03  -3.0749e-05
-Branch(Tip)   90.0 : -108.282261   1.1370e-03  -1.8169e-06
+Branch(Tip)    0.1 : -100.963776   1.0734e+01  -2.5933e+01
+Branch(Tip)    0.2 : -101.872171   7.3343e+00  -3.3770e+01
+Branch(Tip)    0.5 : -103.043717   1.8518e+00  -7.1026e+00
+Branch(Tip)    0.9 : -103.486265   7.4912e-01  -7.3979e-01
+Branch(Tip)    1.5 : -103.872911   5.9505e-01  -8.6473e-02
+Branch(Tip)    5.0 : -105.578046   3.8974e-01  -5.1164e-02
+Branch(Tip)   10.0 : -106.979422   1.8927e-01  -2.9287e-02
+Branch(Tip)   50.0 : -108.211328   2.1999e-03  -6.2753e-05
+Branch(Tip)   90.0 : -108.282261   1.6243e-03  -3.7080e-06
 Test -101.872171 = -101.872171
 
 
  TEST alpha(ncats) =   0.10( 4) ; pinv = 0.60
 
 0.000001 0.001078 0.093753 3.905168 
-Branch    0.1 : -108.052524  -2.7180e+00   9.8980e+00
-Branch    0.2 : -107.577472  -1.3497e+00   3.0244e+00
-Branch    0.5 : -107.028652  -3.8289e-01   5.4507e-01
-Branch    0.9 : -106.826226  -8.2029e-02   1.6154e-01
-Branch    1.5 : -106.824429   5.2139e-02   4.5942e-02
-Branch    5.0 : -107.640758   7.9911e-02  -6.4078e-03
-Branch   10.0 : -108.232080   2.3685e-02  -2.4678e-03
-Branch   50.0 : -108.419823  -4.9905e-04   1.1959e-06
-Branch   90.0 : -108.375808  -3.8736e-04   9.2328e-07
+Branch    0.1 : -108.052524  -6.7950e+00   6.1862e+01
+Branch    0.2 : -107.577472  -3.3743e+00   1.8902e+01
+Branch    0.5 : -107.028652  -9.5722e-01   3.4067e+00
+Branch    0.9 : -106.826226  -2.0507e-01   1.0096e+00
+Branch    1.5 : -106.824429   1.3035e-01   2.8714e-01
+Branch    5.0 : -107.640758   1.9978e-01  -4.0049e-02
+Branch   10.0 : -108.232080   5.9213e-02  -1.5424e-02
+Branch   50.0 : -108.419823  -1.2476e-03   7.4742e-06
+Branch   90.0 : -108.375808  -9.6841e-04   5.7705e-06
 Test -108.052524 = -108.052524
-Branch(Tip)    0.1 : -107.275574   2.8183e+00  -8.6974e+00
-Branch(Tip)    0.2 : -107.769163   1.3476e+00  -3.5514e+00
-Branch(Tip)    0.5 : -108.325954   5.0410e-01  -1.9284e-01
-Branch(Tip)    0.9 : -108.785943   4.3823e-01  -2.7160e-02
-Branch(Tip)    1.5 : -109.415058   4.0090e-01  -2.4814e-02
-Branch(Tip)    5.0 : -112.002323   2.0017e-01  -1.8697e-02
-Branch(Tip)   10.0 : -113.427775   5.4788e-02  -5.9677e-03
-Branch(Tip)   50.0 : -113.999564   6.9421e-04  -1.3945e-06
-Branch(Tip)   90.0 : -114.063470   5.8908e-04  -9.4085e-07
+Branch(Tip)    0.1 : -107.275574   7.0457e+00  -5.4359e+01
+Branch(Tip)    0.2 : -107.769163   3.3689e+00  -2.2196e+01
+Branch(Tip)    0.5 : -108.325954   1.2602e+00  -1.2053e+00
+Branch(Tip)    0.9 : -108.785943   1.0956e+00  -1.6975e-01
+Branch(Tip)    1.5 : -109.415058   1.0022e+00  -1.5509e-01
+Branch(Tip)    5.0 : -112.002323   5.0044e-01  -1.1686e-01
+Branch(Tip)   10.0 : -113.427775   1.3697e-01  -3.7298e-02
+Branch(Tip)   50.0 : -113.999564   1.7355e-03  -8.7155e-06
+Branch(Tip)   90.0 : -114.063470   1.4727e-03  -5.8803e-06
 Test -107.769163 = -107.769163
 
 
  TEST alpha(ncats) =   0.10( 4) ; pinv = 0.90
 
 0.000001 0.001078 0.093753 3.905168 
-Branch    0.1 : -122.690763  -4.5138e-01   6.2017e-01
-Branch    0.2 : -122.442118  -1.1456e-01   1.7920e-01
-Branch    0.5 : -122.502381   8.4906e-02   1.8453e-02
-Branch    0.9 : -122.900584   1.0055e-01  -3.5655e-03
-Branch    1.5 : -123.408905   6.7061e-02  -5.8101e-03
-Branch    5.0 : -124.035469  -5.6930e-05  -2.2646e-04
-Branch   10.0 : -123.945532  -2.0867e-03   5.9059e-06
-Branch   50.0 : -123.464673  -6.9540e-04   1.4418e-06
-Branch   90.0 : -123.268168  -3.4592e-04   5.2074e-07
+Branch    0.1 : -122.690763  -4.5138e+00   6.2017e+01
+Branch    0.2 : -122.442118  -1.1456e+00   1.7920e+01
+Branch    0.5 : -122.502381   8.4906e-01   1.8453e+00
+Branch    0.9 : -122.900584   1.0055e+00  -3.5655e-01
+Branch    1.5 : -123.408905   6.7061e-01  -5.8101e-01
+Branch    5.0 : -124.035469  -5.6930e-04  -2.2646e-02
+Branch   10.0 : -123.945532  -2.0867e-02   5.9059e-04
+Branch   50.0 : -123.464673  -6.9540e-03   1.4418e-04
+Branch   90.0 : -123.268168  -3.4592e-03   5.2074e-05
 Test -122.690763 = -122.690763
-Branch(Tip)    0.1 : -121.745802   4.3297e-01  -4.4191e-03
-Branch(Tip)    0.2 : -122.178250   4.3171e-01  -3.5737e-03
-Branch(Tip)    0.5 : -123.428389   3.9443e-01  -1.8382e-02
-Branch(Tip)    0.9 : -124.842233   3.1017e-01  -2.2054e-02
-Branch(Tip)    1.5 : -126.325833   1.8932e-01  -1.7291e-02
-Branch(Tip)    5.0 : -128.160634   5.7124e-03  -5.0781e-04
-Branch(Tip)   10.0 : -128.243909   6.5752e-04  -5.0614e-06
-Branch(Tip)   50.0 : -128.426657   3.2785e-04  -5.1277e-07
-Branch(Tip)   90.0 : -128.524227   1.7598e-04  -2.7163e-07
+Branch(Tip)    0.1 : -121.745802   4.3297e+00  -4.4191e-01
+Branch(Tip)    0.2 : -122.178250   4.3171e+00  -3.5737e-01
+Branch(Tip)    0.5 : -123.428389   3.9443e+00  -1.8382e+00
+Branch(Tip)    0.9 : -124.842233   3.1017e+00  -2.2054e+00
+Branch(Tip)    1.5 : -126.325833   1.8932e+00  -1.7291e+00
+Branch(Tip)    5.0 : -128.160634   5.7124e-02  -5.0781e-02
+Branch(Tip)   10.0 : -128.243909   6.5752e-03  -5.0614e-04
+Branch(Tip)   50.0 : -128.426657   3.2785e-03  -5.1277e-05
+Branch(Tip)   90.0 : -128.524227   1.7598e-03  -2.7163e-05
 Test -122.178250 = -122.178250
 
 
@@ -731,75 +731,75 @@ Test -90.580211 = -90.580211
  TEST alpha(ncats) =   0.75( 4) ; pinv = 0.30
 
 0.084885 0.386197 0.942076 2.586843 
-Branch    0.1 : -93.425840  -3.4806e+00   3.6481e+01
-Branch    0.2 : -93.164805  -7.6808e-01   9.5627e+00
-Branch    0.5 : -93.251024   6.2906e-01   7.2623e-01
-Branch    0.9 : -93.649372   6.8731e-01  -1.7703e-01
-Branch    1.5 : -94.159237   5.0031e-01  -2.0722e-01
-Branch    5.0 : -95.300309   9.9660e-02  -2.2330e-02
-Branch   10.0 : -95.695401   2.9921e-02  -4.1994e-03
-Branch   50.0 : -95.930549   6.0023e-05  -5.3639e-06
-Branch   90.0 : -95.931235   4.7651e-07  -3.9436e-08
+Branch    0.1 : -93.425840  -4.9723e+00   7.4450e+01
+Branch    0.2 : -93.164805  -1.0973e+00   1.9516e+01
+Branch    0.5 : -93.251024   8.9865e-01   1.4821e+00
+Branch    0.9 : -93.649372   9.8187e-01  -3.6129e-01
+Branch    1.5 : -94.159237   7.1474e-01  -4.2290e-01
+Branch    5.0 : -95.300309   1.4237e-01  -4.5571e-02
+Branch   10.0 : -95.695401   4.2745e-02  -8.5702e-03
+Branch   50.0 : -95.930549   8.5746e-05  -1.0947e-05
+Branch   90.0 : -95.931235   6.8073e-07  -8.0482e-08
 Test -93.425840 = -93.425840
-Branch(Tip)    0.1 : -92.400586   1.1152e+00   3.2064e+01
-Branch(Tip)    0.2 : -92.760691   3.3357e+00   5.9133e+00
-Branch(Tip)    0.5 : -94.268783   3.2422e+00  -2.0173e+00
-Branch(Tip)    0.9 : -95.813615   2.2280e+00  -1.4236e+00
-Branch(Tip)    1.5 : -97.303741   1.3476e+00  -7.2518e-01
-Branch(Tip)    5.0 : -100.072109   2.2087e-01  -5.2369e-02
-Branch(Tip)   10.0 : -100.940949   6.7274e-02  -8.7686e-03
-Branch(Tip)   50.0 : -101.522613   2.1426e-04  -1.8587e-05
-Branch(Tip)   90.0 : -101.525108   1.7793e-06  -1.4707e-07
+Branch(Tip)    0.1 : -92.400586   1.5931e+00   6.5437e+01
+Branch(Tip)    0.2 : -92.760691   4.7653e+00   1.2068e+01
+Branch(Tip)    0.5 : -94.268783   4.6317e+00  -4.1170e+00
+Branch(Tip)    0.9 : -95.813615   3.1828e+00  -2.9053e+00
+Branch(Tip)    1.5 : -97.303741   1.9252e+00  -1.4800e+00
+Branch(Tip)    5.0 : -100.072109   3.1553e-01  -1.0688e-01
+Branch(Tip)   10.0 : -100.940949   9.6105e-02  -1.7895e-02
+Branch(Tip)   50.0 : -101.522613   3.0608e-04  -3.7932e-05
+Branch(Tip)   90.0 : -101.525108   2.5419e-06  -3.0015e-07
 Test -92.760691 = -92.760691
 
 
  TEST alpha(ncats) =   0.75( 4) ; pinv = 0.60
 
 0.084885 0.386197 0.942076 2.586843 
-Branch    0.1 : -98.474386  -1.6774e+00   1.0273e+01
-Branch    0.2 : -98.259351  -3.3812e-01   2.6654e+00
-Branch    0.5 : -98.347365   3.0332e-01   1.4326e-01
-Branch    0.9 : -98.660561   2.9109e-01  -7.3302e-02
-Branch    1.5 : -99.014436   1.8568e-01  -5.7463e-02
-Branch    5.0 : -99.672908   2.9536e-02  -4.3320e-03
-Branch   10.0 : -99.852311   5.9500e-03  -7.1078e-04
-Branch   50.0 : -99.905397   5.6634e-07  -4.6877e-08
-Branch   90.0 : -99.905404   1.4824e-10  -1.2217e-11
+Branch    0.1 : -98.474386  -4.1935e+00   6.4206e+01
+Branch    0.2 : -98.259351  -8.4529e-01   1.6658e+01
+Branch    0.5 : -98.347365   7.5830e-01   8.9536e-01
+Branch    0.9 : -98.660561   7.2773e-01  -4.5814e-01
+Branch    1.5 : -99.014436   4.6421e-01  -3.5914e-01
+Branch    5.0 : -99.672908   7.3839e-02  -2.7075e-02
+Branch   10.0 : -99.852311   1.4875e-02  -4.4424e-03
+Branch   50.0 : -99.905397   1.4159e-06  -2.9298e-07
+Branch   90.0 : -99.905404   3.7060e-10  -7.6359e-11
 Test -98.474386 = -98.474386
-Branch(Tip)    0.1 : -97.098569   2.2210e+00   4.6503e+00
-Branch(Tip)    0.2 : -97.721972   2.5712e+00  -3.3244e-01
-Branch(Tip)    0.5 : -99.393368   1.8444e+00  -9.4961e-01
-Branch(Tip)    0.9 : -100.845369   1.1323e+00  -5.1545e-01
-Branch(Tip)    1.5 : -102.101229   6.1365e-01  -2.2420e-01
-Branch(Tip)    5.0 : -104.159024   9.3379e-02  -1.2589e-02
-Branch(Tip)   10.0 : -104.757728   2.1540e-02  -2.3692e-03
-Branch(Tip)   50.0 : -104.965128   2.6727e-06  -2.2115e-07
-Branch(Tip)   90.0 : -104.965161   6.9977e-10  -5.7672e-11
+Branch(Tip)    0.1 : -97.098569   5.5526e+00   2.9064e+01
+Branch(Tip)    0.2 : -97.721972   6.4281e+00  -2.0778e+00
+Branch(Tip)    0.5 : -99.393368   4.6110e+00  -5.9351e+00
+Branch(Tip)    0.9 : -100.845369   2.8307e+00  -3.2215e+00
+Branch(Tip)    1.5 : -102.101229   1.5341e+00  -1.4012e+00
+Branch(Tip)    5.0 : -104.159024   2.3345e-01  -7.8683e-02
+Branch(Tip)   10.0 : -104.757728   5.3851e-02  -1.4808e-02
+Branch(Tip)   50.0 : -104.965128   6.6817e-06  -1.3822e-06
+Branch(Tip)   90.0 : -104.965161   1.7494e-09  -3.6045e-10
 Test -97.721972 = -97.721972
 
 
  TEST alpha(ncats) =   0.75( 4) ; pinv = 0.90
 
 0.084885 0.386197 0.942076 2.586843 
-Branch    0.1 : -115.786465  -2.5493e-01   3.8654e-01
-Branch    0.2 : -115.659268  -4.2987e-02   1.1036e-01
-Branch    0.5 : -115.762508   6.7565e-02   7.4031e-03
-Branch    0.9 : -116.047067   6.8294e-02  -3.1860e-03
-Branch    1.5 : -116.389048   4.5380e-02  -3.6885e-03
-Branch    5.0 : -116.874129   1.9117e-03  -1.6812e-04
-Branch   10.0 : -116.896027   2.7969e-05  -2.3175e-06
-Branch   50.0 : -116.896366  -4.2990e-15  -1.1026e-20
-Branch   90.0 : -116.896366  -4.2991e-15  -1.2216e-30
+Branch    0.1 : -115.786465  -2.5493e+00   3.8654e+01
+Branch    0.2 : -115.659268  -4.2987e-01   1.1036e+01
+Branch    0.5 : -115.762508   6.7565e-01   7.4031e-01
+Branch    0.9 : -116.047067   6.8294e-01  -3.1860e-01
+Branch    1.5 : -116.389048   4.5380e-01  -3.6885e-01
+Branch    5.0 : -116.874129   1.9117e-02  -1.6812e-02
+Branch   10.0 : -116.896027   2.7969e-04  -2.3175e-04
+Branch   50.0 : -116.896366  -4.2990e-14  -1.1026e-18
+Branch   90.0 : -116.896366  -4.2991e-14  -1.2216e-28
 Test -115.786465 = -115.786465
-Branch(Tip)    0.1 : -114.157974   1.0234e+00  -3.1839e-01
-Branch(Tip)    0.2 : -115.041203   7.6162e-01  -2.0866e-01
-Branch(Tip)    0.5 : -116.685750   4.0385e-01  -6.4910e-02
-Branch(Tip)    0.9 : -117.931413   2.4388e-01  -2.5550e-02
-Branch(Tip)    1.5 : -119.035029   1.3591e-01  -1.3021e-02
-Branch(Tip)    5.0 : -120.363876   4.2518e-03  -4.0060e-04
-Branch(Tip)   10.0 : -120.410204   5.4068e-05  -4.5214e-06
-Branch(Tip)   50.0 : -120.410854  -4.6688e-15  -2.0982e-20
-Branch(Tip)   90.0 : -120.410854  -4.6690e-15  -1.3310e-30
+Branch(Tip)    0.1 : -114.157974   1.0234e+01  -3.1839e+01
+Branch(Tip)    0.2 : -115.041203   7.6162e+00  -2.0866e+01
+Branch(Tip)    0.5 : -116.685750   4.0385e+00  -6.4910e+00
+Branch(Tip)    0.9 : -117.931413   2.4388e+00  -2.5550e+00
+Branch(Tip)    1.5 : -119.035029   1.3591e+00  -1.3021e+00
+Branch(Tip)    5.0 : -120.363876   4.2518e-02  -4.0060e-02
+Branch(Tip)   10.0 : -120.410204   5.4068e-04  -4.5214e-04
+Branch(Tip)   50.0 : -120.410854  -4.6688e-14  -2.0982e-18
+Branch(Tip)   90.0 : -120.410854  -4.6690e-14  -1.3310e-28
 Test -115.041203 = -115.041203
 
 
@@ -831,75 +831,75 @@ Test -90.173022 = -90.173022
  TEST alpha(ncats) =   1.50( 4) ; pinv = 0.30
 
 0.225323 0.588556 1.050422 2.135699 
-Branch    0.1 : -92.546093  -3.2006e+00   3.6767e+01
-Branch    0.2 : -92.327350  -4.6038e-01   9.6686e+00
-Branch    0.5 : -92.544446   9.1482e-01   5.8345e-01
-Branch    0.9 : -93.080197   8.8213e-01  -3.2847e-01
-Branch    1.5 : -93.709849   5.9469e-01  -2.9223e-01
-Branch    5.0 : -94.887639   7.4187e-02  -2.6160e-02
-Branch   10.0 : -95.092199   8.1277e-03  -2.2446e-03
-Branch   50.0 : -95.123968   2.0040e-08  -4.3843e-09
-Branch   90.0 : -95.123968   6.8890e-14  -1.6326e-14
+Branch    0.1 : -92.546093  -4.5722e+00   7.5035e+01
+Branch    0.2 : -92.327350  -6.5768e-01   1.9732e+01
+Branch    0.5 : -92.544446   1.3069e+00   1.1907e+00
+Branch    0.9 : -93.080197   1.2602e+00  -6.7034e-01
+Branch    1.5 : -93.709849   8.4956e-01  -5.9638e-01
+Branch    5.0 : -94.887639   1.0598e-01  -5.3387e-02
+Branch   10.0 : -95.092199   1.1611e-02  -4.5809e-03
+Branch   50.0 : -95.123968   2.8628e-08  -8.9476e-09
+Branch   90.0 : -95.123968   9.8415e-14  -3.3318e-14
 Test -92.546093 = -92.546093
-Branch(Tip)    0.1 : -91.581907   1.2078e-01   4.0932e+01
-Branch(Tip)    0.2 : -91.864872   3.1311e+00   9.4494e+00
-Branch(Tip)    0.5 : -93.465289   3.6613e+00  -1.7125e+00
-Branch(Tip)    0.9 : -95.247845   2.5922e+00  -1.6806e+00
-Branch(Tip)    1.5 : -96.961250   1.5187e+00  -8.9487e-01
-Branch(Tip)    5.0 : -99.769212   1.7225e-01  -5.9223e-02
-Branch(Tip)   10.0 : -100.254776   1.9944e-02  -5.4498e-03
-Branch(Tip)   50.0 : -100.332720   4.7471e-08  -1.0386e-08
-Branch(Tip)   90.0 : -100.332721   1.7075e-13  -3.8669e-14
+Branch(Tip)    0.1 : -91.581907   1.7255e-01   8.3535e+01
+Branch(Tip)    0.2 : -91.864872   4.4730e+00   1.9285e+01
+Branch(Tip)    0.5 : -93.465289   5.2305e+00  -3.4949e+00
+Branch(Tip)    0.9 : -95.247845   3.7031e+00  -3.4297e+00
+Branch(Tip)    1.5 : -96.961250   2.1695e+00  -1.8263e+00
+Branch(Tip)    5.0 : -99.769212   2.4608e-01  -1.2086e-01
+Branch(Tip)   10.0 : -100.254776   2.8491e-02  -1.1122e-02
+Branch(Tip)   50.0 : -100.332720   6.7815e-08  -2.1196e-08
+Branch(Tip)   90.0 : -100.332721   2.4393e-13  -7.8917e-14
 Test -91.864872 = -91.864872
 
 
  TEST alpha(ncats) =   1.50( 4) ; pinv = 0.60
 
 0.225323 0.588556 1.050422 2.135699 
-Branch    0.1 : -97.428303  -1.3430e+00   9.7465e+00
-Branch    0.2 : -97.286506  -7.3629e-02   2.4919e+00
-Branch    0.5 : -97.534836   4.7438e-01   4.5185e-02
-Branch    0.9 : -97.978350   3.8798e-01  -1.2755e-01
-Branch    1.5 : -98.430575   2.2715e-01  -8.2243e-02
-Branch    5.0 : -99.067709   1.4392e-02  -3.9751e-03
-Branch   10.0 : -99.120980   6.6075e-04  -1.5118e-04
-Branch   50.0 : -99.123919   1.8967e-13  -4.2573e-14
-Branch   90.0 : -99.123919  -4.9441e-15  -1.3444e-23
+Branch    0.1 : -97.428303  -3.3576e+00   6.0916e+01
+Branch    0.2 : -97.286506  -1.8407e-01   1.5574e+01
+Branch    0.5 : -97.534836   1.1860e+00   2.8240e-01
+Branch    0.9 : -97.978350   9.6994e-01  -7.9721e-01
+Branch    1.5 : -98.430575   5.6788e-01  -5.1402e-01
+Branch    5.0 : -99.067709   3.5980e-02  -2.4845e-02
+Branch   10.0 : -99.120980   1.6519e-03  -9.4486e-04
+Branch   50.0 : -99.123919   4.7416e-13  -2.6608e-13
+Branch   90.0 : -99.123919  -1.2360e-14  -8.4023e-23
 Test -97.428303 = -97.428303
-Branch(Tip)    0.1 : -95.917608   2.1589e+00   7.1556e+00
-Branch(Tip)    0.2 : -96.578964   2.8638e+00   3.5721e-01
-Branch(Tip)    0.5 : -98.518204   2.1722e+00  -1.1278e+00
-Branch(Tip)    0.9 : -100.212718   1.3008e+00  -6.3633e-01
-Branch(Tip)    1.5 : -101.620648   6.6590e-01  -2.7178e-01
-Branch(Tip)    5.0 : -103.420611   3.9895e-02  -1.1222e-02
-Branch(Tip)   10.0 : -103.564757   1.6722e-03  -3.9197e-04
-Branch(Tip)   50.0 : -103.572066   4.6251e-13  -1.0232e-13
-Branch(Tip)   90.0 : -103.572066  -5.2377e-15  -3.2312e-23
+Branch(Tip)    0.1 : -95.917608   5.3972e+00   4.4723e+01
+Branch(Tip)    0.2 : -96.578964   7.1594e+00   2.2326e+00
+Branch(Tip)    0.5 : -98.518204   5.4304e+00  -7.0486e+00
+Branch(Tip)    0.9 : -100.212718   3.2521e+00  -3.9771e+00
+Branch(Tip)    1.5 : -101.620648   1.6648e+00  -1.6986e+00
+Branch(Tip)    5.0 : -103.420611   9.9738e-02  -7.0137e-02
+Branch(Tip)   10.0 : -103.564757   4.1804e-03  -2.4498e-03
+Branch(Tip)   50.0 : -103.572066   1.1563e-12  -6.3953e-13
+Branch(Tip)   90.0 : -103.572066  -1.3094e-14  -2.0195e-22
 Test -96.578964 = -96.578964
 
 
  TEST alpha(ncats) =   1.50( 4) ; pinv = 0.90
 
 0.225323 0.588556 1.050422 2.135699 
-Branch    0.1 : -117.149120   1.4694e-01   1.0377e-01
-Branch    0.2 : -117.324824   1.8823e-01   2.5114e-03
-Branch    0.5 : -117.807516   1.2272e-01  -2.5732e-02
-Branch    0.9 : -118.131501   4.8918e-02  -1.1708e-02
-Branch    1.5 : -118.287175   1.1679e-02  -2.7506e-03
-Branch    5.0 : -118.337857   4.7718e-06  -1.0449e-06
-Branch   10.0 : -118.337879   8.4657e-11  -1.8521e-11
-Branch   50.0 : -118.337879  -4.2348e-15  -7.2648e-31
-Branch   90.0 : -118.337879  -4.2348e-15  -7.2648e-31
+Branch    0.1 : -117.149120   1.4694e+00   1.0377e+01
+Branch    0.2 : -117.324824   1.8823e+00   2.5114e-01
+Branch    0.5 : -117.807516   1.2272e+00  -2.5732e+00
+Branch    0.9 : -118.131501   4.8918e-01  -1.1708e+00
+Branch    1.5 : -118.287175   1.1679e-01  -2.7506e-01
+Branch    5.0 : -118.337857   4.7718e-05  -1.0449e-04
+Branch   10.0 : -118.337879   8.4657e-10  -1.8521e-09
+Branch   50.0 : -118.337879  -4.2348e-14  -7.2648e-29
+Branch   90.0 : -118.337879  -4.2348e-14  -7.2648e-29
 Test -117.149120 = -117.149120
-Branch(Tip)    0.1 : -114.840581   1.5070e+00  -5.1009e-01
-Branch(Tip)    0.2 : -116.123450   1.0880e+00  -3.3676e-01
-Branch(Tip)    0.5 : -118.310082   4.7106e-01  -1.2449e-01
-Branch(Tip)    0.9 : -119.473579   1.6330e-01  -4.3613e-02
-Branch(Tip)    1.5 : -119.962685   3.3422e-02  -8.6241e-03
-Branch(Tip)    5.0 : -120.097835   1.0984e-05  -2.4091e-06
-Branch(Tip)   10.0 : -120.097885   1.9435e-10  -4.2517e-11
-Branch(Tip)   50.0 : -120.097885  -4.4787e-15  -7.6139e-31
-Branch(Tip)   90.0 : -120.097885  -4.4787e-15  -7.6139e-31
+Branch(Tip)    0.1 : -114.840581   1.5070e+01  -5.1009e+01
+Branch(Tip)    0.2 : -116.123450   1.0880e+01  -3.3676e+01
+Branch(Tip)    0.5 : -118.310082   4.7106e+00  -1.2449e+01
+Branch(Tip)    0.9 : -119.473579   1.6330e+00  -4.3613e+00
+Branch(Tip)    1.5 : -119.962685   3.3422e-01  -8.6241e-01
+Branch(Tip)    5.0 : -120.097835   1.0984e-04  -2.4091e-04
+Branch(Tip)   10.0 : -120.097885   1.9435e-09  -4.2517e-09
+Branch(Tip)   50.0 : -120.097885  -4.4787e-14  -7.6139e-29
+Branch(Tip)   90.0 : -120.097885  -4.4787e-14  -7.6139e-29
 Test -116.123450 = -116.123450
 
 ti/tv:alpha(ncats) =   0.10( 1)   logL:       -120.551659
diff --git a/test/out/odd-states.out b/test/out/odd-states.out
deleted file mode 100644
index 1fcf70f..0000000
--- a/test/out/odd-states.out
+++ /dev/null
@@ -1,1228 +0,0 @@
-Subst params:  0.50000  2.00000  3.00000  4.00000  5.00000  1.10000  1.20000 
-               1.30000  1.40000  1.50000  2.10000  2.20000  2.30000  2.40000 
-               2.50000  3.10000  3.20000  3.30000  3.40000  3.50000  1.00000 
-              
-
-
- TEST alpha(ncats) =   0.10( 1)
-
-Rates:  1.00000 
-[0] P-matrix for branch length 0.100000
-+0.8844   +0.0046   +0.0151   +0.0187   +0.0333   +0.0358   +0.0081   
-+0.0039   +0.9403   +0.0092   +0.0084   +0.0123   +0.0113   +0.0145   
-+0.0139   +0.0100   +0.9075   +0.0139   +0.0198   +0.0178   +0.0171   
-+0.0204   +0.0107   +0.0165   +0.8807   +0.0262   +0.0234   +0.0222   
-+0.0266   +0.0115   +0.0172   +0.0192   +0.8774   +0.0247   +0.0234   
-+0.0331   +0.0122   +0.0178   +0.0198   +0.0286   +0.8812   +0.0075   
-+0.0081   +0.0169   +0.0185   +0.0203   +0.0292   +0.0081   +0.8987   
-
-
-[0] P-matrix for branch length 0.200000
-+0.7850   +0.0097   +0.0288   +0.0347   +0.0608   +0.0649   +0.0163   
-+0.0083   +0.8849   +0.0180   +0.0163   +0.0236   +0.0215   +0.0274   
-+0.0265   +0.0193   +0.8250   +0.0263   +0.0373   +0.0334   +0.0321   
-+0.0379   +0.0208   +0.0311   +0.7777   +0.0485   +0.0431   +0.0409   
-+0.0486   +0.0221   +0.0323   +0.0356   +0.7731   +0.0455   +0.0428   
-+0.0599   +0.0231   +0.0334   +0.0365   +0.0525   +0.7793   +0.0152   
-+0.0163   +0.0320   +0.0347   +0.0375   +0.0535   +0.0165   +0.8095   
-
-
-[0] P-matrix for branch length 1.000000
-+0.3514   +0.0553   +0.0992   +0.1027   +0.1595   +0.1600   +0.0719   
-+0.0474   +0.5627   +0.0712   +0.0629   +0.0881   +0.0765   +0.0911   
-+0.0915   +0.0767   +0.4179   +0.0869   +0.1206   +0.1059   +0.1003   
-+0.1120   +0.0801   +0.1027   +0.3281   +0.1401   +0.1227   +0.1143   
-+0.1276   +0.0822   +0.1046   +0.1028   +0.3403   +0.1267   +0.1158   
-+0.1477   +0.0824   +0.1059   +0.1038   +0.1462   +0.3436   +0.0704   
-+0.0719   +0.1063   +0.1087   +0.1048   +0.1448   +0.0763   +0.3873   
-
-
-[0] P-matrix for branch length 1.000000
-+0.3514   +0.0553   +0.0992   +0.1027   +0.1595   +0.1600   +0.0719   
-+0.0474   +0.5627   +0.0712   +0.0629   +0.0881   +0.0765   +0.0911   
-+0.0915   +0.0767   +0.4179   +0.0869   +0.1206   +0.1059   +0.1003   
-+0.1120   +0.0801   +0.1027   +0.3281   +0.1401   +0.1227   +0.1143   
-+0.1276   +0.0822   +0.1046   +0.1028   +0.3403   +0.1267   +0.1158   
-+0.1477   +0.0824   +0.1059   +0.1038   +0.1462   +0.3436   +0.0704   
-+0.0719   +0.1063   +0.1087   +0.1048   +0.1448   +0.0763   +0.3873   
-
-
-[0] CLV 5: [ {(0.00028,0.01589,0.01595,0.00065,0.00071,0.00077,0.00111)} {(0.61615,0.00007,0.00070,0.00144,0.00236,0.00359,0.00026)} {(0.02257,0.00015,0.02190,0.00118,0.00157,0.00200,0.00056)} {(0.00083,0.00032,0.68061,0.00097,0.00104,0.00112,0.00121)} {(0.02726,0.00013,0.00070,0.02946,0.00173,0.00219,0.00061)} {(0.00028,0.01589,0.01595,0.00065,0.00071,0.00077,0.00111)} {(0.00421,0.00046,0.00112,0.00186,0.00207,0.60730,0.00027)} {(0.00083,0.00032,0.68061,0.00097,0.00104,0.00112,0.00121)} [...]
-[0] CLV 6: [ {(0.00050,0.00013,0.00039,0.00004,0.00006,0.00007,0.00003)} {(0.03537,0.00006,0.00031,0.00060,0.00085,0.01842,0.00009)} {(0.02011,0.00048,0.01963,0.00188,0.00234,0.00293,0.00023)} {(0.00032,0.00012,0.50961,0.00038,0.00041,0.00044,0.00048)} {(0.02441,0.00053,0.00146,0.02554,0.00277,0.00342,0.00028)} {(0.00002,0.00027,0.01212,0.00003,0.00004,0.00004,0.00006)} {(0.00166,0.00016,0.00040,0.00069,0.00078,0.41723,0.00009)} {(0.00032,0.00012,0.50961,0.00038,0.00041,0.00044,0.00048)} [...]
-[0] CLV 7: [ {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0042,0.0005,0.0011,0.0019,0.0021,0.6073,0.0003)} {(0.0273,0.0001,0.0007,0.0295,0.0017,0.0022,0.0006)} {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0006,0.0209,0.0007,0.0010,0.0170,0.0012,0.0017)} {(0.0021,0.0004,0.0010,0.0377,0.0275,0.0019,0.0020)} {(0.0042,0.0005,0.0011,0.0019,0.0021,0.6073,0.0003)} {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0226,0.0001,0.0219,0.0012,0.0016,0.0020,0.0006)} {( [...]
-
-
- TEST alpha(ncats) =   1.25( 1)
-
-Rates:  1.00000 
-[1] P-matrix for branch length 0.100000
-+0.8844   +0.0046   +0.0151   +0.0187   +0.0333   +0.0358   +0.0081   
-+0.0039   +0.9403   +0.0092   +0.0084   +0.0123   +0.0113   +0.0145   
-+0.0139   +0.0100   +0.9075   +0.0139   +0.0198   +0.0178   +0.0171   
-+0.0204   +0.0107   +0.0165   +0.8807   +0.0262   +0.0234   +0.0222   
-+0.0266   +0.0115   +0.0172   +0.0192   +0.8774   +0.0247   +0.0234   
-+0.0331   +0.0122   +0.0178   +0.0198   +0.0286   +0.8812   +0.0075   
-+0.0081   +0.0169   +0.0185   +0.0203   +0.0292   +0.0081   +0.8987   
-
-
-[1] P-matrix for branch length 0.200000
-+0.7850   +0.0097   +0.0288   +0.0347   +0.0608   +0.0649   +0.0163   
-+0.0083   +0.8849   +0.0180   +0.0163   +0.0236   +0.0215   +0.0274   
-+0.0265   +0.0193   +0.8250   +0.0263   +0.0373   +0.0334   +0.0321   
-+0.0379   +0.0208   +0.0311   +0.7777   +0.0485   +0.0431   +0.0409   
-+0.0486   +0.0221   +0.0323   +0.0356   +0.7731   +0.0455   +0.0428   
-+0.0599   +0.0231   +0.0334   +0.0365   +0.0525   +0.7793   +0.0152   
-+0.0163   +0.0320   +0.0347   +0.0375   +0.0535   +0.0165   +0.8095   
-
-
-[1] P-matrix for branch length 1.000000
-+0.3514   +0.0553   +0.0992   +0.1027   +0.1595   +0.1600   +0.0719   
-+0.0474   +0.5627   +0.0712   +0.0629   +0.0881   +0.0765   +0.0911   
-+0.0915   +0.0767   +0.4179   +0.0869   +0.1206   +0.1059   +0.1003   
-+0.1120   +0.0801   +0.1027   +0.3281   +0.1401   +0.1227   +0.1143   
-+0.1276   +0.0822   +0.1046   +0.1028   +0.3403   +0.1267   +0.1158   
-+0.1477   +0.0824   +0.1059   +0.1038   +0.1462   +0.3436   +0.0704   
-+0.0719   +0.1063   +0.1087   +0.1048   +0.1448   +0.0763   +0.3873   
-
-
-[1] P-matrix for branch length 1.000000
-+0.3514   +0.0553   +0.0992   +0.1027   +0.1595   +0.1600   +0.0719   
-+0.0474   +0.5627   +0.0712   +0.0629   +0.0881   +0.0765   +0.0911   
-+0.0915   +0.0767   +0.4179   +0.0869   +0.1206   +0.1059   +0.1003   
-+0.1120   +0.0801   +0.1027   +0.3281   +0.1401   +0.1227   +0.1143   
-+0.1276   +0.0822   +0.1046   +0.1028   +0.3403   +0.1267   +0.1158   
-+0.1477   +0.0824   +0.1059   +0.1038   +0.1462   +0.3436   +0.0704   
-+0.0719   +0.1063   +0.1087   +0.1048   +0.1448   +0.0763   +0.3873   
-
-
-[1] CLV 5: [ {(0.00028,0.01589,0.01595,0.00065,0.00071,0.00077,0.00111)} {(0.61615,0.00007,0.00070,0.00144,0.00236,0.00359,0.00026)} {(0.02257,0.00015,0.02190,0.00118,0.00157,0.00200,0.00056)} {(0.00083,0.00032,0.68061,0.00097,0.00104,0.00112,0.00121)} {(0.02726,0.00013,0.00070,0.02946,0.00173,0.00219,0.00061)} {(0.00028,0.01589,0.01595,0.00065,0.00071,0.00077,0.00111)} {(0.00421,0.00046,0.00112,0.00186,0.00207,0.60730,0.00027)} {(0.00083,0.00032,0.68061,0.00097,0.00104,0.00112,0.00121)} [...]
-[1] CLV 6: [ {(0.00050,0.00013,0.00039,0.00004,0.00006,0.00007,0.00003)} {(0.03537,0.00006,0.00031,0.00060,0.00085,0.01842,0.00009)} {(0.02011,0.00048,0.01963,0.00188,0.00234,0.00293,0.00023)} {(0.00032,0.00012,0.50961,0.00038,0.00041,0.00044,0.00048)} {(0.02441,0.00053,0.00146,0.02554,0.00277,0.00342,0.00028)} {(0.00002,0.00027,0.01212,0.00003,0.00004,0.00004,0.00006)} {(0.00166,0.00016,0.00040,0.00069,0.00078,0.41723,0.00009)} {(0.00032,0.00012,0.50961,0.00038,0.00041,0.00044,0.00048)} [...]
-[1] CLV 7: [ {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0042,0.0005,0.0011,0.0019,0.0021,0.6073,0.0003)} {(0.0273,0.0001,0.0007,0.0295,0.0017,0.0022,0.0006)} {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0006,0.0209,0.0007,0.0010,0.0170,0.0012,0.0017)} {(0.0021,0.0004,0.0010,0.0377,0.0275,0.0019,0.0020)} {(0.0042,0.0005,0.0011,0.0019,0.0021,0.6073,0.0003)} {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0226,0.0001,0.0219,0.0012,0.0016,0.0020,0.0006)} {( [...]
-
-
- TEST alpha(ncats) = 100.00( 1)
-
-Rates:  1.00000 
-[2] P-matrix for branch length 0.100000
-+0.8844   +0.0046   +0.0151   +0.0187   +0.0333   +0.0358   +0.0081   
-+0.0039   +0.9403   +0.0092   +0.0084   +0.0123   +0.0113   +0.0145   
-+0.0139   +0.0100   +0.9075   +0.0139   +0.0198   +0.0178   +0.0171   
-+0.0204   +0.0107   +0.0165   +0.8807   +0.0262   +0.0234   +0.0222   
-+0.0266   +0.0115   +0.0172   +0.0192   +0.8774   +0.0247   +0.0234   
-+0.0331   +0.0122   +0.0178   +0.0198   +0.0286   +0.8812   +0.0075   
-+0.0081   +0.0169   +0.0185   +0.0203   +0.0292   +0.0081   +0.8987   
-
-
-[2] P-matrix for branch length 0.200000
-+0.7850   +0.0097   +0.0288   +0.0347   +0.0608   +0.0649   +0.0163   
-+0.0083   +0.8849   +0.0180   +0.0163   +0.0236   +0.0215   +0.0274   
-+0.0265   +0.0193   +0.8250   +0.0263   +0.0373   +0.0334   +0.0321   
-+0.0379   +0.0208   +0.0311   +0.7777   +0.0485   +0.0431   +0.0409   
-+0.0486   +0.0221   +0.0323   +0.0356   +0.7731   +0.0455   +0.0428   
-+0.0599   +0.0231   +0.0334   +0.0365   +0.0525   +0.7793   +0.0152   
-+0.0163   +0.0320   +0.0347   +0.0375   +0.0535   +0.0165   +0.8095   
-
-
-[2] P-matrix for branch length 1.000000
-+0.3514   +0.0553   +0.0992   +0.1027   +0.1595   +0.1600   +0.0719   
-+0.0474   +0.5627   +0.0712   +0.0629   +0.0881   +0.0765   +0.0911   
-+0.0915   +0.0767   +0.4179   +0.0869   +0.1206   +0.1059   +0.1003   
-+0.1120   +0.0801   +0.1027   +0.3281   +0.1401   +0.1227   +0.1143   
-+0.1276   +0.0822   +0.1046   +0.1028   +0.3403   +0.1267   +0.1158   
-+0.1477   +0.0824   +0.1059   +0.1038   +0.1462   +0.3436   +0.0704   
-+0.0719   +0.1063   +0.1087   +0.1048   +0.1448   +0.0763   +0.3873   
-
-
-[2] P-matrix for branch length 1.000000
-+0.3514   +0.0553   +0.0992   +0.1027   +0.1595   +0.1600   +0.0719   
-+0.0474   +0.5627   +0.0712   +0.0629   +0.0881   +0.0765   +0.0911   
-+0.0915   +0.0767   +0.4179   +0.0869   +0.1206   +0.1059   +0.1003   
-+0.1120   +0.0801   +0.1027   +0.3281   +0.1401   +0.1227   +0.1143   
-+0.1276   +0.0822   +0.1046   +0.1028   +0.3403   +0.1267   +0.1158   
-+0.1477   +0.0824   +0.1059   +0.1038   +0.1462   +0.3436   +0.0704   
-+0.0719   +0.1063   +0.1087   +0.1048   +0.1448   +0.0763   +0.3873   
-
-
-[2] CLV 5: [ {(0.00028,0.01589,0.01595,0.00065,0.00071,0.00077,0.00111)} {(0.61615,0.00007,0.00070,0.00144,0.00236,0.00359,0.00026)} {(0.02257,0.00015,0.02190,0.00118,0.00157,0.00200,0.00056)} {(0.00083,0.00032,0.68061,0.00097,0.00104,0.00112,0.00121)} {(0.02726,0.00013,0.00070,0.02946,0.00173,0.00219,0.00061)} {(0.00028,0.01589,0.01595,0.00065,0.00071,0.00077,0.00111)} {(0.00421,0.00046,0.00112,0.00186,0.00207,0.60730,0.00027)} {(0.00083,0.00032,0.68061,0.00097,0.00104,0.00112,0.00121)} [...]
-[2] CLV 6: [ {(0.00050,0.00013,0.00039,0.00004,0.00006,0.00007,0.00003)} {(0.03537,0.00006,0.00031,0.00060,0.00085,0.01842,0.00009)} {(0.02011,0.00048,0.01963,0.00188,0.00234,0.00293,0.00023)} {(0.00032,0.00012,0.50961,0.00038,0.00041,0.00044,0.00048)} {(0.02441,0.00053,0.00146,0.02554,0.00277,0.00342,0.00028)} {(0.00002,0.00027,0.01212,0.00003,0.00004,0.00004,0.00006)} {(0.00166,0.00016,0.00040,0.00069,0.00078,0.41723,0.00009)} {(0.00032,0.00012,0.50961,0.00038,0.00041,0.00044,0.00048)} [...]
-[2] CLV 7: [ {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0042,0.0005,0.0011,0.0019,0.0021,0.6073,0.0003)} {(0.0273,0.0001,0.0007,0.0295,0.0017,0.0022,0.0006)} {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0006,0.0209,0.0007,0.0010,0.0170,0.0012,0.0017)} {(0.0021,0.0004,0.0010,0.0377,0.0275,0.0019,0.0020)} {(0.0042,0.0005,0.0011,0.0019,0.0021,0.6073,0.0003)} {(0.0008,0.0003,0.6806,0.0010,0.0010,0.0011,0.0012)} {(0.0226,0.0001,0.0219,0.0012,0.0016,0.0020,0.0006)} {( [...]
-Subst params:  0.50000  2.00000  3.00000  4.00000  5.00000  1.10000  1.20000 
-               1.30000  1.40000  1.50000  2.10000  2.20000  2.30000  2.40000 
-               2.50000  3.10000  3.20000  3.30000  3.40000  3.50000  1.00000 
-              
-
-
- TEST alpha(ncats) =   0.10( 4)
-
-Rates:  0.00000  0.00108  0.09375  3.90517 
-       
-[0] P-matrix for branch length 0.100000
-+1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
-
-+0.9999   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.9999   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.9999   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.9999   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.9999   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.9999   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.9999   
-
-+0.9884   +0.0004   +0.0015   +0.0019   +0.0034   +0.0037   +0.0008   
-+0.0003   +0.9942   +0.0009   +0.0008   +0.0012   +0.0011   +0.0014   
-+0.0014   +0.0010   +0.9909   +0.0014   +0.0020   +0.0018   +0.0017   
-+0.0020   +0.0010   +0.0016   +0.9881   +0.0026   +0.0024   +0.0022   
-+0.0027   +0.0011   +0.0017   +0.0019   +0.9876   +0.0025   +0.0024   
-+0.0034   +0.0012   +0.0018   +0.0020   +0.0029   +0.9881   +0.0007   
-+0.0008   +0.0017   +0.0018   +0.0021   +0.0030   +0.0007   +0.9899   
-
-+0.6320   +0.0202   +0.0512   +0.0593   +0.1003   +0.1056   +0.0314   
-+0.0173   +0.7901   +0.0332   +0.0299   +0.0429   +0.0384   +0.0483   
-+0.0473   +0.0357   +0.6919   +0.0463   +0.0652   +0.0581   +0.0556   
-+0.0647   +0.0381   +0.0547   +0.6189   +0.0822   +0.0727   +0.0686   
-+0.0803   +0.0400   +0.0565   +0.0603   +0.6154   +0.0764   +0.0712   
-+0.0975   +0.0413   +0.0581   +0.0616   +0.0881   +0.6236   +0.0298   
-+0.0314   +0.0563   +0.0602   +0.0629   +0.0890   +0.0323   +0.6679   
-
-
-[0] P-matrix for branch length 0.200000
-+1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
-
-+0.9997   +0.0000   +0.0000   +0.0000   +0.0001   +0.0001   +0.0000   
-+0.0000   +0.9999   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.9998   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.9997   +0.0001   +0.0001   +0.0001   
-+0.0001   +0.0000   +0.0000   +0.0000   +0.9997   +0.0001   +0.0001   
-+0.0001   +0.0000   +0.0000   +0.0000   +0.0001   +0.9997   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0001   +0.0000   +0.9998   
-
-+0.9770   +0.0008   +0.0029   +0.0037   +0.0067   +0.0073   +0.0015   
-+0.0007   +0.9885   +0.0018   +0.0016   +0.0024   +0.0022   +0.0028   
-+0.0027   +0.0019   +0.9818   +0.0027   +0.0039   +0.0035   +0.0034   
-+0.0041   +0.0021   +0.0032   +0.9763   +0.0052   +0.0047   +0.0045   
-+0.0054   +0.0022   +0.0034   +0.0038   +0.9755   +0.0050   +0.0047   
-+0.0067   +0.0024   +0.0035   +0.0040   +0.0057   +0.9763   +0.0014   
-+0.0015   +0.0033   +0.0037   +0.0041   +0.0059   +0.0015   +0.9800   
-
-+0.4253   +0.0430   +0.0854   +0.0916   +0.1463   +0.1493   +0.0590   
-+0.0368   +0.6330   +0.0592   +0.0527   +0.0743   +0.0650   +0.0790   
-+0.0789   +0.0638   +0.4952   +0.0756   +0.1053   +0.0929   +0.0883   
-+0.1000   +0.0670   +0.0893   +0.4044   +0.1257   +0.1104   +0.1033   
-+0.1171   +0.0693   +0.0913   +0.0922   +0.4102   +0.1146   +0.1054   
-+0.1378   +0.0700   +0.0929   +0.0934   +0.1322   +0.4164   +0.0573   
-+0.0590   +0.0922   +0.0957   +0.0947   +0.1317   +0.0621   +0.4647   
-
-
-[0] P-matrix for branch length 1.000000
-+1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
-
-+0.9987   +0.0000   +0.0002   +0.0002   +0.0004   +0.0004   +0.0001   
-+0.0000   +0.9993   +0.0001   +0.0001   +0.0001   +0.0001   +0.0002   
-+0.0002   +0.0001   +0.9989   +0.0002   +0.0002   +0.0002   +0.0002   
-+0.0002   +0.0001   +0.0002   +0.9986   +0.0003   +0.0003   +0.0003   
-+0.0003   +0.0001   +0.0002   +0.0002   +0.9986   +0.0003   +0.0003   
-+0.0004   +0.0001   +0.0002   +0.0002   +0.0003   +0.9986   +0.0001   
-+0.0001   +0.0002   +0.0002   +0.0002   +0.0003   +0.0001   +0.9988   
-
-+0.8911   +0.0043   +0.0142   +0.0176   +0.0314   +0.0338   +0.0076   
-+0.0037   +0.9439   +0.0087   +0.0079   +0.0116   +0.0106   +0.0136   
-+0.0131   +0.0093   +0.9129   +0.0131   +0.0186   +0.0168   +0.0161   
-+0.0192   +0.0101   +0.0155   +0.8876   +0.0247   +0.0220   +0.0209   
-+0.0251   +0.0108   +0.0161   +0.0181   +0.8845   +0.0233   +0.0220   
-+0.0312   +0.0114   +0.0168   +0.0186   +0.0269   +0.8881   +0.0070   
-+0.0076   +0.0159   +0.0175   +0.0192   +0.0276   +0.0076   +0.9047   
-
-+0.1417   +0.1400   +0.1444   +0.1240   +0.1701   +0.1497   +0.1301   
-+0.1200   +0.2057   +0.1352   +0.1151   +0.1571   +0.1351   +0.1318   
-+0.1333   +0.1456   +0.1552   +0.1220   +0.1665   +0.1443   +0.1331   
-+0.1353   +0.1465   +0.1442   +0.1263   +0.1681   +0.1458   +0.1338   
-+0.1360   +0.1466   +0.1443   +0.1233   +0.1700   +0.1461   +0.1336   
-+0.1382   +0.1455   +0.1443   +0.1234   +0.1686   +0.1500   +0.1300   
-+0.1301   +0.1538   +0.1442   +0.1227   +0.1670   +0.1409   +0.1415   
-
-
-[0] P-matrix for branch length 1.000000
-+1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
-
-+0.9987   +0.0000   +0.0002   +0.0002   +0.0004   +0.0004   +0.0001   
-+0.0000   +0.9993   +0.0001   +0.0001   +0.0001   +0.0001   +0.0002   
-+0.0002   +0.0001   +0.9989   +0.0002   +0.0002   +0.0002   +0.0002   
-+0.0002   +0.0001   +0.0002   +0.9986   +0.0003   +0.0003   +0.0003   
-+0.0003   +0.0001   +0.0002   +0.0002   +0.9986   +0.0003   +0.0003   
-+0.0004   +0.0001   +0.0002   +0.0002   +0.0003   +0.9986   +0.0001   
-+0.0001   +0.0002   +0.0002   +0.0002   +0.0003   +0.0001   +0.9988   
-
-+0.8911   +0.0043   +0.0142   +0.0176   +0.0314   +0.0338   +0.0076   
-+0.0037   +0.9439   +0.0087   +0.0079   +0.0116   +0.0106   +0.0136   
-+0.0131   +0.0093   +0.9129   +0.0131   +0.0186   +0.0168   +0.0161   
-+0.0192   +0.0101   +0.0155   +0.8876   +0.0247   +0.0220   +0.0209   
-+0.0251   +0.0108   +0.0161   +0.0181   +0.8845   +0.0233   +0.0220   
-+0.0312   +0.0114   +0.0168   +0.0186   +0.0269   +0.8881   +0.0070   
-+0.0076   +0.0159   +0.0175   +0.0192   +0.0276   +0.0076   +0.9047   
-
-+0.1417   +0.1400   +0.1444   +0.1240   +0.1701   +0.1497   +0.1301   
-+0.1200   +0.2057   +0.1352   +0.1151   +0.1571   +0.1351   +0.1318   
-+0.1333   +0.1456   +0.1552   +0.1220   +0.1665   +0.1443   +0.1331   
-+0.1353   +0.1465   +0.1442   +0.1263   +0.1681   +0.1458   +0.1338   
-+0.1360   +0.1466   +0.1443   +0.1233   +0.1700   +0.1461   +0.1336   
-+0.1382   +0.1455   +0.1443   +0.1234   +0.1686   +0.1500   +0.1300   
-+0.1301   +0.1538   +0.1442   +0.1227   +0.1670   +0.1409   +0.1415   
-
-
-[0] CLV 5: [ {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00002,0.00002,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00175,0.00188,0.00001,0.00001,0.00001,0.00001),(0.00367,0.03749,0.03159,0.00599,0.00633,0.00650,0.00882)} {(1.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.99946,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.95450,0.00000,0.00001,0.00002,0.00003,0.00005,0.00000),(0.18089,0.00136,0.00622,0.01000,0.01371,0.01900,0.00348)} {(0.00000,0 [...]
-[0] CLV 6: [ {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00001,0.00000,0.00001,0.00000,0.00000,0.00000,0.00000),(0.00283,0.00117,0.00197,0.00087,0.00105,0.00124,0.00066)} {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00009,0.00000,0.00000,0.00000,0.00000,0.00004,0.00000),(0.00688,0.00000,0.00000,0.00001,0.00001,0.00321,0.00000),(0.01773,0.00040,0.00145,0.00232,0.00294,0.01325,0.00068)} {(0.00000,0 [...]
-[0] CLV 7: [ {(0.0000,0.0000,1.0000,0.0000,0.0000,0.0000,0.0000),(0.0000,0.0000,0.9996,0.0000,0.0000,0.0000,0.0000),(0.0000,0.0000,0.9640,0.0000,0.0000,0.0000,0.0000),(0.0073,0.0035,0.2453,0.0080,0.0083,0.0086,0.0092)} {(0.0000,0.0000,0.0000,0.0000,0.0000,1.0000,0.0000),(0.0000,0.0000,0.0000,0.0000,0.0000,0.9994,0.0000),(0.0001,0.0000,0.0000,0.0000,0.0000,0.9531,0.0000),(0.0223,0.0042,0.0086,0.0122,0.0131,0.1734,0.0039)} {(0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000),(0.0000,0.0000, [...]
-
-
- TEST alpha(ncats) =   1.25( 4)
-
-Rates:  0.18400  0.54086  1.03161  2.24353 
-       
-[1] P-matrix for branch length 0.100000
-+0.9774   +0.0008   +0.0029   +0.0037   +0.0066   +0.0072   +0.0015   
-+0.0007   +0.9887   +0.0017   +0.0016   +0.0023   +0.0022   +0.0028   
-+0.0027   +0.0019   +0.9822   +0.0027   +0.0038   +0.0035   +0.0033   
-+0.0040   +0.0020   +0.0032   +0.9767   +0.0051   +0.0046   +0.0044   
-+0.0053   +0.0022   +0.0033   +0.0038   +0.9759   +0.0049   +0.0046   
-+0.0066   +0.0023   +0.0035   +0.0039   +0.0056   +0.9767   +0.0014   
-+0.0015   +0.0033   +0.0036   +0.0040   +0.0058   +0.0015   +0.9804   
-
-+0.9353   +0.0024   +0.0083   +0.0105   +0.0188   +0.0203   +0.0044   
-+0.0021   +0.9672   +0.0051   +0.0046   +0.0068   +0.0063   +0.0081   
-+0.0077   +0.0055   +0.9486   +0.0077   +0.0110   +0.0099   +0.0095   
-+0.0114   +0.0059   +0.0091   +0.9333   +0.0147   +0.0131   +0.0125   
-+0.0150   +0.0063   +0.0095   +0.0108   +0.9312   +0.0139   +0.0132   
-+0.0187   +0.0067   +0.0099   +0.0111   +0.0161   +0.9334   +0.0040   
-+0.0044   +0.0094   +0.0103   +0.0114   +0.0165   +0.0043   +0.9436   
-
-+0.8810   +0.0047   +0.0155   +0.0192   +0.0343   +0.0368   +0.0084   
-+0.0041   +0.9385   +0.0095   +0.0087   +0.0127   +0.0116   +0.0149   
-+0.0144   +0.0103   +0.9047   +0.0143   +0.0204   +0.0183   +0.0176   
-+0.0210   +0.0111   +0.0170   +0.8772   +0.0270   +0.0240   +0.0228   
-+0.0274   +0.0118   +0.0177   +0.0198   +0.8738   +0.0255   +0.0241   
-+0.0340   +0.0125   +0.0183   +0.0203   +0.0294   +0.8777   +0.0077   
-+0.0084   +0.0174   +0.0191   +0.0209   +0.0301   +0.0084   +0.8957   
-
-+0.7629   +0.0110   +0.0319   +0.0383   +0.0667   +0.0711   +0.0182   
-+0.0094   +0.8720   +0.0200   +0.0181   +0.0263   +0.0238   +0.0304   
-+0.0294   +0.0215   +0.8063   +0.0291   +0.0412   +0.0369   +0.0354   
-+0.0418   +0.0231   +0.0344   +0.7549   +0.0534   +0.0475   +0.0450   
-+0.0534   +0.0245   +0.0357   +0.0392   +0.7501   +0.0501   +0.0470   
-+0.0656   +0.0257   +0.0369   +0.0402   +0.0578   +0.7568   +0.0171   
-+0.0182   +0.0354   +0.0384   +0.0412   +0.0588   +0.0185   +0.7895   
-
-
-[1] P-matrix for branch length 0.200000
-+0.9554   +0.0016   +0.0057   +0.0072   +0.0130   +0.0140   +0.0030   
-+0.0014   +0.9775   +0.0035   +0.0032   +0.0046   +0.0043   +0.0055   
-+0.0053   +0.0037   +0.9647   +0.0053   +0.0076   +0.0068   +0.0066   
-+0.0079   +0.0040   +0.0063   +0.9540   +0.0101   +0.0091   +0.0086   
-+0.0104   +0.0043   +0.0066   +0.0074   +0.9526   +0.0096   +0.0091   
-+0.0130   +0.0046   +0.0068   +0.0077   +0.0111   +0.9541   +0.0027   
-+0.0030   +0.0065   +0.0071   +0.0079   +0.0114   +0.0029   +0.9612   
-
-+0.8757   +0.0050   +0.0163   +0.0201   +0.0357   +0.0384   +0.0088   
-+0.0043   +0.9356   +0.0100   +0.0091   +0.0133   +0.0122   +0.0156   
-+0.0150   +0.0107   +0.9004   +0.0150   +0.0213   +0.0192   +0.0184   
-+0.0219   +0.0116   +0.0177   +0.8717   +0.0282   +0.0251   +0.0238   
-+0.0286   +0.0124   +0.0185   +0.0206   +0.8682   +0.0266   +0.0251   
-+0.0355   +0.0131   +0.0192   +0.0212   +0.0307   +0.8722   +0.0081   
-+0.0088   +0.0182   +0.0199   +0.0219   +0.0314   +0.0088   +0.8910   
-
-+0.7791   +0.0100   +0.0296   +0.0357   +0.0623   +0.0665   +0.0168   
-+0.0086   +0.8815   +0.0185   +0.0168   +0.0243   +0.0221   +0.0282   
-+0.0273   +0.0199   +0.8201   +0.0271   +0.0383   +0.0344   +0.0330   
-+0.0389   +0.0214   +0.0320   +0.7717   +0.0498   +0.0443   +0.0420   
-+0.0499   +0.0227   +0.0332   +0.0365   +0.7670   +0.0467   +0.0439   
-+0.0614   +0.0238   +0.0344   +0.0375   +0.0539   +0.7734   +0.0157   
-+0.0168   +0.0329   +0.0357   +0.0385   +0.0549   +0.0170   +0.8043   
-
-+0.5932   +0.0236   +0.0573   +0.0654   +0.1097   +0.1149   +0.0358   
-+0.0202   +0.7637   +0.0375   +0.0337   +0.0482   +0.0430   +0.0538   
-+0.0529   +0.0404   +0.6567   +0.0516   +0.0725   +0.0644   +0.0616   
-+0.0714   +0.0429   +0.0610   +0.5787   +0.0906   +0.0801   +0.0754   
-+0.0878   +0.0450   +0.0628   +0.0664   +0.5761   +0.0839   +0.0780   
-+0.1061   +0.0463   +0.0644   +0.0677   +0.0968   +0.5845   +0.0342   
-+0.0358   +0.0627   +0.0667   +0.0691   +0.0975   +0.0371   +0.6310   
-
-
-[1] P-matrix for branch length 1.000000
-+0.7999   +0.0088   +0.0267   +0.0323   +0.0567   +0.0606   +0.0150   
-+0.0076   +0.8935   +0.0166   +0.0151   +0.0219   +0.0199   +0.0255   
-+0.0246   +0.0179   +0.8376   +0.0244   +0.0346   +0.0311   +0.0298   
-+0.0353   +0.0192   +0.0289   +0.7932   +0.0452   +0.0402   +0.0381   
-+0.0454   +0.0204   +0.0300   +0.0331   +0.7887   +0.0425   +0.0399   
-+0.0560   +0.0215   +0.0311   +0.0340   +0.0490   +0.7946   +0.0139   
-+0.0150   +0.0297   +0.0323   +0.0349   +0.0499   +0.0151   +0.8231   
-
-+0.5382   +0.0290   +0.0661   +0.0741   +0.1225   +0.1274   +0.0426   
-+0.0248   +0.7242   +0.0440   +0.0394   +0.0561   +0.0497   +0.0618   
-+0.0610   +0.0474   +0.6056   +0.0592   +0.0830   +0.0736   +0.0702   
-+0.0809   +0.0502   +0.0700   +0.5215   +0.1023   +0.0902   +0.0849   
-+0.0980   +0.0524   +0.0719   +0.0750   +0.5210   +0.0943   +0.0874   
-+0.1176   +0.0536   +0.0736   +0.0764   +0.1088   +0.5291   +0.0410   
-+0.0426   +0.0721   +0.0761   +0.0778   +0.1093   +0.0444   +0.5778   
-
-+0.3425   +0.0570   +0.1009   +0.1040   +0.1609   +0.1610   +0.0736   
-+0.0489   +0.5535   +0.0728   +0.0643   +0.0899   +0.0780   +0.0926   
-+0.0931   +0.0784   +0.4083   +0.0883   +0.1225   +0.1075   +0.1018   
-+0.1134   +0.0818   +0.1044   +0.3189   +0.1418   +0.1241   +0.1156   
-+0.1288   +0.0839   +0.1062   +0.1040   +0.3320   +0.1281   +0.1170   
-+0.1486   +0.0840   +0.1075   +0.1050   +0.1478   +0.3349   +0.0721   
-+0.0736   +0.1080   +0.1102   +0.1059   +0.1463   +0.0782   +0.3778   
-
-+0.1804   +0.1083   +0.1359   +0.1236   +0.1751   +0.1619   +0.1147   
-+0.0928   +0.3212   +0.1140   +0.0983   +0.1350   +0.1155   +0.1231   
-+0.1254   +0.1228   +0.2118   +0.1157   +0.1585   +0.1377   +0.1281   
-+0.1349   +0.1251   +0.1367   +0.1579   +0.1670   +0.1451   +0.1333   
-+0.1401   +0.1260   +0.1374   +0.1225   +0.1943   +0.1467   +0.1329   
-+0.1495   +0.1244   +0.1377   +0.1227   +0.1693   +0.1821   +0.1143   
-+0.1147   +0.1437   +0.1388   +0.1222   +0.1662   +0.1238   +0.1907   
-
-
-[1] P-matrix for branch length 1.000000
-+0.7999   +0.0088   +0.0267   +0.0323   +0.0567   +0.0606   +0.0150   
-+0.0076   +0.8935   +0.0166   +0.0151   +0.0219   +0.0199   +0.0255   
-+0.0246   +0.0179   +0.8376   +0.0244   +0.0346   +0.0311   +0.0298   
-+0.0353   +0.0192   +0.0289   +0.7932   +0.0452   +0.0402   +0.0381   
-+0.0454   +0.0204   +0.0300   +0.0331   +0.7887   +0.0425   +0.0399   
-+0.0560   +0.0215   +0.0311   +0.0340   +0.0490   +0.7946   +0.0139   
-+0.0150   +0.0297   +0.0323   +0.0349   +0.0499   +0.0151   +0.8231   
-
-+0.5382   +0.0290   +0.0661   +0.0741   +0.1225   +0.1274   +0.0426   
-+0.0248   +0.7242   +0.0440   +0.0394   +0.0561   +0.0497   +0.0618   
-+0.0610   +0.0474   +0.6056   +0.0592   +0.0830   +0.0736   +0.0702   
-+0.0809   +0.0502   +0.0700   +0.5215   +0.1023   +0.0902   +0.0849   
-+0.0980   +0.0524   +0.0719   +0.0750   +0.5210   +0.0943   +0.0874   
-+0.1176   +0.0536   +0.0736   +0.0764   +0.1088   +0.5291   +0.0410   
-+0.0426   +0.0721   +0.0761   +0.0778   +0.1093   +0.0444   +0.5778   
-
-+0.3425   +0.0570   +0.1009   +0.1040   +0.1609   +0.1610   +0.0736   
-+0.0489   +0.5535   +0.0728   +0.0643   +0.0899   +0.0780   +0.0926   
-+0.0931   +0.0784   +0.4083   +0.0883   +0.1225   +0.1075   +0.1018   
-+0.1134   +0.0818   +0.1044   +0.3189   +0.1418   +0.1241   +0.1156   
-+0.1288   +0.0839   +0.1062   +0.1040   +0.3320   +0.1281   +0.1170   
-+0.1486   +0.0840   +0.1075   +0.1050   +0.1478   +0.3349   +0.0721   
-+0.0736   +0.1080   +0.1102   +0.1059   +0.1463   +0.0782   +0.3778   
-
-+0.1804   +0.1083   +0.1359   +0.1236   +0.1751   +0.1619   +0.1147   
-+0.0928   +0.3212   +0.1140   +0.0983   +0.1350   +0.1155   +0.1231   
-+0.1254   +0.1228   +0.2118   +0.1157   +0.1585   +0.1377   +0.1281   
-+0.1349   +0.1251   +0.1367   +0.1579   +0.1670   +0.1451   +0.1333   
-+0.1401   +0.1260   +0.1374   +0.1225   +0.1943   +0.1467   +0.1329   
-+0.1495   +0.1244   +0.1377   +0.1227   +0.1693   +0.1821   +0.1143   
-+0.1147   +0.1437   +0.1388   +0.1222   +0.1662   +0.1238   +0.1907   
-
-
-[1] CLV 5: [ {(0.00001,0.00339,0.00360,0.00003,0.00003,0.00003,0.00005),(0.00008,0.00933,0.00967,0.00021,0.00023,0.00025,0.00036),(0.00030,0.01630,0.01633,0.00068,0.00075,0.00082,0.00117),(0.00135,0.02862,0.02650,0.00261,0.00282,0.00298,0.00419)} {(0.91285,0.00000,0.00003,0.00006,0.00011,0.00017,0.00001),(0.76689,0.00002,0.00023,0.00048,0.00082,0.00126,0.00008),(0.60707,0.00007,0.00075,0.00151,0.00249,0.00377,0.00028),(0.35189,0.00041,0.00279,0.00510,0.00771,0.01126,0.00128)} {(0.00547,0 [...]
-[1] CLV 6: [ {(0.00002,0.00000,0.00002,0.00000,0.00000,0.00000,0.00000),(0.00017,0.00004,0.00014,0.00001,0.00001,0.00001,0.00000),(0.00052,0.00013,0.00041,0.00004,0.00006,0.00008,0.00003),(0.00164,0.00052,0.00119,0.00029,0.00038,0.00047,0.00020)} {(0.01253,0.00000,0.00002,0.00003,0.00005,0.00591,0.00000),(0.02757,0.00002,0.00012,0.00023,0.00033,0.01357,0.00003),(0.03560,0.00006,0.00033,0.00063,0.00089,0.01861,0.00009),(0.03104,0.00019,0.00087,0.00157,0.00214,0.01893,0.00031)} {(0.00535,0 [...]
-[1] CLV 7: [ {(0.0000,0.0000,0.9306,0.0000,0.0000,0.0000,0.0001),(0.0003,0.0001,0.8106,0.0003,0.0003,0.0004,0.0004),(0.0009,0.0003,0.6725,0.0010,0.0011,0.0012,0.0013),(0.0033,0.0014,0.4313,0.0037,0.0039,0.0042,0.0045)} {(0.0002,0.0000,0.0000,0.0001,0.0001,0.9103,0.0000),(0.0015,0.0001,0.0004,0.0006,0.0007,0.7608,0.0001),(0.0044,0.0005,0.0012,0.0020,0.0022,0.5981,0.0003),(0.0132,0.0018,0.0042,0.0064,0.0070,0.3416,0.0014)} {(0.0069,0.0000,0.0000,0.0075,0.0001,0.0001,0.0000),(0.0176,0.0000, [...]
-
-
- TEST alpha(ncats) = 100.00( 4)
-
-Rates:  0.87591  0.96474  1.02955  1.12981 
-       
-[2] P-matrix for branch length 0.100000
-+0.8978   +0.0040   +0.0133   +0.0165   +0.0295   +0.0318   +0.0071   
-+0.0034   +0.9475   +0.0081   +0.0074   +0.0108   +0.0100   +0.0128   
-+0.0123   +0.0087   +0.9184   +0.0123   +0.0175   +0.0157   +0.0151   
-+0.0180   +0.0094   +0.0145   +0.8945   +0.0232   +0.0207   +0.0196   
-+0.0236   +0.0101   +0.0151   +0.0170   +0.8916   +0.0219   +0.0207   
-+0.0293   +0.0107   +0.0157   +0.0175   +0.0253   +0.8949   +0.0065   
-+0.0071   +0.0149   +0.0164   +0.0180   +0.0259   +0.0071   +0.9106   
-
-+0.8882   +0.0044   +0.0146   +0.0181   +0.0322   +0.0347   +0.0078   
-+0.0038   +0.9423   +0.0089   +0.0081   +0.0119   +0.0109   +0.0140   
-+0.0135   +0.0096   +0.9105   +0.0135   +0.0191   +0.0172   +0.0165   
-+0.0197   +0.0104   +0.0159   +0.8846   +0.0253   +0.0226   +0.0215   
-+0.0258   +0.0111   +0.0166   +0.0186   +0.8814   +0.0239   +0.0226   
-+0.0320   +0.0118   +0.0172   +0.0191   +0.0276   +0.8850   +0.0072   
-+0.0078   +0.0164   +0.0179   +0.0197   +0.0283   +0.0078   +0.9021   
-
-+0.8813   +0.0047   +0.0155   +0.0192   +0.0342   +0.0368   +0.0084   
-+0.0040   +0.9386   +0.0095   +0.0087   +0.0126   +0.0116   +0.0149   
-+0.0143   +0.0102   +0.9049   +0.0143   +0.0203   +0.0183   +0.0176   
-+0.0209   +0.0110   +0.0169   +0.8774   +0.0269   +0.0240   +0.0228   
-+0.0274   +0.0118   +0.0176   +0.0197   +0.8741   +0.0254   +0.0240   
-+0.0339   +0.0125   +0.0183   +0.0203   +0.0293   +0.8779   +0.0077   
-+0.0084   +0.0174   +0.0191   +0.0209   +0.0300   +0.0084   +0.8959   
-
-+0.8707   +0.0052   +0.0169   +0.0209   +0.0372   +0.0399   +0.0092   
-+0.0045   +0.9329   +0.0104   +0.0095   +0.0138   +0.0127   +0.0163   
-+0.0156   +0.0112   +0.8962   +0.0156   +0.0222   +0.0200   +0.0192   
-+0.0228   +0.0121   +0.0185   +0.8664   +0.0293   +0.0261   +0.0248   
-+0.0297   +0.0129   +0.0192   +0.0215   +0.8629   +0.0277   +0.0261   
-+0.0369   +0.0136   +0.0200   +0.0221   +0.0319   +0.8670   +0.0085   
-+0.0092   +0.0190   +0.0208   +0.0227   +0.0326   +0.0092   +0.8865   
-
-
-[2] P-matrix for branch length 0.200000
-+0.8083   +0.0084   +0.0255   +0.0310   +0.0544   +0.0582   +0.0142   
-+0.0072   +0.8983   +0.0158   +0.0144   +0.0209   +0.0191   +0.0244   
-+0.0235   +0.0171   +0.8446   +0.0234   +0.0331   +0.0297   +0.0285   
-+0.0338   +0.0183   +0.0276   +0.8019   +0.0433   +0.0385   +0.0365   
-+0.0436   +0.0195   +0.0287   +0.0318   +0.7974   +0.0407   +0.0383   
-+0.0538   +0.0205   +0.0297   +0.0326   +0.0470   +0.8031   +0.0133   
-+0.0142   +0.0284   +0.0309   +0.0335   +0.0479   +0.0144   +0.8306   
-
-+0.7915   +0.0093   +0.0278   +0.0337   +0.0590   +0.0630   +0.0157   
-+0.0080   +0.8887   +0.0174   +0.0158   +0.0229   +0.0208   +0.0266   
-+0.0257   +0.0187   +0.8305   +0.0255   +0.0361   +0.0324   +0.0311   
-+0.0367   +0.0201   +0.0301   +0.7845   +0.0471   +0.0418   +0.0397   
-+0.0472   +0.0213   +0.0313   +0.0345   +0.7799   +0.0442   +0.0416   
-+0.0582   +0.0224   +0.0324   +0.0354   +0.0510   +0.7860   +0.0146   
-+0.0157   +0.0310   +0.0337   +0.0364   +0.0520   +0.0159   +0.8155   
-
-+0.7795   +0.0100   +0.0295   +0.0356   +0.0622   +0.0664   +0.0167   
-+0.0085   +0.8818   +0.0185   +0.0168   +0.0243   +0.0221   +0.0281   
-+0.0273   +0.0199   +0.8204   +0.0270   +0.0382   +0.0343   +0.0329   
-+0.0388   +0.0213   +0.0319   +0.7721   +0.0497   +0.0442   +0.0419   
-+0.0498   +0.0227   +0.0331   +0.0365   +0.7674   +0.0467   +0.0439   
-+0.0613   +0.0238   +0.0343   +0.0374   +0.0538   +0.7738   +0.0156   
-+0.0167   +0.0328   +0.0356   +0.0384   +0.0548   +0.0169   +0.8046   
-
-+0.7615   +0.0110   +0.0321   +0.0385   +0.0671   +0.0715   +0.0184   
-+0.0095   +0.8712   +0.0201   +0.0183   +0.0264   +0.0240   +0.0305   
-+0.0296   +0.0217   +0.8051   +0.0293   +0.0415   +0.0372   +0.0356   
-+0.0420   +0.0233   +0.0347   +0.7534   +0.0537   +0.0477   +0.0452   
-+0.0537   +0.0247   +0.0359   +0.0394   +0.7486   +0.0504   +0.0473   
-+0.0660   +0.0258   +0.0372   +0.0404   +0.0581   +0.7553   +0.0172   
-+0.0184   +0.0356   +0.0386   +0.0415   +0.0591   +0.0186   +0.7882   
-
-
-[2] P-matrix for branch length 1.000000
-+0.3904   +0.0484   +0.0918   +0.0969   +0.1529   +0.1548   +0.0648   
-+0.0415   +0.6011   +0.0646   +0.0573   +0.0806   +0.0702   +0.0846   
-+0.0847   +0.0696   +0.4594   +0.0809   +0.1125   +0.0990   +0.0939   
-+0.1057   +0.0730   +0.0956   +0.3683   +0.1326   +0.1163   +0.1086   
-+0.1223   +0.0752   +0.0975   +0.0973   +0.3769   +0.1204   +0.1105   
-+0.1429   +0.0756   +0.0990   +0.0984   +0.1390   +0.3819   +0.0632   
-+0.0648   +0.0987   +0.1018   +0.0995   +0.1381   +0.0685   +0.4286   
-
-+0.3618   +0.0534   +0.0972   +0.1012   +0.1578   +0.1587   +0.0700   
-+0.0457   +0.5733   +0.0694   +0.0614   +0.0860   +0.0748   +0.0893   
-+0.0897   +0.0747   +0.4291   +0.0853   +0.1185   +0.1041   +0.0986   
-+0.1103   +0.0781   +0.1008   +0.3388   +0.1382   +0.1210   +0.1128   
-+0.1263   +0.0803   +0.1027   +0.1013   +0.3499   +0.1251   +0.1144   
-+0.1465   +0.0805   +0.1041   +0.1024   +0.1443   +0.3538   +0.0684   
-+0.0700   +0.1042   +0.1068   +0.1034   +0.1430   +0.0741   +0.3984   
-
-+0.3431   +0.0569   +0.1008   +0.1039   +0.1609   +0.1610   +0.0735   
-+0.0488   +0.5541   +0.0727   +0.0642   +0.0898   +0.0779   +0.0925   
-+0.0930   +0.0783   +0.4089   +0.0882   +0.1224   +0.1074   +0.1017   
-+0.1133   +0.0817   +0.1043   +0.3195   +0.1417   +0.1240   +0.1155   
-+0.1287   +0.0838   +0.1061   +0.1039   +0.3326   +0.1280   +0.1169   
-+0.1486   +0.0839   +0.1074   +0.1049   +0.1477   +0.3355   +0.0720   
-+0.0735   +0.1079   +0.1101   +0.1059   +0.1462   +0.0780   +0.3784   
-
-+0.3173   +0.0623   +0.1059   +0.1075   +0.1647   +0.1636   +0.0787   
-+0.0534   +0.5261   +0.0775   +0.0683   +0.0953   +0.0824   +0.0969   
-+0.0977   +0.0835   +0.3805   +0.0924   +0.1279   +0.1121   +0.1059   
-+0.1173   +0.0869   +0.1091   +0.2931   +0.1465   +0.1280   +0.1190   
-+0.1318   +0.0890   +0.1109   +0.1074   +0.3089   +0.1318   +0.1202   
-+0.1510   +0.0888   +0.1121   +0.1083   +0.1521   +0.3104   +0.0773   
-+0.0787   +0.1131   +0.1147   +0.1091   +0.1503   +0.0837   +0.3504   
-
-
-[2] P-matrix for branch length 1.000000
-+0.3904   +0.0484   +0.0918   +0.0969   +0.1529   +0.1548   +0.0648   
-+0.0415   +0.6011   +0.0646   +0.0573   +0.0806   +0.0702   +0.0846   
-+0.0847   +0.0696   +0.4594   +0.0809   +0.1125   +0.0990   +0.0939   
-+0.1057   +0.0730   +0.0956   +0.3683   +0.1326   +0.1163   +0.1086   
-+0.1223   +0.0752   +0.0975   +0.0973   +0.3769   +0.1204   +0.1105   
-+0.1429   +0.0756   +0.0990   +0.0984   +0.1390   +0.3819   +0.0632   
-+0.0648   +0.0987   +0.1018   +0.0995   +0.1381   +0.0685   +0.4286   
-
-+0.3618   +0.0534   +0.0972   +0.1012   +0.1578   +0.1587   +0.0700   
-+0.0457   +0.5733   +0.0694   +0.0614   +0.0860   +0.0748   +0.0893   
-+0.0897   +0.0747   +0.4291   +0.0853   +0.1185   +0.1041   +0.0986   
-+0.1103   +0.0781   +0.1008   +0.3388   +0.1382   +0.1210   +0.1128   
-+0.1263   +0.0803   +0.1027   +0.1013   +0.3499   +0.1251   +0.1144   
-+0.1465   +0.0805   +0.1041   +0.1024   +0.1443   +0.3538   +0.0684   
-+0.0700   +0.1042   +0.1068   +0.1034   +0.1430   +0.0741   +0.3984   
-
-+0.3431   +0.0569   +0.1008   +0.1039   +0.1609   +0.1610   +0.0735   
-+0.0488   +0.5541   +0.0727   +0.0642   +0.0898   +0.0779   +0.0925   
-+0.0930   +0.0783   +0.4089   +0.0882   +0.1224   +0.1074   +0.1017   
-+0.1133   +0.0817   +0.1043   +0.3195   +0.1417   +0.1240   +0.1155   
-+0.1287   +0.0838   +0.1061   +0.1039   +0.3326   +0.1280   +0.1169   
-+0.1486   +0.0839   +0.1074   +0.1049   +0.1477   +0.3355   +0.0720   
-+0.0735   +0.1079   +0.1101   +0.1059   +0.1462   +0.0780   +0.3784   
-
-+0.3173   +0.0623   +0.1059   +0.1075   +0.1647   +0.1636   +0.0787   
-+0.0534   +0.5261   +0.0775   +0.0683   +0.0953   +0.0824   +0.0969   
-+0.0977   +0.0835   +0.3805   +0.0924   +0.1279   +0.1121   +0.1059   
-+0.1173   +0.0869   +0.1091   +0.2931   +0.1465   +0.1280   +0.1190   
-+0.1318   +0.0890   +0.1109   +0.1074   +0.3089   +0.1318   +0.1202   
-+0.1510   +0.0888   +0.1121   +0.1083   +0.1521   +0.3104   +0.0773   
-+0.0787   +0.1131   +0.1147   +0.1091   +0.1503   +0.0837   +0.3504   
-
-
-[2] CLV 5: [ {(0.00021,0.01423,0.01441,0.00051,0.00056,0.00061,0.00088),(0.00026,0.01542,0.01552,0.00061,0.00067,0.00073,0.00104),(0.00029,0.01627,0.01630,0.00068,0.00075,0.00081,0.00117),(0.00035,0.01754,0.01745,0.00081,0.00089,0.00096,0.00138)} {(0.65330,0.00005,0.00055,0.00114,0.00190,0.00289,0.00020),(0.62646,0.00006,0.00066,0.00135,0.00223,0.00338,0.00025),(0.60766,0.00007,0.00074,0.00151,0.00248,0.00376,0.00028),(0.57983,0.00009,0.00088,0.00176,0.00288,0.00435,0.00034)} {(0.02061,0 [...]
-[2] CLV 6: [ {(0.00040,0.00010,0.00032,0.00003,0.00004,0.00005,0.00002),(0.00047,0.00012,0.00037,0.00004,0.00005,0.00007,0.00002),(0.00052,0.00013,0.00041,0.00004,0.00006,0.00008,0.00003),(0.00061,0.00016,0.00047,0.00006,0.00008,0.00010,0.00004)} {(0.03417,0.00004,0.00026,0.00050,0.00070,0.01752,0.00007),(0.03508,0.00005,0.00030,0.00057,0.00081,0.01819,0.00008),(0.03558,0.00006,0.00033,0.00063,0.00088,0.01860,0.00009),(0.03610,0.00007,0.00037,0.00071,0.00100,0.01911,0.00011)} {(0.01860,0 [...]
-[2] CLV 7: [ {(0.0006,0.0003,0.7133,0.0008,0.0008,0.0009,0.0010),(0.0008,0.0003,0.6897,0.0009,0.0010,0.0010,0.0011),(0.0009,0.0003,0.6731,0.0010,0.0011,0.0012,0.0013),(0.0010,0.0004,0.6482,0.0012,0.0013,0.0014,0.0015)} {(0.0034,0.0004,0.0009,0.0015,0.0017,0.6450,0.0002),(0.0040,0.0004,0.0010,0.0018,0.0020,0.6178,0.0003),(0.0044,0.0005,0.0012,0.0020,0.0022,0.5987,0.0003),(0.0051,0.0006,0.0014,0.0023,0.0025,0.5705,0.0003)} {(0.0250,0.0001,0.0006,0.0271,0.0014,0.0018,0.0005),(0.0267,0.0001, [...]
-Subst params:  0.50000  2.00000  3.00000  4.00000  5.00000  1.10000  1.20000 
-               1.30000  1.40000  1.50000  2.10000  2.20000  2.30000  2.40000 
-               2.50000  3.10000  3.20000  3.30000  3.40000  3.50000  1.00000 
-              
-
-
- TEST alpha(ncats) =   0.10( 6)
-
-Rates:  0.00000  0.00002  0.00160  0.03687 
-        0.42992  5.53159 
-[0] P-matrix for branch length 0.100000
-+1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
-
-+1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
-
-+0.9998   +0.0000   +0.0000   +0.0000   +0.0001   +0.0001   +0.0000   
-+0.0000   +0.9999   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.9998   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.9998   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.9998   +0.0000   +0.0000   
-+0.0001   +0.0000   +0.0000   +0.0000   +0.0000   +0.9998   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0001   +0.0000   +0.9998   
-
-+0.9954   +0.0002   +0.0006   +0.0007   +0.0013   +0.0015   +0.0003   
-+0.0001   +0.9977   +0.0004   +0.0003   +0.0005   +0.0004   +0.0006   
-+0.0005   +0.0004   +0.9964   +0.0005   +0.0008   +0.0007   +0.0007   
-+0.0008   +0.0004   +0.0006   +0.9953   +0.0010   +0.0009   +0.0009   
-+0.0011   +0.0004   +0.0007   +0.0008   +0.9951   +0.0010   +0.0009   
-+0.0013   +0.0005   +0.0007   +0.0008   +0.0011   +0.9953   +0.0003   
-+0.0003   +0.0007   +0.0007   +0.0008   +0.0012   +0.0003   +0.9960   
-
-+0.9482   +0.0019   +0.0067   +0.0084   +0.0151   +0.0163   +0.0035   
-+0.0016   +0.9738   +0.0040   +0.0037   +0.0054   +0.0050   +0.0064   
-+0.0062   +0.0043   +0.9589   +0.0062   +0.0088   +0.0079   +0.0076   
-+0.0091   +0.0047   +0.0073   +0.9465   +0.0118   +0.0105   +0.0100   
-+0.0121   +0.0050   +0.0076   +0.0086   +0.9449   +0.0112   +0.0106   
-+0.0151   +0.0054   +0.0079   +0.0089   +0.0129   +0.9466   +0.0032   
-+0.0035   +0.0075   +0.0083   +0.0092   +0.0132   +0.0034   +0.9549   
-
-+0.5314   +0.0297   +0.0672   +0.0752   +0.1240   +0.1289   +0.0435   
-+0.0254   +0.7191   +0.0448   +0.0402   +0.0571   +0.0506   +0.0628   
-+0.0620   +0.0483   +0.5992   +0.0602   +0.0843   +0.0747   +0.0713   
-+0.0820   +0.0511   +0.0711   +0.5145   +0.1038   +0.0915   +0.0860   
-+0.0992   +0.0533   +0.0731   +0.0761   +0.5142   +0.0956   +0.0885   
-+0.1190   +0.0545   +0.0747   +0.0774   +0.1103   +0.5223   +0.0418   
-+0.0435   +0.0732   +0.0773   +0.0788   +0.1107   +0.0453   +0.5711   
-
-
-[0] P-matrix for branch length 0.200000
-+1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
-
-+1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
-
-+0.9996   +0.0000   +0.0001   +0.0001   +0.0001   +0.0001   +0.0000   
-+0.0000   +0.9998   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.9997   +0.0000   +0.0001   +0.0001   +0.0001   
-+0.0001   +0.0000   +0.0001   +0.9996   +0.0001   +0.0001   +0.0001   
-+0.0001   +0.0000   +0.0001   +0.0001   +0.9996   +0.0001   +0.0001   
-+0.0001   +0.0000   +0.0001   +0.0001   +0.0001   +0.9996   +0.0000   
-+0.0000   +0.0001   +0.0001   +0.0001   +0.0001   +0.0000   +0.9997   
-
-+0.9909   +0.0003   +0.0012   +0.0015   +0.0027   +0.0029   +0.0006   
-+0.0003   +0.9954   +0.0007   +0.0006   +0.0009   +0.0009   +0.0011   
-+0.0011   +0.0008   +0.9928   +0.0011   +0.0015   +0.0014   +0.0013   
-+0.0016   +0.0008   +0.0013   +0.9906   +0.0021   +0.0019   +0.0018   
-+0.0021   +0.0009   +0.0013   +0.0015   +0.9903   +0.0020   +0.0019   
-+0.0027   +0.0009   +0.0014   +0.0016   +0.0023   +0.9906   +0.0005   
-+0.0006   +0.0013   +0.0015   +0.0016   +0.0023   +0.0006   +0.9921   
-
-+0.8996   +0.0039   +0.0131   +0.0162   +0.0290   +0.0312   +0.0070   
-+0.0033   +0.9484   +0.0080   +0.0073   +0.0106   +0.0098   +0.0126   
-+0.0121   +0.0086   +0.9198   +0.0121   +0.0172   +0.0155   +0.0149   
-+0.0177   +0.0093   +0.0143   +0.8964   +0.0228   +0.0203   +0.0193   
-+0.0232   +0.0099   +0.0149   +0.0167   +0.8934   +0.0215   +0.0204   
-+0.0288   +0.0105   +0.0155   +0.0172   +0.0248   +0.8967   +0.0064   
-+0.0070   +0.0147   +0.0161   +0.0177   +0.0255   +0.0070   +0.9122   
-
-+0.3231   +0.0610   +0.1047   +0.1067   +0.1639   +0.1630   +0.0775   
-+0.0523   +0.5325   +0.0764   +0.0674   +0.0941   +0.0814   +0.0959   
-+0.0967   +0.0823   +0.3869   +0.0914   +0.1267   +0.1111   +0.1050   
-+0.1164   +0.0857   +0.1081   +0.2990   +0.1454   +0.1271   +0.1182   
-+0.1311   +0.0878   +0.1098   +0.1067   +0.3141   +0.1310   +0.1195   
-+0.1505   +0.0877   +0.1111   +0.1076   +0.1511   +0.3160   +0.0761   
-+0.0775   +0.1119   +0.1137   +0.1084   +0.1494   +0.0824   +0.3567   
-
-
-[0] P-matrix for branch length 1.000000
-+1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
-
-+1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
-
-+0.9980   +0.0001   +0.0003   +0.0003   +0.0006   +0.0006   +0.0001   
-+0.0001   +0.9990   +0.0002   +0.0001   +0.0002   +0.0002   +0.0002   
-+0.0002   +0.0002   +0.9984   +0.0002   +0.0003   +0.0003   +0.0003   
-+0.0004   +0.0002   +0.0003   +0.9980   +0.0005   +0.0004   +0.0004   
-+0.0005   +0.0002   +0.0003   +0.0003   +0.9979   +0.0004   +0.0004   
-+0.0006   +0.0002   +0.0003   +0.0003   +0.0005   +0.9980   +0.0001   
-+0.0001   +0.0003   +0.0003   +0.0004   +0.0005   +0.0001   +0.9983   
-
-+0.9553   +0.0016   +0.0057   +0.0072   +0.0130   +0.0141   +0.0030   
-+0.0014   +0.9775   +0.0035   +0.0032   +0.0047   +0.0043   +0.0055   
-+0.0053   +0.0037   +0.9646   +0.0053   +0.0076   +0.0068   +0.0066   
-+0.0079   +0.0040   +0.0063   +0.9539   +0.0102   +0.0091   +0.0086   
-+0.0104   +0.0043   +0.0066   +0.0074   +0.9525   +0.0096   +0.0091   
-+0.0130   +0.0046   +0.0068   +0.0077   +0.0111   +0.9540   +0.0027   
-+0.0030   +0.0065   +0.0071   +0.0079   +0.0114   +0.0030   +0.9612   
-
-+0.6054   +0.0225   +0.0554   +0.0635   +0.1068   +0.1121   +0.0344   
-+0.0193   +0.7721   +0.0361   +0.0325   +0.0465   +0.0415   +0.0520   
-+0.0511   +0.0389   +0.6678   +0.0499   +0.0702   +0.0624   +0.0597   
-+0.0693   +0.0414   +0.0590   +0.5913   +0.0880   +0.0778   +0.0733   
-+0.0855   +0.0434   +0.0608   +0.0645   +0.5884   +0.0815   +0.0759   
-+0.1034   +0.0447   +0.0624   +0.0658   +0.0941   +0.5967   +0.0328   
-+0.0344   +0.0607   +0.0647   +0.0672   +0.0949   +0.0355   +0.6426   
-
-+0.1353   +0.1505   +0.1449   +0.1229   +0.1677   +0.1459   +0.1328   
-+0.1290   +0.1712   +0.1416   +0.1200   +0.1637   +0.1414   +0.1331   
-+0.1337   +0.1525   +0.1464   +0.1224   +0.1669   +0.1447   +0.1334   
-+0.1341   +0.1527   +0.1447   +0.1229   +0.1672   +0.1450   +0.1334   
-+0.1342   +0.1528   +0.1447   +0.1226   +0.1673   +0.1450   +0.1334   
-+0.1346   +0.1523   +0.1447   +0.1227   +0.1673   +0.1456   +0.1328   
-+0.1328   +0.1553   +0.1445   +0.1223   +0.1667   +0.1438   +0.1346   
-
-
-[0] P-matrix for branch length 1.000000
-+1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
-
-+1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   +0.0000   
-+0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +0.0000   +1.0000   
-
-+0.9980   +0.0001   +0.0003   +0.0003   +0.0006   +0.0006   +0.0001   
-+0.0001   +0.9990   +0.0002   +0.0001   +0.0002   +0.0002   +0.0002   
-+0.0002   +0.0002   +0.9984   +0.0002   +0.0003   +0.0003   +0.0003   
-+0.0004   +0.0002   +0.0003   +0.9980   +0.0005   +0.0004   +0.0004   
-+0.0005   +0.0002   +0.0003   +0.0003   +0.9979   +0.0004   +0.0004   
-+0.0006   +0.0002   +0.0003   +0.0003   +0.0005   +0.9980   +0.0001   
-+0.0001   +0.0003   +0.0003   +0.0004   +0.0005   +0.0001   +0.9983   
-
-+0.9553   +0.0016   +0.0057   +0.0072   +0.0130   +0.0141   +0.0030   
-+0.0014   +0.9775   +0.0035   +0.0032   +0.0047   +0.0043   +0.0055   
-+0.0053   +0.0037   +0.9646   +0.0053   +0.0076   +0.0068   +0.0066   
-+0.0079   +0.0040   +0.0063   +0.9539   +0.0102   +0.0091   +0.0086   
-+0.0104   +0.0043   +0.0066   +0.0074   +0.9525   +0.0096   +0.0091   
-+0.0130   +0.0046   +0.0068   +0.0077   +0.0111   +0.9540   +0.0027   
-+0.0030   +0.0065   +0.0071   +0.0079   +0.0114   +0.0030   +0.9612   
-
-+0.6054   +0.0225   +0.0554   +0.0635   +0.1068   +0.1121   +0.0344   
-+0.0193   +0.7721   +0.0361   +0.0325   +0.0465   +0.0415   +0.0520   
-+0.0511   +0.0389   +0.6678   +0.0499   +0.0702   +0.0624   +0.0597   
-+0.0693   +0.0414   +0.0590   +0.5913   +0.0880   +0.0778   +0.0733   
-+0.0855   +0.0434   +0.0608   +0.0645   +0.5884   +0.0815   +0.0759   
-+0.1034   +0.0447   +0.0624   +0.0658   +0.0941   +0.5967   +0.0328   
-+0.0344   +0.0607   +0.0647   +0.0672   +0.0949   +0.0355   +0.6426   
-
-+0.1353   +0.1505   +0.1449   +0.1229   +0.1677   +0.1459   +0.1328   
-+0.1290   +0.1712   +0.1416   +0.1200   +0.1637   +0.1414   +0.1331   
-+0.1337   +0.1525   +0.1464   +0.1224   +0.1669   +0.1447   +0.1334   
-+0.1341   +0.1527   +0.1447   +0.1229   +0.1672   +0.1450   +0.1334   
-+0.1342   +0.1528   +0.1447   +0.1226   +0.1673   +0.1450   +0.1334   
-+0.1346   +0.1523   +0.1447   +0.1227   +0.1673   +0.1456   +0.1328   
-+0.1328   +0.1553   +0.1445   +0.1223   +0.1667   +0.1438   +0.1346   
-
-
-[0] CLV 5: [ {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00003,0.00003,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00070,0.00075,0.00000,0.00000,0.00000,0.00000),(0.00005,0.00757,0.00790,0.00013,0.00015,0.00016,0.00024),(0.00639,0.04071,0.03185,0.00926,0.00964,0.00974,0.01272)} {(1.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.99999,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.99920,0.0 [...]
-[0] CLV 6: [ {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00011,0.00002,0.00009,0.00000,0.00001,0.00001,0.00000),(0.00337,0.00173,0.00236,0.00147,0.00168,0.00192,0.00118)} {(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00000,0.00000,0.00000,0.00000,0.00000,0.00000,0.00000),(0.00013,0.0 [...]
-[0] CLV 7: [ {(0.0000,0.0000,1.0000,0.0000,0.0000,0.0000,0.0000),(0.0000,0.0000,1.0000,0.0000,0.0000,0.0000,0.0000),(0.0000,0.0000,0.9994,0.0000,0.0000,0.0000,0.0000),(0.0000,0.0000,0.9857,0.0000,0.0000,0.0000,0.0000),(0.0002,0.0001,0.8460,0.0002,0.0002,0.0002,0.0003),(0.0110,0.0058,0.1497,0.0117,0.0121,0.0123,0.0129)} {(0.0000,0.0000,0.0000,0.0000,0.0000,1.0000,0.0000),(0.0000,0.0000,0.0000,0.0000,0.0000,1.0000,0.0000),(0.0000,0.0000,0.0000,0.0000,0.0000,0.9992,0.0000),(0.0000,0.0000,0. [...]
-
-
- TEST alpha(ncats) =   1.25( 6)
-
-Rates:  0.12797  0.35383  0.60548  0.92469 
-        1.39616  2.59187 
-[1] P-matrix for branch length 0.100000
-+0.9842   +0.0006   +0.0020   +0.0026   +0.0046   +0.0050   +0.0010   
-+0.0005   +0.9921   +0.0012   +0.0011   +0.0016   +0.0015   +0.0020   
-+0.0019   +0.0013   +0.9876   +0.0019   +0.0027   +0.0024   +0.0023   
-+0.0028   +0.0014   +0.0022   +0.9837   +0.0036   +0.0032   +0.0031   
-+0.0037   +0.0015   +0.0023   +0.0026   +0.9832   +0.0034   +0.0032   
-+0.0046   +0.0016   +0.0024   +0.0027   +0.0039   +0.9837   +0.0009   
-+0.0010   +0.0023   +0.0025   +0.0028   +0.0040   +0.0010   +0.9863   
-
-+0.9571   +0.0016   +0.0055   +0.0069   +0.0125   +0.0135   +0.0029   
-+0.0013   +0.9784   +0.0033   +0.0030   +0.0045   +0.0041   +0.0053   
-+0.0051   +0.0036   +0.9660   +0.0051   +0.0073   +0.0066   +0.0063   
-+0.0076   +0.0039   +0.0060   +0.9558   +0.0098   +0.0087   +0.0083   
-+0.0100   +0.0042   +0.0063   +0.0072   +0.9543   +0.0092   +0.0088   
-+0.0125   +0.0044   +0.0066   +0.0074   +0.0107   +0.9558   +0.0026   
-+0.0029   +0.0062   +0.0068   +0.0076   +0.0110   +0.0028   +0.9627   
-
-+0.9280   +0.0027   +0.0093   +0.0116   +0.0209   +0.0226   +0.0049   
-+0.0023   +0.9633   +0.0057   +0.0052   +0.0076   +0.0070   +0.0090   
-+0.0086   +0.0061   +0.9427   +0.0086   +0.0123   +0.0111   +0.0106   
-+0.0127   +0.0066   +0.0102   +0.9257   +0.0164   +0.0146   +0.0139   
-+0.0167   +0.0071   +0.0106   +0.0120   +0.9234   +0.0155   +0.0147   
-+0.0208   +0.0075   +0.0111   +0.0124   +0.0179   +0.9259   +0.0045   
-+0.0049   +0.0105   +0.0115   +0.0127   +0.0183   +0.0049   +0.9372   
-
-+0.8925   +0.0042   +0.0140   +0.0174   +0.0310   +0.0334   +0.0075   
-+0.0036   +0.9447   +0.0086   +0.0078   +0.0114   +0.0105   +0.0135   
-+0.0129   +0.0092   +0.9141   +0.0129   +0.0184   +0.0166   +0.0159   
-+0.0189   +0.0099   +0.0153   +0.8891   +0.0244   +0.0217   +0.0206   
-+0.0248   +0.0106   +0.0159   +0.0179   +0.8860   +0.0230   +0.0218   
-+0.0308   +0.0113   +0.0166   +0.0184   +0.0266   +0.8895   +0.0069   
-+0.0075   +0.0157   +0.0172   +0.0189   +0.0272   +0.0075   +0.9059   
-
-+0.8432   +0.0065   +0.0207   +0.0253   +0.0448   +0.0481   +0.0113   
-+0.0056   +0.9179   +0.0128   +0.0116   +0.0169   +0.0155   +0.0198   
-+0.0191   +0.0137   +0.8737   +0.0190   +0.0270   +0.0243   +0.0233   
-+0.0276   +0.0148   +0.0225   +0.8381   +0.0355   +0.0316   +0.0300   
-+0.0359   +0.0158   +0.0234   +0.0260   +0.8340   +0.0334   +0.0315   
-+0.0444   +0.0166   +0.0243   +0.0267   +0.0386   +0.8389   +0.0105   
-+0.0113   +0.0231   +0.0252   +0.0275   +0.0394   +0.0114   +0.8620   
-
-+0.7327   +0.0128   +0.0362   +0.0431   +0.0747   +0.0794   +0.0210   
-+0.0110   +0.8540   +0.0229   +0.0207   +0.0299   +0.0271   +0.0344   
-+0.0334   +0.0246   +0.7805   +0.0330   +0.0467   +0.0418   +0.0400   
-+0.0471   +0.0264   +0.0390   +0.7235   +0.0601   +0.0534   +0.0505   
-+0.0597   +0.0279   +0.0404   +0.0441   +0.7188   +0.0562   +0.0527   
-+0.0733   +0.0292   +0.0418   +0.0452   +0.0649   +0.7260   +0.0198   
-+0.0210   +0.0401   +0.0434   +0.0463   +0.0659   +0.0214   +0.7618   
-
-
-[1] P-matrix for branch length 0.200000
-+0.9687   +0.0011   +0.0040   +0.0051   +0.0091   +0.0099   +0.0021   
-+0.0010   +0.9843   +0.0024   +0.0022   +0.0032   +0.0030   +0.0039   
-+0.0037   +0.0026   +0.9753   +0.0037   +0.0053   +0.0048   +0.0046   
-+0.0055   +0.0028   +0.0044   +0.9678   +0.0071   +0.0064   +0.0060   
-+0.0073   +0.0030   +0.0046   +0.0052   +0.9667   +0.0067   +0.0064   
-+0.0091   +0.0032   +0.0048   +0.0054   +0.0078   +0.9678   +0.0019   
-+0.0021   +0.0045   +0.0050   +0.0055   +0.0080   +0.0020   +0.9728   
-
-+0.9164   +0.0032   +0.0108   +0.0135   +0.0242   +0.0261   +0.0057   
-+0.0027   +0.9573   +0.0066   +0.0060   +0.0088   +0.0081   +0.0104   
-+0.0100   +0.0071   +0.9334   +0.0100   +0.0143   +0.0129   +0.0123   
-+0.0147   +0.0077   +0.0118   +0.9138   +0.0190   +0.0169   +0.0161   
-+0.0194   +0.0082   +0.0124   +0.0139   +0.9112   +0.0179   +0.0170   
-+0.0241   +0.0087   +0.0129   +0.0143   +0.0207   +0.9140   +0.0053   
-+0.0057   +0.0122   +0.0134   +0.0148   +0.0212   +0.0057   +0.9270   
-
-+0.8622   +0.0056   +0.0181   +0.0223   +0.0395   +0.0425   +0.0098   
-+0.0048   +0.9283   +0.0111   +0.0101   +0.0148   +0.0135   +0.0174   
-+0.0167   +0.0120   +0.8893   +0.0167   +0.0237   +0.0213   +0.0204   
-+0.0243   +0.0129   +0.0197   +0.8577   +0.0312   +0.0278   +0.0264   
-+0.0316   +0.0138   +0.0205   +0.0229   +0.8540   +0.0294   +0.0278   
-+0.0392   +0.0146   +0.0213   +0.0235   +0.0340   +0.8583   +0.0091   
-+0.0098   +0.0203   +0.0221   +0.0242   +0.0347   +0.0099   +0.8790   
-
-+0.7990   +0.0089   +0.0268   +0.0325   +0.0570   +0.0609   +0.0150   
-+0.0076   +0.8930   +0.0167   +0.0152   +0.0220   +0.0200   +0.0256   
-+0.0247   +0.0180   +0.8368   +0.0246   +0.0348   +0.0312   +0.0299   
-+0.0354   +0.0193   +0.0290   +0.7923   +0.0454   +0.0404   +0.0383   
-+0.0456   +0.0205   +0.0301   +0.0333   +0.7877   +0.0426   +0.0401   
-+0.0562   +0.0216   +0.0312   +0.0342   +0.0492   +0.7937   +0.0140   
-+0.0150   +0.0298   +0.0324   +0.0351   +0.0502   +0.0152   +0.8223   
-
-+0.7160   +0.0139   +0.0386   +0.0458   +0.0790   +0.0839   +0.0226   
-+0.0119   +0.8439   +0.0245   +0.0222   +0.0320   +0.0289   +0.0367   
-+0.0357   +0.0264   +0.7661   +0.0352   +0.0497   +0.0444   +0.0426   
-+0.0500   +0.0282   +0.0416   +0.7062   +0.0638   +0.0566   +0.0535   
-+0.0632   +0.0298   +0.0431   +0.0468   +0.7016   +0.0596   +0.0559   
-+0.0774   +0.0311   +0.0444   +0.0479   +0.0688   +0.7090   +0.0213   
-+0.0226   +0.0428   +0.0461   +0.0491   +0.0698   +0.0231   +0.7465   
-
-+0.5510   +0.0276   +0.0640   +0.0721   +0.1196   +0.1246   +0.0410   
-+0.0237   +0.7336   +0.0424   +0.0381   +0.0542   +0.0481   +0.0599   
-+0.0591   +0.0457   +0.6176   +0.0574   +0.0805   +0.0715   +0.0682   
-+0.0787   +0.0484   +0.0679   +0.5348   +0.0996   +0.0879   +0.0827   
-+0.0957   +0.0506   +0.0698   +0.0731   +0.5337   +0.0919   +0.0853   
-+0.1150   +0.0518   +0.0715   +0.0744   +0.1061   +0.5419   +0.0393   
-+0.0410   +0.0699   +0.0739   +0.0758   +0.1066   +0.0426   +0.5902   
-
-
-[1] P-matrix for branch length 1.000000
-+0.8551   +0.0060   +0.0191   +0.0234   +0.0415   +0.0446   +0.0104   
-+0.0051   +0.9244   +0.0117   +0.0107   +0.0156   +0.0142   +0.0183   
-+0.0176   +0.0126   +0.8834   +0.0175   +0.0249   +0.0224   +0.0215   
-+0.0255   +0.0136   +0.0207   +0.8503   +0.0328   +0.0292   +0.0277   
-+0.0332   +0.0145   +0.0216   +0.0241   +0.8465   +0.0309   +0.0292   
-+0.0411   +0.0153   +0.0224   +0.0247   +0.0357   +0.8511   +0.0096   
-+0.0104   +0.0213   +0.0233   +0.0254   +0.0365   +0.0104   +0.8726   
-
-+0.6582   +0.0181   +0.0472   +0.0551   +0.0938   +0.0990   +0.0285   
-+0.0155   +0.8073   +0.0304   +0.0274   +0.0394   +0.0354   +0.0446   
-+0.0436   +0.0327   +0.7153   +0.0428   +0.0603   +0.0538   +0.0515   
-+0.0601   +0.0349   +0.0506   +0.6462   +0.0765   +0.0678   +0.0640   
-+0.0751   +0.0367   +0.0523   +0.0561   +0.6421   +0.0712   +0.0665   
-+0.0914   +0.0381   +0.0538   +0.0573   +0.0822   +0.6502   +0.0270   
-+0.0285   +0.0520   +0.0558   +0.0587   +0.0831   +0.0293   +0.6926   
-
-+0.5039   +0.0328   +0.0718   +0.0795   +0.1301   +0.1346   +0.0473   
-+0.0281   +0.6980   +0.0483   +0.0432   +0.0613   +0.0542   +0.0669   
-+0.0663   +0.0520   +0.5728   +0.0641   +0.0897   +0.0794   +0.0757   
-+0.0868   +0.0550   +0.0757   +0.4859   +0.1096   +0.0965   +0.0906   
-+0.1041   +0.0572   +0.0777   +0.0803   +0.4869   +0.1007   +0.0931   
-+0.1243   +0.0583   +0.0794   +0.0816   +0.1162   +0.4946   +0.0455   
-+0.0473   +0.0780   +0.0820   +0.0831   +0.1163   +0.0493   +0.5440   
-
-+0.3743   +0.0511   +0.0948   +0.0993   +0.1557   +0.1571   +0.0677   
-+0.0438   +0.5856   +0.0673   +0.0596   +0.0836   +0.0728   +0.0873   
-+0.0875   +0.0725   +0.4424   +0.0833   +0.1158   +0.1019   +0.0966   
-+0.1083   +0.0758   +0.0985   +0.3516   +0.1358   +0.1190   +0.1110   
-+0.1246   +0.0780   +0.1004   +0.0996   +0.3616   +0.1231   +0.1127   
-+0.1450   +0.0784   +0.1019   +0.1007   +0.1420   +0.3660   +0.0661   
-+0.0677   +0.1018   +0.1046   +0.1017   +0.1409   +0.0716   +0.4116   
-
-+0.2641   +0.0756   +0.1169   +0.1147   +0.1713   +0.1668   +0.0906   
-+0.0648   +0.4611   +0.0889   +0.0778   +0.1080   +0.0929   +0.1065   
-+0.1079   +0.0958   +0.3190   +0.1011   +0.1396   +0.1219   +0.1147   
-+0.1252   +0.0990   +0.1195   +0.2391   +0.1557   +0.1358   +0.1257   
-+0.1370   +0.1008   +0.1210   +0.1142   +0.2617   +0.1390   +0.1263   
-+0.1539   +0.1000   +0.1219   +0.1149   +0.1604   +0.2593   +0.0895   
-+0.0906   +0.1242   +0.1242   +0.1152   +0.1579   +0.0970   +0.2908   
-
-+0.1652   +0.1179   +0.1395   +0.1244   +0.1742   +0.1585   +0.1203   
-+0.1010   +0.2844   +0.1207   +0.1037   +0.1421   +0.1216   +0.1265   
-+0.1287   +0.1300   +0.1901   +0.1184   +0.1619   +0.1405   +0.1303   
-+0.1357   +0.1319   +0.1399   +0.1444   +0.1682   +0.1459   +0.1339   
-+0.1393   +0.1326   +0.1404   +0.1233   +0.1837   +0.1472   +0.1335   
-+0.1463   +0.1309   +0.1405   +0.1235   +0.1698   +0.1689   +0.1200   
-+0.1203   +0.1476   +0.1412   +0.1227   +0.1669   +0.1300   +0.1714   
-
-
-[1] P-matrix for branch length 1.000000
-+0.8551   +0.0060   +0.0191   +0.0234   +0.0415   +0.0446   +0.0104   
-+0.0051   +0.9244   +0.0117   +0.0107   +0.0156   +0.0142   +0.0183   
-+0.0176   +0.0126   +0.8834   +0.0175   +0.0249   +0.0224   +0.0215   
-+0.0255   +0.0136   +0.0207   +0.8503   +0.0328   +0.0292   +0.0277   
-+0.0332   +0.0145   +0.0216   +0.0241   +0.8465   +0.0309   +0.0292   
-+0.0411   +0.0153   +0.0224   +0.0247   +0.0357   +0.8511   +0.0096   
-+0.0104   +0.0213   +0.0233   +0.0254   +0.0365   +0.0104   +0.8726   
-
-+0.6582   +0.0181   +0.0472   +0.0551   +0.0938   +0.0990   +0.0285   
-+0.0155   +0.8073   +0.0304   +0.0274   +0.0394   +0.0354   +0.0446   
-+0.0436   +0.0327   +0.7153   +0.0428   +0.0603   +0.0538   +0.0515   
-+0.0601   +0.0349   +0.0506   +0.6462   +0.0765   +0.0678   +0.0640   
-+0.0751   +0.0367   +0.0523   +0.0561   +0.6421   +0.0712   +0.0665   
-+0.0914   +0.0381   +0.0538   +0.0573   +0.0822   +0.6502   +0.0270   
-+0.0285   +0.0520   +0.0558   +0.0587   +0.0831   +0.0293   +0.6926   
-
-+0.5039   +0.0328   +0.0718   +0.0795   +0.1301   +0.1346   +0.0473   
-+0.0281   +0.6980   +0.0483   +0.0432   +0.0613   +0.0542   +0.0669   
-+0.0663   +0.0520   +0.5728   +0.0641   +0.0897   +0.0794   +0.0757   
-+0.0868   +0.0550   +0.0757   +0.4859   +0.1096   +0.0965   +0.0906   
-+0.1041   +0.0572   +0.0777   +0.0803   +0.4869   +0.1007   +0.0931   
-+0.1243   +0.0583   +0.0794   +0.0816   +0.1162   +0.4946   +0.0455   
-+0.0473   +0.0780   +0.0820   +0.0831   +0.1163   +0.0493   +0.5440   
-
-+0.3743   +0.0511   +0.0948   +0.0993   +0.1557   +0.1571   +0.0677   
-+0.0438   +0.5856   +0.0673   +0.0596   +0.0836   +0.0728   +0.0873   
-+0.0875   +0.0725   +0.4424   +0.0833   +0.1158   +0.1019   +0.0966   
-+0.1083   +0.0758   +0.0985   +0.3516   +0.1358   +0.1190   +0.1110   
-+0.1246   +0.0780   +0.1004   +0.0996   +0.3616   +0.1231   +0.1127   
-+0.1450   +0.0784   +0.1019   +0.1007   +0.1420   +0.3660   +0.0661   
-+0.0677   +0.1018   +0.1046   +0.1017   +0.1409   +0.0716   +0.4116   
-
-+0.2641   +0.0756   +0.1169   +0.1147   +0.1713   +0.1668   +0.0906   
-+0.0648   +0.4611   +0.0889   +0.0778   +0.1080   +0.0929   +0.1065   
-+0.1079   +0.0958   +0.3190   +0.1011   +0.1396   +0.1219   +0.1147   
-+0.1252   +0.0990   +0.1195   +0.2391   +0.1557   +0.1358   +0.1257   
-+0.1370   +0.1008   +0.1210   +0.1142   +0.2617   +0.1390   +0.1263   
-+0.1539   +0.1000   +0.1219   +0.1149   +0.1604   +0.2593   +0.0895   
-+0.0906   +0.1242   +0.1242   +0.1152   +0.1579   +0.0970   +0.2908   
-
-+0.1652   +0.1179   +0.1395   +0.1244   +0.1742   +0.1585   +0.1203   
-+0.1010   +0.2844   +0.1207   +0.1037   +0.1421   +0.1216   +0.1265   
-+0.1287   +0.1300   +0.1901   +0.1184   +0.1619   +0.1405   +0.1303   
-+0.1357   +0.1319   +0.1399   +0.1444   +0.1682   +0.1459   +0.1339   
-+0.1393   +0.1326   +0.1404   +0.1233   +0.1837   +0.1472   +0.1335   
-+0.1463   +0.1309   +0.1405   +0.1235   +0.1698   +0.1689   +0.1200   
-+0.1203   +0.1476   +0.1412   +0.1227   +0.1669   +0.1300   +0.1714   
-
-
-[1] CLV 5: [ {(0.00000,0.00238,0.00254,0.00001,0.00001,0.00002,0.00002),(0.00003,0.00631,0.00663,0.00009,0.00010,0.00011,0.00016),(0.00010,0.01032,0.01065,0.00025,0.00028,0.00031,0.00045),(0.00024,0.01489,0.01503,0.00056,0.00062,0.00067,0.00097),(0.00054,0.02067,0.02021,0.00117,0.00129,0.00138,0.00197),(0.00177,0.03112,0.02821,0.00329,0.00353,0.00370,0.00517)} {(0.93846,0.00000,0.00001,0.00003,0.00005,0.00008,0.00000),(0.83985,0.00001,0.00010,0.00022,0.00038,0.00058,0.00003),(0.74336,0.0 [...]
-[1] CLV 6: [ {(0.00001,0.00000,0.00001,0.00000,0.00000,0.00000,0.00000),(0.00008,0.00002,0.00006,0.00000,0.00000,0.00000,0.00000),(0.00021,0.00005,0.00017,0.00001,0.00001,0.00002,0.00001),(0.00043,0.00011,0.00034,0.00003,0.00005,0.00006,0.00002),(0.00085,0.00023,0.00065,0.00010,0.00013,0.00016,0.00006),(0.00194,0.00066,0.00139,0.00040,0.00051,0.00062,0.00028)} {(0.00913,0.00000,0.00001,0.00002,0.00002,0.00428,0.00000),(0.02098,0.00001,0.00006,0.00011,0.00016,0.01010,0.00001),(0.02930,0.0 [...]
-[1] CLV 7: [ {(0.0000,0.0000,0.9512,0.0000,0.0000,0.0000,0.0000),(0.0001,0.0000,0.8713,0.0001,0.0002,0.0002,0.0002),(0.0003,0.0001,0.7908,0.0004,0.0004,0.0005,0.0005),(0.0007,0.0003,0.7003,0.0008,0.0009,0.0010,0.0011),(0.0015,0.0006,0.5869,0.0017,0.0019,0.0020,0.0021),(0.0041,0.0018,0.3814,0.0046,0.0049,0.0051,0.0055)} {(0.0001,0.0000,0.0000,0.0000,0.0000,0.9367,0.0000),(0.0007,0.0001,0.0002,0.0003,0.0003,0.8354,0.0000),(0.0018,0.0002,0.0005,0.0008,0.0009,0.7367,0.0001),(0.0037,0.0004,0. [...]
-
-
- TEST alpha(ncats) = 100.00( 6)
-
-Rates:  0.85509  0.93017  0.97570  1.01803 
-        1.06643  1.15457 
-[2] P-matrix for branch length 0.100000
-+0.9001   +0.0039   +0.0130   +0.0161   +0.0289   +0.0311   +0.0069   
-+0.0033   +0.9487   +0.0079   +0.0072   +0.0106   +0.0097   +0.0125   
-+0.0120   +0.0085   +0.9202   +0.0120   +0.0171   +0.0154   +0.0148   
-+0.0176   +0.0092   +0.0142   +0.8969   +0.0227   +0.0202   +0.0192   
-+0.0231   +0.0099   +0.0148   +0.0166   +0.8940   +0.0214   +0.0203   
-+0.0287   +0.0105   +0.0154   +0.0171   +0.0247   +0.8973   +0.0064   
-+0.0069   +0.0146   +0.0160   +0.0176   +0.0253   +0.0069   +0.9126   
-
-+0.8919   +0.0042   +0.0141   +0.0175   +0.0312   +0.0335   +0.0075   
-+0.0036   +0.9443   +0.0086   +0.0079   +0.0115   +0.0105   +0.0135   
-+0.0130   +0.0093   +0.9136   +0.0130   +0.0185   +0.0166   +0.0160   
-+0.0190   +0.0100   +0.0154   +0.8885   +0.0245   +0.0219   +0.0208   
-+0.0249   +0.0107   +0.0160   +0.0180   +0.8853   +0.0232   +0.0219   
-+0.0310   +0.0114   +0.0166   +0.0185   +0.0267   +0.8889   +0.0070   
-+0.0075   +0.0158   +0.0173   +0.0190   +0.0274   +0.0075   +0.9054   
-
-+0.8870   +0.0045   +0.0147   +0.0183   +0.0326   +0.0350   +0.0079   
-+0.0038   +0.9417   +0.0090   +0.0082   +0.0120   +0.0110   +0.0142   
-+0.0136   +0.0097   +0.9096   +0.0136   +0.0193   +0.0174   +0.0167   
-+0.0199   +0.0105   +0.0161   +0.8834   +0.0256   +0.0228   +0.0217   
-+0.0261   +0.0112   +0.0168   +0.0188   +0.8801   +0.0242   +0.0229   
-+0.0323   +0.0119   +0.0174   +0.0193   +0.0279   +0.8838   +0.0073   
-+0.0079   +0.0165   +0.0181   +0.0199   +0.0286   +0.0079   +0.9010   
-
-+0.8825   +0.0047   +0.0154   +0.0190   +0.0338   +0.0364   +0.0083   
-+0.0040   +0.9393   +0.0094   +0.0086   +0.0125   +0.0115   +0.0148   
-+0.0142   +0.0101   +0.9059   +0.0142   +0.0201   +0.0181   +0.0174   
-+0.0207   +0.0109   +0.0167   +0.8787   +0.0266   +0.0237   +0.0226   
-+0.0271   +0.0117   +0.0174   +0.0195   +0.8754   +0.0252   +0.0238   
-+0.0336   +0.0124   +0.0181   +0.0201   +0.0290   +0.8792   +0.0076   
-+0.0083   +0.0172   +0.0189   +0.0207   +0.0297   +0.0083   +0.8970   
-
-+0.8773   +0.0049   +0.0160   +0.0198   +0.0353   +0.0379   +0.0087   
-+0.0042   +0.9365   +0.0098   +0.0090   +0.0131   +0.0120   +0.0154   
-+0.0148   +0.0106   +0.9017   +0.0148   +0.0210   +0.0189   +0.0182   
-+0.0216   +0.0114   +0.0175   +0.8734   +0.0278   +0.0248   +0.0235   
-+0.0282   +0.0122   +0.0182   +0.0204   +0.8699   +0.0262   +0.0248   
-+0.0350   +0.0129   +0.0189   +0.0210   +0.0303   +0.8739   +0.0080   
-+0.0087   +0.0180   +0.0197   +0.0216   +0.0310   +0.0087   +0.8925   
-
-+0.8681   +0.0053   +0.0173   +0.0213   +0.0379   +0.0407   +0.0094   
-+0.0046   +0.9315   +0.0106   +0.0097   +0.0141   +0.0129   +0.0166   
-+0.0160   +0.0114   +0.8941   +0.0159   +0.0226   +0.0204   +0.0196   
-+0.0233   +0.0123   +0.0188   +0.8638   +0.0299   +0.0266   +0.0253   
-+0.0303   +0.0132   +0.0196   +0.0219   +0.8602   +0.0282   +0.0266   
-+0.0376   +0.0139   +0.0204   +0.0225   +0.0325   +0.8644   +0.0087   
-+0.0094   +0.0194   +0.0212   +0.0232   +0.0333   +0.0094   +0.8842   
-
-
-[2] P-matrix for branch length 0.200000
-+0.8123   +0.0081   +0.0249   +0.0303   +0.0533   +0.0571   +0.0139   
-+0.0070   +0.9005   +0.0155   +0.0141   +0.0204   +0.0186   +0.0238   
-+0.0230   +0.0167   +0.8479   +0.0229   +0.0324   +0.0291   +0.0279   
-+0.0331   +0.0179   +0.0271   +0.8060   +0.0424   +0.0377   +0.0358   
-+0.0427   +0.0191   +0.0281   +0.0311   +0.8016   +0.0399   +0.0376   
-+0.0527   +0.0201   +0.0291   +0.0319   +0.0460   +0.8072   +0.0129   
-+0.0139   +0.0278   +0.0303   +0.0328   +0.0469   +0.0140   +0.8342   
-
-+0.7980   +0.0089   +0.0269   +0.0326   +0.0572   +0.0612   +0.0151   
-+0.0076   +0.8924   +0.0168   +0.0152   +0.0221   +0.0201   +0.0257   
-+0.0249   +0.0181   +0.8359   +0.0247   +0.0350   +0.0314   +0.0301   
-+0.0356   +0.0194   +0.0292   +0.7912   +0.0456   +0.0406   +0.0385   
-+0.0458   +0.0206   +0.0303   +0.0334   +0.7867   +0.0429   +0.0403   
-+0.0565   +0.0217   +0.0314   +0.0343   +0.0494   +0.7926   +0.0141   
-+0.0151   +0.0300   +0.0326   +0.0353   +0.0504   +0.0153   +0.8213   
-
-+0.7894   +0.0094   +0.0281   +0.0340   +0.0596   +0.0636   +0.0159   
-+0.0081   +0.8875   +0.0175   +0.0159   +0.0231   +0.0210   +0.0268   
-+0.0260   +0.0189   +0.8288   +0.0258   +0.0365   +0.0327   +0.0314   
-+0.0371   +0.0203   +0.0305   +0.7824   +0.0475   +0.0422   +0.0400   
-+0.0476   +0.0216   +0.0316   +0.0348   +0.7778   +0.0446   +0.0420   
-+0.0587   +0.0226   +0.0327   +0.0357   +0.0515   +0.7839   +0.0148   
-+0.0159   +0.0313   +0.0340   +0.0367   +0.0524   +0.0160   +0.8136   
-
-+0.7816   +0.0098   +0.0292   +0.0353   +0.0617   +0.0658   +0.0165   
-+0.0084   +0.8830   +0.0183   +0.0166   +0.0240   +0.0218   +0.0279   
-+0.0270   +0.0197   +0.8222   +0.0268   +0.0379   +0.0340   +0.0326   
-+0.0385   +0.0211   +0.0316   +0.7743   +0.0492   +0.0438   +0.0415   
-+0.0493   +0.0224   +0.0328   +0.0361   +0.7696   +0.0462   +0.0435   
-+0.0608   +0.0235   +0.0340   +0.0371   +0.0533   +0.7759   +0.0155   
-+0.0165   +0.0325   +0.0353   +0.0380   +0.0543   +0.0168   +0.8065   
-
-+0.7728   +0.0104   +0.0305   +0.0367   +0.0640   +0.0683   +0.0173   
-+0.0089   +0.8779   +0.0191   +0.0173   +0.0251   +0.0228   +0.0290   
-+0.0281   +0.0205   +0.8147   +0.0279   +0.0394   +0.0354   +0.0339   
-+0.0400   +0.0220   +0.0329   +0.7651   +0.0512   +0.0455   +0.0431   
-+0.0512   +0.0234   +0.0342   +0.0376   +0.7605   +0.0480   +0.0451   
-+0.0630   +0.0245   +0.0354   +0.0385   +0.0554   +0.7669   +0.0162   
-+0.0173   +0.0339   +0.0367   +0.0395   +0.0564   +0.0176   +0.7985   
-
-+0.7571   +0.0113   +0.0327   +0.0392   +0.0682   +0.0727   +0.0188   
-+0.0097   +0.8686   +0.0205   +0.0186   +0.0269   +0.0244   +0.0311   
-+0.0302   +0.0221   +0.8014   +0.0299   +0.0423   +0.0379   +0.0363   
-+0.0428   +0.0237   +0.0353   +0.7488   +0.0547   +0.0486   +0.0460   
-+0.0546   +0.0252   +0.0366   +0.0401   +0.7441   +0.0513   +0.0481   
-+0.0671   +0.0263   +0.0379   +0.0411   +0.0592   +0.7509   +0.0176   
-+0.0188   +0.0363   +0.0393   +0.0422   +0.0602   +0.0190   +0.7842   
-
-
-[2] P-matrix for branch length 1.000000
-+0.3977   +0.0472   +0.0905   +0.0958   +0.1515   +0.1537   +0.0636   
-+0.0405   +0.6079   +0.0635   +0.0563   +0.0792   +0.0691   +0.0834   
-+0.0835   +0.0684   +0.4669   +0.0798   +0.1110   +0.0977   +0.0928   
-+0.1045   +0.0717   +0.0943   +0.3758   +0.1312   +0.1151   +0.1075   
-+0.1212   +0.0739   +0.0962   +0.0962   +0.3838   +0.1193   +0.1094   
-+0.1419   +0.0744   +0.0977   +0.0974   +0.1376   +0.3890   +0.0619   
-+0.0636   +0.0973   +0.1005   +0.0985   +0.1368   +0.0671   +0.4362   
-
-+0.3725   +0.0514   +0.0951   +0.0996   +0.1560   +0.1573   +0.0680   
-+0.0441   +0.5839   +0.0676   +0.0598   +0.0840   +0.0731   +0.0876   
-+0.0878   +0.0728   +0.4405   +0.0836   +0.1162   +0.1022   +0.0969   
-+0.1086   +0.0762   +0.0988   +0.3498   +0.1361   +0.1192   +0.1112   
-+0.1248   +0.0784   +0.1007   +0.0998   +0.3600   +0.1234   +0.1130   
-+0.1452   +0.0787   +0.1022   +0.1009   +0.1423   +0.3643   +0.0664   
-+0.0680   +0.1021   +0.1049   +0.1020   +0.1412   +0.0720   +0.4098   
-
-+0.3585   +0.0540   +0.0978   +0.1016   +0.1584   +0.1591   +0.0706   
-+0.0463   +0.5700   +0.0700   +0.0619   +0.0867   +0.0753   +0.0899   
-+0.0903   +0.0754   +0.4256   +0.0858   +0.1191   +0.1047   +0.0992   
-+0.1109   +0.0787   +0.1014   +0.3354   +0.1388   +0.1215   +0.1133   
-+0.1267   +0.0809   +0.1033   +0.1018   +0.3469   +0.1256   +0.1149   
-+0.1469   +0.0811   +0.1047   +0.1028   +0.1449   +0.3506   +0.0690   
-+0.0706   +0.1049   +0.1074   +0.1038   +0.1436   +0.0748   +0.3949   
-
-+0.3463   +0.0563   +0.1002   +0.1034   +0.1604   +0.1606   +0.0729   
-+0.0482   +0.5574   +0.0721   +0.0637   +0.0892   +0.0774   +0.0919   
-+0.0925   +0.0777   +0.4124   +0.0877   +0.1217   +0.1069   +0.1012   
-+0.1128   +0.0811   +0.1037   +0.3228   +0.1411   +0.1235   +0.1150   
-+0.1283   +0.0832   +0.1055   +0.1035   +0.3355   +0.1275   +0.1165   
-+0.1482   +0.0833   +0.1069   +0.1045   +0.1471   +0.3386   +0.0714   
-+0.0729   +0.1073   +0.1096   +0.1054   +0.1456   +0.0773   +0.3818   
-
-+0.3332   +0.0589   +0.1027   +0.1053   +0.1624   +0.1620   +0.0755   
-+0.0505   +0.5436   +0.0745   +0.0657   +0.0919   +0.0796   +0.0942   
-+0.0948   +0.0803   +0.3981   +0.0898   +0.1245   +0.1092   +0.1033   
-+0.1149   +0.0837   +0.1061   +0.3094   +0.1436   +0.1256   +0.1169   
-+0.1299   +0.0858   +0.1079   +0.1053   +0.3234   +0.1295   +0.1182   
-+0.1496   +0.0857   +0.1092   +0.1062   +0.1494   +0.3258   +0.0740   
-+0.0755   +0.1099   +0.1119   +0.1071   +0.1478   +0.0802   +0.3677   
-
-+0.3115   +0.0636   +0.1070   +0.1084   +0.1655   +0.1641   +0.0799   
-+0.0545   +0.5195   +0.0787   +0.0693   +0.0966   +0.0835   +0.0979   
-+0.0988   +0.0847   +0.3740   +0.0933   +0.1292   +0.1132   +0.1069   
-+0.1182   +0.0881   +0.1103   +0.2872   +0.1475   +0.1289   +0.1198   
-+0.1324   +0.0902   +0.1119   +0.1082   +0.3037   +0.1327   +0.1209   
-+0.1514   +0.0899   +0.1132   +0.1091   +0.1531   +0.3048   +0.0785   
-+0.0799   +0.1143   +0.1158   +0.1098   +0.1512   +0.0851   +0.3440   
-
-
-[2] P-matrix for branch length 1.000000
-+0.3977   +0.0472   +0.0905   +0.0958   +0.1515   +0.1537   +0.0636   
-+0.0405   +0.6079   +0.0635   +0.0563   +0.0792   +0.0691   +0.0834   
-+0.0835   +0.0684   +0.4669   +0.0798   +0.1110   +0.0977   +0.0928   
-+0.1045   +0.0717   +0.0943   +0.3758   +0.1312   +0.1151   +0.1075   
-+0.1212   +0.0739   +0.0962   +0.0962   +0.3838   +0.1193   +0.1094   
-+0.1419   +0.0744   +0.0977   +0.0974   +0.1376   +0.3890   +0.0619   
-+0.0636   +0.0973   +0.1005   +0.0985   +0.1368   +0.0671   +0.4362   
-
-+0.3725   +0.0514   +0.0951   +0.0996   +0.1560   +0.1573   +0.0680   
-+0.0441   +0.5839   +0.0676   +0.0598   +0.0840   +0.0731   +0.0876   
-+0.0878   +0.0728   +0.4405   +0.0836   +0.1162   +0.1022   +0.0969   
-+0.1086   +0.0762   +0.0988   +0.3498   +0.1361   +0.1192   +0.1112   
-+0.1248   +0.0784   +0.1007   +0.0998   +0.3600   +0.1234   +0.1130   
-+0.1452   +0.0787   +0.1022   +0.1009   +0.1423   +0.3643   +0.0664   
-+0.0680   +0.1021   +0.1049   +0.1020   +0.1412   +0.0720   +0.4098   
-
-+0.3585   +0.0540   +0.0978   +0.1016   +0.1584   +0.1591   +0.0706   
-+0.0463   +0.5700   +0.0700   +0.0619   +0.0867   +0.0753   +0.0899   
-+0.0903   +0.0754   +0.4256   +0.0858   +0.1191   +0.1047   +0.0992   
-+0.1109   +0.0787   +0.1014   +0.3354   +0.1388   +0.1215   +0.1133   
-+0.1267   +0.0809   +0.1033   +0.1018   +0.3469   +0.1256   +0.1149   
-+0.1469   +0.0811   +0.1047   +0.1028   +0.1449   +0.3506   +0.0690   
-+0.0706   +0.1049   +0.1074   +0.1038   +0.1436   +0.0748   +0.3949   
-
-+0.3463   +0.0563   +0.1002   +0.1034   +0.1604   +0.1606   +0.0729   
-+0.0482   +0.5574   +0.0721   +0.0637   +0.0892   +0.0774   +0.0919   
-+0.0925   +0.0777   +0.4124   +0.0877   +0.1217   +0.1069   +0.1012   
-+0.1128   +0.0811   +0.1037   +0.3228   +0.1411   +0.1235   +0.1150   
-+0.1283   +0.0832   +0.1055   +0.1035   +0.3355   +0.1275   +0.1165   
-+0.1482   +0.0833   +0.1069   +0.1045   +0.1471   +0.3386   +0.0714   
-+0.0729   +0.1073   +0.1096   +0.1054   +0.1456   +0.0773   +0.3818   
-
-+0.3332   +0.0589   +0.1027   +0.1053   +0.1624   +0.1620   +0.0755   
-+0.0505   +0.5436   +0.0745   +0.0657   +0.0919   +0.0796   +0.0942   
-+0.0948   +0.0803   +0.3981   +0.0898   +0.1245   +0.1092   +0.1033   
-+0.1149   +0.0837   +0.1061   +0.3094   +0.1436   +0.1256   +0.1169   
-+0.1299   +0.0858   +0.1079   +0.1053   +0.3234   +0.1295   +0.1182   
-+0.1496   +0.0857   +0.1092   +0.1062   +0.1494   +0.3258   +0.0740   
-+0.0755   +0.1099   +0.1119   +0.1071   +0.1478   +0.0802   +0.3677   
-
-+0.3115   +0.0636   +0.1070   +0.1084   +0.1655   +0.1641   +0.0799   
-+0.0545   +0.5195   +0.0787   +0.0693   +0.0966   +0.0835   +0.0979   
-+0.0988   +0.0847   +0.3740   +0.0933   +0.1292   +0.1132   +0.1069   
-+0.1182   +0.0881   +0.1103   +0.2872   +0.1475   +0.1289   +0.1198   
-+0.1324   +0.0902   +0.1119   +0.1082   +0.3037   +0.1327   +0.1209   
-+0.1514   +0.0899   +0.1132   +0.1091   +0.1531   +0.3048   +0.0785   
-+0.0799   +0.1143   +0.1158   +0.1098   +0.1512   +0.0851   +0.3440   
-
-
-[2] CLV 5: [ {(0.00020,0.01394,0.01414,0.00048,0.00054,0.00058,0.00084),(0.00024,0.01496,0.01509,0.00057,0.00063,0.00068,0.00098),(0.00026,0.01557,0.01566,0.00062,0.00068,0.00074,0.00106),(0.00029,0.01612,0.01617,0.00067,0.00074,0.00080,0.00115),(0.00032,0.01674,0.01673,0.00073,0.00080,0.00087,0.00124),(0.00037,0.01784,0.01773,0.00084,0.00092,0.00100,0.00143)} {(0.65978,0.00005,0.00053,0.00109,0.00182,0.00278,0.00019),(0.63675,0.00006,0.00062,0.00127,0.00210,0.00319,0.00023),(0.62323,0.0 [...]
-[2] CLV 6: [ {(0.00038,0.00009,0.00030,0.00003,0.00004,0.00005,0.00002),(0.00044,0.00011,0.00035,0.00003,0.00005,0.00006,0.00002),(0.00048,0.00012,0.00038,0.00004,0.00005,0.00007,0.00002),(0.00051,0.00013,0.00040,0.00004,0.00006,0.00008,0.00003),(0.00055,0.00014,0.00043,0.00005,0.00007,0.00009,0.00003),(0.00063,0.00016,0.00049,0.00006,0.00008,0.00010,0.00004)} {(0.03391,0.00004,0.00025,0.00048,0.00068,0.01735,0.00007),(0.03476,0.00005,0.00028,0.00054,0.00076,0.01795,0.00008),(0.03518,0.0 [...]
-[2] CLV 7: [ {(0.0006,0.0002,0.7190,0.0007,0.0008,0.0008,0.0009),(0.0007,0.0003,0.6988,0.0009,0.0009,0.0010,0.0011),(0.0008,0.0003,0.6869,0.0009,0.0010,0.0011,0.0012),(0.0009,0.0003,0.6760,0.0010,0.0011,0.0012,0.0012),(0.0009,0.0004,0.6638,0.0011,0.0012,0.0013,0.0013),(0.0011,0.0004,0.6422,0.0012,0.0013,0.0014,0.0015)} {(0.0033,0.0003,0.0008,0.0014,0.0016,0.6516,0.0002),(0.0037,0.0004,0.0010,0.0016,0.0018,0.6282,0.0002),(0.0040,0.0004,0.0011,0.0018,0.0020,0.6145,0.0003),(0.0043,0.0005,0. [...]
-
-ti/tv:alpha(ncats) =   0.10( 1)   logL:       -148.836565
-ti/tv:alpha(ncats) =   1.25( 1)   logL:       -148.836565
-ti/tv:alpha(ncats) = 100.00( 1)   logL:       -148.836565
-ti/tv:alpha(ncats) =   0.10( 4)   logL:       -152.612902
-ti/tv:alpha(ncats) =   1.25( 4)   logL:       -147.485679
-ti/tv:alpha(ncats) = 100.00( 4)   logL:       -148.796866
-ti/tv:alpha(ncats) =   0.10( 6)   logL:       -153.650711
-ti/tv:alpha(ncats) =   1.25( 6)   logL:       -147.533339
-ti/tv:alpha(ncats) = 100.00( 6)   logL:       -148.794223
diff --git a/test/out/scaling.out b/test/out/scaling.out
new file mode 100644
index 0000000..11d335c
--- /dev/null
+++ b/test/out/scaling.out
@@ -0,0 +1,64 @@
+scaling = per-site, alpha = 0.050000, rates = [ 0.000000 0.000001 0.005299 3.994700 ]
+recompute P-matrices: 3997
+recompute CLVs: 1998
+scaler 1995: [ 8 6 21 21 4 ]
+per-site logLH: [ -1565.4625 -1079.1468 -inf -inf -812.9101 ]
+logLH INNER-INNER at edge (3997-3995): -inf, LH derivatives: -nan, -nan
+logLH TIP-INNER at edge (3997-1999): -inf, LH derivatives: -nan, -nan
+
+scaling = per-rate, alpha = 0.050000, rates = [ 0.000000 0.000001 0.005299 3.994700 ]
+recompute P-matrices: 3997
+recompute CLVs: 1998
+scaler 1995: [ 8+(50 22 7 0)  6+(50 25 9 0)  15+(48 16 0 5)  15+(47 16 0 5)  4+(50 27 11 0)  ]
+per-site logLH: [ -1565.4625 -1079.1468 -2838.4636 -2813.7556 -812.9101 ]
+logLH INNER-INNER at edge (3997-3995): -9109.7386, LH derivatives: -2.7826, 2.9738
+logLH TIP-INNER at edge (3997-1999): -9109.7386, LH derivatives: -1.5936, 1.2950
+
+scaling = per-site, alpha = 0.200000, rates = [ 0.000531 0.033775 0.383658 3.582035 ]
+recompute P-matrices: 3997
+recompute CLVs: 1998
+scaler 1995: [ 8 6 21 21 4 ]
+per-site logLH: [ -1567.6326 -1076.7894 -inf -inf -827.4514 ]
+logLH INNER-INNER at edge (3997-3995): -inf, LH derivatives: -nan, -nan
+logLH TIP-INNER at edge (3997-1999): -inf, LH derivatives: -nan, -nan
+
+scaling = per-rate, alpha = 0.200000, rates = [ 0.000531 0.033775 0.383658 3.582035 ]
+recompute P-matrices: 3997
+recompute CLVs: 1998
+scaler 1995: [ 8+(11 3 1 0)  6+(14 6 1 0)  12+(8 0 2 8)  12+(7 0 2 8)  4+(15 7 3 0)  ]
+per-site logLH: [ -1567.6326 -1076.7894 -2277.3326 -2279.8917 -827.4514 ]
+logLH INNER-INNER at edge (3997-3995): -8029.0976, LH derivatives: -2.9702, 3.0540
+logLH TIP-INNER at edge (3997-1999): -8029.0976, LH derivatives: -1.6910, 1.3293
+
+scaling = per-site, alpha = 2.000000, rates = [ 0.293275 0.655014 1.069990 1.981722 ]
+recompute P-matrices: 3997
+recompute CLVs: 1998
+scaler 1995: [ 9 6 13 13 5 ]
+per-site logLH: [ -1603.6166 -1100.1947 -2388.7163 -2399.8925 -913.5515 ]
+logLH INNER-INNER at edge (3997-3995): -8405.9717, LH derivatives: -3.0736, 3.5362
+logLH TIP-INNER at edge (3997-1999): -8405.9717, LH derivatives: -1.4613, 1.3836
+
+scaling = per-rate, alpha = 2.000000, rates = [ 0.293275 0.655014 1.069990 1.981722 ]
+recompute P-matrices: 3997
+recompute CLVs: 1998
+scaler 1995: [ 9+(0 0 0 0)  6+(2 1 0 0)  13+(0 4 6 7)  13+(0 4 6 7)  5+(2 1 0 0)  ]
+per-site logLH: [ -1603.6166 -1100.1947 -2388.7163 -2399.8925 -913.5515 ]
+logLH INNER-INNER at edge (3997-3995): -8405.9717, LH derivatives: -3.0736, 3.5362
+logLH TIP-INNER at edge (3997-1999): -8405.9717, LH derivatives: -1.4613, 1.3836
+
+scaling = per-site, alpha = 99.000000, rates = [ 0.875297 0.964547 1.029683 1.130473 ]
+recompute P-matrices: 3997
+recompute CLVs: 1998
+scaler 1995: [ 9 6 18 18 5 ]
+per-site logLH: [ -1658.3038 -1166.0014 -3313.6724 -3314.2351 -1008.3317 ]
+logLH INNER-INNER at edge (3997-3995): -10460.5445, LH derivatives: -2.4820, 3.3850
+logLH TIP-INNER at edge (3997-1999): -10460.5445, LH derivatives: -1.0708, 1.1693
+
+scaling = per-rate, alpha = 99.000000, rates = [ 0.875297 0.964547 1.029683 1.130473 ]
+recompute P-matrices: 3997
+recompute CLVs: 1998
+scaler 1995: [ 9+(0 0 0 0)  6+(0 0 0 0)  18+(0 1 1 1)  18+(0 1 1 1)  5+(0 0 0 0)  ]
+per-site logLH: [ -1658.3038 -1166.0014 -3313.6724 -3314.2351 -1008.3317 ]
+logLH INNER-INNER at edge (3997-3995): -10460.5445, LH derivatives: -2.4820, 3.3850
+logLH TIP-INNER at edge (3997-1999): -10460.5445, LH derivatives: -1.0708, 1.1693
+
diff --git a/test/runtest.py b/test/runtest.py
index 903e970..8755a5a 100755
--- a/test/runtest.py
+++ b/test/runtest.py
@@ -40,14 +40,16 @@ import time
 #####################
 #   Configuration   #
 #####################
-do_memtest       =  1             # Evaluate memory leaks
-num_replicates   = 20             # Number of samples for the speed test
-all_args         = [0,1,2,3,4,5]  # 0: No vector / No tip pattern
-                                  # 1: No vector / Tip pattern
-                                  # 2: AVX / No tip pattern
-                                  # 3: AVX / Tip pattern
-                                  # 4: SSE / No tip pattern
-                                  # 5: SSE / Tip pattern
+do_memtest       =  1                 # Evaluate memory leaks
+num_replicates   = 20                 # Number of samples for the speed test
+all_args         = [0,1,2,3,4,5,8,9]  # 0: No vector / No tip pattern
+                                      # 1: No vector / Tip pattern
+                                      # 2: AVX / No tip pattern
+                                      # 3: AVX / Tip pattern
+                                      # 4: SSE / No tip pattern
+                                      # 5: SSE / Tip pattern
+                                      # 8: AVX2 / No tip pattern
+                                      # 9: AVX2 / Tip pattern
 #####################
 
 colors={"default":"",
@@ -154,6 +156,14 @@ def runSpeedTest(files):
           attrib += " avx"
           attribstr += " AVX"
           typestr   += "A"
+      elif (args & 4):
+          attrib += " sse"
+          attribstr += " SSE"
+          typestr   += "S"
+      elif (args & 8):
+          attrib += " avx2"
+          attribstr += " AVX2"
+          typestr   += "F"
       else:
           attribstr += " CPU"
           typestr   += "C"
@@ -274,10 +284,14 @@ def runValidation(files):
           attrib    += " avx"
           attribstr += " AVX"
           typestr   += "A"
-      if (args & 4):
+      elif (args & 4):
           attrib    += " sse"
           attribstr += " SSE"
           typestr   += "S"
+      elif (args & 8):
+          attrib    += " avx2"
+          attribstr += " AVX2"
+          typestr   += "F"
       else:
         attribstr += " CPU"
         typestr   += "C"
@@ -382,10 +396,13 @@ if __name__ == "__main__":
 
   header()
 
+  xmod = stat.S_IEXEC | stat.S_IXGRP | stat.S_IXOTH
+  fmod = stat.S_IFREG
+
   # Get the test binaries
   if len(sys.argv) <= 2:
-    files=os.listdir("obj")
-    files=[filename for filename in files if filename != "README"]
+    files=[f for f in os.listdir("obj") if os.stat("obj/"+f).st_mode & fmod]
+    files=[f for f in files if os.stat("obj/"+f).st_mode & xmod]
   else:
     files=sys.argv[2:]
 
diff --git a/test/src/00010_NMDU_lkcalc.c b/test/src/00010_NMDU_lkcalc.c
new file mode 100644
index 0000000..138d113
--- /dev/null
+++ b/test/src/00010_NMDU_lkcalc.c
@@ -0,0 +1,210 @@
+/*
+    Copyright (C) 2015 Diego Darriba, Tomas Flouri
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Contact: Diego Darriba <Diego.Darriba at h-its.org>,
+    Exelixis Lab, Heidelberg Instutute for Theoretical Studies
+    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
+*/
+#include "common.h"
+
+#define N_STATES_NT 4
+#define N_CAT_GAMMA 4
+#define FLOAT_PRECISION 4
+
+static double titv = 2.5;
+static double alpha = 0.5;
+static unsigned int n_cat_gamma = N_CAT_GAMMA;
+unsigned int params_indices[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+
+int main(int argc, char * argv[])
+{
+  unsigned int j;
+  double lk_score;
+  unsigned int n_sites = 12;
+  unsigned int n_tips = 5;
+  double rate_cats[N_CAT_GAMMA];
+  pll_operation_t * operations;
+
+  operations = (pll_operation_t *)malloc(4* sizeof(pll_operation_t));
+
+  operations[0].parent_clv_index    = 5;
+  operations[0].child1_clv_index    = 0;
+  operations[0].child2_clv_index    = 1;
+  operations[0].child1_matrix_index = 1;
+  operations[0].child2_matrix_index = 1;
+  operations[0].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  operations[1].parent_clv_index    = 6;
+  operations[1].child1_clv_index    = 5;
+  operations[1].child2_clv_index    = 2;
+  operations[1].child1_matrix_index = 0;
+  operations[1].child2_matrix_index = 1;
+  operations[1].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[1].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[1].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  operations[2].parent_clv_index    = 7;
+  operations[2].child1_clv_index    = 3;
+  operations[2].child2_clv_index    = 4;
+  operations[2].child1_matrix_index = 1;
+  operations[2].child2_matrix_index = 1;
+  operations[2].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[2].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[2].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  /* check attributes */
+  unsigned int attributes = get_attributes(argc, argv);
+
+  pll_partition_t * partition;
+  partition = pll_partition_create(
+                              n_tips,      /* numer of tips */
+                              4,           /* clv buffers */
+                              N_STATES_NT, /* number of states */
+                              n_sites,     /* sequence length */
+                              1,           /* different rate parameters */
+                              2*n_tips-3,  /* probability matrices */
+                              n_cat_gamma, /* gamma categories */
+                              0,           /* scale buffers */
+                              attributes
+                              );          /* attributes */
+
+  if (!partition)
+  {
+    printf("Error %d: %s\n", pll_errno, pll_errmsg);
+    fatal("Fail creating partition");
+  }
+
+  double branch_lengths[4] = { 0.1, 0.2, 1, 1};
+  double frequencies[4] = { 0.3, 0.4, 0.1, 0.2 };
+  unsigned int matrix_indices[4] = { 0, 1, 2, 3 };
+  double subst_params[6] = {1,titv,1,1,titv,1};
+  double * persite_lnl = (double *) malloc(n_sites * sizeof(double));
+  double checksum;
+
+  if (pll_compute_gamma_cats(alpha, n_cat_gamma, rate_cats, PLL_GAMMA_RATES_MEAN) == PLL_FAILURE)
+  {
+    printf("Error %d: %s\n", pll_errno, pll_errmsg);
+    fatal("Fail computing gamma cats");
+  }
+
+  pll_set_frequencies(partition, 0, frequencies);
+  pll_set_subst_params(partition, 0, subst_params);
+
+  pll_set_tip_states(partition, 0, pll_map_nt, "WAC-CTA-ATCT");
+  pll_set_tip_states(partition, 1, pll_map_nt, "CCC-TTA-ATGT");
+  pll_set_tip_states(partition, 2, pll_map_nt, "A-C-TAG-CTCT");
+  pll_set_tip_states(partition, 3, pll_map_nt, "CTCTTAA-A-CG");
+  pll_set_tip_states(partition, 4, pll_map_nt, "CAC-TCA-A-TG");
+
+  pll_set_category_rates(partition, rate_cats);
+
+  pll_update_prob_matrices(partition, params_indices, matrix_indices, branch_lengths, 4);
+  pll_update_partials(partition, operations, 3);
+
+  for (j = 0; j < 4; ++j)
+  {
+    printf ("[%d] P-matrix for branch length %f\n", j+1, branch_lengths[j]);
+    pll_show_pmatrix(partition, j, FLOAT_PRECISION);
+    printf ("\n");
+  }
+
+  /* show CLVs */
+  printf ("[5] CLV 5: ");
+  pll_show_clv(partition,5,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+  printf ("[6] CLV 6: ");
+  pll_show_clv(partition,6,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+  printf ("[7] CLV 7: ");
+  pll_show_clv(partition,7,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+
+  lk_score = pll_compute_edge_loglikelihood(partition,
+                                            6,
+                                            PLL_SCALE_BUFFER_NONE,
+                                            7,
+                                            PLL_SCALE_BUFFER_NONE,
+                                            0,
+                                            params_indices,
+                                            persite_lnl);
+
+  /* test illegal alpha value */
+  double invalid_alpha = 0;
+  if (pll_compute_gamma_cats(invalid_alpha, N_CAT_GAMMA, rate_cats, PLL_GAMMA_RATES_MEAN) == PLL_FAILURE)
+  {
+    if (pll_errno != PLL_ERROR_PARAM_INVALID)
+     printf("Error is %d instead of %d\n", pll_errno, PLL_ERROR_PARAM_INVALID);
+  }
+  else
+  {
+     printf("Computing gamma rates for alpha = %f should have failed\n",
+         invalid_alpha);
+  }
+
+  printf("\n");
+  printf("inner-inner logL: %.6f\n",
+          lk_score);
+  printf("persite logL:     ");
+  checksum = 0.0;
+  for (int i=0; i<n_sites; i++)
+  {
+    checksum += persite_lnl[i];
+    printf("%.7f  ", persite_lnl[i]);
+  }
+  printf("\n");
+  printf("checksum logL:    %.6f\n",
+          checksum);
+
+  /* move to tip inner */
+
+  operations[0].parent_clv_index    = 7;
+  operations[0].child1_clv_index    = 6;
+  operations[0].child2_clv_index    = 3;
+  operations[0].child1_matrix_index = 0;
+  operations[0].child2_matrix_index = 1;
+  operations[0].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  pll_update_partials(partition, operations, 1);
+
+  lk_score = pll_compute_edge_loglikelihood(partition,
+                                            7,
+                                            PLL_SCALE_BUFFER_NONE,
+                                            4,
+                                            PLL_SCALE_BUFFER_NONE,
+                                            1,
+                                            params_indices,
+                                            persite_lnl);
+
+  printf("tip-inner logL:   %.6f\n",
+          lk_score);
+  printf("persite logL:     ");
+  checksum = 0.0;
+  for (int i=0; i<n_sites; i++)
+  {
+    checksum += persite_lnl[i];
+    printf("%.7f  ", persite_lnl[i]);
+  }
+  printf("\n");
+  printf("checksum logL:    %.6f\n",
+          checksum);
+
+  pll_partition_destroy(partition);
+  free(persite_lnl);
+  free(operations);
+
+  return (0);
+}
diff --git a/test/src/00011_NMAU_lkcalc.c b/test/src/00011_NMAU_lkcalc.c
new file mode 100644
index 0000000..2fb4b32
--- /dev/null
+++ b/test/src/00011_NMAU_lkcalc.c
@@ -0,0 +1,200 @@
+/*
+    Copyright (C) 2015 Diego Darriba, Tomas Flouri
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Contact: Diego Darriba <Diego.Darriba at h-its.org>,
+    Exelixis Lab, Heidelberg Instutute for Theoretical Studies
+    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
+*/
+#include "common.h"
+
+#define N_STATES_AA 20
+#define N_CAT_GAMMA 4
+#define FLOAT_PRECISION 4
+
+static double alpha = 0.5;
+static unsigned int n_cat_gamma = N_CAT_GAMMA;
+unsigned int params_indices[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+
+int main(int argc, char * argv[])
+{
+  unsigned int j;
+  double lk_score;
+  unsigned int n_sites = 15;
+  unsigned int n_tips = 5;
+  double rate_cats[N_CAT_GAMMA];
+  pll_operation_t * operations;
+  int return_val;
+
+  operations = (pll_operation_t *)malloc(4* sizeof(pll_operation_t));
+
+  operations[0].parent_clv_index    = 5;
+  operations[0].child1_clv_index    = 0;
+  operations[0].child2_clv_index    = 1;
+  operations[0].child1_matrix_index = 1;
+  operations[0].child2_matrix_index = 1;
+  operations[0].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  operations[1].parent_clv_index    = 6;
+  operations[1].child1_clv_index    = 5;
+  operations[1].child2_clv_index    = 2;
+  operations[1].child1_matrix_index = 0;
+  operations[1].child2_matrix_index = 1;
+  operations[1].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[1].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[1].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  operations[2].parent_clv_index    = 7;
+  operations[2].child1_clv_index    = 3;
+  operations[2].child2_clv_index    = 4;
+  operations[2].child1_matrix_index = 1;
+  operations[2].child2_matrix_index = 1;
+  operations[2].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[2].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[2].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  /* check attributes */
+  unsigned int attributes = get_attributes(argc, argv);
+
+  pll_partition_t * partition;
+  partition = pll_partition_create(
+                              n_tips,      /* numer of tips */
+                              4,           /* clv buffers */
+                              N_STATES_AA, /* number of states */
+                              n_sites,     /* sequence length */
+                              1,           /* different rate parameters */
+                              2*n_tips-3,  /* probability matrices */
+                              n_cat_gamma, /* gamma categories */
+                              0,           /* scale buffers */
+                              attributes
+                              );          /* attributes */
+
+  if (!partition)
+  {
+    printf("Error %d: %s\n", pll_errno, pll_errmsg);
+    fatal("Fail creating partition");
+  }
+
+  double branch_lengths[4] = { 0.1, 0.2, 1, 1};
+  unsigned int matrix_indices[4] = { 0, 1, 2, 3 };
+  double * persite_lnl = (double *) malloc(n_sites * sizeof(double));
+  double checksum;
+
+  if (pll_compute_gamma_cats(alpha, n_cat_gamma, rate_cats, PLL_GAMMA_RATES_MEAN) == PLL_FAILURE)
+  {
+    printf("Error %d: %s\n", pll_errno, pll_errmsg);
+    fatal("Fail computing gamma cats");
+  }
+
+  pll_set_frequencies(partition, 0, pll_aa_freqs_dayhoff);
+  pll_set_subst_params(partition, 0, pll_aa_rates_dayhoff);
+
+  return_val = PLL_SUCCESS;
+  return_val &= pll_set_tip_states(partition, 0, pll_map_aa, "PIGLRVTLRRDRMWI");
+  return_val &= pll_set_tip_states(partition, 1, pll_map_aa, "IQGMDITIVT-----");
+  return_val &= pll_set_tip_states(partition, 2, pll_map_aa, "--AFALLQKIGMPFE");
+  return_val &= pll_set_tip_states(partition, 3, pll_map_aa, "MDISIVT------TA");
+  return_val &= pll_set_tip_states(partition, 4, pll_map_aa, "GLSEQTVFHEIDQDK");
+
+  if (!return_val)
+    fatal("Error setting tip states");
+
+  pll_set_category_rates(partition, rate_cats);
+
+  pll_update_prob_matrices(partition, params_indices, matrix_indices, branch_lengths, 4);
+  pll_update_partials(partition, operations, 3);
+
+  for (j = 0; j < 4; ++j)
+  {
+    printf ("[%d] P-matrix for branch length %f\n", j+1, branch_lengths[j]);
+    pll_show_pmatrix(partition, j, FLOAT_PRECISION);
+    printf ("\n");
+  }
+
+  /* show CLVs */
+  printf ("[5] CLV 5: ");
+  pll_show_clv(partition,5,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+  printf ("[6] CLV 6: ");
+  pll_show_clv(partition,6,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+  printf ("[7] CLV 7: ");
+  pll_show_clv(partition,7,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+
+  lk_score = pll_compute_edge_loglikelihood(partition,
+                                            6,
+                                            PLL_SCALE_BUFFER_NONE,
+                                            7,
+                                            PLL_SCALE_BUFFER_NONE,
+                                            0,
+                                            params_indices,
+                                            persite_lnl);
+
+  printf("\n");
+  printf("inner-inner logL: %.6f\n",
+          lk_score);
+  printf("persite logL:     ");
+  checksum = 0.0;
+  for (int i=0; i<n_sites; i++)
+  {
+    checksum += persite_lnl[i];
+    printf("%.7f  ", persite_lnl[i]);
+  }
+  printf("\n");
+  printf("checksum logL:    %.6f\n",
+          checksum);
+
+  /* move to tip inner */
+
+  operations[0].parent_clv_index    = 7;
+  operations[0].child1_clv_index    = 6;
+  operations[0].child2_clv_index    = 3;
+  operations[0].child1_matrix_index = 0;
+  operations[0].child2_matrix_index = 1;
+  operations[0].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  pll_update_partials(partition, operations, 1);
+
+assert(n_sites == partition->sites);
+  lk_score = pll_compute_edge_loglikelihood(partition,
+                                            7,
+                                            PLL_SCALE_BUFFER_NONE,
+                                            4,
+                                            PLL_SCALE_BUFFER_NONE,
+                                            1,
+                                            params_indices,
+                                            persite_lnl);
+
+  printf("tip-inner logL:   %.6f\n",
+          lk_score);
+  printf("persite logL:     ");
+  checksum = 0.0;
+  for (int i=0; i<n_sites; i++)
+  {
+    checksum += persite_lnl[i];
+    printf("%.7f  ", persite_lnl[i]);
+  }
+  printf("\n");
+  printf("checksum logL:    %.6f\n",
+          checksum);
+
+  pll_partition_destroy(partition);
+  free(persite_lnl);
+  free(operations);
+
+  return (0);
+}
diff --git a/test/src/00012_NMOU_lkcalc.c b/test/src/00012_NMOU_lkcalc.c
new file mode 100644
index 0000000..eccd0f8
--- /dev/null
+++ b/test/src/00012_NMOU_lkcalc.c
@@ -0,0 +1,221 @@
+/*
+    Copyright (C) 2015 Diego Darriba, Tomas Flouri
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Contact: Diego Darriba <Diego.Darriba at h-its.org>,
+    Exelixis Lab, Heidelberg Instutute for Theoretical Studies
+    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
+*/
+#include "common.h"
+
+#define N_STATES_ODD     7
+#define N_SUBST_PARAMS  21 // N_STATES*(N_STATES-1)/2
+#define N_CAT_GAMMA      4
+#define FLOAT_PRECISION  4
+
+static double alpha = 0.5;
+static unsigned int n_cat_gamma = N_CAT_GAMMA;
+unsigned int params_indices[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+
+/* odd map with 7 states: A..G */
+const unsigned int odd_map[256] =
+  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x3f, 0, 0, 0x3f, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x3f, 0, 0x01, 0x02, 0x04,
+    0x08, 0x0c, 0x10, 0x20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0x01, 0x02, 0x04, 0x08, 0x0c, 0x10, 0x20, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+int main(int argc, char * argv[])
+{
+  unsigned int j;
+  double lk_score;
+  unsigned int n_sites = 12;
+  unsigned int n_tips = 5;
+  double rate_cats[N_CAT_GAMMA];
+  pll_operation_t * operations;
+  int return_val;
+
+  operations = (pll_operation_t *)malloc(4* sizeof(pll_operation_t));
+
+  operations[0].parent_clv_index    = 5;
+  operations[0].child1_clv_index    = 0;
+  operations[0].child2_clv_index    = 1;
+  operations[0].child1_matrix_index = 1;
+  operations[0].child2_matrix_index = 1;
+  operations[0].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  operations[1].parent_clv_index    = 6;
+  operations[1].child1_clv_index    = 5;
+  operations[1].child2_clv_index    = 2;
+  operations[1].child1_matrix_index = 0;
+  operations[1].child2_matrix_index = 1;
+  operations[1].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[1].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[1].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  operations[2].parent_clv_index    = 7;
+  operations[2].child1_clv_index    = 3;
+  operations[2].child2_clv_index    = 4;
+  operations[2].child1_matrix_index = 1;
+  operations[2].child2_matrix_index = 1;
+  operations[2].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[2].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[2].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  /* check attributes */
+  unsigned int attributes = get_attributes(argc, argv);
+
+  pll_partition_t * partition;
+  partition = pll_partition_create(
+                              n_tips,      /* numer of tips */
+                              4,           /* clv buffers */
+                              N_STATES_ODD, /* number of states */
+                              n_sites,     /* sequence length */
+                              1,           /* different rate parameters */
+                              2*n_tips-3,  /* probability matrices */
+                              n_cat_gamma, /* gamma categories */
+                              0,           /* scale buffers */
+                              attributes
+                              );          /* attributes */
+
+  if (!partition)
+  {
+    printf("Error %d: %s\n", pll_errno, pll_errmsg);
+    fatal("Fail creating partition");
+  }
+
+  double branch_lengths[4] = { 0.1, 0.2, 1, 1};
+  double frequencies[N_STATES_ODD] = {0.12, 0.14, 0.13, 0.11, 0.15, 0.13, 0.12};
+  unsigned int matrix_indices[4] = { 0, 1, 2, 3 };
+  double subst_params[N_SUBST_PARAMS] = { 0.5, 2.0, 3.0, 4.0, 5.0, 1.1,
+                                               1.2, 1.3, 1.4, 1.5, 2.1,
+                                                    2.2, 2.3, 2.4, 2.5,
+                                                         3.1, 3.2, 3.3,
+                                                              3.4, 3.5,
+                                                                   1.0 };
+  double * persite_lnl = (double *) malloc(n_sites * sizeof(double));
+  double checksum;
+
+  if (pll_compute_gamma_cats(alpha, n_cat_gamma, rate_cats, PLL_GAMMA_RATES_MEAN) == PLL_FAILURE)
+  {
+    printf("Error %d: %s\n", pll_errno, pll_errmsg);
+    fatal("Fail computing gamma cats");
+  }
+
+  pll_set_frequencies(partition, 0, frequencies);
+  pll_set_subst_params(partition, 0, subst_params);
+
+  return_val = PLL_SUCCESS;
+  return_val &= pll_set_tip_states(partition, 0, odd_map, "AAB-CCD-EFAA");
+  return_val &= pll_set_tip_states(partition, 1, odd_map, "ACC-FBA-ABGG");
+  return_val &= pll_set_tip_states(partition, 2, odd_map, "A-C-GAG-GCCF");
+  return_val &= pll_set_tip_states(partition, 3, odd_map, "ADCFCAA-A-CG");
+  return_val &= pll_set_tip_states(partition, 4, odd_map, "ABC-BCA-A-BG");
+
+  if (!return_val)
+    fatal("Error setting tip states");
+
+  pll_set_category_rates(partition, rate_cats);
+
+  pll_update_prob_matrices(partition, params_indices, matrix_indices, branch_lengths, 4);
+  pll_update_partials(partition, operations, 3);
+
+  for (j = 0; j < 4; ++j)
+  {
+    printf ("[%d] P-matrix for branch length %f\n", j+1, branch_lengths[j]);
+    pll_show_pmatrix(partition, j, FLOAT_PRECISION);
+    printf ("\n");
+  }
+
+  /* show CLVs */
+  printf ("[5] CLV 5: ");
+  pll_show_clv(partition,5,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+  printf ("[6] CLV 6: ");
+  pll_show_clv(partition,6,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+  printf ("[7] CLV 7: ");
+  pll_show_clv(partition,7,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+
+  lk_score = pll_compute_edge_loglikelihood(partition,
+                                            6,
+                                            PLL_SCALE_BUFFER_NONE,
+                                            7,
+                                            PLL_SCALE_BUFFER_NONE,
+                                            0,
+                                            params_indices,
+                                            persite_lnl);
+
+  printf("\n");
+  printf("inner-inner logL: %.6f\n",
+          lk_score);
+  printf("persite logL:     ");
+  checksum = 0.0;
+  for (int i=0; i<n_sites; i++)
+  {
+    checksum += persite_lnl[i];
+    printf("%.7f  ", persite_lnl[i]);
+  }
+  printf("\n");
+  printf("checksum logL:    %.6f\n",
+          checksum);
+
+  /* move to tip inner */
+
+  operations[0].parent_clv_index    = 7;
+  operations[0].child1_clv_index    = 6;
+  operations[0].child2_clv_index    = 3;
+  operations[0].child1_matrix_index = 0;
+  operations[0].child2_matrix_index = 1;
+  operations[0].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  pll_update_partials(partition, operations, 1);
+
+  lk_score = pll_compute_edge_loglikelihood(partition,
+                                            7,
+                                            PLL_SCALE_BUFFER_NONE,
+                                            4,
+                                            PLL_SCALE_BUFFER_NONE,
+                                            1,
+                                            params_indices,
+                                            persite_lnl);
+
+  printf("tip-inner logL:   %.6f\n",
+          lk_score);
+  printf("persite logL:     ");
+  checksum = 0.0;
+  for (int i=0; i<n_sites; i++)
+  {
+    checksum += persite_lnl[i];
+    printf("%.7f  ", persite_lnl[i]);
+  }
+  printf("\n");
+  printf("checksum logL:    %.6f\n",
+          checksum);
+
+  pll_partition_destroy(partition);
+  free(persite_lnl);
+  free(operations);
+
+  return (0);
+}
diff --git a/test/src/00020_NMDR_lkcalc.c b/test/src/00020_NMDR_lkcalc.c
new file mode 100644
index 0000000..d4555fc
--- /dev/null
+++ b/test/src/00020_NMDR_lkcalc.c
@@ -0,0 +1,222 @@
+/*
+    Copyright (C) 2015 Diego Darriba, Tomas Flouri
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Contact: Diego Darriba <Diego.Darriba at h-its.org>,
+    Exelixis Lab, Heidelberg Instutute for Theoretical Studies
+    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
+*/
+#include "common.h"
+
+#define N_STATES_NT 4
+#define N_CAT_GAMMA 4
+#define FLOAT_PRECISION 4
+
+static double titv = 2.5;
+static double alpha = 0.5;
+static unsigned int n_cat_gamma = N_CAT_GAMMA;
+unsigned int params_indices[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+
+int main(int argc, char * argv[])
+{
+  unsigned int j;
+  double lk_score;
+  unsigned int n_sites = 12;
+  unsigned int n_tips = 5;
+  double rate_cats[N_CAT_GAMMA];
+  pll_operation_t * operations;
+  double * persite_lnl = (double *) malloc(n_sites * sizeof(double));
+  double checksum;
+
+  operations = (pll_operation_t *)malloc(4* sizeof(pll_operation_t));
+
+  operations[0].parent_clv_index    = 5;
+  operations[0].child1_clv_index    = 0;
+  operations[0].child2_clv_index    = 1;
+  operations[0].child1_matrix_index = 1;
+  operations[0].child2_matrix_index = 1;
+  operations[0].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  operations[1].parent_clv_index    = 6;
+  operations[1].child1_clv_index    = 5;
+  operations[1].child2_clv_index    = 2;
+  operations[1].child1_matrix_index = 0;
+  operations[1].child2_matrix_index = 1;
+  operations[1].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[1].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[1].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  operations[2].parent_clv_index    = 7;
+  operations[2].child1_clv_index    = 3;
+  operations[2].child2_clv_index    = 4;
+  operations[2].child1_matrix_index = 1;
+  operations[2].child2_matrix_index = 1;
+  operations[2].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[2].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[2].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  operations[3].parent_clv_index    = 8;
+  operations[3].child1_clv_index    = 7;
+  operations[3].child2_clv_index    = 6;
+  operations[3].child1_matrix_index = 2;
+  operations[3].child2_matrix_index = 3;
+  operations[3].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[3].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[3].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  /* check attributes */
+  unsigned int attributes = get_attributes(argc, argv);
+
+  pll_partition_t * partition;
+  partition = pll_partition_create(
+                              n_tips,      /* numer of tips */
+                              4,           /* clv buffers */
+                              N_STATES_NT, /* number of states */
+                              n_sites,     /* sequence length */
+                              1,           /* different rate parameters */
+                              2*n_tips-3,  /* probability matrices */
+                              n_cat_gamma, /* gamma categories */
+                              0,           /* scale buffers */
+                              attributes
+                              );          /* attributes */
+
+  if (!partition)
+  {
+    printf("Error %d: %s\n", pll_errno, pll_errmsg);
+    fatal("Fail creating partition");
+  }
+
+  double branch_lengths[4] = { 0.5, 0.5, 0.3, 0.2};
+  double frequencies[4] = { 0.3, 0.4, 0.1, 0.2 };
+  unsigned int matrix_indices[4] = { 0, 1, 2, 3 };
+  double subst_params[6] = {1,titv,1,1,titv,1};
+
+  if (pll_compute_gamma_cats(alpha, n_cat_gamma, rate_cats, PLL_GAMMA_RATES_MEAN) == PLL_FAILURE)
+  {
+    printf("Error %d: %s\n", pll_errno, pll_errmsg);
+    fatal("Fail computing gamma cats");
+  }
+
+  pll_set_frequencies(partition, 0, frequencies);
+  pll_set_subst_params(partition, 0, subst_params);
+
+  pll_set_tip_states(partition, 0, pll_map_nt, "WAC-CTA-ATCT");
+  pll_set_tip_states(partition, 1, pll_map_nt, "CCC-TTA-ATGT");
+  pll_set_tip_states(partition, 2, pll_map_nt, "A-C-TAG-CTCT");
+  pll_set_tip_states(partition, 3, pll_map_nt, "CTCTTAA-A-CG");
+  pll_set_tip_states(partition, 4, pll_map_nt, "CAC-TCA-A-TG");
+
+  pll_set_category_rates(partition, rate_cats);
+
+  pll_update_prob_matrices(partition, params_indices, matrix_indices, branch_lengths, 4);
+  pll_update_partials(partition, operations, 4);
+
+  for (j = 0; j < 4; ++j)
+  {
+    printf ("[%d] P-matrix for branch length %f\n", j+1, branch_lengths[j]);
+    pll_show_pmatrix(partition, j, FLOAT_PRECISION);
+    printf ("\n");
+  }
+
+  /* show CLVs */
+  printf ("[5] CLV 5: ");
+  pll_show_clv(partition,5,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+  printf ("[6] CLV 6: ");
+  pll_show_clv(partition,6,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+  printf ("[7] CLV 7: ");
+  pll_show_clv(partition,7,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+
+  lk_score = pll_compute_root_loglikelihood(partition,
+                                            8,
+                                            PLL_SCALE_BUFFER_NONE,
+                                            params_indices,
+                                            persite_lnl);
+
+  /* test illegal alpha value */
+  double invalid_alpha = 0;
+  if (pll_compute_gamma_cats(invalid_alpha, N_CAT_GAMMA, rate_cats, PLL_GAMMA_RATES_MEAN) == PLL_FAILURE)
+  {
+    if (pll_errno != PLL_ERROR_PARAM_INVALID)
+     printf("Error is %d instead of %d\n", pll_errno, PLL_ERROR_PARAM_INVALID);
+  }
+  else
+  {
+     printf("Computing gamma rates for alpha = %f should have failed\n",
+         invalid_alpha);
+  }
+
+  printf("\n");
+  printf("inner-inner logL: %.6f\n",
+          lk_score);
+  printf("persite logL:     ");
+  checksum = 0.0;
+  for (int i=0; i<n_sites; i++)
+  {
+    checksum += persite_lnl[i];
+    printf("%.7f  ", persite_lnl[i]);
+  }
+  printf("\n");
+  printf("checksum logL:    %.6f\n",
+          checksum);
+
+  /* move to tip inner */
+
+  operations[0].parent_clv_index    = 7;
+  operations[0].child1_clv_index    = 6;
+  operations[0].child2_clv_index    = 3;
+  operations[0].child1_matrix_index = 0;
+  operations[0].child2_matrix_index = 1;
+  operations[0].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  operations[1].parent_clv_index    = 8;
+  operations[1].child1_clv_index    = 7;
+  operations[1].child2_clv_index    = 4;
+  operations[1].child1_matrix_index = 2;
+  operations[1].child2_matrix_index = 3;
+  operations[1].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[1].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[1].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  pll_update_partials(partition, operations, 2);
+
+  lk_score = pll_compute_root_loglikelihood(partition,
+                                            8,
+                                            PLL_SCALE_BUFFER_NONE,
+                                            params_indices,
+                                            persite_lnl);
+
+  printf("tip-inner logL:   %.6f\n",
+          lk_score);
+  printf("persite logL:     ");
+  checksum = 0.0;
+  for (int i=0; i<n_sites; i++)
+  {
+    checksum += persite_lnl[i];
+    printf("%.7f  ", persite_lnl[i]);
+  }
+  printf("\n");
+  printf("checksum logL:    %.6f\n",
+          checksum);
+
+  pll_partition_destroy(partition);
+  free(persite_lnl);
+  free(operations);
+
+  return (0);
+}
diff --git a/test/src/00021_NMAR_lkcalc.c b/test/src/00021_NMAR_lkcalc.c
new file mode 100644
index 0000000..628f5f3
--- /dev/null
+++ b/test/src/00021_NMAR_lkcalc.c
@@ -0,0 +1,211 @@
+/*
+    Copyright (C) 2015 Diego Darriba, Tomas Flouri
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Contact: Diego Darriba <Diego.Darriba at h-its.org>,
+    Exelixis Lab, Heidelberg Instutute for Theoretical Studies
+    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
+*/
+#include "common.h"
+
+#define N_STATES_AA 20
+#define N_CAT_GAMMA 4
+#define FLOAT_PRECISION 4
+
+static double alpha = 0.5;
+static unsigned int n_cat_gamma = N_CAT_GAMMA;
+unsigned int params_indices[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+
+int main(int argc, char * argv[])
+{
+  unsigned int j;
+  double lk_score;
+  unsigned int n_sites = 12;
+  unsigned int n_tips = 5;
+  double rate_cats[N_CAT_GAMMA];
+  pll_operation_t * operations;
+  double * persite_lnl = (double *) malloc(n_sites * sizeof(double));
+  double checksum;
+  int return_val;
+
+  operations = (pll_operation_t *)malloc(4* sizeof(pll_operation_t));
+
+  operations[0].parent_clv_index    = 5;
+  operations[0].child1_clv_index    = 0;
+  operations[0].child2_clv_index    = 1;
+  operations[0].child1_matrix_index = 1;
+  operations[0].child2_matrix_index = 1;
+  operations[0].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  operations[1].parent_clv_index    = 6;
+  operations[1].child1_clv_index    = 5;
+  operations[1].child2_clv_index    = 2;
+  operations[1].child1_matrix_index = 0;
+  operations[1].child2_matrix_index = 1;
+  operations[1].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[1].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[1].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  operations[2].parent_clv_index    = 7;
+  operations[2].child1_clv_index    = 3;
+  operations[2].child2_clv_index    = 4;
+  operations[2].child1_matrix_index = 1;
+  operations[2].child2_matrix_index = 1;
+  operations[2].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[2].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[2].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  operations[3].parent_clv_index    = 8;
+  operations[3].child1_clv_index    = 7;
+  operations[3].child2_clv_index    = 6;
+  operations[3].child1_matrix_index = 2;
+  operations[3].child2_matrix_index = 3;
+  operations[3].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[3].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[3].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  /* check attributes */
+  unsigned int attributes = get_attributes(argc, argv);
+
+  pll_partition_t * partition;
+  partition = pll_partition_create(
+                              n_tips,      /* numer of tips */
+                              4,           /* clv buffers */
+                              N_STATES_AA, /* number of states */
+                              n_sites,     /* sequence length */
+                              1,           /* different rate parameters */
+                              2*n_tips-3,  /* probability matrices */
+                              n_cat_gamma, /* gamma categories */
+                              0,           /* scale buffers */
+                              attributes
+                              );          /* attributes */
+
+  if (!partition)
+  {
+    printf("Error %d: %s\n", pll_errno, pll_errmsg);
+    fatal("Fail creating partition");
+  }
+
+  double branch_lengths[4] = { 0.5, 0.5, 0.3, 0.2};
+  unsigned int matrix_indices[4] = { 0, 1, 2, 3 };
+
+  if (pll_compute_gamma_cats(alpha, n_cat_gamma, rate_cats, PLL_GAMMA_RATES_MEAN) == PLL_FAILURE)
+  {
+    printf("Error %d: %s\n", pll_errno, pll_errmsg);
+    fatal("Fail computing gamma cats");
+  }
+
+  pll_set_frequencies(partition, 0, pll_aa_freqs_dayhoff);
+  pll_set_subst_params(partition, 0, pll_aa_rates_dayhoff);
+
+  return_val = PLL_SUCCESS;
+  return_val &= pll_set_tip_states(partition, 0, pll_map_aa, "PIGLRVTLRRDRMWI");
+  return_val &= pll_set_tip_states(partition, 1, pll_map_aa, "IQGMDITIVT-----");
+  return_val &= pll_set_tip_states(partition, 2, pll_map_aa, "--AFALLQKIGMPFE");
+  return_val &= pll_set_tip_states(partition, 3, pll_map_aa, "MDISIVT------TA");
+  return_val &= pll_set_tip_states(partition, 4, pll_map_aa, "GLSEQTVFHEIDQDK");
+
+  if (!return_val)
+    fatal("Error setting tip states");
+    
+  pll_set_category_rates(partition, rate_cats);
+
+  pll_update_prob_matrices(partition, params_indices, matrix_indices, branch_lengths, 4);
+  pll_update_partials(partition, operations, 4);
+
+  for (j = 0; j < 4; ++j)
+  {
+    printf ("[%d] P-matrix for branch length %f\n", j+1, branch_lengths[j]);
+    pll_show_pmatrix(partition, j, FLOAT_PRECISION);
+    printf ("\n");
+  }
+
+  /* show CLVs */
+  printf ("[5] CLV 5: ");
+  pll_show_clv(partition,5,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+  printf ("[6] CLV 6: ");
+  pll_show_clv(partition,6,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+  printf ("[7] CLV 7: ");
+  pll_show_clv(partition,7,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+
+  lk_score = pll_compute_root_loglikelihood(partition,
+                                            8,
+                                            PLL_SCALE_BUFFER_NONE,
+                                            params_indices,
+                                            persite_lnl);
+
+  printf("\n");
+  printf("inner-inner logL: %.6f\n",
+          lk_score);
+  printf("persite logL:     ");
+  checksum = 0.0;
+  for (int i=0; i<n_sites; i++)
+  {
+    checksum += persite_lnl[i];
+    printf("%.7f  ", persite_lnl[i]);
+  }
+  printf("\n");
+  printf("checksum logL:    %.6f\n",
+          checksum);
+
+  /* move to tip inner */
+
+  operations[0].parent_clv_index    = 7;
+  operations[0].child1_clv_index    = 6;
+  operations[0].child2_clv_index    = 3;
+  operations[0].child1_matrix_index = 0;
+  operations[0].child2_matrix_index = 1;
+  operations[0].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  operations[1].parent_clv_index    = 8;
+  operations[1].child1_clv_index    = 7;
+  operations[1].child2_clv_index    = 4;
+  operations[1].child1_matrix_index = 2;
+  operations[1].child2_matrix_index = 3;
+  operations[1].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[1].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[1].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  pll_update_partials(partition, operations, 2);
+
+  lk_score = pll_compute_root_loglikelihood(partition,
+                                            8,
+                                            PLL_SCALE_BUFFER_NONE,
+                                            params_indices,
+                                            persite_lnl);
+
+  printf("tip-inner logL:   %.6f\n",
+          lk_score);
+  printf("persite logL:     ");
+  checksum = 0.0;
+  for (int i=0; i<n_sites; i++)
+  {
+    checksum += persite_lnl[i];
+    printf("%.7f  ", persite_lnl[i]);
+  }
+  printf("\n");
+  printf("checksum logL:    %.6f\n",
+          checksum);
+
+  pll_partition_destroy(partition);
+  free(persite_lnl);
+  free(operations);
+
+  return (0);
+}
diff --git a/test/src/00022_NMOR_lkcalc.c b/test/src/00022_NMOR_lkcalc.c
new file mode 100644
index 0000000..5a6d7bc
--- /dev/null
+++ b/test/src/00022_NMOR_lkcalc.c
@@ -0,0 +1,246 @@
+/*
+    Copyright (C) 2015 Diego Darriba, Tomas Flouri
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Contact: Diego Darriba <Diego.Darriba at h-its.org>,
+    Exelixis Lab, Heidelberg Instutute for Theoretical Studies
+    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
+*/
+#include "common.h"
+
+#define N_STATES_ODD     7
+#define N_SUBST_PARAMS  21 // N_STATES*(N_STATES-1)/2
+#define N_CAT_GAMMA 4
+#define FLOAT_PRECISION 4
+
+static double alpha = 0.5;
+static unsigned int n_cat_gamma = N_CAT_GAMMA;
+unsigned int params_indices[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+
+/* odd map with 7 states: A..G */
+const unsigned int odd_map[256] =
+  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x3f, 0, 0, 0x3f, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x3f, 0, 0x01, 0x02, 0x04,
+    0x08, 0x0c, 0x10, 0x20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0x01, 0x02, 0x04, 0x08, 0x0c, 0x10, 0x20, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+int main(int argc, char * argv[])
+{
+  unsigned int j;
+  double lk_score;
+  unsigned int n_sites = 12;
+  unsigned int n_tips = 5;
+  double rate_cats[N_CAT_GAMMA];
+  pll_operation_t * operations;
+  double * persite_lnl = (double *) malloc(n_sites * sizeof(double));
+  double checksum;
+  int return_val;
+
+  operations = (pll_operation_t *)malloc(4* sizeof(pll_operation_t));
+
+  operations[0].parent_clv_index    = 5;
+  operations[0].child1_clv_index    = 0;
+  operations[0].child2_clv_index    = 1;
+  operations[0].child1_matrix_index = 1;
+  operations[0].child2_matrix_index = 1;
+  operations[0].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  operations[1].parent_clv_index    = 6;
+  operations[1].child1_clv_index    = 5;
+  operations[1].child2_clv_index    = 2;
+  operations[1].child1_matrix_index = 0;
+  operations[1].child2_matrix_index = 1;
+  operations[1].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[1].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[1].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  operations[2].parent_clv_index    = 7;
+  operations[2].child1_clv_index    = 3;
+  operations[2].child2_clv_index    = 4;
+  operations[2].child1_matrix_index = 1;
+  operations[2].child2_matrix_index = 1;
+  operations[2].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[2].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[2].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  operations[3].parent_clv_index    = 8;
+  operations[3].child1_clv_index    = 7;
+  operations[3].child2_clv_index    = 6;
+  operations[3].child1_matrix_index = 2;
+  operations[3].child2_matrix_index = 3;
+  operations[3].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[3].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[3].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  /* check attributes */
+  unsigned int attributes = get_attributes(argc, argv);
+
+  pll_partition_t * partition;
+  partition = pll_partition_create(
+                              n_tips,      /* numer of tips */
+                              4,           /* clv buffers */
+                              N_STATES_ODD, /* number of states */
+                              n_sites,     /* sequence length */
+                              1,           /* different rate parameters */
+                              2*n_tips-3,  /* probability matrices */
+                              n_cat_gamma, /* gamma categories */
+                              0,           /* scale buffers */
+                              attributes
+                              );          /* attributes */
+
+  if (!partition)
+  {
+    printf("Error %d: %s\n", pll_errno, pll_errmsg);
+    fatal("Fail creating partition");
+  }
+
+  double branch_lengths[4] = { 0.5, 0.5, 0.3, 0.2};
+  double frequencies[N_STATES_ODD] = {0.12, 0.14, 0.13, 0.11, 0.15, 0.13, 0.12};
+  unsigned int matrix_indices[4] = { 0, 1, 2, 3 };
+  double subst_params[N_SUBST_PARAMS] = { 0.5, 2.0, 3.0, 4.0, 5.0, 1.1,
+                                               1.2, 1.3, 1.4, 1.5, 2.1,
+                                                    2.2, 2.3, 2.4, 2.5,
+                                                         3.1, 3.2, 3.3,
+                                                              3.4, 3.5,
+                                                                   1.0 };
+
+  if (pll_compute_gamma_cats(alpha, n_cat_gamma, rate_cats, PLL_GAMMA_RATES_MEAN) == PLL_FAILURE)
+  {
+    printf("Error %d: %s\n", pll_errno, pll_errmsg);
+    fatal("Fail computing gamma cats");
+  }
+
+  pll_set_frequencies(partition, 0, frequencies);
+  pll_set_subst_params(partition, 0, subst_params);
+
+  return_val = PLL_SUCCESS;
+  return_val &= pll_set_tip_states(partition, 0, odd_map, "AAB-CCD-EFAA");
+  return_val &= pll_set_tip_states(partition, 1, odd_map, "ACC-FBA-ABGG");
+  return_val &= pll_set_tip_states(partition, 2, odd_map, "A-C-GAG-GCCF");
+  return_val &= pll_set_tip_states(partition, 3, odd_map, "ADCFCAA-A-CG");
+  return_val &= pll_set_tip_states(partition, 4, odd_map, "ABC-BCA-A-BG");
+
+  if (!return_val)
+    fatal("Error setting tip states");
+
+  pll_set_category_rates(partition, rate_cats);
+
+  pll_update_prob_matrices(partition, params_indices, matrix_indices, branch_lengths, 4);
+  pll_update_partials(partition, operations, 4);
+
+  for (j = 0; j < 4; ++j)
+  {
+    printf ("[%d] P-matrix for branch length %f\n", j+1, branch_lengths[j]);
+    pll_show_pmatrix(partition, j, FLOAT_PRECISION);
+    printf ("\n");
+  }
+
+  /* show CLVs */
+  printf ("[5] CLV 5: ");
+  pll_show_clv(partition,5,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+  printf ("[6] CLV 6: ");
+  pll_show_clv(partition,6,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+  printf ("[7] CLV 7: ");
+  pll_show_clv(partition,7,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+
+  lk_score = pll_compute_root_loglikelihood(partition,
+                                            8,
+                                            PLL_SCALE_BUFFER_NONE,
+                                            params_indices,
+                                            persite_lnl);
+
+  /* test illegal alpha value */
+  double invalid_alpha = 0;
+  if (pll_compute_gamma_cats(invalid_alpha, N_CAT_GAMMA, rate_cats, PLL_GAMMA_RATES_MEAN) == PLL_FAILURE)
+  {
+    if (pll_errno != PLL_ERROR_PARAM_INVALID)
+     printf("Error is %d instead of %d\n", pll_errno, PLL_ERROR_PARAM_INVALID);
+  }
+  else
+  {
+     printf("Computing gamma rates for alpha = %f should have failed\n",
+         invalid_alpha);
+  }
+
+  printf("\n");
+  printf("inner-inner logL: %.6f\n",
+          lk_score);
+  printf("persite logL:     ");
+  checksum = 0.0;
+  for (int i=0; i<n_sites; i++)
+  {
+    checksum += persite_lnl[i];
+    printf("%.7f  ", persite_lnl[i]);
+  }
+  printf("\n");
+  printf("checksum logL:    %.6f\n",
+          checksum);
+
+  /* move to tip inner */
+
+  operations[0].parent_clv_index    = 7;
+  operations[0].child1_clv_index    = 6;
+  operations[0].child2_clv_index    = 3;
+  operations[0].child1_matrix_index = 0;
+  operations[0].child2_matrix_index = 1;
+  operations[0].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  operations[1].parent_clv_index    = 8;
+  operations[1].child1_clv_index    = 7;
+  operations[1].child2_clv_index    = 4;
+  operations[1].child1_matrix_index = 2;
+  operations[1].child2_matrix_index = 3;
+  operations[1].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[1].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[1].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  pll_update_partials(partition, operations, 2);
+
+  lk_score = pll_compute_root_loglikelihood(partition,
+                                            8,
+                                            PLL_SCALE_BUFFER_NONE,
+                                            params_indices,
+                                            persite_lnl);
+
+  printf("tip-inner logL:   %.6f\n",
+          lk_score);
+  printf("persite logL:     ");
+  checksum = 0.0;
+  for (int i=0; i<n_sites; i++)
+  {
+    checksum += persite_lnl[i];
+    printf("%.7f  ", persite_lnl[i]);
+  }
+  printf("\n");
+  printf("checksum logL:    %.6f\n",
+          checksum);
+
+  pll_partition_destroy(partition);
+  free(persite_lnl);
+  free(operations);
+
+  return (0);
+}
diff --git a/test/src/00030_NMDU_gamma.c b/test/src/00030_NMDU_gamma.c
new file mode 100644
index 0000000..a4241dc
--- /dev/null
+++ b/test/src/00030_NMDU_gamma.c
@@ -0,0 +1,251 @@
+/*
+    Copyright (C) 2015 Diego Darriba, Tomas Flouri
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Contact: Diego Darriba <Diego.Darriba at h-its.org>,
+    Exelixis Lab, Heidelberg Instutute for Theoretical Studies
+    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
+*/
+#include "common.h"
+
+#define N_STATES_NT 4
+#define N_CAT_GAMMA 4
+#define FLOAT_PRECISION 4
+
+static double titv = 2.5;
+static double alpha = 0.5;
+static unsigned int n_cat_gamma = N_CAT_GAMMA;
+unsigned int params_indices[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+
+void test_bad_alpha()
+{
+  double rate_cats[N_CAT_GAMMA];
+
+  /* test illegal alpha value */
+  double invalid_alpha = 0;
+  if (pll_compute_gamma_cats(invalid_alpha, N_CAT_GAMMA,
+                             rate_cats, PLL_GAMMA_RATES_MEAN) == PLL_FAILURE)
+  {
+    if (pll_errno != PLL_ERROR_PARAM_INVALID)
+     printf("Error is %d instead of %d\n", pll_errno, PLL_ERROR_PARAM_INVALID);
+  }
+  else
+  {
+     printf("Computing gamma rates for alpha = %f should have failed\n",
+         invalid_alpha);
+  }
+}
+
+double test_lk(pll_partition_t * partition, int gamma_mode)
+{
+  double branch_lengths[4] = { 0.1, 0.2, 1, 1};
+  unsigned int matrix_indices[4] = { 0, 1, 2, 3 };
+  double rate_cats[N_CAT_GAMMA];
+  unsigned int j;
+  double lk_score;
+  unsigned int n_sites = partition->sites;
+  double * persite_lnl = (double *) malloc(n_sites * sizeof(double));
+  double checksum;
+  char prefix[10];
+  pll_operation_t operations[4];
+
+  strcpy(prefix, gamma_mode == PLL_GAMMA_RATES_MEDIAN ? "MEDIAN" : "MEAN");
+
+  if (pll_compute_gamma_cats(alpha, n_cat_gamma,
+                             rate_cats, gamma_mode) == PLL_FAILURE)
+  {
+    printf("Error %d: %s\n", pll_errno, pll_errmsg);
+    fatal("Fail computing gamma cats");
+  }
+
+  printf ("[%s] Discrete GAMMA rates: ", prefix);
+  for (j = 0; j < 4; ++j)
+  {
+    printf ("%.6lf ", rate_cats[j]);
+  }
+  printf ("\n");
+
+  pll_set_category_rates(partition, rate_cats);
+
+  operations[0].parent_clv_index    = 5;
+  operations[0].child1_clv_index    = 0;
+  operations[0].child2_clv_index    = 1;
+  operations[0].child1_matrix_index = 1;
+  operations[0].child2_matrix_index = 1;
+  operations[0].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  operations[1].parent_clv_index    = 6;
+  operations[1].child1_clv_index    = 5;
+  operations[1].child2_clv_index    = 2;
+  operations[1].child1_matrix_index = 0;
+  operations[1].child2_matrix_index = 1;
+  operations[1].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[1].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[1].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  operations[2].parent_clv_index    = 7;
+  operations[2].child1_clv_index    = 3;
+  operations[2].child2_clv_index    = 4;
+  operations[2].child1_matrix_index = 1;
+  operations[2].child2_matrix_index = 1;
+  operations[2].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[2].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[2].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  pll_update_prob_matrices(partition, params_indices, matrix_indices, branch_lengths, 4);
+  pll_update_partials(partition, operations, 3);
+
+  for (j = 0; j < 4; ++j)
+  {
+    printf ("[%s][%d] P-matrix for branch length %f\n",
+            prefix, j+1, branch_lengths[j]);
+    pll_show_pmatrix(partition, j, FLOAT_PRECISION);
+    printf ("\n");
+  }
+
+  /* show CLVs */
+  printf ("[%s][5] CLV 5: ", prefix);
+  pll_show_clv(partition,5,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+  printf ("\n[%s][6] CLV 6: ", prefix);
+  pll_show_clv(partition,6,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+  printf ("\n[%s][7] CLV 7: ", prefix);
+  pll_show_clv(partition,7,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+
+  lk_score = pll_compute_edge_loglikelihood(partition,
+                                            6,
+                                            PLL_SCALE_BUFFER_NONE,
+                                            7,
+                                            PLL_SCALE_BUFFER_NONE,
+                                            0,
+                                            params_indices,
+                                            persite_lnl);
+
+  printf("\n");
+  printf("[%s] inner-inner logL: %.6f\n",
+          prefix, lk_score);
+  printf("[%s] persite logL:     ", prefix);
+  checksum = 0.0;
+  for (int i=0; i<n_sites; i++)
+  {
+    checksum += persite_lnl[i];
+    printf("%.7f  ", persite_lnl[i]);
+  }
+  printf("\n");
+  printf("[%s] checksum logL:    %.6f\n",
+          prefix, checksum);
+
+  /* move to tip inner */
+
+  operations[0].parent_clv_index    = 7;
+  operations[0].child1_clv_index    = 6;
+  operations[0].child2_clv_index    = 3;
+  operations[0].child1_matrix_index = 0;
+  operations[0].child2_matrix_index = 1;
+  operations[0].parent_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
+  operations[0].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
+
+  pll_update_partials(partition, operations, 1);
+
+  lk_score = pll_compute_edge_loglikelihood(partition,
+                                            7,
+                                            PLL_SCALE_BUFFER_NONE,
+                                            4,
+                                            PLL_SCALE_BUFFER_NONE,
+                                            1,
+                                            params_indices,
+                                            persite_lnl);
+
+  printf("[%s] tip-inner logL:   %.6f\n",
+          prefix, lk_score);
+  printf("[%s] persite logL:     ", prefix);
+  checksum = 0.0;
+  for (int i=0; i<n_sites; i++)
+  {
+    checksum += persite_lnl[i];
+    printf("%.7f  ", persite_lnl[i]);
+  }
+  printf("\n");
+  printf("[%s] checksum logL:    %.6f\n",
+          prefix, checksum);
+  printf("\n");
+
+  free(persite_lnl);
+
+  return lk_score;
+}
+
+int main(int argc, char * argv[])
+{
+  unsigned int n_sites = 12;
+  unsigned int n_tips = 5;
+  int return_val;
+  double avg_loglh;
+  double med_loglh;
+
+  /* check attributes */
+  unsigned int attributes = get_attributes(argc, argv);
+
+  pll_partition_t * partition;
+  partition = pll_partition_create(
+                              n_tips,      /* numer of tips */
+                              4,           /* clv buffers */
+                              N_STATES_NT, /* number of states */
+                              n_sites,     /* sequence length */
+                              1,           /* different rate parameters */
+                              2*n_tips-3,  /* probability matrices */
+                              n_cat_gamma, /* gamma categories */
+                              0,           /* scale buffers */
+                              attributes
+                              );          /* attributes */
+
+  if (!partition)
+  {
+    printf("Error %d: %s\n", pll_errno, pll_errmsg);
+    fatal("Fail creating partition");
+  }
+
+  double frequencies[4] = { 0.3, 0.4, 0.1, 0.2 };
+  double subst_params[6] = {1,titv,1,1,titv,1};
+
+  pll_set_frequencies(partition, 0, frequencies);
+  pll_set_subst_params(partition, 0, subst_params);
+
+  return_val = PLL_SUCCESS;
+  return_val &= pll_set_tip_states(partition, 0, pll_map_nt, "WAC-CTA-ATCT");
+  return_val &= pll_set_tip_states(partition, 1, pll_map_nt, "CCC-TTA-ATGT");
+  return_val &= pll_set_tip_states(partition, 2, pll_map_nt, "A-C-TAG-CTCT");
+  return_val &= pll_set_tip_states(partition, 3, pll_map_nt, "CTCTTAA-A-CG");
+  return_val &= pll_set_tip_states(partition, 4, pll_map_nt, "CAC-TCA-A-TG");
+
+  if (!return_val)
+    fatal("Error setting tip states");
+
+  test_bad_alpha();
+    
+  /* test MEAN discrete GAMMA rates */
+  avg_loglh = test_lk(partition, PLL_GAMMA_RATES_MEAN);
+
+  /* test MEDIAN discrete GAMMA rates */
+  med_loglh = test_lk(partition, PLL_GAMMA_RATES_MEDIAN);
+
+  printf("logL MEAN: %.6lf, logL MEDIAN: %.6lf\n", avg_loglh, med_loglh);
+
+  pll_partition_destroy(partition);
+
+  return (0);
+}
diff --git a/test/src/odd-states.c b/test/src/00032_NMOU_gamma.c
similarity index 68%
rename from test/src/odd-states.c
rename to test/src/00032_NMOU_gamma.c
index b929c63..f5c10ac 100644
--- a/test/src/odd-states.c
+++ b/test/src/00032_NMOU_gamma.c
@@ -22,15 +22,22 @@
 
 #define N_ALPHAS  3
 #define N_CATS    3
+#define N_MODES   2
 #define N_STATES  7
 #define N_SUBST_PARAMS 21 // N_STATES*(N_STATES-1)/2
 #define FLOAT_PRECISION 4
 
+#define MODENAME(m) (m == PLL_GAMMA_RATES_MEAN ? "MEAN" : "MEDIAN")
+
 static double alpha[N_ALPHAS] =
   { 0.1, 1.25, 100 };
 static unsigned int n_cat_gamma[N_CATS] =
   { 1, 4, 6 };
 
+static int modes[N_MODES] =
+  { PLL_GAMMA_RATES_MEDIAN, PLL_GAMMA_RATES_MEAN };
+
+
 /* odd map with 7 states (a,b,c,d,e,f,g) */
 const unsigned int odd_map[256] =
   { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -47,8 +54,8 @@ const unsigned int odd_map[256] =
 
 int main (int argc, char * argv[])
 {
-  unsigned int i, j, k;
-  double lk_scores[N_ALPHAS * N_CATS];
+  unsigned int i, j, k, m;
+  double lk_scores[N_ALPHAS * N_CATS * N_MODES];
   unsigned int n_sites = 20;
   unsigned int n_tips = 5;
   pll_operation_t * operations;
@@ -86,6 +93,22 @@ int main (int argc, char * argv[])
   operations[2].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
   operations[2].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
 
+  /* test illegal alpha value */
+  double invalid_alpha = 0;
+  double * rate_cats = (double *) malloc (4 * sizeof(double));
+  if (pll_compute_gamma_cats (invalid_alpha, 4, rate_cats, PLL_GAMMA_RATES_MEAN) == PLL_FAILURE)
+  {
+    if (pll_errno != PLL_ERROR_PARAM_INVALID)
+      printf ("Error is %d instead of %d\n", pll_errno,
+      PLL_ERROR_PARAM_INVALID);
+  }
+  else
+  {
+    printf ("Computing gamma rates for alpha = %f should have failed\n",
+            invalid_alpha);
+  }
+  free (rate_cats);
+
   for (k = 0; k < N_CATS; ++k)
   {
     pll_partition_t * partition;
@@ -147,77 +170,62 @@ int main (int argc, char * argv[])
 
     for (i = 0; i < N_ALPHAS; ++i)
     {
-
-      printf ("\n\n TEST alpha(ncats) = %6.2f(%2d)\n\n", alpha[i],
-              n_cat_gamma[k]);
-
-      double * rate_cats = (double *) malloc (n_cat_gamma[k] * sizeof(double));
-
-      if (pll_compute_gamma_cats (alpha[i], n_cat_gamma[k],
-                                  rate_cats) == PLL_FAILURE)
-      {
-        printf ("Fail computing the gamma rates\n");
-        continue;
-      }
-
-      printf ("Rates: ");
-      for (j = 0; j < n_cat_gamma[k]; j++)
-      {
-        printf ("%8.5f ", rate_cats[j]);
-        if ((j % 4) == 3)
-          printf ("\n       ");
-      }
-      printf ("\n");
-
-      pll_set_category_rates (partition, rate_cats);
-      free (rate_cats);
-
-      pll_update_prob_matrices(partition,
-                               params_indices,
-                               matrix_indices,
-                               branch_lengths,
-                               4);
-
-      pll_update_partials (partition, operations, 3);
-
-      for (j = 0; j < 4; ++j)
+      for (m = 0; m < N_MODES; ++m)
       {
-        printf ("[%d] P-matrix for branch length %f\n", i, branch_lengths[j]);
-        pll_show_pmatrix (partition, j, FLOAT_PRECISION);
+        printf ("\n\n TEST alpha(ncats) = %6.2f(%2d), mode = %s\n\n",
+                alpha[i], n_cat_gamma[k], MODENAME(m));
+
+        double * rate_cats = (double *) malloc (n_cat_gamma[k] * sizeof(double));
+
+        if (pll_compute_gamma_cats (alpha[i], n_cat_gamma[k],
+                                    rate_cats, modes[m]) == PLL_FAILURE)
+        {
+          printf ("Fail computing the gamma rates\n");
+          continue;
+        }
+
+        printf ("Rates: ");
+        for (j = 0; j < n_cat_gamma[k]; j++)
+        {
+          printf ("%8.5f ", rate_cats[j]);
+          if ((j % 4) == 3)
+            printf ("\n       ");
+        }
         printf ("\n");
-      }
-
-      printf ("[%d] CLV 5: ", i);
-      pll_show_clv (partition, 5, PLL_SCALE_BUFFER_NONE, FLOAT_PRECISION + 1);
-      printf ("[%d] CLV 6: ", i);
-      pll_show_clv (partition, 6, PLL_SCALE_BUFFER_NONE, FLOAT_PRECISION + 1);
-      printf ("[%d] CLV 7: ", i);
-      pll_show_clv (partition, 7, PLL_SCALE_BUFFER_NONE, FLOAT_PRECISION);
-
-      lk_scores[k * N_ALPHAS + i] = pll_compute_edge_loglikelihood (
-          partition, 6,
-          PLL_SCALE_BUFFER_NONE,
-          7,
-          PLL_SCALE_BUFFER_NONE,
-          0, params_indices, NULL);
-    }
 
-    /* test illegal alpha value */
-    double invalid_alpha = 0;
-    double * rate_cats = (double *) malloc (4 * sizeof(double));
-    if (pll_compute_gamma_cats (invalid_alpha, 4, rate_cats) == PLL_FAILURE)
-    {
-      if (pll_errno != PLL_ERROR_PARAM_INVALID)
-        printf ("Error is %d instead of %d\n", pll_errno,
-        PLL_ERROR_PARAM_INVALID);
-    }
-    else
-    {
-      printf ("Computing gamma rates for alpha = %f should have failed\n",
-              invalid_alpha);
+        pll_set_category_rates (partition, rate_cats);
+        free (rate_cats);
+
+        pll_update_prob_matrices(partition,
+                                 params_indices,
+                                 matrix_indices,
+                                 branch_lengths,
+                                 4);
+
+        pll_update_partials (partition, operations, 3);
+
+        for (j = 0; j < 4; ++j)
+        {
+          printf ("[%d] P-matrix for branch length %f\n", i, branch_lengths[j]);
+          pll_show_pmatrix (partition, j, FLOAT_PRECISION);
+          printf ("\n");
+        }
+
+        printf ("[%d] CLV 5: ", i);
+        pll_show_clv (partition, 5, PLL_SCALE_BUFFER_NONE, FLOAT_PRECISION + 1);
+        printf ("[%d] CLV 6: ", i);
+        pll_show_clv (partition, 6, PLL_SCALE_BUFFER_NONE, FLOAT_PRECISION + 1);
+        printf ("[%d] CLV 7: ", i);
+        pll_show_clv (partition, 7, PLL_SCALE_BUFFER_NONE, FLOAT_PRECISION);
+
+        lk_scores[k * N_ALPHAS * N_MODES + i*N_MODES + m] = pll_compute_edge_loglikelihood (
+            partition, 6,
+            PLL_SCALE_BUFFER_NONE,
+            7,
+            PLL_SCALE_BUFFER_NONE,
+            0, params_indices, NULL);
+      }
     }
-    free (rate_cats);
-
     pll_partition_destroy (partition);
   }
 
@@ -226,8 +234,12 @@ int main (int argc, char * argv[])
   {
     for (i = 0; i < N_ALPHAS; ++i)
     {
-      printf ("ti/tv:alpha(ncats) = %6.2f(%2d)   logL: %17.6f\n", alpha[i],
-              n_cat_gamma[k], lk_scores[k * N_ALPHAS + i]);
+      for (m = 0; m < N_MODES; ++m)
+      {
+        printf ("ti/tv:alpha(ncats) = %6.2f(%2d), mode = %6s    logL: %17.6f\n",
+                alpha[i], n_cat_gamma[k], MODENAME(modes[m]),
+                lk_scores[k * N_ALPHAS * N_MODES + i * N_MODES + m]);
+      }
     }
   }
 
diff --git a/test/src/fasta-dna.c b/test/src/00110_NPDN_fasta.c
similarity index 98%
rename from test/src/fasta-dna.c
rename to test/src/00110_NPDN_fasta.c
index 9c3b7ab..922ff94 100644
--- a/test/src/fasta-dna.c
+++ b/test/src/00110_NPDN_fasta.c
@@ -171,7 +171,7 @@ static int smalltest (unsigned int attributes)
   operations[2].child1_scaler_index = PLL_SCALE_BUFFER_NONE;
   operations[2].child2_scaler_index = PLL_SCALE_BUFFER_NONE;
 
-  pll_compute_gamma_cats (ALPHA, N_RATE_CATS, rate_cats);
+  pll_compute_gamma_cats (ALPHA, N_RATE_CATS, rate_cats, PLL_GAMMA_RATES_MEAN);
   pll_set_subst_params (partition, 0, subst_params);
   pll_set_frequencies (partition, 0, frequencies);
   pll_set_category_rates (partition, rate_cats);
diff --git a/test/src/fasta-prot.c b/test/src/00120_NPAN_fasta.c
similarity index 100%
rename from test/src/fasta-prot.c
rename to test/src/00120_NPAN_fasta.c
diff --git a/test/src/README.md b/test/src/README.md
index 888b8b0..db63f96 100644
--- a/test/src/README.md
+++ b/test/src/README.md
@@ -12,6 +12,9 @@ Each test must focus on evaluating one or a reduced set of features. Also
 testing cases that should fail and it is determined how the library would
 behave is interesting. For example, attempting to read an unexistent file.
 
+* 00010_NMPU_lkcalc compute likelihood score for a simple unrooted tree
+* 00020_NMPR_lkcalc compute likelihood score for a simple rooted tree
+
 ## alpha-cats
 
 Evaluate the likelihood for different alpha shape parameters and number of
@@ -92,6 +95,10 @@ and 4 different proportions of invariant sites, from 0.0 to 0.9
 
 Validate Nearest Neighbor Interchange moves.
 
+## scaling
+
+Validate CLV scaling on large trees (per-site and per-rate scaling modes)
+
 ## treemove-spr
 
 Validate Subtree Prunning and Regrafting moves.
diff --git a/test/src/alpha-cats.c b/test/src/alpha-cats.c
index 2d0604b..df4475a 100644
--- a/test/src/alpha-cats.c
+++ b/test/src/alpha-cats.c
@@ -22,20 +22,26 @@
 
 #define NUM_ALPHAS 9
 #define NUM_CATS   5
+#define N_MODES   2
 #define N_STATES_NT 4
 
 #define FLOAT_PRECISION 4
 
+#define MODENAME(x) x == PLL_GAMMA_RATES_MEAN ? "MEAN" : "MEDIAN"
+
 static double titv = 2.5;
 
 static double alpha[NUM_ALPHAS] = {0.1, 0.5, 0.75, 1, 1.5, 5, 10, 50, 100};
 static unsigned int n_cat_gamma[NUM_CATS] = {1, 2, 4, 8, 16};
 unsigned int params_indices[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
 
+static int modes[N_MODES] =
+  { PLL_GAMMA_RATES_MEDIAN, PLL_GAMMA_RATES_MEAN };
+
 int main(int argc, char * argv[])
 {
-  unsigned int i,j, k;
-  double lk_scores[NUM_ALPHAS * NUM_CATS];
+  unsigned int i,j,k,m;
+  double lk_scores[NUM_ALPHAS * NUM_CATS * N_MODES];
   unsigned int n_sites = 20;
   unsigned int n_tips = 5;
   pll_operation_t * operations;
@@ -72,7 +78,23 @@ int main(int argc, char * argv[])
   /* check attributes */
   unsigned int attributes = get_attributes(argc, argv);
 
-  for (k = 0; k < NUM_CATS; ++k) {
+  /* test illegal alpha value */
+  double invalid_alpha = 0;
+  double * rate_cats = (double *) malloc(4 * sizeof(double));
+  if (pll_compute_gamma_cats(invalid_alpha, 4, rate_cats, PLL_GAMMA_RATES_MEAN) == PLL_FAILURE)
+  {
+    if (pll_errno != PLL_ERROR_PARAM_INVALID)
+     printf("Error is %d instead of %d\n", pll_errno, PLL_ERROR_PARAM_INVALID);
+  }
+  else
+  {
+     printf("Computing gamma rates for alpha = %f should have failed\n",
+         invalid_alpha);
+  }
+  free (rate_cats);
+
+  for (k = 0; k < NUM_CATS; ++k)
+  {
     pll_partition_t * partition;
     partition = pll_partition_create(
                                 n_tips,      /* numer of tips */
@@ -106,82 +128,78 @@ int main(int argc, char * argv[])
     pll_set_tip_states(partition, 3, pll_map_nt, "CGTCTTGCAA--AT-C-AAG");
     pll_set_tip_states(partition, 4, pll_map_nt, "CGACTTGCCA--AT-T-AAG");
 
-    for (i = 0; i < NUM_ALPHAS; ++i) {
-
-      printf("\n\n TEST alpha(ncats) = %6.2f(%2d)\n\n", alpha[i], n_cat_gamma[k]);
-
-      double * rate_cats = (double *) malloc(n_cat_gamma[k] * sizeof(double));
-
-      if (pll_compute_gamma_cats(alpha[i], n_cat_gamma[k], rate_cats) == PLL_FAILURE)
-      {
-        printf("Fail computing the gamma rates\n");
-        continue;
-      }
-
-	for (j=0; j<n_cat_gamma[k]; j++) {
-		printf("%f ", rate_cats[j]);
-	}
-	printf("\n");
-      pll_set_category_rates(partition, rate_cats);
-      free(rate_cats);
-
-      pll_update_prob_matrices(partition, params_indices, matrix_indices, branch_lengths, 4);
-      pll_update_partials(partition, operations, 3);
-
-      for (j = 0; j < 4; ++j)
+    for (i = 0; i < NUM_ALPHAS; ++i)
+    {
+      for (m = 0; m < N_MODES; ++m)
       {
-        printf ("[%d] P-matrix for branch length %f\n", i, branch_lengths[j]);
-        pll_show_pmatrix(partition, j, FLOAT_PRECISION);
-        printf ("\n");
+        printf ("\n\n TEST alpha(ncats) = %6.2f(%2d), mode = %s\n\n",
+                alpha[i], n_cat_gamma[k], MODENAME(m));
+
+        double * rate_cats = (double *) malloc(n_cat_gamma[k] * sizeof(double));
+
+        if (pll_compute_gamma_cats(alpha[i], n_cat_gamma[k],
+                                   rate_cats, modes[m]) == PLL_FAILURE)
+        {
+          printf("Fail computing the gamma rates\n");
+          continue;
+        }
+
+        for (j=0; j<n_cat_gamma[k]; j++)
+        {
+          printf("%f ", rate_cats[j]);
+        }
+        printf("\n");
+        pll_set_category_rates(partition, rate_cats);
+        free(rate_cats);
+
+        pll_update_prob_matrices(partition, params_indices, matrix_indices, branch_lengths, 4);
+        pll_update_partials(partition, operations, 3);
+
+        for (j = 0; j < 4; ++j)
+        {
+          printf ("[%d] P-matrix for branch length %f\n", i, branch_lengths[j]);
+          pll_show_pmatrix(partition, j, FLOAT_PRECISION);
+          printf ("\n");
+        }
+
+        /* show CLVs */
+        printf ("[%d] CLV 5: ", i);
+        pll_show_clv(partition,5,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+        printf ("[%d] CLV 6: ", i);
+        pll_show_clv(partition,6,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+        printf ("[%d] CLV 7: ", i);
+        pll_show_clv(partition,7,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
+
+        lk_scores[k*NUM_ALPHAS*N_MODES + i*N_MODES +m] =
+            pll_compute_edge_loglikelihood(partition,
+                                           6,
+                                           PLL_SCALE_BUFFER_NONE,
+                                           7,
+                                           PLL_SCALE_BUFFER_NONE,
+                                           0,
+                                           params_indices,
+                                           NULL);
       }
-
-      /* show CLVs */
-      printf ("[%d] CLV 5: ", i);
-      pll_show_clv(partition,5,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
-      printf ("[%d] CLV 6: ", i);
-      pll_show_clv(partition,6,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
-      printf ("[%d] CLV 7: ", i);
-      pll_show_clv(partition,7,PLL_SCALE_BUFFER_NONE,FLOAT_PRECISION+1);
-
-      lk_scores[k*NUM_ALPHAS + i] = pll_compute_edge_loglikelihood(partition,
-                                                         6,
-                                                         PLL_SCALE_BUFFER_NONE,
-                                                         7,
-                                                         PLL_SCALE_BUFFER_NONE,
-                                                         0,
-                                                         params_indices,
-                                                         NULL);
-    }
-
-    /* test illegal alpha value */
-    double invalid_alpha = 0;
-    double * rate_cats = (double *) malloc(4 * sizeof(double));
-    if (pll_compute_gamma_cats(invalid_alpha, 4, rate_cats) == PLL_FAILURE)
-    {
-      if (pll_errno != PLL_ERROR_PARAM_INVALID)
-       printf("Error is %d instead of %d\n", pll_errno, PLL_ERROR_PARAM_INVALID);
     }
-    else
-    {
-       printf("Computing gamma rates for alpha = %f should have failed\n",
-           invalid_alpha);
-    }
-    free (rate_cats);
 
     pll_partition_destroy(partition);
   }
 
-    printf("\n");
-    for (k = 0; k < NUM_CATS; ++k) 
+  printf("\n");
+  for (k = 0; k < NUM_CATS; ++k)
+  {
+    for (i = 0; i < NUM_ALPHAS; ++i)
     {
-      for (i = 0; i < NUM_ALPHAS; ++i) 
+      for (m = 0; m < N_MODES; ++m)
       {
-        printf("ti/tv:alpha(ncats) = %6.2f(%2d)   logL: %17.6f\n", 
-            alpha[i], n_cat_gamma[k], lk_scores[k*NUM_ALPHAS + i]);
+        printf ("ti/tv:alpha(ncats) = %6.2f(%2d), mode = %6s(%d)    logL: %17.6f\n",
+                alpha[i], n_cat_gamma[k], MODENAME(modes[m]), modes[m],
+                lk_scores[k * NUM_ALPHAS * N_MODES + i * N_MODES + m]);
       }
     }
+  }
 
-    free(operations);
+  free(operations);
 
-    return (0);
+  return (0);
 }
diff --git a/test/src/asc-bias.c b/test/src/asc-bias.c
index 2cb55b5..b77f7d6 100644
--- a/test/src/asc-bias.c
+++ b/test/src/asc-bias.c
@@ -46,12 +46,12 @@ static double test_branch_lengths[NUM_BRANCH_LENGTHS] =
                 {0.0001, 0.001, 0.01, 0.1, 1.0, 10.0, 100.0};
 
 static unsigned int traversal_size, matrix_count, ops_count;
-static pll_utree_t ** travbuffer;
+static pll_unode_t ** travbuffer;
 static unsigned int * matrix_indices;
 static double * branch_lengths;
 static pll_operation_t * operations;
 
-void print_travbuffer(pll_utree_t ** travbuffer, unsigned int len)
+void print_travbuffer(pll_unode_t ** travbuffer, unsigned int len)
 {
   unsigned int i;
   for (i=0; i<len; ++i)
@@ -73,17 +73,18 @@ void print_operations(pll_operation_t * operations, unsigned int len)
 }
 
 static double eval(pll_partition_t * partition,
-                   pll_utree_t * tree,
-                   double alpha)
+                   pll_unode_t * node,
+                   double alpha,
+                   double old_lnl)
 {
   unsigned int i;
-  double logl;
+  double logl, upbl_logl;
   double d_f, dd_f;
   double * sumtable;
 
   pll_set_subst_params(partition, 0, subst_params);
   pll_set_frequencies(partition, 0, frequencies);
-  pll_compute_gamma_cats(alpha, partition->rate_cats, categories);
+  pll_compute_gamma_cats(alpha, partition->rate_cats, categories, PLL_GAMMA_RATES_MEAN);
   pll_set_category_rates(partition, categories);
 
   pll_update_prob_matrices(partition,
@@ -93,14 +94,19 @@ static double eval(pll_partition_t * partition,
                            matrix_count);
   pll_update_partials(partition, operations, ops_count);
   logl = pll_compute_edge_loglikelihood(partition,
-                                        tree->clv_index,
-                                        tree->scaler_index,
-                                        tree->back->clv_index,
-                                        tree->back->scaler_index,
-                                        tree->pmatrix_index,
+                                        node->clv_index,
+                                        node->scaler_index,
+                                        node->back->clv_index,
+                                        node->back->scaler_index,
+                                        node->pmatrix_index,
                                         params_indices,
                                         NULL);
 
+  if (old_lnl < 0 && fabs(old_lnl - logl) > 1e-4)
+  {
+    printf("ERROR: Likelihood mismatch %f vs %f\n", logl, old_lnl);
+  }
+
   printf("Log-L: %f\n", logl);
 
   sumtable = pll_aligned_alloc(
@@ -108,8 +114,10 @@ static double eval(pll_partition_t * partition,
     sizeof(double), partition->alignment);
 
   pll_update_sumtable(partition,
-                      tree->clv_index,
-                      tree->back->clv_index,
+                      node->clv_index,
+                      node->back->clv_index,
+                      node->scaler_index,
+                      node->back->scaler_index,
                       params_indices,
                       sumtable);
 
@@ -119,8 +127,8 @@ static double eval(pll_partition_t * partition,
   {
     double branch_length = test_branch_lengths[i];
     if (!pll_compute_likelihood_derivatives(partition,
-                                            tree->scaler_index,
-                                            tree->back->scaler_index,
+                                            node->scaler_index,
+                                            node->back->scaler_index,
                                             branch_length,
                                             params_indices,
                                             sumtable,
@@ -134,22 +142,22 @@ static double eval(pll_partition_t * partition,
    /* update logLikelihood */
    pll_update_prob_matrices(partition,
                             params_indices,
-                            &(tree->pmatrix_index),
+                            &(node->pmatrix_index),
                             &branch_length,
                             1);
-   logl = pll_compute_edge_loglikelihood(partition,
-                                         tree->clv_index,
-                                         tree->scaler_index,
-                                         tree->back->clv_index,
-                                         tree->back->scaler_index,
-                                         tree->pmatrix_index,
+   upbl_logl = pll_compute_edge_loglikelihood(partition,
+                                         node->clv_index,
+                                         node->scaler_index,
+                                         node->back->clv_index,
+                                         node->back->scaler_index,
+                                         node->pmatrix_index,
                                          params_indices,
                                          NULL);
 
-    printf("%8.4f %18.6f %15.8e %15.8e  ", branch_length, logl, d_f, dd_f);
-    if (logl > max_logl)
+    printf("%8.4f %18.6f %15.8e %15.8e  ", branch_length, upbl_logl, d_f, dd_f);
+    if (upbl_logl > max_logl)
     {
-      max_logl = logl;
+      max_logl = upbl_logl;
       printf("*");
     }
     printf("\n");
@@ -164,89 +172,101 @@ int main(int argc, char * argv[])
   unsigned int attributes;
   pll_partition_t * partition;
   pll_utree_t * tree;
+  pll_unode_t * root;
   unsigned int taxa_count, nodes_count, inner_nodes_count, branch_count;
   double alpha = 0.5;
   unsigned int rate_cats = 4;
+  int i;
+  double lnl_test[4] = {0};
 
   /* check attributes */
   attributes = get_attributes(argc, argv);
+  attributes |= PLL_ATTRIB_AB_FLAG;
+
+  tree = pll_utree_parse_newick(TRE_FILENAME);
+
+  taxa_count = tree->tip_count;
 
-  tree = pll_utree_parse_newick(TRE_FILENAME, &taxa_count);
   printf("Read %s: %u taxa\n", TRE_FILENAME, taxa_count);
 
+  root = tree->nodes[tree->tip_count+tree->inner_count-1];
   inner_nodes_count = taxa_count - 2;
   nodes_count  = taxa_count + inner_nodes_count;
   branch_count = 2*taxa_count - 3;
 
   /* build fixed structures */
-  travbuffer = (pll_utree_t **)malloc(nodes_count * sizeof(pll_utree_t *));
+  travbuffer = (pll_unode_t **)malloc(nodes_count * sizeof(pll_unode_t *));
   branch_lengths = (double *)malloc(branch_count * sizeof(double));
   matrix_indices = (unsigned int *)malloc(branch_count * sizeof(unsigned int));
   operations = (pll_operation_t *)malloc(inner_nodes_count *
                                                 sizeof(pll_operation_t));
 
-  pll_utree_traverse(tree,
-                     cb_full_traversal,
-                     travbuffer,
-                     &traversal_size);
-
-  pll_utree_create_operations(travbuffer,
-                              traversal_size,
-                              branch_lengths,
-                              matrix_indices,
-                              operations,
-                              &matrix_count,
-                              &ops_count);
-
-  printf("  Traversal buffer: "); print_travbuffer(travbuffer, traversal_size);
-  printf("  Operations: ");       print_operations(operations, ops_count);
-
-  /* test 1: no ascertainment bias correction */
-  printf("\nTEST 1: NO ASC BIAS\n");
-  partition = parse_msa(MSA_FILENAME, taxa_count, STATES, rate_cats, 1,
+  partition = parse_msa(MSA_FILENAME, STATES, rate_cats, 1,
                         tree, attributes);
   printf("Read %s: %u sites\n", MSA_FILENAME, partition->sites);
 
-  eval(partition, tree, alpha);
+  for (i=0;i<3;++i)
+  {
+    root = root->next;
 
-  pll_partition_destroy(partition);
+    pll_set_asc_bias_type(partition, 0);
 
+    pll_utree_traverse(root,
+                       PLL_TREE_TRAVERSE_POSTORDER,
+                       cb_full_traversal,
+                       travbuffer,
+                       &traversal_size);
 
-  /* test 2: ascertainment bias correction */
-  printf("\nTEST 2: ASC BIAS LEWIS\n");
-  attributes |= PLL_ATTRIB_AB_LEWIS;
-  partition = parse_msa(MSA_FILENAME, taxa_count, STATES, rate_cats, 1,
-                        tree, attributes);
+    pll_utree_create_operations(travbuffer,
+                                traversal_size,
+                                branch_lengths,
+                                matrix_indices,
+                                operations,
+                                &matrix_count,
+                                &ops_count);
 
-  pll_set_asc_bias_type(partition, PLL_ATTRIB_AB_LEWIS);
-  eval(partition, tree, alpha);
+    /* test 1: no ascertainment bias correction */
+    printf("\nTEST 1: NO ASC BIAS\n");
 
-  /* attempt to update invariant sites proportion. This should fail */
-  if (pll_update_invariant_sites_proportion(partition, 0, 0.5))
-  {
-    printf("Error: Setting P-inv with ASC BIAS should fail");
-    return 1;
-  }
+    lnl_test[0] = eval(partition, root, alpha, lnl_test[0]);
+
+    /* test 2: ascertainment bias correction */
+    printf("\nTEST 2: ASC BIAS LEWIS\n");
 
-  /* test 2: ascertainment bias correction */
-  printf("\nTEST 2: ASC BIAS FELSENSTEIN\n");
-  pll_set_asc_bias_type(partition, PLL_ATTRIB_AB_FELSENSTEIN);
-  pll_set_asc_state_weights(partition, invar_weights);
-  eval(partition, tree, alpha);
-
-  /* test 2: ascertainment bias correction */
-  printf("\nTEST 2: ASC BIAS STAMATAKIS\n");
-  pll_set_asc_bias_type(partition, PLL_ATTRIB_AB_STAMATAKIS);
-  pll_set_asc_state_weights(partition, invar_weights);
-  eval(partition, tree, alpha);
-
-  /* clean */
-  free(travbuffer);
-  free(branch_lengths);
-  free(operations);
-  free(matrix_indices);
-  pll_utree_destroy(tree);
-  pll_partition_destroy(partition);
+    pll_set_asc_bias_type(partition, PLL_ATTRIB_AB_LEWIS);
+
+    lnl_test[1] = eval(partition, root, alpha, lnl_test[1]);
+
+    /* attempt to update invariant sites proportion. This should fail */
+    if (pll_update_invariant_sites_proportion(partition, 0, 0.5))
+    {
+      printf("Error: Setting P-inv with ASC BIAS should fail");
+      return 1;
+    }
+
+    /* test 2: ascertainment bias correction */
+    printf("\nTEST 2: ASC BIAS FELSENSTEIN\n");
+    pll_set_asc_bias_type(partition, PLL_ATTRIB_AB_FELSENSTEIN);
+    pll_set_asc_state_weights(partition, invar_weights);
+
+    lnl_test[2] = eval(partition, root, alpha, lnl_test[2]);
+
+    /* test 2: ascertainment bias correction */
+    printf("\nTEST 2: ASC BIAS STAMATAKIS\n");
+    pll_set_asc_bias_type(partition, PLL_ATTRIB_AB_STAMATAKIS);
+    pll_set_asc_state_weights(partition, invar_weights);
+
+    lnl_test[3] = eval(partition, root, alpha, lnl_test[3]);
+
+  }
+    /* clean */
+    free(travbuffer);
+    free(branch_lengths);
+    free(operations);
+    free(matrix_indices);
+    pll_partition_destroy(partition);
+
+  pll_utree_destroy(tree,NULL);
 
   return 0;
 }
diff --git a/test/src/common.c b/test/src/common.c
index 9e711a5..7a84118 100644
--- a/test/src/common.c
+++ b/test/src/common.c
@@ -3,6 +3,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <search.h>
+#include <stdarg.h>
 
 unsigned int get_attributes(int argc, char **argv)
 {
@@ -26,6 +27,11 @@ unsigned int get_attributes(int argc, char **argv)
       /* sse3 vectorization */
       attributes |= PLL_ATTRIB_ARCH_SSE;
     }
+    else if (!strcmp (argv[i], "avx2"))
+    {
+      /* avx2 vectorization */
+      attributes |= PLL_ATTRIB_ARCH_AVX2;
+    }
     else
     {
       printf("Unrecognised attribute: %s\n", argv[i]);
@@ -45,14 +51,31 @@ void skip_test ()
          It is intended to use with the test datasets that were
          validated in advance. */
 pll_partition_t * parse_msa(const char * filename,
-                            unsigned int taxa_count,
+                           unsigned int states,
+                           unsigned int rate_cats,
+                           unsigned int rate_matrices,
+                           pll_utree_t * tree,
+                           unsigned int attributes)
+{
+  return parse_msa_reduced(filename,
+                          states,
+                          rate_cats,
+                          rate_matrices,
+                          tree,
+                          attributes,
+                          -1);
+}
+
+pll_partition_t * parse_msa_reduced(const char * filename,
                             unsigned int states,
                             unsigned int rate_cats,
                             unsigned int rate_matrices,
                             pll_utree_t * tree,
-                            unsigned int attributes)
+                            unsigned int attributes,
+                            unsigned int max_sites)
 {
   unsigned int i;
+  unsigned int taxa_count = tree->tip_count;
   pll_partition_t * partition;
   long hdrlen, seqlen, seqno;
   char * seq = NULL,
@@ -95,6 +118,9 @@ pll_partition_t * parse_msa(const char * filename,
     return NULL;
   }
 
+  if (max_sites != -1)
+    sites = max_sites;
+
   partition = pll_partition_create(taxa_count,           /* tip nodes */
                                    taxa_count - 2,       /* inner nodes */
                                    states,
@@ -105,10 +131,6 @@ pll_partition_t * parse_msa(const char * filename,
                                    taxa_count - 2,       /* scale buffers */
                                    attributes);
 
-  pll_utree_t ** tipnodes = (pll_utree_t  **)calloc(taxa_count,
-                                                    sizeof(pll_utree_t *));
-  pll_utree_query_tipnodes(tree, tipnodes);
-
   /* create a libc hash table of size tip_nodes_count */
   hcreate(taxa_count);
 
@@ -117,15 +139,18 @@ pll_partition_t * parse_msa(const char * filename,
                                                sizeof(unsigned int));
   for (i = 0; i < taxa_count; ++i)
   {
-    data[i] = i;
+    data[i] = tree->nodes[i]->clv_index;
     ENTRY entry;
-    entry.key = tipnodes[i]->label;
+#ifdef __APPLE__
+    entry.key = xstrdup(tree->nodes[i]->label);
+#else
+    entry.key = tree->nodes[i]->label;
+#endif
     entry.data = (void *)(data+i);
+
     hsearch(entry, ENTER);
   }
 
-  free(tipnodes);
-
   for (i = 0; i < taxa_count; ++i)
   {
     ENTRY query;
@@ -158,12 +183,40 @@ pll_partition_t * parse_msa(const char * filename,
   return partition;
 }
 
-int cb_full_traversal(pll_utree_t * node)
+int cb_full_traversal(pll_unode_t * node)
 {
   return 1;
 }
 
-int cb_rfull_traversal(pll_rtree_t * node)
+int cb_rfull_traversal(pll_rnode_t * node)
 {
   return 1;
 }
+
+__attribute__((format(printf, 1, 2)))
+void fatal(const char * format, ...)
+{
+  va_list argptr;
+  va_start(argptr, format);
+  vfprintf(stderr, format, argptr);
+  va_end(argptr);
+  fprintf(stderr, "\n");
+  exit(EXIT_FAILURE);
+}
+
+void * xmalloc(size_t size)
+{ 
+  void * t;
+  t = malloc(size);
+  if (!t)
+    fatal("Unable to allocate enough memory.");
+  
+  return t;
+} 
+  
+char * xstrdup(const char * s)
+{ 
+  size_t len = strlen(s);
+  char * p = (char *)xmalloc(len+1);
+  return strcpy(p,s);
+}  
diff --git a/test/src/common.h b/test/src/common.h
index 4d8f52c..441ba60 100644
--- a/test/src/common.h
+++ b/test/src/common.h
@@ -30,14 +30,25 @@ unsigned int get_attributes(int argc, char **argv);
 void skip_test();
 
 pll_partition_t * parse_msa(const char * filename,
-                            unsigned int taxa_count,
                             unsigned int states,
                             unsigned int rate_cats,
                             unsigned int rate_matrices,
                             pll_utree_t * tree,
                             unsigned int attributes);
 
-int cb_full_traversal(pll_utree_t * node);
-int cb_rfull_traversal(pll_rtree_t * node);
+pll_partition_t * parse_msa_reduced(const char * filename,
+                            unsigned int states,
+                            unsigned int rate_cats,
+                            unsigned int rate_matrices,
+                            pll_utree_t * tree,
+                            unsigned int attributes,
+                            unsigned int max_sites);
+int cb_full_traversal(pll_unode_t * node);
+int cb_rfull_traversal(pll_rnode_t * node);
+
+/* print error and exit */
+void fatal(const char * format, ...) __attribute__ ((noreturn));
+char * xstrdup(const char * s);
+void * xmalloc(size_t size);
 
 #endif /* COMMON_H_ */
diff --git a/test/src/derivatives-oddstates.c b/test/src/derivatives-oddstates.c
index d24d58b..3e32ee4 100644
--- a/test/src/derivatives-oddstates.c
+++ b/test/src/derivatives-oddstates.c
@@ -165,7 +165,7 @@ int main(int argc, char * argv[])
 
         double * rate_cats = (double *) malloc(n_cat_gamma[k] * sizeof(double));
 
-        if (pll_compute_gamma_cats(alpha[i], n_cat_gamma[k], rate_cats) == PLL_FAILURE)
+        if (pll_compute_gamma_cats(alpha[i], n_cat_gamma[k], rate_cats, PLL_GAMMA_RATES_MEAN) == PLL_FAILURE)
         {
           printf("Fail computing the gamma rates\n");
           continue;
@@ -197,7 +197,9 @@ int main(int argc, char * argv[])
                                                            params_indices,
                                                            NULL);
 
-        pll_update_sumtable(partition, 6, 7, params_indices, sumtable);
+        pll_update_sumtable(partition, 6, 7,
+                            PLL_SCALE_BUFFER_NONE, PLL_SCALE_BUFFER_NONE,
+                            params_indices, sumtable);
 
         for (b = 0; b < NUM_BRANCHES; ++b) {
           if (!pll_compute_likelihood_derivatives(partition,
@@ -276,7 +278,9 @@ int main(int argc, char * argv[])
                                                            params_indices,
                                                            NULL);
 
-        pll_update_sumtable(partition, 4, 7, params_indices, sumtable);
+        pll_update_sumtable(partition, 4, 7,
+                            PLL_SCALE_BUFFER_NONE, PLL_SCALE_BUFFER_NONE,
+                            params_indices, sumtable);
 
         for (b = 0; b < NUM_BRANCHES; ++b) {
           if (!pll_compute_likelihood_derivatives(partition,
diff --git a/test/src/derivatives.c b/test/src/derivatives.c
index b70e6fa..a01fec5 100644
--- a/test/src/derivatives.c
+++ b/test/src/derivatives.c
@@ -153,7 +153,7 @@ int main(int argc, char * argv[])
 
         double * rate_cats = (double *) malloc(n_cat_gamma[k] * sizeof(double));
 
-        if (pll_compute_gamma_cats(alpha[i], n_cat_gamma[k], rate_cats) == PLL_FAILURE)
+        if (pll_compute_gamma_cats(alpha[i], n_cat_gamma[k], rate_cats, PLL_GAMMA_RATES_MEAN) == PLL_FAILURE)
         {
           printf("Fail computing the gamma rates\n");
           continue;
@@ -185,7 +185,9 @@ int main(int argc, char * argv[])
                                                            params_indices,
                                                            NULL);
 
-        pll_update_sumtable(partition, 6, 7, params_indices, sumtable);
+        pll_update_sumtable(partition, 6, 7,
+                            PLL_SCALE_BUFFER_NONE, PLL_SCALE_BUFFER_NONE,
+                            params_indices, sumtable);
 
         for (b = 0; b < NUM_BRANCHES; ++b) {
           if (!pll_compute_likelihood_derivatives(partition,
@@ -264,7 +266,9 @@ int main(int argc, char * argv[])
                                                            params_indices,
                                                            NULL);
 
-        pll_update_sumtable(partition, 4, 7, params_indices, sumtable);
+        pll_update_sumtable(partition, 4, 7,
+                            PLL_SCALE_BUFFER_NONE, PLL_SCALE_BUFFER_NONE,
+                            params_indices, sumtable);
 
         for (b = 0; b < NUM_BRANCHES; ++b) {
           if (!pll_compute_likelihood_derivatives(partition,
diff --git a/test/src/hky.c b/test/src/hky.c
index b72aa6c..1ed26e8 100644
--- a/test/src/hky.c
+++ b/test/src/hky.c
@@ -58,7 +58,7 @@ int main(int argc, char * argv[])
   double subst_params[6] = {1,1,1,1,1,1};
   double rate_cats[4];
 
-  pll_compute_gamma_cats(alpha, N_CAT_GAMMA, rate_cats);
+  pll_compute_gamma_cats(alpha, N_CAT_GAMMA, rate_cats, PLL_GAMMA_RATES_MEAN);
 
   pll_set_frequencies(partition, 0, frequencies);
 
diff --git a/test/src/partial-traversal.c b/test/src/partial-traversal.c
index 424b999..8d35982 100644
--- a/test/src/partial-traversal.c
+++ b/test/src/partial-traversal.c
@@ -1,7 +1,6 @@
 #include "common.h"
 #include "rng.h"
 
-#include <stdarg.h>
 #include <search.h>
 
 #define STATES      4
@@ -10,15 +9,13 @@
 #define FASTAFILE "testdata/246x4465.fas"
 #define TREEFILE  "testdata/246x4465.tree"
 
-static void fatal(const char * format, ...) __attribute__ ((noreturn));
-
 typedef struct
 {
   int clv_valid;
 } node_info_t;
 
 /* a callback function for performing a partial traversal */
-static int cb_partial_traversal(pll_utree_t * node)
+static int cb_partial_traversal(pll_unode_t * node)
 {
   node_info_t * node_info;
 
@@ -63,44 +60,24 @@ static int cb_partial_traversal(pll_utree_t * node)
   return 1;
 }
 
-static void set_missing_branch_length_recursive(pll_utree_t * tree,
-                                                double length)
-{
-  if (tree)
-  {
-    /* set branch length to default if not set */
-    if (!tree->length)
-      tree->length = length;
-
-    if (tree->next)
-    {
-      if (!tree->next->length)
-        tree->next->length = length;
-
-      if (!tree->next->next->length)
-        tree->next->next->length = length;
-
-      set_missing_branch_length_recursive(tree->next->back, length);
-      set_missing_branch_length_recursive(tree->next->next->back, length);
-    }
-  }
-}
-
 /* branch lengths not present in the newick file get a value of 0.000001 */
 static void set_missing_branch_length(pll_utree_t * tree, double length)
 {
-  set_missing_branch_length_recursive(tree, length);
-  set_missing_branch_length_recursive(tree->back, length);
-}
+  unsigned int i;
 
-static void fatal(const char * format, ...)
-{
-  va_list argptr;
-  va_start(argptr, format);
-  vfprintf(stderr, format, argptr);
-  va_end(argptr);
-  fprintf(stderr, "\n");
-  exit(EXIT_FAILURE);
+  for (i = 0; i < tree->tip_count; ++i)
+    if (!tree->nodes[i]->length)
+      tree->nodes[i]->length = length;
+
+  for (i = tree->tip_count; i < tree->tip_count + tree->inner_count; ++i)
+  {
+    if (!tree->nodes[i]->length)
+      tree->nodes[i]->length = length;
+    if (!tree->nodes[i]->next->length)
+      tree->nodes[i]->next->length = length;
+    if (!tree->nodes[i]->next->next->length)
+      tree->nodes[i]->next->next->length = length;
+  }
 }
 
 int main(int argc, char * argv[])
@@ -112,14 +89,16 @@ int main(int argc, char * argv[])
   double * branch_lengths;
   pll_partition_t * partition;
   pll_operation_t * operations;
-  pll_utree_t ** travbuffer;
-  pll_utree_t ** inner_nodes_list;
+  pll_unode_t ** travbuffer;
+  pll_unode_t ** inner_nodes_list;
   unsigned int params_indices[N_RATE_CATS] = {0,0,0,0};
 
   /* parse the unrooted binary tree in newick format, and store the number
      of tip nodes in tip_nodes_count */
-  pll_utree_t * tree = pll_utree_parse_newick(TREEFILE, &tip_nodes_count);
-  
+  pll_utree_t * tree = pll_utree_parse_newick(TREEFILE);
+
+  tip_nodes_count = tree->tip_count;
+
   unsigned int attributes = get_attributes(argc, argv);
 
   /* fix all missing branch lengths (i.e. those that did not appear in the
@@ -137,22 +116,22 @@ int main(int argc, char * argv[])
   printf("Total number of nodes in tree: %d\n", nodes_count);
   printf("Number of branches in tree: %d\n", branch_count);
 
-  /*  obtain an array of pointers to tip nodes */
-  pll_utree_t ** tipnodes = (pll_utree_t  **)calloc(tip_nodes_count,
-                                                    sizeof(pll_utree_t *));
-  pll_utree_query_tipnodes(tree, tipnodes);
-
   /* create a libc hash table of size tip_nodes_count */
   hcreate(tip_nodes_count);
 
   /* populate a libc hash table with tree tip labels */
-  unsigned int * data = (unsigned int *)malloc(tip_nodes_count * 
+  unsigned int * data = (unsigned int *)malloc(tip_nodes_count *
                                                sizeof(unsigned int));
   for (i = 0; i < tip_nodes_count; ++i)
   {
-    data[i] = i;
+    //data[i] = i;
+    data[i] = tree->nodes[i]->clv_index;
     ENTRY entry;
-    entry.key = tipnodes[i]->label;
+#ifdef __APPLE__
+    entry.key = xstrdup(tree->nodes[i]->label);
+#else
+    entry.key = tree->nodes[i]->label;
+#endif
     entry.data = (void *)(data+i);
     hsearch(entry, ENTER);
   }
@@ -225,7 +204,7 @@ int main(int argc, char * argv[])
 
   /* compute the discretized category rates from a gamma distribution
      with alpha shape 1 and store them in rate_cats  */
-  pll_compute_gamma_cats(1, 4, rate_cats);
+  pll_compute_gamma_cats(1, 4, rate_cats, PLL_GAMMA_RATES_MEAN);
 
   /* set frequencies at model with index 0 (we currently have only one model) */
   pll_set_frequencies(partition, 0, frequencies);
@@ -247,7 +226,7 @@ int main(int argc, char * argv[])
 
     if (!found)
       fatal("Sequence with header %s does not appear in the tree", hdr);
-        
+
     unsigned int tip_clv_index = *((unsigned int *)(found->data));
 
     pll_set_tip_states(partition, tip_clv_index, pll_map_nt, seqdata[i]);
@@ -258,7 +237,6 @@ int main(int argc, char * argv[])
 
   /* we no longer need these two arrays (keys and values of hash table... */
   free(data);
-  free(tipnodes);
 
   /* ...neither the sequences and the headers as they are already
      present in the form of probabilities in the tip CLVs */
@@ -271,20 +249,22 @@ int main(int argc, char * argv[])
   free(headers);
 
 
-  /* allocate a buffer for storing pointers to nodes of the tree in postorder 
+  /* allocate a buffer for storing pointers to nodes of the tree in postorder
      traversal */
-  travbuffer = (pll_utree_t **)malloc(nodes_count * sizeof(pll_utree_t *));
+  travbuffer = (pll_unode_t **)malloc(nodes_count * sizeof(pll_unode_t *));
 
 
   branch_lengths = (double *)malloc(branch_count * sizeof(double));
   matrix_indices = (unsigned int *)malloc(branch_count * sizeof(int));
-  operations = (pll_operation_t *)malloc(inner_nodes_count * 
+  operations = (pll_operation_t *)malloc(inner_nodes_count *
                                                 sizeof(pll_operation_t));
 
   /* get inner nodes */
-  inner_nodes_list = (pll_utree_t **)malloc(inner_nodes_count *
-                                                sizeof(pll_utree_t *));
-  pll_utree_query_innernodes(tree, inner_nodes_list);
+  inner_nodes_list = (pll_unode_t **)malloc(inner_nodes_count *
+                                                sizeof(pll_unode_t *));
+  memcpy(inner_nodes_list,
+         tree->nodes+tip_nodes_count,
+         inner_nodes_count*sizeof(pll_unode_t *));
 
   /* get random directions for each inner node */
   for (i = 0; i < inner_nodes_count; ++i)
@@ -301,19 +281,20 @@ int main(int argc, char * argv[])
 
     /* randomly select an inner node */
     r = RAND % inner_nodes_count;
-    pll_utree_t * node = inner_nodes_list[r];
+    pll_unode_t * node = inner_nodes_list[r];
 
-    /* compute a partial traversal starting from the randomly selected 
+    /* compute a partial traversal starting from the randomly selected
        inner node */
-    
-    if (!pll_utree_traverse(node, 
-                            cb_partial_traversal, 
+
+    if (!pll_utree_traverse(node,
+                            PLL_TREE_TRAVERSE_POSTORDER,
+                            cb_partial_traversal,
                             travbuffer,
                             &traversal_size))
       fatal("Function pll_utree_traverse() requires inner nodes as parameters");
 
-    /* given the computed traversal descriptor, generate the operations 
-       structure, and the corresponding probability matrix indices that 
+    /* given the computed traversal descriptor, generate the operations
+       structure, and the corresponding probability matrix indices that
        may need recomputing */
     pll_utree_create_operations(travbuffer,
                                 traversal_size,
@@ -338,13 +319,13 @@ int main(int argc, char * argv[])
     printf ("Matrices: %d\n", matrix_count);
 
     /* update matrix_count probability matrices for model with index 0. The i-th
-       matrix (i ranges from 0 to matrix_count - 1) is generated using branch 
-       length branch_lengths[i] and can be refered to with index 
+       matrix (i ranges from 0 to matrix_count - 1) is generated using branch
+       length branch_lengths[i] and can be refered to with index
        matrix_indices[i] */
-    pll_update_prob_matrices(partition, 
-                             params_indices, 
-                             matrix_indices, 
-                             branch_lengths, 
+    pll_update_prob_matrices(partition,
+                             params_indices,
+                             matrix_indices,
+                             branch_lengths,
                              matrix_count);
 
     /* use the operations array to compute all ops_count inner CLVs. Operations
@@ -387,7 +368,7 @@ int main(int argc, char * argv[])
   /* destroy all structures allocated for the concrete PLL partition instance */
   pll_partition_destroy(partition);
 
-  /* deallocate traversal buffer, branch lengths array, matrix indices 
+  /* deallocate traversal buffer, branch lengths array, matrix indices
      array and operations */
   free(travbuffer);
   free(branch_lengths);
@@ -395,7 +376,7 @@ int main(int argc, char * argv[])
   free(operations);
 
   /* we will no longer need the tree structure */
-  pll_utree_destroy(tree);
+  pll_utree_destroy(tree,NULL);
 
   return (EXIT_SUCCESS);
 }
diff --git a/test/src/protein-models.c b/test/src/protein-models.c
index 850581a..0d74dc0 100644
--- a/test/src/protein-models.c
+++ b/test/src/protein-models.c
@@ -99,7 +99,7 @@ int main(int argc, char * argv[])
 
   double * rate_cats = (double *) malloc(N_RATE_CATS * sizeof(double));
 
-  if (pll_compute_gamma_cats(ALPHA, N_RATE_CATS, rate_cats) == PLL_FAILURE)
+  if (pll_compute_gamma_cats(ALPHA, N_RATE_CATS, rate_cats, PLL_GAMMA_RATES_MEAN) == PLL_FAILURE)
   {
     printf("Fail computing the gamma rates\n");
     exit(1);
diff --git a/test/src/rooted-tipinner.c b/test/src/rooted-tipinner.c
index 6d8742c..7098a26 100644
--- a/test/src/rooted-tipinner.c
+++ b/test/src/rooted-tipinner.c
@@ -9,7 +9,6 @@
 #define FASTAFILE     "testdata/small.fas"
 #define TREEFILE      "testdata/small.rooted.tip.tree"
 
-static void fatal(const char * format, ...) __attribute__ ((noreturn));
 static double prop_invar_list[4] = {0.0, 0.1, 0.5, 0.9};
 
 typedef struct
@@ -17,16 +16,6 @@ typedef struct
   int clv_valid;
 } node_info_t;
 
-static void fatal(const char * format, ...)
-{
-  va_list argptr;
-  va_start(argptr, format);
-  vfprintf(stderr, format, argptr);
-  va_end(argptr);
-  fprintf(stderr, "\n");
-  exit(EXIT_FAILURE);
-}
-
 int main(int argc, char * argv[])
 {
   unsigned int i, j;
@@ -36,19 +25,21 @@ int main(int argc, char * argv[])
   double * branch_lengths;
   pll_partition_t * partition;
   pll_operation_t * operations;
-  pll_rtree_t ** travbuffer;
-  pll_rtree_t ** inner_nodes_list;
+  pll_rnode_t ** travbuffer;
+  pll_rnode_t ** inner_nodes_list;
   unsigned int params_indices[N_RATE_CATS] = {0,0,0,0};
 
   /* parse the unrooted binary tree in newick format, and store the number
      of tip nodes in tip_nodes_count */
-  pll_rtree_t * tree = pll_rtree_parse_newick(TREEFILE, &tip_nodes_count);
+  pll_rtree_t * tree = pll_rtree_parse_newick(TREEFILE);
   if (!tree)
   {
     printf("Error reading tree\n");
     exit(1);
   }
 
+  tip_nodes_count = tree->tip_count;
+
   unsigned int attributes = get_attributes(argc, argv);
 
   /* compute and show node count information */
@@ -61,18 +52,14 @@ int main(int argc, char * argv[])
   printf("Total number of nodes in tree: %d\n", nodes_count);
   printf("Number of branches in tree: %d\n", branch_count);
 
-  pll_rtree_show_ascii(tree, PLL_UTREE_SHOW_LABEL |
-                             PLL_UTREE_SHOW_BRANCH_LENGTH |
-                             PLL_UTREE_SHOW_CLV_INDEX);
-  char * newick = pll_rtree_export_newick(tree);
+  pll_rtree_show_ascii(tree->root,
+                       PLL_UTREE_SHOW_LABEL |
+                       PLL_UTREE_SHOW_BRANCH_LENGTH |
+                       PLL_UTREE_SHOW_CLV_INDEX);
+  char * newick = pll_rtree_export_newick(tree->root,NULL);
   printf("%s\n", newick);
   free(newick);
 
-  /*  obtain an array of pointers to tip nodes */
-  pll_rtree_t ** tipnodes = (pll_rtree_t  **)calloc(tip_nodes_count,
-                                                    sizeof(pll_rtree_t *));
-  pll_rtree_query_tipnodes(tree, tipnodes);
-
   /* create a libc hash table of size tip_nodes_count */
   hcreate(tip_nodes_count);
 
@@ -83,7 +70,11 @@ int main(int argc, char * argv[])
   {
     data[i] = i;
     ENTRY entry;
-    entry.key = tipnodes[i]->label;
+#ifdef __APPLE__
+    entry.key = xstrdup(tree->nodes[i]->label);
+#else
+    entry.key = tree->nodes[i]->label;
+#endif
     entry.data = (void *)(data+i);
     hsearch(entry, ENTER);
   }
@@ -155,7 +146,7 @@ int main(int argc, char * argv[])
 
   /* compute the discretized category rates from a gamma distribution
      with alpha shape 1 and store them in rate_cats  */
-  pll_compute_gamma_cats(1, 4, rate_cats);
+  pll_compute_gamma_cats(1, 4, rate_cats, PLL_GAMMA_RATES_MEAN);
 
   /* set frequencies at model with index 0 (we currently have only one model) */
   pll_set_frequencies(partition, 0, frequencies);
@@ -188,7 +179,6 @@ int main(int argc, char * argv[])
 
   /* we no longer need these two arrays (keys and values of hash table... */
   free(data);
-  free(tipnodes);
 
   /* ...neither the sequences and the headers as they are already
      present in the form of probabilities in the tip CLVs */
@@ -202,7 +192,7 @@ int main(int argc, char * argv[])
 
   /* allocate a buffer for storing pointers to nodes of the tree in postorder
      traversal */
-  travbuffer = (pll_rtree_t **)malloc(nodes_count * sizeof(pll_rtree_t *));
+  travbuffer = (pll_rnode_t **)malloc(nodes_count * sizeof(pll_rnode_t *));
 
   branch_lengths = (double *)malloc(branch_count * sizeof(double));
   matrix_indices = (unsigned int *)malloc(branch_count * sizeof(int));
@@ -210,16 +200,19 @@ int main(int argc, char * argv[])
                                                 sizeof(pll_operation_t));
 
   /* get inner nodes */
-  inner_nodes_list = (pll_rtree_t **)malloc(inner_nodes_count *
-                                                sizeof(pll_rtree_t *));
-  pll_rtree_query_innernodes(tree, inner_nodes_list);
+  inner_nodes_list = (pll_rnode_t **)malloc(inner_nodes_count *
+                                                sizeof(pll_rnode_t *));
+  memcpy(inner_nodes_list,
+         tree->nodes+tip_nodes_count,
+         inner_nodes_count*sizeof(pll_rnode_t *));
 
   unsigned int traversal_size;
 
   /* compute a partial traversal starting from the randomly selected
      inner node */
 
-  if (!pll_rtree_traverse(tree,
+  if (!pll_rtree_traverse(tree->root,
+                          PLL_TREE_TRAVERSE_POSTORDER,
                           cb_rfull_traversal,
                           travbuffer,
                           &traversal_size))
@@ -278,8 +271,8 @@ int main(int argc, char * argv[])
        index for the concrete branch length, and the index of the model of whose
        frequency vector is to be used */
     double logl = pll_compute_root_loglikelihood(partition,
-                                                 tree->clv_index,
-                                                 tree->scaler_index,
+                                                 tree->root->clv_index,
+                                                 tree->root->scaler_index,
                                                  params_indices,
                                                  NULL);
 
@@ -300,7 +293,7 @@ int main(int argc, char * argv[])
   free(operations);
 
   /* we will no longer need the tree structure */
-  pll_rtree_destroy(tree);
+  pll_rtree_destroy(tree,NULL);
 
   return (EXIT_SUCCESS);
 }
diff --git a/test/src/rooted.c b/test/src/rooted.c
index 2e898a3..a6e598d 100644
--- a/test/src/rooted.c
+++ b/test/src/rooted.c
@@ -10,7 +10,6 @@
 #define TREEFILE      "testdata/small.rooted.tree"
 #define TREEFILE_TIP  "testdata/small.rooted.tip.tree"
 
-static void fatal(const char * format, ...) __attribute__ ((noreturn));
 static double prop_invar_list[4] = {0.0, 0.1, 0.5, 0.9};
 
 typedef struct
@@ -18,16 +17,6 @@ typedef struct
   int clv_valid;
 } node_info_t;
 
-static void fatal(const char * format, ...)
-{
-  va_list argptr;
-  va_start(argptr, format);
-  vfprintf(stderr, format, argptr);
-  va_end(argptr);
-  fprintf(stderr, "\n");
-  exit(EXIT_FAILURE);
-}
-
 int main(int argc, char * argv[])
 {
   unsigned int i, j;
@@ -37,19 +26,21 @@ int main(int argc, char * argv[])
   double * branch_lengths;
   pll_partition_t * partition;
   pll_operation_t * operations;
-  pll_rtree_t ** travbuffer;
-  pll_rtree_t ** inner_nodes_list;
+  pll_rnode_t ** travbuffer;
+  pll_rnode_t ** inner_nodes_list;
   unsigned int params_indices[N_RATE_CATS] = {0,0,0,0};
 
   /* parse the unrooted binary tree in newick format, and store the number
      of tip nodes in tip_nodes_count */
-  pll_rtree_t * tree = pll_rtree_parse_newick(TREEFILE, &tip_nodes_count);
+  pll_rtree_t * tree = pll_rtree_parse_newick(TREEFILE);
   if (!tree)
   {
     printf("Error reading tree\n");
     exit(1);
   }
 
+  tip_nodes_count = tree->tip_count;
+
   unsigned int attributes = get_attributes(argc, argv);
 
   /* compute and show node count information */
@@ -62,18 +53,14 @@ int main(int argc, char * argv[])
   printf("Total number of nodes in tree: %d\n", nodes_count);
   printf("Number of branches in tree: %d\n", branch_count);
 
-  pll_rtree_show_ascii(tree, PLL_UTREE_SHOW_LABEL |
-                             PLL_UTREE_SHOW_BRANCH_LENGTH |
-                             PLL_UTREE_SHOW_CLV_INDEX);
-  char * newick = pll_rtree_export_newick(tree);
+  pll_rtree_show_ascii(tree->root,
+                       PLL_UTREE_SHOW_LABEL |
+                       PLL_UTREE_SHOW_BRANCH_LENGTH |
+                       PLL_UTREE_SHOW_CLV_INDEX);
+  char * newick = pll_rtree_export_newick(tree->root,NULL);
   printf("%s\n", newick);
   free(newick);
 
-  /*  obtain an array of pointers to tip nodes */
-  pll_rtree_t ** tipnodes = (pll_rtree_t  **)calloc(tip_nodes_count,
-                                                    sizeof(pll_rtree_t *));
-  pll_rtree_query_tipnodes(tree, tipnodes);
-
   /* create a libc hash table of size tip_nodes_count */
   hcreate(tip_nodes_count);
 
@@ -84,7 +71,11 @@ int main(int argc, char * argv[])
   {
     data[i] = i;
     ENTRY entry;
-    entry.key = tipnodes[i]->label;
+#ifdef __APPLE__
+    entry.key = xstrdup(tree->nodes[i]->label);
+#else
+    entry.key = tree->nodes[i]->label;
+#endif
     entry.data = (void *)(data+i);
     hsearch(entry, ENTER);
   }
@@ -156,7 +147,7 @@ int main(int argc, char * argv[])
 
   /* compute the discretized category rates from a gamma distribution
      with alpha shape 1 and store them in rate_cats  */
-  pll_compute_gamma_cats(1, 4, rate_cats);
+  pll_compute_gamma_cats(1, 4, rate_cats, PLL_GAMMA_RATES_MEAN);
 
   /* set frequencies at model with index 0 (we currently have only one model) */
   pll_set_frequencies(partition, 0, frequencies);
@@ -189,7 +180,6 @@ int main(int argc, char * argv[])
 
   /* we no longer need these two arrays (keys and values of hash table... */
   free(data);
-  free(tipnodes);
 
   /* ...neither the sequences and the headers as they are already
      present in the form of probabilities in the tip CLVs */
@@ -203,7 +193,7 @@ int main(int argc, char * argv[])
 
   /* allocate a buffer for storing pointers to nodes of the tree in postorder
      traversal */
-  travbuffer = (pll_rtree_t **)malloc(nodes_count * sizeof(pll_rtree_t *));
+  travbuffer = (pll_rnode_t **)malloc(nodes_count * sizeof(pll_rnode_t *));
 
   branch_lengths = (double *)malloc(branch_count * sizeof(double));
   matrix_indices = (unsigned int *)malloc(branch_count * sizeof(int));
@@ -211,16 +201,19 @@ int main(int argc, char * argv[])
                                                 sizeof(pll_operation_t));
 
   /* get inner nodes */
-  inner_nodes_list = (pll_rtree_t **)malloc(inner_nodes_count *
-                                                sizeof(pll_rtree_t *));
-  pll_rtree_query_innernodes(tree, inner_nodes_list);
+  inner_nodes_list = (pll_rnode_t **)malloc(inner_nodes_count *
+                                                sizeof(pll_rnode_t *));
+  memcpy(inner_nodes_list,
+         tree->nodes+tip_nodes_count,
+         inner_nodes_count*sizeof(pll_rnode_t *));
 
   unsigned int traversal_size;
 
   /* compute a partial traversal starting from the randomly selected
      inner node */
 
-  if (!pll_rtree_traverse(tree,
+  if (!pll_rtree_traverse(tree->root,
+                          PLL_TREE_TRAVERSE_POSTORDER,
                           cb_rfull_traversal,
                           travbuffer,
                           &traversal_size))
@@ -267,19 +260,13 @@ int main(int argc, char * argv[])
        will be carried out sequentially starting from operation 0 towrds ops_count-1 */
     pll_update_partials(partition, operations, ops_count);
 
-  //  for (i = tip_nodes_count; i < nodes_count; ++i)
-  //  {
-  //    printf ("CLV %d: ", i);
-  //    pll_show_clv(partition,i, PLL_SCALE_BUFFER_NONE, 6);
-  //  }
-
     /* compute the likelihood on an edge of the unrooted tree by specifying
        the CLV indices at the two end-point of the branch, the probability matrix
        index for the concrete branch length, and the index of the model of whose
        frequency vector is to be used */
     double logl = pll_compute_root_loglikelihood(partition,
-                                                 tree->clv_index,
-                                                 tree->scaler_index,
+                                                 tree->root->clv_index,
+                                                 tree->root->scaler_index,
                                                  params_indices,
                                                  NULL);
     printf("Log-L: %f (pinv = %f)\n", logl, prop_invar_list[j]);
@@ -301,7 +288,7 @@ int main(int argc, char * argv[])
   free(operations);
 
   /* we will no longer need the tree structure */
-  pll_rtree_destroy(tree);
+  pll_rtree_destroy(tree,NULL);
 
   return (EXIT_SUCCESS);
 }
diff --git a/test/src/scaling.c b/test/src/scaling.c
new file mode 100644
index 0000000..d860bed
--- /dev/null
+++ b/test/src/scaling.c
@@ -0,0 +1,338 @@
+/*
+    Copyright (C) 2017 Alexey Kozlov, Diego Darriba, Tomas Flouri
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero 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 Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+    Contact: Alexey Kozlov <Alexey.Kozlov at h-its.org>,
+    Exelixis Lab, Heidelberg Instutute for Theoretical Studies
+    Schloss-Wolfsbrunnenweg 35, D-69118 Heidelberg, Germany
+*/
+#include "common.h"
+
+#define N_STATES_NT 4
+#define N_STATES_AA 4
+#define N_CAT_GAMMA 4
+#define N_SITES 5
+#define FLOAT_PRECISION 4
+
+#define TREEFILE   "testdata/2000.tree"
+
+#define MIN(a,b) (a<b?a:b)
+
+static char nt_alphabet[] = "ACGT-";
+static double alphas[] = {0.05, 0.2, 2.0, 99.0 };
+static size_t alpha_count = sizeof(alphas) / sizeof(double);
+static unsigned int n_cat_gamma = N_CAT_GAMMA;
+unsigned int params_indices[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+static double frequencies[4] = { 0.4, 0.4, 0.1, 0.1 };
+static double subst_params[6] = {0.1, 10., 10., 0.1, 0.1, 1};
+
+static pll_utree_t * tree;
+static pll_unode_t * root;
+static pll_partition_t *part_noscale, *part_sitescale, *part_ratescale;
+static unsigned int traversal_size, matrix_count, ops_count;
+static pll_unode_t ** travbuffer;
+static unsigned int * matrix_indices;
+static double * branch_lengths;
+static pll_operation_t * operations;
+static double * persite_lnl;
+static double * sumtable;
+
+unsigned int scaler_idx(const pll_partition_t * p, unsigned int clv_idx)
+{
+  return (p->scale_buffers > 0 && clv_idx >= p->tips) ?
+      clv_idx - p->tips : PLL_SCALE_BUFFER_NONE;
+}
+
+void show_scaler(const pll_partition_t * p, unsigned int clv_idx)
+{
+  unsigned int scaler = scaler_idx(p, clv_idx);
+  if (scaler != PLL_SCALE_BUFFER_NONE)
+  {
+    unsigned int i, j;
+    printf("scaler %u: [ ", scaler);
+    for (i = 0; i < p->sites; ++i)
+    {
+      if (p->attributes & PLL_ATTRIB_RATE_SCALERS)
+      {
+        unsigned int * scalev = p->scale_buffer[scaler] + i*p->rate_cats;
+        unsigned int min_scaler = 1e6;
+        for (j = 0; j < p->rate_cats; ++j)
+          if (scalev[j] < min_scaler)
+            min_scaler = scalev[j];
+
+        printf("%d+(", min_scaler);
+        for (j = 0; j < p->rate_cats; ++j)
+        {
+          unsigned int s = scalev[j] - min_scaler;
+          printf("%u", MIN(50, s));
+          if (j < p->rate_cats-1)
+            printf(" ");
+        }
+        printf(")  ");
+      }
+      else
+        printf("%u ", p->scale_buffer[scaler][i]);
+    }
+    printf("]\n");
+  }
+}
+
+void show_clv(const pll_partition_t * p, unsigned int clv_idx, unsigned int site)
+{
+  unsigned int i;
+  unsigned int clv_span = p->states * p->rate_cats;
+  printf("CLV %u site %u (size=%u): [ ", clv_idx, site, clv_span);
+  for (i = (site-1)*clv_span; i < site*clv_span; ++i)
+    printf("%e ", p->clv[clv_idx][i]);
+  printf("]\n");
+
+}
+
+pll_partition_t * init_partition(unsigned int attrs)
+{
+  unsigned int i,j;
+  pll_partition_t * p = pll_partition_create(tree->tip_count,
+                                             tree->inner_count,
+                                             N_STATES_NT,
+                                             N_SITES,
+                                             1,        /* rate matrices */
+                                             2*tree->tip_count - 3,
+                                             N_CAT_GAMMA,
+                                             tree->inner_count,
+                                             attrs);
+
+  if (!p)
+    fatal("ERROR creating partition: %s\n", pll_errmsg);
+
+  size_t len = strlen(nt_alphabet);
+  char * seq = (char *) calloc(N_SITES+1, sizeof(char));
+  for (i = 0; i < tree->tip_count; ++i)
+  {
+    for (j = 0; j < N_SITES; ++j)
+    {
+      seq[j] = (i < 1500) ? nt_alphabet[j % len] : nt_alphabet[(i + j) % len];
+    }
+
+    pll_set_tip_states(p, tree->nodes[i]->clv_index, pll_map_nt, seq);
+  }
+
+  free(seq);
+
+  pll_set_frequencies(p, 0, frequencies);
+  pll_set_subst_params(p, 0, subst_params);
+
+  return p;
+}
+
+void init(unsigned int attrs)
+{
+  unsigned int i;
+
+  tree = pll_utree_parse_newick(TREEFILE);
+
+  if (!tree)
+    fatal("ERROR reading tree file: %s\n", pll_errmsg);
+
+  part_sitescale = init_partition(attrs);
+  part_ratescale = init_partition(attrs | PLL_ATTRIB_RATE_SCALERS);
+
+  /* build fixed structures */
+  unsigned int nodes_count = tree->inner_count + tree->tip_count;
+  unsigned int branch_count = nodes_count - 1;
+  travbuffer = (pll_unode_t **)malloc(nodes_count * sizeof(pll_unode_t *));
+  branch_lengths = (double *)malloc(branch_count * sizeof(double));
+  matrix_indices = (unsigned int *)malloc(branch_count * sizeof(unsigned int));
+  operations = (pll_operation_t *)malloc(tree->inner_count *
+                                                sizeof(pll_operation_t));
+  persite_lnl = (double *)malloc(part_sitescale->sites * sizeof(double));
+  sumtable = pll_aligned_alloc(part_sitescale->sites *
+                               part_sitescale->rate_cats *
+                               part_sitescale->states_padded * sizeof(double),
+                               part_sitescale->alignment);
+
+  root = tree->nodes[tree->tip_count+tree->inner_count-1];
+
+  /* get full traversal */
+  pll_utree_traverse(root,
+                     PLL_TREE_TRAVERSE_POSTORDER,
+                     cb_full_traversal,
+                     travbuffer,
+                     &traversal_size);
+
+  pll_utree_create_operations(travbuffer,
+                              traversal_size,
+                              branch_lengths,
+                              matrix_indices,
+                              operations,
+                              &matrix_count,
+                              &ops_count);
+
+  for (i = 0; i < matrix_count; ++i)
+    branch_lengths[i] = (i % 2 == 0) ? 1.0 : 1e-6;
+}
+
+void comp_derivatives(pll_partition_t * partition, pll_unode_t * r,
+                      double brlen, double * d1, double * d2)
+{
+  if (!pll_update_sumtable(partition, r->clv_index, r->back->clv_index,
+                           r->scaler_index, r->back->scaler_index,
+                           params_indices, sumtable))
+  {
+    fatal("ERROR computing sumtable: %s\n", pll_errmsg);
+  }
+
+  if (!pll_compute_likelihood_derivatives(partition,
+                                          r->scaler_index,
+                                          r->back->scaler_index,
+                                          brlen,
+                                          params_indices,
+                                          sumtable,
+                                          d1, d2))
+  {
+    fatal("ERROR computing derivatives: %s\n", pll_errmsg);
+  }
+}
+
+int eval(pll_partition_t * partition, double alpha)
+{
+  double rate_cats[N_CAT_GAMMA];
+  unsigned int i;
+  double d_f, dd_f;
+
+  pll_compute_gamma_cats(alpha, n_cat_gamma, rate_cats, PLL_GAMMA_RATES_MEAN);
+  pll_set_category_rates(partition, rate_cats);
+
+  printf("scaling = ");
+  if (partition->attributes & PLL_ATTRIB_RATE_SCALERS)
+    printf("per-rate");
+  else if (partition->scale_buffers > 0)
+    printf("per-site");
+  else
+    printf("OFF");
+
+  printf(", alpha = %lf, rates = [ ", alpha);
+  for (i = 0; i < n_cat_gamma; ++i)
+    printf("%lf ", rate_cats[i]);
+  printf("]\n");
+
+  printf("recompute P-matrices: %d\n", matrix_count);
+  pll_update_prob_matrices(partition,
+                           params_indices,
+                           matrix_indices,
+                           branch_lengths,
+                           matrix_count);
+
+  printf("recompute CLVs: %d\n", ops_count);
+  pll_update_partials(partition, operations, ops_count);
+
+  show_scaler(partition, root->back->clv_index);
+//  show_clv(partition, root->back->clv_index, 53);
+//  pll_show_pmatrix(partition, root->pmatrix_index, 9);
+//  pll_show_pmatrix(partition, root->pmatrix_index-1, 9);
+
+  // test derivatives
+  comp_derivatives(partition, root, 1.0, &d_f, &dd_f);
+
+  double ii_loglh = pll_compute_edge_loglikelihood(partition,
+                                        root->clv_index,
+                                        root->scaler_index,
+                                        root->back->clv_index,
+                                        root->back->scaler_index,
+                                        root->pmatrix_index,
+                                        params_indices,
+                                        persite_lnl);
+
+  printf("per-site logLH: [ ");
+  for (i = 0; i < partition->sites; ++i)
+    printf("%.4lf ", persite_lnl[i]);
+  printf("]\n");
+  printf("logLH INNER-INNER at edge (%u-%u): %.4lf, LH derivatives: %.4lf, %.4lf\n",
+         root->clv_index, root->back->clv_index, ii_loglh,
+         d_f, dd_f);
+
+  pll_unode_t * new_root = root->next->next;
+  pll_unode_t * tip = new_root->back;
+  assert(tip->clv_index < tree->tip_count);
+
+  // change root CLV orientation
+  pll_operation_t op;
+  op.parent_clv_index    = new_root->clv_index;
+  op.child1_clv_index    = new_root->next->back->clv_index;
+  op.child2_clv_index    = new_root->next->next->back->clv_index;
+  op.child1_matrix_index = new_root->next->pmatrix_index;
+  op.child2_matrix_index = new_root->next->next->pmatrix_index;
+  op.parent_scaler_index = scaler_idx(partition, op.parent_clv_index);
+  op.child1_scaler_index = scaler_idx(partition, op.child1_clv_index);
+  op.child2_scaler_index = scaler_idx(partition, op.child2_clv_index);
+
+  pll_update_partials(partition, &op, 1);
+
+  // test derivatives
+  comp_derivatives(partition, new_root, 1.0, &d_f, &dd_f);
+
+  double ti_loglh = pll_compute_edge_loglikelihood(partition,
+                                                   new_root->clv_index,
+                                                   new_root->scaler_index,
+                                                   tip->clv_index,
+                                                   tip->scaler_index,
+                                                   tip->pmatrix_index,
+                                                   params_indices,
+                                                   persite_lnl);
+
+  printf("logLH TIP-INNER at edge (%u-%u): %.4lf, LH derivatives: %.4lf, %.4lf\n\n",
+         new_root->clv_index, new_root->back->clv_index, ti_loglh,
+         d_f, dd_f);
+
+  if (fabs(ii_loglh - ti_loglh) > 1e-4)
+  {
+    printf("ERROR: Likelihood mismatch INNER-INNER vs TIP-INNER (see above)\n");
+  }
+
+  return 1;
+}
+
+void cleanup()
+{
+  free(travbuffer);
+  free(branch_lengths);
+  free(operations);
+  free(matrix_indices);
+  free(persite_lnl);
+  free(sumtable);
+  pll_partition_destroy(part_noscale);
+  pll_partition_destroy(part_sitescale);
+  pll_partition_destroy(part_ratescale);
+  pll_utree_destroy(tree, NULL);
+}
+
+
+int main(int argc, char * argv[])
+{
+  /* check attributes */
+  unsigned int attributes = get_attributes(argc, argv);
+
+  init(attributes);
+
+  unsigned int i;
+  for (i = 0; i < alpha_count; ++i)
+  {
+    eval(part_sitescale, alphas[i]);
+    eval(part_ratescale, alphas[i]);
+  }
+
+  cleanup();
+
+  return (0);
+}

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



More information about the debian-med-commit mailing list