Update to use allObjectsInRealm(realm)