How AI can automate law and legal industry