added code from our meeting in London