add DISTINCT when selecting via join table