print bit positions too; needs optimization