update params and remove unwanted stuff