adding handling for embeded popup