small modification for python3