updated to mongoid