move hash to Hash class