Hash function added and tested.