remove unnessary keywords, simplify if statements