fixing a query in chores