added simpler alternative for coding bit-string tests