rework 1-bit case and speed it up quite a bit.