fix set issue; restructure types