Separated hashing function from function caller and made a new test for it.