Match linearisation code with paper