this loop with the pointer arith feels a bit magical to approach, I might suggest at least a comment block for the loop and/or trywrite explaining the semantics