Second approach - using type contents