added implementation for AbsDistinct