inlined bitraversable code