using dismisspopover instead of removeview