moved simplification to the leaves