make query synchronously