default for type-function is payload-type now!