Update the example2 code