added nearvertex and isregular functions for polys