updating mongo implementation