Working but requires handwritten "distinct" and "sort" methods