now handles conditional display