changed logging to bitwise