add , distinct and tests