change stack overflow example to use new type