updated example2.py - small tweak and tiny refactoring