progress but not yet found a way to check for point congruency without double for loops