// use only when updating the timeline
    private void updateIntermediatePoints(int beizerPointIndexPointOne, int beizerPointIndexPointTwo, keyframeRefs[] newKeyframes, out IntermediateControlPoint middleControlPoint)
    {
        int newBeizerPointIndex;

        removeIntermediateBeizerPoints(beizerPointIndexPointOne, beizerPointIndexPointTwo, out newBeizerPointIndex);
        addIntermediateBeizerPoints(beizerPointIndexPointOne, newKeyframes.Length, newKeyframes, out middleControlPoint);
    }
    private void addIntermediateBeizerPoints(int beizerPointIndexOne, int amountOfIntermediatePointsToAdd, keyframeRefs[] keyframeRefData, out IntermediateControlPoint middleControlPoint)
    {
        int countDiff = (amountOfIntermediatePointsToAdd);

        Debug.Log("check countDiff " + countDiff);
        List <BeizerPoint> intermediatePoints = new List <BeizerPoint>();

        for (int i = 0; i < countDiff; i++)
        {
            GameObject g = Instantiate(beizerPathGroup.intermediatePointPrefab, beizerPathGroup.transform);
            g.transform.localScale = new Vector3(1, 1, 1);
            IntermediatePoint newIntermediatePoint = g.GetComponent <IntermediatePoint>();
            newIntermediatePoint.transform.position     = beizerPointPositionFromVideoKeyframeOfBeizerCurves(keyframeRefData[i]);
            newIntermediatePoint.beizerIntermediateTime = keyframeRefData[i].keyframeTime;
            newIntermediatePoint.beizerTime             = keyframeRefData[i].keyframeTime;
            intermediatePoints.Add(newIntermediatePoint);
        }

        middleControlPoint = Instantiate(beizerPathGroup.intermediateControlPointPrefab, beizerPathGroup.transform).GetComponent <IntermediateControlPoint>();
        middleControlPoint.transform.position     = beizerPointPositionFromVideoKeyframeOfBeizerCurves(keyframeRefData[3]);
        middleControlPoint.beizerIntermediateTime = keyframeRefData[3].keyframeTime;
        middleControlPoint.setAnimatedObj(animTrack.animatedObject);

        beizerPoints.InsertRange(beizerPointIndexOne, intermediatePoints);
        sortBeizerPointsByTime();
    }