Law in the era of AI