remove unnessary statements