remove unwanted commands