new changes to support mongoid4