Made some changes to hash.py