cleanup
added callbacks for reconnects