Adding the code I wrote for the talk