return resource in extension methods