remove needless commands