adding query to the client api