Doing the hash correctly