fixing examples for both py2 and py3.x