Working on the algorithms for <> case.