remove some patterns