he wrote many historical and legal works