added reference_by_offset, reference_by_first