BUG: ^ == xor!!!
FIX: use 1 << n instead of 2^n