add deltype and supporting fns