most of the way there, still type-confused