updated and completed all hashing algorithm functions