added parameter matching and more cases for the removing warning