adding a hash() for python3 compatibility