update before adding mongoose