optimizing seam location