resource with generator