added getHash function