duplicate point check function finished