debugging query 3