Added takeWhile, distinct, compare, sort