remove unneeded commands