add [] accessors to resources