added $hash method