todo: implement negotiation spec;