Add reconnect-function