How AI, machine learning and ChatGPT are changing the legal system