Modified brute force edge detection checking to nice loop