refactor for composite type and type converter