renamess resource attribute to key to avoid confusion