Returning new seam[m] instead of finding it