Added bitswap function