fixed reconnecting and removed mongoose as dep