renamed 'library' to 'collection'
expose the collection an object belongs to in the setRule callback