replace hash with type