added repacking of bits at rx