changes to accommodate multiple popup windows