update for mongoid4