loop working with dendropy