Use built-in `distinct` function instead