slight modifications to query1 & query3 api implementations