add firstHash argument to getHash function