rename "type" to clarify the variable's meaning.