generic functions+ schema loading