introduce another state for renegotiation to simplify code