query and basic popup structure