added some methods to Hash class