removed all usage of 'long' object type for python3 conversion