modified query, this query should finally work now