change the way to init mongoose