changed so loadResource is nost constant qualified