remove bitwise operator in conditional
remove unnecessary else statements