add query to distinct method