added removeBadge function