improve IfStatement