updating mongo javascript