added support for Mongoid