nearly finish keypoints.c