Improved the code to read resources from the datatables