Added mongodb connection and update sample