add cross and dot, and segment inter judge routine