generalized wrapT
fixed wrapT in example