DB reconnect added to all functions