how to use AI to write legal documents