Text this: Order N formulation for flexible multibody systems in tree topology