improvement to third stage of stitching
improvement to final stage of bb algorithm