moved loaderFunc