AI transforms the legal sector