make retry() public, change debugging