improved control point code