use the method from the resource class directly, instead of copying the function into each class