fix hashing functions to return string correctly