addec typecast to if statements