replace type with hash