removed distinct from query