add getHash fuction