Almost completed code for I2
backup from sharelatex