this works, but is not perfect. I don't get the resource to load