reworked distributed reference to use only byte offsets and not lines