finish the resource