added tol parameter to procedures in moving flag continuation