remove nonlocal keyword for compatibility with python2.7x