[Resolved] Please help me convert this 2.0.1 code to 2.1a!

I'm following Todd's tutorial about Peggle game and can't find out how to convert this code in ArbiStaticActor.as to Box2DFlash 2.1a:

Code:
private function createBodyFromCoords(arrayOfCoords:Array, location:Point):b2Body {
    var allShapeDefs:Array = [];

    for each (var listOfPoints:Array in arrayOfCoords) {
        var newShapeDef:b2PolygonShape = new b2PolygonShape();
        newShapeDef.vertexCount = listOfPoints.length;
        for (var i:int = 0; i < listOfPoints.length; i++) {
            var nextPoint:Point = listOfPoints[i];
            b2Vec2(newShapeDef.vertices[i]).Set(nextPoint.x / PhysiVals.RATIO, nextPoint.y / PhysiVals.RATIO);
        }

        newShapeDef.density = 0;
        newShapeDef.friction = 0.2;
        newShapeDef.restitution = 0.3;

        allShapeDefs.push(newShapeDef);
    }

    var arbiBodyDef:b2BodyDef = new b2BodyDef();
    arbiBodyDef.position.Set(location.x / PhysiVals.RATIO, location.y / PhysiVals.RATIO);

    var arbiBody:b2Body = PhysiVals.world.CreateBody(arbiBodyDef);

    for each (var newShapeDef:b2ShapeDef in allShapeDefs) {
        arbiBody.CreateShape(newShapeDef);
    }
    arbiBody.SetMassFromShapes();

    return arbiBody;

}


Basically what this code should do is get an array containing arrays of coordinates to attach multiple polygon shapes to a single body. Any help to convert this to 2.1a would be GREATLY appreciated!!
I've been able to solve it myself.
Here's how I did it in case anyone would encounter the same problem:

Code:
private function createBodyFromCoords(arrayOfCoords:Array, location:Point):b2Body
      {
         var allShapeDefs:Array = [];
         
         for each (var listOfPoints:Array in arrayOfCoords)
         {
            var newShapeDef:b2PolygonShape = new b2PolygonShape();
            
            var vertices:Array = [];
            for (var i:int = 0; i < listOfPoints.length; i++)
            {
               var nextPoint:Point = listOfPoints[i];
               vertices[i] = new b2Vec2(nextPoint.x / PhysiVals.RATIO, nextPoint.y / PhysiVals.RATIO);
               
            }
            
            newShapeDef.SetAsArray( vertices, listOfPoints.length);
            
            allShapeDefs.push(newShapeDef);
         }
         
         var arbiBodyDef:b2BodyDef = new b2BodyDef();
         arbiBodyDef.type = b2Body.b2_staticBody;
         arbiBodyDef.position.Set(location.x / PhysiVals.RATIO, location.y / PhysiVals.RATIO);
         var arbiBody:b2Body = PhysiVals.world.CreateBody(arbiBodyDef);
         
         for each (var newShapeDefToAdd:b2PolygonShape in allShapeDefs)
         {
            var fd:b2FixtureDef = new b2FixtureDef();
            fd.shape = newShapeDefToAdd;
            fd.density = 0;
            fd.friction = 0.2;
            fd.restitution = 0.3;
            
            arbiBody.CreateFixture(fd);
         }
      return arbiBody;
      }

Original thread: https://box2d.org/forum/viewtopic.php?t=5701