update example to work with python 3