removed duplicate code
added the (incomplete) bitwise performance upgrade