first query working