using bitwise and instead of comparator to shave off a few more bytes