switching manual bit mapping to use pack/unpack.