edits to trilegal utils