revise structure type related logic