Hash function added and comments added