add bswap support