made hash.cc functional