use r to access resource attributes