updated bitwise operation