implement subresource sample