setting tree and simple query