add compatibility
resource on many files
resource support sql - also cleaned it up a bit