implement simple reconnection