conversion to mongoid