replaced bitwise with bytewise