algorithm for adding control points added