added support for NSManagedObjects