anchor.diff:        bprintf sb "\n\n"
      sb.ToString()
   
  - let addRuleToPeer peer routerTosb actStr =
  -   let updateRule k v = 
  -    bprintf v actStr    
  -
  -   // update dictionary
  -   match peer with
  -   | Any -> Map.map updateRule routerTosb
  -   | In -> routerTosb// what is to be done
  -   | Out -> routerTosb //what is to be done
  -   | Router x -> 
  + let addRuleToPeer peer routerTosb (actStr : string) = 
  +  let updateRule k (v : System.Text.StringBuilder) = v.Append actStr 
  +
  +  // update dictionary
  +  let newmap = 
  +    match peer with
  +    | Any -> Map.map updateRule routerTosb
  +    | In -> routerTosb// what is to be done
  +    | Out -> routerTosb //what is to be done
  +    | Router x -> 
         let v = Map.find x routerTosb
  -      Map.add x (bprintf v actStr) routerTosb 
  +      Map.add x (v.Append actStr)  routerTosb
  +  newmap
   
   let cbgpExport pi routerTosb peer acts = 
      let cbgpString a = 
       match a with 
  -    | SetComm(is) -> sprintf "\n            action \"community add %d\"" is
  +    | SetComm(is) -> sprintf "\n            action \"community add %s\"" is
       | SetMed i -> sprintf "\n            action \"metric %d\"" i
  -    | PrependPath i -> "\n            action \"as-path prepend %d\"" i
  +    | PrependPath i -> sprintf "\n            action \"as-path prepend %d\"" i
      let actStr = 
         if acts <> [] then Util.List.joinBy " " (List.map cbgpString acts)
         else "\n            allow"
  
positive.code:     getCBGPActions sb config.PolInfo pred actions routerNameToIp router
  
    for kv in routerToEsb do
      let peer = kv.key 
      bprintf sb ("\nbgp router " + routerIp + " peer " + peer)
      bprintf sb "\n    filter out"
      bprintf sb kv.value
      bprintf sb "\n    filter in"
      bprintf sb (Map.find routerToIsb peer)
    bprintf sb "\n\n"
  
negative.code:       for f in fs do
           i <- i + 1
           match f with
           | Deny -> 
              let denystr = "\n        add-rule" + "\n            match \"prefix in " + predStr + "\"" +    "\n            action deny" + exitStr
              routerToEsb <- Map.map (fun k (v : System.Text.StringBuilder) -> v.Append denystr) routerToEsb 
           | Allow((m, lp), es) -> 
              let comm = 23768 - i
              routerToIsb <- cbgpImport pi routerToISb (m, lp) comm predStr
              let matchStr = sprintf ("\n        add-rule" + 
                   "\n            match \"community is %d\"") comm
              match es with
              | [ (peer, acts) ] -> 
                routerToEsb <- addRuleToPeer peer routerToEsb matchStr
  