get type directly from struct