convert startingLine to offset