keep track of offsets in plaintext