working seam carving.  lots misunderstanding....