fixed tresure constructor to include type