Algorithm for hashing added.