query is now distinct