removed some redundant code in deleteAd