refined query structure