readBitPattern working somewhat