working find seam implementation