completed tests and solution for distinct list